BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSLinkStackingAction.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 BDSLINKSTACKINGACTION_H
20#define BDSLINKSTACKINGACTION_H
21#include "G4ClassificationOfNewTrack.hh"
22#include "G4Types.hh"
23#include "G4UserStackingAction.hh"
24
25#include <set>
26
28class G4Track;
29
34class BDSLinkStackingAction: public G4UserStackingAction
35{
36public:
39
40 explicit BDSLinkStackingAction(const BDSGlobalConstants* globals,
41 const std::set<G4int>& pdgIDsToAllowIn = std::set<G4int>(),
42 G4bool protonsAndIonsOnlyIn = true,
43 G4double minimumEKIn = 0);
44 virtual ~BDSLinkStackingAction();
45
48 virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* aTrack);
49
50 static G4double kineticEnergyKilled;
51
52private:
56 std::set<G4int> pdgIDsToAllow;
57 G4bool emptyPDGIDs;
58 G4bool protonsAndIonsOnly;
59 G4double minimumEK;
60 };
61
62#endif
63
A class that holds global options and constants.
BDSIM's Geant4 stacking action.
G4bool stopSecondaries
Whether particles with parentID > 0 will be killed.
virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track *aTrack)
G4double minimumEK
Minimum kinetic energy to generate a hit for.
BDSLinkStackingAction()=delete
Force use of supplied constructor.
G4bool killNeutrinos
Local copy of whether to kill neutrinos for tracking efficiency.
G4long maxTracksPerEvent
Maximum number of tracks before start killing.