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/src/G4MollerBhabhaModel.cc

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4MollerBhabhaModel.cc,v 1.30 2007/05/22 17:34:36 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4MollerBhabhaModel.cc,v 1.31 2009/02/20 12:06:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -------------------------------------------------------------------
     
    7474                                         const G4String& nam)
    7575  : G4VEmModel(nam),
    76   particle(0),
    77   isElectron(true),
    78   twoln10(2.0*log(10.0)),
    79   lowLimit(0.2*keV)
     76    particle(0),
     77    isElectron(true),
     78    twoln10(2.0*log(10.0)),
     79    lowLimit(0.2*keV),
     80    isInitialised(false)
    8081{
    8182  theElectron = G4Electron::Electron();
     
    8788G4MollerBhabhaModel::~G4MollerBhabhaModel()
    8889{}
    89 
    90 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    91 
    92 void G4MollerBhabhaModel::SetParticle(const G4ParticleDefinition* p)
    93 {
    94   particle = p;
    95   if(p != theElectron) isElectron = false;
    96 }
    9790
    9891//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    108101//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    109102
     103G4double G4MollerBhabhaModel::MaxSecondaryEnergy(const G4ParticleDefinition*,
     104                                                 G4double kinEnergy)
     105{
     106  G4double tmax = kinEnergy;
     107  if(isElectron) tmax *= 0.5;
     108  return tmax;
     109}
     110
     111//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     112
    110113void G4MollerBhabhaModel::Initialise(const G4ParticleDefinition* p,
    111114                                     const G4DataVector&)
    112115{
    113116  if(!particle) SetParticle(p);
    114   if(pParticleChange)
     117  SetDeexcitationFlag(false);
     118
     119  if(isInitialised) return;
     120
     121  isInitialised = true;
     122  if(pParticleChange) {
    115123    fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*>
    116124                                                     (pParticleChange);
    117   else
     125  } else {
    118126    fParticleChange = new G4ParticleChangeForLoss();
     127  }
    119128}
    120129
Note: See TracChangeset for help on using the changeset viewer.