Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4ePairProduction.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // $Id: G4ePairProduction.cc 84953 2014-10-22 15:08:57Z vnivanch $
27 //
28 // -------------------------------------------------------------------
29 //
30 // GEANT4 Class file
31 //
32 //
33 // File name: G4ePairProduction
34 //
35 // Author: Vladimir Ivanchenko
36 //
37 // Creation date: 17.03.2016
38 //
39 // Modifications:
40 //
41 // -------------------------------------------------------------------
42 //
43 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
44 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
45 
46 #include "G4ePairProduction.hh"
47 #include "G4SystemOfUnits.hh"
48 #include "G4Electron.hh"
49 #include "G4Positron.hh"
50 #include "G4VEmModel.hh"
51 #include "G4VEmFluctuationModel.hh"
53 #include "G4ElementData.hh"
54 #include "G4EmParameters.hh"
55 
56 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
57 
58 using namespace std;
59 
61  : G4VEnergyLossProcess(name),
62  theParticle(nullptr),
63  lowestKinEnergy(100.*MeV),
64  isInitialised(false)
65 {
68  SetIonisation(false);
69 }
70 
71 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
72 
74 {}
75 
76 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
77 
79 {
80  return (G4Electron::Electron() == &p || G4Positron::Positron() == &p);
81 }
82 
83 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
84 
86  const G4Material*,
87  G4double)
88 {
89  return lowestKinEnergy;
90 }
91 
92 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
93 
95  const G4ParticleDefinition* part,
96  const G4ParticleDefinition*)
97 {
98  if (!isInitialised) {
99  isInitialised = true;
100 
101  theParticle = part;
102 
104  SetEmModel(mod, 1);
105 
108 
109  G4VEmFluctuationModel* fm = nullptr;
111  mod->SetLowEnergyLimit(param->MinKinEnergy());
112  mod->SetHighEnergyLimit(param->MaxKinEnergy());
113  AddEmModel(1, mod, fm);
114  }
115 }
116 
117 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
118 
120 {
122  if(ed) {
123  for(G4int Z=1; Z<93; ++Z) {
125  if(pv) {
126  G4cout << " Sampling table " << pv->GetLengthY()
127  << "x" << pv->GetLengthX() << "; from "
128  << G4Exp(pv->GetY(0))/GeV << " GeV to "
129  << G4Exp(pv->GetY(pv->GetLengthY()-1))/TeV
130  << " TeV " << G4endl;
131  break;
132  }
133  }
134  }
135 }
136 
137 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
138 
139 
140 
141 
const XML_Char * name
Definition: expat.h:151
G4double MaxKinEnergy() const
void SetIonisation(G4bool val)
const char * p
Definition: xmltok.h:285
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition *p, const G4Material *, G4double cut) override
size_t GetLengthY() const
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition *, const G4ParticleDefinition *) override
G4ElementData * GetElementData()
Definition: G4VEmModel.hh:826
int G4int
Definition: G4Types.hh:78
void SetHighEnergyLimit(G4double)
Definition: G4VEmModel.hh:732
static constexpr double TeV
Definition: G4SIunits.hh:218
void AddEmModel(G4int, G4VEmModel *, G4VEmFluctuationModel *fluc=0, const G4Region *region=nullptr)
G4GLOB_DLL std::ostream G4cout
virtual void PrintInfo() override
bool G4bool
Definition: G4Types.hh:79
void SetProcessSubType(G4int)
Definition: G4VProcess.hh:432
G4double MinKinEnergy() const
size_t GetLengthX() const
G4ePairProduction(const G4String &processName="ePairProd")
virtual ~G4ePairProduction()
void SetSecondaryParticle(const G4ParticleDefinition *p)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:183
static G4Positron * Positron()
Definition: G4Positron.cc:94
G4double GetPDGMass() const
T max(const T t1, const T t2)
brief Return the largest of the two arguments
static G4EmParameters * Instance()
void SetEmModel(G4VEmModel *, G4int index=1)
static constexpr double GeV
Definition: G4SIunits.hh:217
G4double GetY(size_t index) const
static G4Electron * Electron()
Definition: G4Electron.cc:94
#define G4endl
Definition: G4ios.hh:61
static constexpr double MeV
Definition: G4SIunits.hh:214
double G4double
Definition: G4Types.hh:76
void SetLowEnergyLimit(G4double)
Definition: G4VEmModel.hh:739
const G4ParticleDefinition * theParticle
G4Physics2DVector * GetElement2DData(G4int Z)
virtual G4bool IsApplicable(const G4ParticleDefinition &p) override
G4VEmModel * EmModel(G4int index=1) const