File indexing completed on 2025-08-02 08:28: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
0027
0028
0029
0030
0031 #ifndef G4CoherentPairProduction_h
0032 #define G4CoherentPairProduction_h 1
0033
0034 #include "G4VDiscreteProcess.hh"
0035
0036 #include <vector>
0037 #include <CLHEP/Units/SystemOfUnits.h>
0038 #include <CLHEP/Units/PhysicalConstants.h>
0039 #include <CLHEP/Vector/TwoVector.h>
0040
0041 #include "G4ChannelingFastSimCrystalData.hh"
0042 #include "G4LogicalVolume.hh"
0043 #include "G4ParticleTable.hh"
0044
0045
0046
0047 class G4CoherentPairProduction : public G4VDiscreteProcess
0048 {
0049 public:
0050 G4CoherentPairProduction(const G4String& processName = "cpp",
0051 G4ProcessType aType = fElectromagnetic);
0052
0053 ~G4CoherentPairProduction() = default;
0054
0055 G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&) override;
0056
0057 G4bool IsApplicable(const G4ParticleDefinition& aPD) override
0058 {
0059 return(aPD.GetParticleName() == "gamma");
0060 }
0061
0062
0063 void ProcessDescription(std::ostream&) const override;
0064
0065
0066 void Input(const G4Material* crystal,
0067 const G4String &lattice)
0068 {Input(crystal,lattice,"");}
0069
0070 void Input(const G4Material* crystal,
0071 const G4String &lattice,
0072 const G4String &filePath);
0073
0074
0075 void Input(const G4ChannelingFastSimCrystalData* crystalData);
0076
0077
0078
0079 void ActivateIncoherentScattering(){fIncoherentScattering = true;}
0080
0081 G4ChannelingFastSimCrystalData* GetCrystalData() {return fCrystalData;}
0082
0083
0084
0085 G4double ModelMinPrimaryEnergy() { return fLowEnergyLimit;}
0086 G4double GetHighAngleLimit() {return fHighAngleLimit;}
0087 G4double GetPPKineticEnergyCut() {return fPPKineticEnergyCut;}
0088
0089
0090
0091 G4int GetSamplingPairsNumber(){return fNMCPairs;}
0092
0093
0094
0095
0096 G4double GetChargeParticleAngleFactor(){return fChargeParticleAngleFactor;}
0097
0098
0099 G4double GetNTrajectorySteps(){return fNTrajectorySteps;}
0100
0101
0102
0103
0104 G4double GetEffectiveLrad(){return fEffectiveLrad;}
0105
0106
0107 G4String GetG4RegionName() {return fG4RegionName;}
0108
0109
0110 void SetLowEnergyLimit(G4double energy){fLowEnergyLimit=energy;}
0111 void SetHighAngleLimit(G4double angle) {fHighAngleLimit=angle;}
0112 void SetPPKineticEnergyCut(G4double kineticEnergyCut) {fPPKineticEnergyCut=kineticEnergyCut;}
0113
0114
0115
0116 void SetSamplingPairsNumber(G4int nPairs){fNMCPairs = nPairs;}
0117
0118
0119
0120
0121 void SetChargeParticleAngleFactor(G4double chargeParticleAngleFactor)
0122 {fChargeParticleAngleFactor = chargeParticleAngleFactor;}
0123
0124
0125 void SetNTrajectorySteps(G4int nTrajectorySteps)
0126 {fNTrajectorySteps = nTrajectorySteps;}
0127
0128
0129 void SetG4RegionName(const G4String& nameG4Region){fG4RegionName=nameG4Region;}
0130
0131 G4double GetMeanFreePath(const G4Track& aTrack,
0132 G4double,
0133 G4ForceCondition* condition) override;
0134
0135 private:
0136
0137 G4int FindVectorIndex(std::vector<G4double> &myvector, G4double value);
0138
0139 G4ChannelingFastSimCrystalData* fCrystalData{nullptr};
0140
0141
0142 std::vector <CLHEP::Hep2Vector> fullVectorEtotal;
0143
0144
0145 std::vector <CLHEP::Hep2Vector> fullVectorX;
0146
0147
0148 std::vector <CLHEP::Hep2Vector> fullVectorY;
0149
0150
0151 std::vector <CLHEP::Hep2Vector> fullVectorTX;
0152
0153
0154 std::vector <CLHEP::Hep2Vector> fullVectorTY;
0155
0156
0157
0158 std::vector <G4double> fPairProductionCDFdz;
0159
0160 G4double fLowEnergyLimit = 1*CLHEP::GeV;
0161 G4double fHighAngleLimit = 50*CLHEP::mrad;
0162
0163
0164 G4double fPPKineticEnergyCut = 1*CLHEP::MeV;
0165
0166
0167 G4int fNMCPairs = 150;
0168
0169 G4double fChargeParticleAngleFactor = 4;
0170
0171
0172
0173 G4int fNTrajectorySteps=250;
0174
0175
0176 G4double fEffectiveLrad = 0.;
0177
0178
0179 G4String fG4RegionName = "Crystal";
0180
0181
0182 const G4double fMass = CLHEP::electron_mass_c2;
0183
0184
0185 G4bool fIncoherentScattering = false;
0186
0187 };
0188
0189
0190
0191 #endif
0192