G4eeToHadronsMultiModel Class Reference

#include <G4eeToHadronsMultiModel.hh>

Inheritance diagram for G4eeToHadronsMultiModel:

G4VEmModel

Public Member Functions

 G4eeToHadronsMultiModel (G4int ver=0, const G4String &nam="eeToHadrons")
virtual ~G4eeToHadronsMultiModel ()
virtual void Initialise (const G4ParticleDefinition *, const G4DataVector &)
virtual G4double CrossSectionPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
virtual G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, G4double kineticEnergy, G4double Z, G4double A, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
virtual void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin=0.0, G4double maxEnergy=DBL_MAX)
virtual void PrintInfo ()
void SetCrossSecFactor (G4double fac)
G4double ComputeCrossSectionPerElectron (const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)

Detailed Description

Definition at line 62 of file G4eeToHadronsMultiModel.hh.


Constructor & Destructor Documentation

G4eeToHadronsMultiModel::G4eeToHadronsMultiModel ( G4int  ver = 0,
const G4String nam = "eeToHadrons" 
)

Definition at line 65 of file G4eeToHadronsMultiModel.cc.

References DBL_MAX.

00066   : G4VEmModel(mname),
00067     csFactor(1.0),
00068     nModels(0),
00069     verbose(ver),
00070     isInitialised(false)
00071 {
00072   thKineticEnergy  = DBL_MAX;
00073   maxKineticEnergy = 1.2*GeV;
00074   fParticleChange  = 0;
00075   cross = 0;
00076 }

G4eeToHadronsMultiModel::~G4eeToHadronsMultiModel (  )  [virtual]

Definition at line 80 of file G4eeToHadronsMultiModel.cc.

References CLHEP::detail::n.

00081 {
00082   G4int n = models.size();
00083   if(n>0) {
00084     for(G4int i=0; i<n; i++) {
00085       delete models[i];
00086     }
00087   }
00088   delete cross;
00089 }


Member Function Documentation

G4double G4eeToHadronsMultiModel::ComputeCrossSectionPerAtom ( const G4ParticleDefinition ,
G4double  kineticEnergy,
G4double  Z,
G4double  A,
G4double  cutEnergy = 0.0,
G4double  maxEnergy = DBL_MAX 
) [virtual]

Reimplemented from G4VEmModel.

Definition at line 168 of file G4eeToHadronsMultiModel.cc.

References ComputeCrossSectionPerElectron().

00173 {
00174   return Z*ComputeCrossSectionPerElectron(p, kineticEnergy);
00175 }

G4double G4eeToHadronsMultiModel::ComputeCrossSectionPerElectron ( const G4ParticleDefinition ,
G4double  kineticEnergy,
G4double  cutEnergy = 0.0,
G4double  maxEnergy = DBL_MAX 
) [inline]

Definition at line 132 of file G4eeToHadronsMultiModel.hh.

Referenced by ComputeCrossSectionPerAtom(), and CrossSectionPerVolume().

00136 {
00137   G4double res = 0.0;
00138   if (kineticEnergy > thKineticEnergy) {
00139     for(G4int i=0; i<nModels; i++) {
00140       if(kineticEnergy >= ekinMin[i] && kineticEnergy <= ekinMax[i])
00141         res += (models[i])->ComputeCrossSectionPerElectron(0,kineticEnergy);
00142       cumSum[i] = res;
00143     }
00144   }
00145   return res*csFactor;
00146 }

G4double G4eeToHadronsMultiModel::CrossSectionPerVolume ( const G4Material ,
const G4ParticleDefinition ,
G4double  kineticEnergy,
G4double  cutEnergy,
G4double  maxEnergy 
) [virtual]

Reimplemented from G4VEmModel.

Definition at line 156 of file G4eeToHadronsMultiModel.cc.

References ComputeCrossSectionPerElectron(), and G4Material::GetElectronDensity().

00161 {
00162   return mat->GetElectronDensity()*
00163     ComputeCrossSectionPerElectron(p, kineticEnergy);
00164 }

void G4eeToHadronsMultiModel::Initialise ( const G4ParticleDefinition ,
const G4DataVector  
) [virtual]

Implements G4VEmModel.

Definition at line 93 of file G4eeToHadronsMultiModel.cc.

References G4VEmModel::GetParticleChangeForGamma(), G4Vee2hadrons::SetHighEnergy(), and G4Vee2hadrons::SetLowEnergy().

