|
ATLAS Offline Software
|
Go to the documentation of this file.
30 #include "G4ParticleDefinition.hh"
31 #include "G4DynamicParticle.hh"
32 #include "G4TouchableHistory.hh"
34 #include "G4TransportationManager.hh"
35 #include "G4LogicalVolumeStore.hh"
49 G4cout <<
"Initializing TrackProcessorUserActionPassBack" << G4endl;
56 G4Exception(
"iGeant4::TrackProcessorUserActionPassBack",
"NoISFParticleBroker", FatalException,
description);
66 G4Exception(
"iGeant4::TrackProcessorUserActionPassBack",
"NoISFGeoIDSvc", FatalException,
description);
80 G4Track* aTrack = aStep->GetTrack();
81 G4TrackStatus aTrackStatus = aTrack->GetTrackStatus();
84 const G4StepPoint *postStep = aStep->GetPostStepPoint();
92 const G4ThreeVector &postPos = postStep->GetPosition();
107 if ( nextGeoID==curGeoID ) {
150 aTrack->SetTrackStatus( fStopAndKill );
154 }
else if ( aTrackStatus!=fAlive && aTrackStatus != fStopButAlive ) {
174 const std::vector<const G4Track*> *secondaryVector = aStep->GetSecondaryInCurrentStep();
176 for (
auto* aConstTrack_2nd : *secondaryVector ) {
181 const G4ThreeVector& pos_2nd = aTrack_2nd->GetPosition();
185 if( nextGeoID_2nd!=curGeoID ) {
195 aTrack_2nd->SetTrackStatus( fStopAndKill );
210 generationZeroGenParticle );
227 description << G4String(
"newTruthBinding: ") +
"No TrackInformation associated with G4Track (trackID: "
228 << aTrack->GetTrackID() <<
", track pos: "<<aTrack->GetPosition() <<
", mom: "<<aTrack->GetMomentum()
229 <<
", parentID " << aTrack->GetParentID() <<
")";
230 G4Exception(
"iGeant4::TrackProcessorUserActionPassBack",
"NoTrackInformation", FatalException,
description);
267 aTrack->SetTrackStatus( fStopAndKill );
void setNextGeoID(AtlasDetDescr::AtlasRegion geoID)
register the next AtlasDetDescr::AtlasRegion
static TrackInformation * attachTrackInfoToNewG4Track(G4Track &aTrack, ISF::ISFParticle &baseIsp, VTrackInformation::TrackClassification classification, HepMC::GenParticlePtr generationZeroGenParticle=nullptr)
attach a new TrackInformation object to the given new (!) G4Track (the G4Track must not have a UserIn...
void setTruthBinding(TruthBinding *truth)
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
virtual void push(ISFParticle *particle, const ISFParticle *parent)=0
hand a new ISF particle to the broker
TrackProcessorUserActionPassBack(const Config &config)
GenParticle * GenParticlePtr
ISF::IParticleBroker * m_particleBrokerQuick
quick access avoiding gaudi overhead
ISF::IGeoIDSvc * m_geoIDSvcQuick
quick access avoiding gaudi overhead
ISF::TruthBinding * newTruthBinding(const G4Track *aTrack, HepMC::GenParticlePtr currentGenParticle) const
create a new TruthBinding object for the given G4Track (may return 0 if unable)
ServiceHandle< ISF::IGeoIDSvc > geoIDSvc
ISF::ISFParticle * newISFParticle(G4Track *aTrack, const ISF::ISFParticle *parent, HepMC::GenParticlePtr currentGenParticle, AtlasDetDescr::AtlasRegion nextGeoID)
HepMC::GenParticlePtr GetCurrentGenParticle()
return a pointer to the GenParticle corresponding to the current G4Track (if there is one).
double passBackEkinThreshold
properties to define which particles are returned to ISF
ISF::ISFParticleContainer m_storedSecondaries
void ISFSteppingAction(const G4Step *, ISF::ISFParticle *curISP) override final
Called by the base class after the G4Track->ISFParticle association has been established.
AtlasDetDescr::AtlasRegion nextGeoID() const
next geoID the particle will be simulated in
static ISF::ISFParticle * convertG4TrackToISFParticle(const G4Track &aTrack, const ISF::ISFParticle &parent, ISF::TruthBinding *truth=nullptr)
convert the given G4Track into an ISFParticle
AtlasG4EventUserInfo * m_atlasG4EvtUserInfo
event-global G4 UserInformation
void returnParticleToISF(G4Track *aTrack, const ISF::ISFParticle *parentISP, HepMC::GenParticlePtr currentGenParticle, AtlasDetDescr::AtlasRegion nextGeoID)
kills the given G4Track, converts it into an ISFParticle and returns it to the ISF particle broker
ServiceHandle< ISF::IParticleBroker > particleBroker
void setNextSimID(SimSvcID simID)
register the next SimSvcID
SimSvcID nextSimID() const
the next simulation service the particle will be sent to
virtual AtlasDetDescr::AtlasRegion identifyGeoID(const Amg::Vector3D &pos) const =0
A static filter that returns the AtlasRegion of the given ISFParticle (position) -> returns ISF::fUnd...
bool killBoundaryParticlesBelowThreshold
#define ATLAS_THREAD_SAFE
static VTrackInformation * getISFTrackInfo(const G4Track &aTrack)
return a valid UserInformation object of the G4Track for use within the ISF
Define macros for attributes used to control the static checker.
unsigned int verboseLevel
const TruthBinding * getTruthBinding() const
pointer to the simulation truth - optional, can be 0
std::string description
glabal timer - how long have I taken so far?