File indexing completed on 2025-01-18 09:58:11
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
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048 #ifndef G4eeToHadronsMultiModel_h
0049 #define G4eeToHadronsMultiModel_h 1
0050
0051 #include "G4VEmModel.hh"
0052 #include "G4eeToHadronsModel.hh"
0053 #include "G4ParticleChangeForGamma.hh"
0054 #include "G4TrackStatus.hh"
0055 #include "Randomize.hh"
0056 #include <CLHEP/Units/SystemOfUnits.h>
0057 #include <CLHEP/Units/PhysicalConstants.h>
0058 #include <vector>
0059
0060 class G4eeCrossSections;
0061 class G4Vee2hadrons;
0062
0063 class G4eeToHadronsMultiModel : public G4VEmModel
0064 {
0065
0066 public:
0067
0068 explicit G4eeToHadronsMultiModel(G4int ver=0,
0069 const G4String& nam = "eeToHadrons");
0070
0071 ~G4eeToHadronsMultiModel() override;
0072
0073 void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0074
0075 G4double CrossSectionPerVolume(const G4Material*,
0076 const G4ParticleDefinition*,
0077 G4double kineticEnergy,
0078 G4double cutEnergy,
0079 G4double maxEnergy) override;
0080
0081 G4double ComputeCrossSectionPerAtom(
0082 const G4ParticleDefinition*,
0083 G4double kineticEnergy,
0084 G4double Z, G4double A,
0085 G4double cutEnergy = 0.0,
0086 G4double maxEnergy = DBL_MAX) override;
0087
0088 void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0089 const G4MaterialCutsCouple*,
0090 const G4DynamicParticle*,
0091 G4double tmin = 0.0,
0092 G4double maxEnergy = DBL_MAX) override;
0093
0094 void ModelDescription(std::ostream& outFile) const override;
0095
0096
0097 void SetCrossSecFactor(G4double fac);
0098
0099 G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition*,
0100 G4double kineticEnergy,
0101 G4double cutEnergy = 0.0,
0102 G4double maxEnergy = DBL_MAX);
0103
0104
0105 G4eeToHadronsMultiModel & operator=(const G4eeToHadronsMultiModel &right) = delete;
0106 G4eeToHadronsMultiModel(const G4eeToHadronsMultiModel&) = delete;
0107
0108 private:
0109
0110 void AddEEModel(G4Vee2hadrons*, const G4DataVector&);
0111
0112
0113 inline G4double LabToCM(G4double);
0114
0115 G4eeCrossSections* cross = nullptr;
0116 G4ParticleChangeForGamma* fParticleChange = nullptr;
0117
0118 std::vector<G4eeToHadronsModel*> models;
0119
0120 std::vector<G4double> ekinMin;
0121 std::vector<G4double> ekinPeak;
0122 std::vector<G4double> ekinMax;
0123 std::vector<G4double> cumSum;
0124
0125 G4double delta;
0126 G4double thKineticEnergy = DBL_MAX;
0127 G4double maxKineticEnergy;
0128 G4double csFactor = 1.0;
0129
0130 G4int nModels = 0;
0131 G4int verbose;
0132 G4bool isInitialised = false;
0133 };
0134
0135
0136
0137
0138 inline G4double G4eeToHadronsMultiModel::LabToCM(G4double kinE_lab)
0139 {
0140 G4double totE_CM = 0.0;
0141 G4double mass = CLHEP::electron_mass_c2;
0142 G4double totE_lab = kinE_lab + mass;
0143 totE_CM = std::sqrt(2*mass*(mass+totE_lab));
0144
0145 return totE_CM;
0146 }
0147
0148
0149
0150 #endif