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
17
18namespace ISF {
19 class ISFParticle;
20}
21
22
23namespace G4UA{
24
25namespace iGeant4 {
26
27class TrackProcessorUserActionBase: public G4UserTrackingAction,
28 public G4UserSteppingAction,
29 public G4UserEventAction
30{
31
32public:
34 virtual void BeginOfEventAction(const G4Event*) override final;
35 virtual void EndOfEventAction(const G4Event*) override final;
36
37 virtual void PreUserTrackingAction(const G4Track*) override;
38 virtual void PostUserTrackingAction(const G4Track*) override final;
39
40 virtual void UserSteppingAction(const G4Step*) override final;
41
43
44protected:
46
49 virtual void ISFSteppingAction(const G4Step*, ISF::ISFParticle*) = 0;
50
51private:
53 void setupPrimary(G4Track&);
54
56 void setupSecondary(const G4Track&);
57
60
63 HepMC::ConstGenParticlePtr generationZeroGenParticle,
64 HepMC::ConstGenParticlePtr currentGenParticle,
65 int regenerationNumber) const;
66
69
70}; // class TrackProcessorUserActionBase
71
72}// iGeant4
73
74}// G4UA
75
76#endif // ISF_GEANT4TOOLS_TRACKPROCESSORUSERACTIONBASE_H
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 ...
void updateCurrentBaseISFParticle(ISF::ISFParticle *baseISFParticle)
Set the base ISFParticle for the currently traced particle.
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.
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
HepMC3::ConstGenParticlePtr ConstGenParticlePtr
Definition GenParticle.h:20
ISFParticleOrderedQueue.
std::list< ISF::ISFParticle * > ISFParticleContainer
generic ISFParticle container (not necessarily a std::list!)