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

Implementation of the Alvarez-Ruso coherent pion production model. More...

#include <AlvarezRusoCOHPiPXSec.h>

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

Public Member Functions

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

Private Attributes

const XSecIntegratorIfXSecIntegrator
 
alvarezruso::AlvarezRusoCOHPiPDXSecfMultidiff
 
const InteractionfLastInteraction
 

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

Implementation of the Alvarez-Ruso coherent pion production model.

      Is a concrete implementation of the XSecAlgorithmI interface.
References:
Author
Steve Dennis University of Warwick, Rutherford Appleton Laboratory
Created:
October 5, 2012
License:
Copyright (c) 2003-2024, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org

Definition at line 33 of file AlvarezRusoCOHPiPXSec.h.

Constructor & Destructor Documentation

AlvarezRusoCOHPiPXSec::AlvarezRusoCOHPiPXSec ( )

Definition at line 41 of file AlvarezRusoCOHPiPXSec.cxx.

References fLastInteraction, and fMultidiff.

41  :
42 XSecAlgorithmI("genie::AlvarezRusoCOHPiPXSec")
43 {
44  fMultidiff = NULL;
45  fLastInteraction = NULL;
46 }
const Interaction * fLastInteraction
alvarezruso::AlvarezRusoCOHPiPDXSec * fMultidiff
AlvarezRusoCOHPiPXSec::AlvarezRusoCOHPiPXSec ( string  config)

Definition at line 48 of file AlvarezRusoCOHPiPXSec.cxx.

References fLastInteraction, and fMultidiff.

48  :
49 XSecAlgorithmI("genie::AlvarezRusoCOHPiPXSec", config)
50 {
51  fMultidiff = NULL;
52  fLastInteraction = NULL;
53 }
const Interaction * fLastInteraction
alvarezruso::AlvarezRusoCOHPiPDXSec * fMultidiff
AlvarezRusoCOHPiPXSec::~AlvarezRusoCOHPiPXSec ( )
virtual

Definition at line 55 of file AlvarezRusoCOHPiPXSec.cxx.

References fMultidiff.

56 {
57  if (fMultidiff) delete fMultidiff;
58 }
alvarezruso::AlvarezRusoCOHPiPDXSec * fMultidiff

Member Function Documentation

void AlvarezRusoCOHPiPXSec::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 156 of file AlvarezRusoCOHPiPXSec.cxx.

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

157 {
158  Algorithm::Configure(config);
159  this->LoadConfig();
160 }
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
void AlvarezRusoCOHPiPXSec::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 162 of file AlvarezRusoCOHPiPXSec.cxx.

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

163 {
164  Algorithm::Configure(config);
165  this->LoadConfig();
166 }
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
double AlvarezRusoCOHPiPXSec::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 131 of file AlvarezRusoCOHPiPXSec.cxx.

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

132 {
133  double xsec = fXSecIntegrator->Integrate(this,interaction);
134  return xsec;
135 }
const XSecIntegratorI * fXSecIntegrator
virtual double Integrate(const XSecAlgorithmI *model, const Interaction *interaction) const =0
void AlvarezRusoCOHPiPXSec::LoadConfig ( void  )
private

Definition at line 168 of file AlvarezRusoCOHPiPXSec.cxx.

References fXSecIntegrator, and genie::Algorithm::SubAlg().

Referenced by Configure().

169 {
170  //AlgConfigPool * confp = AlgConfigPool::Instance();
171  //const Registry * gc = confp->GlobalParameterList();
172 
173  /*fRo = fConfig->GetDoubleDef("COH-Ro", gc->GetDouble("COH-Ro"));
174  fMa = fConfig->GetDoubleDef("Ma", gc->GetDouble("COH-Ma"));
175  fa4 = fConfig->GetDoubleDef("a4", gc->GetDouble("COHAR-a4"));
176  fa5 = fConfig->GetDoubleDef("a5", gc->GetDouble("COHAR-a5"));
177  fb4 = fConfig->GetDoubleDef("b4", gc->GetDouble("COHAR-b4"));
178  fb5 = fConfig->GetDoubleDef("b5", gc->GetDouble("COHAR-b5"));
179  ffPi = fConfig->GetDoubleDef("fPi", gc->GetDouble("COHAR-fPi"));
180  ffStar = fConfig->GetDoubleDef("fStar", gc->GetDouble("COHAR-fStar"));*/
181 
182 
183  //-- load the differential cross section integrator
185  dynamic_cast<const XSecIntegratorI *> (this->SubAlg("XSec-Integrator"));
186  assert(fXSecIntegrator);
187 
188 }
Cross Section Integrator Interface.
const XSecIntegratorI * fXSecIntegrator
const Algorithm * SubAlg(const RgKey &registry_key) const
Definition: Algorithm.cxx:345
bool AlvarezRusoCOHPiPXSec::ValidProcess ( const Interaction i) const
virtual

