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
22ca69f6
Commit
22ca69f6
authored
10 years ago
by
Frank Gaede
Browse files
Options
Downloads
Patches
Plain Diff
- added support for gear::ZPlanarParameters
- implemented for the VXD
parent
6ead61fa
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
DDRec/include/DDRec/DetectorData.h
+65
-3
65 additions, 3 deletions
DDRec/include/DDRec/DetectorData.h
DDRec/src/gear/DDGear.cpp
+3
-3
3 additions, 3 deletions
DDRec/src/gear/DDGear.cpp
DDRec/src/gear/createGearForILD.cpp
+35
-14
35 additions, 14 deletions
DDRec/src/gear/createGearForILD.cpp
with
103 additions
and
20 deletions
DDRec/include/DDRec/DetectorData.h
+
65
−
3
View file @
22ca69f6
...
...
@@ -7,7 +7,7 @@ namespace DD4hep {
/** Wrapper class for adding structs or pods as extensions to DetElements.
* Provides default implementations of the c'tors required by the extension mechamism.
* Structs (or classes) can be defined w/o any c'tors relying
i
n the default ones
* Structs (or classes) can be defined w/o any c'tors relying
o
n the default ones
* created by the compiler.
*
* @author F.Gaede, CERN/DESY
...
...
@@ -23,10 +23,10 @@ namespace DD4hep {
StructExtension
(
const
StructExtension
<
T
>&
t
,
const
Geometry
::
DetElement
&
d
)
:
T
(
t
)
{}
};
/** Simple data structure
holding data that is relevant
for
/** Simple data structure
with key parameters
for
* reconstruction of a cylindrical TPC with a pad plane that
* is symmetrically populated with one size pads.
* ( Can be used to instantiate a gear::TPCParmeter object
* ( Can be used to instantiate a gear::TPCPar
a
meter object
* with a FixedPadSizeDiskLayout )
*
* @author F.Gaede, CERN/DESY
...
...
@@ -50,6 +50,68 @@ namespace DD4hep {
typedef
StructExtension
<
FixedPadSizeTPCStruct
>
FixedPadSizeTPCData
;
/** Simple data structure with key parameters for
* reconstruction of a planar silicon tracking detector
* with planes parallel to the z-axis.
* ( Can be used to instantiate a gear::ZPlanarParameters object )
*
* @author F.Gaede, CERN/DESY
* @date Oct, 15 2014
* @version $Id: $
*/
struct
ZPlanarStruct
{
/// The half length (z) of the support shell (w/o gap) - 0. if no shell exists.
double
zHalfShell
;
/// The length of the gap in mm (gap position at z=0).
double
gapShell
;
/// The inner radius of the support shell.
double
rInnerShell
;
/// The outer radius of the support shell.
double
rOuterShell
;
/**Internal helper struct for defining the layer layout. Layers are defined
* with a sensitive part and a support part.
*/
struct
LayerLayout
{
/// The number of ladders in the layer.
int
ladderNumber
;
/// Azimuthal angle of the (outward pointing) normal of the first ladder.
double
phi0
;
/// The distance of the ladder support from the origin (IP).
double
distanceSupport
;
/// The thickness of the ladder support from the origin (IP).
double
thicknessSupport
;
/// The offset of the ladder support, i.e. the shift in the direction of increasing phi, perpendicular to the ladders's normal.
double
offsetSupport
;
///The width of the ladder support.
double
widthSupport
;
///The half length of the ladder support in z.
double
zHalfSupport
;
/// The distance of the ladder sensitive from the origin (IP).
double
distanceSensitive
;
/// The thickness of the ladder sensitive from the origin (IP).
double
thicknessSensitive
;
/// The offset of the ladder sensitive, i.e. the shift in the direction of increasing phi, perpendicular to the ladders's normal.
double
offsetSensitive
;
///The width of the ladder sensitive.
double
widthSensitive
;
///The half length of the ladder sensitive in z.
double
zHalfSensitive
;
}
;
std
::
vector
<
LayerLayout
>
layers
;
}
;
typedef
StructExtension
<
ZPlanarStruct
>
ZPlanarData
;
}
/* namespace DDRec */
}
/* namespace DD4hep */
...
...
This diff is collapsed.
Click to expand it.
DDRec/src/gear/DDGear.cpp
+
3
−
3
View file @
22ca69f6
...
...
@@ -99,10 +99,10 @@ namespace DD4hep{
else
if
(
gearH
->
name
()
==
"LcalParameters"
)
{
gearMgr
->
setLcalParameters
(
dynamic_cast
<
gear
::
CalorimeterParameters
*
>
(
gearH
->
takeGearObject
()
)
)
;
}
else
if
(
gearH
->
name
()
==
"LHcalParameters"
)
{
gearMgr
->
setLHcalParameters
(
dynamic_cast
<
gear
::
CalorimeterParameters
*
>
(
gearH
->
takeGearObject
()
)
)
;
}
else
if
(
gearH
->
name
()
==
"BeamCalParameters"
)
{
gearMgr
->
setBeamCalParameters
(
dynamic_cast
<
gear
::
CalorimeterParameters
*
>
(
gearH
->
takeGearObject
()
)
)
;
}
else
if
(
gearH
->
name
()
==
"
VXD
Parameters"
)
{
gearMgr
->
setVXDParameters
(
dynamic_cast
<
gear
::
ZPlanarParameters
*
>
(
gearH
->
takeGearObject
()
)
)
;
}
else
if
(
gearH
->
name
()
==
"
ZPlanar
Parameters"
)
{
gearMgr
->
setVXDParameters
(
dynamic_cast
<
gear
::
ZPlanarParameters
*
>
(
gearH
->
takeGearObject
()
)
)
;
}
else
if
(
gearH
->
name
()
==
"FTDParameters"
)
{
gearMgr
->
setFTDParameters
(
dynamic_cast
<
gear
::
FTDParameters
*
>
(
gearH
->
takeGearObject
()
)
)
;
}
else
if
(
gearH
->
name
()
==
"
SIT
Parameters"
)
{
gearMgr
->
setSITParameters
(
dynamic_cast
<
gear
::
ZPlanarParameters
*
>
(
gearH
->
takeGearObject
()
)
)
;
}
else
if
(
gearH
->
name
()
==
"
SET
Parameters"
)
{
gearMgr
->
setSETParameters
(
dynamic_cast
<
gear
::
ZPlanarParameters
*
>
(
gearH
->
takeGearObject
()
)
)
;
}
else
if
(
gearH
->
name
()
==
"
ZPlanar
Parameters"
)
{
gearMgr
->
setSITParameters
(
dynamic_cast
<
gear
::
ZPlanarParameters
*
>
(
gearH
->
takeGearObject
()
)
)
;
}
else
if
(
gearH
->
name
()
==
"
ZPlanar
Parameters"
)
{
gearMgr
->
setSETParameters
(
dynamic_cast
<
gear
::
ZPlanarParameters
*
>
(
gearH
->
takeGearObject
()
)
)
;
}
else
if
(
gearH
->
name
()
==
"SiPlanesParameters"
)
{
gearMgr
->
setSiPlanesParameters
(
dynamic_cast
<
gear
::
SiPlanesParameters
*
>
(
gearH
->
takeGearObject
()
)
)
;
}
else
{
...
...
This diff is collapsed.
Click to expand it.
DDRec/src/gear/createGearForILD.cpp
+
35
−
14
View file @
22ca69f6
#include
"DD4hep/LCDD.h"
#include
"DD4hep/Factories.h"
#include
"DD4hep/DD4hepUnits.h"
#include
"DDRec/DetectorData.h"
#include
"DDRec/DDGear.h"
#include
"gearimpl/TPCParametersImpl.h"
#include
"gearimpl/FixedPadSizeDiskLayout.h"
#include
"gearimpl/ZPlanarParametersImpl.h"
#include
<iostream>
...
...
@@ -32,28 +33,48 @@ namespace DD4hep{
std
::
cout
<<
" **** running plugin createGearForILD ! "
<<
std
::
endl
;
//
***** TPC ********
//
========= TPC ==============================================================================
DetElement
tpcDE
=
lcdd
.
detector
(
"TPC"
)
;
FixedPadSizeTPCData
*
tpc
=
tpcDE
.
extension
<
FixedPadSizeTPCData
>
()
;
gear
::
TPCParametersImpl
*
gearTPC
=
new
gear
::
TPCParametersImpl
(
tpc
->
driftLength
,
gear
::
PadRowLayout2D
::
POLAR
)
;
gear
::
TPCParametersImpl
*
gearTPC
=
new
gear
::
TPCParametersImpl
(
tpc
->
driftLength
/
dd4hep
::
mm
,
gear
::
PadRowLayout2D
::
POLAR
)
;
gearTPC
->
setPadLayout
(
new
gear
::
FixedPadSizeDiskLayout
(
tpc
->
rMinReadout
,
tpc
->
rMaxReadout
,
tpc
->
padHeight
,
tpc
->
padWidth
,
tpc
->
maxRow
,
tpc
->
padGap
)
)
;
gearTPC
->
setPadLayout
(
new
gear
::
FixedPadSizeDiskLayout
(
tpc
->
rMinReadout
/
dd4hep
::
mm
,
tpc
->
rMaxReadout
/
dd4hep
::
mm
,
tpc
->
padHeight
/
dd4hep
::
mm
,
tpc
->
padWidth
/
dd4hep
::
mm
,
tpc
->
maxRow
,
tpc
->
padGap
/
dd4hep
::
mm
)
)
;
gearTPC
->
setDoubleVal
(
"tpcInnerRadius"
,
tpc
->
rMin
)
;
// inner r of support tube
gearTPC
->
setDoubleVal
(
"tpcOuterRadius"
,
tpc
->
rMax
)
;
// outer radius of TPC
gearTPC
->
setDoubleVal
(
"tpcInnerWallThickness"
,
tpc
->
innerWallThickness
)
;
// thickness of inner shell
gearTPC
->
setDoubleVal
(
"tpcOuterWallThickness"
,
tpc
->
outerWallThickness
)
;
// thickness of outer shell
gearTPC
->
setDoubleVal
(
"tpcInnerRadius"
,
tpc
->
rMin
/
dd4hep
::
mm
)
;
// inner r of support tube
gearTPC
->
setDoubleVal
(
"tpcOuterRadius"
,
tpc
->
rMax
/
dd4hep
::
mm
)
;
// outer radius of TPC
gearTPC
->
setDoubleVal
(
"tpcInnerWallThickness"
,
tpc
->
innerWallThickness
/
dd4hep
::
mm
)
;
// thickness of inner shell
gearTPC
->
setDoubleVal
(
"tpcOuterWallThickness"
,
tpc
->
outerWallThickness
/
dd4hep
::
mm
)
;
// thickness of outer shell
tpcDE
.
addExtension
<
GearHandle
>
(
new
GearHandle
(
gearTPC
,
"TPCParameters"
)
)
;
//********************
//========= VXD ==============================================================================
DetElement
vxdDE
=
lcdd
.
detector
(
"VTX"
)
;
ZPlanarData
*
vxd
=
vxdDE
.
extension
<
ZPlanarData
>
()
;
// ZPlanarParametersImpl (int type, double shellInnerRadius, double shellOuterRadius, double shellHalfLength, double shellGap, double shellRadLength)
int
type
=
gear
::
ZPlanarParameters
::
CMOS
;
gear
::
ZPlanarParametersImpl
*
gearVXD
=
new
gear
::
ZPlanarParametersImpl
(
type
,
vxd
->
rInnerShell
/
dd4hep
::
mm
,
vxd
->
rOuterShell
/
dd4hep
::
mm
,
vxd
->
zHalfShell
/
dd4hep
::
mm
,
vxd
->
gapShell
/
dd4hep
::
mm
,
0.
)
;
for
(
unsigned
i
=
0
,
n
=
vxd
->
layers
.
size
()
;
i
<
n
;
++
i
){
const
DDRec
::
ZPlanarData
::
LayerLayout
&
l
=
vxd
->
layers
[
i
]
;
// FIXME set rad lengths to 0 -> need to get from DD4hep ....
gearVXD
->
addLayer
(
l
.
ladderNumber
,
l
.
phi0
,
l
.
distanceSupport
/
dd4hep
::
mm
,
l
.
offsetSupport
/
dd4hep
::
mm
,
l
.
thicknessSupport
/
dd4hep
::
mm
,
l
.
zHalfSupport
/
dd4hep
::
mm
,
l
.
widthSupport
/
dd4hep
::
mm
,
0.
,
l
.
distanceSensitive
/
dd4hep
::
mm
,
l
.
offsetSensitive
/
dd4hep
::
mm
,
l
.
thicknessSensitive
/
dd4hep
::
mm
,
l
.
zHalfSensitive
/
dd4hep
::
mm
,
l
.
widthSensitive
/
dd4hep
::
mm
,
0.
)
;
}
vxdDE
.
addExtension
<
GearHandle
>
(
new
GearHandle
(
gearVXD
,
"ZPlanarParameters"
)
)
;
//============================================================================================
// --- 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