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 | // $Id: G4eeToHadronsMultiModel.hh,v 1.7 2009/02/20 16:38:33 vnivanch Exp $ |
---|
27 | // GEANT4 tag $Name: geant4-09-03 $ |
---|
28 | // |
---|
29 | // ------------------------------------------------------------------- |
---|
30 | // |
---|
31 | // GEANT4 Class header file |
---|
32 | // |
---|
33 | // |
---|
34 | // File name: G4eeToHadronsMultiModel |
---|
35 | // |
---|
36 | // Author: Vladimir Ivanchenko |
---|
37 | // |
---|
38 | // Creation date: 18.05.2005 |
---|
39 | // |
---|
40 | // Modifications: |
---|
41 | // |
---|
42 | |
---|
43 | // |
---|
44 | // Class Description: vector of e+e- -> hadrons models |
---|
45 | // |
---|
46 | |
---|
47 | // ------------------------------------------------------------------- |
---|
48 | // |
---|
49 | |
---|
50 | #ifndef G4eeToHadronsMultiModel_h |
---|
51 | #define G4eeToHadronsMultiModel_h 1 |
---|
52 | |
---|
53 | #include "G4VEmModel.hh" |
---|
54 | #include "G4eeToHadronsModel.hh" |
---|
55 | #include "G4ParticleChangeForGamma.hh" |
---|
56 | #include "G4TrackStatus.hh" |
---|
57 | #include "Randomize.hh" |
---|
58 | #include <vector> |
---|
59 | |
---|
60 | class G4eeCrossSections; |
---|
61 | class G4Vee2hadrons; |
---|
62 | |
---|
63 | class G4eeToHadronsMultiModel : public G4VEmModel |
---|
64 | { |
---|
65 | |
---|
66 | public: |
---|
67 | |
---|
68 | G4eeToHadronsMultiModel(G4int ver=0, const G4String& nam = "eeToHadrons"); |
---|
69 | |
---|
70 | virtual ~G4eeToHadronsMultiModel(); |
---|
71 | |
---|
72 | virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); |
---|
73 | |
---|
74 | virtual G4double CrossSectionPerVolume(const G4Material*, |
---|
75 | const G4ParticleDefinition*, |
---|
76 | G4double kineticEnergy, |
---|
77 | G4double cutEnergy, |
---|
78 | G4double maxEnergy); |
---|
79 | |
---|
80 | virtual G4double ComputeCrossSectionPerAtom( |
---|
81 | const G4ParticleDefinition*, |
---|
82 | G4double kineticEnergy, |
---|
83 | G4double Z, G4double A, |
---|
84 | G4double cutEnergy = 0.0, |
---|
85 | G4double maxEnergy = DBL_MAX); |
---|
86 | |
---|
87 | virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*, |
---|
88 | const G4MaterialCutsCouple*, |
---|
89 | const G4DynamicParticle*, |
---|
90 | G4double tmin = 0.0, |
---|
91 | G4double maxEnergy = DBL_MAX); |
---|
92 | |
---|
93 | virtual void PrintInfo(); |
---|
94 | |
---|
95 | // Set the factor to artificially increase the crossSection (default 1) |
---|
96 | void SetCrossSecFactor(G4double fac); |
---|
97 | |
---|
98 | inline G4double ComputeCrossSectionPerElectron( |
---|
99 | const G4ParticleDefinition*, |
---|
100 | G4double kineticEnergy, |
---|
101 | G4double cutEnergy = 0.0, |
---|
102 | G4double maxEnergy = DBL_MAX); |
---|
103 | |
---|
104 | private: |
---|
105 | |
---|
106 | void AddEEModel(G4Vee2hadrons*); |
---|
107 | |
---|
108 | // hide assignment operator |
---|
109 | G4eeToHadronsMultiModel & operator=(const G4eeToHadronsMultiModel &right); |
---|
110 | G4eeToHadronsMultiModel(const G4eeToHadronsMultiModel&); |
---|
111 | |
---|
112 | G4eeCrossSections* cross; |
---|
113 | G4ParticleChangeForGamma* fParticleChange; |
---|
114 | |
---|
115 | std::vector<G4eeToHadronsModel*> models; |
---|
116 | |
---|
117 | std::vector<G4double> ekinMin; |
---|
118 | std::vector<G4double> ekinPeak; |
---|
119 | std::vector<G4double> ekinMax; |
---|
120 | std::vector<G4double> cumSum; |
---|
121 | |
---|
122 | G4double thKineticEnergy; |
---|
123 | G4double maxKineticEnergy; |
---|
124 | G4double csFactor; |
---|
125 | |
---|
126 | G4int nModels; |
---|
127 | G4int verbose; |
---|
128 | G4bool isInitialised; |
---|
129 | }; |
---|
130 | |
---|
131 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
132 | |
---|
133 | inline G4double G4eeToHadronsMultiModel::ComputeCrossSectionPerElectron( |
---|
134 | const G4ParticleDefinition*, |
---|
135 | G4double kineticEnergy, |
---|
136 | G4double, G4double) |
---|
137 | { |
---|
138 | G4double res = 0.0; |
---|
139 | if (kineticEnergy > thKineticEnergy) { |
---|
140 | for(G4int i=0; i<nModels; i++) { |
---|
141 | if(kineticEnergy >= ekinMin[i] && kineticEnergy <= ekinMax[i]) |
---|
142 | res += (models[i])->ComputeCrossSectionPerElectron(0,kineticEnergy); |
---|
143 | cumSum[i] = res; |
---|
144 | } |
---|
145 | } |
---|
146 | return res*csFactor; |
---|
147 | } |
---|
148 | |
---|
149 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
150 | |
---|
151 | #endif |
---|