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
da17b70f
Commit
da17b70f
authored
10 years ago
by
Frank Gaede
Browse files
Options
Downloads
Patches
Plain Diff
- added new class ZDiskPetalsStruct/ZDiskPetalsData
- added treatment of gear::FTDParameters (for ILD )
parent
e7fae085
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
DDRec/include/DDRec/DetectorData.h
+96
-0
96 additions, 0 deletions
DDRec/include/DDRec/DetectorData.h
DDRec/src/gear/createGearForILD.cpp
+47
-0
47 additions, 0 deletions
DDRec/src/gear/createGearForILD.cpp
with
143 additions
and
0 deletions
DDRec/include/DDRec/DetectorData.h
+
96
−
0
View file @
da17b70f
#ifndef DDRec_DetectorData_H_
#define DDRec_DetectorData_H_
#include
<bitset>
namespace
DD4hep
{
namespace
DDRec
{
...
...
@@ -145,6 +146,101 @@ namespace DD4hep {
/** Simple data structure with key parameters for
* reconstruction of a silicon tracking detector
* with disks (roughly orthogonal to the z-axis) built from petals.
* ( Can be used to instantiate a gear::FTDParameters object )
*
* @author F.Gaede, CERN/DESY
* @date Oct, 20 2014
* @version $Id: $
*/
struct
ZDiskPetalsStruct
{
/// width of the strips (if applicable )
double
widthStrip
;
/// length of the strips (if applicable )
double
lengthStrip
;
/// strip pitch (if applicable )
double
pitchStrip
;
/// strip stereo angle (if applicable )
double
angleStrip
;
/// enum for encoding the sensor type in typeFlags
struct
SensorType
{
enum
{
DoubleSided
=
0
,
Pixel
};
}
;
/** Internal helper struct for defining the layer layout. Layers are defined
* with a sensitive part and a support part.
*/
struct
LayerLayout
{
/// half angle covered by petal
double
petalHalfAngle
;
/** angle alpha by which the petal is rotated away from the plane
* that is orthogonal to the z-axis
*/
double
alphaPetal
;
/// z-position of layer ( z-position of middle axis )
double
zPosition
;
/// The number of petals in the layer.
int
petalNumber
;
/// number of sensor per petal
int
sensorsPerPetal
;
/// Bit flag describing sensor type - use enum SensorType to access the bits.
std
::
bitset
<
32
>
typeFlags
;
/// azimuthal angle of vector defined by the Z-axis to first petal x-positive, y-positive edge
double
phi0
;
/** z-offset of support petals from layer z-position - signed for first
* petal, following petals have alternating sign
*/
double
zOffsetSupport
;
/// The distance of the petal support from the z-axis.
double
distanceSupport
;
/// The thickness of the petal support.
double
thicknessSupport
;
/// The inner width of the petal support.
double
widthInnerSupport
;
/// The outer width of the petal support.
double
widthOuterSupport
;
/// The radial length of the petal support.
double
lengthSupport
;
/** z-offset of sensitive petals from layer z-position - signed for first
* petal, following petals have alternating sign
*/
double
zOffsetSensitive
;
/// The distance of the petal sensitive from the z-axis.
double
distanceSensitive
;
/// The thickness of the petal sensitive.
double
thicknessSensitive
;
/// The inner width of the petal sensitive.
double
widthInnerSensitive
;
/// The outer width of the petal sensitive.
double
widthOuterSensitive
;
/// The radial length of the petal sensitive.
double
lengthSensitive
;
}
;
std
::
vector
<
LayerLayout
>
layers
;
}
;
typedef
StructExtension
<
ZDiskPetalsStruct
>
ZDiskPetalsData
;
}
/* namespace DDRec */
}
/* namespace DD4hep */
...
...
This diff is collapsed.
Click to expand it.
DDRec/src/gear/createGearForILD.cpp
+
47
−
0
View file @
da17b70f
...
...
@@ -8,6 +8,7 @@
#include
"gearimpl/TPCParametersImpl.h"
#include
"gearimpl/FixedPadSizeDiskLayout.h"
#include
"gearimpl/ZPlanarParametersImpl.h"
#include
"gearimpl/FTDParametersImpl.h"
#include
<iostream>
...
...
@@ -145,6 +146,52 @@ namespace DD4hep{
setDE
.
addExtension
<
GearHandle
>
(
new
GearHandle
(
gearSET
,
"SETParameters"
)
)
;
//============================================================================================
DetElement
ftdDE
=
lcdd
.
detector
(
"FTD"
)
;
ZDiskPetalsData
*
ftd
=
ftdDE
.
extension
<
ZDiskPetalsData
>
()
;
gear
::
FTDParametersImpl
*
gearFTD
=
new
gear
::
FTDParametersImpl
();
for
(
unsigned
i
=
0
,
n
=
ftd
->
layers
.
size
()
;
i
<
n
;
++
i
){
const
DDRec
::
ZDiskPetalsData
::
LayerLayout
&
l
=
ftd
->
layers
[
i
]
;
bool
isDoubleSided
=
l
.
typeFlags
[
DDRec
::
ZDiskPetalsStruct
::
SensorType
::
DoubleSided
]
;
int
sensorType
=
(
l
.
typeFlags
[
DDRec
::
ZDiskPetalsStruct
::
SensorType
::
Pixel
]
?
gear
::
FTDParameters
::
PIXEL
:
gear
::
FTDParameters
::
STRIP
)
;
double
zoffset
=
fabs
(
l
.
zOffsetSupport
)
;
double
signoffset
=
l
.
zOffsetSupport
>
0
?
1.
:
-
1
;
gearFTD
->
addLayer
(
l
.
petalNumber
,
l
.
sensorsPerPetal
,
isDoubleSided
,
sensorType
,
l
.
petalHalfAngle
,
l
.
phi0
,
l
.
alphaPetal
,
l
.
zPosition
/
dd4hep
::
mm
,
zoffset
/
dd4hep
::
mm
,
signoffset
,
l
.
distanceSupport
/
dd4hep
::
mm
,
l
.
thicknessSupport
/
dd4hep
::
mm
,
l
.
widthInnerSupport
/
dd4hep
::
mm
,
l
.
widthOuterSupport
/
dd4hep
::
mm
,
l
.
lengthSupport
/
dd4hep
::
mm
,
0.
,
l
.
distanceSensitive
/
dd4hep
::
mm
,
l
.
thicknessSensitive
/
dd4hep
::
mm
,
l
.
widthInnerSensitive
/
dd4hep
::
mm
,
l
.
widthOuterSensitive
/
dd4hep
::
mm
,
l
.
lengthSensitive
/
dd4hep
::
mm
,
0.
)
;
// FIXME set rad lengths to 0 -> need to get from DD4hep ....
}
gearFTD
->
setDoubleVal
(
"strip_width_mm"
,
ftd
->
widthStrip
/
dd4hep
::
mm
)
;
gearFTD
->
setDoubleVal
(
"strip_length_mm"
,
ftd
->
lengthStrip
/
dd4hep
::
mm
)
;
gearFTD
->
setDoubleVal
(
"strip_pitch_mm"
,
ftd
->
pitchStrip
/
dd4hep
::
mm
)
;
gearFTD
->
setDoubleVal
(
"strip_angle_deg"
,
ftd
->
angleStrip
/
dd4hep
::
deg
)
;
ftdDE
.
addExtension
<
GearHandle
>
(
new
GearHandle
(
gearFTD
,
"FTDParameters"
)
)
;
//============================================================================================
// --- LCDD::apply() expects return code 1 if all went well ! ----
return
1
;
}
...
...
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