Public Member Functions | Private Member Functions | List of all members
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:
genie::ReinSehgalRESXSecWithCache genie::XSecIntegratorI genie::Algorithm

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

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)
 
- 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. 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
 
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::ReinSehgalRESXSecWithCache
bool fUsingDisResJoin
 
double fWcut
 
double fEMax
 
const XSecAlgorithmIfSingleResXSecModel
 
BaryonResList fResList
 
- Protected Attributes inherited from genie::XSecIntegratorI
const IntegratorI * fIntegrator
 GENIE numerical integrator. More...
 
string fGSLIntgType
 name of GSL numerical integrator More...
 
double fGSLRelTol
 required relative tolerance (error) More...
 
int fGSLMaxEval
 GSL max evaluations. More...
 
int fGSLMinEval
 GSL min evaluations. Ignored by some integrators. More...
 
unsigned int fGSLMaxSizeOfSubintervals
 GSL maximum number of sub-intervals for 1D integrator. More...
 
unsigned int fGSLRule
 GSL Gauss-Kronrod integration rule (only for GSL 1D adaptive type) 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< boolfOwnerships
 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 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.
D.Rein and L.M.Sehgal, Neutrino Excitation of Baryon Resonances and Single Pion Production, Ann.Phys.133, 79 (1981)

Author
Costas Andreopoulos <constantinos.andreopoulos cern.ch> University of Liverpool & STFC Rutherford Appleton Laboratory

March 09, 2006

Copyright (c) 2003-2020, 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::ReinSehgalSPPXSec ( )

Definition at line 29 of file ReinSehgalSPPXSec.cxx.

29  :
30 ReinSehgalRESXSecWithCache("genie::ReinSehgalSPPXSec")
31 {
32 
33 }
ReinSehgalSPPXSec::ReinSehgalSPPXSec ( string  param_set)

Definition at line 35 of file ReinSehgalSPPXSec.cxx.

35  :
36 ReinSehgalRESXSecWithCache("genie::ReinSehgalSPPXSec", config)
37 {
38 
39 }
static Config * config
Definition: config.cpp:1054
ReinSehgalSPPXSec::~ReinSehgalSPPXSec ( )
virtual

Definition at line 41 of file ReinSehgalSPPXSec.cxx.

42 {
43 
44 }

Member Function Documentation

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
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 {
161  this->LoadConfig();
162 }
static Config * config
Definition: config.cpp:1054
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
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 
58 
59  //-- Get 1pi exclusive channel
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 
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 }
static SppChannel_t FromInteraction(const Interaction *interaction)
Definition: SppChannel.h:276
InteractionType_t InteractionTypeId(void) const
int HitNucPdg(void) const
Definition: Target.cxx:304
static double IsospinWeight(SppChannel_t channel, Resonance_t res)
Definition: SppChannel.h:200
enum genie::EResonance Resonance_t
unsigned int NResonances(void) const
enum genie::ESppChannel SppChannel_t
static string AsString(SppChannel_t channel)
Definition: SppChannel.h:65
bool IsProton(int pdgc)
Definition: PDGUtils.cxx:333
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
def key(type, name=None)
Definition: graph.py:13
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
Definition: ProcessInfo.h:46
string CacheBranchName(Resonance_t r, InteractionType_t it, int nu, int nuc) const
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
Kinematical phase space.
Definition: KPhaseSpace.h:33
int Z(void) const
Definition: Target.h:68
#define pINFO
Definition: Messenger.h:62
void CacheResExcitationXSec(const Interaction *interaction) const
#define pWARN
Definition: Messenger.h:60
CacheBranchI * FindCacheBranch(string key)
finding/adding cache branches
Definition: Cache.cxx:80
static double BranchingRatio(SppChannel_t, Resonance_t res)
Definition: SppChannel.h:244
GENIE Cache Memory.
Definition: Cache.h:38
int N(void) const
Definition: Target.h:69
const UInt_t kIAssumeFreeNucleon
Definition: Interaction.h:49
bool IsAboveThreshold(void) const
Checks whether the interaction is above the energy threshold.
virtual bool ValidProcess(const Interaction *i) const =0
Can this cross section algorithm handle the input process?
const char * AsString(Resonance_t res)
resonance id -> string
#define pNOTICE
Definition: Messenger.h:61
const Target & Tgt(void) const
Definition: InitialState.h:66
static Cache * Instance(void)
Definition: Cache.cxx:67
A simple cache branch storing the cached data in a TNtuple.
Definition: CacheBranchFx.h:37
#define SLOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a short string (using the FUNCTION and...
Definition: Messenger.h:84
double ProbeE(RefFrame_t rf) const
enum genie::EInteractionType InteractionType_t
Initial State information.
Definition: InitialState.h:48
#define pDEBUG
Definition: Messenger.h:63
Resonance_t ResonanceId(unsigned int ires) const
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 }
string fGSLIntgType
name of GSL numerical integrator
void DecodeFromNameList(string list, string delimiter=",")
int fGSLMaxEval
GSL max evaluations.
bool GetParamDef(const RgKey &name, T &p, const T &def) const
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
double fGSLRelTol
required relative tolerance (error)

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