BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
BDSPhysicsCutsAndLimits.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 BDSCUTSANDLIMITS_H
20#define BDSCUTSANDLIMITS_H
21
22#include "BDSSingleUse.hh"
23
24#include "G4VPhysicsConstructor.hh"
25
26#include <set>
27
29class G4StepLimiter;
30class G4UserSpecialCuts;
31
36class BDSPhysicsCutsAndLimits: public G4VPhysicsConstructor, public BDSSingleUse
37{
38public:
39 BDSPhysicsCutsAndLimits() = delete;
40 explicit BDSPhysicsCutsAndLimits(const std::set<G4int>& pdgsToExcludeFromCuts = {});
46
48 virtual void ConstructParticle();
49
51 virtual void ConstructProcess();
52
53private:
54 G4StepLimiter* stepLimiter;
55 G4UserSpecialCuts* specialCuts;
56 BDSProcessUserSpecialCutsPDG* bdsSpecialCuts;
57 G4bool useParticleExclusionFromCuts;
58};
59#endif
Physics processes required for user tracking limits.
G4StepLimiter * stepLimiter
Step limit process for MaxAllowedStep.
BDSPhysicsCutsAndLimits & operator=(const BDSPhysicsCutsAndLimits &)=delete
Assignment and copy constructor not implemented nor used.
BDSPhysicsCutsAndLimits(BDSPhysicsCutsAndLimits &)=delete
Assignment and copy constructor not implemented nor used.
G4UserSpecialCuts * specialCuts
Process for all other limits.
virtual void ConstructProcess()
Construct and attach step limiter and cuts processes.
virtual void ConstructParticle()
Construct gamma, e+- and proton - the minimum this sets limits for.
Apply regular cuts but not to a specified set of PDG IDs.
Class to provide single use functionality.
Definition: BDSSingleUse.hh:31