#include "OscLib/OscCalcPMNSOpt.h"
#include "OscLib/OscCalcDumb.h"
#include "CAFAna/Cuts/Cuts.h"
#include "CAFAna/Analysis/Style.h"
#include "CAFAna/Cuts/NueCutsFirstAna.h"
#include "CAFAna/Cuts/NumuCuts.h"
#include "CAFAna/Core/SpectrumLoader.h"
#include "CAFAna/Prediction/PredictionNoExtrap.h"
#include "CAFAna/Core/Utilities.h"
#include "CAFAna/Vars/Vars.h"
#include "StandardRecord/Proxy/SRProxy.h"
#include "TArrow.h"
#include "TCanvas.h"
#include "TH1.h"
#include "TH2.h"
#include "TGraph.h"
#include "TLegend.h"
#include <cmath>
#include <fstream>
#include <iomanip>
#include <iostream>
#include "Utilities/func/MathUtil.h"
Go to the source code of this file.
Functions | |
void | Print (std::string prefix, std::string name, std::string suffix="") |
void | resetCalc (osc::IOscCalcAdjustable *calc) |
void | Arrows (TH1 *sigId, double bestCutSoB, double bestCutSoSB, double faCut, bool noarrow=false) |
void | FOMPlot (TH1 *sig, TH1 *bkg, TH1 *bkgCC, TH1 *bkgBeam, TH1 *sig_denom, double *bestCuts, double faCut, std::string suffix, std::string eff_suffix) |
void | GetSpectra (IPrediction *pred, osc::IOscCalc *calc, TH1 *&hSig, TH1 *&hNC, TH1 *&hCC, TH1 *&hBeam, TH1 *&hTotBkg) |
void | PlotSpectra (IPrediction *pred, osc::IOscCalc *calc, std::string title, double maxy=0) |
void | PrintEffs (TH1 *h, const char *title) |
void | PlotEffs (IPrediction *predNum, IPrediction *predDenom, osc::IOscCalc *calc, std::string title, std::string label, std::string id, double maxy=0) |
std::string | PIDLongName (int pidIdx, bool rhc) |
std::string | PIDFileTag (int pidIdx, bool rhc) |
void | nue_pid_effs_paper_numu_neweff () |
Variables | |
const double | kPOTMACRO = 6.754e20 |
const Binning | kRecoEBinning = Binning::Simple(16, 0, 4) |
const Binning | kModeBinning = Binning::Simple(4, -0.5, 3.5) |
const Binning | kYBinning = Binning::Simple(50, 0, 1) |
const Cut | kNumuFAFDContain ( [](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;assert(sr->mc.nnu==1);return( ( (sr->mc.nu[0].E< 5 &&(sr->mc.nu[0].iscc==1 &&abs(sr->mc.nu[0].pdg)==14))|| (sr->mc.nu[0].iscc==0)|| (abs(sr->mc.nu[0].pdg)!=14) )&& ( ((sr->sel.contain.missE/sr->mc.nu[0].E)< 0.01 &&(sr->mc.nu[0].iscc==1 &&abs(sr->mc.nu[0].pdg)==14))|| (sr->mc.nu[0].iscc==0)|| (abs(sr->mc.nu[0].pdg)!=14) )&& sr->slc.nhit >=20 && sr->sel.remid.pid >0 && sr->trk.cosmic.ntracks >0 && sr->mc.nnu >0 && sr->energy.numu.trkccE< 5 && sr->sel.contain.numucontain );}) |
const Cut | kNumuFAFDContainLight ( [](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;assert(sr->mc.nnu==1);return(( (sr->mc.nu[0].E< 5 &&(sr->mc.nu[0].iscc==1 &&abs(sr->mc.nu[0].pdg)==14))|| (sr->mc.nu[0].iscc==0)|| (abs(sr->mc.nu[0].pdg)!=14) )&&( ((sr->sel.contain.missE/sr->mc.nu[0].E)< 0.01 &&(sr->mc.nu[0].iscc==1 &&abs(sr->mc.nu[0].pdg)==14))|| (sr->mc.nu[0].iscc==0)|| (abs(sr->mc.nu[0].pdg)!=14) )&&sr->mc.nnu >0 && sr->energy.numu.trkccE< 5 );}) |
const Var | kTrueEVis ([](const caf::SRProxy *sr){if(sr->mc.nu.empty()) return 0.;double ret=sr->mc.nu[0].E;if(!sr->mc.nu[0].iscc) ret *=sr->mc.nu[0].y;return ret;}) |
const Var | kY ([](const caf::SRProxy *sr){float tmp=0.f;if(sr->mc.nu.empty()) return tmp;tmp=sr->mc.nu[0].y;return tmp;}) |
void Arrows | ( | TH1 * | sigId, |
double | bestCutSoB, | ||
double | bestCutSoSB, | ||
double | faCut, | ||
bool | noarrow = false |
||
) |
Definition at line 156 of file nue_pid_effs_paper_numu_neweff.C.
References kGreen, kRed, and maxy.
Referenced by FOMPlot(), and nue_pid_effs_paper_numu_neweff().
void FOMPlot | ( | TH1 * | sig, |
TH1 * | bkg, | ||
TH1 * | bkgCC, | ||
TH1 * | bkgBeam, | ||
TH1 * | sig_denom, | ||
double * | bestCuts, | ||
double | faCut, | ||
std::string | suffix, | ||
std::string | eff_suffix | ||
) |
Definition at line 210 of file nue_pid_effs_paper_numu_neweff.C.
References Arrows(), om::cout, nd_projection_maker::eff, allTimeWatchdog::endl, stan::math::fabs(), kBlue, kGreen, kRed, productionTest::metric, getGoodRuns4SAM::n, Print(), PandAna.Demos.pi0_spectra::pur, and std::sqrt().
Referenced by nue_pid_effs_paper_numu_neweff().
void GetSpectra | ( | IPrediction * | pred, |
osc::IOscCalc * | calc, | ||
TH1 *& | hSig, | ||
TH1 *& | hNC, | ||
TH1 *& | hCC, | ||
TH1 *& | hBeam, | ||
TH1 *& | hTotBkg | ||
) |
Definition at line 382 of file nue_pid_effs_paper_numu_neweff.C.
References ana::Flavors::kAll, ana::kBeamNueBackgroundColor, ana::Sign::kBoth, ana::Current::kCC, ana::Current::kNC, ana::kNCBackgroundColor, ana::kNueSignalColor, ana::Flavors::kNuEToNuE, ana::kNumuBackgroundColor, ana::Flavors::kNuMuToNuE, ana::Flavors::kNuMuToNuMu, kPOTMACRO, ana::kTotalMCColor, ana::IPrediction::PredictComponent(), ana::Spectrum::ToTH1(), and ana::UniqueName().
Referenced by nue_pid_effs_paper_numu_neweff(), PlotEffs(), and PlotSpectra().
void nue_pid_effs_paper_numu_neweff | ( | ) |
Definition at line 592 of file nue_pid_effs_paper_numu_neweff.C.
References Arrows(), std::asin(), calc, om::cout, update_sam_good_runs_metadata::cuts, e, allTimeWatchdog::endl, FOMPlot(), GetSpectra(), ana::SpectrumLoader::Go(), ana::Flavors::kAll, ana::Sign::kBoth, ana::kCaloE, ana::Current::kCC, ana::kCVNm, ana::kMode, ana::Current::kNC, ana::kNoCut, ana::kNueSignalColor, ana::Flavors::kNuEToNuE, ana::kNumuContainFD, ana::kNumuCosmicRej, kNumuFAFDContain, kNumuFAFDContainLight, ana::kNumuQuality, ana::Flavors::kNuMuToNuE, ana::Flavors::kNuMuToNuMu, kPOTMACRO, ana::kRemID, ana::kTrueEVis(), kY, demo0::loader, demo4::loaderSwap, PIDFileTag(), PIDLongName(), ana::PlotSpectra(), ana::PredictionExtrap::PredictComponent(), ana::IPrediction::PredictComponent(), Print(), osc::_OscCalcPMNSOpt< T >::SetdCP(), osc::_OscCalcPMNSOpt< T >::SetDmsq21(), osc::_OscCalcPMNSOpt< T >::SetDmsq32(), osc::_OscCalcPMNSOpt< T >::SetL(), osc::_OscCalcPMNSOpt< T >::SetRho(), osc::_OscCalcPMNSOpt< T >::SetTh12(), osc::_OscCalcPMNSOpt< T >::SetTh13(), osc::_OscCalcPMNSOpt< T >::SetTh23(), ana::Binning::Simple(), std::sqrt(), and ana::Spectrum::ToTH1().
std::string PIDFileTag | ( | int | pidIdx, |
bool | rhc | ||
) |
Definition at line 578 of file nue_pid_effs_paper_numu_neweff.C.
References runNovaSAM::ret, and string.
Referenced by nue_pid_effs_paper_numu_neweff().
std::string PIDLongName | ( | int | pidIdx, |
bool | rhc | ||
) |
Definition at line 564 of file nue_pid_effs_paper_numu_neweff.C.
References runNovaSAM::ret, and string.
Referenced by nue_pid_effs_paper_numu_neweff().
void PlotEffs | ( | IPrediction * | predNum, |
IPrediction * | predDenom, | ||
osc::IOscCalc * | calc, | ||
std::string | title, | ||
std::string | label, | ||
std::string | id, | ||
double | maxy = 0 |
||
) |
Definition at line 474 of file nue_pid_effs_paper_numu_neweff.C.
References om::cout, allTimeWatchdog::endl, GetSpectra(), maxy, Print(), and PrintEffs().
void PlotSpectra | ( | IPrediction * | pred, |
osc::IOscCalc * | calc, | ||
std::string | title, | ||
double | maxy = 0 |
||
) |
Definition at line 418 of file nue_pid_effs_paper_numu_neweff.C.
References GetSpectra(), MECModelEnuComparisons::leg, and maxy.
void Print | ( | std::string | prefix, |
std::string | name, | ||
std::string | suffix = "" |
||
) |
Definition at line 45 of file nue_pid_effs_paper_numu_neweff.C.
References abs(), ana::assert(), caf::Proxy< caf::SRIDBranch >::contain, caf::Proxy< caf::SRTrackBranch >::cosmic, caf::Proxy< caf::StandardRecord >::energy, kNumuFAFDContain, kNumuFAFDContainLight, ana::kTrueEVis(), kY, caf::Proxy< caf::StandardRecord >::mc, caf::Proxy< caf::SRContain >::missE, caf::Proxy< caf::SRSlice >::nhit, caf::Proxy< caf::SRTruthBranch >::nnu, caf::Proxy< caf::SRTrackBase >::ntracks, caf::Proxy< caf::SRTruthBranch >::nu, caf::Proxy< caf::SREnergyBranch >::numu, caf::Proxy< caf::SRContain >::numucontain, caf::Proxy< caf::SRRemid >::pid, caf::Proxy< caf::SRIDBranch >::remid, runNovaSAM::ret, caf::Proxy< caf::StandardRecord >::sel, caf::Proxy< caf::StandardRecord >::slc, sr, tmp, caf::Proxy< caf::StandardRecord >::trk, and caf::Proxy< caf::SRNumuEnergy >::trkccE.
Referenced by FOMPlot(), nue_pid_effs_paper_numu_neweff(), and PlotEffs().
void PrintEffs | ( | TH1 * | h, |
const char * | title | ||
) |
Definition at line 460 of file nue_pid_effs_paper_numu_neweff.C.
References om::cout, allTimeWatchdog::endl, MECModelEnuComparisons::i, and plotROC::title.
Referenced by PlotEffs().
void resetCalc | ( | osc::IOscCalcAdjustable * | calc | ) |
Definition at line 141 of file nue_pid_effs_paper_numu_neweff.C.
References std::asin(), e, osc::_IOscCalcAdjustable< T >::SetdCP(), osc::_IOscCalcAdjustable< T >::SetDmsq21(), osc::_IOscCalcAdjustable< T >::SetDmsq32(), osc::_IOscCalcAdjustable< T >::SetL(), osc::_IOscCalcAdjustable< T >::SetRho(), osc::_IOscCalcAdjustable< T >::SetTh12(), osc::_IOscCalcAdjustable< T >::SetTh13(), osc::_IOscCalcAdjustable< T >::SetTh23(), and std::sqrt().
const Binning kModeBinning = Binning::Simple(4, -0.5, 3.5) |
Definition at line 40 of file nue_pid_effs_paper_numu_neweff.C.
const Cut kNumuFAFDContain( [](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;assert(sr->mc.nnu==1);return( ( (sr->mc.nu[0].E< 5 &&(sr->mc.nu[0].iscc==1 &&abs(sr->mc.nu[0].pdg)==14))|| (sr->mc.nu[0].iscc==0)|| (abs(sr->mc.nu[0].pdg)!=14) )&& ( ((sr->sel.contain.missE/sr->mc.nu[0].E)< 0.01 &&(sr->mc.nu[0].iscc==1 &&abs(sr->mc.nu[0].pdg)==14))|| (sr->mc.nu[0].iscc==0)|| (abs(sr->mc.nu[0].pdg)!=14) )&& sr->slc.nhit >=20 && sr->sel.remid.pid >0 && sr->trk.cosmic.ntracks >0 && sr->mc.nnu >0 && sr->energy.numu.trkccE< 5 && sr->sel.contain.numucontain );}) |
Referenced by nue_pid_effs_paper_numu_neweff(), and Print().
const Cut kNumuFAFDContainLight( [](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;assert(sr->mc.nnu==1);return( ( (sr->mc.nu[0].E< 5 &&(sr->mc.nu[0].iscc==1 &&abs(sr->mc.nu[0].pdg)==14))|| (sr->mc.nu[0].iscc==0)|| (abs(sr->mc.nu[0].pdg)!=14) )&& ( ((sr->sel.contain.missE/sr->mc.nu[0].E)< 0.01 &&(sr->mc.nu[0].iscc==1 &&abs(sr->mc.nu[0].pdg)==14))|| (sr->mc.nu[0].iscc==0)|| (abs(sr->mc.nu[0].pdg)!=14) )&& sr->mc.nnu >0 && sr->energy.numu.trkccE< 5 );}) |
Referenced by nue_pid_effs_paper_numu_neweff(), and Print().
const double kPOTMACRO = 6.754e20 |
Definition at line 36 of file nue_pid_effs_paper_numu_neweff.C.
Referenced by GetSpectra(), and nue_pid_effs_paper_numu_neweff().
const Binning kRecoEBinning = Binning::Simple(16, 0, 4) |
Definition at line 39 of file nue_pid_effs_paper_numu_neweff.C.
const Var kTrueEVis([](const caf::SRProxy *sr){if(sr->mc.nu.empty()) return 0.;double ret=sr->mc.nu[0].E;if(!sr->mc.nu[0].iscc) ret *=sr->mc.nu[0].y;return ret;}) |
const Var kY([](const caf::SRProxy *sr){float tmp=0.f;if(sr->mc.nu.empty()) return tmp;tmp=sr->mc.nu[0].y;return tmp;}) |
Referenced by nue_pid_effs_paper_numu_neweff(), and Print().
const Binning kYBinning = Binning::Simple(50, 0, 1) |
Definition at line 41 of file nue_pid_effs_paper_numu_neweff.C.