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 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /processes/electromagnetic/standard/include/G4PAIPhotModel.hh (Version 11.3.0) and /processes/electromagnetic/standard/include/G4PAIPhotModel.hh (Version 10.0.p3)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
                                                   >>  26 // $Id: G4PAIPhotonModel.hh 73607 2013-09-02 10:04:03Z gcosmo $
 26 //                                                 27 //
 27 // -------------------------------------------     28 // -------------------------------------------------------------------
 28 //                                                 29 //
 29 // GEANT4 Class header file                        30 // GEANT4 Class header file
 30 //                                                 31 //
 31 //                                                 32 //
 32 // File name:     G4PAIPhotModel                   33 // File name:     G4PAIPhotModel
 33 //                                                 34 //
 34 // Author:        V. Grichine based on G4PAIMo     35 // Author:        V. Grichine based on G4PAIModel  code for MT
 35 //                                                 36 //
 36 // Creation date: 07.10.2013                       37 // Creation date: 07.10.2013
 37 //                                                 38 //
 38 //                                                 39 //
 39 // Class Description:                              40 // Class Description:
 40 //                                                 41 //
 41 // Implementation of PAI photon model of energ     42 // Implementation of PAI photon model of energy loss and
 42 // delta-electron or X-ray production by charg     43 // delta-electron or X-ray production by charged particles in MT framework
 43 //                                                 44 //
 44 // -------------------------------------------     45 // -------------------------------------------------------------------
 45 //                                                 46 //
 46                                                    47 
 47 #ifndef G4PAIPhotModel_h                           48 #ifndef G4PAIPhotModel_h
 48 #define G4PAIPhotModel_h 1                         49 #define G4PAIPhotModel_h 1
 49                                                    50 
 50 #include <CLHEP/Units/PhysicalConstants.h>         51 #include <CLHEP/Units/PhysicalConstants.h>
 51                                                    52 
 52 #include "G4VEmModel.hh"                           53 #include "G4VEmModel.hh"
 53 #include "G4VEmFluctuationModel.hh"                54 #include "G4VEmFluctuationModel.hh"
 54 #include "globals.hh"                              55 #include "globals.hh"
 55 #include <vector>                                  56 #include <vector>
 56                                                    57 
 57 class G4Region;                                    58 class G4Region;
 58 class G4MaterialCutsCouple;                        59 class G4MaterialCutsCouple;
 59 class G4ParticleChangeForLoss;                     60 class G4ParticleChangeForLoss;
 60                                                    61 
 61 class G4PAIPhotData;                               62 class G4PAIPhotData;
 62                                                    63 
 63 class G4PAIPhotModel final : public G4VEmModel <<  64 class G4PAIPhotModel : public G4VEmModel, public G4VEmFluctuationModel
 64 {                                                  65 {
 65                                                    66 
 66 public:                                            67 public:
 67                                                    68 
 68   explicit G4PAIPhotModel(const G4ParticleDefi <<  69   G4PAIPhotModel(const G4ParticleDefinition* p = 0, const G4String& nam = "PAI");
 69         const G4String& nam = "PAI");          << 
 70                                                    70 
 71   ~G4PAIPhotModel() final;                     <<  71   virtual ~G4PAIPhotModel();
 72                                                    72 
 73   void Initialise(const G4ParticleDefinition*, <<  73   virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
 74                                                    74 
 75   void InitialiseLocal(const G4ParticleDefinit <<  75   virtual void InitialiseLocal(const G4ParticleDefinition*, 
 76                        G4VEmModel* masterModel <<  76                                G4VEmModel* masterModel);
 77                                                    77 
 78   G4double MinEnergyCut(const G4ParticleDefini <<  78   virtual G4double ComputeDEDXPerVolume(const G4Material*,
 79                         const G4MaterialCutsCo <<  79              const G4ParticleDefinition*,
                                                   >>  80              G4double kineticEnergy,
                                                   >>  81              G4double cutEnergy);
 80                                                    82 
 81   G4double ComputeDEDXPerVolume(const G4Materi <<  83   virtual G4double CrossSectionPerVolume(const G4Material*,
 82                     const G4ParticleDefinition <<  84         const G4ParticleDefinition*,
 83               G4double kineticEnergy,          <<  85         G4double kineticEnergy,
 84               G4double cutEnergy) final;       <<  86         G4double cutEnergy,
                                                   >>  87         G4double maxEnergy);
 85                                                    88 
 86   G4double CrossSectionPerVolume(const G4Mater <<  89   virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
 87                const G4ParticleDefinition*,    << 
 88          G4double kineticEnergy,               << 
 89          G4double cutEnergy,                   << 
 90          G4double maxEnergy) final;            << 
 91                                                << 
 92   void SampleSecondaries(std::vector<G4Dynamic << 
 93          const G4MaterialCutsCouple*,              90          const G4MaterialCutsCouple*,
 94          const G4DynamicParticle*,                 91          const G4DynamicParticle*,
 95          G4double tmin,                            92          G4double tmin,
 96          G4double maxEnergy) final;            <<  93          G4double maxEnergy);
 97                                                << 
 98   G4double SampleFluctuations(const G4Material << 
 99             const G4DynamicParticle*,          << 
100             const G4double, const G4double,    << 
101                               const G4double,  << 
102                                                    94 
103   G4double Dispersion(const G4Material*, const <<  95   virtual G4double SampleFluctuations(const G4MaterialCutsCouple*,
104           const G4double, const G4double, cons <<  96               const G4DynamicParticle*,
                                                   >>  97               G4double,
                                                   >>  98               G4double,
                                                   >>  99               G4double);
                                                   >> 100 
                                                   >> 101   virtual G4double Dispersion(    const G4Material*,
                                                   >> 102           const G4DynamicParticle*,
                                                   >> 103           G4double,
                                                   >> 104           G4double);
105                                                   105 
106   void DefineForRegion(const G4Region* r) fina << 106   void DefineForRegion(const G4Region* r);
107                                                   107 
108   inline G4PAIPhotData* GetPAIPhotData();         108   inline G4PAIPhotData* GetPAIPhotData();
109                                                   109 
110   inline const std::vector<const G4MaterialCut << 
111                                                << 
112   inline G4double ComputeMaxEnergy(G4double sc    110   inline G4double ComputeMaxEnergy(G4double scaledEnergy);
113                                                   111 
114   inline void SetVerboseLevel(G4int verbose);     112   inline void SetVerboseLevel(G4int verbose);
115                                                   113 
116   // hide assignment operator                  << 
117   G4PAIPhotModel & operator=(const  G4PAIPhotM << 
118   G4PAIPhotModel(const  G4PAIPhotModel&) = del << 
119                                                << 
120 protected:                                        114 protected:
121                                                   115 
122   G4double MaxSecondaryEnergy(const G4Particle    116   G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
123               G4double kinEnergy) final;       << 117             G4double kinEnergy);
124                                                   118 
125 private:                                          119 private:
126                                                   120 
127   inline G4int FindCoupleIndex(const G4Materia    121   inline G4int FindCoupleIndex(const G4MaterialCutsCouple*);
128                                                   122 
129   inline void SetParticle(const G4ParticleDefi    123   inline void SetParticle(const G4ParticleDefinition* p);
130                                                   124 
                                                   >> 125   // hide assignment operator 
                                                   >> 126   G4PAIPhotModel & operator=(const  G4PAIPhotModel &right);
                                                   >> 127   G4PAIPhotModel(const  G4PAIPhotModel&);
                                                   >> 128 
131   G4int                       fVerbose;           129   G4int                       fVerbose; 
132                                                   130 
133   G4PAIPhotData*             fModelData;          131   G4PAIPhotData*             fModelData; 
134                                                   132 
135   std::vector<const G4MaterialCutsCouple*> fMa    133   std::vector<const G4MaterialCutsCouple*> fMaterialCutsCoupleVector;
136   std::vector<const G4Region*>      fPAIRegion    134   std::vector<const G4Region*>      fPAIRegionVector;
137                                                   135 
138   const G4ParticleDefinition* fParticle;          136   const G4ParticleDefinition* fParticle;
139   const G4ParticleDefinition* fElectron;          137   const G4ParticleDefinition* fElectron;
140   const G4ParticleDefinition* fPositron;          138   const G4ParticleDefinition* fPositron;
141   G4ParticleChangeForLoss*    fParticleChange;    139   G4ParticleChangeForLoss*    fParticleChange;
142                                                   140 
143   G4double fMass;                                 141   G4double fMass;
144   G4double fRatio;                                142   G4double fRatio;
145   G4double fChargeSquare;                         143   G4double fChargeSquare;
146   G4double fLowestTcut;                        << 144 
                                                   >> 145   G4bool   isInitialised;
147 };                                                146 };
148                                                   147 
149 inline G4PAIPhotData* G4PAIPhotModel::GetPAIPh    148 inline G4PAIPhotData* G4PAIPhotModel::GetPAIPhotData()
150 {                                                 149 {
151   return fModelData;                              150   return fModelData;
152 }                                                 151 }
153                                                   152 
154 inline const std::vector<const G4MaterialCutsC << 
155 G4PAIPhotModel::GetVectorOfCouples()           << 
156 {                                              << 
157   return fMaterialCutsCoupleVector;            << 
158 }                                              << 
159                                                << 
160 inline G4double G4PAIPhotModel::ComputeMaxEner    153 inline G4double G4PAIPhotModel::ComputeMaxEnergy(G4double scaledEnergy)
161 {                                                 154 {
162   return MaxSecondaryEnergy(fParticle, scaledE    155   return MaxSecondaryEnergy(fParticle, scaledEnergy/fRatio);
163 }                                                 156 }
164                                                   157 
165 inline void G4PAIPhotModel::SetVerboseLevel(G4    158 inline void G4PAIPhotModel::SetVerboseLevel(G4int verbose) 
166 {                                                 159 { 
167   fVerbose=verbose;                               160   fVerbose=verbose; 
168 }                                                 161 }
169                                                   162 
170 inline G4int G4PAIPhotModel::FindCoupleIndex(c    163 inline G4int G4PAIPhotModel::FindCoupleIndex(const G4MaterialCutsCouple* couple)
171 {                                                 164 {
172   G4int idx = -1;                                 165   G4int idx = -1;
173   G4int jMatMax = (G4int)fMaterialCutsCoupleVe << 166   size_t jMatMax = fMaterialCutsCoupleVector.size();
174   for(G4int jMat = 0;jMat < jMatMax; ++jMat) { << 167   for(size_t jMat = 0;jMat < jMatMax; ++jMat) { 
175     if(couple == fMaterialCutsCoupleVector[jMa    168     if(couple == fMaterialCutsCoupleVector[jMat]) {
176       idx = jMat;                                 169       idx = jMat; 
177       break;                                      170       break; 
178     }                                             171     }
179   }                                               172   }
180   return idx;                                     173   return idx;
181 }                                                 174 }
182                                                   175 
183 inline void G4PAIPhotModel::SetParticle(const     176 inline void G4PAIPhotModel::SetParticle(const G4ParticleDefinition* p)
184 {                                                 177 {
185   if(fParticle != p) {                            178   if(fParticle != p) {
186     fParticle = p;                                179     fParticle = p;
187     fMass = fParticle->GetPDGMass();              180     fMass = fParticle->GetPDGMass();
188     fRatio = CLHEP::proton_mass_c2/fMass;         181     fRatio = CLHEP::proton_mass_c2/fMass;
189     G4double q = fParticle->GetPDGCharge()/CLH    182     G4double q = fParticle->GetPDGCharge()/CLHEP::eplus;
190     fChargeSquare = q*q;                          183     fChargeSquare = q*q;
191   }                                               184   }
192 }                                                 185 }
193                                                   186 
194 #endif                                            187 #endif
                                                   >> 188 
                                                   >> 189 
                                                   >> 190 
                                                   >> 191 
                                                   >> 192 
                                                   >> 193 
                                                   >> 194 
195                                                   195