BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
BDSStackingAction.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 BDSSTACKINGACTION_H
20#define BDSSTACKINGACTION_H
21
22#include "globals.hh"
23#include "G4ClassificationOfNewTrack.hh"
24#include "G4UserStackingAction.hh"
25
26#include <set>
27
29class G4Track;
30
35class BDSStackingAction: public G4UserStackingAction
36{
37public:
39 virtual ~BDSStackingAction();
40
43 virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* aTrack);
44
45 virtual void NewStage();
46 virtual void PrepareNewEvent();
47
48 static G4double energyKilled;
49
50private:
53
57 G4double minimumEK;
58 std::set<G4int> particlesToExcludeFromCuts;
59 };
60
61#endif
62
A class that holds global options and constants.
BDSIM's Geant4 stacking action.
G4long maxTracksPerEvent
Maximum number of tracks before start killing.
virtual void PrepareNewEvent()
We don't do anything here.
BDSStackingAction()=delete
Force use of supplied constructor.
G4bool killNeutrinos
Local copy of whether to kill neutrinos for tracking efficiency.
virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track *aTrack)
G4bool stopSecondaries
Whether particles with parentID > 0 will be killed.
virtual void NewStage()
We don't do anything here.