Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DD4hep
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cepc
externals
mirroring
DD4hep
Commits
ad4151a4
Commit
ad4151a4
authored
8 years ago
by
Yorgos Voutsinas
Committed by
Frank Gaede
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
adding a layered calorimeter struct that copes with conical calorimeters
parent
cd2ca213
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
DDRec/include/DDRec/DetectorData.h
+144
-0
144 additions, 0 deletions
DDRec/include/DDRec/DetectorData.h
DDRec/src/DetectorData.cpp
+49
-10
49 additions, 10 deletions
DDRec/src/DetectorData.cpp
with
193 additions
and
10 deletions
DDRec/include/DDRec/DetectorData.h
+
144
−
0
View file @
ad4151a4
...
...
@@ -449,6 +449,150 @@ namespace DD4hep {
/** Simple data structure defining a layered calorimeter layout for
* reconstruction. Modified version of the above LayeredCalorimeterStruct that
* can deal with a conical shaped calorimeter
*
* @author Y.Voutsinas, CERN
* @date March, 2017
* @version $Id: $
*/
struct
LayeredConicalCalorimeterStruct
{
/// enum for encoding the sensor type in typeFlags
enum
LayoutType
{
BarrelLayout
=
0
,
EndcapLayout
};
/// type of layout: BarrelLayout or EndcapLayout
LayoutType
layoutType
;
/// extent of the calorimeter in the r-z-plane [ RminInn, RmaxInn, RminOut, RmaxOut, zmin, zmax ] in mm.
double
extent
[
6
]
;
/** the order of the rotational symmetry at the outside, e.g.
* 8 for an octagonal barrel calorimeter.
*/
int
outer_symmetry
;
/** the order of the rotational symmetry at the inside, e.g.
* 4 for an endcap with a rectangular cout out at the inside.
*/
int
inner_symmetry
;
/** Angle between the normal to the first outer face of the
* calorimeter and the x-axis, where the first face is defined
* to be the one with the smallest positve angle.
* Example:
* outer_phi0=0 corresponds to the first face beeing vertical and
* thus the bottom face being parallel to the floor for a
* symmetry that is a multiple of 4.
*/
double
outer_phi0
;
/** Same as outer_phi for the first inner face.
*/
double
inner_phi0
;
/** Azimuthal angle of the first module in barrel layout
* DEPRECATED! PLEASE POPULATE INNER/OUTER PHI0 INSTEAD
*/
double
phi0
;
/// Gap between modules(eg. stave gap) in the phi-direction
double
gap0
;
/// Gap between modules(eg. middle stave gap) in the z-direction
double
gap1
;
/// Gap between modules(reserved for future use) e.g in the r-direction
double
gap2
;
struct
Layer
{
Layer
()
:
distance
(
0
),
phi0
(
0
),
absorberThickness
(
0
),
inner_nRadiationLengths
(
0
),
inner_nInteractionLengths
(
0
),
outer_nRadiationLengths
(
0
),
outer_nInteractionLengths
(
0
),
inner_thickness
(
0
),
outer_thickness
(
0
),
sensitive_thickness
(
0
),
cellSize0
(
0
),
cellSize1
(
0
)
{
}
/// distance from Origin (or the z-axis) to the inner-most face of the layer
double
distance
;
/// phi0 of layer: potential rotation around normal to absorber plane, e.g. if layers are 'staggered' in phi in fwd. calos
double
phi0
;
/// thickness of the absorber part of the layer. Consider using inner/outer_nRadiationLengths and inner/outer_nInteractionLengths
double
absorberThickness
;
///Absorber material in front of sensitive element in the layer, units of radiation lengths
double
inner_nRadiationLengths
;
///Absorber material in front of sensitive element in the layer, units of radiation lengths
double
inner_nInteractionLengths
;
///Absorber material in behind of sensitive element in the layer, units of radiation lengths
double
outer_nRadiationLengths
;
///Absorber material in behind of sensitive element in the layer, units of radiation lengths
double
outer_nInteractionLengths
;
///Distance between the innermost face of the layer (closest to IP) and the center of the sensitive element
double
inner_thickness
;
///Distance between the center of the sensitive element and the outermost face of the layer
double
outer_thickness
;
///Thickness of the sensitive element (e.g. scintillator)
double
sensitive_thickness
;
/// cell size along the first axis where first is either along the beam (BarrelLayout) or up (EndcapLayout) or the direction closest to that.
double
cellSize0
;
/// second cell size, perpendicular to the first direction cellSize0 and the depth of the layers.
double
cellSize1
;
}
;
std
::
vector
<
Layer
>
layers
;
}
;
typedef
StructExtension
<
LayeredConicalCalorimeterStruct
>
LayeredConicalCalorimeterData
;
std
::
ostream
&
operator
<<
(
std
::
ostream
&
io
,
const
LayeredConicalCalorimeterData
&
d
)
;
/** Simple data strucuture that holds maps of ids of the nearest neighbour surfaces in the same, next and previous layers
* of a tracking detector. Could be used as extension object for tracking DetectorElements and used in
* pattern recognition. The exact details of the neighbouring criteria depend on the algorithm that is used.
...
...
This diff is collapsed.
Click to expand it.
DDRec/src/DetectorData.cpp
+
49
−
10
View file @
ad4151a4
#include
"DDRec/DetectorData.h"
#include
<boost/io/ios_state.hpp>
namespace
DD4hep
{
namespace
DDRec
{
std
::
ostream
&
operator
<<
(
std
::
ostream
&
io
,
const
FixedPadSizeTPCData
&
d
){
boost
::
io
::
ios_base_all_saver
ifs
(
io
);
io
<<
" --FixedPadSizeTPCData: "
<<
std
::
scientific
<<
std
::
endl
;
io
<<
" zHalf : "
<<
d
.
zHalf
<<
std
::
endl
;
io
<<
" rMin : "
<<
d
.
rMin
<<
std
::
endl
;
...
...
@@ -29,7 +25,6 @@ namespace DD4hep {
std
::
ostream
&
operator
<<
(
std
::
ostream
&
io
,
const
ZPlanarData
&
d
)
{
boost
::
io
::
ios_base_all_saver
ifs
(
io
);
io
<<
" -- ZPlanarData: "
<<
std
::
scientific
<<
std
::
endl
;
io
<<
" zHalfShell : "
<<
d
.
zHalfShell
<<
std
::
endl
;
...
...
@@ -73,7 +68,6 @@ namespace DD4hep {
}
std
::
ostream
&
operator
<<
(
std
::
ostream
&
io
,
const
ZDiskPetalsData
&
d
)
{
boost
::
io
::
ios_base_all_saver
ifs
(
io
);
io
<<
" -- ZDiskPetalsData: "
<<
std
::
scientific
<<
std
::
endl
;
io
<<
" widthStrip : "
<<
d
.
widthStrip
<<
std
::
endl
;
...
...
@@ -122,7 +116,6 @@ namespace DD4hep {
std
::
ostream
&
operator
<<
(
std
::
ostream
&
io
,
const
ConicalSupportData
&
d
)
{
boost
::
io
::
ios_base_all_saver
ifs
(
io
);
io
<<
" -- ConicalSupportData : "
<<
std
::
scientific
<<
std
::
endl
;
io
<<
" isSymmetricInZ : "
<<
d
.
isSymmetricInZ
<<
std
::
endl
;
...
...
@@ -146,7 +139,6 @@ namespace DD4hep {
std
::
ostream
&
operator
<<
(
std
::
ostream
&
io
,
const
LayeredCalorimeterData
&
d
)
{
boost
::
io
::
ios_base_all_saver
ifs
(
io
);
io
<<
" -- LayeredCalorimeterData : "
<<
std
::
scientific
<<
std
::
endl
;
io
<<
" LayoutType : "
<<
(
d
.
layoutType
==
LayeredCalorimeterStruct
::
BarrelLayout
?
...
...
@@ -187,9 +179,56 @@ namespace DD4hep {
std
::
ostream
&
operator
<<
(
std
::
ostream
&
io
,
const
NeighbourSurfacesData
&
d
){
boost
::
io
::
ios_base_all_saver
ifs
(
io
);
std
::
ostream
&
operator
<<
(
std
::
ostream
&
io
,
const
LayeredConicalCalorimeterData
&
d
)
{
io
<<
" -- LayeredConicalCalorimeterData : "
<<
std
::
scientific
<<
std
::
endl
;
io
<<
" LayoutType : "
<<
(
d
.
layoutType
==
LayeredCalorimeterStruct
::
BarrelLayout
?
"BarrelLayout"
:
"EndcapLayout"
)
<<
std
::
endl
;
io
<<
" extent[ RminInn, RmaxInn, RminOut, RmaxOut, zmin, zmax ] : "
<<
d
.
extent
[
0
]
<<
" "
<<
d
.
extent
[
1
]
<<
" "
<<
d
.
extent
[
2
]
<<
" "
<<
d
.
extent
[
3
]
<<
" "
<<
d
.
extent
[
4
]
<<
" "
<<
d
.
extent
[
5
]
<<
std
::
endl
;
io
<<
" outer_symmetry : "
<<
d
.
outer_symmetry
<<
std
::
endl
;
io
<<
" inner_symmetry : "
<<
d
.
inner_symmetry
<<
std
::
endl
;
io
<<
" outer_phi0 : "
<<
d
.
outer_phi0
<<
std
::
endl
;
io
<<
" inner_phi0 : "
<<
d
.
inner_phi0
<<
std
::
endl
;
io
<<
" gap1 : "
<<
d
.
gap1
<<
std
::
endl
;
io
<<
" gap2 : "
<<
d
.
gap2
<<
std
::
endl
;
std
::
vector
<
LayeredConicalCalorimeterData
::
Layer
>
layers
=
d
.
layers
;
io
<<
" Layers : "
<<
std
::
endl
<<
" distance inner_nX0 outer_nX0 inner_nInt outer_nInt inner_thick outer_thick sense_thick"
<<
std
::
endl
;
//"distance inner_nX0 outer_nX0 inner_nLambda outer_nLambda inner_thick outer_thick sensitive_thick" << std::endl ;
for
(
unsigned
i
=
0
,
N
=
layers
.
size
()
;
i
<
N
;
++
i
){
LayeredConicalCalorimeterData
::
Layer
l
=
layers
[
i
]
;
io
<<
" "
<<
l
.
distance
<<
" "
<<
l
.
inner_nRadiationLengths
<<
" "
<<
l
.
outer_nRadiationLengths
<<
" "
<<
l
.
inner_nInteractionLengths
<<
" "
<<
l
.
outer_nInteractionLengths
<<
" "
<<
l
.
inner_thickness
<<
" "
<<
l
.
outer_thickness
<<
" "
<<
l
.
sensitive_thickness
<<
std
::
endl
;
}
return
io
;
}
std
::
ostream
&
operator
<<
(
std
::
ostream
&
io
,
const
NeighbourSurfacesData
&
d
){
io
<<
" --NeighbourSurfacesData: "
<<
std
::
scientific
<<
std
::
endl
;
io
<<
" sameLayer.size() : "
<<
d
.
sameLayer
.
size
()
<<
std
::
endl
;
return
io
;
...
...
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