Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4PAIPhotModel.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: G4PAIPhotonModel.hh 73607 2013-09-02 10:04:03Z gcosmo $
27 //
28 // -------------------------------------------------------------------
29 //
30 // GEANT4 Class header file
31 //
32 //
33 // File name: G4PAIPhotModel
34 //
35 // Author: V. Grichine based on G4PAIModel code for MT
36 //
37 // Creation date: 07.10.2013
38 //
39 //
40 // Class Description:
41 //
42 // Implementation of PAI photon model of energy loss and
43 // delta-electron or X-ray production by charged particles in MT framework
44 //
45 // -------------------------------------------------------------------
46 //
47 
48 #ifndef G4PAIPhotModel_h
49 #define G4PAIPhotModel_h 1
50 
52 
53 #include "G4VEmModel.hh"
54 #include "G4VEmFluctuationModel.hh"
55 #include "globals.hh"
56 #include <vector>
57 
58 class G4Region;
61 
62 class G4PAIPhotData;
63 
65 {
66 
67 public:
68 
69  G4PAIPhotModel(const G4ParticleDefinition* p = 0, const G4String& nam = "PAI");
70 
71  virtual ~G4PAIPhotModel();
72 
73  virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
74 
75  virtual void InitialiseLocal(const G4ParticleDefinition*,
76  G4VEmModel* masterModel);
77 
79  const G4ParticleDefinition*,
80  G4double kineticEnergy,
81  G4double cutEnergy);
82 
84  const G4ParticleDefinition*,
85  G4double kineticEnergy,
86  G4double cutEnergy,
87  G4double maxEnergy);
88 
89  virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
90  const G4MaterialCutsCouple*,
91  const G4DynamicParticle*,
92  G4double tmin,
93  G4double maxEnergy);
94 
96  const G4DynamicParticle*,
97  G4double,
98  G4double,
99  G4double);
100 
101  virtual G4double Dispersion( const G4Material*,
102  const G4DynamicParticle*,
103  G4double,
104  G4double);
105 
106  void DefineForRegion(const G4Region* r);
107 
108  inline G4PAIPhotData* GetPAIPhotData();
109 
110  inline G4double ComputeMaxEnergy(G4double scaledEnergy);
111 
112  inline void SetVerboseLevel(G4int verbose);
113 
114 protected:
115 
117  G4double kinEnergy);
118 
119 private:
120 
121  inline G4int FindCoupleIndex(const G4MaterialCutsCouple*);
122 
123  inline void SetParticle(const G4ParticleDefinition* p);
124 
125  // hide assignment operator
126  G4PAIPhotModel & operator=(const G4PAIPhotModel &right);
128 
129  G4int fVerbose;
130 
131  G4PAIPhotData* fModelData;
132 
133  std::vector<const G4MaterialCutsCouple*> fMaterialCutsCoupleVector;
134  std::vector<const G4Region*> fPAIRegionVector;
135 
136  const G4ParticleDefinition* fParticle;
137  const G4ParticleDefinition* fElectron;
138  const G4ParticleDefinition* fPositron;
139  G4ParticleChangeForLoss* fParticleChange;
140 
141  G4double fMass;
142  G4double fRatio;
143  G4double fChargeSquare;
144 
145  G4bool isInitialised;
146 };
147 
149 {
150  return fModelData;
151 }
152 
154 {
155  return MaxSecondaryEnergy(fParticle, scaledEnergy/fRatio);
156 }
157 
159 {
160  fVerbose=verbose;
161 }
162 
163 inline G4int G4PAIPhotModel::FindCoupleIndex(const G4MaterialCutsCouple* couple)
164 {
165  G4int idx = -1;
166  size_t jMatMax = fMaterialCutsCoupleVector.size();
167  for(size_t jMat = 0;jMat < jMatMax; ++jMat) {
168  if(couple == fMaterialCutsCoupleVector[jMat]) {
169  idx = jMat;
170  break;
171  }
172  }
173  return idx;
174 }
175 
176 inline void G4PAIPhotModel::SetParticle(const G4ParticleDefinition* p)
177 {
178  if(fParticle != p) {
179  fParticle = p;
180  fMass = fParticle->GetPDGMass();
181  fRatio = CLHEP::proton_mass_c2/fMass;
182  G4double q = fParticle->GetPDGCharge()/CLHEP::eplus;
183  fChargeSquare = q*q;
184  }
185 }
186 
187 #endif
188 
189 
190 
191 
192 
193 
194 
G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kinEnergy)
virtual ~G4PAIPhotModel()
G4PAIPhotData * GetPAIPhotData()
const char * p
Definition: xmltok.h:285
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
virtual void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel)
virtual G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy)
int G4int
Definition: G4Types.hh:78
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
G4double ComputeMaxEnergy(G4double scaledEnergy)
bool G4bool
Definition: G4Types.hh:79
void SetVerboseLevel(G4int verbose)
G4PAIPhotModel(const G4ParticleDefinition *p=0, const G4String &nam="PAI")
virtual G4double SampleFluctuations(const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double, G4double, G4double)
G4double GetPDGMass() const
virtual G4double Dispersion(const G4Material *, const G4DynamicParticle *, G4double, G4double)
void DefineForRegion(const G4Region *r)
double G4double
Definition: G4Types.hh:76
G4double GetPDGCharge() const
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)