BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSTerminatorUserLimits.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 BDSTERMINATORUSERLIMITS_H
19#define BDSTERMINATORUSERLIMITS_H
20
21#include "G4UserLimits.hh"
22#include "globals.hh" // geant4 basic stl types
23
24#include <limits>
25
37class BDSTerminatorUserLimits: public G4UserLimits
38{
39public:
43 BDSTerminatorUserLimits(G4double ustepMax = std::numeric_limits<double>::max(),
44 G4double utrakMax = std::numeric_limits<double>::max(),
45 G4double utimeMax = std::numeric_limits<double>::max(),
46 G4double uekinMin = 0.,
47 G4double urangMin = 0.);
48
49 BDSTerminatorUserLimits(const G4String& type,
50 G4double ustepMax = std::numeric_limits<double>::max(),
51 G4double utrakMax = std::numeric_limits<double>::max(),
52 G4double utimeMax = std::numeric_limits<double>::max(),
53 G4double uekinMin = 0.,
54 G4double urangMin = 0.);
55
56 virtual ~BDSTerminatorUserLimits(){};
57
61 virtual G4double GetUserMinEkine(const G4Track&);
62
63protected:
64 G4double keeprunningEK;
65 G4double stoprunningEK;
66
67private:
70 const G4int turnsToTake;
71};
72
73#endif
Dynamic user limits for a volume that changed based on the parameter turnstaken in BDSGlobalConstants...
virtual G4double GetUserMinEkine(const G4Track &)
G4double keeprunningEK
Minimum energy particle must have to keep going.
G4double stoprunningEK
Same, so everything < DBL_MAX so everything stopped.