BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSPhysicsMuonInelastic.cc
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#include "BDSPhysicsMuonInelastic.hh"
20
21#include "G4AutoDelete.hh"
22#include "G4BaryonConstructor.hh"
23#include "G4BosonConstructor.hh"
24#include "G4IonConstructor.hh"
25#include "G4LeptonConstructor.hh"
26#include "G4MesonConstructor.hh"
27#include "G4MuonMinus.hh"
28#include "G4MuonNuclearProcess.hh"
29#include "G4MuonPlus.hh"
30#include "G4MuonVDNuclearModel.hh"
31#include "G4PhysicsListHelper.hh"
32#include "G4ShortLivedConstructor.hh"
33
34
35BDSPhysicsMuonInelastic::BDSPhysicsMuonInelastic():
36 G4VPhysicsConstructor("BDSPhysicsMuonInelastic")
37{;}
38
39BDSPhysicsMuonInelastic::~BDSPhysicsMuonInelastic()
40{;}
41
43{
44 G4LeptonConstructor::ConstructParticle();
45 G4MesonConstructor::ConstructParticle();
46 G4BaryonConstructor::ConstructParticle();
47 G4BosonConstructor::ConstructParticle();
48 G4IonConstructor::ConstructParticle();
49 G4ShortLivedConstructor::ConstructParticle();
50}
51
53{
54 if (Activated())
55 {return;}
56
57 G4MuonNuclearProcess* muNucProcess = new G4MuonNuclearProcess();
58 G4MuonVDNuclearModel* muNucModel = new G4MuonVDNuclearModel();
59 muNucProcess->RegisterMe(muNucModel);
60 G4AutoDelete::Register(muNucProcess);
61 G4AutoDelete::Register(muNucModel);
62
63 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
64 ph->RegisterProcess(muNucProcess, G4MuonPlus::MuonPlus());
65 ph->RegisterProcess(muNucProcess, G4MuonMinus::MuonMinus());
66
68}
virtual void ConstructProcess()
Construct and attach the process for muons.
virtual void ConstructParticle()
Construct all particles (could be produced from interaction).
G4bool Activated() const
Get whether this instance has been activated.
Definition: BDSSingleUse.hh:37
void SetActivated()
Flag this instance as activated for later querying.
Definition: BDSSingleUse.hh:40