#include <G4TrackToParticleID.h>
Public Member Functions | |
G4TrackToParticleID () | |
int | particleID (const G4Track *) |
~G4TrackToParticleID () |
Converts G4Track to particle ID. For PDG Particles it is the obvious number; for alpha, triton and deuteron the CMS convention is used
Definition at line 11 of file G4TrackToParticleID.h.
G4TrackToParticleID::G4TrackToParticleID | ( | ) |
Definition at line 9 of file G4TrackToParticleID.cc.
{}
G4TrackToParticleID::~G4TrackToParticleID | ( | ) |
Definition at line 24 of file G4TrackToParticleID.cc.
{}
int G4TrackToParticleID::particleID | ( | const G4Track * | g4trk | ) |
Definition at line 11 of file G4TrackToParticleID.cc.
References LogDebug.
Referenced by MuonSensitiveDetector::createHit(), PLTSensitiveDetector::createHit(), TkAccumulatingSensitiveDetector::createHit(), and TrackWithHistory::TrackWithHistory().
{ int particleID_ = g4trk->GetDefinition()->GetPDGEncoding(); #ifdef DebugLog if ( particleID_ > 1000000000 ) { LogDebug("SimG4CoreNotification") << "G4TrackToParticleID ion code = " << particleID_ ; } #endif if (particleID_ != 0) return particleID_; edm::LogWarning("SimG4CoreNotification") << "G4TrackToParticleID: unknown code for track Id = " << g4trk->GetTrackID(); return -99; }