Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ana::nueccinc::NueCCIncEnhancedSamples Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-03-03/NDAna/nuecc_inc/NueCCIncCrossSectionAnalysis.h"

Public Member Functions

 NueCCIncEnhancedSamples (SpectrumLoaderBase &lLoad, HistAxis yAxis, HistAxis xAxis, HistAxis zAxis, HistAxis recoAxis2D, NuTruthHistAxis efficiencyAxis2D, NuTruthHistAxis efficiencyAxis1D, HistAxis pidAxis, Cut selection, std::vector< Cut > templateCuts, double numberTemplates, NuTruthCut isSig, SystShifts shift, NuTruthVar weiNT, Var wei, Var weiNue, NuTruthVar weiNueNT)
 
virtual ~NueCCIncEnhancedSamples ()
 
std::vector< SpectrumgetCrossSectionAnalysisSpectra ()
 
std::vector< Spectrum * > getAnalysis3DSpectra ()
 
std::vector< Spectrum * > getTemplate3DSpectra ()
 
void SaveTo (TDirectory *dir) const
 

Static Public Member Functions

static std::unique_ptr< NueCCIncEnhancedSamplesLoadFrom (TDirectory *dir)
 

Protected Member Functions

 NueCCIncEnhancedSamples (std::vector< Spectrum * > vect_analysis3D, std::vector< Spectrum * > vect_templates3D, Spectrum analysisSig1D, Spectrum analysisSigNT1D, Spectrum analysisSig2D, Spectrum analysisSigNT2D, Spectrum unfolding1D, Spectrum unfolding2D, double numTypes)
 
std::vector< Spectrum * > NominalAnalysisSpectra ()
 
std::vector< Spectrum * > NominalTemplateSpectra ()
 
std::vector< SpectrumStandardSpectra ()
 

Protected Attributes

std::vector< Spectrum * > fAnalyses3D
 
std::vector< Spectrum * > fTemplates3D
 
Spectrum fAnalysisSig1D
 
Spectrum fAnalysisSigNuTree1D
 
Spectrum fAnalysisSig2D
 
Spectrum fAnalysisSigNuTree2D
 
Spectrum fUnfolding1D
 
Spectrum fUnfolding2D
 
double numCuts
 

Detailed Description

Definition at line 222 of file NueCCIncCrossSectionAnalysis.h.

Constructor & Destructor Documentation

ana::nueccinc::NueCCIncEnhancedSamples::NueCCIncEnhancedSamples ( SpectrumLoaderBase lLoad,
HistAxis  yAxis,
HistAxis  xAxis,
HistAxis  zAxis,
HistAxis  recoAxis2D,
NuTruthHistAxis  efficiencyAxis2D,
NuTruthHistAxis  efficiencyAxis1D,
HistAxis  pidAxis,
Cut  selection,
std::vector< Cut templateCuts,
double  numberTemplates,
NuTruthCut  isSig,
SystShifts  shift,
NuTruthVar  weiNT,
Var  wei,
Var  weiNue,
NuTruthVar  weiNueNT 
)

Definition at line 1044 of file NueCCIncCrossSectionAnalysis.cxx.

Referenced by ana::nueccinc::NueCCIncCrossSectionTemplates::returnAnalysis3D().

