Geant4 Cross Reference |
1 // 2 // ******************************************************************** 3 // * License and Disclaimer * 4 // * * 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. * 10 // * * 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitation of liability. * 17 // * * 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************************************** 25 // 26 #ifndef G4VLEPTSModel_hh 27 #define G4VLEPTSModel_hh 28 29 #include "G4ios.hh" 30 #include "globals.hh" 31 #include "Randomize.hh" 32 #include "G4VEmModel.hh" 33 #include "G4PhysicsTable.hh" 34 #include "G4PhysicsLogVector.hh" 35 #include "G4Element.hh" 36 #include "G4Electron.hh" 37 #include "G4Positron.hh" 38 #include "G4Gamma.hh" 39 #include "G4Step.hh" 40 41 #include "G4EnergyLossTables.hh" 42 #include "G4UnitsTable.hh" 43 #include <iostream> 44 45 #include "G4LEPTSDiffXS.hh" 46 #include "G4LEPTSDistribution.hh" 47 #include "G4LEPTSElossDistr.hh" 48 #include "G4ForceCondition.hh" 49 #include <map> 50 #include <vector> 51 52 enum XSType {XSEnergy=0, 53 XSTotal=1, XSElastic=2, XSInelastic=3, 54 XSIonisation=4, XSExcitation=5, XSDissociation=6, 55 XSVibration=7, XSAttachment=8, XSRotation=9, XSPositronium=8 56 }; 57 58 59 class G4VLEPTSModel : public G4VEmModel 60 { 61 public: 62 63 G4VLEPTSModel(const G4String& processName); 64 ~G4VLEPTSModel() override; 65 66 void BuildPhysicsTable(const G4ParticleDefinition& aParticleType); //G4ParticleWithCuts::SetCut() 67 G4double GetMeanFreePath(const G4Material* mate, 68 const G4ParticleDefinition* aParticle, 69 G4double kineticEnergy ); 70 71 G4ThreeVector SampleNewDirection(const G4Material* aMaterial, G4ThreeVector Dir, G4double e, G4double el); 72 G4double SampleAngle(const G4Material* aMaterial, G4double e, G4double el); 73 G4ThreeVector SampleNewDirection(G4ThreeVector Dir, G4double ang); 74 75 G4VLEPTSModel& operator=(const G4VLEPTSModel &right); //hide assignment operator 76 G4VLEPTSModel(const G4VLEPTSModel& ); 77 78 protected: 79 80 void Init(); 81 G4bool ReadParam(const G4String& fileName, const G4Material* aMaterial); 82 virtual std::map<G4int,std::vector<G4double> > ReadIXS(const G4String& fileName, const G4Material* aMaterial); 83 G4double SampleEnergyLoss(const G4Material* aMaterial, G4double eMin, G4double eMax); 84 void BuildMeanFreePathTable( const G4Material* aMaterial, std::map< G4int, std::vector<G4double> >& integralXS ); 85 86 protected: 87 88 G4PhysicsTable * theMeanFreePathTable; 89 90 G4double theLowestEnergyLimit; 91 G4double theHighestEnergyLimit; 92 G4int theNumbBinTable; 93 94 std::map<const G4Material*, G4double > theIonisPot; 95 std::map<const G4Material*, G4double > theIonisPotInt; 96 std::map<const G4Material*, G4double > theMolecularMass; 97 98 std::map<const G4Material*, G4LEPTSDiffXS*> theDiffXS; 99 std::map<const G4Material*, G4LEPTSDistribution*> theRMTDistr; 100 101 std::map<const G4Material*, G4LEPTSElossDistr*> theElostDistr; 102 std::map<const G4Material*, G4LEPTSDistribution*> theElostDistr2; 103 104 std::map<const G4Material*, G4int> theNXSdat; 105 std::map<const G4Material*, G4int> theNXSsub; 106 107 G4bool isInitialised{false}; 108 XSType theXSType; 109 110 G4int verboseLevel; 111 }; 112 113 114 #endif // G4VLEPTSModel_hh 115