GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
genie::LwlynSmithQELCCPXSec Class Reference

Computes neutrino-nucleon(nucleus) QELCC differential cross section Is a concrete implementation of the XSecAlgorithmI interface.
. More...

#include <LwlynSmithQELCCPXSec.h>

Inheritance diagram for genie::LwlynSmithQELCCPXSec:
Inheritance graph
[legend]
Collaboration diagram for genie::LwlynSmithQELCCPXSec:
Collaboration graph
[legend]

Public Member Functions

 LwlynSmithQELCCPXSec ()
 
 LwlynSmithQELCCPXSec (string config)
 
virtual ~LwlynSmithQELCCPXSec ()
 
double XSec (const Interaction *i, KinePhaseSpace_t k) const
 Compute the cross section for the input interaction. More...
 
double Integral (const Interaction *i) const
 
bool ValidProcess (const Interaction *i) const
 Can this cross section algorithm handle the input process? More...
 
void Configure (const Registry &config)
 
void Configure (string param_set)
 
- Public Member Functions inherited from genie::XSecAlgorithmI
virtual ~XSecAlgorithmI ()
 
virtual bool ValidKinematics (const Interaction *i) const
 Is the input kinematical point a physically allowed one? More...
 
- Public Member Functions inherited from genie::Algorithm
virtual ~Algorithm ()
 
virtual void FindConfig (void)
 
virtual const RegistryGetConfig (void) const
 
RegistryGetOwnedConfig (void)
 
virtual const AlgIdId (void) const
 Get algorithm ID. More...
 
virtual AlgStatus_t GetStatus (void) const
 Get algorithm status. More...
 
virtual bool AllowReconfig (void) const
 
virtual AlgCmp_t Compare (const Algorithm *alg) const
 Compare with input algorithm. More...
 
virtual void SetId (const AlgId &id)
 Set algorithm ID. More...
 
virtual void SetId (string name, string config)
 
const AlgorithmSubAlg (const RgKey &registry_key) const
 
void AdoptConfig (void)
 
void AdoptSubstructure (void)
 
virtual void Print (ostream &stream) const
 Print algorithm info. More...
 

Private Member Functions

double FullDifferentialXSec (const Interaction *i) const
 
void LoadConfig (void)
 

Private Attributes

QELFormFactors fFormFactors
 
const QELFormFactorsModelIfFormFactorsModel
 
const XSecIntegratorIfXSecIntegrator
 
double fCos8c2
 cos^2(cabibbo angle) More...
 
double fXSecCCScale
 external xsec scaling factor for CC More...
 
double fXSecNCScale
 external xsec scaling factor for NC More...
 
double fXSecEMScale
 external xsec scaling factor for EM More...
 
const NuclearModelIfNuclModel
 
bool fLFG
 If the nuclear model is lfg alway average over nucleons. More...
 
bool fDoAvgOverNucleonMomentum
 Average cross section over hit nucleon monentum? More...
 
double fEnergyCutOff
 
QELEvGen_BindingMode_t fIntegralNucleonBindingMode
 
bool fDoPauliBlocking
 Whether to apply Pauli blocking in FullDifferentialXSec. More...
 
const genie::PauliBlockerfPauliBlocker
 The PauliBlocker instance to use to apply that correction. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from genie::Algorithm
static string BuildParamVectKey (const std::string &comm_name, unsigned int i)
 
static string BuildParamVectSizeKey (const std::string &comm_name)
 
static string BuildParamMatKey (const std::string &comm_name, unsigned int i, unsigned int j)
 
static string BuildParamMatRowSizeKey (const std::string &comm_name)
 
static string BuildParamMatColSizeKey (const std::string &comm_name)
 
- Protected Member Functions inherited from genie::XSecAlgorithmI
 XSecAlgorithmI ()
 
 XSecAlgorithmI (string name)
 
 XSecAlgorithmI (string name, string config)
 
- Protected Member Functions inherited from genie::Algorithm
 Algorithm ()
 
 Algorithm (string name)
 
 Algorithm (string name, string config)
 
void Initialize (void)
 
void DeleteConfig (void)
 
void DeleteSubstructure (void)
 
RegistryExtractLocalConfig (const Registry &in) const
 
RegistryExtractLowerConfig (const Registry &in, const string &alg_key) const
 Split an incoming configuration Registry into a block valid for the sub-algo identified by alg_key. More...
 
template<class T >
bool GetParam (const RgKey &name, T &p, bool is_top_call=true) const
 
template<class T >
bool GetParamDef (const RgKey &name, T &p, const T &def) const
 
template<class T >
int GetParamVect (const std::string &comm_name, std::vector< T > &v, bool is_top_call=true) const
 Handle to load vectors of parameters. More...
 
int GetParamVectKeys (const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const
 
template<class T >
int GetParamMat (const std::string &comm_name, TMatrixT< T > &mat, bool is_top_call=true) const
 Handle to load matrix of parameters. More...
 
template<class T >
int GetParamMatSym (const std::string &comm_name, TMatrixTSym< T > &mat, bool is_top_call=true) const
 
int GetParamMatKeys (const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const
 
int AddTopRegistry (Registry *rp, bool owns=true)
 add registry with top priority, also update ownership More...
 
int AddLowRegistry (Registry *rp, bool owns=true)
 add registry with lowest priority, also update ownership More...
 
int MergeTopRegistry (const Registry &r)
 
int AddTopRegisties (const vector< Registry * > &rs, bool owns=false)
 Add registries with top priority, also udated Ownerships. More...
 
- Protected Attributes inherited from genie::Algorithm
bool fAllowReconfig
 
bool fOwnsSubstruc
 true if it owns its substructure (sub-algs,...) More...
 
AlgId fID
 algorithm name and configuration set More...
 
vector< Registry * > fConfVect
 
vector< bool > fOwnerships
 ownership for every registry in fConfVect More...
 
AlgStatus_t fStatus
 algorithm execution status More...
 
AlgMapfOwnedSubAlgMp
 local pool for owned sub-algs (taken out of the factory pool) More...
 

Detailed Description

Computes neutrino-nucleon(nucleus) QELCC differential cross section Is a concrete implementation of the XSecAlgorithmI interface.
.

References:
C.H.Llewellyn Smith, Physics Reports (Sect. C of Physics Letters) 3, No. 5 (1972) 261-379
Author
Costas Andreopoulos <c.andreopoulos cern.ch> University of Liverpool
Created:
May 05, 2004
License:
Copyright (c) 2003-2024, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org

Definition at line 37 of file LwlynSmithQELCCPXSec.h.

Constructor & Destructor Documentation

LwlynSmithQELCCPXSec::LwlynSmithQELCCPXSec ( )

Definition at line 41 of file LwlynSmithQELCCPXSec.cxx.

41  :
42 XSecAlgorithmI("genie::LwlynSmithQELCCPXSec")
43 {
44 
45 }
LwlynSmithQELCCPXSec::LwlynSmithQELCCPXSec ( string  config)

Definition at line 47 of file LwlynSmithQELCCPXSec.cxx.

47  :
48 XSecAlgorithmI("genie::LwlynSmithQELCCPXSec", config)
49 {
50 
51 }
LwlynSmithQELCCPXSec::~LwlynSmithQELCCPXSec ( )
virtual

Definition at line 53 of file LwlynSmithQELCCPXSec.cxx.

54 {
55 
56 }

Member Function Documentation

void LwlynSmithQELCCPXSec::Configure ( const Registry config)
virtual

Configure the algorithm with an external registry The registry is merged with the top level registry if it is owned, Otherwise a copy of it is added with the highest priority

Reimplemented from genie::Algorithm.

Definition at line 413 of file LwlynSmithQELCCPXSec.cxx.

References genie::Algorithm::Configure(), and LoadConfig().

414 {
415  Algorithm::Configure(config);
416  this->LoadConfig();
417 }
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
void LwlynSmithQELCCPXSec::Configure ( string  config)
virtual

Configure the algorithm from the AlgoConfigPool based on param_set string given in input An algorithm contains a vector of registries coming from different xml configuration files, which are loaded according a very precise prioriy This methods will load a number registries in order of priority: 1) "Tunable" parameter set from CommonParametes. This is loaded with the highest prioriry and it is designed to be used for tuning procedure Usage not expected from the user. 2) For every string defined in "CommonParame" the corresponding parameter set will be loaded from CommonParameter.xml 3) parameter set specified by the config string and defined in the xml file of the algorithm 4) if config is not "Default" also the Default parameter set from the same xml file will be loaded Effectively this avoids the repetion of a parameter when it is not changed in the requested configuration

Reimplemented from genie::Algorithm.

Definition at line 419 of file LwlynSmithQELCCPXSec.cxx.

References genie::Algorithm::Configure(), and LoadConfig().

420 {
421  Algorithm::Configure(config);
422  this->LoadConfig();
423 }
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
double LwlynSmithQELCCPXSec::FullDifferentialXSec ( const Interaction i) const
private

Definition at line 169 of file LwlynSmithQELCCPXSec.cxx.

References genie::QELFormFactors::Calculate(), genie::utils::EnergyDeltaFunctionSolutionQEL(), genie::QELFormFactors::F1V(), genie::QELFormFactors::FA(), fCos8c2, fDoPauliBlocking, fFormFactors, genie::QELFormFactors::Fp(), fPauliBlocker, genie::Kinematics::FSLeptonP4(), fXSecCCScale, fXSecNCScale, genie::PauliBlocker::GetFermiMomentum(), genie::InitialState::GetProbeP4(), genie::Kinematics::HadSystP4(), genie::Target::HitNucMass(), genie::Target::HitNucP4Ptr(), genie::Target::HitNucPdg(), genie::Target::HitNucPosition(), genie::pdg::IsNeutrino(), genie::Target::IsNucleus(), genie::pdg::IsProton(), genie::ProcessInfo::IsWeakCC(), genie::ProcessInfo::IsWeakNC(), genie::constants::kGF2, genie::kIAssumeFreeNucleon, genie::Interaction::KinePtr(), genie::constants::kPi, genie::kRfLab, LOG, genie::Target::N(), pDEBUG, genie::InitialState::ProbePdg(), genie::Interaction::ProcInfo(), genie::utils::kinematics::Q2(), genie::Interaction::RecoilNucleon(), genie::Interaction::RecoilNucleonPdg(), genie::Kinematics::SetQ2(), genie::InitialState::Tgt(), genie::InitialState::TgtPtr(), genie::QELFormFactors::xiF2V(), and genie::Target::Z().

Referenced by XSec().

171 {
172  // First we need access to all of the particles in the interaction
173  // The particles were stored in the lab frame
174  const Kinematics& kinematics = interaction -> Kine();
175  const InitialState& init_state = interaction -> InitState();
176 
177  const Target& tgt = init_state.Tgt();
178 
179  const TLorentzVector leptonMom = kinematics.FSLeptonP4();
180  const TLorentzVector outNucleonMom = kinematics.HadSystP4();
181 
182  // Apply Pauli blocking if enabled
183  if ( fDoPauliBlocking && tgt.IsNucleus() && !interaction->TestBit(kIAssumeFreeNucleon) ) {
184  int final_nucleon_pdg = interaction->RecoilNucleonPdg();
185  double kF = fPauliBlocker->GetFermiMomentum(tgt, final_nucleon_pdg,
186  tgt.HitNucPosition());
187  double pNf = outNucleonMom.P();
188  if ( pNf < kF ) return 0.;
189  }
190 
191  // Note that GetProbeP4 defaults to returning the probe 4-momentum in the
192  // struck nucleon rest frame, so we have to explicitly ask for the lab frame
193  // here
194  TLorentzVector * tempNeutrino = init_state.GetProbeP4(kRfLab);
195  TLorentzVector neutrinoMom = *tempNeutrino;
196  delete tempNeutrino;
197  TLorentzVector * inNucleonMom = init_state.TgtPtr()->HitNucP4Ptr();
198 
199  // *** CALCULATION OF "q" and "qTilde" ***
200  // According to the de Forest prescription for handling the off-shell
201  // initial struck nucleon, the cross section calculation should proceed
202  // as if for a free nucleon, except that an effective value of the 4-momentum
203  // transfer qTilde should be used in which the difference between the on-
204  // and off-shell energies of the hit nucleon has been subtracted from the
205  // energy transfer q0.
206 
207  // HitNucMass() looks up the PDGLibrary (on-shell) value for the initial
208  // struck nucleon
209  double mNi = init_state.Tgt().HitNucMass();
210 
211  // Hadronic matrix element for CC neutrino interactions should really use
212  // the "nucleon mass," i.e., the mean of the proton and neutrino masses.
213  // This expression would also work for NC and EM scattering (since the
214  // initial and final on-shell nucleon masses would be the same)
215  double mNucleon = ( mNi + interaction->RecoilNucleon()->Mass() ) / 2.;
216 
217  // Ordinary 4-momentum transfer
218  TLorentzVector qP4 = neutrinoMom - leptonMom;
219 
220  // Initial struck nucleon 4-momentum in which it is forced to be on-shell
221  double inNucleonOnShellEnergy = std::sqrt( std::pow(mNi, 2)
222  + std::pow(inNucleonMom->P(), 2) );
223  TLorentzVector inNucleonMomOnShell( inNucleonMom->Vect(), inNucleonOnShellEnergy );
224 
225  // Effective 4-momentum transfer (according to the deForest prescription) for
226  // use in computing the hadronic tensor
227  TLorentzVector qTildeP4 = outNucleonMom - inNucleonMomOnShell;
228 
229  double Q2 = -1. * qP4.Mag2();
230  double Q2tilde = -1. * qTildeP4.Mag2();
231 
232  // If the binding energy correction causes an unphysical value
233  // of q0Tilde or Q2tilde, just return 0.
234  if ( qTildeP4.E() <= 0. && init_state.Tgt().IsNucleus() &&
235  !interaction->TestBit(kIAssumeFreeNucleon) ) return 0.;
236  if ( Q2tilde <= 0. ) return 0.;
237 
238  // Store Q2tilde in the kinematic variable representing Q2.
239  // This will ensure that the form factors are calculated correctly
240  // using the de Forest prescription (Q2tilde instead of Q2).
241  interaction->KinePtr()->SetQ2(Q2tilde);
242 
243  // Calculate the QEL form factors
244  fFormFactors.Calculate(interaction);
245 
246  double F1V = fFormFactors.F1V();
247  double xiF2V = fFormFactors.xiF2V();
248  double FA = fFormFactors.FA();
249  double Fp = fFormFactors.Fp();
250 
251  // Restore Q2 in the interaction's kinematic variables
252  // now that the form factors have been computed
253  interaction->KinePtr()->SetQ2( Q2 );
254 
255  // Overall factor in the differential cross section
256  double Gfactor = kGF2*fCos8c2 / ( 8. * kPi * kPi * inNucleonOnShellEnergy
257  * neutrinoMom.E() * outNucleonMom.E() * leptonMom.E() );
258 
259  // Now, we can calculate the cross section
260  double tau = Q2tilde / (4 * std::pow(mNucleon, 2));
261  double h1 = FA*FA*(1 + tau) + tau*(F1V + xiF2V)*(F1V + xiF2V);
262  double h2 = FA*FA + F1V*F1V + tau*xiF2V*xiF2V;
263  double h3 = 2.0 * FA * (F1V + xiF2V);
264  double h4 = 0.25 * xiF2V*xiF2V *(1-tau) + 0.5*F1V*xiF2V + FA*Fp - tau*Fp*Fp;
265 
266  bool is_neutrino = pdg::IsNeutrino(init_state.ProbePdg());
267  int sign = (is_neutrino) ? -1 : 1;
268  double l1 = 2*neutrinoMom.Dot(leptonMom)*std::pow(mNucleon, 2);
269  double l2 = 2*(neutrinoMom.Dot(inNucleonMomOnShell)) * (inNucleonMomOnShell.Dot(leptonMom)) - neutrinoMom.Dot(leptonMom)*std::pow(mNucleon, 2);
270  double l3 = (neutrinoMom.Dot(inNucleonMomOnShell) * qTildeP4.Dot(leptonMom)) - (neutrinoMom.Dot(qTildeP4) * leptonMom.Dot(inNucleonMomOnShell));
271  l3 *= sign;
272  double l4 = neutrinoMom.Dot(leptonMom) * qTildeP4.Dot(qTildeP4) - 2*neutrinoMom.Dot(qTildeP4)*leptonMom.Dot(qTildeP4);
273  double l5 = neutrinoMom.Dot(inNucleonMomOnShell) * leptonMom.Dot(qTildeP4) + leptonMom.Dot(inNucleonMomOnShell)*neutrinoMom.Dot(qTildeP4) - neutrinoMom.Dot(leptonMom)*inNucleonMomOnShell.Dot(qTildeP4);
274 
275  double LH = 2 *(l1*h1 + l2*h2 + l3*h3 + l4*h4 + l5*h2);
276 
277  double xsec = Gfactor * LH;
278 
279  // Apply the factor that arises from elimination of the energy-conserving
280  // delta function
281  xsec *= genie::utils::EnergyDeltaFunctionSolutionQEL( *interaction );
282 
283  const ProcessInfo& proc_info = interaction->ProcInfo();
284 
285  // Apply given scaling factor
286  double xsec_scale = 1 ;
287  if( proc_info.IsWeakCC() ) xsec_scale = fXSecCCScale;
288  else if( proc_info.IsWeakNC() ) xsec_scale = fXSecNCScale;
289 
290  xsec *= xsec_scale ;
291 
292  // Number of scattering centers in the target
293  const Target & target = init_state.Tgt();
294  int nucpdgc = target.HitNucPdg();
295  int NNucl = (pdg::IsProton(nucpdgc)) ? target.Z() : target.N();
296 
297 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
298  LOG("LwlynSmith", pDEBUG)
299  << "Nuclear suppression factor R(Q2) = " << R << ", NNucl = " << NNucl;
300 #endif
301 
302  xsec *= NNucl; // nuclear xsec
303 
304  return xsec;
305 
306 }
double fXSecCCScale
external xsec scaling factor for CC
bool IsWeakCC(void) const
double fXSecNCScale
external xsec scaling factor for NC
bool IsNeutrino(int pdgc)
Definition: PDGUtils.cxx:110
double Q2(const Interaction *const i)
Definition: KineUtils.cxx:1077
int HitNucPdg(void) const
Definition: Target.cxx:304
double HitNucMass(void) const
Definition: Target.cxx:233
bool IsNucleus(void) const
Definition: Target.cxx:272
Generated/set kinematical variables for an event.
Definition: Kinematics.h:39
const TLorentzVector & HadSystP4(void) const
Definition: Kinematics.h:66
double GetFermiMomentum(const Target &tgt, int pdg_Nf, double radius=0.0) const
Get the Fermi momentum needed to check Pauli blocking.
bool IsProton(int pdgc)
Definition: PDGUtils.cxx:336
bool IsWeakNC(void) const
const TLorentzVector & FSLeptonP4(void) const
Definition: Kinematics.h:65
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
double EnergyDeltaFunctionSolutionQEL(const Interaction &inter)
Definition: QELUtils.cxx:50
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
Definition: ProcessInfo.h:46
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
Definition: Target.h:40
int ProbePdg(void) const
Definition: InitialState.h:64
int Z(void) const
Definition: Target.h:68
bool fDoPauliBlocking
Whether to apply Pauli blocking in FullDifferentialXSec.
double xiF2V(void) const
Get the computed form factor xi*F2V.
void Calculate(const Interaction *interaction)
Compute the form factors for the input interaction using the attached model.
int N(void) const
Definition: Target.h:69
TLorentzVector * HitNucP4Ptr(void) const
Definition: Target.cxx:247
const UInt_t kIAssumeFreeNucleon
Definition: Interaction.h:49
double HitNucPosition(void) const
Definition: Target.h:89
Target * TgtPtr(void) const
Definition: InitialState.h:67
double fCos8c2
cos^2(cabibbo angle)
double F1V(void) const
Get the computed form factor F1V.
const Target & Tgt(void) const
Definition: InitialState.h:66
double Fp(void) const
Get the computed form factor Fp.
const genie::PauliBlocker * fPauliBlocker
The PauliBlocker instance to use to apply that correction.
double FA(void) const
Get the computed form factor FA.
TLorentzVector * GetProbeP4(RefFrame_t rf=kRfHitNucRest) const
Initial State information.
Definition: InitialState.h:48
#define pDEBUG
Definition: Messenger.h:63
double LwlynSmithQELCCPXSec::Integral ( const Interaction i) const
virtual

Integrate the model over the kinematic phase space available to the input interaction (kinematical cuts can be included)

Implements genie::XSecAlgorithmI.

Definition at line 308 of file LwlynSmithQELCCPXSec.cxx.

References genie::Target::A(), genie::VertexGenerator::Configure(), fDoAvgOverNucleonMomentum, fEnergyCutOff, genie::PDGLibrary::Find(), fLFG, fNuclModel, fXSecIntegrator, genie::NuclearModelI::GenerateNucleon(), genie::VertexGenerator::GenerateVertex(), genie::Target::HitNucP4Ptr(), genie::Target::HitNucPdg(), genie::Algorithm::Id(), genie::Interaction::InitState(), genie::PDGLibrary::Instance(), genie::XSecIntegratorI::Integrate(), genie::pdg::IonPdgCode(), genie::Target::IsNucleus(), genie::pdg::IsProton(), genie::kRfHitNucRest, LOG, genie::utils::res::Mass(), genie::NuclearModelI::Momentum3(), genie::AlgId::Name(), pFATAL, genie::InitialState::ProbeE(), genie::Target::SetHitNucPosition(), genie::InitialState::Tgt(), genie::InitialState::TgtPtr(), and genie::Target::Z().

309 {
310  // If we're using the new spline generation method (which integrates
311  // over the kPSQELEvGen phase space used by QELEventGenerator) then
312  // let the cross section integrator do all of the work. It's smart
313  // enough to handle free nucleon vs. nuclear targets, different
314  // nuclear models (including the local Fermi gas model), etc.
315  // TODO: think about doing this in a better way
316  if ( fXSecIntegrator->Id().Name() == "genie::NewQELXSec" ) {
317  return fXSecIntegrator->Integrate(this, in);
318  }
319 
320  // Otherwise, use the old integration method (kept for use with
321  // the historical default G18_00x series of tunes)
322  bool nuclear_target = in->InitState().Tgt().IsNucleus();
323  if(!nuclear_target || !fDoAvgOverNucleonMomentum) {
324  return fXSecIntegrator->Integrate(this,in);
325  }
326 
327  double E = in->InitState().ProbeE(kRfHitNucRest);
328  if(fLFG || E < fEnergyCutOff) {
329  // clone the input interaction so as to tweak the
330  // hit nucleon 4-momentum in the averaging loop
331  Interaction in_curr(*in);
332 
333  // hit target
334  Target * tgt = in_curr.InitState().TgtPtr();
335 
336  // get nuclear masses (init & final state nucleus)
337  int nucleon_pdgc = tgt->HitNucPdg();
338  bool is_p = pdg::IsProton(nucleon_pdgc);
339  int Zi = tgt->Z();
340  int Ai = tgt->A();
341  int Zf = (is_p) ? Zi-1 : Zi;
342  int Af = Ai-1;
343  PDGLibrary * pdglib = PDGLibrary::Instance();
344  TParticlePDG * nucl_i = pdglib->Find( pdg::IonPdgCode(Ai, Zi) );
345  TParticlePDG * nucl_f = pdglib->Find( pdg::IonPdgCode(Af, Zf) );
346  if(!nucl_f) {
347  LOG("LwlynSmith", pFATAL)
348  << "Unknwown nuclear target! No target with code: "
349  << pdg::IonPdgCode(Af, Zf) << " in PDGLibrary!";
350  exit(1);
351  }
352  double Mi = nucl_i -> Mass(); // initial nucleus mass
353  double Mf = nucl_f -> Mass(); // remnant nucleus mass
354 
355  // throw nucleons with fermi momenta and binding energies
356  // generated according to the current nuclear model for the
357  // input target and average the cross section
358  double xsec_sum = 0.;
359  const int nnuc = 2000;
360  // VertexGenerator for generating a position before generating
361  // each nucleon
362  VertexGenerator * vg = new VertexGenerator();
363  vg->Configure("Default");
364  for(int inuc=0;inuc<nnuc;inuc++){
365  // Generate a position in the nucleus
366  TVector3 nucpos = vg->GenerateVertex(&in_curr,tgt->A());
367  tgt->SetHitNucPosition(nucpos.Mag());
368 
369  // Generate a nucleon
370  fNuclModel->GenerateNucleon(*tgt, nucpos.Mag());
371  TVector3 p3N = fNuclModel->Momentum3();
372  double EN = Mi - TMath::Sqrt(p3N.Mag2() + Mf*Mf);
373  TLorentzVector* p4N = tgt->HitNucP4Ptr();
374  p4N->SetPx (p3N.Px());
375  p4N->SetPy (p3N.Py());
376  p4N->SetPz (p3N.Pz());
377  p4N->SetE (EN);
378 
379  double xsec = fXSecIntegrator->Integrate(this,&in_curr);
380  xsec_sum += xsec;
381  }
382  double xsec_avg = xsec_sum / nnuc;
383  delete vg;
384  return xsec_avg;
385  }else{
386  return fXSecIntegrator->Integrate(this,in);
387  }
388 }
TVector3 GenerateVertex(const Interaction *in, double A) const
int HitNucPdg(void) const
Definition: Target.cxx:304
bool fLFG
If the nuclear model is lfg alway average over nucleons.
int A(void) const
Definition: Target.h:70
#define pFATAL
Definition: Messenger.h:56
const NuclearModelI * fNuclModel
double Mass(Resonance_t res)
resonance mass (GeV)
void SetHitNucPosition(double r)
Definition: Target.cxx:210
bool fDoAvgOverNucleonMomentum
Average cross section over hit nucleon monentum?
const TVector3 & Momentum3(void) const
Definition: NuclearModelI.h:75
Summary information for an interaction.
Definition: Interaction.h:56
bool IsProton(int pdgc)
Definition: PDGUtils.cxx:336
const XSecIntegratorI * fXSecIntegrator
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
string Name(void) const
Definition: AlgId.h:44
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
Definition: Target.h:40
int Z(void) const
Definition: Target.h:68
void Configure(const Registry &config)
virtual const AlgId & Id(void) const
Get algorithm ID.
Definition: Algorithm.h:98
TLorentzVector * HitNucP4Ptr(void) const
Definition: Target.cxx:247
static PDGLibrary * Instance(void)
Definition: PDGLibrary.cxx:68
Singleton class to load &amp; serve a TDatabasePDG.
Definition: PDGLibrary.h:35
int IonPdgCode(int A, int Z)
Definition: PDGUtils.cxx:71
TParticlePDG * Find(int pdgc, bool must_exist=true)
Definition: PDGLibrary.cxx:86
virtual double Integrate(const XSecAlgorithmI *model, const Interaction *interaction) const =0
virtual bool GenerateNucleon(const Target &) const =0
void LwlynSmithQELCCPXSec::LoadConfig ( void  )
private

Definition at line 425 of file LwlynSmithQELCCPXSec.cxx.

References fCos8c2, fDoAvgOverNucleonMomentum, fDoPauliBlocking, fEnergyCutOff, fFormFactors, fFormFactorsModel, fIntegralNucleonBindingMode, fLFG, fNuclModel, fPauliBlocker, fXSecCCScale, fXSecIntegrator, fXSecNCScale, genie::Algorithm::GetParam(), genie::Algorithm::GetParamDef(), genie::kNucmLocalFermiGas, genie::NuclearModelI::ModelType(), genie::QELFormFactors::SetModel(), genie::utils::StringToQELBindingMode(), and genie::Algorithm::SubAlg().

Referenced by Configure().

426 {
427  // Cross section scaling factor
428  GetParam( "QEL-CC-XSecScale", fXSecCCScale ) ;
429  GetParam( "QEL-NC-XSecScale", fXSecNCScale ) ;
430 
431  double thc ;
432  GetParam( "CabibboAngle", thc ) ;
433  fCos8c2 = TMath::Power(TMath::Cos(thc), 2);
434 
435  // load QEL form factors model
436  fFormFactorsModel = dynamic_cast<const QELFormFactorsModelI *> (
437  this->SubAlg("FormFactorsAlg"));
438  assert(fFormFactorsModel);
439  fFormFactors.SetModel(fFormFactorsModel); // <-- attach algorithm
440 
441  // load XSec Integrator
443  dynamic_cast<const XSecIntegratorI *> (this->SubAlg("XSec-Integrator"));
444  assert(fXSecIntegrator);
445 
446  // Get nuclear model for use in Integral()
447  RgKey nuclkey = "IntegralNuclearModel";
448  fNuclModel = dynamic_cast<const NuclearModelI *> (this->SubAlg(nuclkey));
449  assert(fNuclModel);
450 
452 
453  bool average_over_nuc_mom ;
454  GetParamDef( "IntegralAverageOverNucleonMomentum", average_over_nuc_mom, false ) ;
455  // Always average over initial nucleons if the nuclear model is LFG
456  fDoAvgOverNucleonMomentum = fLFG || average_over_nuc_mom ;
457 
458  fEnergyCutOff = 0.;
459 
460  // Get averaging cutoff energy
461  GetParamDef("IntegralNuclearInfluenceCutoffEnergy", fEnergyCutOff, 2.0 ) ;
462 
463  // Method to use to calculate the binding energy of the initial hit nucleon when
464  // generating splines
465  std::string temp_binding_mode;
466  GetParamDef( "IntegralNucleonBindingMode", temp_binding_mode, std::string("UseNuclearModel") );
468 
469  // Get PauliBlocker for possible use in FullDifferentialXSec()
470  GetParamDef( "IntegralNucleonBindingMode", temp_binding_mode, std::string("UseNuclearModel") );
471  fPauliBlocker = dynamic_cast<const PauliBlocker*>( this->SubAlg("PauliBlockerAlg") );
472  assert( fPauliBlocker );
473 
474  // Decide whether or not it should be used in FullDifferentialXSec
475  GetParamDef( "DoPauliBlocking", fDoPauliBlocking, true );
476 }
double fXSecCCScale
external xsec scaling factor for CC
double fXSecNCScale
external xsec scaling factor for NC
Cross Section Integrator Interface.
bool fLFG
If the nuclear model is lfg alway average over nucleons.
void SetModel(const QELFormFactorsModelI *model)
Attach an algorithm.
Examines whether the generated event should be Pauli blocked. Is a concerete implementation of the Ev...
Definition: PauliBlocker.h:36
const NuclearModelI * fNuclModel
Pure abstract base class. Defines the NuclearModelI interface to be implemented by any physics model ...
Definition: NuclearModelI.h:46
bool fDoAvgOverNucleonMomentum
Average cross section over hit nucleon monentum?
virtual NuclearModel_t ModelType(const Target &) const =0
QELEvGen_BindingMode_t fIntegralNucleonBindingMode
const QELFormFactorsModelI * fFormFactorsModel
const XSecIntegratorI * fXSecIntegrator
Pure abstract base class. Defines the QELFormFactorsModelI interface to be implemented by any algorit...
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
Definition: Target.h:40
bool fDoPauliBlocking
Whether to apply Pauli blocking in FullDifferentialXSec.
string RgKey
QELEvGen_BindingMode_t StringToQELBindingMode(const std::string &mode_str)
Definition: QELUtils.cxx:194
double fCos8c2
cos^2(cabibbo angle)
bool GetParamDef(const RgKey &name, T &p, const T &def) const
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
const genie::PauliBlocker * fPauliBlocker
The PauliBlocker instance to use to apply that correction.
const Algorithm * SubAlg(const RgKey &registry_key) const
Definition: Algorithm.cxx:345
bool LwlynSmithQELCCPXSec::ValidProcess ( const Interaction i) const
virtual

Can this cross section algorithm handle the input process?

Implements genie::XSecAlgorithmI.

Definition at line 390 of file LwlynSmithQELCCPXSec.cxx.

References genie::Target::HitNucPdg(), genie::Interaction::InitState(), genie::pdg::IsAntiNeutrino(), genie::pdg::IsNeutrino(), genie::pdg::IsNeutron(), genie::pdg::IsProton(), genie::ProcessInfo::IsQuasiElastic(), genie::ProcessInfo::IsWeakCC(), genie::kISkipProcessChk, genie::InitialState::ProbePdg(), genie::Interaction::ProcInfo(), and genie::InitialState::Tgt().

Referenced by XSec().

391 {
392  if(interaction->TestBit(kISkipProcessChk)) return true;
393 
394  const InitialState & init_state = interaction->InitState();
395  const ProcessInfo & proc_info = interaction->ProcInfo();
396 
397  if(!proc_info.IsQuasiElastic()) return false;
398 
399  int nuc = init_state.Tgt().HitNucPdg();
400  int nu = init_state.ProbePdg();
401 
402  bool isP = pdg::IsProton(nuc);
403  bool isN = pdg::IsNeutron(nuc);
404  bool isnu = pdg::IsNeutrino(nu);
405  bool isnub = pdg::IsAntiNeutrino(nu);
406 
407  bool prcok = proc_info.IsWeakCC() && ((isP&&isnub) || (isN&&isnu));
408  if(!prcok) return false;
409 
410  return true;
411 }
bool IsWeakCC(void) const
bool IsNeutrino(int pdgc)
Definition: PDGUtils.cxx:110
int HitNucPdg(void) const
Definition: Target.cxx:304
bool IsQuasiElastic(void) const
Definition: ProcessInfo.cxx:69
bool IsNeutron(int pdgc)
Definition: PDGUtils.cxx:341
bool IsProton(int pdgc)
Definition: PDGUtils.cxx:336
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
Definition: ProcessInfo.h:46
bool IsAntiNeutrino(int pdgc)
Definition: PDGUtils.cxx:118
int ProbePdg(void) const
Definition: InitialState.h:64
const Target & Tgt(void) const
Definition: InitialState.h:66
const UInt_t kISkipProcessChk
if set, skip process validity checks
Definition: Interaction.h:47
Initial State information.
Definition: InitialState.h:48
double LwlynSmithQELCCPXSec::XSec ( const Interaction i,
KinePhaseSpace_t  k 
) const
virtual

Compute the cross section for the input interaction.

Implements genie::XSecAlgorithmI.

Definition at line 58 of file LwlynSmithQELCCPXSec.cxx.

References genie::units::A, genie::KinePhaseSpace::AsString(), genie::QELFormFactors::Calculate(), genie::QELFormFactors::F1V(), genie::QELFormFactors::FA(), fCos8c2, fFormFactors, genie::QELFormFactors::Fp(), genie::Interaction::FSPrimLepton(), FullDifferentialXSec(), fXSecCCScale, fXSecNCScale, genie::Target::HitNucMass(), genie::Target::HitNucPdg(), genie::pdg::IsNeutrino(), genie::pdg::IsProton(), genie::ProcessInfo::IsWeakCC(), genie::ProcessInfo::IsWeakNC(), genie::utils::mec::J(), genie::utils::kinematics::Jacobian(), genie::constants::kGF2, genie::kIAssumeFreeNucleon, genie::constants::kPi, genie::kPSQ2fE, genie::kPSQELEvGen, genie::kRfHitNucRest, LOG, genie::Target::N(), genie::utils::nuclear::NuclQELXSecSuppression(), pDEBUG, genie::InitialState::ProbeE(), genie::InitialState::ProbePdg(), genie::Interaction::ProcInfo(), pWARN, genie::Kinematics::q2(), genie::InitialState::Tgt(), genie::XSecAlgorithmI::ValidKinematics(), ValidProcess(), genie::QELFormFactors::xiF2V(), and genie::Target::Z().

60 {
61  if(! this -> ValidProcess (interaction) ) {LOG("LwlynSmith",pWARN) << "not a valid process"; return 0.;}
62  if(! this -> ValidKinematics (interaction) ) {LOG("LwlynSmith",pWARN) << "not valid kinematics"; return 0.;}
63 
64  // If computing the full differential cross section, then all four momentum
65  // four-vectors (probe, hit nucleon, final lepton, and final nucleon) should
66  // have been set already, with the hit nucleon off-shell as appropriate.
67  if (kps == kPSQELEvGen) {
68  return this->FullDifferentialXSec(interaction);
69  }
70 
71  // Get kinematics & init-state parameters
72  const Kinematics & kinematics = interaction -> Kine();
73  const InitialState & init_state = interaction -> InitState();
74  const Target & target = init_state.Tgt();
75 
76  double E = init_state.ProbeE(kRfHitNucRest);
77  double E2 = TMath::Power(E,2);
78  double ml = interaction->FSPrimLepton()->Mass();
79  double M = target.HitNucMass();
80  double q2 = kinematics.q2();
81 
82  // One of the xsec terms changes sign for antineutrinos
83  bool is_neutrino = pdg::IsNeutrino(init_state.ProbePdg());
84  int sign = (is_neutrino) ? -1 : 1;
85 
86  // Calculate the QEL form factors
87  fFormFactors.Calculate(interaction);
88 
89  double F1V = fFormFactors.F1V();
90  double xiF2V = fFormFactors.xiF2V();
91  double FA = fFormFactors.FA();
92  double Fp = fFormFactors.Fp();
93 
94 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
95  LOG("LwlynSmith", pDEBUG) << "\n" << fFormFactors;
96 #endif
97 
98  // Calculate auxiliary parameters
99  double ml2 = TMath::Power(ml, 2);
100  double M2 = TMath::Power(M, 2);
101  double M4 = TMath::Power(M2, 2);
102  double FA2 = TMath::Power(FA, 2);
103  double Fp2 = TMath::Power(Fp, 2);
104  double F1V2 = TMath::Power(F1V, 2);
105  double xiF2V2 = TMath::Power(xiF2V, 2);
106  double Gfactor = M2*kGF2*fCos8c2 / (8*kPi*E2);
107  double s_u = 4*E*M + q2 - ml2;
108  double q2_M2 = q2/M2;
109 
110  // Compute free nucleon differential cross section
111  double A = (0.25*(ml2-q2)/M2) * (
112  (4-q2_M2)*FA2 - (4+q2_M2)*F1V2 - q2_M2*xiF2V2*(1+0.25*q2_M2)
113  -4*q2_M2*F1V*xiF2V - (ml2/M2)*(
114  (F1V2+xiF2V2+2*F1V*xiF2V)+(FA2+4*Fp2+4*FA*Fp)+(q2_M2-4)*Fp2));
115  double B = -1 * q2_M2 * FA*(F1V+xiF2V);
116  double C = 0.25*(FA2 + F1V2 - 0.25*q2_M2*xiF2V2);
117 
118  double xsec = Gfactor * (A + sign*B*s_u/M2 + C*s_u*s_u/M4);
119 
120  // Apply given scaling factor
121  double xsec_scale = 1 ;
122  const ProcessInfo& proc_info = interaction->ProcInfo();
123 
124  if( proc_info.IsWeakCC() ) xsec_scale = fXSecCCScale;
125  else if( proc_info.IsWeakNC() ) xsec_scale = fXSecNCScale;
126  xsec *= xsec_scale ;
127 
128 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
129  LOG("LwlynSmith", pDEBUG)
130  << "dXSec[QEL]/dQ2 [FreeN](E = "<< E << ", Q2 = "<< -q2 << ") = "<< xsec;
131  LOG("LwlynSmith", pDEBUG)
132  << "A(Q2) = " << A << ", B(Q2) = " << B << ", C(Q2) = " << C;
133 #endif
134 
135  //----- The algorithm computes dxsec/dQ2
136  // Check whether variable tranformation is needed
137  if(kps!=kPSQ2fE) {
138  double J = utils::kinematics::Jacobian(interaction,kPSQ2fE,kps);
139 
140 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
141  LOG("LwlynSmith", pDEBUG)
142  << "Jacobian for transformation to: "
143  << KinePhaseSpace::AsString(kps) << ", J = " << J;
144 #endif
145  xsec *= J;
146  }
147 
148  //----- if requested return the free nucleon xsec even for input nuclear tgt
149  if( interaction->TestBit(kIAssumeFreeNucleon) ) return xsec;
150 
151  //----- compute nuclear suppression factor
152  // (R(Q2) is adapted from NeuGEN - see comments therein)
153  double R = nuclear::NuclQELXSecSuppression("Default", 0.5, interaction);
154 
155  //----- number of scattering centers in the target
156  int nucpdgc = target.HitNucPdg();
157  int NNucl = (pdg::IsProton(nucpdgc)) ? target.Z() : target.N();
158 
159 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
160  LOG("LwlynSmith", pDEBUG)
161  << "Nuclear suppression factor R(Q2) = " << R << ", NNucl = " << NNucl;
162 #endif
163 
164  xsec *= (R*NNucl); // nuclear xsec
165 
166  return xsec;
167 }
double FullDifferentialXSec(const Interaction *i) const
double fXSecCCScale
external xsec scaling factor for CC
bool IsWeakCC(void) const
double fXSecNCScale
external xsec scaling factor for NC
bool IsNeutrino(int pdgc)
Definition: PDGUtils.cxx:110
double J(double q0, double q3, double Enu, double ml)
Definition: MECUtils.cxx:147
int HitNucPdg(void) const
Definition: Target.cxx:304
double HitNucMass(void) const
Definition: Target.cxx:233
Generated/set kinematical variables for an event.
Definition: Kinematics.h:39
virtual bool ValidKinematics(const Interaction *i) const
Is the input kinematical point a physically allowed one?
double q2(bool selected=false) const
Definition: Kinematics.cxx:141
bool IsProton(int pdgc)
Definition: PDGUtils.cxx:336
bool IsWeakNC(void) const
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
static constexpr double A
Definition: Units.h:74
static string AsString(KinePhaseSpace_t kps)
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
Definition: ProcessInfo.h:46
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
Definition: Target.h:40
int ProbePdg(void) const
Definition: InitialState.h:64
int Z(void) const
Definition: Target.h:68
double xiF2V(void) const
Get the computed form factor xi*F2V.
#define pWARN
Definition: Messenger.h:60
void Calculate(const Interaction *interaction)
Compute the form factors for the input interaction using the attached model.
int N(void) const
Definition: Target.h:69
const UInt_t kIAssumeFreeNucleon
Definition: Interaction.h:49
bool ValidProcess(const Interaction *i) const
Can this cross section algorithm handle the input process?
double fCos8c2
cos^2(cabibbo angle)
double Jacobian(const Interaction *const i, KinePhaseSpace_t f, KinePhaseSpace_t t)
Definition: KineUtils.cxx:130
double F1V(void) const
Get the computed form factor F1V.
const Target & Tgt(void) const
Definition: InitialState.h:66
double Fp(void) const
Get the computed form factor Fp.
double ProbeE(RefFrame_t rf) const
double FA(void) const
Get the computed form factor FA.
double NuclQELXSecSuppression(string kftable, double pmax, const Interaction *in)
Initial State information.
Definition: InitialState.h:48
#define pDEBUG
Definition: Messenger.h:63

Member Data Documentation

double genie::LwlynSmithQELCCPXSec::fCos8c2
private

cos^2(cabibbo angle)

Definition at line 62 of file LwlynSmithQELCCPXSec.h.

Referenced by FullDifferentialXSec(), LoadConfig(), and XSec().

bool genie::LwlynSmithQELCCPXSec::fDoAvgOverNucleonMomentum
private

Average cross section over hit nucleon monentum?

Definition at line 71 of file LwlynSmithQELCCPXSec.h.

Referenced by Integral(), and LoadConfig().

bool genie::LwlynSmithQELCCPXSec::fDoPauliBlocking
private

Whether to apply Pauli blocking in FullDifferentialXSec.

Definition at line 80 of file LwlynSmithQELCCPXSec.h.

Referenced by FullDifferentialXSec(), and LoadConfig().

double genie::LwlynSmithQELCCPXSec::fEnergyCutOff
private

Average only for energies below this cutoff defining the region where nuclear modeling details do matter

Definition at line 72 of file LwlynSmithQELCCPXSec.h.

Referenced by Integral(), and LoadConfig().

QELFormFactors genie::LwlynSmithQELCCPXSec::fFormFactors
mutableprivate

Definition at line 59 of file LwlynSmithQELCCPXSec.h.

Referenced by FullDifferentialXSec(), LoadConfig(), and XSec().

const QELFormFactorsModelI* genie::LwlynSmithQELCCPXSec::fFormFactorsModel
private

Definition at line 60 of file LwlynSmithQELCCPXSec.h.

Referenced by LoadConfig().

QELEvGen_BindingMode_t genie::LwlynSmithQELCCPXSec::fIntegralNucleonBindingMode
private

Enum specifying the method to use when calculating the binding energy of the initial hit nucleon during spline generation

Definition at line 77 of file LwlynSmithQELCCPXSec.h.

Referenced by LoadConfig().

bool genie::LwlynSmithQELCCPXSec::fLFG
private

If the nuclear model is lfg alway average over nucleons.

Definition at line 70 of file LwlynSmithQELCCPXSec.h.

Referenced by Integral(), and LoadConfig().

const NuclearModelI* genie::LwlynSmithQELCCPXSec::fNuclModel
private

Definition at line 69 of file LwlynSmithQELCCPXSec.h.

Referenced by Integral(), and LoadConfig().

const genie::PauliBlocker* genie::LwlynSmithQELCCPXSec::fPauliBlocker
private

The PauliBlocker instance to use to apply that correction.

Definition at line 82 of file LwlynSmithQELCCPXSec.h.

Referenced by FullDifferentialXSec(), and LoadConfig().

double genie::LwlynSmithQELCCPXSec::fXSecCCScale
private

external xsec scaling factor for CC

Definition at line 64 of file LwlynSmithQELCCPXSec.h.

Referenced by FullDifferentialXSec(), LoadConfig(), and XSec().

double genie::LwlynSmithQELCCPXSec::fXSecEMScale
private

external xsec scaling factor for EM

Definition at line 66 of file LwlynSmithQELCCPXSec.h.

const XSecIntegratorI* genie::LwlynSmithQELCCPXSec::fXSecIntegrator
private

Definition at line 61 of file LwlynSmithQELCCPXSec.h.

Referenced by Integral(), and LoadConfig().

double genie::LwlynSmithQELCCPXSec::fXSecNCScale
private

external xsec scaling factor for NC

Definition at line 65 of file LwlynSmithQELCCPXSec.h.

Referenced by FullDifferentialXSec(), LoadConfig(), and XSec().


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