ATLAS Offline Software
Loading...
Searching...
No Matches
TrackProcessorUserActionBase.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_TRACKPROCESSORUSERACTIONBASE_H
6#define ISF_GEANT4TOOLS_TRACKPROCESSORUSERACTIONBASE_H
7
8#include "G4UserTrackingAction.hh"
9#include "G4UserSteppingAction.hh"
10#include "G4UserEventAction.hh"
11
13
15
16// forward declarations
18
20
21namespace ISF {
22 class ISFParticle;
23}
24
25
26namespace G4UA{
27
28namespace iGeant4 {
29
30class TrackProcessorUserActionBase: public G4UserTrackingAction,
31 public G4UserSteppingAction,
32 public G4UserEventAction
33{
34
35public:
37 virtual void BeginOfEventAction(const G4Event*) override final;
38 virtual void EndOfEventAction(const G4Event*) override final;
39
40 virtual void PreUserTrackingAction(const G4Track*) override;
41 virtual void PostUserTrackingAction(const G4Track*) override final;
42
43 virtual void UserSteppingAction(const G4Step*) override final;
44
46
47protected:
49
51
54 virtual void ISFSteppingAction(const G4Step*, ISF::ISFParticle*) = 0;
55
56private:
58 void setupPrimary(G4Track&);
59
61 void setupSecondary(const G4Track&);
62
64 void updateCachedParticleInfo(ISF::ISFParticle* baseISFParticle,
65 HepMC::ConstGenParticlePtr primaryGenParticle,
66 HepMC::GenParticlePtr currentGenParticle);
67
70 HepMC::ConstGenParticlePtr generationZeroGenParticle,
71 HepMC::ConstGenParticlePtr currentGenParticle,
72 int regenerationNumber) const;
73
76
77}; // class TrackProcessorUserActionBase
78
79}// iGeant4
80
81}// G4UA
82
83#endif // ISF_GEANT4TOOLS_TRACKPROCESSORUSERACTIONBASE_H
This class is attached to G4Event objects as UserInformation.
VTrackInformation::TrackClassification classify(HepMC::ConstGenParticlePtr primaryGenParticle, HepMC::ConstGenParticlePtr generationZeroGenParticle, HepMC::ConstGenParticlePtr currentGenParticle, int regenerationNumber) const
Classify the particle represented by the given set of truth links.
virtual void PreUserTrackingAction(const G4Track *) override
virtual void EndOfEventAction(const G4Event *) override final
virtual void ISFSteppingAction(const G4Step *, ISF::ISFParticle *)=0
This method is called by TrackProcessorUserActionBase after the G4Track->ISFParticle association has ...
virtual void PostUserTrackingAction(const G4Track *) override final
virtual void UserSteppingAction(const G4Step *) override final
void setupPrimary(G4Track &)
Setup the given G4Track as the current primary particle which we'll process.
void setupSecondary(const G4Track &)
Setup the given G4Track as the current secondary particle which we'll process.
void updateCachedParticleInfo(ISF::ISFParticle *baseISFParticle, HepMC::ConstGenParticlePtr primaryGenParticle, HepMC::GenParticlePtr currentGenParticle)
Set the following information as the currently traced particle.
AtlasG4EventUserInfo * m_atlasG4EvtUserInfo
event-global G4 UserInformation
ISF::ISFParticleContainer ReturnSecondaries(ISF::ISFParticle const *parent)
virtual void BeginOfEventAction(const G4Event *) override final
ISF::ISFParticle * m_curBaseISP
The most recent ISFParticle ancestor that triggers the currently processed G4Track.
The generic ISF particle definition,.
Definition ISFParticle.h:42
GenParticle * GenParticlePtr
Definition GenParticle.h:37
const GenParticle * ConstGenParticlePtr
Definition GenParticle.h:38
ISFParticleOrderedQueue.
std::list< ISF::ISFParticle * > ISFParticleContainer
generic ISFParticle container (not necessarily a std::list!)