BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSTrackingAction.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2024.
4
5This file is part of BDSIM.
6
7BDSIM is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published
9by the Free Software Foundation version 3 of the License.
10
11BDSIM is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
18*/
19#ifndef BDSTRACKINGACTION_H
20#define BDSTRACKINGACTION_H
21
22#include "BDSTrajectoryOptions.hh"
23
24#include "G4Types.hh"
25#include "globals.hh" // geant4 types / globals
26#include "G4UserTrackingAction.hh"
27
28class BDSEventAction;
29class G4Track;
30
35class BDSTrackingAction: public G4UserTrackingAction
36{
37public:
38 BDSTrackingAction(G4bool batchMode,
39 G4bool storeTrajectoryIn,
40 const BDS::TrajectoryOptions& storeTrajectoryOptionsIn,
41 BDSEventAction* eventActionIn,
42 G4int verboseSteppingEventStartIn,
43 G4int verboseSteppingEventStopIn,
44 G4bool verboseSteppingPrimaryOnlyIn,
45 G4int verboseSteppingLevelIn);
46
47 virtual ~BDSTrackingAction(){;}
48
50 virtual void PreUserTrackingAction(const G4Track* track);
51
53 virtual void PostUserTrackingAction(const G4Track* track);
54
55private:
58
61 const G4bool interactive;
62
63 const G4bool storeTrajectory;
65
68
69 G4int verboseSteppingEventStart;
70 G4int verboseSteppingEventStop;
71 G4bool verboseSteppingPrimaryOnly;
72 G4int verboseSteppingLevel;
73};
74
75#endif
Process information at the event level.
Action to decide whether or not to store trajectory information.
virtual void PreUserTrackingAction(const G4Track *track)
Used to decide whether or not to store trajectories.
virtual void PostUserTrackingAction(const G4Track *track)
Detect whether track is a primary and if so whether it ended in a collimator.
BDSTrackingAction()=delete
No default constructor required.
BDSEventAction * eventAction
Cache of trajectory options.
const BDS::TrajectoryOptions storeTrajectoryOptions
Cache of flag from global constants to control storing all trajectories.