Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4ElectroVDNuclearModel.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: $
27 //
28 // Author: D.H. Wright
29 // Date: 1 May 2012
30 //
31 // Description: model for electron and positron interaction with nuclei
32 // using the equivalent photon spectrum. A real gamma is
33 // produced from the virtual photon spectrum and is then
34 // interacted hadronically by the Bertini cascade at low
35 // energies. At high energies the gamma is treated as a
36 // pi0 and interacted with the nucleus using the FTFP model.
37 // The electro- and photo-nuclear cross sections of
38 // M. Kossov are used to generate the virtual photon
39 // spectrum.
40 //
41 
43 
44 #include "G4PhysicalConstants.hh"
45 #include "G4SystemOfUnits.hh"
46 
50 
51 #include "G4CascadeInterface.hh"
52 #include "G4TheoFSGenerator.hh"
54 #include "G4ExcitationHandler.hh"
55 #include "G4PreCompoundModel.hh"
57 #include "G4ExcitedStringDecay.hh"
58 #include "G4FTFModel.hh"
59 
60 #include "G4HadFinalState.hh"
61 
62 
64  : G4HadronicInteraction("G4ElectroVDNuclearModel"),
65  leptonKE(0.0), photonEnergy(0.0), photonQ2(0.0)
66 {
67  SetMinEnergy(0.0);
68  SetMaxEnergy(1*PeV);
69 
71  GetCrossSectionDataSet(G4ElectroNuclearCrossSection::Default_Name());
73  GetCrossSectionDataSet(G4PhotoNuclearCrossSection::Default_Name());
74  ftfp = new G4TheoFSGenerator();
75  precoInterface = new G4GeneratorPrecompoundInterface();
76  theHandler = new G4ExcitationHandler();
77  preEquilib = new G4PreCompoundModel(theHandler);
78  precoInterface->SetDeExcitation(preEquilib);
79  ftfp->SetTransport(precoInterface);
80  theFragmentation = new G4LundStringFragmentation();
81  theStringDecay = new G4ExcitedStringDecay(theFragmentation);
82  theStringModel = new G4FTFModel();
83  theStringModel->SetFragmentationModel(theStringDecay);
84  ftfp->SetHighEnergyGenerator(theStringModel);
85 
86  // Build Bertini model
87  bert = new G4CascadeInterface();
88 }
89 
90 
92 {
93  delete ftfp;
94  delete preEquilib;
95  delete theFragmentation;
96  delete theStringDecay;
97  delete theStringModel;
98  delete bert;
99 }
100 
101 
103 {
104  outFile << "G4ElectroVDNuclearModel handles the inelastic scattering\n"
105  << "of e- and e+ from nuclei using the equivalent photon\n"
106  << "approximation in which the incoming lepton generates a\n"
107  << "virtual photon at the electromagnetic vertex, and the\n"
108  << "virtual photon is converted to a real photon. At low\n"
109  << "energies, the photon interacts directly with the nucleus\n"
110  << "using the Bertini cascade. At high energies the photon\n"
111  << "is converted to a pi0 which interacts using the FTFP\n"
112  << "model. The electro- and gamma-nuclear cross sections of\n"
113  << "M. Kossov are used to generate the virtual photon spectrum\n";
114 }
115 
116 
119  G4Nucleus& targetNucleus)
120 {
121  // Set up default particle change (just returns initial state)
124  leptonKE = aTrack.GetKineticEnergy();
127 
128  // Set up sanity checks for real photon production
129  G4DynamicParticle lepton(aTrack.GetDefinition(), aTrack.Get4Momentum() );
130 
131  // Need to call GetElementCrossSection before calling GetEquivalentPhotonEnergy.
132  G4Material* mat = 0;
133  G4int targZ = targetNucleus.GetZ_asInt();
134  electroXS->GetElementCrossSection(&lepton, targZ, mat);
135 
136  photonEnergy = electroXS->GetEquivalentPhotonEnergy();
137  // Photon energy cannot exceed lepton energy
138  if (photonEnergy < leptonKE) {
139  photonQ2 = electroXS->GetEquivalentPhotonQ2(photonEnergy);
141  // Photon
142  if (photonEnergy > photonQ2/dM) {
143  // Produce recoil lepton and transferred photon
144  G4DynamicParticle* transferredPhoton = CalculateEMVertex(aTrack, targetNucleus);
145  // Interact gamma with nucleus
146  if (transferredPhoton) CalculateHadronicVertex(transferredPhoton, targetNucleus);
147  }
148  }
149  return &theParticleChange;
150 }
151 
152 
154 G4ElectroVDNuclearModel::CalculateEMVertex(const G4HadProjectile& aTrack,
155  G4Nucleus& targetNucleus)
156 {
157  G4DynamicParticle photon(G4Gamma::Gamma(), photonEnergy,
158  G4ThreeVector(0.,0.,1.) );
159 
160  // Get gamma cross section at Q**2 = 0 (real gamma)
161  G4int targZ = targetNucleus.GetZ_asInt();
162  G4Material* mat = 0;
163  G4double sigNu =
164  gammaXS->GetElementCrossSection(&photon, targZ, mat);
165 
166  // Change real gamma energy to equivalent energy and get cross section at that energy
168  photon.SetKineticEnergy(photonEnergy - photonQ2/dM);
169  G4double sigK =
170  gammaXS->GetElementCrossSection(&photon, targZ, mat);
171  G4double rndFraction = electroXS->GetVirtualFactor(photonEnergy, photonQ2);
172 
173  // No gamma produced, return null ptr
174  if (sigNu*G4UniformRand() > sigK*rndFraction) return 0;
175 
176  // Scatter the lepton
177  G4double mProj = aTrack.GetDefinition()->GetPDGMass();
178  G4double mProj2 = mProj*mProj;
179  G4double iniE = leptonKE + mProj; // Total energy of incident lepton
180  G4double finE = iniE - photonEnergy; // Total energy of scattered lepton
182  G4double iniP = std::sqrt(iniE*iniE-mProj2); // Incident lepton momentum
183  G4double finP = std::sqrt(finE*finE-mProj2); // Scattered lepton momentum
184  G4double cost = (iniE*finE - mProj2 - photonQ2/2.)/iniP/finP; // cos(theta) from Q**2
185  if (cost > 1.) cost= 1.;
186  if (cost < -1.) cost=-1.;
187  G4double sint = std::sqrt(1.-cost*cost);
188 
189  G4ThreeVector dir = aTrack.Get4Momentum().vect().unit();
190  G4ThreeVector ortx = dir.orthogonal().unit(); // Ortho-normal to scattering plane
191  G4ThreeVector orty = dir.cross(ortx); // Third unit vector
192  G4double phi = twopi*G4UniformRand();
193  G4double sinx = sint*std::sin(phi);
194  G4double siny = sint*std::cos(phi);
195  G4ThreeVector findir = cost*dir+sinx*ortx+siny*orty;
196  theParticleChange.SetMomentumChange(findir); // change lepton direction
197 
198  // Create a gamma with momentum equal to momentum transfer
199  G4ThreeVector photonMomentum = iniP*dir - finP*findir;
201  photonEnergy, photonMomentum);
202  return gamma;
203 }
204 
205 
206 void
207 G4ElectroVDNuclearModel::CalculateHadronicVertex(G4DynamicParticle* incident,
208  G4Nucleus& target)
209 {
210  G4HadFinalState* hfs = 0;
211  G4double gammaE = incident->GetTotalEnergy();
212 
213  if (gammaE < 10*GeV) {
214  G4HadProjectile projectile(*incident);
215  hfs = bert->ApplyYourself(projectile, target);
216  } else {
217  // At high energies convert incident gamma to a pion
219  G4double piMom = std::sqrt(gammaE*gammaE - piMass*piMass);
220  G4ThreeVector piMomentum(incident->GetMomentumDirection() );
221  piMomentum *= piMom;
222  G4DynamicParticle theHadron(G4PionZero::PionZero(), piMomentum);
223  G4HadProjectile projectile(theHadron);
224  hfs = ftfp->ApplyYourself(projectile, target);
225  }
226 
227  delete incident;
228 
229  // Copy secondaries from sub-model to model
231 }
232 
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &theNucleus)
void AddSecondaries(const std::vector< G4HadSecondary > &addSecs)
virtual void ModelDescription(std::ostream &outFile) const
CLHEP::Hep3Vector G4ThreeVector
G4double GetTotalEnergy() const
std::ofstream outFile
Definition: GammaRayTel.cc:68
void SetFragmentationModel(G4VStringFragmentation *aModel)
const XML_Char * target
int G4int
Definition: G4Types.hh:78
void SetHighEnergyGenerator(G4VHighEnergyGenerator *const value)
void SetStatusChange(G4HadFinalStateStatus aS)
void SetMinEnergy(G4double anEnergy)
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &aTargetNucleus)
Hep3Vector vect() const
#define G4UniformRand()
Definition: Randomize.hh:87
const G4ParticleDefinition * GetDefinition() const
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
static G4CrossSectionDataSetRegistry * Instance()
static G4Proton * Proton()
Definition: G4Proton.cc:93
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
const G4LorentzVector & Get4Momentum() const
static G4PionZero * PionZero()
Definition: G4PionZero.cc:104
virtual G4double GetElementCrossSection(const G4DynamicParticle *, G4int Z, const G4Material *)
void SetEnergyChange(G4double anEnergy)
G4double GetPDGMass() const
G4double GetVirtualFactor(G4double nu, G4double Q2)
virtual G4double GetElementCrossSection(const G4DynamicParticle *, G4int Z, const G4Material *mat)
Hep3Vector unit() const
G4int GetZ_asInt() const
Definition: G4Nucleus.hh:115
Hep3Vector orthogonal() const
void SetMaxEnergy(const G4double anEnergy)
void SetDeExcitation(G4VPreCompoundModel *ptr)
void SetTransport(G4VIntraNuclearTransportModel *const value)
Hep3Vector cross(const Hep3Vector &) const
double G4double
Definition: G4Types.hh:76
void SetMomentumChange(const G4ThreeVector &aV)
G4HadFinalState * ApplyYourself(const G4HadProjectile &thePrimary, G4Nucleus &theNucleus)