Skip to content

Commit 2dce981

Browse files
committed
rename method
1 parent a593c94 commit 2dce981

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

SimDataFormats/Track/interface/SimTrack.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class SimTrack : public CoreSimTrack {
6868

6969
void setIsPrimary() { trackInfo_ |= (1 << 1); }
7070
void setGenParticleID(const int idx) { igenpart = idx; }
71-
int getPrimaryID() const { return igenpart; }
71+
int getPrimaryOrLastStoredID() const { return igenpart; }
7272
uint8_t getTrackInfo() const { return trackInfo_; }
7373

7474
private:

SimG4Core/Application/plugins/OscarMTProducer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ void OscarMTProducer::produce(edm::Event& e, const edm::EventSetup& es) {
268268
edm::LogVerbatim("Track") << " " << i << ". " << (*p1)[i].trackId() << ", " << (*p1)[i] << ", "
269269
<< (*p1)[i].crossedBoundary() << "-> " << (*p1)[i].getIDAtBoundary() << ", "
270270
<< (*p1)[i].isFromBackScattering() << ", " << (*p1)[i].isPrimary() << "-> "
271-
<< (*p1)[i].getPrimaryID();
271+
<< (*p1)[i].getPrimaryOrLastStoredID();
272272
}
273273
}
274274
}

SimGeneral/Debugging/plugins/CaloParticleDebugger.cc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ void CaloParticleDebugger::analyze(const edm::Event& iEvent, const edm::EventSet
164164
LogVerbatim("CaloParticleDebuggerSimTracks")
165165
<< i << "\t" << t.trackId() << "\t" << t << " Crossed Boundary: " << t.crossedBoundary()
166166
<< " Vtx: " << t.vertIndex() << " isFromBackScattering: " << t.isFromBackScattering()
167-
<< " isPrimary: " << t.isPrimary() << " ParentID: " << t.getPrimaryID()
167+
<< " isPrimary: " << t.isPrimary() << " ParentID: " << t.getPrimaryOrLastStoredID()
168168
<< " Position Boundary: " << t.getPositionAtBoundary() << " Momentum Boundary: " << t.getMomentumAtBoundary()
169169
<< " Momemtum Origin: " << t.momentum();
170170
trackid_to_track_index[t.trackId()] = i;
@@ -232,10 +232,11 @@ void CaloParticleDebugger::analyze(const edm::Event& iEvent, const edm::EventSet
232232
<< "\n\n"
233233
<< i << "\tType: " << simcl.pdgId() << "\tEnergy: " << simcl.energy() << "\tKey: " << i; // << simcl ;
234234
auto const& simtrack = simcl.g4Tracks()[0];
235-
LogVerbatim("CaloParticleDebuggerSimClusters") << "\n Primary GenParticleID: " << simtrack.getPrimaryID()
236-
<< "\n Crossed Boundary: " << simtrack.crossedBoundary()
237-
<< "\n Position Boundary: " << simtrack.getPositionAtBoundary()
238-
<< "\n Momentum Boundary: " << simtrack.getMomentumAtBoundary();
235+
LogVerbatim("CaloParticleDebuggerSimClusters")
236+
<< "\n GenParticleID/ancestor: " << simtrack.getPrimaryOrLastStoredID()
237+
<< "\n Crossed Boundary: " << simtrack.crossedBoundary()
238+
<< "\n Position Boundary: " << simtrack.getPositionAtBoundary()
239+
<< "\n Momentum Boundary: " << simtrack.getMomentumAtBoundary();
239240
if (simClusters_in_CaloParticles.find(simcl.g4Tracks()[0].trackId()) == simClusters_in_CaloParticles.end()) {
240241
LogVerbatim("CaloParticleDebuggerSimClusters") << " Orphan SimCluster: " << simtrack.trackId();
241242
}

0 commit comments

Comments
 (0)