1062  :
1063  fAnalysisSig1D(lLoad,
1064  HistAxisFromNuTruthHistAxis(efficiencyAxis1D),
1065  selection && CutFromNuTruthCut(isSig),
1066  shift, wei*weiNue),
1067  fAnalysisSigNuTree1D(lLoad,
1068  efficiencyAxis1D,
1069  isSig,
1070  shift, weiNT*weiNueNT),
1071  fAnalysisSig2D(lLoad,HistAxisFromNuTruthHistAxis(efficiencyAxis2D),
1072  selection && CutFromNuTruthCut(isSig),
1073  shift, wei*weiNue),
1074  fAnalysisSigNuTree2D(lLoad,efficiencyAxis2D,
1075  isSig,
1076  shift, weiNT*weiNueNT),
1077  fUnfolding1D(lLoad,zAxis,HistAxisFromNuTruthHistAxis(efficiencyAxis1D),
1078  selection && CutFromNuTruthCut(isSig),shift,wei*weiNue),
1079  fUnfolding2D(lLoad,recoAxis2D,HistAxisFromNuTruthHistAxis(efficiencyAxis2D),
1080  selection && CutFromNuTruthCut(isSig),shift,wei*weiNue),
1081  numCuts(numberTemplates)
1082  {
1083  for(uint iCuts = 0; iCuts < templateCuts.size(); iCuts++){
1084  fAnalyses3D.push_back(new Spectrum(lLoad, xAxis,yAxis,
1085  zAxis,selection
1086  && templateCuts[iCuts],
1087  shift,wei*weiNue));
1088  fTemplates3D.push_back(new Spectrum(lLoad, xAxis,yAxis,
1089  pidAxis,
1090  selection && templateCuts[iCuts],
1091  shift,wei*weiNue));
1092  }
1093 
1094  }
HistAxis HistAxisFromNuTruthHistAxis(NuTruthHistAxis ntha, double _default)
Definition: HistAxis.cxx:9
std::vector< float > Spectrum
Definition: Constants.h:728
Cut CutFromNuTruthCut(const NuTruthCut &stc)
Definition: Cut.cxx:7
unsigned int uint
virtual ana::nueccinc::NueCCIncEnhancedSamples::~NueCCIncEnhancedSamples ( )
inlinevirtual
ana::nueccinc::NueCCIncEnhancedSamples::NueCCIncEnhancedSamples ( std::vector< Spectrum * >  vect_analysis3D,
std::vector< Spectrum * >  vect_templates3D,
Spectrum  analysisSig1D,
Spectrum  analysisSigNT1D,
Spectrum  analysisSig2D,
Spectrum  analysisSigNT2D,
Spectrum  unfolding1D,
Spectrum  unfolding2D,
double  numTypes 
)
inlineprotected

Definition at line 255 of file NueCCIncCrossSectionAnalysis.h.

Member Function Documentation

std::vector< Spectrum * > ana::nueccinc::NueCCIncEnhancedSamples::getAnalysis3DSpectra ( )

Definition at line 1131 of file NueCCIncCrossSectionAnalysis.cxx.

References NominalAnalysisSpectra().

1132  {
1134  }
std::vector< Spectrum > ana::nueccinc::NueCCIncEnhancedSamples::getCrossSectionAnalysisSpectra ( )

Definition at line 1113 of file NueCCIncCrossSectionAnalysis.cxx.

References MECModelEnuComparisons::i, NominalAnalysisSpectra(), NominalTemplateSpectra(), makeDatasetsPage::results, and StandardSpectra().

1113  {
1114 
1115  std::vector<Spectrum*> templates =
1117  std::vector<Spectrum*> analysis =
1119  std::vector<Spectrum> others =
1121 
1122  std::vector<Spectrum> results;
1123  //Only passing the efficiency and unfolding related spectra
1124  for(uint i = 0; i < others.size(); i++)
1125  results.push_back(others[i]);
1126 
1127 
1128  return results;
1129  }
unsigned int uint
std::vector< Spectrum * > ana::nueccinc::NueCCIncEnhancedSamples::getTemplate3DSpectra ( )

Definition at line 1136 of file NueCCIncCrossSectionAnalysis.cxx.

References NominalTemplateSpectra().

1137  {
1139  }
std::unique_ptr< NueCCIncEnhancedSamples > ana::nueccinc::NueCCIncEnhancedSamples::LoadFrom ( TDirectory *  dir)
static

Definition at line 1171 of file NueCCIncCrossSectionAnalysis.cxx.

References runNovaSAM::release, string, and art::to_string().

