ATLAS Offline Software
TrackProcessorUserActionPassBack.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ISF_GEANT4TOOLS_TRACKPROCESSORUSERACTIONPASSBACK_H
6 #define ISF_GEANT4TOOLS_TRACKPROCESSORUSERACTIONPASSBACK_H
7 
9 
11 #include "GaudiKernel/ServiceHandle.h"
12 
15 
16 #include <string>
17 
18 // forward declarations
19 
20 // Geant4
21 class G4LogicalVolume;
22 
23 namespace ISF {
24  class ISFParticle;
25  class ITruthBinding;
26 }
27 
29 
30 namespace G4UA{
31 
32  namespace iGeant4{
33 
35  {
36 
37  public:
38 
39  struct Config
40  {
44  double passBackEkinThreshold=0.05;
46  unsigned int verboseLevel=0;
47  };
48 
50  private:
53  void ISFSteppingAction(const G4Step*, ISF::ISFParticle *curISP) override final;
54 
56 
58  ISF::TruthBinding* newTruthBinding(const G4Track* aTrack, HepMC::GenParticlePtr currentGenParticle) const;
59 
60  ISF::ISFParticle* newISFParticle(G4Track* aTrack,
61  const ISF::ISFParticle* parent,
62  HepMC::GenParticlePtr currentGenParticle,
63  AtlasDetDescr::AtlasRegion nextGeoID);
64 
66  void returnParticleToISF( G4Track *aTrack,
67  const ISF::ISFParticle *parentISP,
68  HepMC::GenParticlePtr currentGenParticle,
69  AtlasDetDescr::AtlasRegion nextGeoID );
70 
73 
74  }; // class TrackProcessorUserActionPassBack
75 
76  }// iGeant4
77 
78 }// G4UA
79 
80 #endif // ISF_GEANT4TOOLS_TRACKPROCESSORUSERACTIONPASSBACK_H
G4UA::iGeant4::TrackProcessorUserActionBase
Definition: TrackProcessorUserActionBase.h:33
G4UA
for nSW
Definition: CalibrationDefaultProcessing.h:19
ISF::TruthBinding
Definition: TruthBinding.h:18
G4UA::iGeant4::TrackProcessorUserActionPassBack::TrackProcessorUserActionPassBack
TrackProcessorUserActionPassBack(const Config &config)
Definition: TrackProcessorUserActionPassBack.cxx:44
AtlasDetDescr::AtlasRegion
AtlasRegion
Definition: AtlasRegion.h:27
IParticleBroker.h
HepMC::GenParticlePtr
GenParticle * GenParticlePtr
Definition: GenParticle.h:37
G4UA::iGeant4::TrackProcessorUserActionPassBack::m_particleBrokerQuick
ISF::IParticleBroker * m_particleBrokerQuick
quick access avoiding gaudi overhead
Definition: TrackProcessorUserActionPassBack.h:71
ISF::ISFParticle
Definition: ISFParticle.h:42
G4UA::iGeant4::TrackProcessorUserActionPassBack::m_geoIDSvcQuick
ISF::IGeoIDSvc * m_geoIDSvcQuick
quick access avoiding gaudi overhead
Definition: TrackProcessorUserActionPassBack.h:72
GenParticle_fwd.h
G4UA::iGeant4::TrackProcessorUserActionPassBack::newTruthBinding
ISF::TruthBinding * newTruthBinding(const G4Track *aTrack, HepMC::GenParticlePtr currentGenParticle) const
create a new TruthBinding object for the given G4Track (may return 0 if unable)
Definition: TrackProcessorUserActionPassBack.cxx:222
config
Definition: PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py:1
G4UA::iGeant4::TrackProcessorUserActionPassBack::Config::geoIDSvc
ServiceHandle< ISF::IGeoIDSvc > geoIDSvc
Definition: TrackProcessorUserActionPassBack.h:42
G4UA::iGeant4::TrackProcessorUserActionPassBack::newISFParticle
ISF::ISFParticle * newISFParticle(G4Track *aTrack, const ISF::ISFParticle *parent, HepMC::GenParticlePtr currentGenParticle, AtlasDetDescr::AtlasRegion nextGeoID)
Definition: TrackProcessorUserActionPassBack.cxx:242
G4UA::iGeant4::TrackProcessorUserActionPassBack::Config::passBackEkinThreshold
double passBackEkinThreshold
properties to define which particles are returned to ISF
Definition: TrackProcessorUserActionPassBack.h:44
ISF::IParticleBroker
@ class IParticleBroker
Definition: IParticleBroker.h:39
G4UA::iGeant4::TrackProcessorUserActionPassBack::ISFSteppingAction
void ISFSteppingAction(const G4Step *, ISF::ISFParticle *curISP) override final
Called by the base class after the G4Track->ISFParticle association has been established.
Definition: TrackProcessorUserActionPassBack.cxx:77
TrackProcessorUserActionBase.h
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ISF::IGeoIDSvc
Definition: IGeoIDSvc.h:41
IGeoIDSvc.h
G4UA::iGeant4::TrackProcessorUserActionPassBack::Config
Definition: TrackProcessorUserActionPassBack.h:40
G4UA::iGeant4::TrackProcessorUserActionPassBack::returnParticleToISF
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
Definition: TrackProcessorUserActionPassBack.cxx:261
G4UA::iGeant4::TrackProcessorUserActionPassBack::Config::particleBroker
ServiceHandle< ISF::IParticleBroker > particleBroker
Definition: TrackProcessorUserActionPassBack.h:41
ISF
ISFParticleOrderedQueue.
Definition: PrimaryParticleInformation.h:13
G4UA::iGeant4::TrackProcessorUserActionPassBack
Definition: TrackProcessorUserActionPassBack.h:35
G4UA::iGeant4::TrackProcessorUserActionPassBack::Config::killBoundaryParticlesBelowThreshold
bool killBoundaryParticlesBelowThreshold
Definition: TrackProcessorUserActionPassBack.h:45
G4UA::iGeant4::TrackProcessorUserActionPassBack::m_config
Config m_config
Definition: TrackProcessorUserActionPassBack.h:55
G4UA::iGeant4::TrackProcessorUserActionPassBack::Config::verboseLevel
unsigned int verboseLevel
Definition: TrackProcessorUserActionPassBack.h:46
ServiceHandle< ISF::IParticleBroker >
iGeant4
Definition: Geant4TruthIncident.h:35