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
GitLab 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
d7b3650f
Commit
d7b3650f
authored
Mar 26, 2021
by
Marshall Scott
Browse files
Options
Downloads
Patches
Plain Diff
Working on ci_GEM, issues with constructing layers in volume
parent
0cf8f571
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ci_GEM.xml
+75
-0
75 additions, 0 deletions
ci_GEM.xml
src/ci_GEM.cpp
+53
-0
53 additions, 0 deletions
src/ci_GEM.cpp
with
128 additions
and
0 deletions
ci_GEM.xml
0 → 100644
+
75
−
0
View file @
d7b3650f
<lccdd
xmlns:compact=
"http://www.lcsim.org/schemas/compact/1.0"
xmlns:xs=
"http://www.w3.org/2001/XMLSchema"
xs:noNamespaceSchemaLocation=
"http://www.lcsim.org/schemas/compact/1.0/compact.xsd"
>
>
<!-- Some information about detector -->
<info
name=
"Central Ion GEM"
title=
"Central Ion GEM"
author=
"Marshall Scott"
url=
"https://eicweb.phy.anl.gov/EIC/detectors/reference_detector.git"
status=
"development"
version=
"v1 2021-03-23"
>
<comment>
Central Ion GEM
</comment>
</info>
<!-- Use DD4hep elements and materials definitions -->
<includes>
<gdmlFile
ref=
"elements.xml"
/>
<gdmlFile
ref=
"materials.xml"
/>
</includes>
<!-- Define the dimensions of the world volume -->
<define>
<constant
name=
"world_side"
value=
"50*m"
/>
<constant
name=
"world_x"
value=
"world_side"
/>
<constant
name=
"world_y"
value=
"world_side"
/>
<constant
name=
"world_z"
value=
"world_side"
/>
<constant
name=
"ci_GEM_id"
value=
"1"
>
<constant
name=
"ci_GEM_rin"
value=
"10 * cm"
>
<constant
name=
"ci_GEM_rout"
value=
"95 * cm"
>
<constant
name=
"ci_GEM_sizez"
value=
"30 * cm"
>
<constant
name=
"ci_GEM_shiftz"
value=
"0 * cm"
>
<constant
name=
"ci_GEM_posz"
value=
"0 * cm"
>
<constant
name=
"ci_GEM_posx"
value=
"0 * cm"
>
<constant
name=
"ci_GEM_nlayers"
value=
"8"
>
</define>
<limits>
</limits>
<regions>
</regions>
<!-- Common Generic visualization attributes -->
<!-- change this -->
<comment>
Common Generic visualization attributes
</comment>
<display>
<vis
name=
"ci_GEMVis"
alpha=
"0.4"
r=
"0.1"
g=
"0.0"
b=
"0.1"
showDaughters=
"true"
visible=
"true"
/>
</display>
<!-- Define detector -->
<detectors>
<comment>
Central Ion GEM
</comment>
<detector
id=
"ci_GEM_id"
name=
"ci_GEM"
type=
"ci_GEM"
insideTrackingVolume=
"false"
vis=
"ci_GEMVis"
>
<material
name=
"Ar10CO2"
/>
<!-- G4_Galactic -->
<dimensions
rmin=
"ci_GEM_rin"
rmax=
"ci_GEM_rout"
sizez=
"ci_GEM_sizez"
delta=
"ci_GEM_shiftz"
posz=
"ci_GEM_posz"
posx=
"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=
"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=
"3"
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=
"4"
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=
"5"
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=
"6"
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=
"7"
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"
/>
</detector>
</detectors>
<plugins>
</plugins>
This diff is collapsed.
Click to expand it.
src/ci_GEM.cpp
0 → 100644
+
53
−
0
View file @
d7b3650f
#include
<XML/Helper.h>
///////////////////////////
// Central Ion GEM
///////////////////////////
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
();
double
SizeZ
=
dims
.
sizez
();
// Size in Z direction
double
ROut
=
dims
.
rmax
();
// Outer radius
double
RIn
=
dims
.
rmin
();
// Inner radius
double
ShiftZ
=
dims
.
delta
();
double
PosX
=
dims
.
posx
();
double
PosZ
=
dims
.
posz
();
int
Nlayers
=
dims
.
nlayers
();
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
);
Volume
detVol
(
"ci_GEM_GVol_Logic"
,
ci_GEM_GVol_Solid
,
mat
);
for
(
cml_coll_t
c
(
detElem
,
_U
(
layer
));
c
;
c
++
)
{
xml_comp_t
x_layer
=
c
;
string
layer_name
=
detName
+
_toString
(
c
.
id
(),
"_layer%d"
);
Volume
layer_vol
(
layer_name
,
Tube
(
c
.
rmin
(),
c
.
rmax
(),
c
.
z
()
),
mat
);
Position
layer_pos
(
0
,
0
,
fnz
);
pv
=
envelopeVol
.
placeVolume
(
layer_vol
,
layer_pos
);
pv
.
addPhysVolID
(
"layer"
,
c
.
id
()
);
}
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
);
return
det
;
}
// clang-format off
DECLARE_DETELEMENT
(
ci_GEM
,
createDetector
)
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