535 LOG(
"gspl2root",
pWARN) <<
"No Interaction List available" ;
558 dptr << probe_name <<
"_" << tgt_name;
559 ostringstream dtitle;
560 dtitle <<
"Cross sections for: " 565 <<
"Will store graphs in root directory = " << dptr.str();
566 TDirectory * topdir =
567 dynamic_cast<TDirectory *
> (froot->Get(dptr.str().c_str()));
570 <<
"Directory: " << dptr.str() <<
" already exists!! Exiting";
576 topdir = froot->mkdir(dptr.str().c_str(),dtitle.str().c_str());
587 for(; ilistiter != ilist->end(); ++ilistiter) {
600 else if (proc.
IsMEC() ) { title <<
"mec"; }
601 else if (proc.
IsResonant() ) { title <<
"res"; }
607 else if ( xcls.
NPions() > 0 ) title <<
"_pion" ;
608 else if ( xcls.
NRhos() > 0 ) title <<
"_rho" ;
609 else title <<
"_other" ;
617 LOG(
"gspl2root",
pWARN) <<
"Process " << proc
618 <<
" scattering type not recognised: spline not added" ;
621 if (proc.
IsWeakCC()) { title <<
"_cc"; }
622 else if (proc.
IsWeakNC()) { title <<
"_nc"; }
623 else if (proc.
IsWeakMix()) { title <<
"_ccncmix"; }
624 else if (proc.
IsEM() ) { title <<
"_em"; }
627 LOG(
"gspl2root",
pWARN) <<
"Process " << proc
628 <<
" interaction type has not recongnised: spline not added " ;
641 LOG(
"gspl2root",
pWARN) <<
"Can't handle hit 2-nucleon cluster PDG = " << hitnuc;
645 LOG(
"gspl2root",
pWARN) <<
"Can't handle hit nucleon PDG = " << hitnuc;
663 if(insea) { title <<
"sea"; }
664 else { title <<
"val"; }
672 title <<
"_" << resname.substr(3,4) << resname.substr(0,3);
704 else if (
pdg::IsTau(leppdg) ) { title <<
"_tau"; }
705 else if (
pdg::IsPion(leppdg) ) { title <<
"_had"; }
713 TGraph * gr =
new TGraph(kNSplineP, e, xs);
714 gr->SetName(title.str().c_str());
716 gr->SetTitle(spl->GetName());
734 double * xsresccp =
new double[
kNSplineP];
735 double * xsresccn =
new double[
kNSplineP];
736 double * xsresncp =
new double[
kNSplineP];
737 double * xsresncn =
new double[
kNSplineP];
745 for(ilistiter = ilist->begin(); ilistiter != ilist->end(); ++ilistiter) {
775 TGraph * gr_resccp =
new TGraph(kNSplineP, e, xsresccp);
776 gr_resccp->SetName(
"res_cc_p");
778 topdir->Add(gr_resccp);
779 TGraph * gr_resccn =
new TGraph(kNSplineP, e, xsresccn);
780 gr_resccn->SetName(
"res_cc_n");
782 topdir->Add(gr_resccn);
783 TGraph * gr_resncp =
new TGraph(kNSplineP, e, xsresncp);
784 gr_resncp->SetName(
"res_nc_p");
786 topdir->Add(gr_resncp);
787 TGraph * gr_resncn =
new TGraph(kNSplineP, e, xsresncn);
788 gr_resncn->SetName(
"res_nc_n");
790 topdir->Add(gr_resncn);
796 double * xsdisccp =
new double[
kNSplineP];
797 double * xsdisccn =
new double[
kNSplineP];
798 double * xsdisncp =
new double[
kNSplineP];
799 double * xsdisncn =
new double[
kNSplineP];
806 for(ilistiter = ilist->begin(); ilistiter != ilist->end(); ++ilistiter) {
838 TGraph * gr_disccp =
new TGraph(kNSplineP, e, xsdisccp);
839 gr_disccp->SetName(
"dis_cc_p");
841 topdir->Add(gr_disccp);
842 TGraph * gr_disccn =
new TGraph(kNSplineP, e, xsdisccn);
843 gr_disccn->SetName(
"dis_cc_n");
845 topdir->Add(gr_disccn);
846 TGraph * gr_disncp =
new TGraph(kNSplineP, e, xsdisncp);
847 gr_disncp->SetName(
"dis_nc_p");
849 topdir->Add(gr_disncp);
850 TGraph * gr_disncn =
new TGraph(kNSplineP, e, xsdisncn);
851 gr_disncn->SetName(
"dis_nc_n");
853 topdir->Add(gr_disncn);
865 for(ilistiter = ilist->begin(); ilistiter != ilist->end(); ++ilistiter) {
897 TGraph * gr_disccp_charm =
new TGraph(kNSplineP, e, xsdisccp);
898 gr_disccp_charm->SetName(
"dis_cc_p_charm");
900 topdir->Add(gr_disccp_charm);
901 TGraph * gr_disccn_charm =
new TGraph(kNSplineP, e, xsdisccn);
902 gr_disccn_charm->SetName(
"dis_cc_n_charm");
904 topdir->Add(gr_disccn_charm);
905 TGraph * gr_disncp_charm =
new TGraph(kNSplineP, e, xsdisncp);
906 gr_disncp_charm->SetName(
"dis_nc_p_charm");
908 topdir->Add(gr_disncp_charm);
909 TGraph * gr_disncn_charm =
new TGraph(kNSplineP, e, xsdisncn);
910 gr_disncn_charm->SetName(
"dis_nc_n_charm");
912 topdir->Add(gr_disncn_charm);
918 double * xsmeccc =
new double[
kNSplineP];
919 double * xsmecnc =
new double[
kNSplineP];
925 for(ilistiter = ilist->begin(); ilistiter != ilist->end(); ++ilistiter) {
943 TGraph * gr_meccc =
new TGraph(kNSplineP, e, xsmeccc);
944 gr_meccc->SetName(
"mec_cc");
946 topdir->Add(gr_meccc);
947 TGraph * gr_mecnc =
new TGraph(kNSplineP, e, xsmecnc);
948 gr_mecnc->SetName(
"mec_nc");
950 topdir->Add(gr_mecnc);
956 double * xscohcc =
new double[
kNSplineP];
957 double * xscohnc =
new double[
kNSplineP];
958 double * xscohtot =
new double[
kNSplineP];
965 for(ilistiter = ilist->begin(); ilistiter != ilist->end(); ++ilistiter) {
990 TGraph * gr_cohcc =
new TGraph(kNSplineP, e, xscohcc);
991 gr_cohcc->SetName(
"coh_cc");
993 topdir->Add(gr_cohcc);
995 TGraph * gr_cohnc =
new TGraph(kNSplineP, e, xscohnc);
996 gr_cohnc->SetName(
"coh_nc");
998 topdir->Add(gr_cohnc);
1000 TGraph * gr_cohtot =
new TGraph(kNSplineP, e, xscohtot);
1001 gr_cohtot->SetName(
"coh");
1003 topdir->Add(gr_cohtot);
1008 double * xstotcc =
new double[
kNSplineP];
1009 double * xstotccp =
new double[
kNSplineP];
1010 double * xstotccn =
new double[
kNSplineP];
1011 double * xstotnc =
new double[
kNSplineP];
1012 double * xstotncp =
new double[
kNSplineP];
1013 double * xstotncn =
new double[
kNSplineP];
1022 for(ilistiter = ilist->begin(); ilistiter != ilist->end(); ++ilistiter) {
1068 TGraph * gr_totcc =
new TGraph(kNSplineP, e, xstotcc);
1069 gr_totcc->SetName(
"tot_cc");
1071 topdir->Add(gr_totcc);
1072 TGraph * gr_totccp =
new TGraph(kNSplineP, e, xstotccp);
1073 gr_totccp->SetName(
"tot_cc_p");
1075 topdir->Add(gr_totccp);
1076 TGraph * gr_totccn =
new TGraph(kNSplineP, e, xstotccn);
1077 gr_totccn->SetName(
"tot_cc_n");
1079 topdir->Add(gr_totccn);
1080 TGraph * gr_totnc =
new TGraph(kNSplineP, e, xstotnc);
1081 gr_totnc->SetName(
"tot_nc");
1083 topdir->Add(gr_totnc);
1084 TGraph * gr_totncp =
new TGraph(kNSplineP, e, xstotncp);
1085 gr_totncp->SetName(
"tot_nc_p");
1087 topdir->Add(gr_totncp);
1088 TGraph * gr_totncn =
new TGraph(kNSplineP, e, xstotncn);
1089 gr_totncn->SetName(
"tot_nc_n");
1091 topdir->Add(gr_totncn);
1122 if(is_charged_lepton) {
1128 double * xsresemp =
new double[
kNSplineP];
1129 double * xsresemn =
new double[
kNSplineP];
1135 for(ilistiter = ilist->begin(); ilistiter != ilist->end(); ++ilistiter) {
1155 TGraph * gr_resemp =
new TGraph(kNSplineP, e, xsresemp);
1156 gr_resemp->SetName(
"res_em_p");
1158 topdir->Add(gr_resemp);
1159 TGraph * gr_resemn =
new TGraph(kNSplineP, e, xsresemn);
1160 gr_resemn->SetName(
"res_em_n");
1162 topdir->Add(gr_resemn);
1168 double * xsdisemp =
new double[
kNSplineP];
1169 double * xsdisemn =
new double[
kNSplineP];
1174 for(ilistiter = ilist->begin(); ilistiter != ilist->end(); ++ilistiter) {
1196 TGraph * gr_disemp =
new TGraph(kNSplineP, e, xsdisemp);
1197 gr_disemp->SetName(
"dis_em_p");
1199 topdir->Add(gr_disemp);
1200 TGraph * gr_disemn =
new TGraph(kNSplineP, e, xsdisemn);
1201 gr_disemn->SetName(
"dis_em_n");
1203 topdir->Add(gr_disemn);
1213 for(ilistiter = ilist->begin(); ilistiter != ilist->end(); ++ilistiter) {
1235 TGraph * gr_disemp_charm =
new TGraph(kNSplineP, e, xsdisemp);
1236 gr_disemp_charm->SetName(
"dis_em_p_charm");
1238 topdir->Add(gr_disemp_charm);
1239 TGraph * gr_disemn_charm =
new TGraph(kNSplineP, e, xsdisemn);
1240 gr_disemn_charm->SetName(
"dis_em_n_charm");
1242 topdir->Add(gr_disemn_charm);
1247 double * xstotem =
new double[
kNSplineP];
1248 double * xstotemp =
new double[
kNSplineP];
1249 double * xstotemn =
new double[
kNSplineP];
1255 for(ilistiter = ilist->begin(); ilistiter != ilist->end(); ++ilistiter) {
1263 bool isem = proc.
IsEM();
1284 TGraph * gr_totem =
new TGraph(kNSplineP, e, xstotem);
1285 gr_totem->SetName(
"tot_em");
1287 topdir->Add(gr_totem);
1288 TGraph * gr_totemp =
new TGraph(kNSplineP, e, xstotemp);
1289 gr_totemp->SetName(
"tot_em_p");
1291 topdir->Add(gr_totemp);
1292 TGraph * gr_totemn =
new TGraph(kNSplineP, e, xstotemn);
1293 gr_totemn->SetName(
"tot_em_n");
1295 topdir->Add(gr_totemn);
bool IsResonant(void) const
bool IsFinalLeptonEvent(void) const
bool IsWeakMix(void) const
bool HitSeaQrk(void) const
bool IsWeakCC(void) const
bool IsFinalQuarkEvent(void) const
int FinalLeptonPdg(void) const
int HitNucPdg(void) const
bool IsDarkNeutralCurrent(void) const
int HitQrkPdg(void) const
bool IsInverseMuDecay(void) const
bool IsQuasiElastic(void) const
void FormatXSecGraph(TGraph *g)
A numeric analysis tool class for interpolating 1-D functions.
int CharmHadronPdg(void) const
bool IsStrangeEvent(void) const
bool IsChargedLepton(int pdgc)
bool IsDiffractive(void) const
bool IsCoherentProduction(void) const
bool IsIMDAnnihilation(void) const
bool IsAntiSQuark(int pdgc)
double Evaluate(double x) const
enum genie::EResonance Resonance_t
bool IsAntiDQuark(int pdgc)
Contains minimal information for tagging exclusive processes.
bool IsCharmEvent(void) const
bool exists(std::string path)
int NSingleGammas(void) const
Summary information for an interaction.
bool IsWeakNC(void) const
int StrangeHadronPdg(void) const
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
bool IsCoherentElastic(void) const
bool IsNuElectronElastic(void) const
const InteractionList * Interactions(void) const
static constexpr double cm2
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
bool IsAntiTQuark(int pdgc)
bool IsAntiBQuark(int pdgc)
GENIE Event Generation Driver. A minimalist user interface object for generating neutrino interaction...
GEVGDriver GetEventGenDriver(void)
Resonance_t Resonance(void) const
int FinalQuarkPdg(void) const
bool IsNeutralLepton(int pdgc)
bool IsDeepInelastic(void) const
bool Is2NucleonCluster(int pdgc)
string FilterString(string filt, string input)
bool IsInclusiveStrange(void) const
const Spline * XSecSpline(const Interaction *interaction) const
Singleton class to load & serve a TDatabasePDG.
bool HitNucIsSet(void) const
bool HitQrkIsSet(void) const
bool IsAntiCQuark(int pdgc)
const XclsTag & ExclTag(void) const
bool IsInclusiveCharm(void) const
A vector of Interaction objects.
const InitialState & InitState(void) const
const char * AsString(Resonance_t res)
resonance id -> string
const ProcessInfo & ProcInfo(void) const
TParticlePDG * Find(int pdgc, bool must_exist=true)
const Target & Tgt(void) const
bool IsGlashowResonance(void) const
bool IsElectron(int pdgc)
bool IsAntiUQuark(int pdgc)
Initial State information.