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.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/G4PAIModel.hh (Version 11.3.0) and /processes/electromagnetic/standard/include/G4PAIModel.hh (Version 8.2)


  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 //                                                 26 //
 27 // -------------------------------------------     27 // -------------------------------------------------------------------
 28 //                                                 28 //
 29 // GEANT4 Class header file                        29 // GEANT4 Class header file
 30 //                                                 30 //
 31 //                                                 31 //
 32 // File name:     G4PAIModel                       32 // File name:     G4PAIModel
 33 //                                                 33 //
 34 // Author:        V. Grichine based on Vladimi     34 // Author:        V. Grichine based on Vladimir Ivanchenko  code
 35 //                                                 35 //
 36 // Creation date: 05.10.2003                       36 // Creation date: 05.10.2003
 37 //                                                 37 //
 38 // Modifications:                                  38 // Modifications:
 39 // 08-04-05 Major optimisation of internal int     39 // 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
 40 // 26-09-07 Fixed tmax computation (V.Ivantche << 
 41 // 19.08.13 V.Ivanchenko extract data handling << 
 42 //          added sharing of internal data bet << 
 43 //                                                 40 //
 44 //                                                 41 //
 45 // Class Description:                              42 // Class Description:
 46 //                                                 43 //
 47 // Implementation of PAI model of energy loss      44 // Implementation of PAI model of energy loss and
 48 // delta-electron production by heavy charged      45 // delta-electron production by heavy charged particles
 49                                                    46 
 50 // -------------------------------------------     47 // -------------------------------------------------------------------
 51 //                                                 48 //
 52                                                    49 
 53 #ifndef G4PAIModel_h                               50 #ifndef G4PAIModel_h
 54 #define G4PAIModel_h 1                             51 #define G4PAIModel_h 1
 55                                                    52 
 56 #include <CLHEP/Units/PhysicalConstants.h>     <<  53 #include <vector>
 57                                                << 
 58 #include "G4VEmModel.hh"                           54 #include "G4VEmModel.hh"
 59 #include "G4VEmFluctuationModel.hh"            << 
 60 #include "globals.hh"                              55 #include "globals.hh"
 61 #include <vector>                              <<  56 #include "G4VEmFluctuationModel.hh"
 62                                                    57 
                                                   >>  58 class G4PhysicsLogVector;
                                                   >>  59 class G4PhysicsTable;
 63 class G4Region;                                    60 class G4Region;
 64 class G4MaterialCutsCouple;                        61 class G4MaterialCutsCouple;
 65 class G4ParticleChangeForLoss;                     62 class G4ParticleChangeForLoss;
 66 class G4PAIModelData;                          << 
 67                                                    63 
 68 class G4PAIModel final : public G4VEmModel, pu <<  64 class G4PAIModel : public G4VEmModel, public G4VEmFluctuationModel
 69 {                                                  65 {
 70                                                    66 
 71 public:                                            67 public:
 72                                                    68 
 73   explicit G4PAIModel(const G4ParticleDefiniti <<  69   G4PAIModel(const G4ParticleDefinition* p = 0, const G4String& nam = "PAI");
 74           const G4String& nam = "PAI");        << 
 75                                                    70 
 76   ~G4PAIModel() final;                         <<  71   virtual ~G4PAIModel();
 77                                                    72 
 78   void Initialise(const G4ParticleDefinition*, <<  73   virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
 79                                                    74 
 80   void InitialiseLocal(const G4ParticleDefinit <<  75   virtual void InitialiseMe(const G4ParticleDefinition*) {};
 81                        G4VEmModel* masterModel << 
 82                                                    76 
 83   G4double MinEnergyCut(const G4ParticleDefini <<  77   virtual G4double ComputeDEDX(const G4MaterialCutsCouple*,
 84                         const G4MaterialCutsCo <<  78              const G4ParticleDefinition*,
                                                   >>  79              G4double kineticEnergy,
                                                   >>  80              G4double cutEnergy);
                                                   >>  81 
                                                   >>  82   virtual G4double CrossSection(const G4MaterialCutsCouple*,
                                                   >>  83         const G4ParticleDefinition*,
                                                   >>  84         G4double kineticEnergy,
                                                   >>  85         G4double cutEnergy,
                                                   >>  86         G4double maxEnergy);
                                                   >>  87 
                                                   >>  88   virtual std::vector<G4DynamicParticle*>* SampleSecondaries(
                                                   >>  89                                 const G4MaterialCutsCouple*,
                                                   >>  90                                 const G4DynamicParticle*,
                                                   >>  91                                       G4double tmin,
                                                   >>  92                                       G4double maxEnergy);
                                                   >>  93 
                                                   >>  94   virtual G4double SampleFluctuations(const G4Material*,
                                                   >>  95               const G4DynamicParticle*,
                                                   >>  96               G4double&,
                                                   >>  97               G4double&,
                                                   >>  98               G4double&);
                                                   >>  99 
                                                   >> 100   virtual G4double Dispersion(    const G4Material*,
                                                   >> 101           const G4DynamicParticle*,
                                                   >> 102           G4double&,
                                                   >> 103           G4double&);
                                                   >> 104 
                                                   >> 105   void     DefineForRegion(const G4Region* r) ;
                                                   >> 106   void     ComputeSandiaPhotoAbsCof();
                                                   >> 107   void     BuildPAIonisationTable(const G4ParticleDefinition*);
                                                   >> 108   void     BuildLambdaVector(const G4MaterialCutsCouple* matCutsCouple);
                                                   >> 109   G4double GetdNdxCut( G4int iPlace, G4double transferCut);
                                                   >> 110   G4double GetdEdxCut( G4int iPlace, G4double transferCut);
                                                   >> 111   G4double GetPostStepTransfer( G4double scaledTkin );
                                                   >> 112   G4double GetEnergyTransfer( G4int iPlace,
                                                   >> 113                                           G4double position,
                                                   >> 114             G4int iTransfer );
 85                                                   115 
 86   G4double ComputeDEDXPerVolume(const G4Materi << 116   void SetVerboseLevel(G4int verbose){fVerbose=verbose;};
 87               const G4ParticleDefinition*,     << 
 88               G4double kineticEnergy,          << 
 89               G4double cutEnergy) final;       << 
 90                                                   117 
 91   G4double CrossSectionPerVolume(const G4Mater << 
 92                const G4ParticleDefinition*,    << 
 93          G4double kineticEnergy,               << 
 94          G4double cutEnergy,                   << 
 95          G4double maxEnergy) final;            << 
 96                                                   118 
 97   void SampleSecondaries(std::vector<G4Dynamic << 
 98          const G4MaterialCutsCouple*,          << 
 99          const G4DynamicParticle*,             << 
100          G4double tmin,                        << 
101          G4double maxEnergy) final;            << 
102                                                   119 
103   G4double SampleFluctuations(const G4Material << 120 protected:
104             const G4DynamicParticle*,          << 
105             const G4double, const G4double,    << 
106                               const G4double,  << 
107                                                   121 
108   G4double Dispersion(const G4Material*, const << 122   G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
109           const G4double, const G4double,      << 123                                     G4double kinEnergy);
110                       const G4double) final;   << 
111                                                   124 
112   void DefineForRegion(const G4Region* r) fina << 125 private:
113                                                   126 
114   inline G4PAIModelData* GetPAIModelData();    << 127   void SetParticle(const G4ParticleDefinition* p);
115                                                   128 
116   inline const std::vector<const G4MaterialCut << 129   // hide assignment operator 
                                                   >> 130   G4PAIModel & operator=(const  G4PAIModel &right);
                                                   >> 131   G4PAIModel(const  G4PAIModel&);
117                                                   132 
118   inline G4double ComputeMaxEnergy(G4double sc << 133   // The vector over proton kinetic energies: the range of gammas
                                                   >> 134   G4int                fVerbose; 
                                                   >> 135   G4double             fLowestGamma;
                                                   >> 136   G4double             fHighestGamma;
                                                   >> 137   G4double             fLowestKineticEnergy;
                                                   >> 138   G4double             fHighestKineticEnergy;
                                                   >> 139   G4int                fTotBin;
                                                   >> 140   G4int                fMeanNumber;
                                                   >> 141   G4PhysicsLogVector*  fParticleEnergyVector ;
119                                                   142 
120   inline void SetVerboseLevel(G4int verbose);  << 
121                                                   143 
122   // hide assignment operator                  << 
123   G4PAIModel & operator=(const  G4PAIModel &ri << 
124   G4PAIModel(const  G4PAIModel&) = delete;     << 
125                                                   144 
126 protected:                                     << 145   // vectors
127                                                   146 
128   G4double MaxSecondaryEnergy(const G4Particle << 147   G4PhysicsTable*                    fPAItransferTable;
129                               G4double kinEner << 148   std::vector<G4PhysicsTable*>       fPAIxscBank;
130                                                   149 
131 private:                                       << 150   G4PhysicsTable*                    fPAIdEdxTable;
                                                   >> 151   std::vector<G4PhysicsTable*>       fPAIdEdxBank;
132                                                   152 
133   inline G4int FindCoupleIndex(const G4Materia << 153   std::vector<const G4MaterialCutsCouple*> fMaterialCutsCoupleVector;
                                                   >> 154   std::vector<const G4Region*>       fPAIRegionVector;
134                                                   155 
135   inline void SetParticle(const G4ParticleDefi << 156   size_t                             fMatIndex ;  
                                                   >> 157   G4double**                         fSandiaPhotoAbsCof ;
                                                   >> 158   G4int                              fSandiaIntervalNumber ;
136                                                   159 
137   G4int                       fVerbose;        << 160   G4PhysicsLogVector*                fdEdxVector ;
                                                   >> 161   std::vector<G4PhysicsLogVector*>   fdEdxTable ;
138                                                   162 
139   G4PAIModelData*             fModelData;      << 163   G4PhysicsLogVector*              fLambdaVector ;
                                                   >> 164   std::vector<G4PhysicsLogVector*> fLambdaTable ;
140                                                   165 
141   std::vector<const G4MaterialCutsCouple*> fMa << 166   G4PhysicsLogVector*              fdNdxCutVector ;
142   std::vector<const G4Region*>      fPAIRegion << 167   std::vector<G4PhysicsLogVector*> fdNdxCutTable ;
143                                                   168 
144   const G4ParticleDefinition* fParticle;          169   const G4ParticleDefinition* fParticle;
145   const G4ParticleDefinition* fElectron;       << 
146   const G4ParticleDefinition* fPositron;       << 
147   G4ParticleChangeForLoss*    fParticleChange;    170   G4ParticleChangeForLoss*    fParticleChange;
148                                                   171 
149   G4double fMass;                                 172   G4double fMass;
150   G4double fRatio;                             << 173   G4double fSpin;
151   G4double fChargeSquare;                         174   G4double fChargeSquare;
152   G4double fLowestTcut;                        << 175   G4double fRatio;
                                                   >> 176   G4double fHighKinEnergy;
                                                   >> 177   G4double fLowKinEnergy;
                                                   >> 178   G4double fTwoln10;
                                                   >> 179   G4double fBg2lim; 
                                                   >> 180   G4double fTaulim;
                                                   >> 181   G4double fQc;
153 };                                                182 };
154                                                   183 
155 inline G4PAIModelData* G4PAIModel::GetPAIModel << 184 /////////////////////////////////////////////////////////////////////
156 {                                              << 
157   return fModelData;                           << 
158 }                                              << 
159                                                << 
160 inline const std::vector<const G4MaterialCutsC << 
161 G4PAIModel::GetVectorOfCouples()               << 
162 {                                              << 
163   return fMaterialCutsCoupleVector;            << 
164 }                                              << 
165                                                   185 
166 inline G4double G4PAIModel::ComputeMaxEnergy(G << 186 inline G4double G4PAIModel::MaxSecondaryEnergy( const G4ParticleDefinition*,
                                                   >> 187                                                       G4double kinEnergy) 
167 {                                                 188 {
168   return MaxSecondaryEnergy(fParticle, scaledE << 
169 }                                              << 
170                                                   189 
171 inline void G4PAIModel::SetVerboseLevel(G4int  << 190   G4double gamma= kinEnergy/fMass + 1.0;
172 {                                              << 191   G4double tmax = 2.0*electron_mass_c2*(gamma*gamma - 1.) /
173   fVerbose=verbose;                            << 192                   (1. + 2.0*gamma*fRatio + fRatio*fRatio);
                                                   >> 193   
                                                   >> 194   return tmax;
174 }                                                 195 }
175                                                   196 
176 inline G4int G4PAIModel::FindCoupleIndex(const << 197 ///////////////////////////////////////////////////////////////
177 {                                              << 
178   G4int idx = -1;                              << 
179   G4int jMatMax = (G4int)fMaterialCutsCoupleVe << 
180   for(G4int jMat = 0;jMat < jMatMax; ++jMat) { << 
181     if(couple == fMaterialCutsCoupleVector[jMa << 
182       idx = jMat;                              << 
183       break;                                   << 
184     }                                          << 
185   }                                            << 
186   return idx;                                  << 
187 }                                              << 
188                                                   198 
189 inline void G4PAIModel::SetParticle(const G4Pa << 199 inline  void G4PAIModel::DefineForRegion(const G4Region* r) 
190 {                                                 200 {
191   if(fParticle != p) {                         << 201   fPAIRegionVector.push_back(r);
192     fParticle = p;                             << 
193     fMass = fParticle->GetPDGMass();           << 
194     fRatio = CLHEP::proton_mass_c2/fMass;      << 
195     G4double q = fParticle->GetPDGCharge()/CLH << 
196     fChargeSquare = q*q;                       << 
197   }                                            << 
198 }                                                 202 }
199                                                   203 
200 #endif                                            204 #endif
                                                   >> 205 
                                                   >> 206 
                                                   >> 207 
                                                   >> 208 
                                                   >> 209 
                                                   >> 210 
                                                   >> 211 
201                                                   212