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
2b4ad3ed
Commit
2b4ad3ed
authored
4 years ago
by
Marshall Scott
Browse files
Options
Downloads
Patches
Plain Diff
Working on ci_GEM, volume issue
parent
d7b3650f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ci_GEM.xml
+2
-2
2 additions, 2 deletions
ci_GEM.xml
src/ci_GEM.cpp
+13
-16
13 additions, 16 deletions
src/ci_GEM.cpp
with
15 additions
and
18 deletions
ci_GEM.xml
+
2
−
2
View file @
2b4ad3ed
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
<!-- change this -->
<!-- change this -->
<comment>
Common Generic visualization attributes
</comment>
<comment>
Common Generic visualization attributes
</comment>
<display>
<display>
<vis
name=
"ci_GEMVis"
alpha=
"0.4"
r=
"0.
1
"
g=
"0.
0
"
b=
"0.
1
"
showDaughters=
"true"
visible=
"true"
/>
<vis
name=
"ci_GEMVis"
r=
"0.
8
"
g=
"0.
4
"
b=
"0.
3
"
alpha=
"0.8"
showDaughters=
"true"
visible=
"true"
/>
</display>
</display>
<!-- Define detector -->
<!-- Define detector -->
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
</comment>
</comment>
<detector
id=
"ci_GEM_id"
name=
"ci_GEM"
type=
"ci_GEM"
insideTrackingVolume=
"false"
vis=
"ci_GEMVis"
>
<detector
id=
"ci_GEM_id"
name=
"ci_GEM"
type=
"ci_GEM"
insideTrackingVolume=
"false"
vis=
"ci_GEMVis"
>
<material
name=
"Ar10CO2"
/>
<!-- G4_Galactic -->
<material
name=
"Ar10CO2"
/>
<!-- G4_Galactic -->
<dimensions
rmin=
"ci_GEM_rin"
rmax=
"ci_GEM_rout"
sizez=
"ci_GEM_sizez"
delta=
"ci_GEM_shiftz"
pos
z=
"ci_GEM_posz"
pos
x=
"ci_GEM_posx"
nlayers=
"ci_GEM_nlayers"
/>
<dimensions
rmin=
"ci_GEM_rin"
rmax=
"ci_GEM_rout"
sizez=
"ci_GEM_sizez"
delta=
"ci_GEM_shiftz"
z=
"ci_GEM_posz"
x=
"ci_GEM_posx"
nlayers=
"ci_GEM_nlayers"
/>
<layer
id=
"0"
z=
"-sizez * 0.5 + (5 + 3. * id) * cm"
inner_r=
"rmin + (1. + 0.5 * id) * cm"
outer_r=
"rmax + (-25. + 2. * id) * cm"
dz=
"1 * cm"
/>
<layer
id=
"0"
z=
"-sizez * 0.5 + (5 + 3. * id) * cm"
inner_r=
"rmin + (1. + 0.5 * id) * cm"
outer_r=
"rmax + (-25. + 2. * id) * cm"
dz=
"1 * cm"
/>
<layer
id=
"1"
z=
"-sizez * 0.5 + (5 + 3. * id) * cm"
inner_r=
"rmin + (1. + 0.5 * id) * cm"
outer_r=
"rmax + (-25. + 2. * id) * cm"
dz=
"1 * cm"
/>
<layer
id=
"1"
z=
"-sizez * 0.5 + (5 + 3. * id) * cm"
inner_r=
"rmin + (1. + 0.5 * id) * cm"
outer_r=
"rmax + (-25. + 2. * id) * cm"
dz=
"1 * cm"
/>
<layer
id=
"2"
z=
"-sizez * 0.5 + (5 + 3. * id) * cm"
inner_r=
"rmin + (1. + 0.5 * id) * cm"
outer_r=
"rmax + (-25. + 2. * id) * cm"
dz=
"1 * cm"
/>
<layer
id=
"2"
z=
"-sizez * 0.5 + (5 + 3. * id) * cm"
inner_r=
"rmin + (1. + 0.5 * id) * cm"
outer_r=
"rmax + (-25. + 2. * id) * cm"
dz=
"1 * cm"
/>
...
...
This diff is collapsed.
Click to expand it.
src/ci_GEM.cpp
+
13
−
16
View file @
2b4ad3ed
...
@@ -16,37 +16,34 @@ static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens
...
@@ -16,37 +16,34 @@ static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens
double
ROut
=
dims
.
rmax
();
// Outer radius
double
ROut
=
dims
.
rmax
();
// Outer radius
double
RIn
=
dims
.
rmin
();
// Inner radius
double
RIn
=
dims
.
rmin
();
// Inner radius
double
ShiftZ
=
dims
.
delta
();
double
ShiftZ
=
dims
.
delta
();
double
PosX
=
dims
.
pos
x
();
double
X
=
dims
.
x
();
double
PosZ
=
dims
.
pos
z
();
double
Z
=
dims
.
z
();
int
Nlayers
=
dims
.
nlayers
();
int
Nlayers
=
dims
.
nlayers
();
Material
mat
=
desc
.
material
(
detElem
.
materialStr
());
Material
mat
=
desc
.
material
(
detElem
.
materialStr
());
Tube
envelope
(
RIn
,
ROut
,
SizeZ
,
0
,
360
*
deg
);
//Volume envelopeVol(detName + "_envelope", envelope, det.;
Tube
ci_GEM_GVol_Solid
(
RIn
,
ROut
,
SizeZ
/
2.
,
0.
,
360
*
deg
);
Tube
ci_GEM_GVol_Solid
(
RIn
,
ROut
,
SizeZ
/
2.
,
0.
,
360
*
deg
);
Volume
detVol
(
"ci_GEM_GVol_Logic"
,
ci_GEM_GVol_Solid
,
mat
);
Volume
detVol
(
"ci_GEM_GVol_Logic"
,
ci_GEM_GVol_Solid
,
mat
);
detVol
.
setVisAttributes
(
desc
.
visAttributes
(
detElem
.
visStr
()));
DetElement
det
(
detName
,
detID
);
Volume
motherVol
=
desc
.
pickMotherVolume
(
det
);
Transform3D
tr
(
RotationZYX
(
0.
,
0.
,
0.
),
Position
(
0.
,
0.
,
ShiftZ
));
PlacedVolume
detPV
=
motherVol
.
placeVolume
(
detVol
,
tr
);
//Adding layers to placed volume
for
(
cml_coll_t
c
(
detElem
,
_U
(
layer
));
c
;
c
++
)
for
(
cml_coll_t
c
(
detElem
,
_U
(
layer
));
c
;
c
++
)
{
{
xml_comp_t
x_layer
=
c
;
xml_comp_t
x_layer
=
c
;
string
layer_name
=
detName
+
_toString
(
c
.
id
(),
"_layer%d"
);
string
layer_name
=
detName
+
_toString
(
c
.
id
(),
"_layer%d"
);
Volume
layer_vol
(
layer_name
,
Tube
(
c
.
rmin
(),
c
.
rmax
(),
c
.
z
()
),
mat
);
Volume
layer_vol
(
layer_name
,
Tube
(
c
.
rmin
(),
c
.
rmax
(),
c
.
z
()
),
mat
);
Position
layer_pos
(
0
,
0
,
fnz
);
layer_vol
.
pv
=
envelopeVol
.
placeVolume
(
layer_vol
,
layer_pos
);
Position
layer_pos
(
0
,
0
,
0
);
pv
.
addPhysVolID
(
"layer"
,
c
.
id
()
);
detPV
.
placeVolume
(
layer_vol
,
layer_pos
);
}
}
detVol
.
setVisAttributes
(
desc
.
visAttributes
(
detElem
.
visStr
()));
DetElement
det
(
detName
,
detID
);
Volume
motherVol
=
desc
.
pickMotherVolume
(
det
);
Transform3D
tr
(
RotationZYX
(
0.
,
0.
,
0.
),
Position
(
0.
,
0.
,
ShiftZ
));
PlacedVolume
detPV
=
motherVol
.
placeVolume
(
envelopeVol
,
tr
);
det
.
setPlacement
(
detPV
);
det
.
setPlacement
(
detPV
);
return
det
;
return
det
;
}
}
// clang-format off
// clang-format off
...
...
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