Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4EmLEPTSPhysics.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26#include "G4EmLEPTSPhysics.hh"
27
32
33#include "G4GammaConversion.hh"
37#include "G4OpRayleigh.hh"
38
40#include "G4eIonisation.hh"
41#include "G4eBremsstrahlung.hh"
42
43#include "G4DNAElastic.hh"
44#include "G4DNAIonisation.hh"
45#include "G4DNAExcitation.hh"
46#include "G4DNADissociation.hh"
47#include "G4DNAVibExcitation.hh"
48#include "G4DNARotExcitation.hh"
49#include "G4DNAAttachment.hh"
50#include "G4DNAPositronium.hh"
53
59
60#include "G4GenericIon.hh"
61#include "G4LossTableManager.hh"
63#include "G4EmParameters.hh"
65#include "G4BuilderType.hh"
66
67//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
70{
73}
74
75//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
77{
81
82// baryons
84
86
87 G4DNAGenericIonsManager * genericIonsManager;
88 genericIonsManager=G4DNAGenericIonsManager::Instance();
89 genericIonsManager->GetIon("alpha++");
90 genericIonsManager->GetIon("alpha+");
91 genericIonsManager->GetIon("helium");
92 genericIonsManager->GetIon("hydrogen");
93 genericIonsManager->GetIon("carbon");
94 genericIonsManager->GetIon("nitrogen");
95 genericIonsManager->GetIon("oxygen");
96 genericIonsManager->GetIon("iron");
97
98}
99
100//....oooOO0OOooo.......oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
102{
103
104 auto myParticleIterator=GetParticleIterator();
105 myParticleIterator->reset();
106
107 while( (*myParticleIterator)() ){
108 G4ParticleDefinition * particle = myParticleIterator->value();
109 G4String particleName = particle->GetParticleName();
110 G4ProcessManager * manager = particle->GetProcessManager();
111 G4cout << " particle " << particle->GetParticleName() << " manager " << manager << G4endl; //GDEB
112 if(particleName=="e-") {
113 G4DNAElastic* elastic = new G4DNAElastic("e-_G4LEPTSElastic");
114 elastic->SetEmModel( new G4LEPTSElasticModel );
115 manager->AddDiscreteProcess(elastic );
116
117 G4DNAIonisation* ioni = new G4DNAIonisation("e-_G4LEPTSIonisation");
119 manager->AddDiscreteProcess( ioni );
120
121 G4DNAExcitation* excit = new G4DNAExcitation("e-_G4LEPTSExcitation");
123 manager->AddDiscreteProcess( excit );
124
125 manager->AddDiscreteProcess(new G4DNADissociation("e-_G4LEPTSDissocNeutr") );
126
127 G4DNAVibExcitation* vibExcit = new G4DNAVibExcitation("e-_G4LEPTSExcitVibrat");
128 vibExcit->SetEmModel( new G4LEPTSVibExcitationModel );
129 manager->AddDiscreteProcess( vibExcit );
130
131 manager->AddDiscreteProcess( new G4DNARotExcitation("e-_G4LEPTSExcitRotat") );
132
133 G4DNAAttachment* attach = new G4DNAAttachment("e-_G4LEPTSAttachment");
134 attach->SetEmModel( new G4LEPTSAttachmentModel );
135 manager->AddDiscreteProcess( attach );
136
137 } else if(particleName=="e+") {
138 G4DNAElastic* elastic = new G4DNAElastic("e+_G4LEPTSElastic");
139 elastic->SetEmModel( new G4LEPTSElasticModel );
140 manager->AddDiscreteProcess(elastic );
141
142 G4DNAIonisation* ioni = new G4DNAIonisation("e+_G4LEPTSIonisation");
144 manager->AddDiscreteProcess( ioni );
145
146 G4DNAExcitation* excit = new G4DNAExcitation("e+_G4LEPTSExcitation");
148 manager->AddDiscreteProcess( excit );
149
150 manager->AddDiscreteProcess(new G4DNADissociation("e+_G4LEPTSDissocNeutr") );
151
152 G4DNAVibExcitation* vibExcit = new G4DNAVibExcitation("e+_G4LEPTSExcitVibrat");
153 vibExcit->SetEmModel( new G4LEPTSVibExcitationModel );
154 manager->AddDiscreteProcess( vibExcit );
155
156 manager->AddDiscreteProcess( new G4DNARotExcitation("e+_G4LEPTSExcitRotat") );
157
158 G4DNAAttachment* attach = new G4DNAAttachment("e+_G4LEPTSAttachment");
159 attach->SetEmModel( new G4LEPTSAttachmentModel );
160 manager->AddDiscreteProcess( attach );
161
162 manager->AddDiscreteProcess(new G4DNAPositronium("e+_G4LEPTSPositronium") );
163
164 /* } else if ( particleName == "proton" ) {
165 manager->AddDiscreteProcess(new G4DNAExcitation("proton_G4DNAExcitation"));
166 manager->AddDiscreteProcess(new G4DNAIonisation("proton_G4DNAIonisation"));
167 manager->AddDiscreteProcess(new G4DNAChargeDecrease("proton_G4DNAChargeDecrease"));
168
169 } else if ( particleName == "hydrogen" ) {
170 manager->AddDiscreteProcess(new G4DNAExcitation("hydrogen_G4DNAExcitation"));
171 manager->AddDiscreteProcess(new G4DNAIonisation("hydrogen_G4DNAIonisation"));
172 manager->AddDiscreteProcess(new G4DNAChargeIncrease("hydrogen_G4DNAChargeIncrease"));
173
174 } else if ( particleName == "alpha" ) {
175 manager->AddDiscreteProcess(new G4DNAExcitation("alpha_G4DNAExcitation"));
176 manager->AddDiscreteProcess(new G4DNAIonisation("alpha_G4DNAIonisation"));
177 manager->AddDiscreteProcess(new G4DNAChargeDecrease("alpha_G4DNAChargeDecrease"));
178
179 } else if ( particleName == "alpha+" ) {
180 manager->AddDiscreteProcess(new G4DNAExcitation("alpha+_G4DNAExcitation"));
181 manager->AddDiscreteProcess(new G4DNAIonisation("alpha+_G4DNAIonisation"));
182 manager->AddDiscreteProcess(new G4DNAChargeDecrease("alpha+_G4DNAChargeDecrease"));
183 manager->AddDiscreteProcess(new G4DNAChargeIncrease("alpha+_G4DNAChargeIncrease"));
184
185 } else if ( particleName == "helium" ) {
186 manager->AddDiscreteProcess(new G4DNAExcitation("helium_G4DNAExcitation"));
187 manager->AddDiscreteProcess(new G4DNAIonisation("helium_G4DNAIonisation"));
188 manager->AddDiscreteProcess(new G4DNAChargeIncrease("helium_G4DNAChargeIncrease"));
189
190 // Extension to HZE proposed by Z. Francis
191
192 } else if ( particleName == "carbon" ) {
193 manager->AddDiscreteProcess(new G4DNAIonisation("carbon_G4DNAIonisation"));
194
195 } else if ( particleName == "nitrogen" ) {
196 manager->AddDiscreteProcess(new G4DNAIonisation("nitrogen_G4DNAIonisation"));
197
198 } else if ( particleName == "oxygen" ) {
199 manager->AddDiscreteProcess(new G4DNAIonisation("oxygen_G4DNAIonisation"));
200
201 } else if ( particleName == "iron" ) {
202 manager->AddDiscreteProcess(new G4DNAIonisation("iron_G4DNAIonisation"));
203 */
204 } else if (particleName == "gamma") {
205
206 G4double LivermoreHighEnergyLimit = CLHEP::GeV;
207
208 G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
209 G4LivermorePhotoElectricModel* theLivermorePhotoElectricModel =
211 theLivermorePhotoElectricModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
212 thePhotoElectricEffect->AddEmModel(0, theLivermorePhotoElectricModel);
213 manager->AddDiscreteProcess(thePhotoElectricEffect);
214
215 G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
216 G4LivermoreComptonModel* theLivermoreComptonModel =
218 theLivermoreComptonModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
219 theComptonScattering->AddEmModel(0, theLivermoreComptonModel);
220 manager->AddDiscreteProcess(theComptonScattering);
221
222 G4GammaConversion* theGammaConversion = new G4GammaConversion();
223 G4LivermoreGammaConversionModel* theLivermoreGammaConversionModel =
225 theLivermoreGammaConversionModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
226 theGammaConversion->AddEmModel(0, theLivermoreGammaConversionModel);
227 manager->AddDiscreteProcess(theGammaConversion);
228
229 G4RayleighScattering* theRayleigh = new G4RayleighScattering();
230 G4LivermoreRayleighModel* theRayleighModel = new G4LivermoreRayleighModel();
231 theRayleighModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
232 theRayleigh->AddEmModel(0, theRayleighModel);
233 manager->AddDiscreteProcess(theRayleigh);
234 }
235
236 }
237
238}
239
@ bElectromagnetic
double G4double
Definition: G4Types.hh:83
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
static G4DNAGenericIonsManager * Instance(void)
G4ParticleDefinition * GetIon(const G4String &name)
static G4Electron * Electron()
Definition: G4Electron.cc:93
G4EmLEPTSPhysics(const G4String &name="G4EmLEPTSPhysics")
virtual void ConstructParticle()
virtual void ConstructProcess()
static G4EmParameters * Instance()
static G4Gamma * Gamma()
Definition: G4Gamma.cc:85
static G4GenericIon * GenericIonDefinition()
Definition: G4GenericIon.cc:87
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleName() const
static G4Positron * Positron()
Definition: G4Positron.cc:93
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static G4Proton * Proton()
Definition: G4Proton.cc:92
void SetHighEnergyLimit(G4double)
Definition: G4VEmModel.hh:757
void AddEmModel(G4int, G4VEmModel *, const G4Region *region=nullptr)
void SetEmModel(G4VEmModel *, G4int index=0)
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const