Can this cross section algorithm handle the input process?

Implements genie::XSecAlgorithmI.

Definition at line 137 of file AlvarezRusoCOHPiPXSec.cxx.

References genie::Target::A(), genie::Target::HitNucIsSet(), genie::Interaction::InitState(), genie::pdg::IsAntiNeutrino(), genie::ProcessInfo::IsCoherentProduction(), genie::pdg::IsNeutrino(), genie::ProcessInfo::IsWeak(), genie::kISkipProcessChk, genie::InitialState::ProbePdg(), genie::Interaction::ProcInfo(), and genie::InitialState::Tgt().

Referenced by XSec().

138 {
139  if(interaction->TestBit(kISkipProcessChk)) return true;
140 
141  const InitialState & init_state = interaction->InitState();
142  const ProcessInfo & proc_info = interaction->ProcInfo();
143  const Target & target = init_state.Tgt();
144 
145  int nu = init_state.ProbePdg();
146 
147  if (!proc_info.IsCoherentProduction()) return false;
148  if (!proc_info.IsWeak()) return false;
149  if (target.HitNucIsSet()) return false;
150  if (!(target.A()>1)) return false;
151  if (!pdg::IsNeutrino(nu) && !pdg::IsAntiNeutrino(nu)) return false;
152 
153  return true;
154 }
bool IsWeak(void) const
bool IsNeutrino(int pdgc)
Definition: PDGUtils.cxx:110
int A(void) const
Definition: Target.h:70
bool IsCoherentProduction(void) const
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
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
bool HitNucIsSet(void) const
Definition: Target.cxx:283
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 AlvarezRusoCOHPiPXSec::XSec ( const Interaction i,
KinePhaseSpace_t  k 
) const
virtual

Compute the cross section for the input interaction.

Implements genie::XSecAlgorithmI.

Definition at line 60 of file AlvarezRusoCOHPiPXSec.cxx.

References genie::Target::A(), genie::units::A, genie::units::cm2, genie::alvarezruso::AlvarezRusoCOHPiPDXSec::DXSec(), fLastInteraction, fMultidiff, genie::Kinematics::FSLeptonP4(), genie::Kinematics::HadSystP4(), genie::ProcessInfo::IsWeakCC(), genie::ProcessInfo::IsWeakNC(), genie::utils::kinematics::Jacobian(), genie::alvarezruso::kAntiNu, genie::alvarezruso::kCC, genie::alvarezruso::kE, genie::alvarezruso::kMu, genie::alvarezruso::kNC, genie::alvarezruso::kNu, genie::kPSElOlOpifE, genie::kRfLab, genie::alvarezruso::kTau, LOG, pDEBUG, genie::InitialState::ProbeE(), genie::InitialState::ProbePdg(), genie::Interaction::ProcInfo(), genie::InitialState::Tgt(), genie::XSecAlgorithmI::ValidKinematics(), ValidProcess(), and genie::Target::Z().

