Ignore:
Timestamp:
May 28, 2009, 4:26:57 PM (17 years ago)
Author:
garnier
Message:

maj sur la beta de geant 4.9.3

Location:
trunk/source/processes/electromagnetic/standard/include
Files:
26 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/electromagnetic/standard/include/G4BetheBlochModel.hh

    r1007 r1055  
    2424// ********************************************************************
    2525//
    26 // $Id: G4BetheBlochModel.hh,v 1.16 2008/10/22 16:00:57 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4BetheBlochModel.hh,v 1.20 2009/04/23 17:44:43 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    6464
    6565#include "G4VEmModel.hh"
     66#include "G4NistManager.hh"
    6667
    6768class G4EmCorrections;
    6869class G4ParticleChangeForLoss;
    69 class G4NistManager;
    70 
    7170
    7271class G4BetheBlochModel : public G4VEmModel
     
    8281  virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
    8382
    84   G4double MinEnergyCut(const G4ParticleDefinition*,
    85                         const G4MaterialCutsCouple*);
     83  virtual G4double MinEnergyCut(const G4ParticleDefinition*,
     84                                const G4MaterialCutsCouple*);
    8685                       
    8786  virtual G4double ComputeCrossSectionPerElectron(
     
    131130protected:
    132131
    133   G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
    134                               G4double kinEnergy);
     132  virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
     133                                      G4double kinEnergy);
    135134
    136135private:
    137136
    138   void SetParticle(const G4ParticleDefinition* p);
     137  inline void SetupParameters();
     138
     139  inline void SetParticle(const G4ParticleDefinition* p);
     140
     141  inline void SetGenericIon(const G4ParticleDefinition* p);
    139142
    140143  // hide assignment operator
     
    166169//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    167170
    168 inline G4double G4BetheBlochModel::MaxSecondaryEnergy(
    169           const G4ParticleDefinition* pd,
    170                 G4double kinEnergy)
    171 {
    172   if(isIon) SetParticle(pd);
    173   G4double tau  = kinEnergy/mass;
    174   G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) /
    175                   (1. + 2.0*(tau + 1.)*ratio + ratio*ratio);
    176   return std::min(tmax,tlimit);
     171inline void G4BetheBlochModel::SetupParameters()
     172{
     173  mass = particle->GetPDGMass();
     174  spin = particle->GetPDGSpin();
     175  G4double q = particle->GetPDGCharge()/eplus;
     176  chargeSquare = q*q;
     177  ratio = electron_mass_c2/mass;
     178  G4double magmom = particle->GetPDGMagneticMoment()*mass/(0.5*eplus*hbar_Planck*c_squared);
     179  magMoment2 = magmom*magmom - 1.0;
     180  formfact = 0.0;
     181  if(particle->GetLeptonNumber() == 0) {
     182    G4double x = 0.8426*GeV;
     183    if(spin == 0.0 && mass < GeV) {x = 0.736*GeV;}
     184    else if(mass > GeV) {
     185      x /= nist->GetZ13(mass/proton_mass_c2);
     186      //        tlimit = 51.2*GeV*A13[iz]*A13[iz];
     187    }
     188    formfact = 2.0*electron_mass_c2/(x*x);
     189    tlimit   = 2.0/formfact;
     190  }
    177191}
    178192
    179193//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    180194
     195inline void G4BetheBlochModel::SetParticle(const G4ParticleDefinition* p)
     196{
     197  if(particle != p) {
     198    particle = p;
     199    if (p->GetPDGCharge()/eplus > 1.5 && p->GetBaryonNumber() > 2) isIon = true;
     200    SetupParameters();
     201  }
     202}
     203
     204//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     205
     206inline void G4BetheBlochModel::SetGenericIon(const G4ParticleDefinition* p)
     207{
     208  if(p && particle != p) {
     209    if(p->GetParticleName() == "GenericIon") isIon = true;
     210  }
     211}
     212
    181213#endif
  • trunk/source/processes/electromagnetic/standard/include/G4BohrFluctuations.hh

    r1007 r1055  
    2424// ********************************************************************
    2525//
    26 // $Id: G4BohrFluctuations.hh,v 1.3 2007/09/27 13:53:11 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4BohrFluctuations.hh,v 1.4 2009/02/19 19:17:50 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    7979  void InitialiseMe(const G4ParticleDefinition*);
    8080
    81 protected:
    82 
    8381private:
    8482
     
    103101//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    104102
    105 
    106 inline G4double G4BohrFluctuations::Dispersion(
    107                           const G4Material* material,
    108                           const G4DynamicParticle* dp,
    109                                 G4double& tmax,
    110                                 G4double& length)
    111 {
    112   if(!particle) InitialiseMe(dp->GetDefinition());
    113 
    114   G4double electronDensity = material->GetElectronDensity();
    115   kineticEnergy = dp->GetKineticEnergy();
    116   G4double etot = kineticEnergy + particleMass;
    117   beta2 = kineticEnergy*(kineticEnergy + 2.0*particleMass)/(etot*etot);
    118   G4double siga  = (1.0/beta2 - 0.5) * twopi_mc2_rcl2 * tmax * length
    119                  * electronDensity * chargeSquare;
    120 
    121   return siga;
    122 }
    123 
    124 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    125 
    126103#endif
    127104
  • trunk/source/processes/electromagnetic/standard/include/G4BraggIonModel.hh

    r1007 r1055  
    2424// ********************************************************************
    2525//
    26 // $Id: G4BraggIonModel.hh,v 1.11 2008/10/22 16:00:57 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4BraggIonModel.hh,v 1.12 2009/02/20 12:06:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    7777  virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
    7878
    79   G4double MinEnergyCut(const G4ParticleDefinition*,
    80                         const G4MaterialCutsCouple*);
     79  virtual G4double MinEnergyCut(const G4ParticleDefinition*,
     80                                const G4MaterialCutsCouple*);
    8181                       
    8282  virtual G4double ComputeCrossSectionPerElectron(
     
    128128protected:
    129129
    130   G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
    131                               G4double kinEnergy);
     130  virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
     131                                      G4double kinEnergy);
    132132
    133133private:
     
    180180//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    181181
    182 inline G4double G4BraggIonModel::MaxSecondaryEnergy(
    183           const G4ParticleDefinition* pd,
    184                 G4double kinEnergy)
    185 {
    186   if(pd != particle) SetParticle(pd);
    187   G4double tau  = kinEnergy/mass;
    188   G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) /
    189                   (1. + 2.0*(tau + 1.)*ratio + ratio*ratio);
    190   return tmax;
    191 }
    192 
    193 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    194 
    195182inline void G4BraggIonModel::SetParticle(const G4ParticleDefinition* p)
    196183{
  • trunk/source/processes/electromagnetic/standard/include/G4BraggModel.hh

    r1007 r1055  
    2424// ********************************************************************
    2525//
    26 // $Id: G4BraggModel.hh,v 1.12 2008/09/14 17:11:48 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4BraggModel.hh,v 1.13 2009/02/20 12:06:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    8080  virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
    8181
    82   G4double MinEnergyCut(const G4ParticleDefinition*,
    83                         const G4MaterialCutsCouple*);
     82  virtual G4double MinEnergyCut(const G4ParticleDefinition*,
     83                                const G4MaterialCutsCouple*);
    8484                       
    8585  virtual G4double ComputeCrossSectionPerElectron(
     
    131131protected:
    132132
    133   G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
    134                               G4double kinEnergy);
     133  virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
     134                                      G4double kinEnergy);
    135135
    136136private:
    137137
    138   void SetParticle(const G4ParticleDefinition* p);
     138  inline void SetParticle(const G4ParticleDefinition* p);
    139139
    140140  G4bool HasMaterial(const G4Material* material);
     
    182182  G4bool   isInitialised;
    183183};
    184 
    185 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    186 
    187 inline G4double G4BraggModel::MaxSecondaryEnergy(
    188                                             const G4ParticleDefinition* pd,
    189                                                   G4double kinEnergy)
    190 {
    191   if(pd != particle) SetParticle(pd);
    192   G4double tau  = kinEnergy/mass;
    193   G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) /
    194                   (1. + 2.0*(tau + 1.)*ratio + ratio*ratio);
    195   return tmax;
    196 }
    197184
    198185//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/source/processes/electromagnetic/standard/include/G4ComptonScattering.hh

    r1007 r1055  
    2525//
    2626//
    27 // $Id: G4ComptonScattering.hh,v 1.20 2007/05/23 08:47:34 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-02 $
     27// $Id: G4ComptonScattering.hh,v 1.21 2009/02/20 12:06:37 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2929//
    3030//------------------ G4ComptonScattering physics process -----------------------
     
    8282
    8383  // true for Gamma only. 
    84   G4bool IsApplicable(const G4ParticleDefinition&);
     84  virtual G4bool IsApplicable(const G4ParticleDefinition&);
    8585 
    8686  // Print few lines of informations about the process: validity range,
    8787  virtual void PrintInfo();
    88 
    8988
    9089protected:
     
    9796};
    9897
    99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    101 
    102 inline
    103 G4bool G4ComptonScattering::IsApplicable(const G4ParticleDefinition& p)
    104 {
    105   return (&p == G4Gamma::Gamma());
    106 }
    107 
    10898//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    10999 
  • trunk/source/processes/electromagnetic/standard/include/G4CoulombScattering.hh

    r1007 r1055  
    2424// ********************************************************************
    2525//
    26 // $Id: G4CoulombScattering.hh,v 1.11 2008/06/13 08:19:43 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4CoulombScattering.hh,v 1.13 2009/05/07 18:41:45 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    5959public:
    6060
    61   G4CoulombScattering(const G4String& name = "eCoulombScat");
     61  G4CoulombScattering(const G4String& name = "CoulombScat");
    6262
    6363  virtual ~G4CoulombScattering();
     
    104104//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    105105
    106 inline G4bool G4CoulombScattering::IsApplicable(const G4ParticleDefinition& p)
    107 {
    108   return (p.GetPDGCharge() != 0.0 && !p.IsShortLived());
    109 }
    110 
    111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    112 
    113106inline void G4CoulombScattering::SetThetaMin(G4double val)
    114107{
  • trunk/source/processes/electromagnetic/standard/include/G4GammaConversion.hh

    r1007 r1055  
    2525//
    2626//
    27 // $Id: G4GammaConversion.hh,v 1.22 2007/05/23 08:47:34 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-02 $
     27// $Id: G4GammaConversion.hh,v 1.23 2009/02/20 12:06:37 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2929//
    3030//
     
    8585
    8686  // true for Gamma only.
    87   G4bool IsApplicable(const G4ParticleDefinition&);
     87  virtual G4bool IsApplicable(const G4ParticleDefinition&);
    8888
    8989  // Print few lines of informations about the process: validity range,
     
    9999};
    100100
    101 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    102 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    103 
    104 inline G4bool G4GammaConversion::IsApplicable(const G4ParticleDefinition& p)
    105 {
    106   return (&p == G4Gamma::Gamma());
    107 }
    108 
    109101//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    110102 
  • trunk/source/processes/electromagnetic/standard/include/G4IonFluctuations.hh

    r1007 r1055  
    2424// ********************************************************************
    2525//
    26 // $Id: G4IonFluctuations.hh,v 1.8 2008/10/22 16:04:33 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4IonFluctuations.hh,v 1.9 2009/02/19 19:17:50 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    8484
    8585  // Initialisation prestep
    86   inline void SetParticleAndCharge(const G4ParticleDefinition*, G4double q2);
     86  void SetParticleAndCharge(const G4ParticleDefinition*, G4double q2);
    8787
    8888private:
     
    117117//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    118118
    119 inline
    120 void G4IonFluctuations::SetParticleAndCharge(const G4ParticleDefinition* part,
    121                                              G4double q2)
    122 {
    123   if(part != particle) {
    124     particle       = part;
    125     particleMass   = part->GetPDGMass();
    126     charge         = part->GetPDGCharge()/eplus;
    127     chargeSquare   = charge*charge;
    128   }
    129   effChargeSquare  = q2;
    130   uniFluct.SetParticleAndCharge(part, q2);
    131 }
    132 
    133 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    134 
    135119#endif
    136120
  • trunk/source/processes/electromagnetic/standard/include/G4MollerBhabhaModel.hh

    r1007 r1055  
    2424// ********************************************************************
    2525//
    26 // $Id: G4MollerBhabhaModel.hh,v 1.19 2007/05/22 17:34:36 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4MollerBhabhaModel.hh,v 1.20 2009/02/20 12:06:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    7474  virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
    7575
    76   G4double MinEnergyCut(const G4ParticleDefinition*,
    77                         const G4MaterialCutsCouple*);
     76  virtual G4double MinEnergyCut(const G4ParticleDefinition*,
     77                                const G4MaterialCutsCouple*);
    7878                               
    7979  virtual G4double ComputeCrossSectionPerElectron(
     
    109109protected:
    110110
    111   G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
    112                               G4double kinEnergy);
     111  virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
     112                                      G4double kinEnergy);
    113113                             
    114   void SetParticle(const G4ParticleDefinition* p);                           
     114  inline void SetParticle(const G4ParticleDefinition* p);                             
    115115
    116116  const G4ParticleDefinition* particle;
     
    127127  G4MollerBhabhaModel & operator=(const  G4MollerBhabhaModel &right);
    128128  G4MollerBhabhaModel(const  G4MollerBhabhaModel&);
     129
     130  G4bool   isInitialised;
     131
    129132};
    130133
    131134//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    132135
    133 inline G4double G4MollerBhabhaModel::MaxSecondaryEnergy(
    134                                                    const G4ParticleDefinition*,
    135                                                          G4double kinEnergy)
     136inline void G4MollerBhabhaModel::SetParticle(const G4ParticleDefinition* p)
    136137{
    137   G4double tmax = kinEnergy;
    138   if(isElectron) tmax *= 0.5;
    139   return tmax;
     138  particle = p;
     139  if(p != theElectron) isElectron = false;
    140140}
    141141
  • trunk/source/processes/electromagnetic/standard/include/G4PAIModel.hh

    r1007 r1055  
    2424// ********************************************************************
    2525//
     26// $Id: G4PAIModel.hh,v 1.22 2009/02/19 19:17:50 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2628//
    2729// -------------------------------------------------------------------
     
    7577  virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
    7678
    77   virtual void InitialiseMe(const G4ParticleDefinition*) {};
    78 
    79   virtual G4double ComputeDEDX(const G4MaterialCutsCouple*,
     79  virtual void InitialiseMe(const G4ParticleDefinition*);
     80
     81  virtual G4double ComputeDEDXPerVolume(const G4Material*,
    8082                               const G4ParticleDefinition*,
    8183                               G4double kineticEnergy,
    8284                               G4double cutEnergy);
    8385
    84   virtual G4double CrossSection(const G4MaterialCutsCouple*,
     86  virtual G4double CrossSectionPerVolume(const G4Material*,
    8587                                const G4ParticleDefinition*,
    8688                                G4double kineticEnergy,
     
    118120
    119121  void SetVerboseLevel(G4int verbose){fVerbose=verbose;};
    120 
    121 
    122122
    123123protected:
     
    192192};
    193193
    194 /////////////////////////////////////////////////////////////////////
    195 
    196 inline G4double G4PAIModel::MaxSecondaryEnergy( const G4ParticleDefinition* p,
    197                                                       G4double kinEnergy)
    198 {
    199   G4double tmax = kinEnergy;
    200   if(p == fElectron) tmax *= 0.5;
    201   else if(p != fPositron) {
    202     G4double mass = p->GetPDGMass();
    203     G4double ratio= electron_mass_c2/mass;
    204     G4double gamma= kinEnergy/mass + 1.0;
    205     tmax = 2.0*electron_mass_c2*(gamma*gamma - 1.) /
    206                   (1. + 2.0*gamma*ratio + ratio*ratio);
    207   }
    208   return tmax;
    209 }
    210 
    211 ///////////////////////////////////////////////////////////////
    212 
    213 inline  void G4PAIModel::DefineForRegion(const G4Region* r)
    214 {
    215   fPAIRegionVector.push_back(r);
    216 }
    217 
    218194#endif
    219195
  • trunk/source/processes/electromagnetic/standard/include/G4PAIPhotonModel.hh

    r1007 r1055  
    2424// ********************************************************************
    2525//
     26// $Id: G4PAIPhotonModel.hh,v 1.12 2009/02/19 19:17:50 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2628//
    2729// -------------------------------------------------------------------
     
    7476  virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
    7577 
    76   virtual void InitialiseMe(const G4ParticleDefinition*) {};
    77 
    78   virtual G4double ComputeDEDX(const G4MaterialCutsCouple*,
    79                                const G4ParticleDefinition*,
    80                                G4double kineticEnergy,
    81                                G4double cutEnergy);
    82 
    83   virtual G4double CrossSection(const G4MaterialCutsCouple*,
    84                                 const G4ParticleDefinition*,
    85                                 G4double kineticEnergy,
    86                                 G4double cutEnergy,
    87                                 G4double maxEnergy);
     78  virtual void InitialiseMe(const G4ParticleDefinition*);
     79
     80  virtual G4double ComputeDEDXPerVolume(const G4Material*,
     81                                        const G4ParticleDefinition*,
     82                                        G4double kineticEnergy,
     83                                        G4double cutEnergy);
     84
     85  virtual G4double CrossSectionPerVolume(const G4Material*,
     86                                         const G4ParticleDefinition*,
     87                                         G4double kineticEnergy,
     88                                         G4double cutEnergy,
     89                                         G4double maxEnergy);
    8890
    8991  virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
     
    122124                             G4double position, G4int iTransfer );
    123125
    124 
    125 
    126126protected:
    127127
    128128  G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
    129                                     G4double kinEnergy);
     129                              G4double kinEnergy);
    130130
    131131private:
     
    145145  G4int                fVerbose;
    146146  G4PhysicsLogVector*  fProtonEnergyVector ;
    147 
    148 
    149147
    150148  // vectors
     
    204202};
    205203
    206 /////////////////////////////////////////////////////////////////////
    207 
    208 inline G4double G4PAIPhotonModel::MaxSecondaryEnergy( const G4ParticleDefinition* p,
    209                                                       G4double kinEnergy)
    210 {
    211   G4double tmax = kinEnergy;
    212   if(p == fElectron) tmax *= 0.5;
    213   else if(p != fPositron) {
    214     G4double mass = p->GetPDGMass();
    215     G4double ratio= electron_mass_c2/mass;
    216     G4double gamma= kinEnergy/mass + 1.0;
    217     tmax = 2.0*electron_mass_c2*(gamma*gamma - 1.) /
    218                   (1. + 2.0*gamma*ratio + ratio*ratio);
    219   }
    220   return tmax;
    221 }
    222 
    223 ///////////////////////////////////////////////////////////////
    224 
    225 inline  void G4PAIPhotonModel::DefineForRegion(const G4Region* r)
    226 {
    227   fPAIRegionVector.push_back(r);
    228 }
    229 
    230204#endif
    231205
  • trunk/source/processes/electromagnetic/standard/include/G4PEEffectModel.hh

    r1007 r1055  
    2424// ********************************************************************
    2525//
    26 // $Id: G4PEEffectModel.hh,v 1.6 2007/05/22 17:34:36 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4PEEffectModel.hh,v 1.7 2009/02/20 12:06:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    4141//
    4242// 06.02.2006 : added ComputeMeanFreePath()  (mma)
     43// 20.02.2009 : move virtual inline to .cc, substitute
     44//              ComputeMeanFreePath() by CrossSectionPerVolume (VI)
    4345//
    4446// Class Description:
     
    7072  virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
    7173
    72   G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
    73                                       G4double kinEnergy,
    74                                       G4double Z,
    75                                       G4double A,
    76                                       G4double, G4double);
     74  virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
     75                                              G4double kinEnergy,
     76                                              G4double Z,
     77                                              G4double A,
     78                                              G4double, G4double);
    7779                                     
    78   G4double ComputeMeanFreePath( const G4ParticleDefinition*,
    79                                       G4double kinEnergy,
    80                                 const G4Material* material,     
    81                                       G4double, G4double);
     80  virtual G4double CrossSectionPerVolume(const G4Material*,
     81                                         const G4ParticleDefinition*,
     82                                         G4double kineticEnergy,
     83                                         G4double cutEnergy,
     84                                         G4double maxEnergy);
    8285
    8386  virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
     
    100103};
    101104
    102 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
    103 
    104 inline G4double G4PEEffectModel::ComputeCrossSectionPerAtom(
    105                                        const G4ParticleDefinition*,
    106                                              G4double energy,
    107                                              G4double Z, G4double,
    108                                              G4double, G4double)
    109 {
    110  G4double* SandiaCof = G4SandiaTable::GetSandiaCofPerAtom((G4int)Z, energy);
    111 
    112  G4double energy2 = energy*energy, energy3 = energy*energy2,
    113           energy4 = energy2*energy2;
    114 
    115  return SandiaCof[0]/energy  + SandiaCof[1]/energy2 +
    116         SandiaCof[2]/energy3 + SandiaCof[3]/energy4;
    117 }
    118 
    119 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    120 
    121 inline G4double G4PEEffectModel::ComputeMeanFreePath(
    122                                        const G4ParticleDefinition*,
    123                                              G4double energy,
    124                                        const G4Material* material,
    125                                              G4double, G4double)
    126 {
    127  G4double* SandiaCof = material->GetSandiaTable()
    128                                 ->GetSandiaCofForMaterial(energy);
    129                                
    130  G4double energy2 = energy*energy, energy3 = energy*energy2,
    131           energy4 = energy2*energy2;
    132          
    133  G4double cross = SandiaCof[0]/energy  + SandiaCof[1]/energy2 +
    134                   SandiaCof[2]/energy3 + SandiaCof[3]/energy4;
    135  
    136  G4double mfp = DBL_MAX;
    137  if (cross > 0.) mfp = 1./cross;
    138  return mfp;
    139 }
    140 
    141105//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    142106
  • trunk/source/processes/electromagnetic/standard/include/G4PhotoElectricEffect.hh

    r1007 r1055  
    2525//
    2626//
    27 // $Id: G4PhotoElectricEffect.hh,v 1.24 2007/05/23 08:47:34 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-02 $
     27// $Id: G4PhotoElectricEffect.hh,v 1.25 2009/02/20 12:06:37 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2929//
    3030//
     
    9191
    9292  // true for Gamma only.
    93   G4bool IsApplicable(const G4ParticleDefinition&);
     93  virtual G4bool IsApplicable(const G4ParticleDefinition&);
    9494
    9595  // Print few lines of informations about the process: validity range,
    96   void PrintInfo();
     96  virtual void PrintInfo();
    9797
    9898protected:
    9999
    100   void InitialiseProcess(const G4ParticleDefinition*);
     100  virtual void InitialiseProcess(const G4ParticleDefinition*);
    101101
    102102private:
     
    105105};
    106106
    107 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    109 
    110 inline
    111 G4bool G4PhotoElectricEffect::IsApplicable(const G4ParticleDefinition& p)
    112 {
    113   return (&p == G4Gamma::Gamma());
    114 }
    115 
    116107//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    117108
  • trunk/source/processes/electromagnetic/standard/include/G4UniversalFluctuation.hh

    r1007 r1055  
    2424// ********************************************************************
    2525//
    26 // $Id: G4UniversalFluctuation.hh,v 1.6 2008/10/22 16:04:33 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4UniversalFluctuation.hh,v 1.10 2009/03/19 14:15:17 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    7070  virtual ~G4UniversalFluctuation();
    7171
    72   G4double SampleFluctuations(const G4Material*,
    73                           const G4DynamicParticle*,
    74                                 G4double&,
    75                                 G4double&,
    76                                 G4double&);
     72  virtual G4double SampleFluctuations(const G4Material*,
     73                                      const G4DynamicParticle*,
     74                                      G4double&,
     75                                      G4double&,
     76                                      G4double&);
    7777
    78   G4double Dispersion(    const G4Material*,
    79                           const G4DynamicParticle*,
    80                                 G4double&,
    81                                 G4double&);
     78  virtual G4double Dispersion(    const G4Material*,
     79                                  const G4DynamicParticle*,
     80                                  G4double&,
     81                                  G4double&);
    8282
    83   void InitialiseMe(const G4ParticleDefinition*);
     83  virtual void InitialiseMe(const G4ParticleDefinition*);
    8484
    8585  // Initialisation prestep
    86   inline void SetParticleAndCharge(const G4ParticleDefinition*, G4double q2);
    87 
    88 protected:
     86  virtual void SetParticleAndCharge(const G4ParticleDefinition*, G4double q2);
    8987
    9088private:
     
    113111  G4double e0;
    114112
    115   G4double facwidth;
    116   G4double oldloss;
    117   G4double samestep;
    118113  G4double e1,e2;
    119114
     
    126121};
    127122
    128 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    129 
    130 inline void
    131 G4UniversalFluctuation::SetParticleAndCharge(const G4ParticleDefinition* part,
    132                                              G4double q2)
    133 {
    134   if(part != particle) {
    135     particle       = part;
    136     particleMass   = part->GetPDGMass();
    137   }
    138   chargeSquare = q2;
    139 }
    140 
    141123//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    142124
  • trunk/source/processes/electromagnetic/standard/include/G4UrbanMscModel.hh

    r1007 r1055  
    2424// ********************************************************************
    2525//
    26 // $Id: G4UrbanMscModel.hh,v 1.33 2008/03/10 10:39:21 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4UrbanMscModel.hh,v 1.35 2009/04/29 13:30:22 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    3737// Author:        Laszlo Urban
    3838//
    39 // Creation date: 01.03.2001
     39// Creation date: 06.03.2008
    4040//
    4141// Modifications:
    4242//
    43 // 27-03-03 Move model part from G4MultipleScattering (V.Ivanchenko)
    44 // 27-03-03 Rename (V.Ivanchenko)
    45 //
    46 // 05-08-03 angle distribution has been modified (L.Urban)
    47 // 26-11-03 new data member currentRange (L.Urban)
    48 // 01-03-04 changes in data members + signature changed in SampleCosineTheta
    49 // 11-03-04 changes in data members (L.Urban)
    50 // 23-04-04 changes in data members and in signature of SampleCosineTheta
    51 //          (L.Urban)
    52 // 17-08-04 name of data member facxsi changed to factail (L.Urban)
    53 // 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
    54 // 15-04-05 optimize internal interface - add SampleSecondaries method (V.Ivanchenko)
    55 // 11-08-05 computation of lateral correlation added (L.Urban)
    56 // 02-10-05 nuclear size correction computation removed, the correction
    57 //          included in the (theoretical) tabulated values (L.Urban)
    58 // 16-02-06 data members b and xsi have been removed (L.Urban)
    59 // 17-02-06 Save table of transport cross sections not mfp (V.Ivanchenko)
    60 // 07-03-06 Create G4UrbanMscModel and move there step limit calculation (V.Ivanchenko)
    61 // 10-05-06 SetMscStepLimitation at initialisation (V.Ivantchenko)
    62 // 11-05-06 name of data member safety changed to presafety, some new data
    63 //          members added (frscaling1,frscaling2,tlimitminfix,nstepmax)
    64 //         (L.Urban)
    65 // 13-10-06 data member factail removed, data member tkinlimit changed
    66 //          to lambdalimit,
    67 //          new data members tgeom,tnow,skin,skindepth,Zeff,geomlimit
    68 //          G4double GeomLimit(const G4Track& track) changed to
    69 //              void GeomLimit(const G4Track& track) (L.Urban)
    70 // 20-10-06 parameter theta0 now computed in the (public)
    71 //          function ComputeTheta0,
    72 //          single scattering modified allowing not small
    73 //          angles as well (L.Urban)
    74 // 31-01-07 code cleaning (L.Urban)
    75 // 06-02-07 Move SetMscStepLimitation method into the source (VI)
    76 // 15-02-07 new data member : smallstep (L.Urban)
    77 // 10-04-07 remove navigator, smallstep, tnow (V.Ivanchenko)
    78 //
     43// 28-04-09  move G4UrbanMscModel2 from the g49.2 to G4UrbanMscModel.
     44//           now it is frozen (V.Ivanchenk0)
    7945//
    8046// Class Description:
     
    11177
    11278  void Initialise(const G4ParticleDefinition*, const G4DataVector&);
    113                                          
     79
    11480  G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition* particle,
    11581                                      G4double KineticEnergy,
     
    11985                                      G4double emax=DBL_MAX);
    12086
    121   void SampleSecondaries(std::vector<G4DynamicParticle*>*,
    122                          const G4MaterialCutsCouple*,
    123                          const G4DynamicParticle*,
    124                          G4double,
    125                          G4double);
    126 
    12787  void SampleScattering(const G4DynamicParticle*,
    12888                        G4double safety);
     
    141101private:
    142102
     103  G4double SimpleScattering(G4double xmeanth, G4double x2meanth);
     104
    143105  G4double SampleCosineTheta(G4double trueStepLength, G4double KineticEnergy);
    144106
     
    147109  G4double LatCorrelation();
    148110
    149   void GeomLimit(const G4Track& track);
    150 
    151111  inline G4double GetLambda(G4double kinEnergy);
    152112
    153113  inline void SetParticle(const G4ParticleDefinition*);
     114
     115  inline void UpdateCache();
    154116
    155117  //  hide assignment operator
     
    160122  G4ParticleChangeForMSC*     fParticleChange;
    161123
    162   G4SafetyHelper*             safetyHelper;
    163124  G4PhysicsTable*             theLambdaTable;
    164125  const G4MaterialCutsCouple* couple;
     
    166127
    167128  G4double mass;
    168   G4double charge;
    169 
    170   G4double masslimite,masslimitmu;
     129  G4double charge,ChargeSquare;
     130  G4double masslimite,lambdalimit,fr;
    171131
    172132  G4double taubig;
     
    174134  G4double taulim;
    175135  G4double currentTau;
    176   G4double frscaling1,frscaling2;
    177136  G4double tlimit;
    178137  G4double tlimitmin;
    179138  G4double tlimitminfix;
    180 
    181   G4double nstepmax;
     139  G4double tgeom;
     140
    182141  G4double geombig;
    183142  G4double geommin;
     
    198157  G4double currentKinEnergy;
    199158  G4double currentRange;
     159  G4double rangeinit;
    200160  G4double currentRadLength;
    201161
    202   G4double Zeff;
     162  G4double theta0max,rellossmax;
     163  G4double third;
    203164
    204165  G4int    currentMaterialIndex;
     166
     167  G4double y;
     168  G4double Zold;
     169  G4double Zeff,Z2,Z23,lnZ;
     170  G4double coeffth1,coeffth2;
     171  G4double coeffc1,coeffc2;
     172  G4double scr1ini,scr2ini,scr1,scr2;
    205173
    206174  G4bool   isInitialized;
    207175  G4bool   inside;
    208176  G4bool   insideskin;
    209 
    210177};
    211178
     179//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    212180//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    213181
     
    236204    mass = p->GetPDGMass();
    237205    charge = p->GetPDGCharge()/eplus;
     206    ChargeSquare = charge*charge;
    238207  }
    239208}
     
    241210//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    242211
     212inline
     213void G4UrbanMscModel::UpdateCache()                                   
     214{
     215    lnZ = std::log(Zeff);
     216    coeffth1 = 0.885+lnZ*(0.104-0.0170*lnZ);
     217    coeffth2 = 0.028+lnZ*(0.012-0.00125*lnZ);
     218    coeffc1  = 2.134-lnZ*(0.1045-0.00602*lnZ);
     219    coeffc2  = 0.001126-lnZ*(0.0001089+0.0000247*lnZ);
     220    Z2 = Zeff*Zeff;
     221    Z23 = std::exp(2.*lnZ/3.);
     222    scr1     = scr1ini*Z23;
     223    scr2     = scr2ini*Z2*ChargeSquare;
     224  //  lastMaterial = couple->GetMaterial();
     225    Zold = Zeff;
     226}
     227
    243228#endif
    244229
  • trunk/source/processes/electromagnetic/standard/include/G4UrbanMscModel2.hh

    r1007 r1055  
    2424// ********************************************************************
    2525//
    26 // $Id: G4UrbanMscModel2.hh,v 1.11 2008/12/18 13:01:34 gunter Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4UrbanMscModel2.hh,v 1.17 2009/05/15 09:26:42 urban Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    4040//
    4141// Modifications:
    42 //
     42// 23.04.2009 L.Urban updated parameterization in UpdateCache method
    4343//
    4444//
     
    8484                                      G4double emax=DBL_MAX);
    8585
    86   void SampleSecondaries(std::vector<G4DynamicParticle*>*,
    87                          const G4MaterialCutsCouple*,
    88                          const G4DynamicParticle*,
    89                          G4double,
    90                          G4double);
    91 
    9286  void SampleScattering(const G4DynamicParticle*,
    9387                        G4double safety);
     
    114108  G4double LatCorrelation();
    115109
    116   void GeomLimit(const G4Track& track);
    117 
    118110  inline G4double GetLambda(G4double kinEnergy);
    119111
     
    129121  G4ParticleChangeForMSC*     fParticleChange;
    130122
    131   G4SafetyHelper*             safetyHelper;
    132123  G4PhysicsTable*             theLambdaTable;
    133124  const G4MaterialCutsCouple* couple;
    134125  G4LossTableManager*         theManager;
    135 
    136126
    137127  G4double mass;
     
    223213{
    224214    lnZ = std::log(Zeff);
    225     coeffth1 = 0.885+lnZ*(0.104-0.0170*lnZ);
    226     coeffth2 = 0.028+lnZ*(0.012-0.00125*lnZ);
    227     coeffc1  = 2.134-lnZ*(0.1045-0.00602*lnZ);
    228     coeffc2  = 0.001126-lnZ*(0.0001089+0.0000247*lnZ);
     215    //new correction in theta0 formula
     216    coeffth1 = (1.-8.7780e-2/Zeff)*(0.87+0.03*lnZ);                   
     217    coeffth2 = (4.0780e-2+1.7315e-4*Zeff)*(0.87+0.03*lnZ);             
     218    // tail parameters
     219    G4double lnZ1 = std::log(Zeff+1.);
     220    coeffc1  = 2.943-0.197*lnZ1;                 
     221    coeffc2  = 0.0987-0.0143*lnZ1;                             
     222    // for single scattering
    229223    Z2 = Zeff*Zeff;
    230224    Z23 = std::exp(2.*lnZ/3.);
    231225    scr1     = scr1ini*Z23;
    232226    scr2     = scr2ini*Z2*ChargeSquare;
    233   //  lastMaterial = couple->GetMaterial();
     227                                             
    234228    Zold = Zeff;
    235229}
  • trunk/source/processes/electromagnetic/standard/include/G4UrbanMscModel90.hh

    r1007 r1055  
    2424// ********************************************************************
    2525//
    26 // $Id: G4UrbanMscModel90.hh,v 1.4 2008/10/29 14:15:30 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4UrbanMscModel90.hh,v 1.5 2009/04/10 16:34:56 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    110110
    111111  G4double LatCorrelation();
    112 
    113   void GeomLimit(const G4Track& track);
    114112
    115113  inline G4double GetLambda(G4double kinEnergy);
  • trunk/source/processes/electromagnetic/standard/include/G4WentzelVIModel.hh

    r1007 r1055  
    2424// ********************************************************************
    2525//
    26 // $Id: G4WentzelVIModel.hh,v 1.7 2008/08/04 08:49:09 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4WentzelVIModel.hh,v 1.17 2009/05/10 16:09:29 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    6666class G4LossTableManager;
    6767class G4ParticleChangeForMSC;
    68 class G4SafetyHelper;
    6968class G4ParticleDefinition;
    7069
     
    8079  virtual ~G4WentzelVIModel();
    8180
    82   void Initialise(const G4ParticleDefinition*, const G4DataVector&);
    83 
    84   G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
    85                                       G4double KineticEnergy,
    86                                       G4double AtomicNumber,
    87                                       G4double AtomicWeight=0.,
    88                                       G4double cut = DBL_MAX,
    89                                       G4double emax= DBL_MAX);
    90 
    91   void SampleScattering(const G4DynamicParticle*, G4double safety);
    92 
    93   void SampleSecondaries(std::vector<G4DynamicParticle*>*,
    94                          const G4MaterialCutsCouple*,
    95                          const G4DynamicParticle*,
    96                          G4double,
    97                          G4double);
    98 
    99   G4double ComputeTruePathLengthLimit(const G4Track& track,
    100                                       G4PhysicsTable* theLambdaTable,
    101                                       G4double currentMinimalStep);
    102 
    103   G4double ComputeGeomPathLength(G4double truePathLength);
    104 
    105   G4double ComputeTrueStepLength(G4double geomStepLength);
     81  virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
     82
     83  virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
     84                                              G4double KineticEnergy,
     85                                              G4double AtomicNumber,
     86                                              G4double AtomicWeight=0.,
     87                                              G4double cut = DBL_MAX,
     88                                              G4double emax= DBL_MAX);
     89
     90  virtual void SampleScattering(const G4DynamicParticle*, G4double safety);
     91
     92  virtual G4double ComputeTruePathLengthLimit(const G4Track& track,
     93                                              G4PhysicsTable* theLambdaTable,
     94                                              G4double currentMinimalStep);
     95
     96  virtual G4double ComputeGeomPathLength(G4double truePathLength);
     97
     98  virtual G4double ComputeTrueStepLength(G4double geomStepLength);
    10699
    107100private:
    108101
    109   G4double ComputeTransportXSectionPerVolume();
     102  G4double ComputeTransportXSectionPerAtom();
    110103
    111104  G4double ComputeXSectionPerVolume();
     
    133126  G4ParticleChangeForMSC*   fParticleChange;
    134127
    135   G4SafetyHelper*           safetyHelper;
    136128  G4PhysicsTable*           theLambdaTable;
    137129  G4PhysicsTable*           theLambda2Table;
     
    173165  // single scattering parameters
    174166  G4double coeff;
    175   G4double constn;
    176167  G4double cosThetaMin;
    177168  G4double cosThetaMax;
     
    182173  G4double q2Limit;
    183174  G4double alpha2;
    184   G4double a0;
    185175
    186176  // projectile
     
    193183  G4double mom2;
    194184  G4double invbeta2;
     185  G4double kinFactor;
    195186  G4double etag;
    196187  G4double lowEnergyLimit;
     
    198189  // target
    199190  G4double targetZ;
     191  G4double targetMass;
    200192  G4double screenZ;
    201193  G4double formfactA;
    202   G4double FF[100];
     194  G4int    iz;
     195
     196  static G4double ScreenRSquare[100];
     197  static G4double FormFactor[100];
    203198
    204199  // flags
     
    240235//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    241236
    242 inline
    243 void G4WentzelVIModel::SetupParticle(const G4ParticleDefinition* p)
     237inline void G4WentzelVIModel::SetupParticle(const G4ParticleDefinition* p)
    244238{
    245239  // Initialise mass and charge
     
    251245    chargeSquare = q*q;
    252246    tkin = 0.0;
    253     lowEnergyLimit = keV*mass/electron_mass_c2;
    254247  }
    255248}
     
    264257    invbeta2 = 1.0 +  mass*mass/mom2;
    265258    cosTetMaxNuc = cosThetaMax;
    266     if(ekin <= 10.*cut && mass < MeV) {
     259    if(mass < MeV && ekin <= 10.*cut) {
    267260      cosTetMaxNuc = ekin*(cosThetaMax + 1.0)/(10.*cut) - 1.0;
    268261    }
     
    278271    etag    = e;
    279272    targetZ = Z;
    280     G4int iz= G4int(Z);
     273    iz = G4int(Z);
    281274    if(iz > 99) iz = 99;
    282     G4double x = fNistManager->GetZ13(iz);
    283     screenZ = a0*x*x/mom2;
    284     if(iz > 1) screenZ *=(1.13 + 3.76*invbeta2*Z*Z*chargeSquare*alpha2);
    285     //    screenZ = a0*x*x*(1.13 + 3.76*Z*Z*chargeSquare*alpha2)/mom2;
    286     // A.V. Butkevich et al., NIM A 488 (2002) 282
    287     formfactA = FF[iz];
    288     if(formfactA == 0.0) {
    289       x = fNistManager->GetA27(iz);
    290       formfactA = constn*x*x;
    291       FF[iz] = formfactA;
     275    targetMass = fNistManager->GetAtomicMassAmu(iz)*amu_c2;
     276    G4double m12  = mass*mass;
     277    G4double x    = 1.0 + mass/targetMass;
     278    kinFactor  = coeff*targetZ*chargeSquare*(1.0 +  m12/mom2)/mom2;
     279    screenZ = ScreenRSquare[iz]/mom2;
     280    if(iz > 1) {
     281      screenZ *=(1.13 + 3.76*Z*Z*alpha2);
     282      kinFactor /= (x*x);
    292283    }
    293     formfactA *= mom2;
     284    //if(iz > 1) screenZ *=(1.13 + std::min(0.5,3.76*Z*Z*invbeta2*alpha2));
     285    formfactA = FormFactor[iz]*mom2;
    294286    cosTetMaxNuc2 = cosTetMaxNuc;
    295     /*
    296     G4double ee = 10.*eV*Z;
    297     if(1 == iz) ee *= 2.0;
    298     G4double z = std::min(cosTetMaxElec, 1.0 - std::max(ecut,ee)*amu_c2
    299                           *fNistManager->GetAtomicMassAmu(iz)/mom2);
    300     cosTetMaxElec2 = std::max(cosTetMaxNuc2, z);
    301     */
    302287    cosTetMaxElec2 = cosTetMaxElec;
    303288  }
  • trunk/source/processes/electromagnetic/standard/include/G4eBremsstrahlung.hh

    r1007 r1055  
    2424// ********************************************************************
    2525//
    26 // $Id: G4eBremsstrahlung.hh,v 1.36 2007/05/23 08:47:34 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4eBremsstrahlung.hh,v 1.37 2009/02/20 12:06:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    8989  virtual ~G4eBremsstrahlung();
    9090
    91   G4bool IsApplicable(const G4ParticleDefinition& p);
     91  virtual G4bool IsApplicable(const G4ParticleDefinition& p);
    9292
    9393  // Print out of the class parameters
     
    111111
    112112//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    113 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    114 
    115 inline G4bool G4eBremsstrahlung::IsApplicable(const G4ParticleDefinition& p)
    116 {
    117   return (&p == G4Electron::Electron() || &p == G4Positron::Positron());
    118 }
    119 
    120 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    121113
    122114#endif
  • trunk/source/processes/electromagnetic/standard/include/G4eBremsstrahlungModel.hh

    r1007 r1055  
    2424// ********************************************************************
    2525//
    26 // $Id: G4eBremsstrahlungModel.hh,v 1.25 2008/11/13 19:28:58 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4eBremsstrahlungModel.hh,v 1.26 2009/02/20 12:06:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    7575  virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
    7676
    77   G4double MinEnergyCut(const G4ParticleDefinition*,
    78                         const G4MaterialCutsCouple*);
     77  virtual G4double MinEnergyCut(const G4ParticleDefinition*,
     78                                const G4MaterialCutsCouple*);
    7979
    8080  virtual G4double ComputeDEDXPerVolume(const G4Material*,
     
    102102
    103103protected:
    104 
    105   inline G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
    106                                      G4double kineticEnergy);
    107104
    108105  const G4Element* SelectRandomAtom(const G4MaterialCutsCouple* couple);
     
    191188//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    192189
    193 inline
    194 G4double G4eBremsstrahlungModel::MaxSecondaryEnergy(
    195                                  const G4ParticleDefinition*,
    196                                        G4double kineticEnergy)
    197 {
    198   return kineticEnergy;
    199 }
    200 
    201 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    202 
    203190#endif
  • trunk/source/processes/electromagnetic/standard/include/G4eBremsstrahlungRelModel.hh

    r1007 r1055  
    2424// ********************************************************************
    2525//
    26 // $Id: G4eBremsstrahlungRelModel.hh,v 1.10 2008/11/14 09:25:19 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4eBremsstrahlungRelModel.hh,v 1.11 2009/02/20 12:06:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    7171  virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
    7272
    73   G4double MinEnergyCut(const G4ParticleDefinition*,
    74                         const G4MaterialCutsCouple*);
     73  virtual G4double MinEnergyCut(const G4ParticleDefinition*,
     74                                const G4MaterialCutsCouple*);
    7575
    7676  virtual G4double ComputeDEDXPerVolume(const G4Material*,
     
    9797  inline G4double LPMconstant() const;
    9898
    99 protected:
    100 
    101   inline G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
    102                                      G4double kineticEnergy);
    103 
    10499private:
    105100
     
    207202//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    208203
    209 inline G4double
    210 G4eBremsstrahlungRelModel::MaxSecondaryEnergy(const G4ParticleDefinition*,
    211                                               G4double kineticEnergy)
    212 {
    213   return kineticEnergy;
    214 }
    215 
    216 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    217 
    218204
    219205inline G4double G4eBremsstrahlungRelModel::Phi1(G4double gg, G4double)
  • trunk/source/processes/electromagnetic/standard/include/G4eCoulombScatteringModel.hh

    r1007 r1055  
    2424// ********************************************************************
    2525//
    26 // $Id: G4eCoulombScatteringModel.hh,v 1.36 2008/08/04 08:49:09 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4eCoulombScatteringModel.hh,v 1.43 2009/05/10 16:09:29 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    6565#include "G4VEmModel.hh"
    6666#include "G4PhysicsTable.hh"
     67#include "globals.hh"
    6768#include "G4NistManager.hh"
    68 #include "globals.hh"
    6969
    7070class G4ParticleChangeForGamma;
     
    137137
    138138  G4double                  coeff;
    139   G4double                  constn;
    140139  G4double                  cosThetaMin;
    141140  G4double                  cosThetaMax;
     
    160159  G4double                  mom2;
    161160  G4double                  invbeta2;
     161  G4double                  kinFactor;
    162162  G4double                  etag;
    163163  G4double                  lowEnergyLimit;
     
    165165  // target
    166166  G4double                  targetZ;
     167  G4double                  targetMass;
    167168  G4double                  screenZ;
    168169  G4double                  formfactA;
    169170  G4int                     idxelm;
     171  G4int                     iz;
    170172
    171173private:
    172174
    173   G4double                  a0;
    174175  G4double                  alpha2;
    175176  G4double                  faclim;
    176   G4double                  FF[100];
     177
     178  static G4double ScreenRSquare[100];
     179  static G4double FormFactor[100];
    177180
    178181  G4bool                    isInitialised;             
     
    204207    chargeSquare = q*q;
    205208    tkin = 0.0;
    206     lowEnergyLimit = keV*mass/electron_mass_c2;
    207209  }
    208210}
     
    219221    cosTetMinNuc = cosThetaMin;
    220222    cosTetMaxNuc = cosThetaMax;
    221     if(ekin <= 10.*cut && mass < MeV && cosThetaMin < 1.0) {
     223    if(mass < MeV && cosThetaMin < 1.0 && ekin <= 10.*cut) {
    222224      cosTetMinNuc = ekin*(cosThetaMin + 1.0)/(10.*cut) - 1.0;
    223225    }
     
    233235    etag    = e;
    234236    targetZ = Z;
    235     G4int iz= G4int(Z);
     237    iz= G4int(Z);
    236238    if(iz > 99) iz = 99;
    237     G4double x = fNistManager->GetZ13(iz);
    238     screenZ = a0*x*x/mom2;
    239     if(iz > 1) screenZ *=(1.13 + 3.76*invbeta2*Z*Z*chargeSquare*alpha2);
    240     //screenZ = a0*x*x*(1.13 + 3.76*Z*Z*chargeSquare*alpha2)/mom2;
    241     // A.V. Butkevich et al., NIM A 488 (2002) 282
    242     formfactA = FF[iz];
    243     if(formfactA == 0.0) {
    244       x = fNistManager->GetA27(iz);
    245       formfactA = constn*x*x;
    246       FF[iz] = formfactA;
     239    targetMass   = fNistManager->GetAtomicMassAmu(iz)*amu_c2;
     240    G4double m12 = mass*mass;
     241    G4double x   = 1.0 + mass/targetMass;
     242    kinFactor    = (1.0 +  m12/mom2)/mom2;
     243
     244    screenZ = ScreenRSquare[iz]/mom2;
     245    if(iz > 1) {
     246      screenZ *=(1.13 + 3.76*Z*Z*alpha2);
     247      kinFactor /= (x*x);
    247248    }
    248     formfactA *= mom2;
     249    // if(iz > 1) screenZ *=(1.13 + std::min(0.5,3.76*Z*Z*invbeta2*alpha2));
     250    formfactA = FormFactor[iz]*mom2;
    249251    cosTetMaxNuc2 = cosTetMaxNuc;
    250     if(particle == theProton && 1 == iz && cosTetMaxNuc2 < 0.0) {
     252    if(1 == iz && particle == theProton && cosTetMaxNuc2 < 0.0) {
    251253      cosTetMaxNuc2 = 0.0;
    252254    }
    253     /*
    254     G4double ee = 10.*eV*Z;
    255     if(1 == iz) ee *= 2.0;
    256     G4double z = std::min(cosTetMaxElec, 1.0 - std::max(ecut,ee)*amu_c2
    257                           *fNistManager->GetAtomicMassAmu(iz)/mom2);
    258     cosTetMaxElec2 = std::max(cosTetMaxNuc2, z);
    259     */
    260255    cosTetMaxElec2 = cosTetMaxElec;
    261256  }
  • trunk/source/processes/electromagnetic/standard/include/G4eIonisation.hh

    r1007 r1055  
    2424// ********************************************************************
    2525//
    26 // $Id: G4eIonisation.hh,v 1.35 2007/05/23 08:47:34 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4eIonisation.hh,v 1.36 2009/02/20 12:06:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    8888  virtual ~G4eIonisation();
    8989
    90   G4bool IsApplicable(const G4ParticleDefinition& p);
     90  virtual G4bool IsApplicable(const G4ParticleDefinition& p);
    9191
    9292  // Print out of the class parameters
     
    9898                                           const G4ParticleDefinition*);
    9999
    100   G4double MinPrimaryEnergy(const G4ParticleDefinition*,
    101                             const G4Material*, G4double cut);
     100  virtual G4double MinPrimaryEnergy(const G4ParticleDefinition*,
     101                                    const G4Material*, G4double cut);
    102102
    103103private:
     
    114114};
    115115
    116 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    117 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    118 
    119 inline G4double G4eIonisation::MinPrimaryEnergy(const G4ParticleDefinition*,
    120                                                 const G4Material*,
    121                                                 G4double cut)
    122 {
    123   G4double x = cut;
    124   if(isElectron) x += cut;
    125   return x;
    126 }
    127 
    128 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    129 
    130 inline G4bool G4eIonisation::IsApplicable(const G4ParticleDefinition& p)
    131 {
    132   return (&p == G4Electron::Electron() || &p == G4Positron::Positron());
    133 }
    134 
    135116//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    136117
  • trunk/source/processes/electromagnetic/standard/include/G4eplusAnnihilation.hh

    r1007 r1055  
    2424// ********************************************************************
    2525//
    26 // $Id: G4eplusAnnihilation.hh,v 1.23 2007/05/23 08:47:34 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4eplusAnnihilation.hh,v 1.24 2009/02/20 12:06:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    7373  virtual ~G4eplusAnnihilation();
    7474
    75   G4bool IsApplicable(const G4ParticleDefinition& p);
     75  virtual G4bool IsApplicable(const G4ParticleDefinition& p);
    7676
    7777  virtual G4VParticleChange* AtRestDoIt(
     
    7979                             const G4Step& stepData);
    8080
    81   G4double AtRestGetPhysicalInteractionLength(
     81  virtual G4double AtRestGetPhysicalInteractionLength(
    8282                             const G4Track& track,
    8383                             G4ForceCondition* condition
     
    9696};
    9797
    98 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    100 
    101 inline G4bool G4eplusAnnihilation::IsApplicable(const G4ParticleDefinition& p)
    102 {
    103   return (&p == G4Positron::Positron());
    104 }
    105 
    106 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    107 
    108 inline
    109 G4double G4eplusAnnihilation::AtRestGetPhysicalInteractionLength(
    110                               const G4Track&, G4ForceCondition* condition)
    111 {
    112   *condition = NotForced;
    113   return 0.0;
    114 }
    115 
    11698//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    11799
  • trunk/source/processes/electromagnetic/standard/include/G4hIonisation.hh

    r1007 r1055  
    2424// ********************************************************************
    2525//
    26 // $Id: G4hIonisation.hh,v 1.41 2008/09/14 17:11:48 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4hIonisation.hh,v 1.42 2009/02/20 12:06:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    9393  virtual ~G4hIonisation();
    9494
    95   G4bool IsApplicable(const G4ParticleDefinition& p);
     95  virtual G4bool IsApplicable(const G4ParticleDefinition& p);
    9696
    97   G4double MinPrimaryEnergy(const G4ParticleDefinition* p,
    98                             const G4Material*, G4double cut);
     97  virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p,
     98                                    const G4Material*, G4double cut);
    9999
    100100  // Print out of the class parameters
     
    123123
    124124//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    125 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    126 
    127 inline G4bool G4hIonisation::IsApplicable(const G4ParticleDefinition& p)
    128 {
    129   return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV &&
    130          !p.IsShortLived());
    131 }
    132 
    133 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    134 
    135 inline G4double G4hIonisation::MinPrimaryEnergy(const G4ParticleDefinition*,
    136                                                 const G4Material*,
    137                                                 G4double cut)
    138 {
    139   G4double x = 0.5*cut/electron_mass_c2;
    140   G4double g = x*ratio + std::sqrt((1. + x)*(1. + x*ratio*ratio));
    141   return mass*(g - 1.0);
    142 }
    143 
    144 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    145125
    146126inline void G4hIonisation::ActivateNuclearStopping(G4bool val)
  • trunk/source/processes/electromagnetic/standard/include/G4ionIonisation.hh

    r1007 r1055  
    2424// ********************************************************************
    2525//
    26 // $Id: G4ionIonisation.hh,v 1.56 2008/09/14 17:11:48 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4ionIonisation.hh,v 1.57 2009/02/20 12:06:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    8585  virtual ~G4ionIonisation();
    8686
    87   inline G4bool IsApplicable(const G4ParticleDefinition& p);
     87  virtual G4bool IsApplicable(const G4ParticleDefinition& p);
    8888
    8989  // Print out of the class parameters
     
    102102                                           const G4ParticleDefinition*);
    103103
    104   inline G4double MinPrimaryEnergy(const G4ParticleDefinition* p,
     104  virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p,
    105105                                   const G4Material*, G4double cut);
    106106
     
    127127
    128128//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    129 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    130 
    131 inline G4bool G4ionIonisation::IsApplicable(const G4ParticleDefinition& p)
    132 {
    133   return (p.GetPDGCharge() != 0.0 && !p.IsShortLived() &&
    134           p.GetParticleType() == "nucleus");
    135 }
    136 
    137 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    138 
    139 inline G4double G4ionIonisation::MinPrimaryEnergy(
    140           const G4ParticleDefinition* p, const G4Material*, G4double cut)
    141 {
    142   return
    143     p->GetPDGMass()*(std::sqrt(1. + 0.5*cut/CLHEP::electron_mass_c2) - 1.0);
    144 }
    145 
    146129//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    147130
Note: See TracChangeset for help on using the changeset viewer.