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[ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

  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 // -------------------------------------------------------------------
 27 // -------------------------------------------------------------------
 28 
 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 30 
 31 #include "MicroElecSiPhysics.hh"
 32 #include "G4SystemOfUnits.hh"
 33 
 34 // Geant4-MicroElec MODELS
 35 
 36 #include "G4MicroElecElastic.hh"
 37 #include "G4MicroElecElasticModel.hh"
 38 
 39 #include "G4MicroElecInelastic.hh"
 40 #include "G4MicroElecInelasticModel.hh"
 41 //
 42 
 43 #include "G4LossTableManager.hh"
 44 #include "G4EmConfigurator.hh"
 45 #include "G4VEmModel.hh"
 46 #include "G4DummyModel.hh"
 47 #include "G4eIonisation.hh"
 48 #include "G4hIonisation.hh"
 49 #include "G4ionIonisation.hh"
 50 #include "G4eMultipleScattering.hh"
 51 #include "G4hMultipleScattering.hh"
 52 #include "G4BraggModel.hh"
 53 #include "G4BraggIonModel.hh"
 54 #include "G4BetheBlochModel.hh"
 55 #include "G4UrbanMscModel.hh"
 56 #include "G4MollerBhabhaModel.hh"
 57 #include "G4IonFluctuations.hh"
 58 #include "G4UniversalFluctuation.hh"
 59 
 60 #include "ElectronCapture.hh"
 61 
 62 #include "G4UAtomicDeexcitation.hh"
 63 
 64 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 65 
 66 MicroElecSiPhysics::MicroElecSiPhysics():  G4VUserPhysicsList()
 67 {
 68   defaultCutValue = 1*micrometer;
 69   cutForGamma     = defaultCutValue;
 70   cutForElectron  = defaultCutValue;
 71   cutForPositron  = defaultCutValue;
 72   cutForProton    = defaultCutValue;
 73   
 74   SetVerboseLevel(1);
 75 }
 76 
 77 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 78 
 79 MicroElecSiPhysics::~MicroElecSiPhysics()
 80 {}
 81 
 82 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 83 
 84 void MicroElecSiPhysics::ConstructParticle()
 85 {
 86   ConstructBosons();
 87   ConstructLeptons();
 88   ConstructBarions();
 89 }
 90 
 91 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 92 
 93 void MicroElecSiPhysics::ConstructBosons()
 94 { 
 95   // gamma
 96   G4Gamma::GammaDefinition();
 97 }
 98  //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 99 
100 void MicroElecSiPhysics::ConstructLeptons()
101 {
102   // leptons
103   G4Electron::ElectronDefinition();
104   G4Positron::PositronDefinition();
105 }
106 
107 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
108 
109 void MicroElecSiPhysics::ConstructBarions()
110 {
111   //  baryons
112   G4Proton::ProtonDefinition();
113   G4GenericIon::GenericIonDefinition();
114 }
115 
116 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
117 
118 void MicroElecSiPhysics::ConstructProcess()
119 {
120   AddTransportation();
121   ConstructEM();
122   ConstructGeneral();
123 }
124 
125 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
126 
127 void MicroElecSiPhysics::ConstructEM()
128 {
129 
130   auto particleIterator=GetParticleIterator();
131   particleIterator->reset();
132   
133   while( (*particleIterator)() )
134   {
135 
136     G4ParticleDefinition* particle = particleIterator->value();
137     G4ProcessManager* pmanager = particle->GetProcessManager();
138     G4String particleName = particle->GetParticleName();
139 
140     // *********************************
141     // 1) Processes for the World region
142     // *********************************
143 
144     if (particleName == "e-") {
145 
146       // STANDARD msc is active in the world
147       G4eMultipleScattering* msc = new G4eMultipleScattering();
148       msc->AddEmModel(1, new G4UrbanMscModel());
149       pmanager->AddProcess(msc, -1, 1, -1);
150 
151       // STANDARD ionisation is active in the world
152       G4eIonisation* eion = new G4eIonisation();
153       pmanager->AddProcess(eion, -1, 2, 2);
154 
155       // MicroElec elastic is not active in the world 
156       G4MicroElecElastic* theMicroElecElasticProcess = new G4MicroElecElastic("e-_G4MicroElecElastic");
157       theMicroElecElasticProcess->SetEmModel(new G4DummyModel());
158       pmanager->AddDiscreteProcess(theMicroElecElasticProcess);
159 
160       // MicroElec ionisation is not active in the world 
161       G4MicroElecInelastic* microelecioni = new G4MicroElecInelastic("e-_G4MicroElecInelastic");
162       microelecioni->SetEmModel(new G4DummyModel()); 
163       pmanager->AddDiscreteProcess(microelecioni);
164 
165       // THE FOLLOWING PROCESS WILL KILL ALL ELECTRONS BELOW A SELECTED ENERY THRESHOLD
166       // Capture of low-energy e-
167       ElectronCapture* ecap = new ElectronCapture("Target", 16.7*eV);
168       pmanager->AddDiscreteProcess(ecap);
169           
170     } else if ( particleName == "proton" ) {
171 
172       // STANDARD msc is active in the world 
173       G4hMultipleScattering* msc = new G4hMultipleScattering();
174       msc->AddEmModel(1, new G4UrbanMscModel());
175       pmanager->AddProcess(msc, -1, 1, -1);
176 
177       // STANDARD ionisation is active in the world 
178       G4hIonisation* hion = new G4hIonisation();
179       pmanager->AddProcess(hion, -1, 2, 2);
180 
181       // MicroElec ionisation is not active in the world 
182       G4MicroElecInelastic* microelecioni = new G4MicroElecInelastic("p_G4MicroElecInelastic");
183       microelecioni->SetEmModel(new G4DummyModel()); 
184       microelecioni->SetEmModel(new G4DummyModel()); 
185       pmanager->AddDiscreteProcess(microelecioni);
186 
187     } else if (particleName == "GenericIon") { 
188 
189       // STANDARD msc is active in the world 
190       G4hMultipleScattering* msc = new G4hMultipleScattering();
191       msc->AddEmModel(1, new G4UrbanMscModel());
192       pmanager->AddProcess(new G4hMultipleScattering, -1, 1, -1);
193 
194       // STANDARD ionisation is active in the world 
195       G4ionIonisation* hion = new G4ionIonisation();
196       pmanager->AddProcess(hion, -1, 2, 2);
197 
198       // MicroElec ionisation is not active in the world 
199       G4MicroElecInelastic* microelecioni = new G4MicroElecInelastic("ion_G4MicroElecInelastic");
200       microelecioni->SetEmModel(new G4DummyModel()); 
201       microelecioni->SetEmModel(new G4DummyModel());
202       pmanager->AddDiscreteProcess(microelecioni);
203     } 
204   }
205 
206   // **************************************
207   // 2) Define processes for Target region 
208   // **************************************
209 
210   // STANDARD EM processes should be inactivated when corresponding MicroElec processes are used
211   // - STANDARD EM e- processes are inactivated below 100 MeV
212   // - STANDARD EM proton & ion processes are inactivated below standEnergyLimit
213   //
214   G4EmConfigurator* em_config = G4LossTableManager::Instance()->EmConfigurator();
215 
216   G4VEmModel* mod;
217   // *** e-
218 
219   // ---> STANDARD EM processes are inactivated below 100 MeV
220   
221   G4UrbanMscModel* msc =  new G4UrbanMscModel();
222   msc->SetActivationLowEnergyLimit(100*MeV);
223   em_config->SetExtraEmModel("e-","msc",msc,"Target");
224   
225   mod = new G4MollerBhabhaModel();
226   mod->SetActivationLowEnergyLimit(100*MeV);
227   em_config->SetExtraEmModel("e-","eIoni",mod,"Target",0.0,10*TeV, new G4UniversalFluctuation());
228 
229   // ---> MicroElec processes activated
230 
231   mod = new G4MicroElecElasticModel();
232   em_config->SetExtraEmModel("e-","e-_G4MicroElecElastic",mod,"Target",0.0,100*MeV);
233   
234   mod = new G4MicroElecInelasticModel();
235   em_config->SetExtraEmModel("e-","e-_G4MicroElecInelastic",mod,"Target",16.7*eV,100*MeV);
236 
237   // *** proton
238   
239   // ---> STANDARD EM processes inactivated below standEnergyLimit
240 
241   // STANDARD msc is still active
242   // Inactivate following STANDARD processes 
243     
244   mod = new G4BraggModel();
245   mod->SetActivationHighEnergyLimit(50*keV);
246   em_config->SetExtraEmModel("proton","hIoni",mod,"Target",0.0,2*MeV, new G4IonFluctuations());
247     
248   mod = new G4BetheBlochModel();
249   mod->SetActivationLowEnergyLimit(10*GeV);
250   em_config->SetExtraEmModel("proton","hIoni",mod,"Target",2*MeV,10*TeV, new G4IonFluctuations());
251            
252   // ---> MicroElec processes activated  
253   mod = new G4MicroElecInelasticModel(); 
254   mod->SetActivationLowEnergyLimit(50*keV);
255   em_config->SetExtraEmModel("proton","p_G4MicroElecInelastic",mod,"Target",0.0,10*GeV);
256   em_config->SetExtraEmModel("proton","p_G4MicroElecInelastic",new G4DummyModel,
257            "Target",10*GeV,10*TeV);
258 
259  // *** ion
260 
261   // ---> STANDARD EM processes inactivated below standEnergyLimit
262 
263   // STANDARD msc is still active
264   // Inactivate following STANDARD processes 
265 
266   mod = new G4BraggIonModel();
267   mod->SetActivationHighEnergyLimit(50*keV);
268   em_config->SetExtraEmModel("GenericIon","ionIoni",mod,"Target",0.0,2*MeV, new G4IonFluctuations());
269  
270   mod = new G4BetheBlochModel();
271   mod->SetActivationLowEnergyLimit(10*GeV);
272   em_config->SetExtraEmModel("GenericIon","ionIoni",mod,"Target",2*MeV,10*TeV, new G4IonFluctuations());
273    
274   // ---> MicroElec processes activated
275   mod = new G4MicroElecInelasticModel(); 
276   mod->SetActivationLowEnergyLimit(50*keV);
277   em_config->SetExtraEmModel("GenericIon","ion_G4MicroElecInelastic",mod,
278            "Target",0.0,10*GeV);
279   em_config->SetExtraEmModel("GenericIon","ion_G4MicroElecInelastic",new G4DummyModel,
280            "Target",10*GeV,10*TeV);
281 
282   // Deexcitation
283   //
284   G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
285   G4LossTableManager::Instance()->SetAtomDeexcitation(de);
286   de->SetFluo(true);
287   de->SetAuger(true);   
288   de->SetPIXE(true);  
289   de->InitialiseForNewRun();
290 
291 
292 }
293 
294 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
295 
296 void MicroElecSiPhysics::ConstructGeneral()
297 { }
298 
299 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
300 
301 void MicroElecSiPhysics::SetCuts()
302 {
303   if (verboseLevel >0)
304   {
305     G4cout << "MicroElecSiPhysics::SetCuts:";
306     G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
307   }  
308   
309   // set cut values for gamma at first and for e- second and next for e+,
310   // because some processes for e+/e- need cut values for gamma 
311   SetCutValue(cutForGamma, "gamma");
312   SetCutValue(cutForElectron, "e-");
313   SetCutValue(cutForPositron, "e+");
314   SetCutValue(cutForProton, "proton");
315   
316   if (verboseLevel>0) { DumpCutValuesTable(); }
317 }
318