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

Computes the cross section for an exclusive 1pi reaction through resonance neutrinoproduction according to the Rein-Sehgal model. More...

#include <ReinSehgalSPPXSec.h>

Inheritance diagram for genie::ReinSehgalSPPXSec:
[legend]
Collaboration diagram for genie::ReinSehgalSPPXSec:
[legend]

Public Member Functions

 ReinSehgalSPPXSec ()
 ReinSehgalSPPXSec (string param_set)
virtual ~ReinSehgalSPPXSec ()
double Integrate (const XSecAlgorithmI *model, const Interaction *i) const
void Configure (const Registry &config)
void Configure (string config)
Public Member Functions inherited from genie::XSecIntegratorI
virtual ~XSecIntegratorI ()
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)

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::ReinSehgalRESXSecWithCache
 ReinSehgalRESXSecWithCache ()
 ReinSehgalRESXSecWithCache (string name)
 ReinSehgalRESXSecWithCache (string name, string config)
virtual ~ReinSehgalRESXSecWithCache ()
void CacheResExcitationXSec (const Interaction *interaction) const
string CacheBranchName (Resonance_t r, InteractionType_t it, int nu, int nuc) const
Protected Member Functions inherited from genie::XSecIntegratorI
 XSecIntegratorI ()
 XSecIntegratorI (string name)
 XSecIntegratorI (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::ReinSehgalRESXSecWithCache
bool fUsingDisResJoin
double fWcut
double fEMax
const XSecAlgorithmIfSingleResXSecModel
BaryonResList fResList
Protected Attributes inherited from genie::XSecIntegratorI
const IntegratorI * fIntegrator
 GENIE numerical integrator.
string fGSLIntgType
 name of GSL numerical integrator
double fGSLRelTol
 required relative tolerance (error)
int fGSLMaxEval
 GSL max evaluations.
int fGSLMinEval
 GSL min evaluations. Ignored by some integrators.
unsigned int fGSLMaxSizeOfSubintervals
 GSL maximum number of sub-intervals for 1D integrator.
unsigned int fGSLRule
 GSL Gauss-Kronrod integration rule (only for GSL 1D adaptive type)
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

Computes the cross section for an exclusive 1pi reaction through resonance neutrinoproduction according to the Rein-Sehgal model.

This algorithm produces in principle what you could also get from the genie::RESXSec algorithm (RES cross section integrator) by specifying the genie::ReinSehgalSPPPXSec as the differential cross section model. However, ReinSehgalSPPXSec offers a faster alternative. Before computing any SPP cross section this algorithm computes and caches splines for resonance neutrino-production cross sections. This improves the speed since it is reducing the number of calculations (the generic algorithm needs to recompute resonance production xsec for every exclusive channel).

In this algorithm we follow the non-coherent approach: we sum the weighted resonance production cross sections rather than the resonance production amplitudes.

Is a concrete implementation of the XSecAlgorithmI interface.

References:\n D.Rein and L.M.Sehgal, Neutrino Excitation of Baryon Resonances
and Single Pion Production, Ann.Phys.133, 79 (1981)
Author
Costas Andreopoulos <c.andreopoulos \at cern.ch> University of Liverpool
Created:\n March 09, 2006
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 45 of file ReinSehgalSPPXSec.h.

Constructor & Destructor Documentation

◆ ReinSehgalSPPXSec() [1/2]

ReinSehgalSPPXSec::ReinSehgalSPPXSec ( )

◆ ReinSehgalSPPXSec() [2/2]

ReinSehgalSPPXSec::ReinSehgalSPPXSec ( string param_set)

Definition at line 35 of file ReinSehgalSPPXSec.cxx.

35 :
36ReinSehgalRESXSecWithCache("genie::ReinSehgalSPPXSec", config)
37{
38
39}

References genie::ReinSehgalRESXSecWithCache::ReinSehgalRESXSecWithCache().

◆ ~ReinSehgalSPPXSec()

ReinSehgalSPPXSec::~ReinSehgalSPPXSec ( )
virtual

Definition at line 41 of file ReinSehgalSPPXSec.cxx.

42{
43
44}

Member Function Documentation

◆ Configure() [1/2]

void ReinSehgalSPPXSec::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 152 of file ReinSehgalSPPXSec.cxx.

153{
154 Algorithm::Configure(config);
155 this->LoadConfig();
156}
virtual void Configure(const Registry &config)
Definition Algorithm.cxx:62

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

◆ Configure() [2/2]

void ReinSehgalSPPXSec::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 158 of file ReinSehgalSPPXSec.cxx.

159{
160 Algorithm::Configure(config);
161 this->LoadConfig();
162}

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

◆ Integrate()

double ReinSehgalSPPXSec::Integrate ( const XSecAlgorithmI * model,
const Interaction * i ) const
virtual

Implements genie::XSecIntegratorI.

Definition at line 46 of file ReinSehgalSPPXSec.cxx.

48{
49 if(! model->ValidProcess(interaction) ) return 0.;
50
51 const KPhaseSpace & kps = interaction->PhaseSpace();
52 if(!kps.IsAboveThreshold()) {
53 LOG("COHXSec", pDEBUG) << "*** Below energy threshold";
54 return 0;
55 }
56
57 fSingleResXSecModel = model;
58
59 //-- Get 1pi exclusive channel
60 SppChannel_t spp_channel = SppChannel::FromInteraction(interaction);
61
62 //-- Get cache
63 Cache * cache = Cache::Instance();
64
65 const InitialState & init_state = interaction->InitState();
66 const ProcessInfo & proc_info = interaction->ProcInfo();
67 const Target & target = init_state.Tgt();
68
69 InteractionType_t it = proc_info.InteractionTypeId();
70 int nucleon_pdgc = target.HitNucPdg();
71 int nu_pdgc = init_state.ProbePdg();
72
73 // Get neutrino energy in the struck nucleon rest frame
74 double Ev = init_state.ProbeE(kRfHitNucRest);
75
76 double xsec = 0;
77
78 unsigned int nres = fResList.NResonances();
79 for(unsigned int ires = 0; ires < nres; ires++) {
80
81 //-- Get next resonance from the resonance list
82 Resonance_t res = fResList.ResonanceId(ires);
83
84 //-- Build a unique name for the cache branch
85 string key = this->CacheBranchName(res, it, nu_pdgc, nucleon_pdgc);
86 LOG("ReinSehgalSpp", pINFO)
87 << "Finding cache branch with key: " << key;
88 CacheBranchFx * cache_branch =
89 dynamic_cast<CacheBranchFx *> (cache->FindCacheBranch(key));
90
91 if(!cache_branch) {
92 LOG("ReinSehgalSpp", pWARN)
93 << "No cached RES v-production data for input neutrino"
94 << " (pdgc: " << nu_pdgc << ")";
95 LOG("ReinSehgalSpp", pWARN)
96 << "Wait while computing/caching RES production xsec first...";
97
98 this->CacheResExcitationXSec(interaction);
99
100 LOG("ReinSehgalSpp", pINFO) << "Done caching resonance xsec data";
101 LOG("ReinSehgalSpp", pINFO)
102 << "Finding newly created cache branch with key: " << key;
103 cache_branch =
104 dynamic_cast<CacheBranchFx *> (cache->FindCacheBranch(key));
105 assert(cache_branch);
106 }
107 const CacheBranchFx & cbranch = (*cache_branch);
108
109 //-- Get cached resonance neutrinoproduction xsec
110 // (If E>Emax, assume xsec = xsec(Emax) - but do not evaluate the
111 // cross section spline at the end of its energy range-)
112 double rxsec = (Ev<fEMax-1) ? cbranch(Ev) : cbranch(fEMax-1);
113
114 //-- Get the BR for the (resonance) -> (exclusive final state)
115 double br = SppChannel::BranchingRatio(/*spp_channel,*/ res);
116
117 //-- Get the Isospin Clebsch-Gordon coefficient for the given resonance
118 // and exclusive final state
119 double igg = SppChannel::IsospinWeight(spp_channel, res);
120
121 //-- Compute the weighted xsec
122 // (total weight = Breit-Wigner * BR * isospin Clebsch-Gordon)
123 double res_xsec_contrib = rxsec*br*igg;
124
125 SLOG("ReinSehgalSpp", pINFO)
126 << "Contrib. from [" << utils::res::AsString(res) << "] = "
127 << "<Clebsch-Gordon = " << igg
128 << "> * <BR(->1pi) = " << br
129 << "> * <Breit-Wigner * d^2xsec/dQ^2dW = " << rxsec
130 << "> = " << res_xsec_contrib;
131
132 //-- Add contribution of this resonance to the cross section
133 xsec += res_xsec_contrib;
134
135 }//res
136
137 SLOG("ReinSehgalSpp", pNOTICE)
138 << "XSec[SPP/" << SppChannel::AsString(spp_channel)
139 << "/free] (Ev = " << Ev << " GeV) = " << xsec;
140
141 //-- If requested return the free nucleon xsec even for input nuclear tgt
142 if( interaction->TestBit(kIAssumeFreeNucleon) ) return xsec;
143
144 //-- number of scattering centers in the target
145 int NNucl = (pdg::IsProton(nucleon_pdgc)) ? target.Z() : target.N();
146
147 xsec*=NNucl; // nuclear xsec
148
149 return xsec;
150}
#define pNOTICE
Definition Messenger.h:61
#define pINFO
Definition Messenger.h:62
#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
#define pWARN
Definition Messenger.h:60
#define SLOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a short string (using the FUNCTION and...
Definition Messenger.h:84
static Cache * Instance(void)
Definition Cache.cxx:67
CacheBranchI * FindCacheBranch(string key)
finding/adding cache branches
Definition Cache.cxx:80
const Target & Tgt(void) const
int ProbePdg(void) const
double ProbeE(RefFrame_t rf) const
bool IsAboveThreshold(void) const
Checks whether the interaction is above the energy threshold.
InteractionType_t InteractionTypeId(void) const
string CacheBranchName(Resonance_t r, InteractionType_t it, int nu, int nuc) const
void CacheResExcitationXSec(const Interaction *interaction) const
static string AsString(SppChannel_t channel)
Definition SppChannel.h:76
static SppChannel_t FromInteraction(const Interaction *interaction)
Definition SppChannel.h:402
static double IsospinWeight(SppChannel_t channel, Resonance_t res)
Definition SppChannel.h:238
static double BranchingRatio(Resonance_t res)
Definition SppChannel.h:357
int HitNucPdg(void) const
Definition Target.cxx:304
int N(void) const
Definition Target.h:69
int Z(void) const
Definition Target.h:68
virtual bool ValidProcess(const Interaction *i) const =0
Can this cross section algorithm handle the input process?
bool IsProton(int pdgc)
Definition PDGUtils.cxx:336
const char * AsString(Resonance_t res)
resonance id -> string
enum genie::EInteractionType InteractionType_t
enum genie::EResonance Resonance_t
enum genie::ESppChannel SppChannel_t
@ kRfHitNucRest
Definition RefFrame.h:30
const UInt_t kIAssumeFreeNucleon
Definition Interaction.h:49

References genie::SppChannel::AsString(), genie::utils::res::AsString(), genie::SppChannel::BranchingRatio(), genie::ReinSehgalRESXSecWithCache::CacheBranchName(), genie::ReinSehgalRESXSecWithCache::CacheResExcitationXSec(), genie::ReinSehgalRESXSecWithCache::fEMax, genie::Cache::FindCacheBranch(), genie::ReinSehgalRESXSecWithCache::fResList, genie::SppChannel::FromInteraction(), genie::ReinSehgalRESXSecWithCache::fSingleResXSecModel, genie::Target::HitNucPdg(), genie::Interaction::InitState(), genie::Cache::Instance(), genie::ProcessInfo::InteractionTypeId(), genie::KPhaseSpace::IsAboveThreshold(), genie::SppChannel::IsospinWeight(), genie::pdg::IsProton(), genie::kIAssumeFreeNucleon, genie::kRfHitNucRest, LOG, genie::Target::N(), pDEBUG, genie::Interaction::PhaseSpace(), pINFO, pNOTICE, genie::InitialState::ProbeE(), genie::InitialState::ProbePdg(), genie::Interaction::ProcInfo(), pWARN, SLOG, genie::InitialState::Tgt(), genie::XSecAlgorithmI::ValidProcess(), and genie::Target::Z().

◆ LoadConfig()

void ReinSehgalSPPXSec::LoadConfig ( void )
private

Definition at line 164 of file ReinSehgalSPPXSec.cxx.

165{
166 // Get GSL integration type & relative tolerance
167 GetParamDef( "gsl-integration-type", fGSLIntgType, string("adaptive") ) ;
168 GetParamDef( "gsl-relative-tolerance", fGSLRelTol, 0.01 ) ;
169 GetParamDef( "gsl-max-eval", fGSLMaxEval, 100000 ) ;
170
171 // get upper E limit on res xsec spline (=f(E)) before assuming xsec=const
172 GetParamDef( "ESplineMax", fEMax, 100. ) ;
173 fEMax = TMath::Max(fEMax, 20.); // don't accept user Emax if less than 20 GeV
174
175 // create the baryon resonance list specified in the config.
176 fResList.Clear();
177 string resonances ;
178 GetParam( "ResonanceNameList", resonances ) ;
179 fResList.DecodeFromNameList(resonances);
180
181}
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
bool GetParamDef(const RgKey &name, T &p, const T &def) const
string fGSLIntgType
name of GSL numerical integrator
int fGSLMaxEval
GSL max evaluations.
double fGSLRelTol
required relative tolerance (error)

References genie::ReinSehgalRESXSecWithCache::fEMax, genie::XSecIntegratorI::fGSLIntgType, genie::XSecIntegratorI::fGSLMaxEval, genie::XSecIntegratorI::fGSLRelTol, genie::ReinSehgalRESXSecWithCache::fResList, genie::Algorithm::GetParam(), and genie::Algorithm::GetParamDef().

Referenced by Configure(), and Configure().


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