GENIEGenerator
Loading...
Searching...
No Matches
genie::AlvarezRusoCOHPiPXSec Class Reference

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

#include <AlvarezRusoCOHPiPXSec.h>

Inheritance diagram for genie::AlvarezRusoCOHPiPXSec:
[legend]
Collaboration diagram for genie::AlvarezRusoCOHPiPXSec:
[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.
double Integral (const Interaction *i) const
bool ValidProcess (const Interaction *i) const
 Can this cross section algorithm handle the input process?
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?
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.
virtual AlgStatus_t GetStatus (void) const
 Get algorithm status.
virtual bool AllowReconfig (void) const
virtual AlgCmp_t Compare (const Algorithm *alg) const
 Compare with input algorithm.
virtual void SetId (const AlgId &id)
 Set algorithm ID.
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.

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.
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.
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.
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
int AddLowRegistry (Registry *rp, bool owns=true)
 add registry with lowest priority, also update ownership
int MergeTopRegistry (const Registry &r)
int AddTopRegisties (const vector< Registry * > &rs, bool owns=false)
 Add registries with top priority, also udated Ownerships.
Protected Attributes inherited from genie::Algorithm
bool fAllowReconfig
bool fOwnsSubstruc
 true if it owns its substructure (sub-algs,...)
AlgId fID
 algorithm name and configuration set
vector< Registry * > fConfVect
vector< bool > fOwnerships
 ownership for every registry in fConfVect
AlgStatus_t fStatus
 algorithm execution status
AlgMapfOwnedSubAlgMp
 local pool for owned sub-algs (taken out of the factory pool)

Detailed Description

Implementation of the Alvarez-Ruso coherent pion production model.

     Is a concrete implementation of the XSecAlgorithmI interface.
References:\n
Author
Steve Dennis University of Warwick, Rutherford Appleton Laboratory
Created:\n October 5, 2012
License:\n Copyright (c) 2003-2025, 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() [1/2]

AlvarezRusoCOHPiPXSec::AlvarezRusoCOHPiPXSec ( )

Definition at line 41 of file AlvarezRusoCOHPiPXSec.cxx.

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

References fLastInteraction, fMultidiff, and genie::XSecAlgorithmI::XSecAlgorithmI().

◆ AlvarezRusoCOHPiPXSec() [2/2]

AlvarezRusoCOHPiPXSec::AlvarezRusoCOHPiPXSec ( string config)

Definition at line 48 of file AlvarezRusoCOHPiPXSec.cxx.

48 :
49XSecAlgorithmI("genie::AlvarezRusoCOHPiPXSec", config)
50{
51 fMultidiff = NULL;
52 fLastInteraction = NULL;
53}

References fLastInteraction, fMultidiff, and genie::XSecAlgorithmI::XSecAlgorithmI().

◆ ~AlvarezRusoCOHPiPXSec()

AlvarezRusoCOHPiPXSec::~AlvarezRusoCOHPiPXSec ( )
virtual

Definition at line 55 of file AlvarezRusoCOHPiPXSec.cxx.

56{
57 if (fMultidiff) delete fMultidiff;
58}

References fMultidiff.

Member Function Documentation

◆ Configure() [1/2]

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.

157{
158 Algorithm::Configure(config);
159 this->LoadConfig();
160}
virtual void Configure(const Registry &config)
Definition Algorithm.cxx:62

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

◆ Configure() [2/2]

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.

163{
164 Algorithm::Configure(config);
165 this->LoadConfig();
166}

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

◆ Integral()

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.

132{
133 double xsec = fXSecIntegrator->Integrate(this,interaction);
134 return xsec;
135}
const XSecIntegratorI * fXSecIntegrator

References fXSecIntegrator.

◆ LoadConfig()

void AlvarezRusoCOHPiPXSec::LoadConfig ( void )
private

Definition at line 168 of file AlvarezRusoCOHPiPXSec.cxx.

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}
const Algorithm * SubAlg(const RgKey &registry_key) const

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

Referenced by Configure(), and Configure().

◆ ValidProcess()

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.

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}
const Target & Tgt(void) const
int ProbePdg(void) const
bool IsCoherentProduction(void) const
bool IsWeak(void) const
int A(void) const
Definition Target.h:70
bool HitNucIsSet(void) const
Definition Target.cxx:283
bool IsNeutrino(int pdgc)
Definition PDGUtils.cxx:110
bool IsAntiNeutrino(int pdgc)
Definition PDGUtils.cxx:118
const UInt_t kISkipProcessChk
if set, skip process validity checks
Definition Interaction.h:47

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().

◆ XSec()

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.

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}
#define pDEBUG
Definition Messenger.h:63
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Definition Messenger.h:96
bool ValidProcess(const Interaction *i) const
Can this cross section algorithm handle the input process?
double ProbeE(RefFrame_t rf) const
const TLorentzVector & HadSystP4(void) const
Definition Kinematics.h:66
const TLorentzVector & FSLeptonP4(void) const
Definition Kinematics.h:65
int Z(void) const
Definition Target.h:68
virtual bool ValidKinematics(const Interaction *i) const
Is the input kinematical point a physically allowed one?
static constexpr double cm2
Definition Units.h:69
double Jacobian(const Interaction *const i, KinePhaseSpace_t f, KinePhaseSpace_t t)
@ kRfLab
Definition RefFrame.h:26

References genie::Target::A(), genie::units::cm2, fLastInteraction, fMultidiff, 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().

Member Data Documentation

◆ fLastInteraction

const Interaction* genie::AlvarezRusoCOHPiPXSec::fLastInteraction
mutableprivate

Definition at line 58 of file AlvarezRusoCOHPiPXSec.h.

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

◆ fMultidiff

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

◆ fXSecIntegrator

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: