BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
BDSTrackingAction.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2022.
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 "G4UserTrackingAction.hh"
26
27class BDSEventAction;
28class G4Track;
29
34class BDSTrackingAction: public G4UserTrackingAction
35{
36public:
37 BDSTrackingAction(G4bool batchMode,
38 G4bool storeTrajectoryIn,
39 const BDS::TrajectoryOptions& storeTrajectoryOptionsIn,
40 BDSEventAction* eventActionIn,
41 G4int verboseSteppingEventStartIn,
42 G4int verboseSteppingEventStopIn,
43 G4bool verboseSteppingPrimaryOnlyIn,
44 G4int verboseSteppingLevelIn);
45
46 virtual ~BDSTrackingAction(){;}
47
49 virtual void PreUserTrackingAction(const G4Track* track);
50
52 virtual void PostUserTrackingAction(const G4Track* track);
53
54private:
57
60 const G4bool interactive;
61
62 const G4bool storeTrajectory;
64
67
68 G4int verboseSteppingEventStart;
69 G4int verboseSteppingEventStop;
70 G4bool verboseSteppingPrimaryOnly;
71 G4int verboseSteppingLevel;
72};
73
74#endif
Process information at the event level.
Action to decide whether or not to store trajectory information.
const G4bool interactive
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.