Ignore:
Timestamp:
Jun 18, 2010, 11:42:07 AM (14 years ago)
Author:
garnier
Message:

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

File:
1 edited

Legend:

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

    r1228 r1315  
    2424// ********************************************************************
    2525//
    26 // $Id: G4eCoulombScatteringModel.hh,v 1.49 2009/10/10 15:16:57 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03 $
     26// $Id: G4eCoulombScatteringModel.hh,v 1.56 2010/05/27 14:22:05 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    4747// 09.06.08 V.Ivanchenko add SelectIsotope and sampling of the recoil ion
    4848// 17.06.09 C.Consoalndi modified SetupTarget method - remove kinFactor
     49// 27.05.10 V.Ivanchenko added G4WentzelOKandVIxSection class to
     50//              compute cross sections and sample scattering angle
    4951//                                     
    5052//
     
    6668
    6769#include "G4VEmModel.hh"
    68 #include "G4PhysicsTable.hh"
    6970#include "globals.hh"
    70 #include "G4NistManager.hh"
    71 #include <vector>
     71#include "G4MaterialCutsCouple.hh"
     72#include "G4WentzelOKandVIxSection.hh"
    7273
    7374class G4ParticleChangeForGamma;
    7475class G4ParticleDefinition;
     76class G4ParticleTable;
     77class G4NistManager;
    7578
    7679class G4eCoulombScatteringModel : public G4VEmModel
     
    99102                                 G4double maxEnergy);
    100103
     104  // defines low energy limit of the model
     105  inline void SetLowEnergyLimit(G4double val);
     106
     107  // obsolete method
    101108  inline void SetRecoilThreshold(G4double eth);
    102109
    103110protected:
    104 
    105   G4double CrossSectionPerAtom();
    106 
    107   G4double SampleCosineTheta();
    108111
    109112  inline void DefineMaterial(const G4MaterialCutsCouple*);
     
    111114  inline void SetupParticle(const G4ParticleDefinition*);
    112115
    113   inline void SetupKinematic(G4double kinEnergy, G4double cut);
    114  
    115   inline void SetupTarget(G4double Z, G4double kinEnergy);
    116 
    117116private:
    118 
    119   void ComputeMaxElectronScattering(G4double cut);
    120117
    121118  // hide assignment operator
     
    125122protected:
    126123 
    127   const G4ParticleDefinition* theProton;
    128   const G4ParticleDefinition* theElectron;
    129   const G4ParticleDefinition* thePositron;
    130 
    131   G4ParticleTable*          theParticleTable;
     124  G4ParticleTable*          theParticleTable;
    132125  G4ParticleChangeForGamma* fParticleChange;
     126  G4WentzelOKandVIxSection* wokvi;
    133127  G4NistManager*            fNistManager;
    134128
     
    140134  G4int                       currentMaterialIndex;
    141135
    142   G4double                  coeff;
    143136  G4double                  cosThetaMin;
    144137  G4double                  cosThetaMax;
    145138  G4double                  cosTetMinNuc;
    146139  G4double                  cosTetMaxNuc;
    147   G4double                  cosTetMaxNuc2;
    148   G4double                  cosTetMaxElec;
    149   G4double                  cosTetMaxElec2;
    150   G4double                  q2Limit;
    151140  G4double                  recoilThreshold;
    152   G4double                  elecXSection;
    153   G4double                  nucXSection;
    154   G4double                  ecut;
     141  G4double                  elecRatio;
     142  G4double                  mass;
    155143
    156144  // projectile
    157145  const G4ParticleDefinition* particle;
     146  const G4ParticleDefinition* theProton;
    158147
    159   G4double                  chargeSquare;
    160   G4double                  spin;
    161   G4double                  mass;
    162   G4double                  tkin;
    163   G4double                  mom2;
    164   G4double                  invbeta2;
    165   G4double                  etag;
    166148  G4double                  lowEnergyLimit;
    167149
    168   // target
    169   G4double                  targetZ;
    170   G4double                  targetMass;
    171   G4double                  screenZ;
    172   G4double                  formfactA;
    173   G4int                     idxelm;
    174   G4int                     iz;
    175 
    176150private:
    177 
    178   G4double                  alpha2;
    179   G4double                  faclim;
    180 
    181   static G4double ScreenRSquare[100];
    182   static G4double FormFactor[100];
    183151
    184152  G4bool                    isInitialised;             
     
    206174    particle = p;
    207175    mass = particle->GetPDGMass();
    208     spin = particle->GetPDGSpin();
    209     G4double q = particle->GetPDGCharge()/eplus;
    210     chargeSquare = q*q;
    211     tkin = 0.0;
     176    wokvi->SetupParticle(p);
    212177  }
    213178}
     
    215180//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    216181
    217 inline void G4eCoulombScatteringModel::SetupKinematic(G4double ekin,
    218                                                       G4double cut)
     182inline void G4eCoulombScatteringModel::SetLowEnergyLimit(G4double val)
    219183{
    220   if(ekin != tkin || ecut != cut) {
    221     tkin = ekin;
    222     mom2 = tkin*(tkin + 2.0*mass);
    223     invbeta2 = 1.0 +  mass*mass/mom2;
    224     cosTetMinNuc = cosThetaMin;
    225     cosTetMaxNuc = cosThetaMax;
    226     if(mass < MeV && cosThetaMin < 1.0 && ekin <= 10.*cut) {
    227       cosTetMinNuc = ekin*(cosThetaMin + 1.0)/(10.*cut) - 1.0;
    228     }
    229     ComputeMaxElectronScattering(cut);
    230   }
     184  lowEnergyLimit = val;
    231185}
    232 
    233 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    234  
    235 inline void G4eCoulombScatteringModel::SetupTarget(G4double Z, G4double e)
    236 {
    237   if(Z != targetZ || e != etag) {
    238     etag    = e;
    239     targetZ = Z;
    240     iz= G4int(Z);
    241     if(iz > 99) iz = 99;
    242     targetMass = fNistManager->GetAtomicMassAmu(iz)*amu_c2;
    243     screenZ = ScreenRSquare[iz]/mom2;
    244     screenZ *=(1.13 + std::min(1.0,3.76*Z*Z*invbeta2*alpha2));
    245     if(mass > MeV) { screenZ *= 2.0; }
    246     formfactA = FormFactor[iz]*mom2;
    247     cosTetMaxNuc2 = cosTetMaxNuc;
    248     if(1 == iz && particle == theProton && cosTetMaxNuc2 < 0.0) {
    249       cosTetMaxNuc2 = 0.0;
    250     }
    251     cosTetMaxElec2 = cosTetMaxElec;
    252   }
    253 }
    254186
    255187//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Note: See TracChangeset for help on using the changeset viewer.