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.hh, 2011/08/29 A.Valentin, M. Raine
0028 //
0029 // Based on the following publications
0030 //
0031 //          - Inelastic cross-sections of low energy electrons in silicon
0032 //      for the simulation of heavy ion tracks with theGeant4-DNA toolkit,
0033 //      NSS Conf. Record 2010, pp. 80-85
0034 //      - Geant4 physics processes for microdosimetry simulation:
0035 //      very low energy electromagnetic models for electrons in Si,
0036 //      NIM B, vol. 288, pp. 66-73, 2012.
0037 //      - Geant4 physics processes for microdosimetry simulation:
0038 //      very low energy electromagnetic models for protons and
0039 //      heavy ions in Si, NIM B, vol. 287, pp. 124-129, 2012.
0040 //
0041 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 
0042 
0043 #ifndef G4MicroElecInelasticModel_h
0044 #define G4MicroElecInelasticModel_h 1
0045 
0046 
0047 #include "globals.hh"
0048 #include "G4VEmModel.hh"
0049 #include "G4ParticleChangeForGamma.hh"
0050 #include "G4ProductionCutsTable.hh"
0051 #include "G4VAtomDeexcitation.hh"
0052 #include "G4MicroElecSiStructure.hh"
0053 
0054 class G4ParticleDefinition;
0055 class G4NistManager;
0056 class G4MicroElecCrossSectionDataSet;
0057 
0058 class G4MicroElecInelasticModel : public G4VEmModel
0059 {
0060 
0061 public:
0062 
0063   G4MicroElecInelasticModel(const G4ParticleDefinition* p = nullptr, 
0064                    const G4String& nam = "MicroElecInelasticModel");
0065   virtual ~G4MicroElecInelasticModel();
0066   
0067   void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0068 
0069   G4double CrossSectionPerVolume(  const G4Material* material,
0070                    const G4ParticleDefinition* p,
0071                    G4double ekin,
0072                    G4double emin,
0073                    G4double emax) override;
0074   void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0075              const G4MaterialCutsCouple*,
0076              const G4DynamicParticle*,
0077              G4double tmin,
0078              G4double maxEnergy) override;
0079   G4double DifferentialCrossSection(G4ParticleDefinition * aParticleDefinition, 
0080                                     G4double k, G4double energyTransfer, 
0081                                     G4int shell);
0082   G4double TransferedEnergy(G4ParticleDefinition * aParticleDefinition,
0083                             G4double incomingParticleEnergy, G4int shell, G4double random) ;
0084   
0085   inline void SelectFasterComputation(G4bool input); 
0086 
0087   G4MicroElecInelasticModel & operator=(const  G4MicroElecInelasticModel &right) = delete;
0088   G4MicroElecInelasticModel(const  G4MicroElecInelasticModel&) = delete;
0089   
0090 protected:
0091   G4ParticleChangeForGamma* fParticleChangeForGamma;
0092 
0093 private:
0094   G4double RandomizeEjectedElectronEnergy(G4ParticleDefinition * aParticleDefinition, 
0095                       G4double incomingParticleEnergy, G4int shell) ;
0096   G4double RandomizeEjectedElectronEnergyFromCumulatedDcs(G4ParticleDefinition * aParticleDefinition, 
0097                               G4double incomingParticleEnergy, G4int shell) ;
0098   G4double Interpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
0099   G4double QuadInterpolator( G4double e11, 
0100                  G4double e12, 
0101                  G4double e21, 
0102                  G4double e22, 
0103                  G4double x11,
0104                  G4double x12, 
0105                  G4double x21, 
0106                  G4double x22, 
0107                  G4double t1, 
0108                  G4double t2, 
0109                  G4double t, 
0110                  G4double e);
0111   // Partial cross section
0112   G4int RandomSelect(G4double energy,const G4String& particle );
0113 
0114   //deexcitation manager to produce fluo photns and e-
0115   G4VAtomDeexcitation*      fAtomDeexcitation;
0116   G4Material* nistSi;
0117   std::map<G4String,G4double,std::less<G4String> > lowEnergyLimit;
0118   std::map<G4String,G4double,std::less<G4String> > highEnergyLimit;
0119 
0120   // Cross section
0121   typedef std::map<G4String,G4String,std::less<G4String> > MapFile;
0122   MapFile tableFile;
0123 
0124   typedef std::map<G4String,G4MicroElecCrossSectionDataSet*,std::less<G4String> > MapData;
0125   MapData tableData;
0126   
0127   typedef std::map<G4double, std::map<G4double, G4double> > TriDimensionMap;
0128   TriDimensionMap eDiffCrossSectionData[7];
0129   TriDimensionMap eNrjTransfData[7]; // for cumulated dcs 
0130   TriDimensionMap pDiffCrossSectionData[7];
0131   TriDimensionMap pNrjTransfData[7]; // for cumulated dcs
0132   std::vector<G4double> eTdummyVec;
0133   std::vector<G4double> pTdummyVec;
0134 
0135   typedef std::map<G4double, std::vector<G4double> > VecMap;
0136   VecMap eVecm;
0137   VecMap pVecm;
0138   VecMap eProbaShellMap[7]; // for cumulated dcs
0139   VecMap pProbaShellMap[7]; // for cumulated dcs
0140   
0141   // Final state
0142   G4MicroElecSiStructure SiStructure;
0143 
0144   G4int verboseLevel;
0145   G4bool isInitialised;
0146   G4bool fasterCode;   
0147   //  
0148 };
0149 
0150 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0151 
0152 inline void G4MicroElecInelasticModel::SelectFasterComputation (G4bool input)
0153 { 
0154     fasterCode = input; 
0155 }
0156 
0157 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0158 
0159 #endif