4 #include "lcdd/detectors/CurrentTrackState.hh"
11 #include "G4TransportationManager.hh"
17 G4int trackID = track->GetTrackID();
18 G4int parentID = track->GetParentID();
20 G4bool isTruePrimary = (track->GetParentID() == 0);
22 G4bool insideTrackerRegion = regionInfo->getStoreSecondaries();
24 bool hasTrackInfo = (trackInfo != NULL);
25 bool aboveEnergyThreshold = (track->GetKineticEnergy() > regionInfo->getThreshold());
32 CurrentTrackState::setCurrentTrackID(trackID);
39 if (isTruePrimary || (insideTrackerRegion && aboveEnergyThreshold)) {
42 CurrentTrackState::setCurrentTrackID(trackID);
45 fpTrackingManager->SetStoreTrajectory(
true);
55 if (insideTrackerRegion && !aboveEnergyThreshold) {
64 fpTrackingManager->SetStoreTrajectory(
false);
76 if (trackInfo != NULL)
80 if (fpTrackingManager->GimmeSecondaries()->size() > 0 && trackInfo == NULL) {
86 if (trackSummary != NULL) {
88 trackSummary->
update(track);
PluginManager * m_pluginManager
void preTracking(const G4Track *aTrack)
void postTracking(const G4Track *aTrack)
Container for all information from G4Track that may be persisted to MCParticle output collection.
void update(const G4Track *track)
G4bool getBackScattering() const
static UserTrackInformation * getUserTrackInformation(const G4Track *track)
static UserRegionInformation * getRegionInformation(const G4Track *track)
static UserTrackInformation * setupUserTrackInformation(const G4Track *track, G4bool save)
void PostUserTrackingAction(const G4Track *)
void PreUserTrackingAction(const G4Track *)