62 {
63  if(! this -> ValidProcess (interaction) ) return 0.;
64  if(! this -> ValidKinematics (interaction) ) return 0.;
65 
66  const Kinematics & kinematics = interaction -> Kine();
67  const InitialState & init_state = interaction -> InitState();
68 
69  int A = init_state.Tgt().A(); // mass number
70  int Z = init_state.Tgt().Z(); // atomic number
71  double E_nu = init_state.ProbeE(kRfLab); // neutrino energy
72 
73  const TLorentzVector p4_lep = kinematics.FSLeptonP4();
74  const TLorentzVector p4_pi = kinematics.HadSystP4();
75  double E_lep = p4_lep.E();
76 
77  if (fLastInteraction!=interaction) {
78  if (fMultidiff != NULL) {
79  delete fMultidiff;
80  fMultidiff = NULL;
81  }
82 
83  current_t current;
84  if ( interaction->ProcInfo().IsWeakCC() ) {
85  current = kCC;
86  }
87  else if ( interaction->ProcInfo().IsWeakNC() ) {
88  current = kNC;
89  }
90  else {
91  LOG("AlvarezRusoCohPi",pDEBUG)<<"Unknown current for AlvarezRuso implementation";
92  return 0.;
93  }
94 
95  flavour_t flavour;
96  if ( init_state.ProbePdg() == 12 || init_state.ProbePdg() == -12) {
97  flavour=kE;
98  }
99  else if ( init_state.ProbePdg() == 14 || init_state.ProbePdg() == -14) {
100  flavour=kMu;
101  }
102  else if ( init_state.ProbePdg() == 16 || init_state.ProbePdg() == -16) {
103  flavour=kTau;
104  }
105  else {
106  LOG("AlvarezRusoCohPi",pDEBUG)<<"Unknown probe for AlvarezRuso implementation";
107  return 0.;
108  }
109 
110  nutype_t nutype;
111  if ( init_state.ProbePdg() > 0) {
112  nutype = kNu;
113  } else {
114  nutype = kAntiNu;
115  }
116 
117  fMultidiff = new AlvarezRusoCOHPiPDXSec(Z, A ,current, flavour, nutype);
118  fLastInteraction = interaction;
119  }
120 
121  double xsec = fMultidiff->DXSec(E_nu, E_lep, p4_lep.Theta(), p4_lep.Phi(), p4_pi.Theta(), p4_pi.Phi());
122  xsec = xsec * 1E-38 * units::cm2;
123 
124  if (kps != kPSElOlOpifE) {
125  xsec *= utils::kinematics::Jacobian(interaction, kPSElOlOpifE, kps );
126  }
127 
128  return (xsec);
129 }
int A(void) const
Definition: Target.h:70
Generated/set kinematical variables for an event.
Definition: Kinematics.h:39
const TLorentzVector & HadSystP4(void) const
Definition: Kinematics.h:66
virtual bool ValidKinematics(const Interaction *i) const
Is the input kinematical point a physically allowed one?
const TLorentzVector & FSLeptonP4(void) const
Definition: Kinematics.h:65
double DXSec(const double E_nu_, const double E_l_, const double theta_l_, const double phi_l_, const double theta_pi_, const double phi_pi_)
#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
bool ValidProcess(const Interaction *i) const
Can this cross section algorithm handle the input process?
int ProbePdg(void) const
Definition: InitialState.h:64
int Z(void) const
Definition: Target.h:68
double Jacobian(const Interaction *const i, KinePhaseSpace_t f, KinePhaseSpace_t t)
Definition: KineUtils.cxx:130
const Target & Tgt(void) const
Definition: InitialState.h:66
double ProbeE(RefFrame_t rf) const
const Interaction * fLastInteraction
alvarezruso::AlvarezRusoCOHPiPDXSec * fMultidiff
Initial State information.
Definition: InitialState.h:48
#define pDEBUG
Definition: Messenger.h:63

Member Data Documentation

const Interaction* genie::AlvarezRusoCOHPiPXSec::fLastInteraction
mutableprivate

Definition at line 58 of file AlvarezRusoCOHPiPXSec.h.

Referenced by AlvarezRusoCOHPiPXSec(), and XSec().

alvarezruso::AlvarezRusoCOHPiPDXSec* genie::AlvarezRusoCOHPiPXSec::fMultidiff
mutableprivate

Definition at line 57 of file AlvarezRusoCOHPiPXSec.h.

Referenced by AlvarezRusoCOHPiPXSec(), XSec(), and ~AlvarezRusoCOHPiPXSec().

const XSecIntegratorI* genie::AlvarezRusoCOHPiPXSec::fXSecIntegrator
private

Definition at line 55 of file AlvarezRusoCOHPiPXSec.h.

Referenced by Integral(), and LoadConfig().


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