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
12b59d70
Commit
12b59d70
authored
4 years ago
by
Frank Gaede
Committed by
Frank Gaede
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix units in LCIO conversions
- prepend namespace CLHEP where missing
parent
55be9b25
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
DDG4/lcio/LCIOConversions.cpp
+5
-5
5 additions, 5 deletions
DDG4/lcio/LCIOConversions.cpp
with
5 additions
and
5 deletions
DDG4/lcio/LCIOConversions.cpp
+
5
−
5
View file @
12b59d70
...
@@ -189,7 +189,7 @@ namespace dd4hep {
...
@@ -189,7 +189,7 @@ namespace dd4hep {
}
}
for
(
size_t
i
=
0
;
i
<
nhits
;
++
i
)
{
for
(
size_t
i
=
0
;
i
<
nhits
;
++
i
)
{
const
Geant4Calorimeter
::
Hit
*
hit
=
coll
->
hit
(
i
);
const
Geant4Calorimeter
::
Hit
*
hit
=
coll
->
hit
(
i
);
float
pos
[
3
]
=
{
float
(
hit
->
position
.
x
()
/
mm
),
float
(
hit
->
position
.
y
()
/
mm
),
float
(
hit
->
position
.
z
()
/
mm
)};
float
pos
[
3
]
=
{
float
(
hit
->
position
.
x
()
/
CLHEP
::
mm
),
float
(
hit
->
position
.
y
()
/
CLHEP
::
mm
),
float
(
hit
->
position
.
z
()
/
CLHEP
::
mm
)};
lcio
::
SimCalorimeterHitImpl
*
lc_hit
=
new
lcio
::
SimCalorimeterHitImpl
;
lcio
::
SimCalorimeterHitImpl
*
lc_hit
=
new
lcio
::
SimCalorimeterHitImpl
;
lc_hit
->
setCellID0
((
hit
->
cellID
>>
0
)
&
0xFFFFFFFF
);
lc_hit
->
setCellID0
((
hit
->
cellID
>>
0
)
&
0xFFFFFFFF
);
lc_hit
->
setCellID1
((
hit
->
cellID
>>
sizeof
(
int
)
*
8
)
&
0xFFFFFFFF
);
// ????
lc_hit
->
setCellID1
((
hit
->
cellID
>>
sizeof
(
int
)
*
8
)
&
0xFFFFFFFF
);
// ????
...
@@ -202,15 +202,15 @@ namespace dd4hep {
...
@@ -202,15 +202,15 @@ namespace dd4hep {
int
trackID
=
pm
->
particleID
(
c
.
trackID
);
int
trackID
=
pm
->
particleID
(
c
.
trackID
);
EVENT
::
MCParticle
*
lc_mcp
=
(
EVENT
::
MCParticle
*
)
lc_parts
->
getElementAt
(
trackID
);
EVENT
::
MCParticle
*
lc_mcp
=
(
EVENT
::
MCParticle
*
)
lc_parts
->
getElementAt
(
trackID
);
if
(
hit_creation_mode
==
Geant4Sensitive
::
DETAILED_MODE
)
{
if
(
hit_creation_mode
==
Geant4Sensitive
::
DETAILED_MODE
)
{
float
contrib_pos
[]
=
{
float
(
c
.
x
/
mm
),
float
(
c
.
y
/
mm
),
float
(
c
.
z
/
mm
)};
float
contrib_pos
[]
=
{
float
(
c
.
x
/
CLHEP
::
mm
),
float
(
c
.
y
/
CLHEP
::
mm
),
float
(
c
.
z
/
CLHEP
::
mm
)};
#if LCIO_VERSION_GE( 2, 11 )
#if LCIO_VERSION_GE( 2, 11 )
lc_hit
->
addMCParticleContribution
(
lc_mcp
,
c
.
deposit
/
GeV
,
c
.
time
/
ns
,
c
.
length
/
mm
,
c
.
pdgID
,
contrib_pos
);
lc_hit
->
addMCParticleContribution
(
lc_mcp
,
c
.
deposit
/
CLHEP
::
GeV
,
c
.
time
/
CLHEP
::
ns
,
c
.
length
/
CLHEP
::
mm
,
c
.
pdgID
,
contrib_pos
);
#else
#else
lc_hit
->
addMCParticleContribution
(
lc_mcp
,
c
.
deposit
/
GeV
,
c
.
time
/
ns
,
c
.
pdgID
,
contrib_pos
);
lc_hit
->
addMCParticleContribution
(
lc_mcp
,
c
.
deposit
/
CLHEP
::
GeV
,
c
.
time
/
CLHEP
::
ns
,
c
.
pdgID
,
contrib_pos
);
#endif
#endif
}
}
else
{
else
{
lc_hit
->
addMCParticleContribution
(
lc_mcp
,
c
.
deposit
/
GeV
,
c
.
time
/
ns
);
lc_hit
->
addMCParticleContribution
(
lc_mcp
,
c
.
deposit
/
CLHEP
::
GeV
,
c
.
time
/
CLHEP
::
ns
);
}
}
}
}
}
}
...
...
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