Ignore:
Timestamp:
Apr 6, 2009, 12:21:12 PM (16 years ago)
Author:
garnier
Message:

update processes

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

Legend:

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

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4ASTARStopping.hh,v 1.5 2006/06/29 19:49:58 gunter Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4ASTARStopping.hh,v 1.6 2008/11/13 12:04:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828
    2929#ifndef G4ASTARStopping_h
     
    8686  G4double e[74][78], kinE[78];
    8787  G4double effZ[74];
    88   G4int Znum[74];
    8988};
    9089
  • trunk/source/processes/electromagnetic/standard/include/G4BetheBlochModel.hh

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4BetheBlochModel.hh,v 1.9 2007/05/22 17:34:36 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     26// $Id: G4BetheBlochModel.hh,v 1.17 2009/02/20 12:06:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -------------------------------------------------------------------
     
    4545// 12-11-03 Fix for GenericIons (V.Ivanchenko)
    4646// 24-03-05 Add G4EmCorrections (V.Ivanchenko)
    47 // 11-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
     47// 11-04-05 Major optimisation of internal interfaces (V.Ivanchenko)
    4848// 11-04-04 Move MaxSecondaryEnergy to models (V.Ivanchenko)
    4949// 11-02-06 ComputeCrossSectionPerElectron, ComputeCrossSectionPerAtom (mma)
     50// 12-08-08 Added methods GetParticleCharge, GetChargeSquareRatio,
     51//          CorrectionsAlongStep needed for ions(V.Ivanchenko)
    5052
    5153//
     
    6567class G4EmCorrections;
    6668class G4ParticleChangeForLoss;
     69class G4NistManager;
     70
    6771
    6872class G4BetheBlochModel : public G4VEmModel
     
    7882  virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
    7983
    80   G4double MinEnergyCut(const G4ParticleDefinition*,
    81                         const G4MaterialCutsCouple*);
     84  virtual G4double MinEnergyCut(const G4ParticleDefinition*,
     85                                const G4MaterialCutsCouple*);
    8286                       
    8387  virtual G4double ComputeCrossSectionPerElectron(
     
    105109                                        G4double cutEnergy);
    106110
     111  virtual G4double GetChargeSquareRatio(const G4ParticleDefinition* p,
     112                                        const G4Material* mat,
     113                                        G4double kineticEnergy);
     114
     115  virtual G4double GetParticleCharge(const G4ParticleDefinition* p,
     116                                     const G4Material* mat,
     117                                     G4double kineticEnergy);
     118
     119  virtual void CorrectionsAlongStep(const G4MaterialCutsCouple*,
     120                                    const G4DynamicParticle*,
     121                                    G4double& eloss,
     122                                    G4double& niel,
     123                                    G4double length);
     124
    107125  virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
    108126                                 const G4MaterialCutsCouple*,
     
    113131protected:
    114132
    115   G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
    116                               G4double kinEnergy);
     133  virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
     134                                      G4double kinEnergy);
    117135
    118136private:
     
    125143
    126144  const G4ParticleDefinition* particle;
     145  const G4Material*           currentMaterial;
    127146  G4ParticleDefinition*       theElectron;
    128147  G4EmCorrections*            corr;
    129148  G4ParticleChangeForLoss*    fParticleChange;
     149  G4NistManager*              nist;
    130150
    131151  G4double mass;
    132152  G4double tlimit;
    133153  G4double spin;
     154  G4double magMoment2;
    134155  G4double chargeSquare;
    135156  G4double ratio;
     157  G4double formfact;
    136158  G4double twoln10;
    137159  G4double bg2lim;
    138160  G4double taulim;
     161  G4double corrFactor;
    139162  G4bool   isIon;
     163  G4bool   isInitialised;
    140164};
    141165
    142166//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    143167
    144 inline G4double G4BetheBlochModel::MaxSecondaryEnergy(
    145           const G4ParticleDefinition* pd,
    146                 G4double kinEnergy)
    147 {
    148   if(isIon) SetParticle(pd);
    149   G4double tau  = kinEnergy/mass;
    150   G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) /
    151                   (1. + 2.0*(tau + 1.)*ratio + ratio*ratio);
    152   return std::min(tmax,tlimit);
    153 }
    154 
    155 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    156 
    157 inline void G4BetheBlochModel::SetParticle(const G4ParticleDefinition* p)
    158 {
    159   if(particle != p) {
    160     particle = p;
    161     mass = particle->GetPDGMass();
    162     spin = particle->GetPDGSpin();
    163     G4double q = particle->GetPDGCharge()/eplus;
    164     chargeSquare = q*q;
    165     ratio = electron_mass_c2/mass;
    166     if(mass > 120.*MeV) tlimit = 51.2*GeV*std::pow(proton_mass_c2/mass,0.66667);
    167   }
    168 }
    169 
    170 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    171 
    172168#endif
  • trunk/source/processes/electromagnetic/standard/include/G4BetheHeitlerModel.hh

    r819 r961  
    2525//
    2626// $Id: G4BetheHeitlerModel.hh,v 1.6 2007/05/22 17:34:36 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -------------------------------------------------------------------
  • trunk/source/processes/electromagnetic/standard/include/G4BohrFluctuations.hh

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4BohrFluctuations.hh,v 1.3 2007/09/27 13:53:11 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4BohrFluctuations.hh,v 1.4 2009/02/19 19:17:50 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    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

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4BraggIonModel.hh,v 1.8 2007/05/22 17:34:36 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4BraggIonModel.hh,v 1.12 2009/02/20 12:06:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -------------------------------------------------------------------
     
    4343// 15-02-06 ComputeCrossSectionPerElectron, ComputeCrossSectionPerAtom (mma)
    4444// 25-04-06 Add stopping data from ASTAR (V.Ivanchenko)
     45// 12-08-08 Added methods GetParticleCharge, GetChargeSquareRatio,
     46//          CorrectionsAlongStep needed for ions(V.Ivanchenko)
    4547
    4648//
     
    4850//
    4951// Implementation of energy loss and delta-electron production
    50 // by heavy slow charged particles using eveluated data
     52// by heavy slow charged particles using ICRU'49 and NIST evaluated data
     53// for He4 ions
    5154
    5255// -------------------------------------------------------------------
     
    6063
    6164class G4ParticleChangeForLoss;
     65class G4EmCorrections;
    6266
    6367class G4BraggIonModel : public G4VEmModel
     
    7377  virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
    7478
    75   G4double MinEnergyCut(const G4ParticleDefinition*,
    76                         const G4MaterialCutsCouple*);
     79  virtual G4double MinEnergyCut(const G4ParticleDefinition*,
     80                                const G4MaterialCutsCouple*);
    7781                       
    7882  virtual G4double ComputeCrossSectionPerElectron(
     
    106110                                 G4double maxEnergy);
    107111
     112  // Compute ion charge
     113  virtual G4double GetChargeSquareRatio(const G4ParticleDefinition*,
     114                                        const G4Material*,
     115                                        G4double kineticEnergy);
     116
     117  virtual G4double GetParticleCharge(const G4ParticleDefinition* p,
     118                                     const G4Material* mat,
     119                                     G4double kineticEnergy);
     120
     121  // add correction to energy loss and ompute non-ionizing energy loss
     122  virtual void CorrectionsAlongStep(const G4MaterialCutsCouple*,
     123                                    const G4DynamicParticle*,
     124                                    G4double& eloss,
     125                                    G4double& niel,
     126                                    G4double length);
     127
    108128protected:
    109129
    110   G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
    111                               G4double kinEnergy);
     130  virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
     131                                      G4double kinEnergy);
    112132
    113133private:
     
    133153  G4double DEDX(const G4Material* material, G4double kineticEnergy);
    134154
     155  G4EmCorrections*            corr;
     156
    135157  const G4ParticleDefinition* particle;
    136158  G4ParticleDefinition*       theElectron;
     
    144166  G4double massRate;
    145167  G4double ratio;
    146   G4double highKinEnergy;
    147   G4double lowKinEnergy;
    148168  G4double lowestKinEnergy;
    149169  G4double HeMass;
    150170  G4double massFactor;
     171  G4double corrFactor;
    151172  G4double rateMassHe2p;
    152173  G4double theZieglerFactor;
     
    154175  G4int    iMolecula;          // index in the molecula's table
    155176  G4bool   isIon;
     177  G4bool   isInitialised;
    156178};
    157 
    158 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    159 
    160 inline G4double G4BraggIonModel::MaxSecondaryEnergy(
    161           const G4ParticleDefinition* pd,
    162                 G4double kinEnergy)
    163 {
    164   if(pd != particle) SetParticle(pd);
    165   G4double tau  = kinEnergy/mass;
    166   G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) /
    167                   (1. + 2.0*(tau + 1.)*ratio + ratio*ratio);
    168   return tmax;
    169 }
    170179
    171180//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/source/processes/electromagnetic/standard/include/G4BraggModel.hh

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4BraggModel.hh,v 1.10 2007/05/22 17:34:36 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4BraggModel.hh,v 1.13 2009/02/20 12:06:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -------------------------------------------------------------------
     
    4545// 11-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
    4646// 15-02-06 ComputeCrossSectionPerElectron, ComputeCrossSectionPerAtom (mma)
    47 // 25-04-06 Add stopping data from PSTAR (V.Ivanchenko)
     47// 25-04-06 Added stopping data from PSTAR (V.Ivanchenko)
     48// 12-08-08 Added methods GetParticleCharge, GetChargeSquareRatio,
     49//          CorrectionsAlongStep needed for ions(V.Ivanchenko)
    4850
    4951//
     
    5153//
    5254// Implementation of energy loss and delta-electron production
    53 // by heavy slow charged particles using eveluated data
     55// by heavy slow charged particles using ICRU'49 and NIST evaluated data
     56// for protons
    5457
    5558// -------------------------------------------------------------------
     
    6366
    6467class G4ParticleChangeForLoss;
     68class G4EmCorrections;
    6569
    6670class G4BraggModel : public G4VEmModel
     
    7680  virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
    7781
    78   G4double MinEnergyCut(const G4ParticleDefinition*,
    79                         const G4MaterialCutsCouple*);
     82  virtual G4double MinEnergyCut(const G4ParticleDefinition*,
     83                                const G4MaterialCutsCouple*);
    8084                       
    8185  virtual G4double ComputeCrossSectionPerElectron(
     
    109113                                 G4double maxEnergy);
    110114
     115  // Compute ion charge
     116  virtual G4double GetChargeSquareRatio(const G4ParticleDefinition*,
     117                                        const G4Material*,
     118                                        G4double kineticEnergy);
     119
     120  virtual G4double GetParticleCharge(const G4ParticleDefinition* p,
     121                                     const G4Material* mat,
     122                                     G4double kineticEnergy);
     123
     124  // add correction to energy loss and compute non-ionizing energy loss
     125  virtual void CorrectionsAlongStep(const G4MaterialCutsCouple*,
     126                                    const G4DynamicParticle*,
     127                                    G4double& eloss,
     128                                    G4double& niel,
     129                                    G4double length);
     130
    111131protected:
    112132
    113   G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
    114                               G4double kinEnergy);
     133  virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
     134                                      G4double kinEnergy);
    115135
    116136private:
    117137
    118   void SetParticle(const G4ParticleDefinition* p);
     138  inline void SetParticle(const G4ParticleDefinition* p);
    119139
    120140  G4bool HasMaterial(const G4Material* material);
     
    139159  G4BraggModel & operator=(const  G4BraggModel &right);
    140160  G4BraggModel(const  G4BraggModel&);
     161
     162
     163  G4EmCorrections*            corr;
    141164
    142165  const G4ParticleDefinition* particle;
     
    150173  G4double massRate;
    151174  G4double ratio;
    152   G4double highKinEnergy;
    153   G4double lowKinEnergy;
    154175  G4double lowestKinEnergy;
    155176  G4double protonMassAMU;
     
    159180  G4int    iMolecula;          // index in the molecula's table
    160181  G4bool   isIon;
     182  G4bool   isInitialised;
    161183};
    162 
    163 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    164 
    165 inline G4double G4BraggModel::MaxSecondaryEnergy(
    166                                             const G4ParticleDefinition* pd,
    167                                                   G4double kinEnergy)
    168 {
    169   if(pd != particle) SetParticle(pd);
    170   G4double tau  = kinEnergy/mass;
    171   G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) /
    172                   (1. + 2.0*(tau + 1.)*ratio + ratio*ratio);
    173   return tmax;
    174 }
    175184
    176185//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/source/processes/electromagnetic/standard/include/G4ComptonScattering.hh

    r819 r961  
    2525//
    2626//
    27 // $Id: G4ComptonScattering.hh,v 1.20 2007/05/23 08:47:34 vnivanch Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4ComptonScattering.hh,v 1.21 2009/02/20 12:06:37 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    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/G4ComptonScattering52.hh

    r819 r961  
    2626//
    2727// $Id: G4ComptonScattering52.hh,v 1.4 2007/05/16 14:00:56 vnivanch Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//------------------ G4ComptonScattering52 physics process -----------------------
  • trunk/source/processes/electromagnetic/standard/include/G4CoulombScattering.hh

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4CoulombScattering.hh,v 1.8 2007/07/31 17:24:04 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4CoulombScattering.hh,v 1.12 2009/02/20 12:06:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -------------------------------------------------------------------
     
    6565  virtual G4bool IsApplicable(const G4ParticleDefinition& p);
    6666
    67   void SetThetaMin(G4double);
     67  inline void SetThetaMin(G4double);
    6868
    69   void SetThetaMax(G4double);
     69  inline void SetThetaMax(G4double);
    7070
    71   void SetQ2Max(G4double);
     71  inline void SetQ2Max(G4double);
     72
     73  // Set energy above which high energy model will be used
     74  inline void SetHEModelLimit(G4double);
    7275
    7376  // obsolete method to be removed
    74   void SetBuildTableFlag(G4bool);
     77  inline void SetBuildTableFlag(G4bool);
    7578
    7679  // Print out of the class parameters
     
    101104//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    102105
    103 inline G4bool G4CoulombScattering::IsApplicable(const G4ParticleDefinition& p)
    104 {
    105   return (p.GetPDGCharge() != 0.0 && !p.IsShortLived());
    106 }
    107 
    108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    109 
    110106inline void G4CoulombScattering::SetThetaMin(G4double val)
    111107{
     
    132128{}
    133129
     130//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     131
     132inline void G4CoulombScattering::SetHEModelLimit(G4double val)
     133{
     134  thEnergy = val;
     135  thEnergyElec = val;
     136}
     137
    134138//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    135139
  • trunk/source/processes/electromagnetic/standard/include/G4CoulombScatteringModel.hh

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4CoulombScatteringModel.hh,v 1.11 2007/10/09 08:16:29 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     26// $Id: G4CoulombScatteringModel.hh,v 1.15 2008/07/31 13:11:34 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -------------------------------------------------------------------
     
    4444// 19.10.06 V.Ivanchenko use inheritance from G4eCoulombScatteringModel
    4545// 09.10.07 V.Ivanchenko reorganized methods, add cut dependence in scattering off e-
     46// 09.06.08 V.Ivanchenko SelectIsotope is moved to the base class
    4647//
    4748// Class Description:
     
    6465#include "globals.hh"
    6566
    66 class G4ParticleTable;
    67 class G4NistManager;
    68 
    6967class G4CoulombScatteringModel : public G4eCoulombScatteringModel
    7068{
     
    7270public:
    7371
    74   G4CoulombScatteringModel(G4double thetaMin = 0.0, G4double thetaMax = pi,
    75                            G4bool build = false, G4double tlim = TeV*TeV,
    76                            const G4String& nam = "CoulombScattering");
     72  G4CoulombScatteringModel(const G4String& nam = "CoulombScattering");
    7773 
    7874  virtual ~G4CoulombScatteringModel();
     
    9490private:
    9591
    96   G4double SelectIsotope(const G4Element*);
    97 
    9892  // hide assignment operator
    9993  G4CoulombScatteringModel & operator=(const G4CoulombScatteringModel &right);
    10094  G4CoulombScatteringModel(const  G4CoulombScatteringModel&);
    10195
    102   G4ParticleTable*            theParticleTable;
    103   const G4NistManager*        theMatManager;
    10496};
    10597
  • trunk/source/processes/electromagnetic/standard/include/G4GammaConversion.hh

    r819 r961  
    2525//
    2626//
    27 // $Id: G4GammaConversion.hh,v 1.22 2007/05/23 08:47:34 vnivanch Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4GammaConversion.hh,v 1.23 2009/02/20 12:06:37 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    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/G4InitXscPAI.hh

    r819 r961  
    2626//
    2727// $Id: G4InitXscPAI.hh,v 1.8 2006/06/29 19:50:22 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/electromagnetic/standard/include/G4IonFluctuations.hh

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4IonFluctuations.hh,v 1.3 2007/09/27 13:53:11 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4IonFluctuations.hh,v 1.9 2009/02/19 19:17:50 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -------------------------------------------------------------------
     
    4141//
    4242// 16-10-03 Changed interface to Initialisation (V.Ivanchenko)
     43// 01-06-08 Added initialisation of effective charge prestep (V.Ivanchenko)
    4344//
    4445// Class Description:
     
    5455
    5556#include "G4VEmFluctuationModel.hh"
     57#include "G4ParticleDefinition.hh"
     58#include "G4UniversalFluctuation.hh"
    5659
    5760class G4IonFluctuations : public G4VEmFluctuationModel
     
    6467  virtual ~G4IonFluctuations();
    6568
     69  // Sample fluctuations
    6670  G4double SampleFluctuations(const G4Material*,
    6771                              const G4DynamicParticle*,
    68                                     G4double&,
    69                                     G4double&,
    70                                     G4double&);
     72                              G4double& tmax,
     73                              G4double& length,
     74                              G4double& meanLoss);
    7175
    72   G4double Dispersion(    const G4Material*,
    73                           const G4DynamicParticle*,
    74                                 G4double&,
    75                                 G4double&);
     76  // Compute dispertion
     77  G4double Dispersion(const G4Material*,
     78                      const G4DynamicParticle*,
     79                      G4double& tmax,
     80                      G4double& length);
    7681
     82  // Initialisation prerun
    7783  void InitialiseMe(const G4ParticleDefinition*);
     84
     85  // Initialisation prestep
     86  void SetParticleAndCharge(const G4ParticleDefinition*, G4double q2);
    7887
    7988private:
    8089
    81   G4double CoeffitientA(G4double&);
    82   G4double CoeffitientB(const G4Material*, G4double&);
    83   G4double RelativisticFactor(const G4Material*, G4double&);
     90  G4double Factor(const G4Material*, G4double Zeff);
     91  G4double RelativisticFactor(const G4Material*, G4double Zeff);
    8492
    8593  // hide assignment operator
     
    8795  G4IonFluctuations(const  G4IonFluctuations&);
    8896
     97  G4UniversalFluctuation      uniFluct;
    8998  const G4ParticleDefinition* particle;
    9099
     
    92101  G4double charge;
    93102  G4double chargeSquare;
    94   G4double chargeSqRatio;
     103  G4double effChargeSquare;
    95104
    96105  // data members to speed up the fluctuation calculation
     106  G4double parameter;
    97107  G4double minNumberInteractionsBohr;
    98108  G4double theBohrBeta2;
  • trunk/source/processes/electromagnetic/standard/include/G4KleinNishinaCompton.hh

    r819 r961  
    2525//
    2626// $Id: G4KleinNishinaCompton.hh,v 1.9 2007/05/22 17:34:36 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -------------------------------------------------------------------
  • trunk/source/processes/electromagnetic/standard/include/G4MollerBhabhaModel.hh

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4MollerBhabhaModel.hh,v 1.19 2007/05/22 17:34:36 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4MollerBhabhaModel.hh,v 1.20 2009/02/20 12:06:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    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/G4MscModel71.hh

    r819 r961  
    2525//
    2626// $Id: G4MscModel71.hh,v 1.5 2007/05/22 17:34:36 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -------------------------------------------------------------------
  • trunk/source/processes/electromagnetic/standard/include/G4MultipleScattering.hh

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4MultipleScattering.hh,v 1.35 2007/05/18 18:43:32 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     26// $Id: G4MultipleScattering.hh,v 1.36 2008/03/10 10:39:21 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -----------------------------------------------------------------------------
     
    100100//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    101101
    102 class G4UrbanMscModel;
     102class G4VMscModel;
    103103
    104104class G4MultipleScattering : public G4VMultipleScattering
     
    133133private:        // data members
    134134
    135   G4UrbanMscModel* mscUrban;
     135  G4VMscModel* mscUrban;
    136136
    137137  G4double lambdalimit;
  • trunk/source/processes/electromagnetic/standard/include/G4MultipleScattering71.hh

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4MultipleScattering71.hh,v 1.5 2007/05/22 17:34:36 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4MultipleScattering71.hh,v 1.6 2008/07/16 11:27:41 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929//
     
    5858//------------------------------------------------------------------------------
    5959//
    60 // $Id: G4MultipleScattering71.hh,v 1.5 2007/05/22 17:34:36 vnivanch Exp $
    61 // GEANT4 tag $Name: $
     60// $Id: G4MultipleScattering71.hh,v 1.6 2008/07/16 11:27:41 vnivanch Exp $
     61// GEANT4 tag $Name: geant4-09-02-ref-02 $
    6262
    6363// class description
     
    180180//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    181181
    182 inline G4double G4MultipleScattering71::GetContinuousStepLimit(
    183                                           const G4Track& track,
    184                                                 G4double,
    185                                                 G4double currentMinimalStep,
    186                                                 G4double&)
    187 {
    188   DefineMaterial(track.GetMaterialCutsCouple());
    189   const G4MaterialCutsCouple* couple = CurrentMaterialCutsCouple();
    190   G4double e = track.GetKineticEnergy();
    191   model = dynamic_cast<G4MscModel71*>(SelectModel(e));
    192   const G4ParticleDefinition* p = track.GetDefinition();
    193   G4double lambda0 = GetLambda(p, e);
    194   range =  G4LossTableManager::Instance()->GetRangeFromRestricteDEDX(p,e,couple);
    195   if(range < currentMinimalStep) currentMinimalStep = range;
    196   truePathLength = TruePathLengthLimit(track,lambda0,currentMinimalStep);
    197   //  G4cout << "StepLimit: tpl= " << truePathLength << " lambda0= "
    198   //       << lambda0 << " range= " << currentRange
    199   //       << " currentMinStep= " << currentMinimalStep << G4endl;
    200   if (truePathLength < currentMinimalStep) valueGPILSelectionMSC = CandidateForSelection;
    201   geomPathLength = model->GeomPathLength(LambdaTable(),couple,
    202            p,e,lambda0,range,truePathLength);
    203   if(geomPathLength > lambda0) geomPathLength = lambda0;
    204   return geomPathLength;
    205 }
    206 
    207 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    208 
    209182inline G4VParticleChange* G4MultipleScattering71::AlongStepDoIt(
    210183                                                        const G4Track&,
  • trunk/source/processes/electromagnetic/standard/include/G4PAIModel.hh

    r819 r961  
    2424// ********************************************************************
    2525//
     26// $Id: G4PAIModel.hh,v 1.22 2009/02/19 19:17:50 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    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

    r819 r961  
    2424// ********************************************************************
    2525//
     26// $Id: G4PAIPhotonModel.hh,v 1.12 2009/02/19 19:17:50 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2628//
    2729// -------------------------------------------------------------------
     
    6870public:
    6971
    70   G4PAIPhotonModel(const G4ParticleDefinition* p = 0, const G4String& nam = "PAI");
     72  G4PAIPhotonModel(const G4ParticleDefinition* p = 0, const G4String& nam = "PAIPhoton");
    7173
    7274  virtual ~G4PAIPhotonModel();
     
    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/G4PAIxSection.hh

    r819 r961  
    2525//
    2626//
    27 // $Id: G4PAIxSection.hh,v 1.12 2006/06/29 19:50:44 gunter Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4PAIxSection.hh,v 1.15 2008/05/30 16:04:40 grichine Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
     
    7474         
    7575  G4PAIxSection( G4int materialIndex,
    76                          G4double maxEnergyTransfer   ) ;
     76                         G4double maxEnergyTransfer   );
    7777         
    7878  G4PAIxSection( G4int materialIndex,           // for proton loss table
    7979                         G4double maxEnergyTransfer,
    8080                         G4double betaGammaSq ,
    81                          G4double** photoAbsCof, G4int intNumber         ) ;
     81                         G4double** photoAbsCof, G4int intNumber         );
    8282
    8383  G4PAIxSection( G4int materialIndex,           // test constructor
    8484                         G4double maxEnergyTransfer,
    85                          G4double betaGammaSq          ) ;
    86          
    87           // G4PAIxSection(const G4PAIxSection& right) ;
     85                         G4double betaGammaSq          );
     86         
     87          // G4PAIxSection(const G4PAIxSection& right);
    8888         
    8989          // Destructor
    9090         
    91           ~G4PAIxSection() ;
     91          ~G4PAIxSection();
    9292         
    9393          // Operators
    94           // G4PAIxSection& operator=(const G4PAIxSection& right) ;
    95           // G4int operator==(const G4PAIxSection& right)const ;
    96           // G4int operator!=(const G4PAIxSection& right)const ;
     94          // G4PAIxSection& operator=(const G4PAIxSection& right);
     95          // G4int operator==(const G4PAIxSection& right)const;
     96          // G4int operator!=(const G4PAIxSection& right)const;
    9797         
    9898          // Methods
     
    100100          // General control functions
    101101         
    102           void InitPAI() ;
    103 
    104           void NormShift( G4double betaGammaSq ) ;
    105 
    106           void SplainPAI( G4double betaGammaSq ) ;
     102          void InitPAI();
     103
     104          void NormShift( G4double betaGammaSq );
     105
     106          void SplainPAI( G4double betaGammaSq );
    107107                 
    108108          // Physical methods
     
    111111          G4double RutherfordIntegral( G4int intervalNumber,
    112112                                       G4double limitLow,
    113                                        G4double limitHigh     ) ;
     113                                       G4double limitHigh     );
    114114
    115115          G4double ImPartDielectricConst( G4int intervalNumber,
    116                                           G4double energy        ) ;
    117 
    118           G4double RePartDielectricConst(G4double energy) ;
     116                                          G4double energy        );
     117
     118          G4double GetPhotonRange( G4double energy );
     119          G4double GetElectronRange( G4double energy );
     120
     121          G4double RePartDielectricConst(G4double energy);
    119122
    120123          G4double DifPAIxSection( G4int intervalNumber,
    121                                    G4double betaGammaSq    ) ;
     124                                   G4double betaGammaSq    );
    122125
    123126          G4double PAIdNdxCerenkov( G4int intervalNumber,
    124                                    G4double betaGammaSq    ) ;
     127                                   G4double betaGammaSq    );
     128          G4double PAIdNdxMM( G4int intervalNumber,
     129                                   G4double betaGammaSq    );
    125130
    126131          G4double PAIdNdxPlasmon( G4int intervalNumber,
    127                                    G4double betaGammaSq    ) ;
    128 
    129           void     IntegralPAIxSection() ;
    130           void     IntegralCerenkov() ;
    131           void     IntegralPlasmon() ;
    132 
    133           G4double SumOverInterval(G4int intervalNumber) ;
    134           G4double SumOverIntervaldEdx(G4int intervalNumber) ;
    135           G4double SumOverInterCerenkov(G4int intervalNumber) ;
    136           G4double SumOverInterPlasmon(G4int intervalNumber) ;
     132                                   G4double betaGammaSq    );
     133
     134          G4double PAIdNdxResonance( G4int intervalNumber,
     135                                   G4double betaGammaSq    );
     136
     137          void     IntegralPAIxSection();
     138          void     IntegralCerenkov();
     139          void     IntegralMM();
     140          void     IntegralPlasmon();
     141          void     IntegralResonance();
     142
     143          G4double SumOverInterval(G4int intervalNumber);
     144          G4double SumOverIntervaldEdx(G4int intervalNumber);
     145          G4double SumOverInterCerenkov(G4int intervalNumber);
     146          G4double SumOverInterMM(G4int intervalNumber);
     147          G4double SumOverInterPlasmon(G4int intervalNumber);
     148          G4double SumOverInterResonance(G4int intervalNumber);
    137149
    138150          G4double SumOverBorder( G4int intervalNumber,
    139                                   G4double energy          ) ;
     151                                  G4double energy          );
    140152          G4double SumOverBorderdEdx( G4int intervalNumber,
    141                                   G4double energy          ) ;
     153                                  G4double energy          );
    142154          G4double SumOverBordCerenkov( G4int intervalNumber,
    143                                         G4double energy          ) ;
     155                                        G4double energy          );
     156          G4double SumOverBordMM( G4int intervalNumber,
     157                                        G4double energy          );
    144158          G4double SumOverBordPlasmon( G4int intervalNumber,
    145                                        G4double energy          ) ;
    146 
    147           G4double GetStepEnergyLoss( G4double step ) ;
    148           G4double GetStepCerenkovLoss( G4double step ) ;
    149           G4double GetStepPlasmonLoss( G4double step ) ;
     159                                       G4double energy          );
     160          G4double SumOverBordResonance( G4int intervalNumber,
     161                                       G4double energy          );
     162
     163          G4double GetStepEnergyLoss( G4double step );
     164          G4double GetStepCerenkovLoss( G4double step );
     165          G4double GetStepMMLoss( G4double step );
     166          G4double GetStepPlasmonLoss( G4double step );
     167          G4double GetStepResonanceLoss( G4double step );
     168         
     169          G4double GetEnergyTransfer();
     170          G4double GetCerenkovEnergyTransfer();
     171          G4double GetMMEnergyTransfer();
     172          G4double GetPlasmonEnergyTransfer();
     173          G4double GetResonanceEnergyTransfer();
     174          G4double GetRutherfordEnergyTransfer();
    150175         
    151176          // Inline access functions
    152177
    153           G4int GetNumberOfGammas() const { return fNumberOfGammas ; }
    154          
    155           G4int GetSplineSize() const { return fSplineNumber ; }
    156          
    157           G4int GetIntervalNumber() const { return fIntervalNumber ; }
    158 
    159           G4double GetEnergyInterval(G4int i){ return fEnergyInterval[i] ; }
    160 
    161           G4double GetDifPAIxSection(G4int i){ return fDifPAIxSection[i] ; }
    162           G4double GetPAIdNdxCrenkov(G4int i){ return fdNdxCerenkov[i] ; }
    163           G4double GetPAIdNdxPlasmon(G4int i){ return fdNdxPlasmon[i] ; }
    164          
    165           G4double GetMeanEnergyLoss() const {return fIntegralPAIxSection[0] ; }
    166           G4double GetMeanCerenkovLoss() const {return fIntegralCerenkov[0] ; }
    167           G4double GetMeanPlasmonLoss() const {return fIntegralPlasmon[0] ; }
    168 
    169           G4double GetNormalizationCof() const { return fNormalizationCof ; }
     178          G4int GetNumberOfGammas() const { return fNumberOfGammas; }
     179         
     180          G4int GetSplineSize() const { return fSplineNumber; }
     181         
     182          G4int GetIntervalNumber() const { return fIntervalNumber; }
     183
     184          G4double GetEnergyInterval(G4int i){ return fEnergyInterval[i]; }
     185
     186          G4double GetDifPAIxSection(G4int i){ return fDifPAIxSection[i]; }
     187          G4double GetPAIdNdxCerenkov(G4int i){ return fdNdxCerenkov[i]; }
     188          G4double GetPAIdNdxMM(G4int i){ return fdNdxMM[i]; }
     189          G4double GetPAIdNdxPlasmon(G4int i){ return fdNdxPlasmon[i]; }
     190          G4double GetPAIdNdxResonance(G4int i){ return fdNdxResonance[i]; }
     191         
     192          G4double GetMeanEnergyLoss() const {return fIntegralPAIxSection[0]; }
     193          G4double GetMeanCerenkovLoss() const {return fIntegralCerenkov[0]; }
     194          G4double GetMeanMMLoss() const {return fIntegralMM[0]; }
     195          G4double GetMeanPlasmonLoss() const {return fIntegralPlasmon[0]; }
     196          G4double GetMeanResonanceLoss() const {return fIntegralResonance[0]; }
     197
     198          G4double GetNormalizationCof() const { return fNormalizationCof; }
    170199         
    171           inline G4double GetPAItable(G4int i,G4int j) const ;
    172 
    173           inline G4double    GetLorentzFactor(G4int i) const ;
     200          inline G4double GetPAItable(G4int i,G4int j) const;
     201
     202          inline G4double GetLorentzFactor(G4int i) const;
    174203                 
    175           inline G4double GetSplineEnergy(G4int i) const ;
    176          
    177           inline G4double GetIntegralPAIxSection(G4int i) const ;
    178           inline G4double GetIntegralPAIdEdx(G4int i) const ;
    179           inline G4double GetIntegralCerenkov(G4int i) const ;
    180           inline G4double GetIntegralPlasmon(G4int i) const ;
     204          inline G4double GetSplineEnergy(G4int i) const;
     205         
     206          inline G4double GetIntegralPAIxSection(G4int i) const;
     207          inline G4double GetIntegralPAIdEdx(G4int i) const;
     208          inline G4double GetIntegralCerenkov(G4int i) const;
     209          inline G4double GetIntegralMM(G4int i) const;
     210          inline G4double GetIntegralPlasmon(G4int i) const;
     211          inline G4double GetIntegralResonance(G4int i) const;
    181212
    182213protected :
     
    186217// Local class constants
    187218 
    188 static const G4double fDelta ; // energy shift from interval border = 0.001
    189 static const G4double fError ; // error in lin-log approximation = 0.005
    190 
    191 static       G4int fNumberOfGammas ;         // = 111 ;
    192 static const G4double fLorentzFactor[112] ;  //  static gamma array
     219static const G4double fDelta; // energy shift from interval border = 0.001
     220static const G4double fError; // error in lin-log approximation = 0.005
     221
     222static       G4int fNumberOfGammas;         // = 111;
     223static const G4double fLorentzFactor[112];  //  static gamma array
    193224
    194225static
    195 const G4int fRefGammaNumber  ; // The number of gamma for creation of spline (15)
    196 
    197 G4int    fIntervalNumber  ;    //  The number of energy intervals
    198 G4double fNormalizationCof ;   // Normalization cof for PhotoAbsorptionXsection
    199 
    200 // G4double fBetaGammaSq ;        // (beta*gamma)^2
    201 
    202 G4double fDensity ;            // Current density
    203 G4double fElectronDensity ;    // Current electron (number) density
    204 G4int    fSplineNumber ;       // Current size of spline
     226const G4int fRefGammaNumber ; // The number of gamma for creation of spline (15)
     227
     228G4int    fIntervalNumber ;    //  The number of energy intervals
     229G4double fNormalizationCof;   // Normalization cof for PhotoAbsorptionXsection
     230
     231// G4double fBetaGammaSq;        // (beta*gamma)^2
     232
     233  G4int fMaterialIndex;  // current material index
     234  G4double fDensity;            // Current density
     235  G4double fElectronDensity;    // Current electron (number) density
     236  G4int    fSplineNumber;       // Current size of spline
    205237
    206238// Arrays of Sandia coefficients
     
    209241  G4SandiaTable*  fSandia;
    210242
    211 G4double* fEnergyInterval ;
    212 G4double* fA1 ;
    213 G4double* fA2 ;
    214 G4double* fA3 ;
    215 G4double* fA4 ;
     243G4double* fEnergyInterval;
     244G4double* fA1;
     245G4double* fA2;
     246G4double* fA3;
     247G4double* fA4;
    216248
    217249static
    218 const G4int   fMaxSplineSize  ;          // Max size of output splain arrays = 500
     250const G4int   fMaxSplineSize ;          // Max size of output splain arrays = 500
    219251
    220252/* ******************
    221 G4double*          fSplineEnergy ;   // energy points of splain
    222 G4double* fRePartDielectricConst ;   // Real part of dielectric const
    223 G4double* fImPartDielectricConst ;   // Imaginary part of dielectric const
    224 G4double*          fIntegralTerm ;   // Integral term in PAI cross section
    225 G4double*        fDifPAIxSection ;   // Differential PAI cross section
    226 G4double*   fIntegralPAIxSection ;   // Integral PAI cross section  ?
     253G4double*          fSplineEnergy;   // energy points of splain
     254G4double* fRePartDielectricConst;   // Real part of dielectric const
     255G4double* fImPartDielectricConst;   // Imaginary part of dielectric const
     256G4double*          fIntegralTerm;   // Integral term in PAI cross section
     257G4double*        fDifPAIxSection;   // Differential PAI cross section
     258G4double*   fIntegralPAIxSection;   // Integral PAI cross section  ?
    227259*/ ///////////////
    228260
    229261
    230 G4double          fSplineEnergy[500] ;   // energy points of splain
    231 G4double fRePartDielectricConst[500] ;   // Real part of dielectric const
    232 G4double fImPartDielectricConst[500] ;   // Imaginary part of dielectric const
    233 G4double          fIntegralTerm[500] ;   // Integral term in PAI cross section
    234 G4double        fDifPAIxSection[500] ;   // Differential PAI cross section
    235 G4double          fdNdxCerenkov[500] ;   // dNdx of Cerenkov collisions
    236 G4double          fdNdxPlasmon[500] ;   // dNdx of Plasmon collisions
    237 
    238 G4double   fIntegralPAIxSection[500] ;   // Integral PAI cross section  ?
    239 G4double   fIntegralPAIdEdx[500] ;   // Integral PAI dEdx  ?
    240 G4double   fIntegralCerenkov[500] ;   // Integral Cerenkov N>omega  ?
    241 G4double   fIntegralPlasmon[500] ;   // Integral Plasmon N>omega  ?
    242 
    243 G4double fPAItable[500][112] ; // Output array
    244 
    245 } ;   
     262G4double          fSplineEnergy[500];   // energy points of splain
     263G4double fRePartDielectricConst[500];   // Real part of dielectric const
     264G4double fImPartDielectricConst[500];   // Imaginary part of dielectric const
     265G4double          fIntegralTerm[500];   // Integral term in PAI cross section
     266G4double        fDifPAIxSection[500];   // Differential PAI cross section
     267G4double          fdNdxCerenkov[500];   // dNdx of Cerenkov collisions
     268G4double          fdNdxMM[500];   // dNdx of MM-Cerenkov collisions
     269G4double          fdNdxPlasmon[500];   // dNdx of Plasmon collisions
     270G4double          fdNdxResonance[500];   // dNdx of resonance collisions
     271
     272G4double   fIntegralPAIxSection[500];   // Integral PAI cross section  ?
     273G4double   fIntegralPAIdEdx[500];   // Integral PAI dEdx  ?
     274G4double   fIntegralCerenkov[500];   // Integral Cerenkov N>omega  ?
     275G4double   fIntegralMM[500];   // Integral MM-Cerenkov N>omega  ?
     276G4double   fIntegralPlasmon[500];   // Integral Plasmon N>omega  ?
     277G4double   fIntegralResonance[500];   // Integral resonance N>omega  ?
     278
     279G4double fPAItable[500][112]; // Output array
     280
     281};   
    246282
    247283////////////////  Inline methods //////////////////////////////////
     
    251287inline G4double G4PAIxSection::GetPAItable(G4int i, G4int j) const
    252288{
    253    return fPAItable[i][j] ;
     289   return fPAItable[i][j];
    254290}
    255291
    256292inline G4double G4PAIxSection::GetLorentzFactor(G4int j) const
    257293{
    258    return fLorentzFactor[j] ;
     294   return fLorentzFactor[j];
    259295}
    260296
     
    265301      G4Exception("Invalid argument in G4PAIxSection::GetSplineEnergy");
    266302   }
    267    return fSplineEnergy[i] ;
     303   return fSplineEnergy[i];
    268304}
    269305         
     
    274310    G4Exception("Invalid argument in G4PAIxSection::GetIntegralPAIxSection");
    275311   }
    276    return fIntegralPAIxSection[i] ;
     312   return fIntegralPAIxSection[i];
    277313}
    278314
     
    283319    G4Exception("Invalid argument in G4PAIxSection::GetIntegralPAIxSection");
    284320   }
    285    return fIntegralPAIdEdx[i] ;
     321   return fIntegralPAIdEdx[i];
    286322}
    287323
     
    292328    G4Exception("Invalid argument in G4PAIxSection::GetIntegralCerenkov");
    293329   }
    294    return fIntegralCerenkov[i] ;
     330   return fIntegralCerenkov[i];
     331}
     332
     333inline G4double G4PAIxSection::GetIntegralMM(G4int i) const
     334{
     335   if(i < 1 || i > fSplineNumber)
     336   {
     337    G4Exception("Invalid argument in G4PAIxSection::GetIntegralMM");
     338   }
     339   return fIntegralMM[i];
    295340}
    296341
     
    301346    G4Exception("Invalid argument in G4PAIxSection::GetIntegralPlasmon");
    302347   }
    303    return fIntegralPlasmon[i] ;
     348   return fIntegralPlasmon[i];
     349}
     350
     351inline G4double G4PAIxSection::GetIntegralResonance(G4int i) const
     352{
     353   if(i < 1 || i > fSplineNumber)
     354   {
     355    G4Exception("Invalid argument in G4PAIxSection::GetIntegralResonance");
     356   }
     357   return fIntegralResonance[i];
    304358}
    305359
  • trunk/source/processes/electromagnetic/standard/include/G4PAIySection.hh

    r819 r961  
    2626//
    2727// $Id: G4PAIySection.hh,v 1.1 2007/10/01 17:45:14 vnivanch Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/electromagnetic/standard/include/G4PEEffectModel.hh

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4PEEffectModel.hh,v 1.6 2007/05/22 17:34:36 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4PEEffectModel.hh,v 1.7 2009/02/20 12:06:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    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/G4PSTARStopping.hh

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4PSTARStopping.hh,v 1.4 2006/06/29 19:50:48 gunter Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4PSTARStopping.hh,v 1.5 2008/11/13 12:04:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828
    2929#ifndef G4PSTARStopping_h
     
    8585  G4double currentE, res;
    8686  G4double e[74][60], kinE[60];
    87   G4int Znum[74];
    8887};
    8988
  • trunk/source/processes/electromagnetic/standard/include/G4PhotoElectricEffect.hh

    r819 r961  
    2525//
    2626//
    27 // $Id: G4PhotoElectricEffect.hh,v 1.24 2007/05/23 08:47:34 vnivanch Exp $
    28 // GEANT4 tag $Name: $
     27// $Id: G4PhotoElectricEffect.hh,v 1.25 2009/02/20 12:06:37 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    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/G4PolarizedComptonScattering.hh

    r819 r961  
    2626//
    2727// $Id: G4PolarizedComptonScattering.hh,v 1.9 2006/06/29 19:51:14 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// --------- G4PolarizedComptonScattering physics process ----------------------
  • trunk/source/processes/electromagnetic/standard/include/G4UniversalFluctuation.hh

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4UniversalFluctuation.hh,v 1.5 2007/04/03 11:08:36 urban Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4UniversalFluctuation.hh,v 1.8 2009/02/19 19:17:50 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -------------------------------------------------------------------
     
    5959
    6060#include "G4VEmFluctuationModel.hh"
     61#include "G4ParticleDefinition.hh"
    6162
    6263class G4UniversalFluctuation : public G4VEmFluctuationModel
     
    6970  virtual ~G4UniversalFluctuation();
    7071
    71   G4double SampleFluctuations(const G4Material*,
    72                           const G4DynamicParticle*,
    73                                 G4double&,
    74                                 G4double&,
    75                                 G4double&);
     72  virtual G4double SampleFluctuations(const G4Material*,
     73                                      const G4DynamicParticle*,
     74                                      G4double&,
     75                                      G4double&,
     76                                      G4double&);
    7677
    77   G4double Dispersion(    const G4Material*,
    78                           const G4DynamicParticle*,
    79                                 G4double&,
    80                                 G4double&);
     78  virtual G4double Dispersion(    const G4Material*,
     79                                  const G4DynamicParticle*,
     80                                  G4double&,
     81                                  G4double&);
    8182
    82   void InitialiseMe(const G4ParticleDefinition*);
     83  // Initialisation before the run
     84  virtual void InitialiseMe(const G4ParticleDefinition*);
    8385
    84 protected:
     86  // Initialisation prestep
     87  virtual void SetParticleAndCharge(const G4ParticleDefinition*, G4double q2);
    8588
    8689private:
  • trunk/source/processes/electromagnetic/standard/include/G4UrbanMscModel.hh

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4UrbanMscModel.hh,v 1.31 2007/10/29 08:42:43 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     26// $Id: G4UrbanMscModel.hh,v 1.33 2008/03/10 10:39:21 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -------------------------------------------------------------------
     
    9191//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    9292
    93 #include "G4VEmModel.hh"
     93#include "G4VMscModel.hh"
    9494#include "G4PhysicsTable.hh"
    9595#include "G4MscStepLimitType.hh"
     
    101101//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    102102
    103 class G4UrbanMscModel : public G4VEmModel
     103class G4UrbanMscModel : public G4VMscModel
    104104{
    105105
    106106public:
    107107
    108   G4UrbanMscModel(G4double facrange, G4double dtrl, G4double lambdalimit,
    109                   G4double facgeom,G4double skin,
    110                   G4bool samplez, G4MscStepLimitType stepAlg,
    111                   const G4String& nam = "UrbanMscUni");
     108  G4UrbanMscModel(const G4String& nam = "UrbanMscUni");
    112109
    113110  virtual ~G4UrbanMscModel();
    114111
    115   virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
    116 
     112  void Initialise(const G4ParticleDefinition*, const G4DataVector&);
     113                                         
    117114  G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition* particle,
    118115                                      G4double KineticEnergy,
     
    142139                         G4double KineticEnergy);
    143140
    144   void SetStepLimitType(G4MscStepLimitType);
    145 
    146   void SetLateralDisplasmentFlag(G4bool val);
    147 
    148   void SetRangeFactor(G4double);
    149 
    150   void SetGeomFactor(G4double);
    151 
    152   void SetSkin(G4double);
    153 
    154141private:
    155142
     
    160147  G4double LatCorrelation();
    161148
    162   G4double GetLambda(G4double kinEnergy);
    163 
    164149  void GeomLimit(const G4Track& track);
    165150
    166   void SetParticle(const G4ParticleDefinition* p);
     151  inline G4double GetLambda(G4double kinEnergy);
     152
     153  inline void SetParticle(const G4ParticleDefinition*);
    167154
    168155  //  hide assignment operator
     
    178165  G4LossTableManager*         theManager;
    179166
    180 
    181167  G4double mass;
    182168  G4double charge;
     
    188174  G4double taulim;
    189175  G4double currentTau;
    190   G4double dtrl;
    191 
    192   G4double lambdalimit;
    193   G4double facrange;
    194176  G4double frscaling1,frscaling2;
    195177  G4double tlimit;
     
    201183  G4double geommin;
    202184  G4double geomlimit;
    203   G4double facgeom;
    204   G4double skin;
    205185  G4double skindepth;
    206186  G4double smallstep;
    207187
    208188  G4double presafety;
    209   G4double facsafety;
    210189
    211190  G4double lambda0;
     
    213192  G4double tPathLength;
    214193  G4double zPathLength;
    215   G4double par1,par2,par3 ;
    216 
    217   G4double stepmin ;
     194  G4double par1,par2,par3;
     195
     196  G4double stepmin;
    218197
    219198  G4double currentKinEnergy;
     
    225204  G4int    currentMaterialIndex;
    226205
    227   G4MscStepLimitType steppingAlgorithm;
    228 
    229   G4bool   samplez;
    230   G4bool   latDisplasment;
    231206  G4bool   isInitialized;
    232 
    233207  G4bool   inside;
    234208  G4bool   insideskin;
    235209
    236210};
    237 
    238 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    239 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    240 
    241 inline
    242 void G4UrbanMscModel::SetLateralDisplasmentFlag(G4bool val)
    243 {
    244   latDisplasment = val;
    245 }
    246 
    247 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    248 
    249 inline
    250 void G4UrbanMscModel::SetSkin(G4double val)
    251 {
    252   skin = val;
    253   stepmin       = tlimitminfix;
    254   skindepth     = skin*stepmin;
    255 }
    256 
    257 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    258 
    259 inline
    260 void G4UrbanMscModel::SetRangeFactor(G4double val)
    261 {
    262   facrange = val;
    263 }
    264 
    265 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    266 
    267 inline
    268 void G4UrbanMscModel::SetGeomFactor(G4double val)
    269 {
    270   facgeom = val;
    271 }
    272 
    273 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    274 
    275 inline
    276 void G4UrbanMscModel::SetStepLimitType(G4MscStepLimitType val)
    277 {
    278   steppingAlgorithm = val;
    279 }
    280211
    281212//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/source/processes/electromagnetic/standard/include/G4UrbanMscModel90.hh

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4UrbanMscModel90.hh,v 1.1 2007/12/07 17:35:52 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     26// $Id: G4UrbanMscModel90.hh,v 1.4 2008/10/29 14:15:30 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -------------------------------------------------------------------
     
    5555//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    5656
    57 #include "G4VEmModel.hh"
     57#include "G4VMscModel.hh"
    5858#include "G4PhysicsTable.hh"
    5959#include "G4MscStepLimitType.hh"
     
    6565//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    6666
    67 class G4UrbanMscModel90 : public G4VEmModel
     67class G4UrbanMscModel90 : public G4VMscModel
    6868{
    6969
    7070public:
    7171
    72   G4UrbanMscModel90(G4double facrange, G4double dtrl, G4double lambdalimit,
    73                   G4double facgeom,G4double skin,
    74                   G4bool samplez, G4MscStepLimitType stepAlg,
    75                   const G4String& nam = "UrbanMscUni");
     72  G4UrbanMscModel90(const G4String& nam = "UrbanMscUni90");
    7673
    7774  virtual ~G4UrbanMscModel90();
    7875
    79   virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
     76  void Initialise(const G4ParticleDefinition*, const G4DataVector&);
    8077
    8178  G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition* particle,
     
    106103                         G4double KineticEnergy);
    107104
    108   void SetStepLimitType(G4MscStepLimitType);
    109 
    110   void SetLateralDisplasmentFlag(G4bool val);
    111 
    112   void SetRangeFactor(G4double);
    113 
    114   void SetGeomFactor(G4double);
    115 
    116   void SetSkin(G4double);
    117 
    118105private:
    119106
     
    124111  G4double LatCorrelation();
    125112
    126   G4double GetLambda(G4double kinEnergy);
    127 
    128113  void GeomLimit(const G4Track& track);
    129114
    130   void SetParticle(const G4ParticleDefinition* p);
     115  inline G4double GetLambda(G4double kinEnergy);
     116
     117  inline void SetParticle(const G4ParticleDefinition*);
    131118
    132119  //  hide assignment operator
     
    142129  G4LossTableManager*         theManager;
    143130
    144 
    145131  G4double mass;
    146132  G4double charge;
     
    152138  G4double taulim;
    153139  G4double currentTau;
    154   G4double dtrl;
    155 
    156   G4double lambdalimit;
    157   G4double facrange;
    158140  G4double frscaling1,frscaling2;
    159141  G4double tlimit;
     
    165147  G4double geommin;
    166148  G4double geomlimit;
    167   G4double facgeom;
    168   G4double skin;
    169149  G4double skindepth;
    170150  G4double smallstep;
    171151
    172152  G4double presafety;
    173   G4double facsafety;
    174153
    175154  G4double lambda0;
     
    177156  G4double tPathLength;
    178157  G4double zPathLength;
    179   G4double par1,par2,par3 ;
    180 
    181   G4double stepmin ;
     158  G4double par1,par2,par3;
     159
     160  G4double stepmin;
    182161
    183162  G4double currentKinEnergy;
     
    189168  G4int    currentMaterialIndex;
    190169
    191   G4MscStepLimitType steppingAlgorithm;
    192 
    193   G4bool   samplez;
    194   G4bool   latDisplasment;
    195170  G4bool   isInitialized;
    196 
    197171  G4bool   inside;
    198172  G4bool   insideskin;
    199173
    200174};
    201 
    202 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    203 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    204 
    205 inline
    206 void G4UrbanMscModel90::SetLateralDisplasmentFlag(G4bool val)
    207 {
    208   latDisplasment = val;
    209 }
    210 
    211 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    212 
    213 inline
    214 void G4UrbanMscModel90::SetSkin(G4double val)
    215 {
    216   skin = val;
    217   stepmin       = tlimitminfix;
    218   skindepth     = skin*stepmin;
    219 }
    220 
    221 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    222 
    223 inline
    224 void G4UrbanMscModel90::SetRangeFactor(G4double val)
    225 {
    226   facrange = val;
    227 }
    228 
    229 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    230 
    231 inline
    232 void G4UrbanMscModel90::SetGeomFactor(G4double val)
    233 {
    234   facgeom = val;
    235 }
    236 
    237 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    238 
    239 inline
    240 void G4UrbanMscModel90::SetStepLimitType(G4MscStepLimitType val)
    241 {
    242   steppingAlgorithm = val;
    243 }
    244175
    245176//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/source/processes/electromagnetic/standard/include/G4WaterStopping.hh

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4WaterStopping.hh,v 1.2 2006/06/29 19:51:56 gunter Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4WaterStopping.hh,v 1.6 2008/09/09 09:30:58 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828
    2929#ifndef G4WaterStopping_h
     
    6060public:
    6161
    62   G4WaterStopping(G4EmCorrections* corr = 0);
     62  G4WaterStopping(G4EmCorrections* corr = 0, G4bool splineFlag = true);
    6363
    6464  ~G4WaterStopping();
     
    7070  void Initialise(G4EmCorrections*);
    7171
     72  void AddData(G4double* energy, G4double* stoppower, G4double factor);
     73
    7274  // hide assignment operator
    7375  G4WaterStopping & operator=(const  G4WaterStopping &right);
    7476  G4WaterStopping(const  G4WaterStopping&);
    7577
    76   G4int    Z[8];
    77   G4int    A[8];
     78  G4bool   spline;
     79  G4int    Z[16];
     80  G4double A[16];
    7881  std::vector<G4LPhysicsFreeVector*>  dedx;
    7982};
  • trunk/source/processes/electromagnetic/standard/include/G4eBremsstrahlung.hh

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4eBremsstrahlung.hh,v 1.36 2007/05/23 08:47:34 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4eBremsstrahlung.hh,v 1.37 2009/02/20 12:06:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    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

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4eBremsstrahlungModel.hh,v 1.22 2007/05/23 08:47:34 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4eBremsstrahlungModel.hh,v 1.26 2009/02/20 12:06:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -------------------------------------------------------------------
     
    6969
    7070  G4eBremsstrahlungModel(const G4ParticleDefinition* p = 0,
    71                          const G4String& nam = "StandBrem");
     71                         const G4String& nam = "eBrem");
    7272
    7373  virtual ~G4eBremsstrahlungModel();
     
    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*,
     
    101101                                 G4double maxEnergy);
    102102
    103   inline void SetLPMflag(G4bool val);
    104   inline G4bool LPMflag() const;
    105 
    106   inline void SetEnergyThreshold(G4double val);
    107   inline G4double EnergyThreshold() const;
    108 
    109103protected:
    110 
    111   inline G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
    112                                      G4double kineticEnergy);
    113104
    114105  const G4Element* SelectRandomAtom(const G4MaterialCutsCouple* couple);
     
    154145  G4double MigdalConstant;
    155146  G4double LPMconstant;
    156   G4double highEnergyTh;
    157   G4bool   theLPMflag;
    158147  G4bool   isInitialised;
    159148
     
    199188//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    200189
    201 inline
    202 G4double G4eBremsstrahlungModel::MaxSecondaryEnergy(
    203                                  const G4ParticleDefinition*,
    204                                        G4double kineticEnergy)
    205 {
    206   return kineticEnergy;
    207 }
    208 
    209 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    210 
    211 inline
    212 void G4eBremsstrahlungModel::SetLPMflag(G4bool val)
    213 {
    214   theLPMflag = val;
    215 }
    216 
    217 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    218 
    219 inline
    220 G4bool G4eBremsstrahlungModel::LPMflag() const
    221 {
    222   return theLPMflag;
    223 }
    224 
    225 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    226 
    227 inline
    228 void G4eBremsstrahlungModel::SetEnergyThreshold(G4double val)
    229 {
    230   highEnergyTh = val;
    231 }
    232 
    233 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    234 
    235 inline
    236 G4double G4eBremsstrahlungModel::EnergyThreshold() const
    237 {
    238   return highEnergyTh;
    239 }
    240 
    241 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    242 
    243190#endif
  • trunk/source/processes/electromagnetic/standard/include/G4eCoulombScatteringModel.hh

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4eCoulombScatteringModel.hh,v 1.20 2007/10/24 10:42:05 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     26// $Id: G4eCoulombScatteringModel.hh,v 1.36 2008/08/04 08:49:09 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -------------------------------------------------------------------
     
    4545//                       make some members protected
    4646// 09.10.07 V.Ivanchenko reorganized methods, add cut dependence in scattering off e-
     47// 09.06.08 V.Ivanchenko add SelectIsotope and sampling of the recoil ion
    4748//
    4849// Class Description:
     
    7576public:
    7677
    77   G4eCoulombScatteringModel(G4double thetaMin = 0.0, G4double thetaMax = pi,
    78                            G4bool build = false, G4double tlim = TeV*TeV,
    79                            const G4String& nam = "eCoulombScattering");
     78  G4eCoulombScatteringModel(const G4String& nam = "eCoulombScattering");
    8079 
    8180  virtual ~G4eCoulombScatteringModel();
     
    9796                                 G4double maxEnergy);
    9897
     98  inline void SetRecoilThreshold(G4double eth);
     99
    99100protected:
    100101
    101   G4double ComputeElectronXSectionPerAtom(
    102                                  const G4ParticleDefinition*,
    103                                  G4double kinEnergy,
    104                                  G4double Z,
    105                                  G4double A,
    106                                  G4double cut);
    107 
    108   virtual G4double CalculateCrossSectionPerAtom(
    109                                  const G4ParticleDefinition*,
    110                                  G4double kinEnergy,
    111                                  G4double Z, G4double A);
     102  G4double CrossSectionPerAtom();
     103
     104  G4double SampleCosineTheta();
     105
     106  inline void DefineMaterial(const G4MaterialCutsCouple*);
    112107
    113108  inline void SetupParticle(const G4ParticleDefinition*);
    114109
    115   inline void SetupKinematic(G4double kinEnergy);
     110  inline void SetupKinematic(G4double kinEnergy, G4double cut);
    116111 
    117   inline void SetupTarget(G4double Z, G4double A, G4double kinEnergy);
     112  inline void SetupTarget(G4double Z, G4double kinEnergy);
    118113
    119114private:
     115
     116  void ComputeMaxElectronScattering(G4double cut);
    120117
    121118  // hide assignment operator
     
    124121
    125122protected:
    126 
     123 
    127124  const G4ParticleDefinition* theProton;
    128125  const G4ParticleDefinition* theElectron;
    129126  const G4ParticleDefinition* thePositron;
    130127
     128  G4ParticleTable*          theParticleTable;
    131129  G4ParticleChangeForGamma* fParticleChange;
    132130  G4NistManager*            fNistManager;
     131  const G4DataVector*       currentCuts;
     132
     133  const G4MaterialCutsCouple* currentCouple;
     134  const G4Material*           currentMaterial;
     135  const G4Element*            currentElement;
     136  G4int                       currentMaterialIndex;
    133137
    134138  G4double                  coeff;
     
    136140  G4double                  cosThetaMin;
    137141  G4double                  cosThetaMax;
     142  G4double                  cosTetMinNuc;
    138143  G4double                  cosTetMaxNuc;
     144  G4double                  cosTetMaxNuc2;
    139145  G4double                  cosTetMaxElec;
     146  G4double                  cosTetMaxElec2;
    140147  G4double                  q2Limit;
     148  G4double                  recoilThreshold;
    141149  G4double                  elecXSection;
    142150  G4double                  nucXSection;
     
    152160  G4double                  mom2;
    153161  G4double                  invbeta2;
     162  G4double                  etag;
     163  G4double                  lowEnergyLimit;
    154164
    155165  // target
    156166  G4double                  targetZ;
    157   G4double                  targetA;
    158167  G4double                  screenZ;
    159168  G4double                  formfactA;
     169  G4int                     idxelm;
    160170
    161171private:
    162172
    163   G4PhysicsTable*           theCrossSectionTable;
    164 
    165173  G4double                  a0;
    166   G4double                  lowKEnergy;
    167   G4double                  highKEnergy;
    168174  G4double                  alpha2;
    169175  G4double                  faclim;
    170 
    171   G4int                     nbins;
    172   G4int                     nmax;
    173   G4int                     index[100];
    174 
    175   G4bool                    buildTable;             
     176  G4double                  FF[100];
     177
    176178  G4bool                    isInitialised;             
    177179};
     180
     181//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     182
     183inline
     184void G4eCoulombScatteringModel::DefineMaterial(const G4MaterialCutsCouple* cup)
     185{
     186  if(cup != currentCouple) {
     187    currentCouple = cup;
     188    currentMaterial = cup->GetMaterial();
     189    currentMaterialIndex = currentCouple->GetIndex();
     190  }
     191}
    178192
    179193//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     
    190204    chargeSquare = q*q;
    191205    tkin = 0.0;
     206    lowEnergyLimit = keV*mass/electron_mass_c2;
    192207  }
    193208}
     
    195210//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    196211
    197 inline void G4eCoulombScatteringModel::SetupKinematic(G4double ekin)
    198 {
    199   if(ekin != tkin) {
    200     tkin  = ekin;
    201     mom2  = tkin*(tkin + 2.0*mass);
     212inline void G4eCoulombScatteringModel::SetupKinematic(G4double ekin,
     213                                                      G4double cut)
     214{
     215  if(ekin != tkin || ecut != cut) {
     216    tkin = ekin;
     217    mom2 = tkin*(tkin + 2.0*mass);
    202218    invbeta2 = 1.0 +  mass*mass/mom2;
    203   }
     219    cosTetMinNuc = cosThetaMin;
     220    cosTetMaxNuc = cosThetaMax;
     221    if(ekin <= 10.*cut && mass < MeV && cosThetaMin < 1.0) {
     222      cosTetMinNuc = ekin*(cosThetaMin + 1.0)/(10.*cut) - 1.0;
     223    }
     224    ComputeMaxElectronScattering(cut);
     225  }
    204226}
    205227
    206228//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    207229 
    208 inline void G4eCoulombScatteringModel::SetupTarget(G4double Z, G4double A,
    209                                                    G4double e)
    210 {
    211   if(e != tkin || Z != targetZ || A != targetA) {
     230inline void G4eCoulombScatteringModel::SetupTarget(G4double Z, G4double e)
     231{
     232  if(Z != targetZ || e != etag) {
     233    etag    = e;
    212234    targetZ = Z;
    213     targetA = A;
    214     SetupKinematic(e);
    215     cosTetMaxNuc = std::max(cosThetaMax, 1.0 - 0.5*q2Limit/mom2);
    216     G4double x = fNistManager->GetZ13(Z);
    217     screenZ = a0*x*x*(1.13 + 3.76*invbeta2*Z*Z*chargeSquare*alpha2)/mom2;
    218     if(particle == theProton && A < 1.5 && cosTetMaxNuc < 0.0)
    219       cosTetMaxNuc = 0.0;
     235    G4int iz= G4int(Z);
     236    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;
    220241    // A.V. Butkevich et al., NIM A 488 (2002) 282
    221     x =  fNistManager->GetLOGA(A);
    222     formfactA = mom2*constn*std::exp(0.54*x);
     242    formfactA = FF[iz];
     243    if(formfactA == 0.0) {
     244      x = fNistManager->GetA27(iz);
     245      formfactA = constn*x*x;
     246      FF[iz] = formfactA;
     247    }
     248    formfactA *= mom2;
     249    cosTetMaxNuc2 = cosTetMaxNuc;
     250    if(particle == theProton && 1 == iz && cosTetMaxNuc2 < 0.0) {
     251      cosTetMaxNuc2 = 0.0;
     252    }
     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    */
     260    cosTetMaxElec2 = cosTetMaxElec;
    223261  }
    224262}
     
    226264//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    227265
     266inline void G4eCoulombScatteringModel::SetRecoilThreshold(G4double eth)
     267{
     268  recoilThreshold = eth;
     269}
     270
     271//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     272
    228273#endif
  • trunk/source/processes/electromagnetic/standard/include/G4eIonisation.hh

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4eIonisation.hh,v 1.35 2007/05/23 08:47:34 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4eIonisation.hh,v 1.36 2009/02/20 12:06:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    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/G4eeToTwoGammaModel.hh

    r819 r961  
    2525//
    2626// $Id: G4eeToTwoGammaModel.hh,v 1.14 2007/05/23 08:47:34 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -------------------------------------------------------------------
  • trunk/source/processes/electromagnetic/standard/include/G4eplusAnnihilation.hh

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4eplusAnnihilation.hh,v 1.23 2007/05/23 08:47:34 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4eplusAnnihilation.hh,v 1.24 2009/02/20 12:06:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    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

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4hIonisation.hh,v 1.38 2008/01/14 11:59:45 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     26// $Id: G4hIonisation.hh,v 1.42 2009/02/20 12:06:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -------------------------------------------------------------------
     
    6363// 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
    6464// 11-04-04 Move MaxSecondaryEnergy to models (V.Ivanchenko)
     65// 12-09-08 Removed CorrectionsAlongStep (VI)
    6566//
    6667// Class Description:
     
    8081#include "G4Positron.hh"
    8182#include "globals.hh"
    82 #include "G4VEmModel.hh"
    83 #include "G4EmCorrections.hh"
    8483
    8584class G4Material;
     
    9493  virtual ~G4hIonisation();
    9594
    96   G4bool IsApplicable(const G4ParticleDefinition& p);
     95  virtual G4bool IsApplicable(const G4ParticleDefinition& p);
    9796
    98   G4double MinPrimaryEnergy(const G4ParticleDefinition* p,
    99                             const G4Material*, G4double cut);
     97  virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p,
     98                                    const G4Material*, G4double cut);
    10099
    101100  // Print out of the class parameters
     
    105104
    106105protected:
    107 
    108   void CorrectionsAlongStep(
    109                            const G4MaterialCutsCouple*,
    110                            const G4DynamicParticle*,
    111                                  G4double& eloss,
    112                                  G4double& length);
    113106
    114107  virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*,
     
    121114  G4hIonisation(const G4hIonisation&);
    122115
     116  G4bool     isInitialised;
     117  G4bool     nuclearStopping;
     118
    123119  G4double   mass;
    124120  G4double   ratio;
    125 
    126   const G4ParticleDefinition* theParticle;
    127   const G4ParticleDefinition* theBaseParticle;
    128   G4EmCorrections*            corr;
    129 
    130   G4bool                      isInitialised;
    131   G4bool                      nuclearStopping;
    132 
    133   G4double                    eth;
    134   G4double                    ethnuc;
    135   G4double                    massratio;
    136 
     121  G4double   eth;
    137122};
    138 
    139 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    140 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    141 
    142 inline G4bool G4hIonisation::IsApplicable(const G4ParticleDefinition& p)
    143 {
    144   return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV &&
    145          !p.IsShortLived());
    146 }
    147 
    148 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    149 
    150 inline G4double G4hIonisation::MinPrimaryEnergy(const G4ParticleDefinition*,
    151                                                 const G4Material*,
    152                                                 G4double cut)
    153 {
    154   G4double x = 0.5*cut/electron_mass_c2;
    155   G4double y = electron_mass_c2/mass;
    156   G4double g = x*y + std::sqrt((1. + x)*(1. + x*y*y));
    157   return mass*(g - 1.0);
    158 }
    159123
    160124//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
  • trunk/source/processes/electromagnetic/standard/include/G4hMultipleScattering.hh

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4hMultipleScattering.hh,v 1.4 2007/12/07 17:35:52 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     26// $Id: G4hMultipleScattering.hh,v 1.6 2008/05/09 08:23:44 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -----------------------------------------------------------------------------
     
    6060//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    6161
    62 class G4UrbanMscModel90;
     62class G4VMscModel;
    6363
    6464class G4hMultipleScattering : public G4VMultipleScattering
     
    8686  void SetLambdalimit(G4double value) { lambdalimit = value;};
    8787
     88  // The function overloads the corresponding function of the base
     89  // class.It limits the step near to boundaries only
     90  // and invokes the method GetMscContinuousStepLimit at every step.
     91  G4double AlongStepGetPhysicalInteractionLength(
     92                                            const G4Track&,
     93                                            G4double  previousStepSize,
     94                                            G4double  currentMinimalStep,
     95                                            G4double& currentSafety,
     96                                            G4GPILSelection* selection);
     97
    8898protected:
    8999
     
    93103private:        // data members
    94104
    95   G4UrbanMscModel90* mscUrban;
     105  G4VMscModel* mscUrban;
    96106
    97107  G4double lambdalimit;
     
    100110  G4bool   samplez;
    101111  G4bool   isInitialized;
     112  G4bool   isIon;
    102113
    103114};
  • trunk/source/processes/electromagnetic/standard/include/G4ionGasIonisation.hh

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4ionGasIonisation.hh,v 1.2 2007/08/13 06:13:30 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     26// $Id: G4ionGasIonisation.hh,v 1.4 2008/09/12 16:26:34 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -------------------------------------------------------------------
     
    5555#include "G4ionIonisation.hh"
    5656
    57 class G4Material;
    58 
    5957class G4ionGasIonisation : public G4ionIonisation
    6058{
     
    6563  virtual ~G4ionGasIonisation();
    6664
    67   virtual void PrintInfo();
    68 
    69 protected:
    70 
    71   // Initialise process before run
    72   virtual void InitialiseEnergyLossProcess(
    73                                    const G4ParticleDefinition*,
    74                                    const G4ParticleDefinition*);
    75 
    76   // Initialise dynamic charge before step
    77   virtual void InitialiseMassCharge(const G4Track&);
    78 
    79   // Apply correction after step and modify dynamic charge
    80   virtual void CorrectionsAlongStep(
    81                            const G4MaterialCutsCouple*,
    82                            const G4DynamicParticle*,
    83                                  G4double& eloss,
    84                                  G4double& length);
    85 
    8665private:
    87 
    88   // Sample change of charge of the projectile ion
    89   G4double SampleChargeAfterStep(G4double qeff, G4double xeff);
    9066
    9167  // hide assignment operator
    9268  G4ionGasIonisation & operator=(const G4ionGasIonisation &right);
    9369  G4ionGasIonisation(const G4ionGasIonisation&);
    94 
    95   const G4ParticleDefinition* currParticle;
    96   const G4ParticleDefinition* baseParticle;
    97 
    98   G4double                    basePartMass;
    99   G4double                    currMassRatio;
    100   G4double                    atomXS;
    101   G4double                    preStepKinEnergy;
    102 
    103   G4int                       currentIonZ;
    104   G4int                       ionZ;
    105 
    106   G4bool                      initialised;
    107 
    10870};
    10971
  • trunk/source/processes/electromagnetic/standard/include/G4ionIonisation.hh

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4ionIonisation.hh,v 1.50 2007/11/09 11:45:45 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     26// $Id: G4ionIonisation.hh,v 1.57 2009/02/20 12:06:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -------------------------------------------------------------------
     
    5757// 22-07-06 Remove obsolete method (V.Ivantchenko)
    5858// 07-11-07 Moved CorrectionsAlongStep to cc (V.Ivantchenko)
     59// 12-09-08 Removed InitialiseMassCharge and CorrectionsAlongStep (VI)
    5960//
    6061// Class Description:
     
    7273
    7374#include "G4VEnergyLossProcess.hh"
    74 #include "G4ionEffectiveCharge.hh"
    75 #include "G4VEmModel.hh"
    76 #include "G4EmCorrections.hh"
    7775
    7876class G4Material;
    79 class G4PhysicsVector;
    80 class G4BraggIonModel;
     77class G4EmCorrections;
    8178
    8279class G4ionIonisation : public G4VEnergyLossProcess
     
    8885  virtual ~G4ionIonisation();
    8986
    90   inline G4bool IsApplicable(const G4ParticleDefinition& p);
     87  virtual G4bool IsApplicable(const G4ParticleDefinition& p);
    9188
    9289  // Print out of the class parameters
     
    9491
    9592  void AddStoppingData(G4int Z, G4int A, const G4String& materialName,
    96                        G4PhysicsVector& dVector);
     93                       G4PhysicsVector* dVector);
    9794
    9895  void ActivateStoppingData(G4bool);
     
    105102                                           const G4ParticleDefinition*);
    106103
    107   virtual void CorrectionsAlongStep(const G4MaterialCutsCouple*,
    108                                     const G4DynamicParticle*,
    109                                     G4double& eloss,
    110                                     G4double& length);
    111 
    112   inline void InitialiseMassCharge(const G4Track&);
    113 
    114   inline G4double MinPrimaryEnergy(const G4ParticleDefinition* p,
     104  virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p,
    115105                                   const G4Material*, G4double cut);
    116106
     
    118108
    119109  inline G4bool NuclearStoppingFlag();
    120 
    121   // protected pointers
    122   G4ionEffectiveCharge*       effCharge;
    123   G4EmCorrections*            corr;
    124110
    125111private:
     
    129115  G4ionIonisation(const G4ionIonisation&);
    130116
    131   // cash
    132   const G4Material*           curMaterial;
    133   const G4ParticleDefinition* curParticle;
     117  G4EmCorrections*            corr;
     118
    134119  const G4ParticleDefinition* theParticle;
    135   const G4ParticleDefinition* theBaseParticle;
    136120
    137   G4double                    preKinEnergy;
     121  G4double   eth;
    138122
    139   G4double                    eth;
    140   G4double                    baseMass;
    141   G4double                    massRatio;
    142   G4double                    massFactor;
    143   G4double                    charge2;
    144 
    145   G4bool                      isInitialised;
    146   G4bool                      stopDataActive;
    147   G4bool                      nuclearStopping;
     123  G4bool     isInitialised;
     124  G4bool     stopDataActive;
     125  G4bool     nuclearStopping;
    148126};
    149127
    150128//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    151 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    152 
    153 inline G4bool G4ionIonisation::IsApplicable(const G4ParticleDefinition& p)
    154 {
    155   return (p.GetPDGCharge() != 0.0 && !p.IsShortLived() &&
    156           p.GetParticleType() == "nucleus");
    157 }
    158 
    159 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    160 
    161 inline G4double G4ionIonisation::MinPrimaryEnergy(
    162           const G4ParticleDefinition*, const G4Material*, G4double cut)
    163 {
    164   G4double x = 0.5*cut/electron_mass_c2;
    165   G4double g = std::sqrt(1. + x);
    166   return proton_mass_c2*(g - 1.0);
    167 }
    168 
    169 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    170 
    171 inline void G4ionIonisation::InitialiseMassCharge(const G4Track& track)
    172 {
    173   preKinEnergy = track.GetKineticEnergy();
    174   massRatio    = baseMass/track.GetDynamicParticle()->GetMass();
    175   charge2      = effCharge->EffectiveChargeSquareRatio(track.GetDefinition(),
    176                                                        track.GetMaterial(),
    177                                                        preKinEnergy);
    178   SetDynamicMassCharge(massRatio, charge2);
    179 }
    180 
    181129//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    182130
Note: See TracChangeset for help on using the changeset viewer.