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

    r819 r961  
    2424// ********************************************************************
    2525//
    26 //
    27 // $Id: G4FinalStateElasticScreenedRutherford.cc,v 1.2 2007/10/12 23:10:33 pia Exp $
    28 // GEANT4 tag $Name:  $
    29 //
    30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
    31 //
    32 // Reference: TNS Geant4-DNA paper
    33 // Reference for implementation model: NIM. 155, pp. 145-156, 1978
    34 
    35 // History:
    36 // -----------
    37 // Date         Name              Modification
    38 // 28 Apr 2007  M.G. Pia          Created in compliance with design described in TNS paper
    39 //
    40 // -------------------------------------------------------------------
    41 
    42 // Class description:
    43 // Reference: TNS Geant4-DNA paper
    44 // S. Chauvie et al., Geant4 physics processes for microdosimetry simulation:
    45 // design foundation and implementation of the first set of models,
    46 // IEEE Trans. Nucl. Sci., vol. 54, no. 6, Dec. 2007.
    47 // Further documentation available from http://www.ge.infn.it/geant4/dna
    48 
    49 // -------------------------------------------------------------------
    50 
     26// $Id: G4FinalStateElasticScreenedRutherford.cc,v 1.4 2008/07/14 20:47:34 sincerti Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    5128
    5229#include "G4FinalStateElasticScreenedRutherford.hh"
    53 #include "G4Track.hh"
    54 #include "G4Step.hh"
    55 #include "G4DynamicParticle.hh"
    56 #include "Randomize.hh"
    5730
    58 #include "G4ParticleTypes.hh"
    59 #include "G4ParticleDefinition.hh"
    60 #include "G4Electron.hh"
    61 #include "G4SystemOfUnits.hh"
    62 #include "G4ParticleMomentum.hh"
     31//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    6332
    6433G4FinalStateElasticScreenedRutherford::G4FinalStateElasticScreenedRutherford()
    6534{
    66   // These data members will be used in the next implementation iteration,
    67   // when the enriched PhysicsModel policy is implemented
    68   name = "FinalStateElasticScreenedRutherford";
    69   lowEnergyLimit = 7.4 * eV;
     35  lowEnergyLimit = 200 * eV;
    7036  highEnergyLimit = 10 * MeV;
    7137}
    7238
     39//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    7340
    7441G4FinalStateElasticScreenedRutherford::~G4FinalStateElasticScreenedRutherford()
    75 {
    76   // empty
    77   // G4DynamicParticle objects produced are owned by client
    78 }
     42{}
    7943 
     44//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    8045
    81 const G4FinalStateProduct& G4FinalStateElasticScreenedRutherford::GenerateFinalState(const G4Track& track, const G4Step& step)
     46const G4FinalStateProduct& G4FinalStateElasticScreenedRutherford::GenerateFinalState(const G4Track& track, const G4Step& )
    8247{
    83   // Clear previous secondaries, energy deposit and particle kill status
    8448  product.Clear();
    8549
    86   // Kinetic energy of primary particle
    8750  G4double k = track.GetDynamicParticle()->GetKineticEnergy();
    8851
    89   // Assume material = water; H2O number of electrons
    90   // ---- MGP ---- To be generalized later
    9152  const G4int z = 10;
    9253
     
    9455 
    9556  G4double phi = 2. * pi * G4UniformRand();
    96 
    97   // G4cout << "cosTheta in GenerateFinalState = " << cosTheta << ", phi = " << phi << G4endl;
    9857
    9958  G4ThreeVector zVers = track.GetDynamicParticle()->GetMomentumDirection();
     
    10665  yDir *= std::sin(phi);
    10766
    108   // G4cout << "xDir, yDir = " << xDir <<", " << yDir << G4endl;
    109 
    110   // G4ThreeVector zPrimeVers((xDir*xVers + yDir*yVers + cosTheta*zVers).unit());
    11167  G4ThreeVector zPrimeVers((xDir*xVers + yDir*yVers + cosTheta*zVers));
    11268
    113   // G4cout << "zPrimeVers = (" << zPrimeVers.x() << ", "<< zPrimeVers.y() << ", "<< zPrimeVers.z() << ") " << G4endl;
    114 
    115   //  product.ModifyPrimaryParticle(zPrimeVers.x(),zPrimeVers.y(),zPrimeVers.z(),k);
    11669  product.ModifyPrimaryParticle(zPrimeVers,k);
    117 
    118   //  this->aParticleChange.ProposeEnergy(k);
    119   //  this->aParticleChange.ProposeMomentumDirection(zPrimeVers);
    120   //  this->aParticleChange.SetNumberOfSecondaries(0);
    12170
    12271  return product;
    12372}
     73
     74//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    12475
    12576G4double G4FinalStateElasticScreenedRutherford::RandomizeCosTheta(G4double k, G4int z) const
     
    14495
    14596 do
    146    {
    147      cosTheta = 2. * G4UniformRand() - 1.;
    148      fCosTheta = (1 + 2.*n - cosTheta);
    149      fCosTheta = oneOverMax / (fCosTheta*fCosTheta);
    150    }
     97 {
     98   cosTheta = 2. * G4UniformRand() - 1.;
     99   fCosTheta = (1 + 2.*n - cosTheta);
     100   fCosTheta = oneOverMax / (fCosTheta*fCosTheta);
     101 }
    151102 while (fCosTheta < G4UniformRand());
    152103 
    153104 return cosTheta;
    154105}
     106
     107//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    155108
    156109G4double G4FinalStateElasticScreenedRutherford::ScreeningFactor(G4double k, G4int z) const
     
    180133  G4double result = 0.;
    181134  if (denominator != 0.)
    182     {
    183       result = numerator / denominator;
    184     }
     135  {
     136    result = numerator / denominator;
     137  }
    185138  else
    186     {
    187       // Throw an exception
    188       G4Exception("G4FinalStateElasticScreenedRutherford::ScreeningFactor - denominator = 0");
    189     }
     139  {
     140    G4Exception("G4FinalStateElasticScreenedRutherford::ScreeningFactor - denominator = 0");
     141  }
    190142  return result;
    191 
    192143}
Note: See TracChangeset for help on using the changeset viewer.