Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 // $Id: G4PenelopeRayleighModelMI.hh 75573 201 27 // 28 // Author: Luciano Pandola and Gianfranco Pate 29 // 30 // ------------------------------------------- 31 // History: 32 // 03 Dec 2009 L. Pandola 1st implementati 33 // 25 May 2011 L. Pandola Renamed (make v2 34 // 27 Sep 2013 L. Pandola Migration to MT 35 // 20 Aug 2017 G. Paternò Molecular Inter 36 // 24 Mar 2019 G. Paternò Improved Molecu 37 // 20 Jun 2020 G. Paternò Read qext separ 38 // form factors 39 // 27 Aug 2020 G. Paternò Further improve 40 // 04 Mar 2021 L. Pandola Replace maps wit 41 // 42 // ------------------------------------------- 43 // Class description: 44 // Low Energy Electromagnetic Physics, Rayleig 45 // with the model from Penelope, version 2008 46 // extended for Molecular Interference Effects 47 // ------------------------------------------- 48 // 49 //....oooOO0OOooo........oooOO0OOooo........oo 50 51 #ifndef G4PenelopeRayleighModelMI_HH 52 #define G4PenelopeRayleighModelMI_HH 1 53 54 #include "globals.hh" 55 #include "G4VEmModel.hh" 56 #include "G4DataVector.hh" 57 #include "G4ParticleChangeForGamma.hh" 58 59 #include "G4ExtendedMaterial.hh" 60 #include "G4MIData.hh" 61 62 //....oooOO0OOooo........oooOO0OOooo........oo 63 64 class G4ParticleDefinition; 65 class G4DynamicParticle; 66 class G4MaterialCutsCouple; 67 class G4Material; 68 class G4PhysicsFreeVector; 69 class G4PenelopeSamplingData; 70 71 class G4PenelopeRayleighModelMI : public G4VEm 72 { 73 74 public: 75 explicit G4PenelopeRayleighModelMI(const G4P 76 const G4String& processName = "Pe 77 78 virtual ~G4PenelopeRayleighModelMI(); 79 80 void Initialise(const G4ParticleDefinition*, 81 void InitialiseLocal(const G4ParticleDefinit 82 G4VEmModel *masterModel) override 83 84 G4double ComputeCrossSectionPerAtom(const G4 85 G4double kinEnergy, 86 G4double Z, 87 G4double A = 0, 88 G4double cut = 0, 89 G4double emax = DBL_MAX) overrid 90 91 //Overriding of parent's (G4VEmModel) method 92 G4double CrossSectionPerVolume(const G4Mater 93 const G4ParticleDefinition*, 94 G4double kineticEnergy, 95 G4double cutEnergy = 0., 96 G4double maxEnergy = DBL_MAX) overrid 97 98 void SampleSecondaries(std::vector<G4Dynamic 99 const G4MaterialCutsCouple*, 100 const G4DynamicParticle*, 101 G4double tmin, 102 G4double maxEnergy) override; 103 104 void SetVerbosityLevel(G4int lev) {fVerboseL 105 G4int GetVerbosityLevel() {return fVerboseLe 106 107 //Testing purposes 108 void DumpFormFactorTable(const G4Material*); 109 110 //Settings 111 void SetMIActive(G4bool val){fIsMIActive = v 112 G4bool IsMIActive(){return fIsMIActive;}; 113 114 G4PenelopeRayleighModelMI& operator=(const G 115 G4PenelopeRayleighModelMI(const G4PenelopeRa 116 117 private: 118 void SetParticle(const G4ParticleDefinition 119 120 //Helper methods 121 void ReadDataFile(G4int); 122 void ClearTables(); 123 void BuildFormFactorTable(const G4Material*) 124 void GetPMaxTable(const G4Material*); 125 G4double GetFSquared(const G4Material*,const 126 void InitializeSamplingAlgorithm(const G4Mat 127 void ReadMolInterferenceData(const G4String& 128 G4MIData* GetMIData(const G4Material*); 129 void CalculateThetaAndAngFun(); 130 G4double CalculateQSquared(G4double angle, G 131 G4double IntegrateFun(G4double y[], G4int n, 132 void LoadKnownMIFFMaterials(); 133 134 /// Data members 135 G4ParticleChangeForGamma* fParticleChange; 136 const G4ParticleDefinition* fParticle; 137 138 G4DataVector fLogQSquareGrid; //log(Q^2) gri 139 std::map<const G4Material*,G4PhysicsFreeVect 140 141 G4DataVector fLogEnergyGridPMax; //energy gr 142 std::map<const G4Material*,G4PhysicsFreeVect 143 std::map<const G4Material*,G4PenelopeSamplin 144 //Internal tables and manager methods 145 std::map<G4String,G4PhysicsFreeVector*> *fMo 146 G4PhysicsFreeVector* fAngularFunction; 147 std::map<G4String,G4String> *fKnownMaterials 148 static const G4int fMaxZ =99; 149 static G4PhysicsFreeVector* fLogAtomicCrossS 150 static G4PhysicsFreeVector* fAtomicFormFacto 151 152 //Intrinsic energy limits of the model: cann 153 G4double fIntrinsicLowEnergyLimit; 154 G4double fIntrinsicHighEnergyLimit; 155 G4double fDTheta = {0.0001}; 156 157 static const G4int fNtheta = 31415; 158 G4int fVerboseLevel; 159 G4bool fIsInitialised; 160 //Used only for G4EmCalculator and Unit Test 161 G4bool fLocalTable; 162 G4bool fIsMIActive; 163 }; 164 165 //....oooOO0OOooo........oooOO0OOooo........oo 166 167 #endif 168 169