Back to home page

EIC code displayed by LXR

 
 

    


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

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 // Author: Sebastien Incerti
0028 //         30 October 2008
0029 //         on base of G4LowEnergyPhotoElectric developed by A.Forti and M.G.Pia
0030 //
0031 // 15 Mar 2010   L. Pandola, removed methods to set explicitly fluorescence cuts.
0032 //               Main cuts from G4ProductionCutsTable are always used
0033 // 30 May 2011   A Mantero & V Ivanchenko Migration to model design for deexcitation
0034 // 22 Oct 2012   A & V Ivanchenko Migration data structure to G4PhysicsVector
0035 // 1 June 2017   M Bandieramonte
0036 
0037 #ifndef G4LivermorePhotoElectricModel_h
0038 #define G4LivermorePhotoElectricModel_h 1
0039 
0040 #include "G4ElementData.hh"
0041 #include "G4VEmModel.hh"
0042 
0043 #include <vector>
0044 
0045 class G4ParticleChangeForGamma;
0046 class G4VAtomDeexcitation;
0047 class G4PhysicsFreeVector;
0048 
0049 class G4LivermorePhotoElectricModel : public G4VEmModel
0050 {
0051 public:
0052   explicit G4LivermorePhotoElectricModel(const G4String& nam = "LivermorePhElectric");
0053 
0054   ~G4LivermorePhotoElectricModel() override;
0055 
0056   void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0057 
0058   G4double CrossSectionPerVolume(const G4Material*, const G4ParticleDefinition*,
0059                  G4double energy, G4double cutEnergy = 0.0,
0060                  G4double maxEnergy = DBL_MAX) override;
0061 
0062   G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*, G4double energy,
0063                       G4double Z, G4double A = 0, G4double cut = 0,
0064                                       G4double emax = DBL_MAX) override;
0065 
0066   void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0067              const G4MaterialCutsCouple*, const G4DynamicParticle*,
0068              G4double tmin, G4double maxEnergy) override;
0069 
0070   void InitialiseForElement(const G4ParticleDefinition*, G4int Z) override;
0071 
0072   [[maybe_unused]] inline void SetLimitNumberOfShells(G4int n) { nShellLimit = n; };
0073   G4double GetBindingEnergy(G4int Z, G4int shell);
0074 
0075   G4LivermorePhotoElectricModel& operator=
0076   (const G4LivermorePhotoElectricModel& right) = delete;
0077   G4LivermorePhotoElectricModel(const G4LivermorePhotoElectricModel&) = delete;
0078 
0079 protected:
0080   G4ParticleChangeForGamma* fParticleChange = nullptr;
0081 
0082 private:
0083   void ReadData(const G4int Z);
0084 
0085   const G4String& FindDirectoryPath();
0086 
0087   void InitialiseOnFly(G4int Z);
0088 
0089   const G4ParticleDefinition* theGamma;
0090   const G4ParticleDefinition* theElectron;
0091   G4VAtomDeexcitation* fAtomDeexcitation{nullptr};
0092 
0093   static constexpr G4int ZMAXPE{101}; // 101 because Z range is 1-100
0094   static G4ElementData* fCrossSection;
0095   static G4ElementData* fCrossSectionLE;
0096   static std::vector<G4double>* fParamHigh[ZMAXPE];
0097   static std::vector<G4double>* fParamLow[ZMAXPE];
0098   static G4int fNShells[ZMAXPE];
0099   static G4int fNShellsUsed[ZMAXPE];
0100   static G4Material* fWater;
0101   static G4double fWaterEnergyLimit;
0102   static G4String fDataDirectory;
0103 
0104   std::vector<G4double> fSandiaCof;
0105 
0106   G4double fCurrSection{0.0};
0107   G4int verboseLevel;
0108   G4int nShellLimit{100};
0109   G4bool fDeexcitationActive{false};
0110   G4bool isInitializer{false};
0111 };
0112 
0113 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0114 
0115 #endif