File indexing completed on 2025-01-18 09:59:24
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026 #ifndef G4VLEPTSModel_hh
0027 #define G4VLEPTSModel_hh
0028
0029 #include "G4ios.hh"
0030 #include "globals.hh"
0031 #include "Randomize.hh"
0032 #include "G4VEmModel.hh"
0033 #include "G4PhysicsTable.hh"
0034 #include "G4PhysicsLogVector.hh"
0035 #include "G4Element.hh"
0036 #include "G4Electron.hh"
0037 #include "G4Positron.hh"
0038 #include "G4Gamma.hh"
0039 #include "G4Step.hh"
0040
0041 #include "G4EnergyLossTables.hh"
0042 #include "G4UnitsTable.hh"
0043 #include <iostream>
0044
0045 #include "G4LEPTSDiffXS.hh"
0046 #include "G4LEPTSDistribution.hh"
0047 #include "G4LEPTSElossDistr.hh"
0048 #include "G4ForceCondition.hh"
0049 #include <map>
0050 #include <vector>
0051
0052 enum XSType {XSEnergy=0,
0053 XSTotal=1, XSElastic=2, XSInelastic=3,
0054 XSIonisation=4, XSExcitation=5, XSDissociation=6,
0055 XSVibration=7, XSAttachment=8, XSRotation=9, XSPositronium=8
0056 };
0057
0058
0059 class G4VLEPTSModel : public G4VEmModel
0060 {
0061
0062 public:
0063
0064 G4VLEPTSModel(const G4String& processName);
0065 ~G4VLEPTSModel() override;
0066
0067 void BuildPhysicsTable(const G4ParticleDefinition& aParticleType);
0068 G4double GetMeanFreePath(const G4Material* mate,
0069 const G4ParticleDefinition* aParticle,
0070 G4double kineticEnergy );
0071
0072 G4ThreeVector SampleNewDirection(const G4Material* aMaterial, G4ThreeVector Dir, G4double e, G4double el);
0073 G4double SampleAngle(const G4Material* aMaterial, G4double e, G4double el);
0074 G4ThreeVector SampleNewDirection(G4ThreeVector Dir, G4double ang);
0075
0076 G4VLEPTSModel& operator=(const G4VLEPTSModel &right);
0077 G4VLEPTSModel(const G4VLEPTSModel& );
0078
0079 protected:
0080 void Init();
0081 G4bool ReadParam(G4String fileName, const G4Material* aMaterial);
0082 virtual std::map<G4int,std::vector<G4double> > ReadIXS(G4String fileName, const G4Material* aMaterial);
0083 G4double SampleEnergyLoss(const G4Material* aMaterial, G4double eMin, G4double eMax);
0084 void BuildMeanFreePathTable( const G4Material* aMaterial, std::map< G4int, std::vector<G4double> >& integralXS );
0085
0086 protected:
0087 G4PhysicsTable * theMeanFreePathTable;
0088
0089 G4double theLowestEnergyLimit;
0090 G4double theHighestEnergyLimit;
0091 G4int theNumbBinTable;
0092
0093 std::map<const G4Material*, G4double > theIonisPot;
0094 std::map<const G4Material*, G4double > theIonisPotInt;
0095 std::map<const G4Material*, G4double > theMolecularMass;
0096
0097 std::map<const G4Material*, G4LEPTSDiffXS*> theDiffXS;
0098 std::map<const G4Material*, G4LEPTSDistribution*> theRMTDistr;
0099
0100 std::map<const G4Material*, G4LEPTSElossDistr*> theElostDistr;
0101 std::map<const G4Material*, G4LEPTSDistribution*> theElostDistr2;
0102
0103 std::map<const G4Material*, G4int> theNXSdat;
0104 std::map<const G4Material*, G4int> theNXSsub;
0105
0106 G4bool isInitialised{false};
0107 XSType theXSType;
0108
0109 G4int verboseLevel;
0110 };
0111
0112
0113 #endif