Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-02 09:04:59

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   [[maybe_unused]] inline void SetLimitNumberOfShells(G4int n) { nShellLimit = n; };
0071   G4double GetBindingEnergy(G4int Z, G4int shell);
0072 
0073   G4LivermorePhotoElectricModel& operator=
0074   (const G4LivermorePhotoElectricModel& right) = delete;
0075   G4LivermorePhotoElectricModel(const G4LivermorePhotoElectricModel&) = delete;
0076 
0077 protected:
0078   G4ParticleChangeForGamma* fParticleChange = nullptr;
0079 
0080 private:
0081   void ReadData(const G4int Z);
0082 
0083   void FindDirectoryPath();
0084 
0085   void InitialiseOnFly(G4int Z);
0086 
0087   const G4ParticleDefinition* theGamma;
0088   const G4ParticleDefinition* theElectron;
0089   G4VAtomDeexcitation* fAtomDeexcitation{nullptr};
0090 
0091   static constexpr G4int ZMAXPE{101}; // 101 because Z range is 1-100
0092   static G4ElementData* fCrossSection;
0093   static G4ElementData* fCrossSectionLE;
0094   static std::vector<G4double>* fParamHigh[ZMAXPE];
0095   static std::vector<G4double>* fParamLow[ZMAXPE];
0096   static G4int fNShells[ZMAXPE];
0097   static G4int fNShellsUsed[ZMAXPE];
0098   static G4Material* fWater;
0099   static G4double fWaterEnergyLimit;
0100   static G4String fDataDirectory;
0101 
0102   std::vector<G4double> fSandiaCof;
0103 
0104   G4double fCurrSection{0.0};
0105   G4int verboseLevel;
0106   G4int nShellLimit{100};
0107   G4bool fDeexcitationActive{false};
0108   G4bool isInitializer{false};
0109 };
0110 
0111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0112 
0113 #endif