00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049 #ifndef G4eeToHadronsMultiModel_h
00050 #define G4eeToHadronsMultiModel_h 1
00051
00052 #include "G4VEmModel.hh"
00053 #include "G4eeToHadronsModel.hh"
00054 #include "G4ParticleChangeForGamma.hh"
00055 #include "G4TrackStatus.hh"
00056 #include "Randomize.hh"
00057 #include <vector>
00058
00059 class G4eeCrossSections;
00060 class G4Vee2hadrons;
00061
00062 class G4eeToHadronsMultiModel : public G4VEmModel
00063 {
00064
00065 public:
00066
00067 G4eeToHadronsMultiModel(G4int ver=0, const G4String& nam = "eeToHadrons");
00068
00069 virtual ~G4eeToHadronsMultiModel();
00070
00071 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
00072
00073 virtual G4double CrossSectionPerVolume(const G4Material*,
00074 const G4ParticleDefinition*,
00075 G4double kineticEnergy,
00076 G4double cutEnergy,
00077 G4double maxEnergy);
00078
00079 virtual G4double ComputeCrossSectionPerAtom(
00080 const G4ParticleDefinition*,
00081 G4double kineticEnergy,
00082 G4double Z, G4double A,
00083 G4double cutEnergy = 0.0,
00084 G4double maxEnergy = DBL_MAX);
00085
00086 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
00087 const G4MaterialCutsCouple*,
00088 const G4DynamicParticle*,
00089 G4double tmin = 0.0,
00090 G4double maxEnergy = DBL_MAX);
00091
00092 virtual void PrintInfo();
00093
00094
00095 void SetCrossSecFactor(G4double fac);
00096
00097 inline G4double ComputeCrossSectionPerElectron(
00098 const G4ParticleDefinition*,
00099 G4double kineticEnergy,
00100 G4double cutEnergy = 0.0,
00101 G4double maxEnergy = DBL_MAX);
00102
00103 private:
00104
00105 void AddEEModel(G4Vee2hadrons*);
00106
00107
00108 G4eeToHadronsMultiModel & operator=(const G4eeToHadronsMultiModel &right);
00109 G4eeToHadronsMultiModel(const G4eeToHadronsMultiModel&);
00110
00111 G4eeCrossSections* cross;
00112 G4ParticleChangeForGamma* fParticleChange;
00113
00114 std::vector<G4eeToHadronsModel*> models;
00115
00116 std::vector<G4double> ekinMin;
00117 std::vector<G4double> ekinPeak;
00118 std::vector<G4double> ekinMax;
00119 std::vector<G4double> cumSum;
00120
00121 G4double thKineticEnergy;
00122 G4double maxKineticEnergy;
00123 G4double csFactor;
00124
00125 G4int nModels;
00126 G4int verbose;
00127 G4bool isInitialised;
00128 };
00129
00130
00131
00132 inline G4double G4eeToHadronsMultiModel::ComputeCrossSectionPerElectron(
00133 const G4ParticleDefinition*,
00134 G4double kineticEnergy,
00135 G4double, G4double)
00136 {
00137 G4double res = 0.0;
00138 if (kineticEnergy > thKineticEnergy) {
00139 for(G4int i=0; i<nModels; i++) {
00140 if(kineticEnergy >= ekinMin[i] && kineticEnergy <= ekinMax[i])
00141 res += (models[i])->ComputeCrossSectionPerElectron(0,kineticEnergy);
00142 cumSum[i] = res;
00143 }
00144 }
00145 return res*csFactor;
00146 }
00147
00148
00149
00150 #endif