Functions | Variables
nus17_fd_arrays.h File Reference
#include "CAFAna/Cuts/NueCutsSecondAna.h"
#include "NuXAna/Cuts/NusCuts.h"
#include "NuXAna/Cuts/NusCuts17.h"
#include "NuXAna/Vars/NusVars.h"
#include "NuXAna/Vars/NusVarsTemp.h"

Go to the source code of this file.

Functions

const Cut kCosPIDContainCut ([](const caf::SRProxy *sr){if(sr->sel.nuecosrej.cospidcontain< 0.57) return false;return true;})
 
const Cut kNCPCut ([](const caf::SRProxy *sr){if(sr->sel.cosrej.numucontpid< 0.56) return false;return true;})
 
const Var kDummy ([](const caf::SRProxy *sr){return 1;})
 
const Var kNusEperH ([](const caf::SRProxy *sr){double nhit=(double) sr->slc.nhit;if(nhit< 1.) return 0.;double cale=sr->slc.calE;double recoE=FDscaleCalE17 *cale;return recoE/nhit;})
 
const HistAxis maxyptpaxis ("Shower Max Y", Binning::Simple(320,-800., 800.), kMaxY,"ptp", Binning::Simple(100, 0., 1.), kPartPtp)
 
const HistAxis timedistaxis ("Distance from Closest Slice (cm)", Binning::Simple(100, 0., 2000.), kClosestSlcMinDist,"Closest Slice Dist. from Top", Binning::Simple(140, 0, 700), kClosestSlcMinTop)
 
const HistAxis timeaxis ("Time Gap (#mus)", Binning::Simple(100,-2000, 2000), kClosestSlcTime)
 
const HistAxis disttimeaxis ("Distance from Closest Slice (cm)", Binning::Simple(100, 0, 2000), kClosestSlcMinDist)
 
const HistAxis disttimetopaxis ("Closest Slice Dist. from Top", Binning::Simple(140, 0, 700), kClosestSlcMinTop)
 
const HistAxis dummyaxis ("dummy", bins, kDummy)
 
const HistAxis eaxis ("Visible Energy (GeV)", ebins, kNus17Energy)
 
const HistAxis cvnaxis ("CVN NC Classifier", cvnbins, kCVNnc)
 
const HistAxis cvneaxis ("CVN nue Classifier", cvnbins, kCVNe)
 
const HistAxis cvnmaxis ("CVN numu Classifier", cvnbins, kCVNm)
 
const HistAxis ncidaxis ("NC Cosmic Rejection BDT", ncidbins, kNCCosRejAlt)
 
const HistAxis zaxis ("Shower Max Z", zbins, kMaxZ)
 
const HistAxis nmichelaxis ("Number of Michel Electrons", nmichelbins, kNMichels)
 
const HistAxis yaxis ("Shower Max Y", ybins, kMaxY)
 
const HistAxis ptpaxis ("p_{T}/p", ptpbins, kPartPtp)
 
const HistAxis distaxis ("Distance to Top (cm)", distbins, kDistTop)
 
const HistAxis hitaxis ("Number of hits", hitbins, kNHit)
 
const HistAxis lprongaxis ("Longest Prong", lprongbins, kLongestProng)
 
const HistAxis distalltopaxis ("Distance (all prongs) to Top (cm)", distbins, kDistAllTop)
 
const HistAxis distallbottomaxis ("Distance (all prongs) to Bottom (cm)", distbins, kDistAllBottom)
 
const HistAxis distalleastaxis ("Distance (all prongs) to East (cm)", distbins, kDistAllEast)
 
const HistAxis distallwestaxis ("Distance (all prongs) to West (cm)", distbins, kDistAllWest)
 
const HistAxis distallfrontaxis ("Distance (all prongs) to Front (cm)", distbins, kDistAllFront)
 
const HistAxis distallbackaxis ("Distance (all prongs) to Back (cm)", distbins, kDistAllBack)
 
const HistAxis numucontaxis ("(numu) Cosmic Rejection BDT", cvnbins, kNCP)
 
const HistAxis numusaaxis ("numuSA", cvnbins, kNumuSA)
 

Variables

const int ncuts = 10
 
const Cut cutsarray [ncuts]
 
const std::string cutnames [ncuts]
 
const int ncuts_nminus1 = 10
 
const std::string cutnames_nminus1 [ncuts_nminus1]
 
const Cut cutsarray_nminus1 [ncuts_nminus1]
 
const Var kNCP = SIMPLEVAR(sel.cosrej.numucontpid)
 
const Var kNumuSA = SIMPLEVAR(sel.cosrej.numuSAcontpid)
 
const Binning bins = Binning::Simple(1,0.5,1.5)
 
const Binning ebins = Binning::Simple(1200,0,120)
 
const Binning cvnbins = Binning::Simple(100,0.,1.)
 
const Binning ncidbins = Binning::Simple(100,0.,1.)
 
const Binning ncidgbins = Binning::Simple(100,-1.,1.)
 
const Binning zbins = Binning::Simple(1210, -50., 6000.)
 
const Binning nmichelbins = Binning::Simple(4, 0, 4)
 
const Binning ybins = Binning::Simple(320, -800., 800.)
 
const Binning ptpbins = Binning::Simple(100, 0., 1.)
 
const Binning distbins = Binning::Simple(160, 0., 800.)
 
const Binning hitbins = Binning::Simple(300,0,300)
 
const Binning lprongbins = Binning::Simple(300,0,600)
 
const int nvars = 22
 
const HistAxis axisarray [nvars]
 
const std::string axisarray_names [nvars]
 
const std::string axisarray_names_opt [nvars]
 
const std::string axisarray_names_xaxis [nvars]
 

Function Documentation

const HistAxis cvnaxis ( "CVN NC Classifier ,
cvnbins  ,
kCVNnc   
)
const HistAxis cvneaxis ( "CVN nue Classifier ,
cvnbins  ,
kCVNe   
)
const HistAxis cvnmaxis ( "CVN numu Classifier ,
cvnbins  ,
kCVNm   
)
const HistAxis distallbackaxis ( "Distance (all prongs) to Back (cm)"  ,
distbins  ,
kDistAllBack   
)
const HistAxis distallbottomaxis ( "Distance (all prongs) to Bottom (cm)"  ,
distbins  ,
kDistAllBottom   
)
const HistAxis distalleastaxis ( "Distance (all prongs) to East (cm)"  ,
distbins  ,
kDistAllEast   
)
const HistAxis distallfrontaxis ( "Distance (all prongs) to Front (cm)"  ,
distbins  ,
kDistAllFront   
)
const HistAxis distalltopaxis ( "Distance (all prongs) to Top (cm)"  ,
distbins  ,
kDistAllTop   
)
const HistAxis distallwestaxis ( "Distance (all prongs) to West (cm)"  ,
distbins  ,
kDistAllWest   
)
const HistAxis distaxis ( "Distance to Top (cm)"  ,
distbins  ,
kDistTop   
)
const HistAxis disttimeaxis ( "Distance from Closest Slice (cm)"  ,
Binning::Simple(100, 0, 2000)  ,
kClosestSlcMinDist   
)
const HistAxis disttimetopaxis ( "Closest Slice Dist. from Top"  ,
Binning::Simple(140, 0, 700)  ,
kClosestSlcMinTop   
)
const HistAxis dummyaxis ( "dummy"  ,
bins  ,
kDummy   
)
const HistAxis eaxis ( "Visible Energy (GeV)"  ,
ebins  ,
kNus17Energy   
)
const HistAxis hitaxis ( "Number of hits ,
hitbins  ,
kNHit   
)
const Cut kCosPIDContainCut ( [] (const caf::SRProxy *sr){if(sr->sel.nuecosrej.cospidcontain< 0.57) return false;return true;}  )
const Var kDummy ( [] (const caf::SRProxy *sr){return 1;}  )
const Cut kNCPCut ( [] (const caf::SRProxy *sr){if(sr->sel.cosrej.numucontpid< 0.56) return false;return true;}  )
const Var kNusEperH ( [] (const caf::SRProxy *sr){double nhit=(double) sr->slc.nhit;if(nhit< 1.) return 0.;double cale=sr->slc.calE;double recoE=FDscaleCalE17 *cale;return recoE/nhit;}  )
const HistAxis lprongaxis ( "Longest Prong"  ,
lprongbins  ,
kLongestProng   
)
const HistAxis maxyptpaxis ( "Shower Max Y ,
Binning::Simple(320,-800., 800.)  ,
kMaxY  ,
"ptp"  ,
Binning::Simple(100, 0., 1.)  ,
kPartPtp   
)

Referenced by nus17_fd_cut_tables2D().

const HistAxis ncidaxis ( "NC Cosmic Rejection BDT"  ,
ncidbins  ,
kNCCosRejAlt   
)
const HistAxis nmichelaxis ( "Number of Michel Electrons"  ,
nmichelbins  ,
kNMichels   
)
const HistAxis numucontaxis ( "(numu) Cosmic Rejection BDT"  ,
cvnbins  ,
kNCP   
)
const HistAxis numusaaxis ( "numuSA"  ,
cvnbins  ,
kNumuSA   
)
const HistAxis ptpaxis ( "p_{T}/p ,
ptpbins  ,
kPartPtp   
)
const HistAxis timeaxis ( "Time Gap (#mus)"  ,
Binning::Simple(100,-2000, 2000)  ,
kClosestSlcTime   
)
const HistAxis timedistaxis ( "Distance from Closest Slice (cm)"  ,
Binning::Simple(100, 0., 2000.)  ,
kClosestSlcMinDist  ,
"Closest Slice Dist. from Top"  ,
Binning::Simple(140, 0, 700)  ,
kClosestSlcMinTop   
)

Referenced by nus17_fd_cut_tables2D().

const HistAxis yaxis ( "Shower Max Y ,
ybins  ,
kMaxY   
)
const HistAxis zaxis ( "Shower Max Z ,
zbins  ,
kMaxZ   
)

Variable Documentation

const HistAxis axisarray[nvars]
Initial value:
const HistAxis disttimeaxis("Distance from Closest Slice (cm)", Binning::Simple(100, 0, 2000), kClosestSlcMinDist)
const HistAxis disttimetopaxis("Closest Slice Dist. from Top", Binning::Simple(140, 0, 700), kClosestSlcMinTop)
const HistAxis distallfrontaxis("Distance (all prongs) to Front (cm)", distbins, kDistAllFront)
const HistAxis lprongaxis("Longest Prong", lprongbins, kLongestProng)
const HistAxis distalleastaxis("Distance (all prongs) to East (cm)", distbins, kDistAllEast)
const HistAxis cvnaxis("CVN NC Classifier", cvnbins, kCVNnc)
const HistAxis distallbottomaxis("Distance (all prongs) to Bottom (cm)", distbins, kDistAllBottom)
const HistAxis cvneaxis("CVN nue Classifier", cvnbins, kCVNe)
const HistAxis cvnmaxis("CVN numu Classifier", cvnbins, kCVNm)
const HistAxis ncidaxis("NC Cosmic Rejection BDT", ncidbins, kNCCosRejAlt)
const HistAxis zaxis("Shower Max Z", zbins, kMaxZ)
const HistAxis dummyaxis("dummy", bins, kDummy)
const HistAxis distalltopaxis("Distance (all prongs) to Top (cm)", distbins, kDistAllTop)
const HistAxis distallbackaxis("Distance (all prongs) to Back (cm)", distbins, kDistAllBack)
const HistAxis distallwestaxis("Distance (all prongs) to West (cm)", distbins, kDistAllWest)
const HistAxis eaxis("Visible Energy (GeV)", ebins, kNus17Energy)
const HistAxis hitaxis("Number of hits", hitbins, kNHit)
const HistAxis distaxis("Distance to Top (cm)", distbins, kDistTop)
const HistAxis ptpaxis("p_{T}/p", ptpbins, kPartPtp)
const HistAxis timeaxis("Time Gap (#mus)", Binning::Simple(100,-2000, 2000), kClosestSlcTime)
const HistAxis numusaaxis("numuSA", cvnbins, kNumuSA)
const HistAxis yaxis("Shower Max Y", ybins, kMaxY)

Definition at line 169 of file nus17_fd_arrays.h.

Referenced by nus17_fd_cut_tables().

const std::string axisarray_names[nvars]
Initial value:
= {"dummy",
"time","disttime","disttimetop","lprong",
"nusE", "cvn", "cvne","cvnm",
"maxz", "maxy", "ncid",
"ptp", "disttop", "distalltop",
"distallbottom","distalleast",
"distallwest","distallfront",
"distallback", "numusa", "hits"}

Definition at line 178 of file nus17_fd_arrays.h.

Referenced by print_tables().

const std::string axisarray_names_opt[nvars]
Initial value:
= {"dummy",
"Time Gap (#mus)",
"Distance from Closest Slice (cm)",
"Closest Slice Dist. from Top",
"Longest Prong",
"Visible Energy (GeV)",
"CVN NC Classifier",
"CVN nue Classifier",
"CVN numu Classifier",
"Shower Max Z",
"Shower Max Y",
"NC Cosmic Rejection BDT",
"p_{T}",
"Distance to Top (cm)",
"Distance (all prongs) to Top (cm)",
"Distance (all prongs) to Bottom (cm)",
"Distance (all prongs) to East (cm)",
"Distance (all prongs) to West (cm)",
"Distance (all prongs) to Front (cm)",
"Distance (all prongs) to Back (cm)",
"numuSA",
"Number of hits"
}

Definition at line 187 of file nus17_fd_arrays.h.

Referenced by print_tables().

const std::string axisarray_names_xaxis[nvars]
Initial value:
= {"dummy",
"Time Gap (#mus)",
"Distance from Closest Slice (cm)",
"Closest Slice Dist. from Top (cm)",
"Longest Prong (cm)",
"Visible Energy (GeV)",
"CVN NC Classifier",
"CVN nue Classifier",
"CVN numu Classifier",
"Shower Max Z (cm)",
"Shower Max Y (cm)",
"NC Cosmic Rejection BDT",
"p_{T}/p",
"Distance to Top (cm)",
"Distance (all prongs) to Top (cm)",
"Distance (all prongs) to Bottom (cm)",
"Distance (all prongs) to East (cm)",
"Distance (all prongs) to West (cm)",
"Distance (all prongs) to Front (cm)",
"Distance (all prongs) to Back (cm)",
"numuSA",
"Number of hits"
}

Definition at line 211 of file nus17_fd_arrays.h.

Referenced by print_tables().

const Binning bins = Binning::Simple(1,0.5,1.5)
const std::string cutnames[ncuts]
Initial value:
= {
"nocut",
"veto",
"eq17",
"contain17",
"nueback17",
"cosrej17",
"cvn17",
"nus17time",
"nus17shw",
"nus17all"
}

Definition at line 41 of file nus17_fd_arrays.h.

Referenced by readNtuple::Loop(), nus17_fd_cut_tables(), and print_nus17_fd_cut_tables().

const std::string cutnames_nminus1[ncuts_nminus1]
Initial value:
= {
"nocut",
"veto",
"eq",
"contain",
"nueback",
"cosrej",
"cvnnc",
"time",
"shwptp",
"vise"
}

Definition at line 56 of file nus17_fd_arrays.h.

Referenced by nus17_fd_cut_tables(), nus17_fd_cut_tables2D(), print_nus17_fd_cut_tables(), print_nus17_fd_cut_tables2D(), and print_tables().

const Cut cutsarray[ncuts]
Initial value:
= {
kNus17Veto && kApplySecondAnalysisMask && kNus17EventQuality,
kNus17Veto && kApplySecondAnalysisMask && kNus17EventQuality && kNus17FDContain,
kNus17Veto && kApplySecondAnalysisMask && kNus17EventQuality && kNus17FDContain && kNus17BackwardCut,
kNus17Veto && kApplySecondAnalysisMask && kNus17EventQuality && kNus17FDContain && kNus17BackwardCut && kNus17NCCosRejAlt,
kNus17Veto && kApplySecondAnalysisMask && kNus17EventQuality && kNus17FDContain && kNus17BackwardCut && kNus17NCCosRejAlt && kNus17CVNnc,
kNus17Veto && kApplySecondAnalysisMask && kNus17EventQuality && kNus17FDContain && kNus17BackwardCut && kNus17NCCosRejAlt && kNus17CVNnc && !(kNus17SlcTimeGap && kNus17SlcDist),
kNus17Veto && kApplySecondAnalysisMask && kNus17EventQuality && kNus17FDContain && kNus17BackwardCut && kNus17NCCosRejAlt && kNus17CVNnc && !(kNus17SlcTimeGap && kNus17SlcDist) && !(kNus17ShwPtpLow || kNus17ShwPtpHigh),
kNus17Veto && kApplySecondAnalysisMask && kNus17EventQuality && kNus17FDContain && kNus17BackwardCut && kNus17NCCosRejAlt && kNus17CVNnc && !(kNus17SlcTimeGap && kNus17SlcDist) && !(kNus17ShwPtpLow || kNus17ShwPtpHigh) && kNus17EnergyCut
}
const Cut kNus17EnergyCut([](const caf::SRProxy *sr){double energy=0.0;energy=kNus17Energy(sr);if(energy< 0.25) return false;if(energy > 10.0) return false;return true;})
Definition: NusCuts17.h:51
const Cut kApplySecondAnalysisMask([](const caf::SRProxy *sr){if(sr->hdr.det!=caf::kFARDET) return true; std::bitset< 14 > binary(sr->hdr.dibmask);std::pair< int, int > planesA=calcFirstLastLivePlane(sr->slc.firstplane, binary);std::pair< int, int > planesB=calcFirstLastLivePlane(sr->slc.lastplane, binary);if((planesA.first!=planesB.first)||(planesA.second!=planesB.second)) return false;return((planesA.second-planesA.first+1)/64 >=4);})
Definition: AnalysisMasks.h:18
const Cut kNus17CVNnc([](const caf::SRProxy *sr){if(sr->slc.nhit < 25) return false;std::cout<< "ERROR::kNus17CVNnc. Looking for cvnProd3Train. Branch no longer exists."<< std::endl;abort();return true;})
Definition: NusCuts17.h:49
const Cut kNus17BackwardCut
FD backward photon rejection cut, inherited from nue, from docdb 21113.
Definition: NusCuts17.h:45
const Cut kNus17FDContain
FD Containment, nue-inspired, from docdb 21113.
Definition: NusCuts17.h:28
const Cut kNus17SlcDist
Definition: NusCuts17.h:55
const Cut kNus17ShwPtpLow
Carve out space in shower maximum y and #p_{T}/p, from docdb 21113.
Definition: NusCuts17.h:58
const Cut kNus17NCCosRejAlt
Until nccosrej branch is in CAFs, must use these cuts.
Definition: NusCuts17.h:70
const Cut kNus17Veto([](const caf::SRProxy *sr){return sr->sel.veto.keep;})
Definition: NusCuts17.h:25
const Cut kNus17ShwPtpHigh
Definition: NusCuts17.h:59
const Cut kNus17SlcTimeGap
Closest slice cuts based on approximation in space and time, from from docdb 21113.
Definition: NusCuts17.h:54
const Cut kNus17EventQuality([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;if(sr->sel.nuecosrej.hitsperplane >=8) return false;if(sr->vtx.elastic.fuzzyk.npng==0) return false;if(sr->slc.ncontplanes<=2) return false;return true;})
Data Quality cuts from docdb 21113.
Definition: NusCuts17.h:21

Definition at line 27 of file nus17_fd_arrays.h.

Referenced by nus17_fd_cut_tables().

const Cut cutsarray_nminus1[ncuts_nminus1]
Initial value:
= {
}
const Cut kNus17EnergyCut([](const caf::SRProxy *sr){double energy=0.0;energy=kNus17Energy(sr);if(energy< 0.25) return false;if(energy > 10.0) return false;return true;})
Definition: NusCuts17.h:51
const Cut kApplySecondAnalysisMask([](const caf::SRProxy *sr){if(sr->hdr.det!=caf::kFARDET) return true; std::bitset< 14 > binary(sr->hdr.dibmask);std::pair< int, int > planesA=calcFirstLastLivePlane(sr->slc.firstplane, binary);std::pair< int, int > planesB=calcFirstLastLivePlane(sr->slc.lastplane, binary);if((planesA.first!=planesB.first)||(planesA.second!=planesB.second)) return false;return((planesA.second-planesA.first+1)/64 >=4);})
Definition: AnalysisMasks.h:18
const Cut kNus17CVNnc([](const caf::SRProxy *sr){if(sr->slc.nhit < 25) return false;std::cout<< "ERROR::kNus17CVNnc. Looking for cvnProd3Train. Branch no longer exists."<< std::endl;abort();return true;})
Definition: NusCuts17.h:49
const Cut kNus17BackwardCut
FD backward photon rejection cut, inherited from nue, from docdb 21113.
Definition: NusCuts17.h:45
const Cut kNus17FDContain
FD Containment, nue-inspired, from docdb 21113.
Definition: NusCuts17.h:28
const Cut kNus17SlcDist
Definition: NusCuts17.h:55
const Cut kNus17ShwPtpLow
Carve out space in shower maximum y and #p_{T}/p, from docdb 21113.
Definition: NusCuts17.h:58
const Cut kNus17NCCosRejAlt
Until nccosrej branch is in CAFs, must use these cuts.
Definition: NusCuts17.h:70
const Cut kNus17Veto([](const caf::SRProxy *sr){return sr->sel.veto.keep;})
Definition: NusCuts17.h:25
const Cut kNus17ShwPtpHigh
Definition: NusCuts17.h:59
const Cut kNus17SlcTimeGap
Closest slice cuts based on approximation in space and time, from from docdb 21113.
Definition: NusCuts17.h:54
const Cut kNus17EventQuality([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;if(sr->sel.nuecosrej.hitsperplane >=8) return false;if(sr->vtx.elastic.fuzzyk.npng==0) return false;if(sr->slc.ncontplanes<=2) return false;return true;})
Data Quality cuts from docdb 21113.
Definition: NusCuts17.h:21

Definition at line 69 of file nus17_fd_arrays.h.

Referenced by nus17_fd_cut_tables(), and nus17_fd_cut_tables2D().

const Binning cvnbins = Binning::Simple(100,0.,1.)

Definition at line 121 of file nus17_fd_arrays.h.

const Binning distbins = Binning::Simple(160, 0., 800.)

Definition at line 146 of file nus17_fd_arrays.h.

const Binning ebins = Binning::Simple(1200,0,120)

Definition at line 117 of file nus17_fd_arrays.h.

const Binning hitbins = Binning::Simple(300,0,300)

Definition at line 149 of file nus17_fd_arrays.h.

const Var kNCP = SIMPLEVAR(sel.cosrej.numucontpid)

Definition at line 90 of file nus17_fd_arrays.h.

Referenced by AnaResultsLoad(), CutTableLoad(), DataMCLoad(), and ExtendedAxesLoad().

const Var kNumuSA = SIMPLEVAR(sel.cosrej.numuSAcontpid)

Definition at line 91 of file nus17_fd_arrays.h.

const Binning lprongbins = Binning::Simple(300,0,600)

Definition at line 152 of file nus17_fd_arrays.h.

const Binning ncidbins = Binning::Simple(100,0.,1.)

Definition at line 126 of file nus17_fd_arrays.h.

const Binning ncidgbins = Binning::Simple(100,-1.,1.)

Definition at line 127 of file nus17_fd_arrays.h.

const int ncuts = 10

Definition at line 9 of file nus17_fd_arrays.h.

Referenced by nus17_fd_cut_tables(), print_nus17_fd_cut_tables(), and print_tables().

const int ncuts_nminus1 = 10
const Binning nmichelbins = Binning::Simple(4, 0, 4)

Definition at line 136 of file nus17_fd_arrays.h.

const int nvars = 22
const Binning ptpbins = Binning::Simple(100, 0., 1.)

Definition at line 143 of file nus17_fd_arrays.h.

const Binning ybins = Binning::Simple(320, -800., 800.)

Definition at line 140 of file nus17_fd_arrays.h.

const Binning zbins = Binning::Simple(1210, -50., 6000.)