Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:40

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 // G4MicroElecInelasticModel_new.hh, 2011/08/29 A.Valentin, M. Raine are with CEA [a]
0028 //                              2020/05/20 P. Caron, C. Inguimbert are with ONERA [b] 
0029 //                         Q. Gibaru is with CEA [a], ONERA [b] and CNES [c]
0030 //                         M. Raine and D. Lambert are with CEA [a]
0031 //
0032 // A part of this work has been funded by the French space agency(CNES[c])
0033 // [a] CEA, DAM, DIF - 91297 ARPAJON, France
0034 // [b] ONERA - DPHY, 2 avenue E.Belin, 31055 Toulouse, France
0035 // [c] CNES, 18 av.E.Belin, 31401 Toulouse CEDEX, France
0036 //
0037 // Based on the following publications
0038 //  - A.Valentin, M. Raine, 
0039 //      Inelastic cross-sections of low energy electrons in silicon
0040 //        for the simulation of heavy ion tracks with the Geant4-DNA toolkit,
0041 //        NSS Conf. Record 2010, pp. 80-85
0042 //             https://doi.org/10.1109/NSSMIC.2010.5873720
0043 //
0044 //      - A.Valentin, M. Raine, M.Gaillardin, P.Paillet
0045 //        Geant4 physics processes for microdosimetry simulation:
0046 //        very low energy electromagnetic models for electrons in Silicon,
0047 //             https://doi.org/10.1016/j.nimb.2012.06.007
0048 //        NIM B, vol. 288, pp. 66-73, 2012, part A
0049 //        heavy ions in Si, NIM B, vol. 287, pp. 124-129, 2012, part B
0050 //             https://doi.org/10.1016/j.nimb.2012.07.028
0051 //
0052 //  - M. Raine, M. Gaillardin, P. Paillet
0053 //        Geant4 physics processes for silicon microdosimetry simulation: 
0054 //        Improvements and extension of the energy-range validity up to 10 GeV/nucleon
0055 //        NIM B, vol. 325, pp. 97-100, 2014
0056 //             https://doi.org/10.1016/j.nimb.2014.01.014
0057 //
0058 //      - J. Pierron, C. Inguimbert, M. Belhaj, T. Gineste, J. Puech, M. Raine
0059 //        Electron emission yield for low energy electrons: 
0060 //        Monte Carlo simulation and experimental comparison for Al, Ag, and Si
0061 //        Journal of Applied Physics 121 (2017) 215107. 
0062 //               https://doi.org/10.1063/1.4984761
0063 //
0064 //      - P. Caron,
0065 //        Study of Electron-Induced Single-Event Upset in Integrated Memory Devices
0066 //        PHD, 16th October 2019
0067 //
0068 //  - Q.Gibaru, C.Inguimbert, P.Caron, M.Raine, D.Lambert, J.Puech, 
0069 //        Geant4 physics processes for microdosimetry and secondary electron emission simulation : 
0070 //        Extension of MicroElec to very low energies and new materials
0071 //        NIM B, 2020, in review.
0072 //
0073 //
0074 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 
0075 
0076 #ifndef G4MICROELECINELASTICMODEL_NEW_HH
0077 #define G4MICROELECINELASTICMODEL_NEW_HH 1
0078 
0079 #include "globals.hh"
0080 #include "G4VEmModel.hh"
0081 #include "G4ParticleChangeForGamma.hh"
0082 #include "G4ProductionCutsTable.hh"
0083 #include "G4MicroElecMaterialStructure.hh"
0084 #include "G4MicroElecCrossSectionDataSet_new.hh"
0085 #include "G4Electron.hh"
0086 #include "G4Proton.hh"
0087 #include "G4GenericIon.hh"
0088 #include "G4ParticleDefinition.hh"
0089 #include "G4LogLogInterpolation.hh"
0090 #include "G4VAtomDeexcitation.hh"
0091 #include "G4NistManager.hh"
0092 
0093 class G4MicroElecInelasticModel_new : public G4VEmModel
0094 {
0095 
0096 public:
0097   explicit G4MicroElecInelasticModel_new(const G4ParticleDefinition* p = nullptr,
0098                 const G4String& nam = "MicroElecInelasticModel");
0099   ~G4MicroElecInelasticModel_new() override;
0100   
0101   void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0102 
0103   G4double CrossSectionPerVolume(const G4Material* material,
0104                  const G4ParticleDefinition* p,
0105                  G4double ekin,
0106                  G4double emin,
0107                  G4double emax) override;
0108 
0109   void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0110              const G4MaterialCutsCouple*,
0111              const G4DynamicParticle*,
0112              G4double tmin,
0113              G4double maxEnergy) override;
0114 
0115   G4double DifferentialCrossSection(const G4ParticleDefinition * aParticleDefinition, 
0116                                     G4double k, G4double energyTransfer, G4int shell);
0117 
0118   G4double ComputeRelativistVelocity(G4double E, G4double mass);
0119 
0120   G4double ComputeElasticQmax(G4double T1i, G4double T2i, G4double m1, G4double m2);
0121 
0122   G4double BKZ(G4double Ep, G4double mp, G4int Zp, G4double EF);
0123   // compute the effective charge according Brandt et Kitagawa theory
0124 
0125   G4double stepFunc(G4double x);
0126   G4double vrkreussler(G4double v, G4double vF);
0127 
0128   G4MicroElecInelasticModel_new & operator=(const  G4MicroElecInelasticModel_new &right) = delete;
0129   G4MicroElecInelasticModel_new(const  G4MicroElecInelasticModel_new&) = delete;
0130 
0131 private:
0132   //
0133   // private methods
0134   //  
0135   G4int RandomSelect(G4double energy,const G4String& particle, G4double originalMass, G4int originalZ );
0136 
0137   G4double RandomizeCreatedElectronEnergy(G4double secondaryKinetic);
0138   
0139   G4double RandomizeEjectedElectronEnergy(const G4ParticleDefinition * aParticleDefinition,
0140                       G4double incomingParticleEnergy, G4int shell,
0141                       G4double originalMass, G4int originalZ) ;
0142   
0143   G4double RandomizeEjectedElectronEnergyFromCumulatedDcs(const G4ParticleDefinition*,
0144                               G4double k, G4int shell);
0145 
0146   G4double TransferedEnergy(const G4ParticleDefinition*, G4double k,
0147                 G4int ionizationLevelIndex, G4double random);
0148 
0149   G4double Interpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
0150    
0151   G4double QuadInterpolator( G4double e11, G4double e12, G4double e21, G4double e22, 
0152                  G4double x11, G4double x12, G4double x21, G4double x22, 
0153                  G4double t1,  G4double t2,  G4double t,  G4double e);
0154   //
0155   // private elements
0156   //  
0157   G4ParticleChangeForGamma* fParticleChangeForGamma = nullptr;
0158   
0159   //deexcitation manager to produce fluo photns and e-
0160   G4VAtomDeexcitation* fAtomDeexcitation = nullptr;
0161   G4Material* nistSi = nullptr;
0162   G4MicroElecMaterialStructure* currentMaterialStructure = nullptr;
0163 
0164   typedef std::map<G4String,G4String,std::less<G4String> > MapFile;
0165   typedef std::map<G4String,G4MicroElecCrossSectionDataSet_new*,std::less<G4String> > MapData;
0166   typedef std::map<G4double, std::map<G4double, G4double> > TriDimensionMap; 
0167   typedef std::map<G4double, std::vector<G4double> > VecMap;
0168 
0169   //Tables for multilayers
0170   typedef std::map<G4String, MapData*, std::less<G4String> > TCSMap;
0171   TCSMap tableTCS; //TCS tables by particle
0172   typedef std::map<G4String, std::vector<TriDimensionMap>* > dataDiffCSMap;
0173   dataDiffCSMap eDiffDatatable, pDiffDatatable; //Transfer probabilities (for slower code)
0174   dataDiffCSMap eNrjTransStorage, pNrjTransStorage; //Transfered energies and corresponding probability (faster code)
0175   typedef std::map<G4String, std::vector<VecMap>* > dataProbaShellMap;
0176   dataProbaShellMap eProbaShellStorage, pProbaShellStorage; //Cumulated Transfer probabilities (faster code)
0177   typedef std::map<G4String, std::vector<G4double>* > incidentEnergyMap;
0178   incidentEnergyMap eIncidentEnergyStorage, pIncidentEnergyStorage; //Incident energies for interpolation (faster code)
0179   typedef std::map<G4String, VecMap* > TranfEnergyMap;
0180   TranfEnergyMap eVecmStorage, pVecmStorage; //Transfered energy for interpolation (slower code)
0181   typedef std::map<G4String, G4MicroElecMaterialStructure*, std::less<G4String> > MapStructure;
0182   MapStructure tableMaterialsStructures; //Structures of all materials simulated
0183 
0184   G4String currentMaterial = "";
0185   std::map<G4String,G4double,std::less<G4String> > lowEnergyLimit;
0186   std::map<G4String,G4double,std::less<G4String> > highEnergyLimit;
0187  
0188   G4int verboseLevel;  
0189   G4bool isInitialised ;
0190   G4bool fasterCode;
0191   G4bool SEFromFermiLevel;
0192 
0193 };
0194 
0195 #endif