Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/Geant4/G4PenelopeGammaConversionModel.hh was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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 // 13 Jan 2010   L. Pandola  First implementation
0032 // 24 May 2011   L. Pandola  Renamed (make v2008 as default Penelope)
0033 // 18 Sep 2013   L. Pandola  Migration to MT paradigm
0034 // 04 Mar 2021   L. Pandola  Replace map with static array
0035 //
0036 // -------------------------------------------------------------------
0037 //
0038 // Class description:
0039 // Low Energy Electromagnetic Physics, Gamma Conversion 
0040 // with Penelope Model, version 2008
0041 // -------------------------------------------------------------------
0042 
0043 #ifndef G4PENELOPEGAMMACONVERSIONMODEL_HH
0044 #define G4PENELOPEGAMMACONVERSIONMODEL_HH 1
0045 
0046 #include "globals.hh"
0047 #include "G4VEmModel.hh"
0048 #include "G4DataVector.hh"
0049 #include "G4ParticleChangeForGamma.hh"
0050 
0051 class G4ParticleDefinition;
0052 class G4DynamicParticle;
0053 class G4MaterialCutsCouple;
0054 class G4Material;
0055 class G4PhysicsFreeVector;
0056 
0057 class G4PenelopeGammaConversionModel : public G4VEmModel 
0058 {
0059 public:
0060   explicit G4PenelopeGammaConversionModel(const G4ParticleDefinition* p=nullptr,
0061                       const G4String& processName ="PenConversion");
0062   
0063   virtual ~G4PenelopeGammaConversionModel();
0064 
0065   void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0066   void InitialiseLocal(const G4ParticleDefinition*, G4VEmModel*) override; 
0067   G4double ComputeCrossSectionPerAtom(
0068                       const G4ParticleDefinition*,
0069                       G4double kinEnergy,
0070                       G4double Z,
0071                       G4double A=0,
0072                       G4double cut=0,
0073                       G4double emax=DBL_MAX) override;
0074 
0075   void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0076              const G4MaterialCutsCouple*,
0077              const G4DynamicParticle*,
0078              G4double tmin,
0079              G4double maxEnergy) override;
0080   
0081   void SetVerbosityLevel(G4int lev){fVerboseLevel = lev;};
0082   G4int GetVerbosityLevel(){return fVerboseLevel;};
0083 
0084   G4PenelopeGammaConversionModel & operator=(const 
0085                          G4PenelopeGammaConversionModel &right) = delete;
0086   G4PenelopeGammaConversionModel(const G4PenelopeGammaConversionModel&) = delete;
0087 
0088 protected:
0089   G4ParticleChangeForGamma* fParticleChange;
0090   const G4ParticleDefinition* fParticle;
0091 
0092 private:
0093   void SetParticle(const G4ParticleDefinition*);
0094   void ReadDataFile(const G4int Z);
0095   void InitializeScreeningFunctions(const G4Material*);
0096   std::pair<G4double,G4double> GetScreeningFunctions(G4double); 
0097 
0098   //Effective (scalar) properties attached to materials:
0099   // effective charge
0100   std::map<const G4Material*,G4double> *fEffectiveCharge;
0101   // 2/Rs (Rs = screening radius), BCB array in Penelope
0102   std::map<const G4Material*,G4double> *fMaterialInvScreeningRadius;
0103   // Parameters of screening functions
0104   std::map<const G4Material*,std::pair<G4double,G4double> > *fScreeningFunction;
0105 
0106   static const G4int fMaxZ =99;
0107   static G4PhysicsFreeVector* fLogAtomicCrossSection[fMaxZ+1];
0108   //Z range is 1-99
0109   static G4double fAtomicScreeningRadius[fMaxZ+1];
0110 
0111   //Intrinsic energy limits of the model: cannot be extended by the parent process
0112   G4double fIntrinsicLowEnergyLimit;
0113   G4double fIntrinsicHighEnergyLimit;
0114 
0115   //Use a quicker sampling algorithm if E < smallEnergy
0116   G4double fSmallEnergy;  
0117   G4int fVerboseLevel;
0118   G4bool fIsInitialised;
0119 
0120   //Used only for G4EmCalculator and Unit Tests
0121   G4bool fLocalTable;
0122 };
0123 
0124 
0125 
0126 #endif