1171  {
1172 
1173  Spectrum* mcsig1D= ana::LoadFrom<Spectrum>
1174  (dir->GetDirectory("fAnalysisSig1D")).release();
1175 
1176  Spectrum* mcsignutree1D = ana::LoadFrom<Spectrum>
1177  (dir->GetDirectory("fAnalysisSigNuTree1D")).release();
1178 
1179  Spectrum* mcsig2D= ana::LoadFrom<Spectrum>
1180  (dir->GetDirectory("fAnalysisSig2D")).release();
1181 
1182  Spectrum* mcsignutree2D = ana::LoadFrom<Spectrum>
1183  (dir->GetDirectory("fAnalysisSigNuTree2D")).release();
1184 
1185  Spectrum* unfolding1D = ana::LoadFrom<Spectrum>
1186  (dir->GetDirectory("fUnfolding1D")).release();
1187 
1188  Spectrum* unfolding2D = ana::LoadFrom<Spectrum>
1189  (dir->GetDirectory("fUnfolding2D")).release();
1190 
1191  TVectorD* numTemplateCuts = (TVectorD*)dir->Get("fTemplateCount");
1192 
1193  std::vector<Spectrum*> analysis_out;
1194  std::vector<Spectrum*> template_out;
1195 
1196  for(int iCuts = 0; iCuts < (*numTemplateCuts)[0]; iCuts++){
1197  std::string analysis_name = "fAnalysis3D_" + std::to_string(iCuts);
1198  std::string template_name = "fTemplate3D_" + std::to_string(iCuts);
1199  Spectrum* analysis = ana::LoadFrom<Spectrum>
1200  (dir->GetDirectory(analysis_name.c_str())).release();
1201  Spectrum* templates = ana::LoadFrom<Spectrum>
1202  (dir->GetDirectory(template_name.c_str())).release();
1203  analysis_out.push_back(analysis);
1204  template_out.push_back(templates);
1205  }
1206 
1207  return std::unique_ptr<NueCCIncEnhancedSamples>
1208  (
1209  new NueCCIncEnhancedSamples(analysis_out,template_out,
1210  *mcsig1D,
1211  *mcsignutree1D,
1212  *mcsig2D,
1213  *mcsignutree2D,
1214  *unfolding1D,
1215  *unfolding2D,
1216  (*numTemplateCuts)[0]));
1217 
1218  }
std::vector< float > Spectrum
Definition: Constants.h:728
TDirectory * dir
Definition: macro.C:5
NueCCIncEnhancedSamples(SpectrumLoaderBase &lLoad, HistAxis yAxis, HistAxis xAxis, HistAxis zAxis, HistAxis recoAxis2D, NuTruthHistAxis efficiencyAxis2D, NuTruthHistAxis efficiencyAxis1D, HistAxis pidAxis, Cut selection, std::vector< Cut > templateCuts, double numberTemplates, NuTruthCut isSig, SystShifts shift, NuTruthVar weiNT, Var wei, Var weiNue, NuTruthVar weiNueNT)
std::string to_string(ModuleType mt)
Definition: ModuleType.h:32
enum BeamMode string
std::vector< Spectrum * > ana::nueccinc::NueCCIncEnhancedSamples::NominalAnalysisSpectra ( )
protected

Definition at line 1098 of file NueCCIncCrossSectionAnalysis.cxx.

Referenced by getAnalysis3DSpectra(), and getCrossSectionAnalysisSpectra().

1098  {
1099  return fAnalyses3D;
1100  }
std::vector< Spectrum * > ana::nueccinc::NueCCIncEnhancedSamples::NominalTemplateSpectra ( )
protected

Definition at line 1102 of file NueCCIncCrossSectionAnalysis.cxx.

Referenced by getCrossSectionAnalysisSpectra(), and getTemplate3DSpectra().

1102  {
1103  return fTemplates3D;
1104  }
void ana::nueccinc::NueCCIncEnhancedSamples::SaveTo ( TDirectory *  dir) const

Definition at line 1141 of file NueCCIncCrossSectionAnalysis.cxx.

