Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4PAIModel.hh
이 파일의 문서화 페이지로 가기
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 105869 2017-08-24 13:37:59Z 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 
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  explicit G4PAIModel(const G4ParticleDefinition* p = nullptr,
75  const G4String& nam = "PAI");
76 
77  ~G4PAIModel() final;
78 
79  void Initialise(const G4ParticleDefinition*, const G4DataVector&) final;
80 
82  G4VEmModel* masterModel) final;
83 
85  const G4MaterialCutsCouple* couple) final;
86 
88  const G4ParticleDefinition*,
90  G4double cutEnergy) final;
91 
93  const G4ParticleDefinition*,
94  G4double kineticEnergy,
95  G4double cutEnergy,
96  G4double maxEnergy) final;
97 
98  void SampleSecondaries(std::vector<G4DynamicParticle*>*,
99  const G4MaterialCutsCouple*,
100  const G4DynamicParticle*,
101  G4double tmin,
102  G4double maxEnergy) final;
103 
105  const G4DynamicParticle*,
106  G4double, G4double, G4double) final;
107 
109  G4double, G4double) final;
110 
111  void DefineForRegion(const G4Region* r) final;
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) final;
125 
126 private:
127 
129 
130  inline void SetParticle(const G4ParticleDefinition* p);
131 
132  // hide assignment operator
133  G4PAIModel & operator=(const G4PAIModel &right) = delete;
134  G4PAIModel(const G4PAIModel&) = delete;
135 
137 
139 
140  std::vector<const G4MaterialCutsCouple*> fMaterialCutsCoupleVector;
141  std::vector<const G4Region*> fPAIRegionVector;
142 
147 
152 };
153 
155 {
156  return fModelData;
157 }
158 
159 inline const std::vector<const G4MaterialCutsCouple*>&
161 {
163 }
164 
166 {
167  return MaxSecondaryEnergy(fParticle, scaledEnergy/fRatio);
168 }
169 
170 inline void G4PAIModel::SetVerboseLevel(G4int verbose)
171 {
172  fVerbose=verbose;
173 }
174 
176 {
177  G4int idx = -1;
178  size_t jMatMax = fMaterialCutsCoupleVector.size();
179  for(size_t jMat = 0;jMat < jMatMax; ++jMat) {
180  if(couple == fMaterialCutsCoupleVector[jMat]) {
181  idx = jMat;
182  break;
183  }
184  }
185  return idx;
186 }
187 
189 {
190  if(fParticle != p) {
191  fParticle = p;
195  fChargeSquare = q*q;
196  }
197 }
198 
199 #endif
200 
201 
202 
203 
204 
205 
206 
G4int FindCoupleIndex(const G4MaterialCutsCouple *)
Definition: G4PAIModel.hh:175
G4PAIModel(const G4ParticleDefinition *p=nullptr, const G4String &nam="PAI")
Definition: G4PAIModel.cc:77
void DefineForRegion(const G4Region *r) final
Definition: G4PAIModel.cc:395
G4double fLowestTcut
Definition: G4PAIModel.hh:151
void SetParticle(const G4ParticleDefinition *p)
Definition: G4PAIModel.hh:188
~G4PAIModel() final
Definition: G4PAIModel.cc:98
G4double fChargeSquare
Definition: G4PAIModel.hh:150
G4int fVerbose
Definition: G4PAIModel.hh:136
const char * p
Definition: xmltok.h:285
G4double GetPDGCharge() const
G4ParticleChangeForLoss * fParticleChange
Definition: G4PAIModel.hh:146
const G4ParticleDefinition * fParticle
Definition: G4PAIModel.hh:143
G4double GetPDGMass() const
G4double Dispersion(const G4Material *, const G4DynamicParticle *, G4double, G4double) final
Definition: G4PAIModel.cc:359
static constexpr double proton_mass_c2
void SetVerboseLevel(G4int verbose)
Definition: G4PAIModel.hh:170
double G4double
Definition: G4Types.hh:76
G4double fRatio
Definition: G4PAIModel.hh:149
void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel) final
Definition: G4PAIModel.cc:193
void Initialise(const G4ParticleDefinition *, const G4DataVector &) final
Definition: G4PAIModel.cc:105
std::vector< const G4MaterialCutsCouple * > fMaterialCutsCoupleVector
Definition: G4PAIModel.hh:140
G4double ComputeMaxEnergy(G4double scaledEnergy)
Definition: G4PAIModel.hh:165
void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) final
Definition: G4PAIModel.cc:266
G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kinEnergy) final
Definition: G4PAIModel.cc:378
G4double fMass
Definition: G4PAIModel.hh:148
G4PAIModel & operator=(const G4PAIModel &right)=delete
G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy) final
Definition: G4PAIModel.cc:236
G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy) final
Definition: G4PAIModel.cc:213
int G4int
Definition: G4Types.hh:78
G4double MinEnergyCut(const G4ParticleDefinition *, const G4MaterialCutsCouple *couple) final
Definition: G4PAIModel.cc:205
const G4ParticleDefinition * fElectron
Definition: G4PAIModel.hh:144
G4PAIModelData * GetPAIModelData()
Definition: G4PAIModel.hh:154
const G4ParticleDefinition * fPositron
Definition: G4PAIModel.hh:145
std::vector< const G4Region * > fPAIRegionVector
Definition: G4PAIModel.hh:141
const std::vector< const G4MaterialCutsCouple * > & GetVectorOfCouples()
Definition: G4PAIModel.hh:160
G4PAIModelData * fModelData
Definition: G4PAIModel.hh:138
G4double SampleFluctuations(const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double, G4double, G4double) final
Definition: G4PAIModel.cc:324
static constexpr double eplus