Geant4 VMC Version 6.6
Loading...
Searching...
No Matches
TG4TrackingAction.h
Go to the documentation of this file.
1#ifndef TG4_TRACKING_ACTION_H
2#define TG4_TRACKING_ACTION_H
3
4//------------------------------------------------
5// The Geant4 Virtual Monte Carlo package
6// Copyright (C) 2007 - 2014 Ivana Hrivnacova
7// All rights reserved.
8//
9// For the licensing terms see geant4_vmc/LICENSE.
10// Contact: root-vmc@cern.ch
11//-------------------------------------------------
12
17
18#include "TG4TrackSaveControl.h"
20#include "TG4Verbose.h"
21
22#include <G4UserTrackingAction.hh>
23
25class TG4TrackManager;
26class TG4StepManager;
27class TG4StackPopper;
29
30class TVirtualMCApplication;
31class TVirtualMCStack;
32
33class G4Track;
34
44
46{
47 public:
49 virtual ~TG4TrackingAction();
50
51 // static access method
53
54 // methods
55 void LateInitialize();
56 virtual void PrepareNewEvent();
57 virtual void PreTrackingAction(const G4Track* aTrack);
58 virtual void PostTrackingAction(const G4Track* aTrack);
59 // the following methods should not
60 // be overwritten in a derived class
61 virtual void PreUserTrackingAction(const G4Track* aTrack);
62 virtual void PostUserTrackingAction(const G4Track* aTrack);
63 void FinishPrimaryTrack();
64
65 // set methods
66 void SetMCStack(TVirtualMCStack* mcStack);
67 void SetNewVerboseLevel(G4int level);
68 void SetNewVerboseTrackID(G4int trackID);
69 void SetSpecialControls(TG4SpecialControlsV2* specialControls);
70
71 // get methods
72 G4int GetNewVerboseLevel() const;
73 G4int GetNewVerboseTrackID() const;
75
76 private:
81
82 // methods
83 void UserProcessHits(const G4Track* aTrack);
84 void Verbose() const;
85
86 // static data members
87 static G4ThreadLocal TG4TrackingAction* fgInstance;
88
89 //
90 // data members
91
94
97
100
102 TVirtualMCApplication* fMCApplication;
103
105 TVirtualMCStack* fMCStack;
106
109
112
115
118
121
124
127
130
134};
135
136// inline methods
137
143
144inline void TG4TrackingAction::PreTrackingAction(const G4Track* /*aTrack*/)
145{
148}
149
150inline void TG4TrackingAction::PostTrackingAction(const G4Track* /*aTrack*/)
151{
154}
155
156inline void TG4TrackingAction::SetMCStack(TVirtualMCStack* mcStack)
157{
159 fMCStack = mcStack;
160}
161
163 TG4SpecialControlsV2* specialControls)
164{
166 fSpecialControls = specialControls;
167}
168
169#endif // TG4_TRACKING_ACTION_H
Definition of the enumeration TG4TrackSaveControl.
Definition of the TG4TrackingActionMessenger class.
Definition of the TG4Verbose class.
The manager class for G3 process controls.
The process which pops particles defined by user from the VMC stack and passes them to tracking.
Geant4 implementation of the TVirtualMC interface methods for access to Geant4 at step level.
Defines additional track information.
The class for storing G4 tracks in VMC sack.
Messenger class that defines commands for TG4TrackingAction.
Actions at the beginnig and at the end of track.
G4int fPrimaryTrackID
current primary track ID
virtual void PostTrackingAction(const G4Track *aTrack)
void SetNewVerboseLevel(G4int level)
G4bool fOverwriteLastTrack
control of saving current track
TG4TrackingAction(const TG4TrackingAction &right)
Not implemented.
static G4ThreadLocal TG4TrackingAction * fgInstance
this instance
TG4TrackManager * GetTrackManager() const
G4int fCurrentTrackID
current track ID
G4int fNewVerboseTrackID
track ID for which the new verbose level is applied
virtual void PreUserTrackingAction(const G4Track *aTrack)
G4int GetNewVerboseLevel() const
void SetMCStack(TVirtualMCStack *mcStack)
TG4StepManager * fStepManager
Cached pointer to thread-local step manager.
TG4TrackManager * fTrackManager
track manager
G4int fNewVerboseLevel
new /tracking/verbose level
void UserProcessHits(const G4Track *aTrack)
G4int GetNewVerboseTrackID() const
TG4TrackingAction & operator=(const TG4TrackingAction &right)
Not implemented.
virtual void PreTrackingAction(const G4Track *aTrack)
TG4TrackingActionMessenger fMessenger
messenger
void SetSpecialControls(TG4SpecialControlsV2 *specialControls)
TG4TrackSaveControl fTrackSaveControl
control of saving secondary tracks
virtual void PrepareNewEvent()
TG4StackPopper * fStackPopper
Cached pointer to thread-local stack popper.
TVirtualMCApplication * fMCApplication
Cached pointer to thread-local VMC application.
static TG4TrackingAction * Instance()
void SetNewVerboseTrackID(G4int trackID)
virtual void PostUserTrackingAction(const G4Track *aTrack)
TVirtualMCStack * fMCStack
Cached pointer to thread-local VMC stack.
TG4SpecialControlsV2 * fSpecialControls
the special controls manager
Base class for defining the verbose level and a common messenger.
Definition TG4Verbose.h:36
TG4TrackSaveControl
Enumeration for options for storing secondary tracks.