References ana::nueccinc::NueCCIncCrossSectionAnalysis::fAnalysisSig1D, ana::nueccinc::NueCCIncCrossSectionAnalysis::fAnalysisSig2D, ana::nueccinc::NueCCIncCrossSectionAnalysis::fAnalysisSigNuTree1D, ana::nueccinc::NueCCIncCrossSectionAnalysis::fAnalysisSigNuTree2D, ana::nueccinc::NueCCIncCrossSectionAnalysis::fUnfolding1D, ana::nueccinc::NueCCIncCrossSectionAnalysis::fUnfolding2D, ana::Spectrum::SaveTo(), string, tmp, and art::to_string().

1141  {
1142  TDirectory *tmp = gDirectory;
1143  dir->cd();
1144 
1145  TObjString("NueCCIncEnhancedSamples").Write("type");
1146 
1147  TVectorD numTemplateCuts(1);
1148  numTemplateCuts[0]=numCuts;
1149 
1150  numTemplateCuts.Write("fTemplateCount");
1151 
1152  for(int iCuts = 0; iCuts < numCuts; iCuts++){
1153  std::string analysis_name = "fAnalysis3D_" + std::to_string(iCuts);
1154  std::string template_name = "fTemplate3D_" + std::to_string(iCuts);
1155  fAnalyses3D[iCuts]->SaveTo(dir->mkdir(analysis_name.c_str()));
1156  fTemplates3D[iCuts]->SaveTo(dir->mkdir(template_name.c_str()));
1157  }
1158 
1159  fAnalysisSig1D.SaveTo(dir->mkdir("fAnalysisSig1D"));
1160  fAnalysisSigNuTree1D.SaveTo(dir->mkdir("fAnalysisSigNuTree1D"));
1161  fAnalysisSig2D.SaveTo(dir->mkdir("fAnalysisSig2D"));
1162  fAnalysisSigNuTree2D.SaveTo(dir->mkdir("fAnalysisSigNuTree2D"));
1163  fUnfolding1D.SaveTo(dir->mkdir("fUnfolding1D"));
1164  fUnfolding2D.SaveTo(dir->mkdir("fUnfolding2D"));
1165 
1166  tmp->cd();
1167  return;
1168  }
Float_t tmp
Definition: plot.C:36
void SaveTo(TDirectory *dir, const std::string &name) const
Definition: Spectrum.cxx:506
TDirectory * dir
Definition: macro.C:5
std::string to_string(ModuleType mt)
Definition: ModuleType.h:32
enum BeamMode string
std::vector< Spectrum > ana::nueccinc::NueCCIncEnhancedSamples::StandardSpectra ( )
protected

Member Data Documentation

std::vector<Spectrum*> ana::nueccinc::NueCCIncEnhancedSamples::fAnalyses3D
protected

Definition at line 280 of file NueCCIncCrossSectionAnalysis.h.

Spectrum ana::nueccinc::NueCCIncEnhancedSamples::fAnalysisSig1D
protected

Definition at line 282 of file NueCCIncCrossSectionAnalysis.h.

Spectrum ana::nueccinc::NueCCIncEnhancedSamples::fAnalysisSig2D
protected

Definition at line 284 of file NueCCIncCrossSectionAnalysis.h.

Spectrum ana::nueccinc::NueCCIncEnhancedSamples::fAnalysisSigNuTree1D
protected

Definition at line 283 of file NueCCIncCrossSectionAnalysis.h.

Spectrum ana::nueccinc::NueCCIncEnhancedSamples::fAnalysisSigNuTree2D
protected

Definition at line 285 of file NueCCIncCrossSectionAnalysis.h.

std::vector<Spectrum*> ana::nueccinc::NueCCIncEnhancedSamples::fTemplates3D
protected

Definition at line 281 of file NueCCIncCrossSectionAnalysis.h.

Spectrum ana::nueccinc::NueCCIncEnhancedSamples::fUnfolding1D
protected

Definition at line 286 of file NueCCIncCrossSectionAnalysis.h.

Spectrum ana::nueccinc::NueCCIncEnhancedSamples::fUnfolding2D
protected

Definition at line 287 of file NueCCIncCrossSectionAnalysis.h.

double ana::nueccinc::NueCCIncEnhancedSamples::numCuts
protected

Definition at line 288 of file NueCCIncCrossSectionAnalysis.h.


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