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) 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#include "BDSDecay.hh"
19#include "BDSIonPhotonEmission.hh"
20#include "BDSLaserIonExcitation.hh"
21#include "BDSPhysicsLaserIonExcitation.hh"
22
23#include "globals.hh" // geant4 types / globals
24#include "G4AutoDelete.hh"
25#include "G4Electron.hh"
26#include "G4Decay.hh"
27#include "G4Gamma.hh"
28#include "G4GenericIon.hh"
29#include "G4Hydrogen.hh"
30#include "G4IonTable.hh"
31#include "G4ParticleDefinition.hh"
32#include "G4ProcessManager.hh"
33#include "G4Version.hh"
34
35
36BDSPhysicsLaserIonExcitation::BDSPhysicsLaserIonExcitation():
37 G4VPhysicsConstructor("BDSPhysicsLaserPhotoDetachment")
38{;}
39
40BDSPhysicsLaserIonExcitation::~BDSPhysicsLaserIonExcitation()
41{;}
42
43void BDSPhysicsLaserIonExcitation::ConstructParticle()
44{
45 G4Electron::ElectronDefinition();
46 G4Gamma::Gamma();
47 G4GenericIon::Definition();
48}
49
50void BDSPhysicsLaserIonExcitation::ConstructProcess()
51{
52 if (Activated())
53 {return;}
54
55 BDSLaserIonExcitation* laserIonExcitation = new BDSLaserIonExcitation();
57 //BDSDecay* decay2 = new BDSDecay();
58 G4AutoDelete::Register(laserIonExcitation);
59 G4AutoDelete::Register(decay);
60#if G4VERSION_NUMBER > 1029
61 auto aParticleIterator = GetParticleIterator();
62#endif
63 aParticleIterator->reset();
64 G4String name = laserIonExcitation->GetProcessName();
65 while ((*aParticleIterator)())
66 {
67 G4ParticleDefinition* particle = aParticleIterator->value();
68
69 if(G4IonTable::IsIon(particle))
70 {
71 G4ProcessManager* pmanager = particle->GetProcessManager();
72 pmanager->AddDiscreteProcess(laserIonExcitation);
73 pmanager->AddDiscreteProcess(decay);
74 }
75
76 }
77
79}
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.