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) BDSIM Collaboration, 2001 - 2026.
3
4This file is part of BDSIM.
5
6BDSIM is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published
8by the Free Software Foundation version 3 of the License.
9
10BDSIM is distributed in the hope that it will be useful, but
11WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef BDSLINKTRACKINGACTION_H
19#define BDSLINKTRACKINGACTION_H
20#include "BDSTrajectoryOptions.hh"
21
22#include "G4Types.hh"
23#include "G4UserTrackingAction.hh"
24
26class G4Track;
27
32class BDSLinkTrackingAction: public G4UserTrackingAction
33{
34public:
35 BDSLinkTrackingAction(G4bool batchMode,
36 BDSLinkEventAction* eventActionIn,
37 G4int verboseSteppingEventStartIn,
38 G4int verboseSteppingEventStopIn,
39 G4bool verboseSteppingPrimaryOnlyIn,
40 G4int verboseSteppingLevelIn);
41
42 virtual ~BDSLinkTrackingAction(){;}
43
45 virtual void PreUserTrackingAction(const G4Track* track);
46
48 virtual void PostUserTrackingAction(const G4Track* track);
49
50private:
53
56 const G4bool interactive;
57
60
61 G4int verboseSteppingEventStart;
62 G4int verboseSteppingEventStop;
63 G4bool verboseSteppingPrimaryOnly;
64 G4int verboseSteppingLevel;
65 BDS::TrajectoryOptions trajectoryStorageOptions;
66};
67
68#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.