Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-17 07:51:43

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 // -------------------------------------------------------------------
0027 // -------------------------------------------------------------------
0028 
0029 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0030 
0031 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0032 
0033 #include "MicroElecPhysics.hh"
0034 #include "G4SystemOfUnits.hh"
0035 
0036 
0037 // Geant4-MicroElec MODELS
0038 
0039 #include "G4MicroElecElastic.hh"
0040 #include "G4MicroElecElasticModel_new.hh"
0041 
0042 #include "G4MicroElecInelastic.hh"
0043 #include "G4MicroElecInelasticModel_new.hh"
0044 
0045 #include "G4MicroElecLOPhononScattering.hh"
0046 #include "G4MicroElecLOPhononModel.hh"
0047 #include "G4MicroElecSurface.hh"
0048 
0049 //
0050 
0051 #include "G4LossTableManager.hh"
0052 #include "G4EmConfigurator.hh"
0053 #include "G4VEmModel.hh"
0054 #include "G4DummyModel.hh"
0055 #include "G4eIonisation.hh"
0056 #include "G4hIonisation.hh"
0057 #include "G4ionIonisation.hh"
0058 #include "G4eMultipleScattering.hh"
0059 #include "G4hMultipleScattering.hh"
0060 #include "G4BraggModel.hh"
0061 #include "G4BraggIonModel.hh"
0062 #include "G4BetheBlochModel.hh"
0063 #include "G4UrbanMscModel.hh"
0064 #include "G4MollerBhabhaModel.hh"
0065 #include "G4IonFluctuations.hh"
0066 #include "G4UniversalFluctuation.hh"
0067 
0068 #include "G4MicroElecCapture.hh"
0069 
0070 #include "G4UAtomicDeexcitation.hh"
0071 
0072 
0073 
0074 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0075 
0076 MicroElecPhysics::MicroElecPhysics():  G4VUserPhysicsList()
0077 {
0078   defaultCutValue = 1*micrometer;
0079   cutForGamma     = defaultCutValue;
0080   cutForElectron  = defaultCutValue;
0081   cutForPositron  = defaultCutValue;
0082   cutForProton    = defaultCutValue;
0083   
0084   SetVerboseLevel(1);
0085 }
0086 
0087 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0088 
0089 MicroElecPhysics::~MicroElecPhysics()
0090 {}
0091 
0092 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0093 
0094 void MicroElecPhysics::ConstructParticle()
0095 {
0096   ConstructBosons();
0097   ConstructLeptons();
0098   ConstructBarions();
0099 }
0100 
0101 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0102 
0103 void MicroElecPhysics::ConstructBosons()
0104 { 
0105   // gamma
0106   G4Gamma::GammaDefinition();
0107 }
0108  //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0109 
0110 void MicroElecPhysics::ConstructLeptons()
0111 {
0112   // leptons
0113   G4Electron::ElectronDefinition();
0114   G4Positron::PositronDefinition();
0115 }
0116 
0117 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0118 
0119 void MicroElecPhysics::ConstructBarions()
0120 {
0121   //  baryons
0122   G4Proton::ProtonDefinition();
0123   G4GenericIon::GenericIonDefinition();
0124 }
0125 
0126 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0127 
0128 void MicroElecPhysics::ConstructProcess()
0129 {
0130   AddTransportation();
0131   ConstructEM();
0132   ConstructGeneral();
0133 }
0134 
0135 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0136 
0137 
0138 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0139 
0140 void MicroElecPhysics::ConstructEM()
0141 {
0142 
0143   G4EmParameters* param = G4EmParameters::Instance();
0144   param->SetBuildCSDARange(true);
0145   param->SetMscStepLimitType(fUseSafety);
0146   param->RegionsMicroElec();
0147   // physicList ISS
0148   param->SetDefaults();
0149   param->SetMinEnergy(0.1*eV);
0150   param->SetMaxEnergy(10 * TeV);
0151   param->SetLowestElectronEnergy(0 * eV); //<--- Energy cut in the vacuum!!! =0eV to get right SEY
0152   param->SetNumberOfBinsPerDecade(20);
0153   param->ActivateAngularGeneratorForIonisation(true);
0154   param->SetAugerCascade(true);//*/
0155   
0156   auto particleIterator=GetParticleIterator();
0157   particleIterator->reset();
0158   
0159   while( (*particleIterator)() )
0160   {
0161 
0162     G4ParticleDefinition* particle = particleIterator->value();
0163     G4ProcessManager* pmanager = particle->GetProcessManager();
0164     G4String particleName = particle->GetParticleName();
0165 
0166     // *********************************
0167     // 1) Processes for the World region
0168     // *********************************
0169 
0170     if (particleName == "e-") {
0171 
0172       // STANDARD msc is active in the world
0173       G4eMultipleScattering* msc = new G4eMultipleScattering();
0174       msc->AddEmModel(1, new G4UrbanMscModel());
0175       pmanager->AddProcess(msc, -1, 1, -1);
0176 
0177       // STANDARD ionisation is active in the world
0178       G4eIonisation* eion = new G4eIonisation();
0179       pmanager->AddProcess(eion, -1, 2, 2);
0180 
0181       // MicroElec elastic is not active in the world 
0182       G4MicroElecElastic* theMicroElecElasticProcess = new G4MicroElecElastic("e-_G4MicroElecElastic");
0183       theMicroElecElasticProcess->SetEmModel(new G4DummyModel(),1);
0184       pmanager->AddDiscreteProcess(theMicroElecElasticProcess);
0185                 
0186       // MicroElec ionisation is not active in the world 
0187       G4MicroElecInelastic* microelecioni = new G4MicroElecInelastic("e-_G4Dielectrics");
0188       microelecioni->SetEmModel(new G4DummyModel(),1); 
0189       pmanager->AddDiscreteProcess(microelecioni);
0190       
0191       //Phonons for SiO2, AL2O3, BN
0192       G4MicroElecLOPhononScattering* opticalPhonon = new G4MicroElecLOPhononScattering("e-_G4LOPhononScattering");
0193       opticalPhonon->SetEmModel(new G4DummyModel(), 1);
0194       pmanager->AddDiscreteProcess(opticalPhonon);
0195 
0196 
0197       G4MicroElecSurface* MicroElecSurf = new G4MicroElecSurface("e-_G4MicroElecSurface");
0198       MicroElecSurf->SetProcessManager(pmanager);
0199       pmanager->AddDiscreteProcess(MicroElecSurf);//*/
0200 
0201       // Modified for capture in Al2O3 and SiO2 (Polaronic trapping effect)
0202       G4MicroElecCapture* ecap = new G4MicroElecCapture("Target",0.9*eV); 
0203       pmanager->AddDiscreteProcess(ecap);//*/
0204             
0205     } else if ( particleName == "proton" ) {
0206         
0207       // multiple scatering for protons
0208       G4hMultipleScattering* msc = new G4hMultipleScattering();
0209       pmanager->AddProcess(msc, -1, 1, 1); 
0210 
0211       // STANDARD ionisation is active in the world 
0212       G4hIonisation* hion = new G4hIonisation();
0213       pmanager->AddProcess(hion, -1, 2, 2);
0214 
0215     } else if(particleName == "alpha") {
0216         
0217       // multiple scatering for protons
0218       G4hMultipleScattering* msc = new G4hMultipleScattering();
0219       pmanager->AddProcess(msc, -1, 1, 1); 
0220 
0221       // STANDARD ionisation is active in the world
0222       G4ionIonisation* hion = new G4ionIonisation();
0223       pmanager->AddProcess(hion, -1, 2, 2);
0224       
0225     } else if (particleName == "GenericIon") {
0226 
0227       // multiple scatering for protons
0228       G4hMultipleScattering* msc = new G4hMultipleScattering();
0229       pmanager->AddProcess(msc, -1, 1, 1); 
0230       
0231       // STANDARD ionisation is active in the world 
0232       G4ionIonisation* hion = new G4ionIonisation();
0233       pmanager->AddProcess(hion, -1, 2, 2);
0234 
0235     } 
0236   }
0237 
0238   // **************************************
0239   // 2) Define processes for Target region 
0240   // **************************************
0241 
0242   // STANDARD EM processes should be inactivated when corresponding MicroElec processes are used
0243   // - STANDARD EM e- processes are inactivated below 100 MeV
0244   // - STANDARD EM proton & ion processes are inactivated below standEnergyLimit
0245   //
0246   G4EmConfigurator* em_config = G4LossTableManager::Instance()->EmConfigurator();
0247 
0248   G4VEmModel* mod;
0249   
0250   // *** e- ---------------------------------------------------------- 
0251   // ---> STANDARD EM processes are inactivated below 100 MeV
0252   G4UrbanMscModel* msc =  new G4UrbanMscModel();
0253   msc->SetActivationLowEnergyLimit(100*MeV);
0254   em_config->SetExtraEmModel("e-","msc",msc,"Target");
0255   
0256   mod = new G4MollerBhabhaModel();
0257   mod->SetActivationLowEnergyLimit(10*MeV);
0258   em_config->SetExtraEmModel("e-","eIoni",mod,"Target",0.0,10*TeV, new G4UniversalFluctuation());
0259   
0260   // ---> MicroElec processes activated
0261   mod = new G4MicroElecElasticModel_new();
0262   em_config->SetExtraEmModel("e-","e-_G4MicroElecElastic",mod,"Target",0.1*eV,100*MeV);
0263  
0264   mod = new G4MicroElecInelasticModel_new();
0265   em_config->SetExtraEmModel("e-","e-_G4Dielectrics",mod,"Target",0.1*eV,10*MeV);
0266 
0267   //Phonons LO pour sio2,  al2o3 and BN
0268   mod = new G4MicroElecLOPhononModel();
0269   em_config->SetExtraEmModel("e-", "e-_G4LOPhononScattering", mod, "Target", 0.1 * eV, 10 * MeV);//*/
0270 
0271   // *** proton ---------------------------------------------------------- 
0272   mod = new G4BetheBlochModel();
0273   mod->SetActivationLowEnergyLimit(10*MeV);
0274   em_config->SetExtraEmModel("proton","hIoni",mod,"Target",2*MeV,10*TeV, new G4IonFluctuations());
0275                  
0276   // ---> Dielectric processes activated
0277   mod = new G4MicroElecInelasticModel_new();
0278   mod->SetActivationLowEnergyLimit(100*eV);
0279   em_config->SetExtraEmModel("proton","p_G4Dielectrics",mod,"Target",100*eV,10*MeV);
0280 
0281   // *** alpha ----------------------------------------------------------
0282   mod = new G4BetheBlochModel();
0283   mod->SetActivationLowEnergyLimit(10*MeV);
0284   em_config->SetExtraEmModel("alpha","ionIoni",mod,"Target",10*MeV,10*TeV, new G4IonFluctuations());
0285 
0286   // *** ion ----------------------------------------------------------
0287   // ---> STANDARD EM processes inactivated below standEnergyLimit
0288 
0289   mod = new G4BetheBlochModel();
0290   mod->SetActivationLowEnergyLimit(10*MeV);
0291   em_config->SetExtraEmModel("GenericIon","ionIoni",mod,"Target",10*MeV,10*TeV, new G4IonFluctuations());
0292    
0293   // ---> Dielectric processes activated
0294   mod = new G4MicroElecInelasticModel_new();
0295   mod->SetActivationLowEnergyLimit(100*eV);
0296   em_config->SetExtraEmModel("GenericIon","ion_G4Dielectrics",mod,"Target",0.0,10*MeV);
0297 
0298   // Deexcitation
0299   G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
0300   G4LossTableManager::Instance()->SetAtomDeexcitation(de);
0301   de->SetFluo(true);
0302   de->SetAuger(true);   
0303   de->SetPIXE(true);  
0304   de->InitialiseForNewRun();
0305   
0306 }
0307 
0308 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0309 
0310 void MicroElecPhysics::ConstructGeneral()
0311 { }
0312 
0313 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0314