Back to home page

EIC code displayed by LXR

 
 

    


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

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: Luciano Pandola
0028 //
0029 // History:
0030 // -----------
0031 // 08 Jan 2010   L. Pandola   1st implementation. 
0032 // 25 May 2011   L. Pandola   Renamed (make v2008 as default Penelope)
0033 // 10 Jun 2011   L. Pandola   Migrated to the new AtomDeexcitation interface
0034 // 18 Sep 2013   L. Pandola   Migrated to the MT paradigm
0035 //
0036 // -------------------------------------------------------------------
0037 //
0038 // Class description:
0039 // Low Energy Electromagnetic Physics, Photo-electric effect
0040 // with Penelope Model, version 2008
0041 // -------------------------------------------------------------------
0042 
0043 #ifndef G4PENELOPEPHOTOELECTRICMODEL_HH
0044 #define G4PENELOPEPHOTOELECTRICMODEL_HH 1
0045 
0046 #include "globals.hh"
0047 #include "G4VEmModel.hh"
0048 #include "G4DataVector.hh"
0049 #include "G4ParticleChangeForGamma.hh"
0050 #include "G4AtomicTransitionManager.hh"
0051 #include "G4VAtomDeexcitation.hh"
0052 
0053 class G4ParticleDefinition;
0054 class G4DynamicParticle;
0055 class G4MaterialCutsCouple;
0056 class G4Material;
0057 
0058 class G4PenelopePhotoElectricModel : public G4VEmModel 
0059 {
0060 public:
0061   explicit G4PenelopePhotoElectricModel(const G4ParticleDefinition* p=nullptr,
0062                     const G4String& processName ="PenPhotoElec");
0063   virtual ~G4PenelopePhotoElectricModel();
0064 
0065   void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0066   void InitialiseLocal(const G4ParticleDefinition*,
0067                                G4VEmModel *masterModel) override;
0068 
0069   G4double ComputeCrossSectionPerAtom(
0070                       const G4ParticleDefinition*,
0071                       G4double kinEnergy,
0072                       G4double Z,
0073                       G4double A=0,
0074                       G4double cut=0,
0075                       G4double emax=DBL_MAX) override;
0076 
0077   void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0078              const G4MaterialCutsCouple*,
0079              const G4DynamicParticle*,
0080              G4double tmin,
0081              G4double maxEnergy) override;
0082 
0083   void SetVerbosityLevel(G4int lev){fVerboseLevel = lev;};
0084   G4int GetVerbosityLevel(){return fVerboseLevel;};
0085 
0086   //testing purposes
0087   std::size_t GetNumberOfShellXS(G4int);
0088   G4double GetShellCrossSection(G4int Z,std::size_t shellID,G4double energy);
0089 
0090   G4PenelopePhotoElectricModel & operator=(const G4PenelopePhotoElectricModel &right) = delete;
0091   G4PenelopePhotoElectricModel(const G4PenelopePhotoElectricModel&) = delete;
0092 
0093 protected:
0094   G4ParticleChangeForGamma* fParticleChange;
0095   const G4ParticleDefinition* fParticle;
0096 
0097 private:
0098   void SetParticle(const G4ParticleDefinition*);
0099   G4double SampleElectronDirection(G4double energy);
0100   void ReadDataFile(G4int Z);
0101   std::size_t SelectRandomShell(G4int Z,G4double energy);
0102   G4String WriteTargetShell(std::size_t shellID);
0103 
0104   //For each Z, the PhysicsTable contains nShell+1 physics vectors
0105   //with log(E) vs. log(XS)
0106   //Element [0] of the table is the total XS, element [iS] is the 
0107   //partial cross section for shell iS-1
0108   static const G4int fMaxZ =99;
0109   static G4PhysicsTable* fLogAtomicShellXS[fMaxZ+1];
0110 
0111   G4VAtomDeexcitation*             fAtomDeexcitation;
0112   const G4AtomicTransitionManager* fTransitionManager;
0113 
0114   //Intrinsic energy limits of the model: cannot be extended by the parent process
0115   G4double fIntrinsicLowEnergyLimit;
0116   G4double fIntrinsicHighEnergyLimit;
0117   G4int fVerboseLevel;
0118   G4bool fIsInitialised; 
0119   //Used only for G4EmCalculator and Unit Tests
0120   G4bool fLocalTable;
0121 };
0122 
0123 #endif
0124