Geant4  10.01.p03
G4PAIModel.hh
Go to the documentation of this file.
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: G4PAIModel.hh 90583 2015-06-04 11:16:41Z gcosmo $
27 //
28 // -------------------------------------------------------------------
29 //
30 // GEANT4 Class header file
31 //
32 //
33 // File name: G4PAIModel
34 //
35 // Author: V. Grichine based on Vladimir Ivanchenko code
36 //
37 // Creation date: 05.10.2003
38 //
39 // Modifications:
40 // 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
41 // 26-09-07 Fixed tmax computation (V.Ivantchenko)
42 // 19.08.13 V.Ivanchenko extract data handling to G4PAIModelData class
43 // added sharing of internal data between threads (MT migration)
44 //
45 //
46 // Class Description:
47 //
48 // Implementation of PAI model of energy loss and
49 // delta-electron production by heavy charged particles
50 
51 // -------------------------------------------------------------------
52 //
53 
54 #ifndef G4PAIModel_h
55 #define G4PAIModel_h 1
56 
57 #include <CLHEP/Units/PhysicalConstants.h>
58 
59 #include "G4VEmModel.hh"
60 #include "G4VEmFluctuationModel.hh"
61 #include "globals.hh"
62 #include <vector>
63 
64 class G4Region;
67 class G4PAIModelData;
68 
70 {
71 
72 public:
73 
74  G4PAIModel(const G4ParticleDefinition* p = 0, const G4String& nam = "PAI");
75 
76  virtual ~G4PAIModel();
77 
78  virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
79 
80  virtual void InitialiseLocal(const G4ParticleDefinition*,
81  G4VEmModel* masterModel);
82 
84  const G4ParticleDefinition*,
85  G4double kineticEnergy,
86  G4double cutEnergy);
87 
89  const G4ParticleDefinition*,
90  G4double kineticEnergy,
91  G4double cutEnergy,
92  G4double maxEnergy);
93 
94  virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
95  const G4MaterialCutsCouple*,
96  const G4DynamicParticle*,
97  G4double tmin,
98  G4double maxEnergy);
99 
101  const G4DynamicParticle*,
102  G4double,
103  G4double,
104  G4double);
105 
106  virtual G4double Dispersion( const G4Material*,
107  const G4DynamicParticle*,
108  G4double,
109  G4double);
110 
111  void DefineForRegion(const G4Region* r);
112 
114 
115  inline const std::vector<const G4MaterialCutsCouple*>& GetVectorOfCouples();
116 
117  inline G4double ComputeMaxEnergy(G4double scaledEnergy);
118 
119  inline void SetVerboseLevel(G4int verbose);
120 
121 protected:
122 
124  G4double kinEnergy);
125 
126 private:
127 
129 
130  inline void SetParticle(const G4ParticleDefinition* p);
131 
132  // hide assignment operator
134  G4PAIModel(const G4PAIModel&);
135 
137 
139 
140  std::vector<const G4MaterialCutsCouple*> fMaterialCutsCoupleVector;
141  std::vector<const G4Region*> fPAIRegionVector;
142 
147 
151 };
152 
154 {
155  return fModelData;
156 }
157 
158 inline const std::vector<const G4MaterialCutsCouple*>&
160 {
162 }
163 
165 {
166  return MaxSecondaryEnergy(fParticle, scaledEnergy/fRatio);
167 }
168 
169 inline void G4PAIModel::SetVerboseLevel(G4int verbose)
170 {
171  fVerbose=verbose;
172 }
173 
175 {
176  G4int idx = -1;
177  size_t jMatMax = fMaterialCutsCoupleVector.size();
178  for(size_t jMat = 0;jMat < jMatMax; ++jMat) {
179  if(couple == fMaterialCutsCoupleVector[jMat]) {
180  idx = jMat;
181  break;
182  }
183  }
184  return idx;
185 }
186 
188 {
189  if(fParticle != p) {
190  fParticle = p;
192  fRatio = CLHEP::proton_mass_c2/fMass;
194  fChargeSquare = q*q;
195  }
196 }
197 
198 #endif
199 
200 
201 
202 
203 
204 
205 
const std::vector< const G4MaterialCutsCouple * > & GetVectorOfCouples()
Definition: G4PAIModel.hh:159
G4PAIModelData * GetPAIModelData()
Definition: G4PAIModel.hh:153
std::vector< const G4MaterialCutsCouple * > fMaterialCutsCoupleVector
Definition: G4PAIModel.hh:140
const G4ParticleDefinition * fPositron
Definition: G4PAIModel.hh:145
G4int FindCoupleIndex(const G4MaterialCutsCouple *)
Definition: G4PAIModel.hh:174
G4double fMass
Definition: G4PAIModel.hh:148
std::vector< const G4Region * > fPAIRegionVector
Definition: G4PAIModel.hh:141
G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kinEnergy)
Definition: G4PAIModel.cc:369
G4double fRatio
Definition: G4PAIModel.hh:149
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)
Definition: G4PAIModel.cc:104
virtual void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel)
Definition: G4PAIModel.cc:192
G4int fVerbose
Definition: G4PAIModel.hh:136
int G4int
Definition: G4Types.hh:78
virtual G4double Dispersion(const G4Material *, const G4DynamicParticle *, G4double, G4double)
Definition: G4PAIModel.cc:350
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
Definition: G4PAIModel.cc:227
G4PAIModel & operator=(const G4PAIModel &right)
void SetParticle(const G4ParticleDefinition *p)
Definition: G4PAIModel.hh:187
const G4ParticleDefinition * fParticle
Definition: G4PAIModel.hh:143
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
Definition: G4PAIModel.cc:257
G4double fChargeSquare
Definition: G4PAIModel.hh:150
G4PAIModelData * fModelData
Definition: G4PAIModel.hh:138
const G4ParticleDefinition * fElectron
Definition: G4PAIModel.hh:144
G4ParticleChangeForLoss * fParticleChange
Definition: G4PAIModel.hh:146
virtual ~G4PAIModel()
Definition: G4PAIModel.cc:97
G4double GetPDGMass() const
G4PAIModel(const G4ParticleDefinition *p=0, const G4String &nam="PAI")
Definition: G4PAIModel.cc:77
virtual G4double SampleFluctuations(const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double, G4double, G4double)
Definition: G4PAIModel.cc:315
virtual G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy)
Definition: G4PAIModel.cc:204
double G4double
Definition: G4Types.hh:76
void DefineForRegion(const G4Region *r)
Definition: G4PAIModel.cc:386
static const double eplus
Definition: G4SIunits.hh:178
G4double GetPDGCharge() const
G4double ComputeMaxEnergy(G4double scaledEnergy)
Definition: G4PAIModel.hh:164
void SetVerboseLevel(G4int verbose)
Definition: G4PAIModel.hh:169