ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4EmLEPTSPhysics.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4EmLEPTSPhysics.cc
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"
34 #include "G4RayleighScattering.hh"
35 #include "G4ComptonScattering.hh"
36 #include "G4PhotoElectricEffect.hh"
37 #include "G4OpRayleigh.hh"
38 
39 #include "G4eMultipleScattering.hh"
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"
51 #include "G4DNAChargeDecrease.hh"
52 #include "G4DNAChargeIncrease.hh"
53 
54 #include "G4LEPTSElasticModel.hh"
59 
60 #include "G4GenericIon.hh"
61 #include "G4LossTableManager.hh"
62 #include "G4UAtomicDeexcitation.hh"
63 #include "G4EmParameters.hh"
64 #include "G4PhysicsListHelper.hh"
65 #include "G4BuilderType.hh"
66 
67 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
69  : G4VPhysicsConstructor(name)
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");
118  ioni->SetEmModel( new G4LEPTSIonisationModel );
119  manager->AddDiscreteProcess( ioni );
120 
121  G4DNAExcitation* excit = new G4DNAExcitation("e-_G4LEPTSExcitation");
122  excit->SetEmModel( new G4LEPTSExcitationModel );
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");
143  ioni->SetEmModel( new G4LEPTSIonisationModel );
144  manager->AddDiscreteProcess( ioni );
145 
146  G4DNAExcitation* excit = new G4DNAExcitation("e+_G4LEPTSExcitation");
147  excit->SetEmModel( new G4LEPTSExcitationModel );
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