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

maj sur la beta de geant 4.9.3

File:
1 edited

Legend:

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

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