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
706e44ee
Commit
706e44ee
authored
9 years ago
by
Nikiforos Nikiforou
Browse files
Options
Downloads
Patches
Plain Diff
Added proper secondary PDGid storing for particle contributions in SimCalorimeterHits
parent
84b70c64
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
DDG4/lcio/LCIOConversions.cpp
+1
-1
1 addition, 1 deletion
DDG4/lcio/LCIOConversions.cpp
DDRec/src/gear/createGearForCLIC.cpp
+27
-45
27 additions, 45 deletions
DDRec/src/gear/createGearForCLIC.cpp
doc/release.notes
+5
-0
5 additions, 0 deletions
doc/release.notes
with
33 additions
and
46 deletions
DDG4/lcio/LCIOConversions.cpp
+
1
−
1
View file @
706e44ee
...
...
@@ -187,7 +187,7 @@ namespace DD4hep {
float
contrib_pos
[]
=
{
float
(
c
.
x
/
mm
),
float
(
c
.
y
/
mm
),
float
(
c
.
z
/
mm
)};
EVENT
::
MCParticle
*
lc_mcp
=
(
EVENT
::
MCParticle
*
)
lc_parts
->
getElementAt
(
trackID
);
if
(
hit_creation_mode
==
Geant4Sensitive
::
DETAILED_MODE
)
lc_hit
->
addMCParticleContribution
(
lc_mcp
,
c
.
deposit
/
GeV
,
c
.
time
/
ns
,
lc_mcp
->
getPDG
()
,
contrib_pos
);
lc_hit
->
addMCParticleContribution
(
lc_mcp
,
c
.
deposit
/
GeV
,
c
.
time
/
ns
,
c
.
pdgID
,
contrib_pos
);
else
lc_hit
->
addMCParticleContribution
(
lc_mcp
,
c
.
deposit
/
GeV
,
c
.
time
/
ns
);
}
...
...
This diff is collapsed.
Click to expand it.
DDRec/src/gear/createGearForCLIC.cpp
+
27
−
45
View file @
706e44ee
...
...
@@ -39,34 +39,11 @@ namespace DD4hep{
std
::
cout
<<
" **** running plugin createGearForCLIC ! "
<<
std
::
endl
;
//========= TPC ==============================================================================
try
{
DetElement
tpcDE
=
lcdd
.
detector
(
"TPC"
)
;
FixedPadSizeTPCData
*
tpc
=
tpcDE
.
extension
<
FixedPadSizeTPCData
>
()
;
gear
::
TPCParametersImpl
*
gearTPC
=
new
gear
::
TPCParametersImpl
(
tpc
->
driftLength
/
dd4hep
::
mm
,
gear
::
PadRowLayout2D
::
POLAR
)
;
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
/
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"
)
)
;
}
catch
(
std
::
runtime_error
&
e
){
std
::
cerr
<<
" >>>> "
<<
e
.
what
()
<<
std
::
endl
;
}
//========= VXD ==============================================================================
try
{
DetElement
vxdDE
=
lcdd
.
detector
(
"Vertex"
)
;
DetElement
vxdDE
=
lcdd
.
detector
(
"Vertex
Barrel
"
)
;
ZPlanarData
*
vxd
=
vxdDE
.
extension
<
ZPlanarData
>
()
;
...
...
@@ -75,8 +52,10 @@ namespace DD4hep{
gear
::
ZPlanarParametersImpl
*
gearVXD
=
new
gear
::
ZPlanarParametersImpl
(
vxdType
,
vxd
->
rInnerShell
/
dd4hep
::
mm
,
vxd
->
rOuterShell
/
dd4hep
::
mm
,
vxd
->
zHalfShell
/
dd4hep
::
mm
,
vxd
->
gapShell
/
dd4hep
::
mm
,
0.
)
;
// std::cout<<"Got "<<vxd->layers.size()<<" layers."<<std::endl;
for
(
unsigned
i
=
0
,
n
=
vxd
->
layers
.
size
()
;
i
<
n
;
++
i
){
// std::cout<<"Working on layer "<<i<<" for a total of "<<n<<" layers."<<std::endl;
const
DDRec
::
ZPlanarData
::
LayerLayout
&
l
=
vxd
->
layers
[
i
]
;
// FIXME set rad lengths to 0 -> need to get from DD4hep ....
...
...
@@ -86,6 +65,8 @@ namespace DD4hep{
}
std
::
cout
<<
"Added layers"
<<
std
::
endl
;
GearHandle
*
handle
=
new
GearHandle
(
gearVXD
,
"VXDParameters"
)
;
// quick hack for now: add the one material that is needed by KalDet :
...
...
@@ -101,14 +82,15 @@ namespace DD4hep{
const
MaterialVec
&
materials
=
matMgr
.
materialsBetween
(
a
,
b
)
;
std
::
cout
<<
"Calculating material average."
<<
std
::
endl
;
MaterialData
mat
=
(
materials
.
size
()
>
1
?
matMgr
.
createAveragedMaterial
(
materials
)
:
materials
[
0
].
first
)
;
//
std::cout << " ####### found materials between points : " << a << " and " << b << " : " ;
//
for( unsigned i=0,n=materials.size();i<n;++i){
//
std::cout << materials[i].first.name() << "[" << materials[i].second << "], " ;
//
}
//
std::cout << std::endl ;
//
std::cout << " averaged material : " << mat << std::endl ;
std
::
cout
<<
" ####### found materials between points : "
<<
a
<<
" and "
<<
b
<<
" : "
;
for
(
unsigned
i
=
0
,
n
=
materials
.
size
();
i
<
n
;
++
i
){
std
::
cout
<<
materials
[
i
].
first
.
name
()
<<
"["
<<
materials
[
i
].
second
<<
"], "
;
}
std
::
cout
<<
std
::
endl
;
std
::
cout
<<
" averaged material : "
<<
mat
<<
std
::
endl
;
handle
->
addMaterial
(
"VXDSupportMaterial"
,
mat
.
A
(),
mat
.
Z
()
,
mat
.
density
()
/
(
dd4hep
::
kg
/
(
dd4hep
::
g
*
dd4hep
::
m3
))
,
mat
.
radiationLength
()
/
dd4hep
::
mm
,
mat
.
interactionLength
()
/
dd4hep
::
mm
)
;
...
...
@@ -120,7 +102,7 @@ namespace DD4hep{
}
//========= SIT ==============================================================================
/*
try{
DetElement sitDE = lcdd.detector("SIT") ;
...
...
@@ -295,7 +277,7 @@ namespace DD4hep{
} catch( std::runtime_error& e ){
std::cerr << " >>>> " << e.what() << std::endl ;
}
}
*/
//========= CALO ==============================================================================
...
...
@@ -305,18 +287,18 @@ namespace DD4hep{
std
::
map
<
std
::
string
,
std
::
string
>
caloMap
;
caloMap
[
"HCalBarrel"
]
=
"HcalBarrelParameters"
;
caloMap
[
"ECalBarrel"
]
=
"EcalBarrelParameters"
;
caloMap
[
"ECalEndcap"
]
=
"EcalEndcapParameters"
;
caloMap
[
"ECalPlug"
]
=
"EcalPlugParameters"
;
caloMap
[
"YokeBarrel"
]
=
"YokeBarrelParameters"
;
caloMap
[
"YokeEndcap"
]
=
"YokeEndcapParameters"
;
caloMap
[
"YokePlug"
]
=
"YokePlugParameters"
;
caloMap
[
"HCalBarrel"
]
=
"HcalBarrelParameters"
;
//
caloMap["ECalBarrel"] = "EcalBarrelParameters" ;
//
caloMap["ECalEndcap"] = "EcalEndcapParameters" ;
//
caloMap["ECalPlug"] = "EcalPlugParameters" ;
//
caloMap["YokeBarrel"] = "YokeBarrelParameters" ;
//
caloMap["YokeEndcap"] = "YokeEndcapParameters" ;
//
caloMap["YokePlug"] = "YokePlugParameters" ;
//
caloMap["HCalBarrel"] = "HcalBarrelParameters" ;
caloMap
[
"HCalEndcap"
]
=
"HcalEndcapParameters"
;
caloMap
[
"HCalRing"
]
=
"HcalRingParameters"
;
caloMap
[
"LCal"
]
=
"LcalParameters"
;
caloMap
[
"LHCal"
]
=
"LHcalParameters"
;
caloMap
[
"BeamCal"
]
=
"BeamCalParameters"
;
//
caloMap["HCalRing"] = "HcalRingParameters" ;
//
caloMap["LCal"] = "LcalParameters" ;
//
caloMap["LHCal"] = "LHcalParameters" ;
//
caloMap["BeamCal"] = "BeamCalParameters" ;
for
(
std
::
map
<
std
::
string
,
std
::
string
>::
const_iterator
it
=
caloMap
.
begin
()
;
it
!=
caloMap
.
end
()
;
++
it
){
...
...
This diff is collapsed.
Click to expand it.
doc/release.notes
+
5
−
0
View file @
706e44ee
...
...
@@ -3,6 +3,11 @@
DD4hep ---- Release Notes
=================================
2015/05/22 Nikiforos Nikiforou
-----------------------
- Fixed bug in DDG4/lcio/LCIOConversions.cpp, which stored only the PDG of the primary particle
in multiple particle contributions in SimCalorimeterHits instead of both the primary and secondary PDGs.
2015/05/13 Markus Frank
-----------------------
...
...
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