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
EIC
detectors
athena
Commits
976b05f1
Commit
976b05f1
authored
3 years ago
by
Whitney Armstrong
Browse files
Options
Downloads
Patches
Plain Diff
Optional frame for BarrelTrackerWithFrame
parent
080a82eb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!165
Optional frame for BarrelTrackerWithFrame
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
compact/vertex_tracker.xml
+17
-26
17 additions, 26 deletions
compact/vertex_tracker.xml
src/BarrelTrackerWithFrame_geo.cpp
+44
-29
44 additions, 29 deletions
src/BarrelTrackerWithFrame_geo.cpp
src/TrapEndcapTracker_geo.cpp
+0
-1
0 additions, 1 deletion
src/TrapEndcapTracker_geo.cpp
with
61 additions
and
56 deletions
compact/vertex_tracker.xml
+
17
−
26
View file @
976b05f1
...
...
@@ -38,15 +38,21 @@ Simple carbon fiber support shell.
<constant
name=
"VertexBarrelMod2_rmin"
value=
"5.7*cm"
/>
<constant
name=
"VertexBarrelLayer_rmin1"
value=
"VertexBarrelMod1_rmin - VertexBarrelLayer_thickness/2.0"
/>
<constant
name=
"VertexBarrelLayer_rmin2"
value=
"VertexBarrelMod2_rmin - VertexBarrelLayer_thickness/2.0"
/>
<constant
name=
"VertexBarrelLayer_offset"
value=
"VertexBarrelLayer_rmin2-VertexBarrelLayer_rmin1"
/>
<constant
name=
"VertexBarrelLayer_rmax1"
value=
"VertexBarrelLayer_rmin1 + VertexBarrelLayer_thickness"
/>
<constant
name=
"VertexBarrelLayer_rmax2"
value=
"VertexBarrelLayer_rmin2 + VertexBarrelLayer_thickness"
/>
<constant
name=
"VertexBarrelShell_rmin"
value=
"VertexBarrelLayer_rmin2+VertexBarrelLayer_offset"
/>
<comment>
"Support" is to "shell" like "layer" is to "module", and is need for the flat stave barrel implementation.
</comment>
<constant
name=
"VertexBarrelShell_rmin"
value=
"10.0*cm"
/>
<constant
name=
"VertexBarrelShell_thickness"
value=
"300*um"
/>
<constant
name=
"VertexBarrelShell_rmax"
value=
"VertexBarrelShell_rmin + VertexBarrelShell_thickness"
/>
<constant
name=
"VertexBarrelShell_length"
value=
"VertexBarrel_length"
/>
<constant
name=
"VertexBarrelShell_length"
value=
"VertexBarrelLayer_length-VertexBarrelShell_thickness"
/>
<constant
name=
"VertexBarrelSupport_thickness"
value=
"1.0*cm"
/>
<constant
name=
"VertexBarrelSupport_rmin"
value=
"VertexBarrelShell_rmin-VertexBarrelSupport_thickness/2.0"
/>
<constant
name=
"VertexBarrelSupport_rmax"
value=
"VertexBarrelSupport_rmin + VertexBarrelSupport_thickness"
/>
<constant
name=
"VertexBarrelSupport_length"
value=
"VertexBarrelLayer_length"
/>
<constant
name=
"VertexTrackerEndcapN_zmin"
value=
"VertexTrackerBarrel_zmax"
/>
<constant
name=
"VertexTrackerEndcapP_zmin"
value=
"VertexTrackerBarrel_zmax"
/>
...
...
@@ -68,7 +74,7 @@ Simple carbon fiber support shell.
<constant
name=
"VertexBarrelStave_count"
value=
"128"
/>
<constant
name=
"VertexBarrelStave1_width"
value=
"2*VertexBarrelMod1_rmin * tan(180*degree/VertexBarrelStave_count)"
/>
<constant
name=
"VertexBarrelStave2_width"
value=
"2*VertexBarrelMod2_rmin * tan(180*degree/VertexBarrelStave_count)"
/>
<constant
name=
"VertexBarrelShellStave_width"
value=
"2*VertexBarrelShell_rmin * tan(180*degree/VertexBarrelStave_count)"
/>
<constant
name=
"VertexBarrelShellStave_width"
value=
"2*VertexBarrelShell_rmin * tan(180*degree/VertexBarrelStave_count)"
/>
</define>
<display>
...
...
@@ -83,15 +89,10 @@ Simple carbon fiber support shell.
insideTrackingVolume=
"true"
>
<dimensions
rmin=
"VertexBarrelLayer_rmin1"
rmax=
"VertexBarrelS
hell_rmax+0.2*cm
"
length=
"VertexBarrel
Layer
_length"
/>
rmax=
"VertexBarrelS
upport_rmax
"
length=
"VertexBarrel_length"
/>
<comment>
Vertex Barrel Modules
</comment>
<module
name=
"Module1"
vis=
"VertexLayerVis"
>
<frame
material=
"Air"
vis=
"InvisibleNoDaughters"
width=
"VertexBarrelStave1_width"
length=
"VertexBarrelMod_length"
height=
"1*mm"
thickness=
"0.1*um"
/>
<module_component
name=
"ITS3"
material=
"Silicon"
sensitive=
"true"
...
...
@@ -101,11 +102,6 @@ Simple carbon fiber support shell.
vis=
"VertexLayerVis"
/>
</module>
<module
name=
"Module2"
vis=
"VertexLayerVis"
>
<frame
material=
"Air"
vis=
"InvisibleNoDaughters"
width=
"VertexBarrelStave2_width"
length=
"VertexBarrelMod_length"
height=
"1*mm"
thickness=
"0.1*um"
/>
<module_component
name=
"ITS3"
material=
"Silicon"
sensitive=
"true"
...
...
@@ -115,16 +111,11 @@ Simple carbon fiber support shell.
vis=
"VertexLayerVis"
/>
</module>
<module
name=
"SupportShell"
vis=
"VertexSupportVis"
>
<frame
material=
"Air"
vis=
"InvisibleNoDaughters"
width=
"VertexBarrelShellStave_width"
length=
"VertexBarrelMod_length"
height=
"1*mm"
thickness=
"0.1*um"
/>
<module_component
name=
"CF Shell"
material=
"CarbonFiber"
sensitive=
"true"
width=
"VertexBarrelShellStave_width"
length=
"VertexBarrel
Mod
_length"
length=
"VertexBarrel
Shell
_length"
thickness=
"VertexBarrelShell_thickness"
vis=
"VertexLayerVis"
/>
</module>
...
...
@@ -157,9 +148,9 @@ Simple carbon fiber support shell.
</layer>
<layer
module=
"SupportShell"
id=
"3"
vis=
"VertexSupportVis"
>
<barrel_envelope
inner_r=
"VertexBarrelS
hell
_rmin"
outer_r=
"VertexBarrelS
hell
_rmax"
z_length=
"VertexBarrelS
hell
_length"
/>
inner_r=
"VertexBarrelS
upport
_rmin"
outer_r=
"VertexBarrelS
upport
_rmax"
z_length=
"VertexBarrelS
upport
_length"
/>
<rphi_layout
phi_tilt=
"0.0*degree"
nphi=
"VertexBarrelStave_count"
phi0=
"0.0"
rc=
"VertexBarrelShell_rmin"
dr=
"0.0 * mm"
/>
<z_layout
dr=
"0.0 * mm"
z0=
"0.0 * mm"
nz=
"1"
/>
</layer>
...
...
This diff is collapsed.
Click to expand it.
src/BarrelTrackerWithFrame_geo.cpp
+
44
−
29
View file @
976b05f1
/** \addtogroup VertexTracker Vertex Trackers
* \brief Type: **SiVertexBarrel**.
* \author W. Armstrong
*
* \ingroup trackers
*
*
...
...
@@ -27,7 +28,15 @@ using namespace dd4hep;
using
namespace
dd4hep
::
rec
;
using
namespace
dd4hep
::
detail
;
static
Ref_t
create_detector
(
Detector
&
description
,
xml_h
e
,
SensitiveDetector
sens
)
{
/** Barrel Tracker with space frame.
*
* - Optional "frame" tag within the module element.
* - Optional "support" tag within the detector element.
*
*
*/
static
Ref_t
create_BarrelTrackerWithFrame
(
Detector
&
description
,
xml_h
e
,
SensitiveDetector
sens
)
{
typedef
vector
<
PlacedVolume
>
Placements
;
xml_det_t
x_det
=
e
;
Material
air
=
description
.
air
();
...
...
@@ -38,7 +47,7 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
map
<
string
,
Volume
>
volumes
;
map
<
string
,
Placements
>
sensitives
;
map
<
string
,
std
::
vector
<
VolPlane
>>
volplane_surfaces
;
map
<
string
,
xml_h
>
xmleles
;
//
map<string, xml_h> xmleles;
PlacedVolume
pv
;
dd4hep
::
xml
::
Dimension
dimensions
(
x_det
.
dimensions
());
...
...
@@ -85,44 +94,50 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
// loop over the modules
for
(
xml_coll_t
mi
(
x_det
,
_U
(
module
));
mi
;
++
mi
)
{
xml_comp_t
x_mod
=
mi
;
xml_comp_t
m_env
=
x_mod
.
child
(
_U
(
frame
));
string
m_nam
=
x_mod
.
nameStr
();
xmleles
[
m_nam
]
=
x_mod
;
// triangular volume envelope
double
frame_thickness
=
m_env
.
thickness
();
double
frame_width
=
m_env
.
width
();
double
frame_height
=
getAttrOrDefault
<
double
>
(
m_env
,
_U
(
height
),
5.0
*
mm
);
double
tanth
=
frame_height
/
(
frame_width
/
2.0
);
double
frame_height2
=
frame_height
-
frame_thickness
-
frame_thickness
/
tanth
;
double
frame_width2
=
2.0
*
frame_height2
/
tanth
;
Trd1
moduleframe_part1
(
frame_width
/
2
,
0.001
*
mm
,
m_env
.
length
()
/
2
,
frame_height
/
2
);
Trd1
moduleframe_part2
(
frame_width2
/
2
,
0.001
*
mm
,
m_env
.
length
()
/
2
+
0.01
*
mm
,
frame_height2
/
2
);
SubtractionSolid
moduleframe
(
moduleframe_part1
,
moduleframe_part2
,
Position
(
0.0
,
frame_thickness
,
0.0
));
Volume
v_module
(
m_nam
+
"_vol"
,
moduleframe
,
description
.
material
(
m_env
.
materialStr
()));
v_module
.
setVisAttributes
(
description
,
m_env
.
visStr
());
int
ncomponents
=
0
;
int
sensor_number
=
1
;
if
(
volumes
.
find
(
m_nam
)
!=
volumes
.
end
())
{
printout
(
ERROR
,
"
Si
Tracker
Barrel"
,
"Logics error in building modules."
);
printout
(
ERROR
,
"
Barrel
Tracker
WithFrame"
,
string
((
string
(
"Module with named "
)
+
m_nam
+
string
(
" already exists."
))).
c_str
()
);
throw
runtime_error
(
"Logics error in building modules."
);
}
int
ncomponents
=
0
;
int
sensor_number
=
1
;
double
total_thickness
=
0
;
// Compute module total thickness from components
xml_coll_t
ci
(
x_mod
,
_U
(
module_component
));
for
(
ci
.
reset
(),
total_thickness
=
0.0
;
ci
;
++
ci
)
{
total_thickness
+=
xml_comp_t
(
ci
).
thickness
();
}
// module assembly
//
the
module assembly
volume
Assembly
m_vol
(
m_nam
);
m_vol
.
placeVolume
(
v_module
,
Position
(
0.0
,
0.0
,
frame_height
/
2
+
total_thickness
/
2.0
));
volumes
[
m_nam
]
=
m_vol
;
m_vol
.
setVisAttributes
(
description
.
visAttributes
(
x_mod
.
visStr
()));
// Optional module frame.
if
(
x_mod
.
hasChild
(
"frame"
)){
xml_comp_t
m_frame
=
x_mod
.
child
(
_U
(
frame
));
//xmleles[m_nam] = x_mod;
double
frame_thickness
=
m_frame
.
thickness
();
double
frame_width
=
m_frame
.
width
();
double
frame_height
=
getAttrOrDefault
<
double
>
(
m_frame
,
_U
(
height
),
5.0
*
mm
);
double
tanth
=
frame_height
/
(
frame_width
/
2.0
);
double
frame_height2
=
frame_height
-
frame_thickness
-
frame_thickness
/
tanth
;
double
frame_width2
=
2.0
*
frame_height2
/
tanth
;
Trd1
moduleframe_part1
(
frame_width
/
2
,
0.001
*
mm
,
m_frame
.
length
()
/
2
,
frame_height
/
2
);
Trd1
moduleframe_part2
(
frame_width2
/
2
,
0.001
*
mm
,
m_frame
.
length
()
/
2
+
0.01
*
mm
,
frame_height2
/
2
);
SubtractionSolid
moduleframe
(
moduleframe_part1
,
moduleframe_part2
,
Position
(
0.0
,
frame_thickness
,
0.0
));
Volume
v_moduleframe
(
m_nam
+
"_vol"
,
moduleframe
,
description
.
material
(
m_frame
.
materialStr
()));
v_moduleframe
.
setVisAttributes
(
description
,
m_frame
.
visStr
());
m_vol
.
placeVolume
(
v_moduleframe
,
Position
(
0.0
,
0.0
,
frame_height
/
2
+
total_thickness
/
2.0
));
}
double
thickness_so_far
=
0.0
;
double
thickness_sum
=
-
total_thickness
/
2.0
;
for
(
xml_coll_t
ci
(
x_mod
,
_U
(
module_component
));
ci
;
++
ci
,
++
ncomponents
)
{
...
...
@@ -298,6 +313,6 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
//@}
// clang-format off
DECLARE_DETELEMENT
(
BarrelTrackerWithFrame
,
create_
detector
)
DECLARE_DETELEMENT
(
athena_TrackerBarrel
,
create_
detector
)
DECLARE_DETELEMENT
(
athena_VertexBarrel
,
create_
detector
)
DECLARE_DETELEMENT
(
BarrelTrackerWithFrame
,
create_
BarrelTrackerWithFrame
)
DECLARE_DETELEMENT
(
athena_TrackerBarrel
,
create_
BarrelTrackerWithFrame
)
DECLARE_DETELEMENT
(
athena_VertexBarrel
,
create_
BarrelTrackerWithFrame
)
This diff is collapsed.
Click to expand it.
src/TrapEndcapTracker_geo.cpp
+
0
−
1
View file @
976b05f1
...
...
@@ -41,7 +41,6 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
sens
.
setType
(
"tracker"
);
for
(
xml_coll_t
su
(
x_det
,
_U
(
support
));
su
;
++
su
)
{
std
::
cout
<<
"support !!!
\n
"
;
xml_comp_t
x_support
=
su
;
double
support_thickness
=
getAttrOrDefault
(
x_support
,
_U
(
thickness
),
2.0
*
mm
);
double
support_length
=
getAttrOrDefault
(
x_support
,
_U
(
length
),
2.0
*
mm
);
...
...
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