Back to home page

EIC code displayed by LXR

 
 

    


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

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 // Created on 2016/01/18
0027 //
0028 // Authors: D. Sakata, S. Incerti
0029 //
0030 // Based on a recent release of the ELSEPA code 
0031 // developed and provided kindly by F. Salvat et al. 
0032 // See
0033 // Computer Physics Communications, 165(2), 157-190. (2005)
0034 // http://dx.doi.org/10.1016/j.cpc.2004.09.006
0035 //
0036 
0037 #ifndef G4DNAELSEPAElasticModel_h
0038 #define G4DNAELSEPAElasticModel_h 1
0039 
0040 #include <map>
0041 #include "G4DNACrossSectionDataSet.hh"
0042 #include "G4VEmModel.hh"
0043 #include "G4Electron.hh"
0044 #include "G4ParticleChangeForGamma.hh"
0045 #include "G4LogLogInterpolation.hh"
0046 #include "G4ProductionCutsTable.hh"
0047 #include "G4NistManager.hh"
0048 
0049 class G4DNAELSEPAElasticModel : public G4VEmModel
0050 {
0051 
0052 public:
0053 
0054   G4DNAELSEPAElasticModel(const G4ParticleDefinition* particle = nullptr,
0055                           const G4String& nam = "DNAELSEPAElasticModel");
0056 
0057   ~G4DNAELSEPAElasticModel() override;
0058 
0059   G4DNAELSEPAElasticModel & operator=(const G4DNAELSEPAElasticModel &right) = delete;
0060   G4DNAELSEPAElasticModel(const G4DNAELSEPAElasticModel&) = delete;
0061 
0062   void Initialise(
0063                    const G4ParticleDefinition* particle, const G4DataVector&) override;
0064 
0065   G4double CrossSectionPerVolume(const G4Material* material,
0066                                          const G4ParticleDefinition* particle,
0067                                          G4double ekin,
0068                                          G4double emin,
0069                                          G4double emax) override;
0070 
0071   void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0072                                  const G4MaterialCutsCouple*,
0073                                  const G4DynamicParticle*,
0074                                  G4double tmin,
0075                                  G4double maxEnergy) override;
0076 
0077   void SetMaximumEnergy (G4double input)
0078                    {fhighEnergyLimit = input; SetHighEnergyLimit(input);};
0079   
0080   void     SetKillBelowThreshold (G4double threshold);
0081   
0082   G4double GetKillBelowThreshold() {return fkillBelowEnergy_Au;}
0083 
0084 protected:
0085 
0086   G4ParticleChangeForGamma* fParticleChangeForGamma;
0087 
0088 private:
0089  
0090   const std::vector<G4double>* fpMolDensity=nullptr;
0091   std::vector <G4double> kIntersectionEnergySR;
0092 
0093   G4double fkillBelowEnergy_Au=0.;
0094   G4double flowEnergyLimit=0.;
0095   G4double fhighEnergyLimit=0.;
0096   
0097   G4bool isInitialised=false;
0098   G4int verboseLevel=0;
0099 
0100   G4DNACrossSectionDataSet* fpData_Au=nullptr;
0101   G4DNACrossSectionDataSet* fpData_H2O=nullptr;
0102 
0103   G4double Theta(G4int Z, G4ParticleDefinition * aParticleDefinition,
0104                  G4double k,
0105                  G4double integrDiff);
0106 
0107   G4double LinLinInterpolate(G4double e1,
0108                              G4double e2,
0109                              G4double e,
0110                              G4double xs1,
0111                              G4double xs2);
0112 
0113   G4double LinLogInterpolate(G4double e1,
0114                              G4double e2,
0115                              G4double e,
0116                              G4double xs1,
0117                              G4double xs2);
0118 
0119   G4double LogLinInterpolate(G4double e1,
0120                              G4double e2,
0121                              G4double e,
0122                              G4double xs1,
0123                              G4double xs2);
0124 
0125   G4double LogLogInterpolate(G4double e1,
0126                              G4double e2,
0127                              G4double e,
0128                              G4double xs1,
0129                              G4double xs2);
0130 
0131   G4double QuadInterpolator(G4double e11,
0132                             G4double e12,
0133                             G4double e21,
0134                             G4double e22,
0135                             G4double x11,
0136                             G4double x12,
0137                             G4double x21,
0138                             G4double x22,
0139                             G4double t1,
0140                             G4double t2,
0141                             G4double t,
0142                             G4double e);
0143 
0144   G4double RandomizeCosTheta(G4int Z, G4double k);
0145 
0146   using TriDimensionMapZ = std::map<G4int, std::map<G4double, std::map<G4double, G4double>>>;
0147   TriDimensionMapZ fAngleDataZ;
0148 
0149   std::map <G4int, std::vector<G4double> > eEdummyVecZ;
0150 
0151   using VecMap = std::map<G4double, std::vector<G4double>>;
0152   VecMap eCum_Au;
0153   VecMap eCum_H2O;
0154 
0155   using TriDimensionMap = std::map<G4double, std::map<G4double, G4double>>;
0156   TriDimensionMap fAngleData_Au;
0157   TriDimensionMap fAngleData_H2O;
0158 
0159   std::vector<G4double> eEdummyVec_Au;
0160   std::vector<G4double> eEdummyVec_H2O;
0161 
0162 };
0163 
0164 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0165 
0166 #endif