BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSStackingAction.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 BDSSTACKINGACTION_H
19#define BDSSTACKINGACTION_H
20
21#include "globals.hh"
22#include "G4ClassificationOfNewTrack.hh"
23#include "G4UserStackingAction.hh"
24
25#include <set>
26
28class G4Track;
29
34class BDSStackingAction: public G4UserStackingAction
35{
36public:
38 virtual ~BDSStackingAction();
39
42 virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* aTrack);
43
44 virtual void NewStage();
45 virtual void PrepareNewEvent();
46
47 static G4double energyKilled;
48
49private:
52
56 G4double minimumEK;
57 std::set<G4int> particlesToExcludeFromCuts;
58 };
59
60#endif
61
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.