Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
athena
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zhiwen Zhao
athena
Compare revisions
master to add_segmentation
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
zwzhao/athena
Select target project
No results found
add_segmentation
Select Git revision
Branches
101-north-ecal-add-modules-around-beampipe
104-add-realistic-cooling-for-gridpix
116-fix-the-detector-views
12-job-failed-106994
126-improved-gem-rings
131-update-tof-for-canyonlands
134-make-new-3d-views-of-ff-region-and-detectors
144-irt-geometry
147-fix-dirc-overlaps-and-make-it-great-again
21-electron-endcap-ecal-glass-outer-ring-implementation-needed-2
23-add-barrel-tof
24-tweak-zdc-longitudinal-size
37-place-sifi-fibers-in-the-assembly-in-ecal-barrel
38-mm-tracker-implementation
40-quick-viz
42-grid-pix-pid-detector
53-acts-geometry-bug-outer-tracker-barrel
54-dirc-better-parametrization
56-astropix-sampling-fraction-test-2
59-detailed-forward-gem-trd
7-central-tracker-endcap-detail
81-add-barrel-ecal-projection-at-positive-eta
9-detector-plugin-for-w-scfi-calorimeter-layers
98-update-barrel-and-endcap-tof
AllieWeary-master-patch-33350
acadia
acts_surface_binning
acts_vertex_barrel
add_segmentation
b0_acts
backward_ecal_cleanup
barrel-tracker-simplified
baseline-dimensions-rich-thickness
calibrations-ecal-hcal
calo-digitization-json
canyonlands
cherry-pick-85aaf29d
cherry-pick-ee231e50
deathvalley
deathvalley-1.5T
debug-vis
default_visibilities
documentation_tag
drich-optics-tests
drich-space-update
drich-two-mirrors
ecal-hcal-endcap-bore-and-length
hcal
hcal-klm
irt-erich
irt-init-v01
lengthen_ecalbarrel
line_drawing
master
module_frame
optional_full_overlap_check
outer_tracker_fix
overlap_child_pipeline
remove_comment
rich-photos
sly2j-master-patch-62318
sphere-issue
sphere_tests
test
test-drich-tracker
testBranchRobin
test_tof_zy
tmp_view
tmp_viz
update_becal_nlayers
vis_check
vis_dirc
vis_ref
zdc_prim_fix
zji-ScFiCal
Tags
acadia-v1.0
acadia-v1.0-alpha
acadia-v1.1
acadia-v2.0
acadia-v2.1
canyonlands-v1.0
canyonlands-v1.1
canyonlands-v1.2
canyonlands-v2.0
canyonlands-v2.1
canyonlands-v2.2
deathvalley-v1.0
deathvalley-v1.0-1.5T
deathvalley-v1.1
v0.1.0
v0.2.0
91 results
Swap
Target
EIC/detectors/athena
Select target project
EIC/detectors/athena
zwzhao/athena
FernandoTA/athena
palspeic/athena
4 results
master
Select Git revision
Branches
101-north-ecal-add-modules-around-beampipe
104-add-realistic-cooling-for-gridpix
116-fix-the-detector-views
12-job-failed-106994
126-improved-gem-rings
131-update-tof-for-canyonlands
134-make-new-3d-views-of-ff-region-and-detectors
144-irt-geometry
144-test-small-sensor-overlap
147-fix-dirc-overlaps-and-make-it-great-again
148-hcal-geometry-development
148-hcal-geometry-development-wdconinc-suggestion
149-dump-geometry-ci-job-should-also-produce-ff-geometry-separately
21-electron-endcap-ecal-glass-outer-ring-implementation-needed-2
23-add-barrel-tof
24-tweak-zdc-longitudinal-size
37-place-sifi-fibers-in-the-assembly-in-ecal-barrel
38-mm-tracker-implementation
40-quick-viz
42-grid-pix-pid-detector
53-acts-geometry-bug-outer-tracker-barrel
54-dirc-better-parametrization
56-astropix-sampling-fraction-test-2
59-detailed-forward-gem-trd
59-detailed-forward-gem-trd-2
7-central-tracker-endcap-detail
81-add-barrel-ecal-projection-at-positive-eta
9-detector-plugin-for-w-scfi-calorimeter-layers
98-update-barrel-and-endcap-tof
AllieWeary-master-patch-33350
WorkingGemTrd_MLmodel_andAnalysis
acadia
acts_surface_binning
acts_vertex_barrel
add_segmentation
adjust-barrel-emcalo-geometry
b0_acts
backward_ecal_cleanup
barrel-tracker-simplified
baseline-dimensions-rich-thickness
calibrations-ecal-hcal
calo-digitization-json
canyonlands
canyonlands-acts-dd4hep-plugin
cherry-pick-85aaf29d
cherry-pick-ee231e50
deathvalley
deathvalley-1.5T
deathvalley-acts-dd4hep-plugin
debug-vis
default_visibilities
documentation_tag
drich-optics-tests
drich-space-update
drich-two-mirrors
ecal-hcal-endcap-bore-and-length
hcal
hcal-klm
irt-erich
irt-init-v01
lengthen_ecalbarrel
line_drawing
lkosarzew-master-patch-25029
master
mlavinsky-master-patch-10431
module_frame
mriganka-branch02
niveditharam-master-patch-05822
optional_full_overlap_check
outer_tracker_fix
overlap_child_pipeline
remove_comment
rich-photos
shyam.kumar-master-patch-48113
sly2j-master-patch-62318
sphere-issue
sphere_tests
swapneshkhade-master-patch-16755
test
test-drich-tracker
testBranchRobin
test_tof_zy
tmp_view
tmp_viz
update_becal_nlayers
vanekjan-master-patch-74522
vdesai-master-patch-09582
vis_check
vis_dirc
vis_ref
wdconinc-master-patch-02076
weibin-master-patch-37475
zdc_prim_fix
zdemirog-master-patch-64142
zji-ScFiCal
Tags
acadia-v1.0
acadia-v1.0-alpha
acadia-v1.1
acadia-v2.0
acadia-v2.1
canyonlands-v1.0
canyonlands-v1.1
canyonlands-v1.2
canyonlands-v2.0
canyonlands-v2.1
canyonlands-v2.2
deathvalley-v1.0
deathvalley-v1.0-1.5T
deathvalley-v1.1
v0.1.0
v0.2.0
111 results
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
add skeleton for trapezoid segmentation
· 5d42e138
Chao Peng
authored
3 years ago
5d42e138
change name and add a few parameters
· e819713e
Chao Peng
authored
3 years ago
e819713e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/TrapezoidSegmentation.cpp
+115
-0
115 additions, 0 deletions
src/TrapezoidSegmentation.cpp
with
115 additions
and
0 deletions
src/TrapezoidSegmentation.cpp
0 → 100644
View file @
e819713e
// Trapezoid Segmentation for GlueX type barrel calorimeter
// Author: M. Zurek, C. Peng (ANL)
// Date: 06/25/2021
#include
"DD4hep/Factories.h"
#include
"DD4hep/detail/SegmentationsInterna.h"
#include
"DDSegmentation/Segmentation.h"
using
namespace
dd4hep
::
DDSegmentation
;
namespace
athena
::
seg
{
class
TrapezoidGridYZ
:
public
Segmentation
{
public:
// Default constructor used by derived classes passing the encoding string
TrapezoidGridYZ
(
const
std
::
string
&
cellEncoding
=
""
)
:
Segmentation
(
cellEncoding
)
{
// define type and description
_type
=
"TrapezoidGridYZ"
;
_description
=
"Trapezoid segmentation in the local YZ-plane"
;
registerParameters
();
}
// Default constructor used by derived classes passing an existing decoder
TrapezoidGridYZ
(
const
BitFieldCoder
*
decoder
)
:
Segmentation
(
decoder
)
{
// define type and description
_type
=
"TrapezoidGridYZ"
;
_description
=
"Trapezoid segmentation in the local YZ-plane"
;
registerParameters
();
}
// Destructor
virtual
~
TrapezoidGridYZ
()
{}
void
registerParameters
()
{
// @TODO: register all necessary parameters
// mandatory
registerParameter
(
"grid_size_y"
,
"Cell size in Y"
,
_gridSizeY
,
1.
,
SegmentationParameter
::
LengthUnit
);
registerParameter
(
"grid_size_z"
,
"Cell size in H"
,
_gridSizeZ
,
1.
,
SegmentationParameter
::
LengthUnit
);
// optional
registerIdentifier
(
"identifier_y"
,
"Cell ID identifier for Y"
,
_yId
,
"y"
);
registerIdentifier
(
"identifier_z"
,
"Cell ID identifier for Z"
,
_zId
,
"z"
);
}
// override
virtual
Vector3D
position
(
const
CellID
&
cellID
)
const
{
// @TODO
/* PolarGridRPhi
Vector3D cellPosition;
double R = binToPosition(_decoder->get(cID,_rId), _gridSizeR, _offsetR);
double phi = binToPosition(_decoder->get(cID,_phiId), _gridSizePhi, _offsetPhi);
cellPosition.X = R * cos(phi);
cellPosition.Y = R * sin(phi);
return cellPosition;
*/
return
Vector3D
();
}
// override
virtual
CellID
cellID
(
const
Vector3D
&
localPosition
,
const
Vector3D
&
globalPosition
,
const
VolumeID
&
volumeID
)
const
{
// @TODO
/*
PolarGridRPhi
double
phi
=
atan2
(
localPosition
.
Y
,
localPosition
.
X
);
double
R
=
sqrt
(
localPosition
.
X
*
localPosition
.
X
+
localPosition
.
Y
*
localPosition
.
Y
);
CellID
cID
=
vID
;
_decoder
->
set
(
cID
,
_rId
,
positionToBin
(
R
,
_gridSizeR
,
_offsetR
));
_decoder
->
set
(
cID
,
_phiId
,
positionToBin
(
phi
,
_gridSizePhi
,
_offsetPhi
));
*/
return
volumeID
;
}
// override
virtual
std
::
vector
<
double
>
cellDimensions
(
const
CellID
&
cellID
)
const
{
// @TODO
/* PolarGridRPhi
const double rPhiSize = binToPosition(_decoder->get(cID,_rId), _gridSizeR, _offsetR)*_gridSizePhi;
return {_gridSizeR, rPhiSize};
*/
return
std
::
vector
<
double
>
{
0.
,
0.
,
0.
};
}
// public methods to get member value
double
gridSizeY
()
const
{
return
_gridSizeY
;
}
double
gridSizeZ
()
const
{
return
_gridSizeZ
;
}
const
std
::
string
&
fieldNameY
()
const
{
return
_yId
;
}
const
std
::
string
&
fieldNameZ
()
const
{
return
_zId
;
}
// public methods to set member value
void
setGridSizeY
(
double
cellSize
)
{
_gridSizeY
=
cellSize
;
}
void
setGridSizeZ
(
double
cellSize
)
{
_gridSizeZ
=
cellSize
;
}
void
setFieldNameY
(
const
std
::
string
&
fieldName
)
{
_yId
=
fieldName
;
}
void
setFieldNameZ
(
const
std
::
string
&
fieldName
)
{
_zId
=
fieldName
;
}
protected
:
// @TODO: add parameters accordingly
double
_gridSizeY
;
double
_gridSizeZ
;
std
::
string
_yId
;
std
::
string
_zId
;
};
// class TrapezoidGridYZ
}
// namespace athena::seg
DECLARE_SEGMENTATION
(
TrapezoidGridYZ
,
new
dd4hep
::
SegmentationWrapper
<
athena
::
seg
::
TrapezoidGridYZ
>
)
This diff is collapsed.
Click to expand it.