Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4eeToHadronsMultiModel Class Reference

#include <G4eeToHadronsMultiModel.hh>

Inheritance diagram for G4eeToHadronsMultiModel:
Collaboration diagram for G4eeToHadronsMultiModel:

Public Member Functions

 G4eeToHadronsMultiModel (G4int ver=0, const G4String &nam="eeToHadrons")
 
virtual ~G4eeToHadronsMultiModel ()
 
virtual void Initialise (const G4ParticleDefinition *, const G4DataVector &) override
 
virtual G4double CrossSectionPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy) override
 
virtual G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, G4double kineticEnergy, G4double Z, G4double A, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX) override
 
virtual void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin=0.0, G4double maxEnergy=DBL_MAX) override
 
virtual void PrintInfo ()
 
void SetCrossSecFactor (G4double fac)
 
G4double ComputeCrossSectionPerElectron (const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
- Public Member Functions inherited from G4VEmModel
 G4VEmModel (const G4String &nam)
 
virtual ~G4VEmModel ()
 
virtual void InitialiseLocal (const G4ParticleDefinition *, G4VEmModel *masterModel)
 
virtual void InitialiseForMaterial (const G4ParticleDefinition *, const G4Material *)
 
virtual void InitialiseForElement (const G4ParticleDefinition *, G4int Z)
 
virtual G4double ComputeDEDXPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
 
virtual G4double GetPartialCrossSection (const G4Material *, G4int level, const G4ParticleDefinition *, G4double kineticEnergy)
 
virtual G4double ComputeCrossSectionPerShell (const G4ParticleDefinition *, G4int Z, G4int shellIdx, G4double kinEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
virtual G4double ChargeSquareRatio (const G4Track &)
 
virtual G4double GetChargeSquareRatio (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual G4double GetParticleCharge (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual void StartTracking (G4Track *)
 
virtual void CorrectionsAlongStep (const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double &eloss, G4double &niel, G4double length)
 
virtual G4double Value (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy)
 
virtual G4double MinPrimaryEnergy (const G4Material *, const G4ParticleDefinition *, G4double cut=0.0)
 
virtual G4double MinEnergyCut (const G4ParticleDefinition *, const G4MaterialCutsCouple *)
 
virtual void SetupForMaterial (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual void DefineForRegion (const G4Region *)
 
virtual void ModelDescription (std::ostream &outFile) const
 
void InitialiseElementSelectors (const G4ParticleDefinition *, const G4DataVector &)
 
std::vector
< G4EmElementSelector * > * 
GetElementSelectors ()
 
void SetElementSelectors (std::vector< G4EmElementSelector * > *)
 
virtual G4double ComputeDEDX (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
 
G4double CrossSection (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4double ComputeMeanFreePath (const G4ParticleDefinition *, G4double kineticEnergy, const G4Material *, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, const G4Element *, G4double kinEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4int SelectIsotopeNumber (const G4Element *)
 
const G4ElementSelectRandomAtom (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
const G4ElementSelectRandomAtom (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4int SelectRandomAtomNumber (const G4Material *)
 
void SetParticleChange (G4VParticleChange *, G4VEmFluctuationModel *f=nullptr)
 
void SetCrossSectionTable (G4PhysicsTable *, G4bool isLocal)
 
G4ElementDataGetElementData ()
 
G4PhysicsTableGetCrossSectionTable ()
 
G4VEmFluctuationModelGetModelOfFluctuations ()
 
G4VEmAngularDistributionGetAngularDistribution ()
 
void SetAngularDistribution (G4VEmAngularDistribution *)
 
G4double HighEnergyLimit () const
 
G4double LowEnergyLimit () const
 
G4double HighEnergyActivationLimit () const
 
G4double LowEnergyActivationLimit () const
 
G4double PolarAngleLimit () const
 
G4double SecondaryThreshold () const
 
G4bool LPMFlag () const
 
G4bool DeexcitationFlag () const
 
G4bool ForceBuildTableFlag () const
 
G4bool UseAngularGeneratorFlag () const
 
void SetAngularGeneratorFlag (G4bool)
 
void SetHighEnergyLimit (G4double)
 
void SetLowEnergyLimit (G4double)
 
void SetActivationHighEnergyLimit (G4double)
 
void SetActivationLowEnergyLimit (G4double)
 
G4bool IsActive (G4double kinEnergy)
 
void SetPolarAngleLimit (G4double)
 
void SetSecondaryThreshold (G4double)
 
void SetLPMFlag (G4bool val)
 
void SetDeexcitationFlag (G4bool val)
 
void SetForceBuildTable (G4bool val)
 
void SetMasterThread (G4bool val)
 
G4bool IsMaster () const
 
G4double MaxSecondaryKinEnergy (const G4DynamicParticle *dynParticle)
 
const G4StringGetName () const
 
void SetCurrentCouple (const G4MaterialCutsCouple *)
 
const G4ElementGetCurrentElement () const
 
const G4IsotopeGetCurrentIsotope () const
 
G4bool IsLocked () const
 
void SetLocked (G4bool)
 

Additional Inherited Members

- Protected Member Functions inherited from G4VEmModel
G4ParticleChangeForLossGetParticleChangeForLoss ()
 
G4ParticleChangeForGammaGetParticleChangeForGamma ()
 
virtual G4double MaxSecondaryEnergy (const G4ParticleDefinition *, G4double kineticEnergy)
 
const G4MaterialCutsCoupleCurrentCouple () const
 
void SetCurrentElement (const G4Element *)
 
- Protected Attributes inherited from G4VEmModel
G4ElementDatafElementData
 
G4VParticleChangepParticleChange
 
G4PhysicsTablexSectionTable
 
const std::vector< G4double > * theDensityFactor
 
const std::vector< G4int > * theDensityIdx
 
size_t idxTable
 
- Static Protected Attributes inherited from G4VEmModel
static const G4double inveplus = 1.0/CLHEP::eplus
 

Detailed Description

Definition at line 64 of file G4eeToHadronsMultiModel.hh.

Constructor & Destructor Documentation

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

Definition at line 66 of file G4eeToHadronsMultiModel.cc.

67  : G4VEmModel(mname),
68  csFactor(1.0),
69  nModels(0),
70  verbose(ver),
71  isInitialised(false)
72 {
73  thKineticEnergy = DBL_MAX;
74  maxKineticEnergy = 4.521*GeV; //crresponding to 10TeV in lab
75  fParticleChange = nullptr;
76  cross = nullptr;
77  delta = 1.0*MeV; //for bin width
78 }
G4VEmModel(const G4String &nam)
Definition: G4VEmModel.cc:68
static constexpr double GeV
Definition: G4SIunits.hh:217
static constexpr double MeV
Definition: G4SIunits.hh:214
#define DBL_MAX
Definition: templates.hh:83
G4eeToHadronsMultiModel::~G4eeToHadronsMultiModel ( )
virtual

Definition at line 82 of file G4eeToHadronsMultiModel.cc.

83 {
84  delete cross;
85 }

Member Function Documentation

G4double G4eeToHadronsMultiModel::ComputeCrossSectionPerAtom ( const G4ParticleDefinition p,
G4double  kineticEnergy,
G4double  Z,
G4double  A,
G4double  cutEnergy = 0.0,
G4double  maxEnergy = DBL_MAX 
)
overridevirtual

Reimplemented from G4VEmModel.

Definition at line 163 of file G4eeToHadronsMultiModel.cc.

168 {
169  return Z*ComputeCrossSectionPerElectron(p, kineticEnergy);
170 }
G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)

Here is the call graph for this function:

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

Definition at line 151 of file G4eeToHadronsMultiModel.hh.

155 {
156  G4double res = 0.0;
157 
158  G4double energy = LabToCM(kineticEnergy);
159 
160  if (energy > thKineticEnergy) {
161  for(G4int i=0; i<nModels; i++) {
162  if(energy >= ekinMin[i] && energy <= ekinMax[i]){
163  res += (models[i])->ComputeCrossSectionPerElectron(0,energy);
164  }
165  cumSum[i] = res;
166  }
167  }
168  return res*csFactor;
169 }
int G4int
Definition: G4Types.hh:78
G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
G4double energy(const ThreeVector &p, const G4double m)
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4eeToHadronsMultiModel::CrossSectionPerVolume ( const G4Material mat,
const G4ParticleDefinition p,
G4double  kineticEnergy,
G4double  cutEnergy,
G4double  maxEnergy 
)
overridevirtual

Reimplemented from G4VEmModel.

Definition at line 151 of file G4eeToHadronsMultiModel.cc.

156 {
157  return mat->GetElectronDensity()*
158  ComputeCrossSectionPerElectron(p, kineticEnergy);
159 }
G4double GetElectronDensity() const
Definition: G4Material.hh:217
G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)

Here is the call graph for this function:

void G4eeToHadronsMultiModel::Initialise ( const G4ParticleDefinition ,
const G4DataVector cuts 
)
overridevirtual

Implements G4VEmModel.

Definition at line 89 of file G4eeToHadronsMultiModel.cc.

91 {
92  if(!isInitialised) {
93  isInitialised = true;
94 
95  //G4cout<<"###Initialise in HadronMultiModel###"<<G4endl;
96 
97  cross = new G4eeCrossSections();
98 
99  G4eeToTwoPiModel* m2pi =
100  new G4eeToTwoPiModel(cross,maxKineticEnergy,delta);
101  AddEEModel(m2pi,cuts);
102 
103  G4eeTo3PiModel* m3pi =
104  new G4eeTo3PiModel(cross,maxKineticEnergy,delta);
105  AddEEModel(m3pi,cuts);
106 
107  G4ee2KChargedModel* m2kc =
108  new G4ee2KChargedModel(cross,maxKineticEnergy,delta);
109  AddEEModel(m2kc,cuts);
110 
111  G4ee2KNeutralModel* m2kn =
112  new G4ee2KNeutralModel(cross,maxKineticEnergy,delta);
113  AddEEModel(m2kn,cuts);
114 
115  G4eeToPGammaModel* mpg1 =
116  new G4eeToPGammaModel(cross,"pi0",maxKineticEnergy,delta);
117  AddEEModel(mpg1,cuts);
118 
119  G4eeToPGammaModel* mpg2 =
120  new G4eeToPGammaModel(cross,"eta",maxKineticEnergy,delta);
121  AddEEModel(mpg2,cuts);
122 
123  nModels = models.size();
124 
125  fParticleChange = GetParticleChangeForGamma();
126  }
127 }
G4ParticleChangeForGamma * GetParticleChangeForGamma()
Definition: G4VEmModel.cc:132

Here is the call graph for this function:

void G4eeToHadronsMultiModel::PrintInfo ( )
virtual

Definition at line 199 of file G4eeToHadronsMultiModel.cc.

200 {
201  if(verbose > 0) {
202  G4double e1 = 0.5*thKineticEnergy*thKineticEnergy/electron_mass_c2
203  - 2.0*electron_mass_c2;
204  G4double e2 = 0.5*maxKineticEnergy*maxKineticEnergy/electron_mass_c2
205  - 2.0*electron_mass_c2;
206  G4cout << " e+ annihilation into hadrons active from "
207  << e1/GeV << " GeV to " << e2/GeV << " GeV"
208  << G4endl;
209  }
210 }
static constexpr double electron_mass_c2
G4GLOB_DLL std::ostream G4cout
static constexpr double GeV
Definition: G4SIunits.hh:217
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76

Here is the caller graph for this function:

void G4eeToHadronsMultiModel::SampleSecondaries ( std::vector< G4DynamicParticle * > *  newp,
const G4MaterialCutsCouple couple,
const G4DynamicParticle dp,
G4double  tmin = 0.0,
G4double  maxEnergy = DBL_MAX 
)
overridevirtual

Implements G4VEmModel.

Definition at line 175 of file G4eeToHadronsMultiModel.cc.

180 {
181  G4double kinEnergy = dp->GetKineticEnergy();
182  G4double energy = LabToCM(kinEnergy);
183  if (energy > thKineticEnergy) {
184  G4double q = cumSum[nModels-1]*G4UniformRand();
185  for(G4int i=0; i<nModels; i++) {
186  if(q <= cumSum[i]) {
187  (models[i])->SampleSecondaries(newp, couple,dp);
188  if(newp->size() > 0) {
189  fParticleChange->ProposeTrackStatus(fStopAndKill);
190  }
191  break;
192  }
193  }
194  }
195 }
G4double GetKineticEnergy() const
int G4int
Definition: G4Types.hh:78
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin=0.0, G4double maxEnergy=DBL_MAX) override
#define G4UniformRand()
Definition: Randomize.hh:97
G4double energy(const ThreeVector &p, const G4double m)
double G4double
Definition: G4Types.hh:76
void ProposeTrackStatus(G4TrackStatus status)

Here is the call graph for this function:

void G4eeToHadronsMultiModel::SetCrossSecFactor ( G4double  fac)

Definition at line 214 of file G4eeToHadronsMultiModel.cc.

215 {
216  if(fac > 1.0) {
217  csFactor = fac;
218  if(verbose > 0) {
219  G4cout << "### G4eeToHadronsMultiModel: The cross section for "
220  << "G4eeToHadronsMultiModel is increased by "
221  << csFactor << " times" << G4endl;
222  }
223  }
224 }
G4GLOB_DLL std::ostream G4cout
static const G4double fac
#define G4endl
Definition: G4ios.hh:61

Here is the caller graph for this function:


The documentation for this class was generated from the following files: