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::PattonCEvNSPXSec Class Reference

Differential cross section for v+As coherent elastic scattering. Is a concrete implementation of the XSecAlgorithmI interface. More...

#include <PattonCEvNSPXSec.h>

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

Public Member Functions

 PattonCEvNSPXSec ()
 
 PattonCEvNSPXSec (string config)
 
virtual ~PattonCEvNSPXSec ()
 
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

void LoadConfig (void)
 
double NuclearDensityMoment (int A, int k) const
 

Private Attributes

const XSecIntegratorIfXSecIntegrator
 cross section integrator More...
 
double fSin2thw
 sin^2(weinberg angle) More...
 
double fNuclDensMomentCalc_UpperIntegrationLimit
 
double fNuclDensMomentCalc_RelativeTolerance
 
double fNuclDensMomentCalc_AbsoluteTolerance
 
int fNuclDensMomentCalc_MaxNumOfEvaluations
 

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

Differential cross section for v+As coherent elastic scattering. Is a concrete implementation of the XSecAlgorithmI interface.

References:
K.Patton, J.Engel, G.McLaughlin, and N.Schunck, arXiv:1207.0693v1
Author
Costas Andreopoulos <c.andreopoulos cern.ch> University of Liverpool
Created:
July 12, 2019
License:
Copyright (c) 2003-2024, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org

Definition at line 30 of file PattonCEvNSPXSec.h.

Constructor & Destructor Documentation

PattonCEvNSPXSec::PattonCEvNSPXSec ( )

Definition at line 34 of file PattonCEvNSPXSec.cxx.

34  :
35 XSecAlgorithmI("genie::PattonCEvNSPXSec")
36 {
37 
38 }
PattonCEvNSPXSec::PattonCEvNSPXSec ( string  config)

Definition at line 40 of file PattonCEvNSPXSec.cxx.

40  :
41 XSecAlgorithmI("genie::PattonCEvNSPXSec", config)
42 {
43 
44 }
PattonCEvNSPXSec::~PattonCEvNSPXSec ( )
virtual

Definition at line 46 of file PattonCEvNSPXSec.cxx.

47 {
48 
49 }

Member Function Documentation

void PattonCEvNSPXSec::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 209 of file PattonCEvNSPXSec.cxx.

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

210 {
211  Algorithm::Configure(config);
212  this->LoadConfig();
213 }
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
void PattonCEvNSPXSec::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 215 of file PattonCEvNSPXSec.cxx.

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

216 {
217  Algorithm::Configure(config);
218  this->LoadConfig();
219 }
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
double PattonCEvNSPXSec::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 189 of file PattonCEvNSPXSec.cxx.

References fXSecIntegrator, and genie::XSecIntegratorI::Integrate().

190 {
191  double xsec = fXSecIntegrator->Integrate(this,interaction);
192  return xsec;
193 }
const XSecIntegratorI * fXSecIntegrator
cross section integrator
virtual double Integrate(const XSecAlgorithmI *model, const Interaction *interaction) const =0
void PattonCEvNSPXSec::LoadConfig ( void  )
private

Definition at line 221 of file PattonCEvNSPXSec.cxx.

References fNuclDensMomentCalc_AbsoluteTolerance, fNuclDensMomentCalc_MaxNumOfEvaluations, fNuclDensMomentCalc_RelativeTolerance, fNuclDensMomentCalc_UpperIntegrationLimit, fSin2thw, fXSecIntegrator, genie::Algorithm::GetParam(), genie::Algorithm::GetParamDef(), and genie::Algorithm::SubAlg().

Referenced by Configure().

222 {
223  double thw = 0.;
224  this->GetParam("WeinbergAngle", thw);
225  fSin2thw = TMath::Power(TMath::Sin(thw), 2.);
226 
227  this->GetParamDef(
228  "nuclear-density-moment-gsl-upper-limit",
230  10.); // in nuclear radii
231  this->GetParamDef(
232  "nuclear-density-moment-gsl-rel-tol",
234  1E-3);
235  this->GetParamDef(
236  "nuclear-density-moment-gsl-abs-tol",
238  1.);
239  this->GetParamDef(
240  "nuclear-density-moment-gsl-max-eval",
242  10000);
243 
245  dynamic_cast<const XSecIntegratorI *> (this->SubAlg("XSec-Integrator"));
246  assert(fXSecIntegrator);
247 }
double fNuclDensMomentCalc_AbsoluteTolerance
Cross Section Integrator Interface.
double fNuclDensMomentCalc_RelativeTolerance
const XSecIntegratorI * fXSecIntegrator
cross section integrator
double fSin2thw
sin^2(weinberg angle)
double fNuclDensMomentCalc_UpperIntegrationLimit
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 Algorithm * SubAlg(const RgKey &registry_key) const
Definition: Algorithm.cxx:345
double PattonCEvNSPXSec::NuclearDensityMoment ( int  A,
int  k 
) const
private

Definition at line 154 of file PattonCEvNSPXSec.cxx.

References fNuclDensMomentCalc_AbsoluteTolerance, fNuclDensMomentCalc_MaxNumOfEvaluations, fNuclDensMomentCalc_RelativeTolerance, fNuclDensMomentCalc_UpperIntegrationLimit, genie::utils::gsl::Integration1DimTypeFromString(), genie::constants::kPi, and genie::utils::nuclear::Radius().

Referenced by XSec().

155 {
156  // Calculate moments of the nuclear density
157  // Inputs:
158  // - atomic mass number, A
159  // - integer k specifying required nuclear density moment
160  // Output:
161  // - nuclear density moment in units of fm^k
162  //
163  // THINGS TO DO:
164  // 1) The calculation can be stored, as it is required only once per nucleus.
165  // The calculation is very fast so it doesn't matter.
166 
167  ROOT::Math::IBaseFunctionOneDim * integrand = new
169 
170  ROOT::Math::IntegrationOneDim::Type ig_type =
172 
173  double R0 = utils::nuclear::Radius(A); // units: fm
174  double rmin = 0; // units: fm
175  double rmax = fNuclDensMomentCalc_UpperIntegrationLimit * R0; // units: fm
176 
177  ROOT::Math::Integrator ig(
178  *integrand,ig_type,
182  double moment = 2 * constants::kPi * ig.Integral(rmin, rmax); // units: fm^k
183 
184  delete integrand;
185 
186  return moment;
187 }
ROOT::Math::IntegrationOneDim::Type Integration1DimTypeFromString(string type)
Definition: GSLUtils.cxx:23
double fNuclDensMomentCalc_AbsoluteTolerance
double fNuclDensMomentCalc_RelativeTolerance
double Radius(int A, double Ro=constants::kNucRo)
static constexpr double A
Definition: Units.h:74
double fNuclDensMomentCalc_UpperIntegrationLimit
Integrand for the calculation of the k^th nuclear density moment: {0}^{} {A}(r) r^k d^{3}r where {A}(...
bool PattonCEvNSPXSec::ValidProcess ( const Interaction i) const
virtual

Can this cross section algorithm handle the input process?

Implements genie::XSecAlgorithmI.

Definition at line 195 of file PattonCEvNSPXSec.cxx.

References genie::Interaction::InitState(), genie::ProcessInfo::IsCoherentElastic(), genie::Target::IsNucleus(), genie::kISkipProcessChk, genie::Interaction::ProcInfo(), and genie::InitialState::Tgt().

Referenced by XSec().

196 {
197  if(interaction->TestBit(kISkipProcessChk)) return true;
198 
199  const ProcessInfo & proc_info = interaction->ProcInfo();
200  if(!proc_info.IsCoherentElastic()) return false;
201 
202  const InitialState & init_state = interaction->InitState();
203  const Target & target = init_state.Tgt();
204  if(!target.IsNucleus()) return false;
205 
206  return true;
207 }
bool IsNucleus(void) const
Definition: Target.cxx:272
bool IsCoherentElastic(void) const
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
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 PattonCEvNSPXSec::XSec ( const Interaction i,
KinePhaseSpace_t  k 
) const
virtual

Compute the cross section for the input interaction.

Implements genie::XSecAlgorithmI.

Definition at line 51 of file PattonCEvNSPXSec.cxx.

References genie::units::A, genie::units::cm2, genie::PDGLibrary::Find(), genie::units::fm, fSin2thw, genie::PDGLibrary::Instance(), genie::pdg::IonPdgCode(), genie::utils::mec::J(), genie::constants::kGF2, genie::constants::kPi, genie::kPSQ2fE, genie::kPSTAfE, genie::kRfLab, LOG, genie::Target::N(), NuclearDensityMoment(), pDEBUG, pINFO, genie::InitialState::ProbeE(), genie::Kinematics::Q2(), genie::utils::kinematics::Q2(), genie::InitialState::Tgt(), genie::XSecAlgorithmI::ValidKinematics(), ValidProcess(), and genie::Target::Z().

53 {
54  if(! this -> ValidProcess (interaction) ) return 0.;
55  if(! this -> ValidKinematics (interaction) ) return 0.;
56 
57  const InitialState & init_state = interaction -> InitState();
58  const Kinematics & kinematics = interaction -> Kine();
59  const Target & target = init_state.Tgt();
60 
61  // User inputs to the calculation
62  double E = init_state.ProbeE(kRfLab); // neutrino energy, units: GeV
63  double Q2 = kinematics.Q2(); // momentum transfer, units: GeV^2
64  int Z = target.Z(); // number of protons
65  int N = target.N(); // number of nucleons
66 
67  // Target atomic mass number and mass calculated from inputs
68  int A = Z+N;
69  int target_nucleus_pdgc = pdg::IonPdgCode(A,Z);
70  double M = PDGLibrary::Instance()->Find(target_nucleus_pdgc)->Mass(); // units: GeV
71  LOG("CEvNS", pDEBUG) << "M = " << M << " GeV";
72 
73  // Calculation of nuclear recoil kinetic energy computed from input Q2
74  double TA = Q2*E / (2*E*M+Q2); // nuclear recoil kinetic energy
75 
76  LOG("CEvNS", pDEBUG)
77  << "Q2 = " << Q2 << " GeV^2, E = " << E << " GeV "
78  << "--> TA = " << TA << " GeV";
79 
80  // auxiliary variables
81  double E2 = E*E;
82  double TA2 = TA*TA;
83  double Q4 = Q2*Q2;
84  double Q6 = Q2*Q4;
85 
86  // Calculation of weak charge
87  // double Qw = N - Z*(1-fSin2thw);
88  // Qw^2/4 x-section factor in arXiv:1207.0693v1 not needed here.
89  // 1/4 was absorbed in the constant front factor (below) and Qw^2 factor would
90  // have cancelled with ignored 1/Qw factor in the form factor F.
91 
92  // Calculation of nuclear density moments used for the evaluation
93  // of the neutron form factor
94  double avg_density = this->NuclearDensityMoment(A, 0); // units:: fm^-3
95  double Rn2 = this->NuclearDensityMoment(A, 2) / avg_density; // units: fm^2
96  double Rn4 = this->NuclearDensityMoment(A, 4) / avg_density; // units: fm^4
97  double Rn6 = this->NuclearDensityMoment(A, 6) / avg_density; // units: fm^6
98 
99  LOG("CEvNS", pDEBUG)
100  << "Nuclear density moments:"
101  << " <Rn^2> = " << Rn2 << " fm^2,"
102  << " <Rn^4> = " << Rn4 << " fm^4,"
103  << " <Rn^6> = " << Rn6 << " fm^6";
104 
105  Rn2 *= TMath::Power(units::fm, 2.); // units: GeV^-2
106  Rn4 *= TMath::Power(units::fm, 4.); // units: GeV^-4
107  Rn6 *= TMath::Power(units::fm, 6.); // units: GeV^-6
108 
109  // Calculation of proton form factor
110  // Form factor is neglected since it is multiplied with a small factor 1-4sin^2(\theta_{w})
111  double Fp = 0; // units: -
112  // Calculation of neutron form factor
113  // Using a Taylor expansion of sin(Qr) and keeping the first three terms (shown to be
114  // sufficient for approximating the full Fn calculation, even for heavy nuclei)
115  double Fn = N * (1 - Q2*Rn2/6. + Q4*Rn4/120. - Q6*Rn6/5040.); // units: -
116  // Overall form factor
117  double F = (Fn - (1-4*fSin2thw)*Fp); // units: -
118  F = TMath::Max(0.,F);
119  double F2 = F*F; // units: -
120 
121  LOG("CEvNS", pDEBUG)
122  << "Form factors: Fp = " << Fp << ", Fn = " << Fn << ", F = " << F;
123 
124  // dsig/dTA calculation
125  double const_factor = 0.125*kGF2/kPi; // units: GeV^-4
126  double kinematic_term = M * (2 - 2*TA/E + TA2/E2 - M*TA/E2); // units: GeV
127  kinematic_term = TMath::Max(0., kinematic_term);
128 
129  LOG("CEvNS", pDEBUG)
130  << "kinematic term: " << kinematic_term;
131 
132  double xsec = const_factor * kinematic_term * F2; // units: GeV^-3 (area/GeV)
133 
134  LOG("CEvNS", pINFO)
135  << "dsig[vA,CEvNS]/dTA (Ev = "
136  << E << " GeV, Q2 = "<< Q2 << " GeV^2; TA = " << TA << " GeV) = "
137  << xsec/(units::cm2) << " cm^2/GeV";
138 
139  // The algorithm computes dxsec/dTA
140  // Check whether variable tranformation is needed
141  if(kps!=kPSTAfE) {
142  // TODO: Move the calculation in utils::kinematics
143  // double J = utils::kinematics::Jacobian(interaction,kPSQ2fE,kps);
144  double J = 0;
145  if(kps==kPSQ2fE) {
146  J = 2*E2*M / TMath::Power(2*E*M+Q2, 2.); // units: GeV^-1
147  }
148  xsec *= J; // units: GeV^-4 (area/GeV^2)
149  }
150 
151  return xsec;
152 }
double J(double q0, double q3, double Enu, double ml)
Definition: MECUtils.cxx:147
bool ValidProcess(const Interaction *i) const
Can this cross section algorithm handle the input process?
double Q2(const Interaction *const i)
Definition: KineUtils.cxx:1077
Generated/set kinematical variables for an event.
Definition: Kinematics.h:39
double NuclearDensityMoment(int A, int k) const
virtual bool ValidKinematics(const Interaction *i) const
Is the input kinematical point a physically allowed one?
#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 constexpr double cm2
Definition: Units.h:69
double fSin2thw
sin^2(weinberg angle)
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
#define pINFO
Definition: Messenger.h:62
int N(void) const
Definition: Target.h:69
static PDGLibrary * Instance(void)
Definition: PDGLibrary.cxx:68
int IonPdgCode(int A, int Z)
Definition: PDGUtils.cxx:71
static constexpr double fm
Definition: Units.h:75
TParticlePDG * Find(int pdgc, bool must_exist=true)
Definition: PDGLibrary.cxx:86
double Q2(bool selected=false) const
Definition: Kinematics.cxx:125
const Target & Tgt(void) const
Definition: InitialState.h:66
double ProbeE(RefFrame_t rf) const
Initial State information.
Definition: InitialState.h:48
#define pDEBUG
Definition: Messenger.h:63

Member Data Documentation

double genie::PattonCEvNSPXSec::fNuclDensMomentCalc_AbsoluteTolerance
private

Definition at line 60 of file PattonCEvNSPXSec.h.

Referenced by LoadConfig(), and NuclearDensityMoment().

int genie::PattonCEvNSPXSec::fNuclDensMomentCalc_MaxNumOfEvaluations
private

Definition at line 61 of file PattonCEvNSPXSec.h.

Referenced by LoadConfig(), and NuclearDensityMoment().

double genie::PattonCEvNSPXSec::fNuclDensMomentCalc_RelativeTolerance
private

Definition at line 59 of file PattonCEvNSPXSec.h.

Referenced by LoadConfig(), and NuclearDensityMoment().

double genie::PattonCEvNSPXSec::fNuclDensMomentCalc_UpperIntegrationLimit
private

Definition at line 58 of file PattonCEvNSPXSec.h.

Referenced by LoadConfig(), and NuclearDensityMoment().

double genie::PattonCEvNSPXSec::fSin2thw
private

sin^2(weinberg angle)

Definition at line 55 of file PattonCEvNSPXSec.h.

Referenced by LoadConfig(), and XSec().

const XSecIntegratorI* genie::PattonCEvNSPXSec::fXSecIntegrator
private

cross section integrator

Definition at line 54 of file PattonCEvNSPXSec.h.

Referenced by Integral(), and LoadConfig().


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