Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
SimG4Core
Notification
src
G4TrackToParticleID.cc
Go to the documentation of this file.
1
#include "
SimG4Core/Notification/interface/G4TrackToParticleID.h
"
2
3
#include "G4Track.hh"
4
5
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
6
7
//#define DebugLog
8
9
G4TrackToParticleID::G4TrackToParticleID
() {}
10
11
int
G4TrackToParticleID::particleID
(
const
G4Track * g4trk)
12
{
13
int
particleID_ = g4trk->GetDefinition()->GetPDGEncoding();
14
#ifdef DebugLog
15
if
( particleID_ > 1000000000 ) {
16
LogDebug
(
"SimG4CoreNotification"
) <<
"G4TrackToParticleID ion code = "
<< particleID_ ;
17
}
18
#endif
19
if
(particleID_ != 0)
return
particleID_;
20
edm::LogWarning
(
"SimG4CoreNotification"
) <<
"G4TrackToParticleID: unknown code for track Id = "
<< g4trk->GetTrackID();
21
return
-99;
22
}
23
24
G4TrackToParticleID::~G4TrackToParticleID
() {}
LogDebug
#define LogDebug(id)
Definition:
MessageLogger.h:501
MessageLogger.h
edm::LogWarning
Definition:
MessageLogger.h:140
G4TrackToParticleID.h
G4TrackToParticleID::G4TrackToParticleID
G4TrackToParticleID()
Definition:
G4TrackToParticleID.cc:9
G4TrackToParticleID::particleID
int particleID(const G4Track *)
Definition:
G4TrackToParticleID.cc:11
G4TrackToParticleID::~G4TrackToParticleID
~G4TrackToParticleID()
Definition:
G4TrackToParticleID.cc:24
Generated for CMSSW Reference Manual by
1.8.5