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

update processes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.