Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Reference Detector
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
Terraform modules
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
EIC
detectors
Reference Detector
Commits
1628be70
Commit
1628be70
authored
4 years ago
by
Whitney Armstrong
Browse files
Options
Downloads
Patches
Plain Diff
modified: compact/ci_GEM.xml
modified: src/ci_GEM.cpp
parent
a3fa1230
No related branches found
No related tags found
No related merge requests found
Pipeline
#8113
failed
4 years ago
Stage: config
Stage: build
Stage: docs
Stage: test
Stage: finalize
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
compact/ci_GEM.xml
+1
-1
1 addition, 1 deletion
compact/ci_GEM.xml
src/ci_GEM.cpp
+36
-34
36 additions, 34 deletions
src/ci_GEM.cpp
with
37 additions
and
35 deletions
compact/ci_GEM.xml
+
1
−
1
View file @
1628be70
...
...
@@ -45,7 +45,7 @@
<detector
id=
"ci_GEM_id"
name=
"ci_GEM"
type=
"ci_GEM"
insideTrackingVolume=
"false"
vis=
"ci_GEMVis"
readout=
"ci_GEM_Hits"
>
<material
name=
"Ar10CO2"
/>
<comment>
position of the front face of the detector
</comment>
<position
x=
"0"
y=
"0"
z=
"
0
"
/>
<position
x=
"0"
y=
"0"
z=
"
SiliconTrackerOuterBarrel_zmax
"
/>
<dimensions
rmin=
"ci_GEM_rin"
rmax=
"ci_GEM_rout"
z_length=
"ci_GEM_sizez"
z_offset=
"ci_GEM_shiftz"
z=
"ci_GEM_posz"
x=
"ci_GEM_posx"
number=
"ci_GEM_nlayers"
rmax1=
"ci_HCAL_lay_rin -1. * cm"
/>
<layer
id=
"0"
z=
"-ci_GEM_sizez * 0.5 + (5 + 3. * 0) * cm"
inner_r=
"ci_GEM_rin + (1. + 0.5 * 0) * cm"
outer_r=
"ci_GEM_rout + (-25. + 2. * 0) * cm"
dz=
"1 * cm"
/>
<layer
id=
"1"
z=
"-ci_GEM_sizez * 0.5 + (5 + 3. * 1) * cm"
inner_r=
"ci_GEM_rin + (1. + 0.5 * 1) * cm"
outer_r=
"ci_GEM_rout + (-25. + 2. * 1) * cm"
dz=
"1 * cm"
/>
...
...
This diff is collapsed.
Click to expand it.
src/ci_GEM.cpp
+
36
−
34
View file @
1628be70
...
...
@@ -8,45 +8,47 @@ using namespace dd4hep;
static
Ref_t
createDetector
(
Detector
&
desc
,
xml_h
handle
,
SensitiveDetector
sens
)
{
xml
::
DetElement
detElem
=
handle
;
std
::
string
detName
=
detElem
.
nameStr
();
int
detID
=
detElem
.
id
();
xml
::
Component
dims
=
detElem
.
dimensions
();
xml
::
Component
pos
=
detElem
.
position
();
double
SizeZ
=
dims
.
z_length
();
// Size in Z direction
double
ROut
=
dims
.
rmax
();
// Outer radius
double
RIn
=
dims
.
rmin
();
// Inner radius
double
ShiftZ
=
dims
.
z_offset
();
double
X
=
dims
.
x
();
double
Z
=
dims
.
z
();
int
Nlayers
=
dims
.
number
();
double
HCAL_rmin
=
dims
.
rmax1
();
// Maximum radius that the layer can be
Material
mat
=
desc
.
material
(
detElem
.
materialStr
());
Material
vac
=
desc
.
material
(
"Vacuum"
);
//Outer Volume
Tube
ci_GEM_GVol_Solid
(
RIn
,
ROut
,
SizeZ
/
2.
,
0.
,
360
*
deg
);
Volume
detVol
(
"ci_GEM_GVol_Logic"
,
ci_GEM_GVol_Solid
,
vac
);
//Adding layers to placed volume
for
(
xml_coll_t
li
(
detElem
,
_U
(
layer
));
li
;
++
li
){
xml_comp_t
x_layer
=
li
;
std
::
string
layer_name
=
detName
+
_toString
(
x_layer
.
id
(),
"_layer%d"
);
double
outer_r
=
x_layer
.
outer_r
();
if
(
outer_r
>
HCAL_rmin
){
outer_r
=
HCAL_rmin
;}
Volume
layer_vol
(
layer_name
,
Tube
(
x_layer
.
inner_r
(),
outer_r
,
x_layer
.
dz
()),
mat
);
layer_vol
.
setVisAttributes
(
desc
.
visAttributes
(
detElem
.
visStr
()));
sens
.
setType
(
"tracker"
);
xml
::
DetElement
detElem
=
handle
;
std
::
string
detName
=
detElem
.
nameStr
();
int
detID
=
detElem
.
id
();
xml
::
Component
dims
=
detElem
.
dimensions
();
xml
::
Component
pos
=
detElem
.
position
();
double
SizeZ
=
dims
.
z_length
();
// Size in Z direction
double
ROut
=
dims
.
rmax
();
// Outer radius
double
RIn
=
dims
.
rmin
();
// Inner radius
double
ShiftZ
=
dims
.
z_offset
();
double
X
=
dims
.
x
();
double
Z
=
dims
.
z
();
int
Nlayers
=
dims
.
number
();
double
HCAL_rmin
=
dims
.
rmax1
();
// Maximum radius that the layer can be
Material
mat
=
desc
.
material
(
detElem
.
materialStr
());
Material
vac
=
desc
.
material
(
"Vacuum"
);
// Outer Volume
Tube
ci_GEM_GVol_Solid
(
RIn
,
ROut
,
SizeZ
/
2.
,
0.
,
360
*
deg
);
Volume
detVol
(
"ci_GEM_GVol_Logic"
,
ci_GEM_GVol_Solid
,
vac
);
// Adding layers to placed volume
for
(
xml_coll_t
li
(
detElem
,
_U
(
layer
));
li
;
++
li
)
{
xml_comp_t
x_layer
=
li
;
std
::
string
layer_name
=
detName
+
_toString
(
x_layer
.
id
(),
"_layer%d"
);
double
outer_r
=
x_layer
.
outer_r
();
if
(
outer_r
>
HCAL_rmin
)
{
outer_r
=
HCAL_rmin
;
}
Volume
layer_vol
(
layer_name
,
Tube
(
x_layer
.
inner_r
(),
outer_r
,
x_layer
.
dz
()),
mat
);
layer_vol
.
setVisAttributes
(
desc
.
visAttributes
(
detElem
.
visStr
()));
sens
.
setType
(
"tracker"
);
layer_vol
.
setSensitiveDetector
(
sens
);
Position
layer_pos
(
0
,
0
,
x_layer
.
z
());
PlacedVolume
layer_phv
=
detVol
.
placeVolume
(
layer_vol
,
layer_pos
);
layer_phv
.
addPhysVolID
(
"layer"
,
x_layer
.
id
());
Position
layer_pos
(
0
,
0
,
x_layer
.
z
());
PlacedVolume
layer_phv
=
detVol
.
placeVolume
(
layer_vol
,
layer_pos
);
layer_phv
.
addPhysVolID
(
"layer"
,
x_layer
.
id
());
}
DetElement
det
(
detName
,
detID
);
Volume
motherVol
=
desc
.
pickMotherVolume
(
det
);
Transform3D
tr
(
RotationZYX
(
0.0
,
0.0
,
0.0
),
Position
(
pos
.
x
(),
pos
.
x
(),
pos
.
z
()
+
SizeZ
/
2.0
));
Transform3D
tr
(
RotationZYX
(
0.0
,
0.0
,
0.0
),
Position
(
pos
.
x
(),
pos
.
x
(),
pos
.
z
()
+
SizeZ
/
2.0
));
PlacedVolume
detPV
=
motherVol
.
placeVolume
(
detVol
,
tr
);
detPV
.
addPhysVolID
(
"system"
,
detID
);
det
.
setPlacement
(
detPV
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment