#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/NueCutsSecondAna.h"
#include "CAFAna/Core/SpectrumLoader.h"
#include "CAFAna/Prediction/PredictionNoExtrap.h"
#include "CAFAna/Core/Utilities.h"
#include "CAFAna/Vars/Vars.h"
#include "CAFAna/Vars/NueVars.h"
#include "CAFAna/Vars/GenieWeights.h"
#include "StandardRecord/Proxy/SRProxy.h"
#include "TArrow.h"
#include "TCanvas.h"
#include "TLatex.h"
#include "TH1.h"
#include "TH2.h"
#include "TMarker.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 | Simulation () |
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, TH1 *bck_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 () |
Variables | |
string | fFileName ="test.txt" |
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 Binning | kYvertexBinning = Binning::Simple(40, -800, 800) |
const Binning | kXvertexBinning = Binning::Simple(40, -800, 800) |
const Binning | kZvertexBinning = Binning::Simple(40, 0, 6000) |
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 Cut | ISMC ([](const caf::SRProxy *sr){if(sr->hdr.ismc) return true;return false;}) |
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;}) |
const Var | kXvertex ([](const caf::SRProxy *sr){return sr->vtx.elastic[0].vtx.x;}) |
const Var | kYvertex ([](const caf::SRProxy *sr){return sr->vtx.elastic[0].vtx.y;}) |
const Var | kZvertex ([](const caf::SRProxy *sr){return sr->vtx.elastic[0].vtx.z;}) |
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, | ||
TH1 * | bck_denom, | ||
double * | bestCuts, | ||
double | faCut, | ||
std::string | suffix, | ||
std::string | eff_suffix | ||
) |
Definition at line 195 of file nue_pid_effs.C.
References Arrows(), plot_validation_datamc::c, om::cout, nd_projection_maker::eff, allTimeWatchdog::endl, stan::math::fabs(), MECModelEnuComparisons::i, calib::j, kBlue, kGreen, kRed, Munits::m2, productionTest::metric, getGoodRuns4SAM::n, outFile, Print(), PandAna.Demos.pi0_spectra::pur, and std::sqrt().
Referenced by nue_pid_effs().
void GetSpectra | ( | IPrediction * | pred, |
osc::IOscCalc * | calc, | ||
TH1 *& | hSig, | ||
TH1 *& | hNC, | ||
TH1 *& | hCC, | ||
TH1 *& | hBeam, | ||
TH1 *& | hTotBkg | ||
) |
Definition at line 427 of file nue_pid_effs.C.
References ana::Flavors::kAll, ana::Flavors::kAllNuMu, ana::kBeamNueBackgroundColor, ana::Sign::kBoth, ana::Current::kCC, ana::Current::kNC, ana::kNCBackgroundColor, ana::kNueSignalColor, ana::Flavors::kNuEToNuE, ana::kNumuBackgroundColor, ana::Flavors::kNuMuToNuE, kPOTMACRO, ana::kTotalMCColor, ana::IPrediction::PredictComponent(), ana::Spectrum::ToTH1(), and ana::UniqueName().
Referenced by ana::NumuCC2p2hBkgdEstimator::Background(), nue_pid_effs(), PlotEffs(), and PlotSpectra().
void nue_pid_effs | ( | ) |
Definition at line 662 of file nue_pid_effs.C.
References calc, om::cout, update_sam_good_runs_metadata::cuts, allTimeWatchdog::endl, FOMPlot(), GetSpectra(), ana::SpectrumLoader::Go(), ISMC, ana::Flavors::kAll, ana::kApplySecondAnalysisMask, ana::Sign::kBoth, ana::Current::kCC, ana::kCVNe, ana::kLEM, ana::kMode, ana::Current::kNC, ana::kNoShift, PandAna.var.analysis_vars::kNueEnergy, ana::kNueSignalColor, ana::Flavors::kNuEToNuE, ana::Flavors::kNuMuToNuE, ana::Flavors::kNuMuToNuMu, kPOTMACRO, ana::kTrueEVis(), ana::kTuftsWeightCC, kXvertex, kY, kYvertex, kZvertex, demo0::loader, demo4::loaderSwap, PIDFileTag(), PIDLongName(), ana::PlotSpectra(), ana::PredictionExtrap::PredictComponent(), ana::IPrediction::PredictComponent(), Print(), ana::Binning::Simple(), std::sqrt(), and ana::Spectrum::ToTH1().
std::string PIDFileTag | ( | int | pidIdx, |
bool | rhc | ||
) |
Definition at line 647 of file nue_pid_effs.C.
References runNovaSAM::ret, and string.
Referenced by nue_pid_effs().
std::string PIDLongName | ( | int | pidIdx, |
bool | rhc | ||
) |
Definition at line 632 of file nue_pid_effs.C.
References runNovaSAM::ret, and string.
Referenced by nue_pid_effs().
void PlotEffs | ( | IPrediction * | predNum, |
IPrediction * | predDenom, | ||
osc::IOscCalc * | calc, | ||
std::string | title, | ||
std::string | label, | ||
std::string | id, | ||
double | maxy = 0 |
||
) |
Definition at line 521 of file nue_pid_effs.C.
References om::cout, allTimeWatchdog::endl, GetSpectra(), maxy, Print(), PrintEffs(), x1, submit_syst::x2, y1, and submit_syst::y2.
void PlotSpectra | ( | IPrediction * | pred, |
osc::IOscCalc * | calc, | ||
std::string | title, | ||
double | maxy = 0 |
||
) |
Definition at line 464 of file nue_pid_effs.C.
References genie::utils::style::Format(), GetSpectra(), MECModelEnuComparisons::leg, and maxy.
void Print | ( | std::string | prefix, |
std::string | name, | ||
std::string | suffix = "" |
||
) |
Definition at line 68 of file nue_pid_effs.C.
References caf::Proxy< caf::SRVertexBranch >::elastic, caf::Proxy< caf::StandardRecord >::hdr, ISMC, caf::Proxy< caf::SRHeader >::ismc, ana::kTrueEVis(), kXvertex, kY, kYvertex, kZvertex, caf::Proxy< caf::StandardRecord >::mc, caf::Proxy< caf::SRTruthBranch >::nu, runNovaSAM::ret, Simulation(), sr, tmp, caf::Proxy< caf::SRElastic >::vtx, caf::Proxy< caf::StandardRecord >::vtx, caf::Proxy< caf::SRVector3D >::x, caf::Proxy< caf::SRVector3D >::y, and caf::Proxy< caf::SRVector3D >::z.
Referenced by genie::geometry::FidPolyhedron::clear(), genie::geometry::FidCylinder::FidCylinder(), genie::geometry::FidSphere::FidSphere(), FOMPlot(), genie::geometry::PlaneParam::IsValid(), main(), nue_pid_effs(), genie::flux::operator<<(), plot_ehade_quantbound(), plot_quantbound_twosamples(), plot_quantile_boundaries_2020(), plot_quantile_boundaries_twosamples_2020(), PlotEffs(), and genie::geometry::FidShape::~FidShape().
void PrintEffs | ( | TH1 * | h, |
const char * | title | ||
) |
Definition at line 507 of file nue_pid_effs.C.
References om::cout, allTimeWatchdog::endl, MECModelEnuComparisons::i, and plotROC::title.
Referenced by PlotEffs().
void resetCalc | ( | osc::IOscCalcAdjustable * | calc | ) |
Definition at line 126 of file nue_pid_effs.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().
void Simulation | ( | ) |
string fFileName ="test.txt" |
Definition at line 43 of file nue_pid_effs.C.
const Cut ISMC([](const caf::SRProxy *sr){if(sr->hdr.ismc) return true;return false;}) |
Referenced by nue_pid_effs(), and Print().
const Binning kModeBinning = Binning::Simple(4, -0.5, 3.5) |
Definition at line 48 of file nue_pid_effs.C.
const double kPOTMACRO = 6.754e20 |
Definition at line 44 of file nue_pid_effs.C.
Referenced by GetSpectra(), and nue_pid_effs().
const Binning kRecoEBinning = Binning::Simple(16, 0, 4) |
Definition at line 47 of file nue_pid_effs.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 kXvertex([](const caf::SRProxy *sr){return sr->vtx.elastic[0].vtx.x;}) |
Referenced by nue_pid_effs(), and Print().
const Binning kXvertexBinning = Binning::Simple(40, -800, 800) |
Definition at line 51 of file nue_pid_effs.C.
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 mono::Monopole::analyze(), nnbar::RecoAnalysis::analyze(), htk::HoughTrack::analyze(), change_highlighted_cell(), dozooming(), draw_background(), draw_hit(), draw_hits(), htk::Track3D::dzdt(), mono::Track3D::dzdt(), nnbar::NNbarUtilities::energyBalancingVertex(), nnbar::NNbarUtilities::getCoordinateOfHits(), mono::MonopoleTrack::hit_is_on_track(), mouseover(), nue_pid_effs(), mono::operator<<(), ddthelpers::print(), Print(), hough::HoughT::produce(), mono::Track3D::r2_zt(), request_edarea_size(), screen_to_activecell(), screen_to_cell(), screen_to_plane_unbounded(), setboxes(), and mono::Monopole::view().
const Binning kYBinning = Binning::Simple(50, 0, 1) |
Definition at line 49 of file nue_pid_effs.C.
const Var kYvertex([](const caf::SRProxy *sr){return sr->vtx.elastic[0].vtx.y;}) |
Referenced by nue_pid_effs(), and Print().
const Binning kYvertexBinning = Binning::Simple(40, -800, 800) |
Definition at line 50 of file nue_pid_effs.C.
const Var kZvertex([](const caf::SRProxy *sr){return sr->vtx.elastic[0].vtx.z;}) |
Referenced by nue_pid_effs(), and Print().
const Binning kZvertexBinning = Binning::Simple(40, 0, 6000) |
Definition at line 52 of file nue_pid_effs.C.