40 LOG(
"ELI",
pFATAL) <<
"This point should not be reached" ;
80 for(
auto it:
fXSecs)
delete it.second;
90 GetParam(
"EventLibraryPath", libPath);
95 TFile fin(libPath.c_str());
96 if(fin.IsZombie()) exit(1);
98 TIter next(fin.GetListOfKeys());
99 while(TObject*
dir = next()){
100 const std::string& tgtName =
dir->GetName();
101 const TParticlePDG* tgtPart = pdglib->
DBase()->GetParticle(tgtName.c_str());
103 LOG(
"ELI",
pWARN) <<
"Unknown nucleus " << tgtName
104 <<
" found in " << libPath
113 for(
bool iscc: {
true,
false}){
118 std::string nuName = pdglib->
Find(
pdg)->GetName();
121 const std::string graphName =
122 TString::Format(
"%s/%s/%s/xsec",
125 nuName.c_str()).Data();
127 const Key key(tgtPart->PdgCode(),
pdg, iscc);
129 TGraph* g = (TGraph*)fin.Get(graphName.c_str());
131 LOG(
"ELI",
pINFO) << graphName <<
" not found in "
132 << libPath <<
" -- skipping";
136 fXSecs[key] =
new TGraph(*g);
149 LOG(
"ELI",
pINFO) <<
"Skipping unknown process " << proc;
162 auto it =
fXSecs.find(key);
164 LOG(
"ELI",
pINFO) <<
"Skipping process without xsec " << key;
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils.
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
virtual void Configure(const Registry &config)
Initial State information.
double ProbeE(RefFrame_t rf) const
Summary information for an interaction.
const ProcessInfo & ProcInfo(void) const
const InitialState & InitState(void) const
Singleton class to load & serve a TDatabasePDG.
static PDGLibrary * Instance(void)
TDatabasePDG * DBase(void)
TParticlePDG * Find(int pdgc, bool must_exist=true)
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
bool IsWeakNC(void) const
bool IsWeakCC(void) const
A registry. Provides the container for algorithm configuration parameters.
std::map< Key, TGraph * > fXSecs
TGraph * GetXSec(const Interaction *in) const
double XSec(const Interaction *i, KinePhaseSpace_t k) const
Compute the cross section for the input interaction.
void Configure(const Registry &config)
double Integral(const Interaction *i) const
bool ValidProcess(const Interaction *i) const
Can this cross section algorithm handle the input process?
void Expand(std::string &s)
Expand env vars/homedirs/wildcards in s.
Utilities for improving the code readability when using PDG codes.
bool IsAntiNeutrino(int pdgc)
static constexpr double cm2
THE MAIN GENIE PROJECT NAMESPACE
enum genie::EKinePhaseSpace KinePhaseSpace_t