Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NPDet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIC
NPDet
Merge requests
!142
Calorimeter Truth partial fix
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Calorimeter Truth partial fix
dd4pod_fix
into
master
Overview
1
Commits
2
Pipelines
0
Changes
1
Merged
Whitney Armstrong
requested to merge
dd4pod_fix
into
master
4 years ago
Overview
1
Commits
2
Pipelines
0
Changes
1
Expand
Currently uses the first hit as the truth. This should be fixed in the future.
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
d7c4161d
2 commits,
4 years ago
1 file
+
11
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
src/dd4pod/plugins/Geant4Output2Podio.cxx
+
11
−
3
Options
@@ -200,10 +200,8 @@ namespace dd4hep::sim {
auto
cal_hit
=
dynamic_cast
<
dd4hep
::
sim
::
Geant4Calorimeter
::
Hit
*>
(
h
);
//Geant4HitData::Contributions& c = cal_hit->truth;
//for (Geant4HitData::Contributions::iterator j = c.begin();
// j != c.end(); ++j) {
//for (Geant4HitData::Contributions::iterator j = c.begin(); j != c.end(); ++j) {
// Geant4HitData::Contribution& t = *j;
// int trackID = t.trackID;
// t.trackID = m_truth->particleID(trackID);
@@ -215,6 +213,16 @@ namespace dd4hep::sim {
phit
.
g4ID
(
cal_hit
->
g4ID
);
phit
.
position
({
cal_hit
->
position
.
x
(),
cal_hit
->
position
.
y
(),
cal_hit
->
position
.
z
(),
0.0
});
const
auto
&
first_truth
=
cal_hit
->
truth
[
0
];
phit
.
truth
(
dd4pod
::
MonteCarloContrib
({
(
int
)
first_truth
.
trackID
,
(
int
)
first_truth
.
pdgID
,
(
double
)
first_truth
.
deposit
,
(
double
)
first_truth
.
time
,
(
double
)
first_truth
.
length
,
(
double
)
first_truth
.
x
,
(
double
)
first_truth
.
y
,
(
double
)
first_truth
.
z
}));
//phit.truth({cal_hit->truth.trackID, cal_hit->truth.pdgID, cal_hit->truth.deposit, cal_hit->truth.time,
// cal_hit->truth.length, cal_hit->truth.x, cal_hit->truth.y, cal_hit->truth.z});
phit
.
energyDeposit
(
cal_hit
->
energyDeposit
);
Loading