#include "AliGlobals.h"
#include "TG4StepManager.h"
#include "TG4PhysicsManager.h"
+#include "TG4ParticlesManager.h"
#include <G4Track.hh>
#include <G4TrackVector.hh>
//_____________________________________________________________________________
AliTrackingAction::AliTrackingAction()
- : fPrimaryTrackID(0),
- fVerboseLevel(2),
+ : AliVerbose("trackingAction",2),
+ fPrimaryTrackID(0),
fNewVerboseLevel(0),
fNewVerboseTrackID(-1),
fSavePrimaries(true),
//_____________________________________________________________________________
AliTrackingAction::AliTrackingAction(const AliTrackingAction& right)
- : fMessenger(this) {
+ : AliVerbose("trackingAction"),
+ fMessenger(this) {
//
AliGlobals::Exception("AliTrackingAction is protected from copying.");
}
if (fPrimaryTrackID>0) {
// verbose
- if (fVerboseLevel == 3) {
+ if (VerboseLevel() == 3) {
G4cout << "$$$ Primary track " << fPrimaryTrackID << G4endl;
}
- else if ( fVerboseLevel == 2 && fPrimaryTrackID % 10 == 0 ) {
+ else if (VerboseLevel() == 2 && fPrimaryTrackID % 10 == 0 ) {
G4cout << "$$$ Primary track " << fPrimaryTrackID << G4endl;
}
- else if ( fVerboseLevel == 1 && fPrimaryTrackID % 100 == 0 ) {
+ else if (VerboseLevel() == 1 && fPrimaryTrackID % 100 == 0 ) {
G4cout << "$$$ Primary track " << fPrimaryTrackID << G4endl;
}
// << G4endl;
// PDG code
- G4int pdg = track->GetDefinition()->GetPDGEncoding();
+ G4int pdg
+ = TG4ParticlesManager::Instance()
+ ->GetPDGEncodingFast(track->GetDefinition());
// track kinematics
G4ThreeVector momentum = track->GetMomentum();
mcProcess = kPPrimary;
}
else {
- TG4PhysicsManager* pPhysicsManager = TG4PhysicsManager::Instance();
- mcProcess = pPhysicsManager->GetMCProcess(kpProcess);
+ mcProcess = TG4PhysicsManager::Instance()->GetMCProcess(kpProcess);
// distinguish kPDeltaRay from kPEnergyLoss
if (mcProcess == kPEnergyLoss) mcProcess = kPDeltaRay;
}