Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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
45#include "G4SystemOfUnits.hh"
46
49
50#include "G4CascadeInterface.hh"
51#include "G4TheoFSGenerator.hh"
54#include "G4PreCompoundModel.hh"
57#include "G4FTFModel.hh"
58
59#include "G4HadFinalState.hh"
60
61
63 : G4HadronicInteraction("G4ElectroVDNuclearModel"),
64 leptonKE(0.0), photonEnergy(0.0), photonQ2(0.0)
65{
66 SetMinEnergy(0.0);
67 SetMaxEnergy(1*PeV);
68
69 electroXS = new G4ElectroNuclearCrossSection();
70 gammaXS = new G4PhotoNuclearCrossSection();
71 ftfp = new G4TheoFSGenerator();
72 precoInterface = new G4GeneratorPrecompoundInterface();
73 theHandler = new G4ExcitationHandler();
74 preEquilib = new G4PreCompoundModel(theHandler);
75 precoInterface->SetDeExcitation(preEquilib);
76 ftfp->SetTransport(precoInterface);
77 theFragmentation = new G4LundStringFragmentation();
78 theStringDecay = new G4ExcitedStringDecay(theFragmentation);
79 theStringModel = new G4FTFModel();
80 theStringModel->SetFragmentationModel(theStringDecay);
81 ftfp->SetHighEnergyGenerator(theStringModel);
82
83 // Build Bertini model
84 bert = new G4CascadeInterface();
85}
86
87
89{
90 delete electroXS;
91 delete gammaXS;
92 delete ftfp;
93 delete preEquilib;
94 delete theFragmentation;
95 delete theStringDecay;
96 delete theStringModel;
97 delete bert;
98}
99
100
101void G4ElectroVDNuclearModel::ModelDescription(std::ostream& outFile) const
102{
103 outFile << "G4ElectroVDNuclearModel handles the inelastic scattering\n"
104 << "of e- and e+ from nuclei using the equivalent photon\n"
105 << "approximation in which the incoming lepton generates a\n"
106 << "virtual photon at the electromagnetic vertex, and the\n"
107 << "virtual photon is converted to a real photon. At low\n"
108 << "energies, the photon interacts directly with the nucleus\n"
109 << "using the Bertini cascade. At high energies the photon\n"
110 << "is converted to a pi0 which interacts using the FTFP\n"
111 << "model. The electro- and gamma-nuclear cross sections of\n"
112 << "M. Kossov are used to generate the virtual photon spectrum\n";
113}
114
115
118 G4Nucleus& targetNucleus)
119{
120 // Set up default particle change (just returns initial state)
123 leptonKE = aTrack.GetKineticEnergy();
126
127 // Set up sanity checks for real photon production
128 G4DynamicParticle lepton(aTrack.GetDefinition(), aTrack.Get4Momentum() );
129 G4int targZ = targetNucleus.GetZ_asInt();
130 G4int targA = targetNucleus.GetA_asInt();
131 G4Isotope* iso = 0;
132 G4Element* ele = 0;
133 G4Material* mat = 0;
134 G4double eXS = electroXS->GetIsoCrossSection(&lepton, targZ, targA, iso, ele, mat);
135
136 // If electronuclear cross section is negative, return initial track
137 if (eXS > 0.0) {
138 photonEnergy = electroXS->GetEquivalentPhotonEnergy();
139 // Photon energy cannot exceed lepton energy
140 if (photonEnergy < leptonKE) {
141 photonQ2 = electroXS->GetEquivalentPhotonQ2(photonEnergy);
143 // Photon
144 if (photonEnergy > photonQ2/dM) {
145 // Produce recoil lepton and transferred photon
146 G4DynamicParticle* transferredPhoton = CalculateEMVertex(aTrack, targetNucleus);
147 // Interact gamma with nucleus
148 if (transferredPhoton) CalculateHadronicVertex(transferredPhoton, targetNucleus);
149 }
150 }
151 }
152 return &theParticleChange;
153}
154
155
157G4ElectroVDNuclearModel::CalculateEMVertex(const G4HadProjectile& aTrack,
158 G4Nucleus& targetNucleus)
159{
161 G4ThreeVector(0.,0.,1.) );
162
163 // Get gamma cross section at Q**2 = 0 (real gamma)
164 G4int targZ = targetNucleus.GetZ_asInt();
165 G4int targA = targetNucleus.GetA_asInt();
166 G4Isotope* iso = 0;
167 G4Element* ele = 0;
168 G4Material* mat = 0;
169 G4double sigNu =
170 gammaXS->GetIsoCrossSection(&photon, targZ, targA, iso, ele, mat);
171
172 // Change real gamma energy to equivalent energy and get cross section at that energy
174 photon.SetKineticEnergy(photonEnergy - photonQ2/dM);
175 G4double sigK =
176 gammaXS->GetIsoCrossSection(&photon, targZ, targA, iso, ele, mat);
177 G4double rndFraction = electroXS->GetVirtualFactor(photonEnergy, photonQ2);
178
179 // No gamma produced, return null ptr
180 if (sigNu*G4UniformRand() > sigK*rndFraction) return 0;
181
182 // Scatter the lepton
183 G4double mProj = aTrack.GetDefinition()->GetPDGMass();
184 G4double mProj2 = mProj*mProj;
185 G4double iniE = leptonKE + mProj; // Total energy of incident lepton
186 G4double finE = iniE - photonEnergy; // Total energy of scattered lepton
188 G4double iniP = std::sqrt(iniE*iniE-mProj2); // Incident lepton momentum
189 G4double finP = std::sqrt(finE*finE-mProj2); // Scattered lepton momentum
190 G4double cost = (iniE*finE - mProj2 - photonQ2/2.)/iniP/finP; // cos(theta) from Q**2
191 if (cost > 1.) cost= 1.;
192 if (cost < -1.) cost=-1.;
193 G4double sint = std::sqrt(1.-cost*cost);
194
195 G4ThreeVector dir = aTrack.Get4Momentum().vect().unit();
196 G4ThreeVector ortx = dir.orthogonal().unit(); // Ortho-normal to scattering plane
197 G4ThreeVector orty = dir.cross(ortx); // Third unit vector
198 G4double phi = twopi*G4UniformRand();
199 G4double sinx = sint*std::sin(phi);
200 G4double siny = sint*std::cos(phi);
201 G4ThreeVector findir = cost*dir+sinx*ortx+siny*orty;
202 theParticleChange.SetMomentumChange(findir); // change lepton direction
203
204 // Create a gamma with momentum equal to momentum transfer
205 G4ThreeVector photonMomentum = iniP*dir - finP*findir;
207 photonEnergy, photonMomentum);
208 return gamma;
209}
210
211
212void
213G4ElectroVDNuclearModel::CalculateHadronicVertex(G4DynamicParticle* incident,
214 G4Nucleus& target)
215{
216 G4HadFinalState* hfs = 0;
217 G4double gammaE = incident->GetTotalEnergy();
218
219 if (gammaE < 10*GeV) {
220 G4HadProjectile projectile(*incident);
221 hfs = bert->ApplyYourself(projectile, target);
222 } else {
223 // At high energies convert incident gamma to a pion
225 G4double piMom = std::sqrt(gammaE*gammaE - piMass*piMass);
226 G4ThreeVector piMomentum(incident->GetMomentumDirection() );
227 piMomentum *= piMom;
228 G4DynamicParticle theHadron(G4PionZero::PionZero(), piMomentum);
229 G4HadProjectile projectile(theHadron);
230 hfs = ftfp->ApplyYourself(projectile, target);
231 }
232
233 delete incident;
234
235 // Copy secondaries from sub-model to model
237}
238
@ photon
@ isAlive
CLHEP::Hep3Vector G4ThreeVector
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
#define G4UniformRand()
Definition: Randomize.hh:53
Hep3Vector unit() const
Hep3Vector orthogonal() const
Hep3Vector cross(const Hep3Vector &) const
Hep3Vector vect() const
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &theNucleus)
const G4ThreeVector & GetMomentumDirection() const
G4double GetTotalEnergy() const
virtual G4double GetIsoCrossSection(const G4DynamicParticle *aParticle, G4int, G4int, const G4Isotope *, const G4Element *, const G4Material *)
G4double GetVirtualFactor(G4double nu, G4double Q2)
virtual void ModelDescription(std::ostream &outFile) const
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &aTargetNucleus)
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
void SetStatusChange(G4HadFinalStateStatus aS)
void AddSecondaries(const std::vector< G4HadSecondary > &addSecs)
void SetEnergyChange(G4double anEnergy)
void SetMomentumChange(const G4ThreeVector &aV)
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
void SetMinEnergy(G4double anEnergy)
void SetMaxEnergy(const G4double anEnergy)
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4int GetA_asInt() const
Definition: G4Nucleus.hh:109
G4int GetZ_asInt() const
Definition: G4Nucleus.hh:115
virtual G4double GetIsoCrossSection(const G4DynamicParticle *, G4int, G4int, const G4Isotope *, const G4Element *, const G4Material *)
static G4PionZero * PionZero()
Definition: G4PionZero.cc:104
static G4Proton * Proton()
Definition: G4Proton.cc:93
void SetTransport(G4VIntraNuclearTransportModel *const value)
void SetHighEnergyGenerator(G4VHighEnergyGenerator *const value)
G4HadFinalState * ApplyYourself(const G4HadProjectile &thePrimary, G4Nucleus &theNucleus)
void SetDeExcitation(G4VPreCompoundModel *ptr)
void SetFragmentationModel(G4VStringFragmentation *aModel)