Commit d404180c authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

Change pmthit.energy into pmthit.energyDeposit, identical to trackerhit

parent fcadd552
Pipeline #27860 failed with stages
in 1 minute and 13 seconds
......@@ -107,7 +107,7 @@ datatypes:
- dd4pod::VectorXYZ momentum // 3-momentum [GeV]
- double length // length [mm]
- dd4pod::MonteCarloContrib truth // truth info
- double energy // photon energy [GeV]
- double energyDeposit // photon energy [GeV]
dd4pod::TrackerHit:
Description: "Podio implementation of dd4hep's dd4hep::sim::Geant4Tracker::Hit class"
......
......@@ -360,7 +360,7 @@ namespace dd4hep::sim {
const int trackID = parts->particleID(truth.trackID);
ohit.truth({trackID, truth.pdgID, truth.deposit / 1000.0, truth.time,
truth.length, truth.x, truth.y, truth.z});
ohit.energy(hit->energy / 1000.0);
ohit.energyDeposit(hit->energyDeposit / 1000.0);
}
} else {
printout(WARNING, "Geant4Output2Podio",
......
......@@ -55,7 +55,7 @@ namespace npdet {
/// Monte Carlo / Geant4 information
dd4hep::sim::Geant4HitData::MonteCarloContrib truth;
/// Energy of photon
double energy = 0;
double energyDeposit = 0;
public:
/// Default constructor
......
......@@ -66,7 +66,7 @@ namespace dd4hep {
PhotoMultiplierSD::Hit* hit = new PhotoMultiplierSD::Hit(h.trkID(), h.trkPdgID(), h.deposit(), h.track->GetGlobalTime());
Geant4HitData::MonteCarloContrib contrib = Geant4HitData::extractContribution(step);
hit->cellID = cellID(step);
hit->energy = contrib.deposit;
hit->energyDeposit = contrib.deposit;
hit->position = position;
hit->momentum = 0.5*(h. preMom() + h.postMom());
hit->length = hit_len;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment