Geant4  10.02.p03
G4ElectroVDNuclearModel Class Reference

#include <G4ElectroVDNuclearModel.hh>

Inheritance diagram for G4ElectroVDNuclearModel:
Collaboration diagram for G4ElectroVDNuclearModel:

Public Member Functions

 G4ElectroVDNuclearModel ()
 
 ~G4ElectroVDNuclearModel ()
 
G4HadFinalStateApplyYourself (const G4HadProjectile &aTrack, G4Nucleus &aTargetNucleus)
 
virtual void ModelDescription (std::ostream &outFile) const
 
- Public Member Functions inherited from G4HadronicInteraction
 G4HadronicInteraction (const G4String &modelName="HadronicModel")
 
virtual ~G4HadronicInteraction ()
 
virtual G4double SampleInvariantT (const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
 
virtual G4bool IsApplicable (const G4HadProjectile &, G4Nucleus &)
 
G4double GetMinEnergy () const
 
G4double GetMinEnergy (const G4Material *aMaterial, const G4Element *anElement) const
 
void SetMinEnergy (G4double anEnergy)
 
void SetMinEnergy (G4double anEnergy, const G4Element *anElement)
 
void SetMinEnergy (G4double anEnergy, const G4Material *aMaterial)
 
G4double GetMaxEnergy () const
 
G4double GetMaxEnergy (const G4Material *aMaterial, const G4Element *anElement) const
 
void SetMaxEnergy (const G4double anEnergy)
 
void SetMaxEnergy (G4double anEnergy, const G4Element *anElement)
 
void SetMaxEnergy (G4double anEnergy, const G4Material *aMaterial)
 
const G4HadronicInteractionGetMyPointer () const
 
virtual G4int GetVerboseLevel () const
 
virtual void SetVerboseLevel (G4int value)
 
const G4StringGetModelName () const
 
void DeActivateFor (const G4Material *aMaterial)
 
void ActivateFor (const G4Material *aMaterial)
 
void DeActivateFor (const G4Element *anElement)
 
void ActivateFor (const G4Element *anElement)
 
G4bool IsBlocked (const G4Material *aMaterial) const
 
G4bool IsBlocked (const G4Element *anElement) const
 
void SetRecoilEnergyThreshold (G4double val)
 
G4double GetRecoilEnergyThreshold () const
 
G4bool operator== (const G4HadronicInteraction &right) const
 
G4bool operator!= (const G4HadronicInteraction &right) const
 
virtual const std::pair< G4double, G4doubleGetFatalEnergyCheckLevels () const
 
virtual std::pair< G4double, G4doubleGetEnergyMomentumCheckLevels () const
 
void SetEnergyMomentumCheckLevels (G4double relativeLevel, G4double absoluteLevel)
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 

Private Member Functions

G4DynamicParticleCalculateEMVertex (const G4HadProjectile &aTrack, G4Nucleus &aTargetNucleus)
 
void CalculateHadronicVertex (G4DynamicParticle *incident, G4Nucleus &target)
 

Private Attributes

G4double leptonKE
 
G4double photonEnergy
 
G4double photonQ2
 
G4ElectroNuclearCrossSectionelectroXS
 
G4PhotoNuclearCrossSectiongammaXS
 
G4TheoFSGeneratorftfp
 
G4LundStringFragmentationtheFragmentation
 
G4ExcitedStringDecaytheStringDecay
 
G4CascadeInterfacebert
 

Additional Inherited Members

- Protected Member Functions inherited from G4HadronicInteraction
void SetModelName (const G4String &nam)
 
G4bool IsBlocked () const
 
void Block ()
 
- Protected Attributes inherited from G4HadronicInteraction
G4HadFinalState theParticleChange
 
G4int verboseLevel
 
G4double theMinEnergy
 
G4double theMaxEnergy
 
G4bool isBlocked
 

Detailed Description

Definition at line 50 of file G4ElectroVDNuclearModel.hh.

Constructor & Destructor Documentation

◆ G4ElectroVDNuclearModel()

G4ElectroVDNuclearModel::G4ElectroVDNuclearModel ( )

Definition at line 63 of file G4ElectroVDNuclearModel.cc.

64  : G4HadronicInteraction("G4ElectroVDNuclearModel"),
65  leptonKE(0.0), photonEnergy(0.0), photonQ2(0.0)
66 {
67  SetMinEnergy(0.0);
68  SetMaxEnergy(1*PeV);
69  electroXS =
71  GetCrossSectionDataSet(G4ElectroNuclearCrossSection::Default_Name());
72  gammaXS =
74  GetCrossSectionDataSet(G4PhotoNuclearCrossSection::Default_Name());
75 
76  // reuse existing pre-compound model
77  G4GeneratorPrecompoundInterface* precoInterface
81  G4VPreCompoundModel* pre = static_cast<G4VPreCompoundModel*>(p);
82  if(!pre) { pre = new G4PreCompoundModel(); }
83  precoInterface->SetDeExcitation(pre);
84 
85  // string model
86  ftfp = new G4TheoFSGenerator();
87  ftfp->SetTransport(precoInterface);
90  G4FTFModel* theStringModel = new G4FTFModel();
91  theStringModel->SetFragmentationModel(theStringDecay);
92  ftfp->SetHighEnergyGenerator(theStringModel);
93 
94  // Build Bertini model
95  bert = new G4CascadeInterface();
96 }
G4ExcitedStringDecay * theStringDecay
void SetFragmentationModel(G4VStringFragmentation *aModel)
G4PhotoNuclearCrossSection * gammaXS
void SetHighEnergyGenerator(G4VHighEnergyGenerator *const value)
void SetMinEnergy(G4double anEnergy)
static G4CrossSectionDataSetRegistry * Instance()
G4HadronicInteraction(const G4String &modelName="HadronicModel")
G4HadronicInteraction * FindModel(const G4String &name)
G4LundStringFragmentation * theFragmentation
static const double PeV
Definition: G4SIunits.hh:216
static G4HadronicInteractionRegistry * Instance()
void SetMaxEnergy(const G4double anEnergy)
void SetDeExcitation(G4VPreCompoundModel *ptr)
void SetTransport(G4VIntraNuclearTransportModel *const value)
G4ElectroNuclearCrossSection * electroXS
Here is the call graph for this function:

◆ ~G4ElectroVDNuclearModel()

G4ElectroVDNuclearModel::~G4ElectroVDNuclearModel ( )

Definition at line 98 of file G4ElectroVDNuclearModel.cc.

99 {
100  delete theFragmentation;
101  delete theStringDecay;
102 }
G4ExcitedStringDecay * theStringDecay
G4LundStringFragmentation * theFragmentation

Member Function Documentation

◆ ApplyYourself()

G4HadFinalState * G4ElectroVDNuclearModel::ApplyYourself ( const G4HadProjectile aTrack,
G4Nucleus aTargetNucleus 
)
virtual

Implements G4HadronicInteraction.

Definition at line 120 of file G4ElectroVDNuclearModel.cc.

122 {
123  // Set up default particle change (just returns initial state)
126  leptonKE = aTrack.GetKineticEnergy();
129 
130  // Set up sanity checks for real photon production
131  G4DynamicParticle lepton(aTrack.GetDefinition(), aTrack.Get4Momentum() );
132 
133  // Need to call GetElementCrossSection before calling GetEquivalentPhotonEnergy.
134  G4Material* mat = 0;
135  G4int targZ = targetNucleus.GetZ_asInt();
136  electroXS->GetElementCrossSection(&lepton, targZ, mat);
137 
139  // Photon energy cannot exceed lepton energy
140  if (photonEnergy < leptonKE) {
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  return &theParticleChange;
152 }
void CalculateHadronicVertex(G4DynamicParticle *incident, G4Nucleus &target)
static const G4double dM
const G4LorentzVector & Get4Momentum() const
G4DynamicParticle * CalculateEMVertex(const G4HadProjectile &aTrack, G4Nucleus &aTargetNucleus)
int G4int
Definition: G4Types.hh:78
Float_t mat
void SetStatusChange(G4HadFinalStateStatus aS)
Hep3Vector vect() const
Hep3Vector unit() const
static G4Proton * Proton()
Definition: G4Proton.cc:93
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
const G4ParticleDefinition * GetDefinition() const
void SetEnergyChange(G4double anEnergy)
G4double GetKineticEnergy() const
virtual G4double GetElementCrossSection(const G4DynamicParticle *, G4int Z, const G4Material *mat)
double G4double
Definition: G4Types.hh:76
void SetMomentumChange(const G4ThreeVector &aV)
G4ElectroNuclearCrossSection * electroXS
Here is the call graph for this function:

◆ CalculateEMVertex()

G4DynamicParticle * G4ElectroVDNuclearModel::CalculateEMVertex ( const G4HadProjectile aTrack,
G4Nucleus aTargetNucleus 
)
private

Definition at line 156 of file G4ElectroVDNuclearModel.cc.

158 {
160  G4ThreeVector(0.,0.,1.) );
161 
162  // Get gamma cross section at Q**2 = 0 (real gamma)
163  G4int targZ = targetNucleus.GetZ_asInt();
164  G4Material* mat = 0;
165  G4double sigNu =
166  gammaXS->GetElementCrossSection(&photon, targZ, mat);
167 
168  // Change real gamma energy to equivalent energy and get cross section at that energy
170  photon.SetKineticEnergy(photonEnergy - photonQ2/dM);
171  G4double sigK =
172  gammaXS->GetElementCrossSection(&photon, targZ, mat);
174 
175  // No gamma produced, return null ptr
176  if (sigNu*G4UniformRand() > sigK*rndFraction) return 0;
177 
178  // Scatter the lepton
179  G4double mProj = aTrack.GetDefinition()->GetPDGMass();
180  G4double mProj2 = mProj*mProj;
181  G4double iniE = leptonKE + mProj; // Total energy of incident lepton
182  G4double finE = iniE - photonEnergy; // Total energy of scattered lepton
184  G4double iniP = std::sqrt(iniE*iniE-mProj2); // Incident lepton momentum
185  G4double finP = std::sqrt(finE*finE-mProj2); // Scattered lepton momentum
186  G4double cost = (iniE*finE - mProj2 - photonQ2/2.)/iniP/finP; // cos(theta) from Q**2
187  if (cost > 1.) cost= 1.;
188  if (cost < -1.) cost=-1.;
189  G4double sint = std::sqrt(1.-cost*cost);
190 
191  G4ThreeVector dir = aTrack.Get4Momentum().vect().unit();
192  G4ThreeVector ortx = dir.orthogonal().unit(); // Ortho-normal to scattering plane
193  G4ThreeVector orty = dir.cross(ortx); // Third unit vector
194  G4double phi = twopi*G4UniformRand();
195  G4double sinx = sint*std::sin(phi);
196  G4double siny = sint*std::cos(phi);
197  G4ThreeVector findir = cost*dir+sinx*ortx+siny*orty;
198  theParticleChange.SetMomentumChange(findir); // change lepton direction
199 
200  // Create a gamma with momentum equal to momentum transfer
201  G4ThreeVector photonMomentum = iniP*dir - finP*findir;
203  photonEnergy, photonMomentum);
204  return gamma;
205 }
CLHEP::Hep3Vector G4ThreeVector
static const G4double dM
const G4LorentzVector & Get4Momentum() const
TDirectory * dir
G4PhotoNuclearCrossSection * gammaXS
int G4int
Definition: G4Types.hh:78
Float_t mat
Hep3Vector vect() const
#define G4UniformRand()
Definition: Randomize.hh:97
Hep3Vector cross(const Hep3Vector &) const
Hep3Vector unit() const
static const double twopi
Definition: G4SIunits.hh:75
static G4Proton * Proton()
Definition: G4Proton.cc:93
Hep3Vector orthogonal() const
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
const G4ParticleDefinition * GetDefinition() const
virtual G4double GetElementCrossSection(const G4DynamicParticle *, G4int Z, const G4Material *)
void SetEnergyChange(G4double anEnergy)
G4double GetVirtualFactor(G4double nu, G4double Q2)
double G4double
Definition: G4Types.hh:76
void SetMomentumChange(const G4ThreeVector &aV)
G4ElectroNuclearCrossSection * electroXS
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CalculateHadronicVertex()

void G4ElectroVDNuclearModel::CalculateHadronicVertex ( G4DynamicParticle incident,
G4Nucleus target 
)
private

Definition at line 209 of file G4ElectroVDNuclearModel.cc.

211 {
212  G4HadFinalState* hfs = 0;
213  G4double gammaE = incident->GetTotalEnergy();
214 
215  if (gammaE < 10*GeV) {
216  G4HadProjectile projectile(*incident);
217  hfs = bert->ApplyYourself(projectile, target);
218  } else {
219  // At high energies convert incident gamma to a pion
221  G4double piMom = std::sqrt(gammaE*gammaE - piMass*piMass);
222  G4ThreeVector piMomentum(incident->GetMomentumDirection() );
223  piMomentum *= piMom;
224  G4DynamicParticle theHadron(G4PionZero::PionZero(), piMomentum);
225  G4HadProjectile projectile(theHadron);
226  hfs = ftfp->ApplyYourself(projectile, target);
227  }
228 
229  delete incident;
230 
231  // Copy secondaries from sub-model to model
233 }
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &theNucleus)
void AddSecondaries(const std::vector< G4HadSecondary > &addSecs)
G4double GetTotalEnergy() const
static const double GeV
Definition: G4SIunits.hh:214
static G4PionZero * PionZero()
Definition: G4PionZero.cc:108
const G4ThreeVector & GetMomentumDirection() const
double G4double
Definition: G4Types.hh:76
G4HadFinalState * ApplyYourself(const G4HadProjectile &thePrimary, G4Nucleus &theNucleus)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ModelDescription()

void G4ElectroVDNuclearModel::ModelDescription ( std::ostream &  outFile) const
virtual

Reimplemented from G4HadronicInteraction.

Definition at line 104 of file G4ElectroVDNuclearModel.cc.

105 {
106  outFile << "G4ElectroVDNuclearModel handles the inelastic scattering\n"
107  << "of e- and e+ from nuclei using the equivalent photon\n"
108  << "approximation in which the incoming lepton generates a\n"
109  << "virtual photon at the electromagnetic vertex, and the\n"
110  << "virtual photon is converted to a real photon. At low\n"
111  << "energies, the photon interacts directly with the nucleus\n"
112  << "using the Bertini cascade. At high energies the photon\n"
113  << "is converted to a pi0 which interacts using the FTFP\n"
114  << "model. The electro- and gamma-nuclear cross sections of\n"
115  << "M. Kossov are used to generate the virtual photon spectrum\n";
116 }

Member Data Documentation

◆ bert

G4CascadeInterface* G4ElectroVDNuclearModel::bert
private

Definition at line 80 of file G4ElectroVDNuclearModel.hh.

◆ electroXS

G4ElectroNuclearCrossSection* G4ElectroVDNuclearModel::electroXS
private

Definition at line 74 of file G4ElectroVDNuclearModel.hh.

◆ ftfp

G4TheoFSGenerator* G4ElectroVDNuclearModel::ftfp
private

Definition at line 77 of file G4ElectroVDNuclearModel.hh.

◆ gammaXS

G4PhotoNuclearCrossSection* G4ElectroVDNuclearModel::gammaXS
private

Definition at line 75 of file G4ElectroVDNuclearModel.hh.

◆ leptonKE

G4double G4ElectroVDNuclearModel::leptonKE
private

Definition at line 70 of file G4ElectroVDNuclearModel.hh.

◆ photonEnergy

G4double G4ElectroVDNuclearModel::photonEnergy
private

Definition at line 71 of file G4ElectroVDNuclearModel.hh.

◆ photonQ2

G4double G4ElectroVDNuclearModel::photonQ2
private

Definition at line 72 of file G4ElectroVDNuclearModel.hh.

◆ theFragmentation

G4LundStringFragmentation* G4ElectroVDNuclearModel::theFragmentation
private

Definition at line 78 of file G4ElectroVDNuclearModel.hh.

◆ theStringDecay

G4ExcitedStringDecay* G4ElectroVDNuclearModel::theStringDecay
private

Definition at line 79 of file G4ElectroVDNuclearModel.hh.


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