BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSLinkTrackingAction.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2023.
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 BDSLINKTRACKINGACTION_H
20#define BDSLINKTRACKINGACTION_H
21#include "BDSTrajectoryOptions.hh"
22
23#include "G4Types.hh"
24#include "G4UserTrackingAction.hh"
25
27class G4Track;
28
33class BDSLinkTrackingAction: public G4UserTrackingAction
34{
35public:
36 BDSLinkTrackingAction(G4bool batchMode,
37 BDSLinkEventAction* eventActionIn,
38 G4int verboseSteppingEventStartIn,
39 G4int verboseSteppingEventStopIn,
40 G4bool verboseSteppingPrimaryOnlyIn,
41 G4int verboseSteppingLevelIn);
42
43 virtual ~BDSLinkTrackingAction(){;}
44
46 virtual void PreUserTrackingAction(const G4Track* track);
47
49 virtual void PostUserTrackingAction(const G4Track* track);
50
51private:
54
57 const G4bool interactive;
58
61
62 G4int verboseSteppingEventStart;
63 G4int verboseSteppingEventStop;
64 G4bool verboseSteppingPrimaryOnly;
65 G4int verboseSteppingLevel;
66 BDS::TrajectoryOptions trajectoryStorageOptions;
67};
68
69#endif
Process information at the event level for Link to trackers.
Action to decide whether or not to store trajectory information.
BDSLinkEventAction * eventAction
Cache of event action to communicate whether a primary stopped in a collimator or not.
BDSLinkTrackingAction()=delete
No default constructor required.
virtual void PostUserTrackingAction(const G4Track *track)
Detect whether track is a primary and if so whether it ended in a collimator.
virtual void PreUserTrackingAction(const G4Track *track)
Used to decide whether or not to store trajectories.