00095 {
00096   if(!isInitialised) {
00097     isInitialised = true;
00098 
00099     cross = new G4eeCrossSections();
00100 
00101     G4eeToTwoPiModel* m2pi = new G4eeToTwoPiModel(cross);
00102     m2pi->SetHighEnergy(maxKineticEnergy);
00103     AddEEModel(m2pi);
00104 
00105     G4eeTo3PiModel* m3pi1 = new G4eeTo3PiModel(cross);
00106     m3pi1->SetHighEnergy(0.95*GeV);
00107     AddEEModel(m3pi1);
00108 
00109     G4eeTo3PiModel* m3pi2 = new G4eeTo3PiModel(cross);
00110     m3pi2->SetLowEnergy(0.95*GeV);
00111     m3pi2->SetHighEnergy(maxKineticEnergy);
00112     AddEEModel(m3pi2);
00113 
00114     G4ee2KChargedModel* m2kc = new G4ee2KChargedModel(cross);
00115     m2kc->SetHighEnergy(maxKineticEnergy);
00116     AddEEModel(m2kc);
00117 
00118     G4ee2KNeutralModel* m2kn = new G4ee2KNeutralModel(cross);
00119     m2kn->SetHighEnergy(maxKineticEnergy);
00120     AddEEModel(m2kn);
00121 
00122     G4eeToPGammaModel* mpg1 = new G4eeToPGammaModel(cross,"pi0");
00123     mpg1->SetLowEnergy(0.7*GeV);
00124     mpg1->SetHighEnergy(maxKineticEnergy);
00125     AddEEModel(mpg1);
00126 
00127     G4eeToPGammaModel* mpg2 = new G4eeToPGammaModel(cross,"eta");
00128     mpg2->SetLowEnergy(0.7*GeV);
00129     mpg2->SetHighEnergy(maxKineticEnergy);
00130     AddEEModel(mpg2);
00131 
00132     nModels = models.size();
00133 
00134     fParticleChange = GetParticleChangeForGamma();
00135   }
00136 }

void G4eeToHadronsMultiModel::PrintInfo (  )  [virtual]

Definition at line 200 of file G4eeToHadronsMultiModel.cc.

References G4cout, and G4endl.

Referenced by G4eeToHadrons::PrintInfo().

00201 {
00202   if(verbose > 0) {
00203     G4double e1 = 0.5*thKineticEnergy*thKineticEnergy/electron_mass_c2 
00204       - 2.0*electron_mass_c2; 
00205     G4double e2 = 0.5*maxKineticEnergy*maxKineticEnergy/electron_mass_c2 
00206       - 2.0*electron_mass_c2; 
00207     G4cout << "      e+ annihilation into hadrons active from "
00208            << e1/GeV << " GeV to " << e2/GeV << " GeV"
00209            << G4endl;
00210   }
00211 }

void G4eeToHadronsMultiModel::SampleSecondaries ( std::vector< G4DynamicParticle * > *  ,
const G4MaterialCutsCouple ,
const G4DynamicParticle ,
G4double  tmin = 0.0,
G4double  maxEnergy = DBL_MAX 
) [virtual]

Implements G4VEmModel.

Definition at line 180 of file G4eeToHadronsMultiModel.cc.

References fStopAndKill, G4UniformRand, G4DynamicParticle::GetKineticEnergy(), and G4VParticleChange::ProposeTrackStatus().

00184 {
00185   G4double kinEnergy = dp->GetKineticEnergy();
00186   if (kinEnergy > thKineticEnergy) {
00187     G4double q = cumSum[nModels-1]*G4UniformRand();
00188     for(G4int i=0; i<nModels; i++) {
00189       if(q <= cumSum[i]) {
00190         (models[i])->SampleSecondaries(newp, couple,dp);
00191         if(newp->size() > 0) fParticleChange->ProposeTrackStatus(fStopAndKill);
00192         break;
00193       }
00194     }
00195   }
00196 }

void G4eeToHadronsMultiModel::SetCrossSecFactor ( G4double  fac  ) 

Definition at line 215 of file G4eeToHadronsMultiModel.cc.

References G4cout, and G4endl.

Referenced by G4eeToHadrons::InitialiseProcess(), and G4eeToHadrons::SetCrossSecFactor().

00216 {
00217   if(fac > 1.0) {
00218     csFactor = fac;
00219     if(verbose > 0)
00220       G4cout << "### G4eeToHadronsMultiModel: The cross section for G4eeToHadronsMultiModel "
00221              << " is increased by the Factor= " << csFactor << G4endl;
00222   }
00223 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:51:50 2013 for Geant4 by  doxygen 1.4.7