Geant4 VMC Version 6.6
Loading...
Searching...
No Matches
TG4SteppingAction.h
Go to the documentation of this file.
1#ifndef TG4_STEPPING_ACTION_H
2#define TG4_STEPPING_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 "TG4GeoTrackManager.h"
20
21#include <G4UserSteppingAction.hh>
22
23#include <globals.hh>
24
26class TG4TrackManager;
27class TG4StepManager;
28class TG4StackPopper;
29
30class TVirtualMCApplication;
31
32class G4Track;
33class G4Step;
34
45
47{
48 enum
49 {
50 kMaxNofSteps = 30000,
52 };
53
54 public:
56 virtual ~TG4SteppingAction();
57
58 // static access method
60
61 // methods
62 void ProcessTrackIfGeneralProcess(const G4Step* step);
63 void LateInitialize();
64 virtual void SteppingAction(const G4Step* step);
65 // the following method should not
66 // be overwritten in a derived class
67 virtual void UserSteppingAction(const G4Step* step);
68
69 // set methods
70 void SetLoopVerboseLevel(G4int level);
71 void SetMaxNofSteps(G4int number);
72 void SetSpecialControls(TG4SpecialControlsV2* specialControls);
73 void SetIsPairCut(G4bool isPairCut);
74 void SetCollectTracks(G4bool collectTracks);
75
76 // get methods
77 G4int GetLoopVerboseLevel() const;
78 G4int GetMaxNofSteps() const;
79 G4bool GetIsPairCut() const;
80 G4bool GetCollectTracks() const;
81
82 protected:
83 // methods
84 void PrintTrackInfo(const G4Track* track) const;
85
86 private:
91
92 // static data members
93 static G4ThreadLocal TG4SteppingAction* fgInstance;
94 //
95 // methods
96 void ProcessTrackIfLooping(const G4Step* step);
97 void ProcessTrackIfOutOfRegion(const G4Step* step);
98 void ProcessTrackIfBelowCut(const G4Step* step);
99 void ProcessTrackOnBoundary(const G4Step* step);
100
101 //
102 // data members
103
106
109
112
114 TVirtualMCApplication* fMCApplication;
115
118
121
124
127
130
133
136
139
142};
143
144// inline methods
145
151
152inline void TG4SteppingAction::SteppingAction(const G4Step* /*step*/)
153{
156}
157
159{
161 fLoopVerboseLevel = level;
162}
163
164inline void TG4SteppingAction::SetMaxNofSteps(G4int number)
165{
167 fMaxNofSteps = number;
168}
169
171 TG4SpecialControlsV2* specialControls)
172{
174 fSpecialControls = specialControls;
175}
176
177inline void TG4SteppingAction::SetIsPairCut(G4bool isPairCut)
178{
180 fIsPairCut = isPairCut;
181}
182
183inline void TG4SteppingAction::SetCollectTracks(G4bool collectTracks)
184{
186 fCollectTracks = collectTracks;
187}
188
190{
192 return fMaxNofSteps;
193}
194
196{
198 return fLoopVerboseLevel;
199}
200
202{
204 return fIsPairCut;
205}
206
208{
210 return fCollectTracks;
211}
212
213#endif // TG4_STEPPING_ACTION_H
Definition of the TG4GeoTrackManager class.
Definition of the TG4SteppingActionMessenger class.
The manager class for collecting TGeo tracks for visualization.
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.
Messenger class that defines commands for TG4SteppingAction.
Actions at each step.
TG4SteppingActionMessenger fMessenger
messenger
void ProcessTrackIfOutOfRegion(const G4Step *step)
static G4ThreadLocal TG4SteppingAction * fgInstance
this instance
TG4SteppingAction(const TG4SteppingAction &right)
Not implemented.
G4int fStandardVerboseLevel
standard tracking verbose level
TG4SpecialControlsV2 * fSpecialControls
the special controls manager
TG4SteppingAction & operator=(const TG4SteppingAction &right)
Not implemented.
void ProcessTrackIfBelowCut(const G4Step *step)
G4bool fIsPairCut
control of cut on e+e- pair
void SetIsPairCut(G4bool isPairCut)
G4int fLoopStepCounter
counter of step in looping
void SetMaxNofSteps(G4int number)
virtual void UserSteppingAction(const G4Step *step)
TG4StepManager * fStepManager
Cached pointer to thread-local step manager.
G4int GetLoopVerboseLevel() const
void SetCollectTracks(G4bool collectTracks)
virtual void SteppingAction(const G4Step *step)
void PrintTrackInfo(const G4Track *track) const
G4int fMaxNofSteps
max number of allowed steps
void SetLoopVerboseLevel(G4int level)
void ProcessTrackIfLooping(const G4Step *step)
void ProcessTrackIfGeneralProcess(const G4Step *step)
TG4StackPopper * fStackPopper
Cached pointer to thread-local stack popper.
G4bool GetCollectTracks() const
TG4GeoTrackManager fGeoTrackManager
manager for collecting TGeo tracks
static TG4SteppingAction * Instance()
G4bool fCollectTracks
control to collect Root tracks
G4int GetMaxNofSteps() const
void SetSpecialControls(TG4SpecialControlsV2 *specialControls)
TVirtualMCApplication * fMCApplication
Cached pointer to thread-local VMC application.
void ProcessTrackOnBoundary(const G4Step *step)
G4bool GetIsPairCut() const
G4int fLoopVerboseLevel
tracking verbose level for looping particles
TG4TrackManager * fTrackManager
Cached pointer to thread-local track manager.
The class for storing G4 tracks in VMC sack.