BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSPhysicsLaserIonExcitations.cc
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2024.
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 "BDSDecay.hh"
20#include "BDSIonPhotonEmission.hh"
21#include "BDSLaserIonExcitation.hh"
22#include "BDSPhysicsLaserIonExcitation.hh"
23
24#include "globals.hh" // geant4 types / globals
25#include "G4AutoDelete.hh"
26#include "G4Electron.hh"
27#include "G4Decay.hh"
28#include "G4Gamma.hh"
29#include "G4GenericIon.hh"
30#include "G4Hydrogen.hh"
31#include "G4IonTable.hh"
32#include "G4ParticleDefinition.hh"
33#include "G4ProcessManager.hh"
34#include "G4Version.hh"
35
36
37BDSPhysicsLaserIonExcitation::BDSPhysicsLaserIonExcitation():
38 G4VPhysicsConstructor("BDSPhysicsLaserPhotoDetachment")
39{;}
40
41BDSPhysicsLaserIonExcitation::~BDSPhysicsLaserIonExcitation()
42{;}
43
44void BDSPhysicsLaserIonExcitation::ConstructParticle()
45{
46 G4Electron::ElectronDefinition();
47 G4Gamma::Gamma();
48 G4GenericIon::Definition();
49}
50
51void BDSPhysicsLaserIonExcitation::ConstructProcess()
52{
53 if (Activated())
54 {return;}
55
56 BDSLaserIonExcitation* laserIonExcitation = new BDSLaserIonExcitation();
58 //BDSDecay* decay2 = new BDSDecay();
59 G4AutoDelete::Register(laserIonExcitation);
60 G4AutoDelete::Register(decay);
61#if G4VERSION_NUMBER > 1029
62 auto aParticleIterator = GetParticleIterator();
63#endif
64 aParticleIterator->reset();
65 G4String name = laserIonExcitation->GetProcessName();
66 while ((*aParticleIterator)())
67 {
68 G4ParticleDefinition* particle = aParticleIterator->value();
69
70 if(G4IonTable::IsIon(particle))
71 {
72 G4ProcessManager* pmanager = particle->GetProcessManager();
73 pmanager->AddDiscreteProcess(laserIonExcitation);
74 pmanager->AddDiscreteProcess(decay);
75 }
76
77 }
78
80}
Spontaneous emission of photon by relativistic ion.
Laser excitation of ion.
G4bool Activated() const
Get whether this instance has been activated.
void SetActivated()
Flag this instance as activated for later querying.