CutVariables.h
Go to the documentation of this file.
1 #pragma once
2 
3 // CAFAna vars
5 #include "CAFAna/Core/Binning.h"
6 #include "CAFAna/Core/Spectrum.h"
10 #include "CAFAna/Cuts/Cuts.h"
11 #include "CAFAna/Vars/Vars.h"
12 #include "CAFAna/Vars/TruthVars.h"
13 
14 // 3flav includes
19 
20 // nus includes
21 #include "NuXAna/Vars/NusVars.h"
23 #include "NuXAna/Cuts/NusCuts20.h"
24 #include "NuXAna/Cuts/NusCuts.h"
27 
28 std::vector<VarContainer> varsFD = {
29  VarContainer(ana::kIsElastic , "kIsElastic" , "Number of Elastic Vertices" , kIsElasticBins , {1} , kLow ) ,
30  VarContainer(ana::kNFuzzyProng , "kNFuzzyProng" , "Number of Fuzzy Prongs" , kNFuzzyProngBins , {1} , kLow ) ,
31  VarContainer(ana::kNContPlanes , "kNContPlanes" , "Number of Continuous Planes" , kNContPlanesBins , {3} , kLow ) ,
32  VarContainer(ana::kVtxX , "kVtxX" , "Vertex x (cm)" , kFDVtxXBins , {0} , kNeither) ,
33  VarContainer(ana::kVtxY , "kVtxY" , "Vertex y (cm)" , kFDVtxYBins , {0} , kNeither) ,
34  VarContainer(ana::kVtxZ , "kVtxZ" , "Vertex z (cm)" , kFDVtxZBins , {0} , kNeither) ,
35  VarContainer(ana::kDistAllTop , "kDistAllTop" , "Minimum Prong Distance Top (cm)" , kFDDistAllTopBins , {100} , kLow ) ,
36  VarContainer(ana::kDistAllBottom , "kDistAllBottom" , "Minimum Prong Distance Bottom (cm)" , kFDDistAllBottomBins , {100} , kLow ) ,
37  VarContainer(ana::kDistAllEast , "kDistAllEast" , "Minimum Prong Distance East (cm)" , kFDDistAllEastBins , {100} , kLow ) ,
38  VarContainer(ana::kDistAllWest , "kDistAllWest" , "Minimum Prong Distance West (cm)" , kFDDistAllWestBins , {100} , kLow ) ,
39  VarContainer(ana::kDistAllFront , "kDistAllFront" , "Minimum Prong Distance Front (cm)" , kFDDistAllFrontBins , {160} , kLow ) ,
40  VarContainer(ana::kDistAllBack , "kDistAllBack" , "Minimum Prong Distance Back (cm)" , kFDDistAllBackBins , {160} , kLow ) ,
41  VarContainer(ana::kCVNnc_oldpresel , "kCVNnc_oldpresel" , "CVN score" , kCVNBins , {0.0} , kLow ) ,
42  VarContainer(ana::kCVNnc_looseptp , "kCVNnc_looseptp" , "CVN Score" , kCVNBins , {0.1} , kLow ) ,
43  VarContainer(ana::kCaloE , "kCaloE" , "Calorimetric Energy (GeV)" , ana::kNCFDBinning , {0.0} , kNeither) ,
44  VarContainer(ana::kHitsPerPlane , "kHitsPerPlane" , "Number of Hits Per Plane" , kHitsPerPlaneBins , {0.0} , kHigh) ,
45  VarContainer(ana::kNSliceHits , "kNSliceHits" , "Number of Hits Per Slice" , kFDNSliceHitsBins , {0.0} , kLow) ,
46  VarContainer(ana::kPartPtp , "kPartPtp" , "Tranverse Momentum Fraction" , kPartPtpBins , {0.0} , kHigh) ,
47  VarContainer(ana::kShwNHitX , "kShwNHitX" , "Number of Shower Hits (X View)" , kShwNHitXBins , {0.0} , kNeither) ,
48  VarContainer(ana::kShwNHitY , "kShwNHitY" , "Number of Shower Hits (Y View)" , kShwNHitYBins , {0.0} , kNeither) ,
49  VarContainer(ana::kShwNHitXMinY , "kShwNHitXMinY" , "Shower Hits X - Shower Hits Y" , kShwNHitXMinYBins , {0.0} , kNeither) ,
50  VarContainer(ana::kShwDirY , "kShwDirY" , "Shower Y Directional Cosine" , kShwDirYBins , {0.0} , kNeither) ,
51  VarContainer(ana::kShwLen , "kShwLen" , "Shower Length (cm)" , kShwLenBins , {0.0} , kNeither) ,
52  VarContainer(ana::kShwWidth , "kShwWidth" , "Shower Width (cm)" , kShwWidthBins , {0.0} , kNeither) ,
53  VarContainer(ana::kShwGap , "kShwGap" , "Shower Gap (cm)" , kShwGapBins , {0.0} , kNeither) ,
54  VarContainer(ana::kNShwLid , "kNShwLid" , "Number of Showers" , kNShwLidBins , {0.0} , kNeither) ,
55  VarContainer(ana::kNMipHit , "kNMipHit" , "Number of MIP Hits" , kNMipHitBins , {0.0} , kNeither) ,
56  VarContainer(ana::kShwCalE , "kShwCalE" , "Shower Calorimetric Energy (GeV)" , kShwCalEBins , {0.0} , kNeither) ,
57  VarContainer(ana::kShwNHitXPlusY , "kShwNHitXPlusY" , "Shower Hits X + Shower Hits Y" , kShwNHitXPlusYBins , {0.0} , kNeither) ,
58  VarContainer(ana::kShwNHitXOverY , "kShwNHitXOverY" , "Shower Hits X / Shower Hits Y" , kShwNHitXOverYBins , {0.0} , kNeither) ,
59  VarContainer(ana::kNCCosRejBDTA20 , "kNCCosRejBDTA20" , "Cosmic Rejection BDT (RealAdaBoost)" , kNCCosRejBDTA20Bins , {0.0} , kLow ) ,
60  VarContainer(ana::kNCCosRejBDTG20 , "kNCCosRejBDTG20" , "Cosmic Rejection BDT Score" , kNCCosRejBDTG20Bins , {0.85} , kLow )
61 };
62 
63 std::vector<VarContainer2D> vars2DFD = {
65  "kCaloEkCVNnc_looseptp" ,
66  "Calorimetric Energy (GeV)", "CVN Score (looseptp)",
69  "kCaloEkCVNnc_oldpresel",
70  "Calorimetric Energy (GeV)", "CVN Score (oldpresel)",
72 };
73 
74 std::vector<VarContainer3D> vars3DFD = {
76  "kCaloECVNnc_looseptpNCCosRejBDTG20",
77  "Calorimetric Energy (GeV)", "CVN Score (looseptp)", "Cosmic Rejection BDT (GradBoost)",
79  {0.0}, kNeither)
80 };
81 
82 std::vector<VarContainer> varsND = {
83  VarContainer(ana::kIsElastic , "kIsElastic" , "Number of Elastic Vertices" , kIsElasticBins , {1} , kLow ) ,
84  VarContainer(ana::kNFuzzyProng , "kNFuzzyProng" , "Number of Fuzzy Prongs" , kNFuzzyProngBins , {1} , kLow ) ,
85  VarContainer(ana::kNContPlanes , "kNContPlanes" , "Number of Continuous Planes" , kNContPlanesBins , {3} , kLow ) ,
86  VarContainer(ana::kVtxX , "kVtxX" , "Vertex x (cm)" , kNDVtxXBins , {-100 , 100} , kBoth ) ,
87  VarContainer(ana::kVtxY , "kVtxY" , "Vertex y (cm)" , kNDVtxYBins , {-100 , 100} , kBoth ) ,
88  VarContainer(ana::kVtxZ , "kVtxZ" , "Vertex z (cm)" , kNDVtxZBins , {150 , 1000} , kBoth ) ,
89  VarContainer(ana::kDistAllTop , "kDistAllTop" , "Minimum Prong Distance Top (cm)" , kNDDistAllTopBins , {20} , kLow ) ,
90  VarContainer(ana::kDistAllBottom , "kDistAllBottom" , "Minimum Prong Distance Bottom (cm)" , kNDDistAllBottomBins , {20} , kLow ) ,
91  VarContainer(ana::kDistAllEast , "kDistAllEast" , "Minimum Prong Distance East (cm)" , kNDDistAllEastBins , {20} , kLow ) ,
92  VarContainer(ana::kDistAllWest , "kDistAllWest" , "Minimum Prong Distance West (cm)" , kNDDistAllWestBins , {20} , kLow ) ,
93  VarContainer(ana::kDistAllFront , "kDistAllFront" , "Minimum Prong Distance Front (cm)" , kNDDistAllFrontBins , {150} , kLow ) ,
94  VarContainer(ana::kDistAllBack , "kDistAllBack" , "Minimum Prong Distance Back (cm)" , kNDDistAllBackBins , {50} , kLow ) ,
95  VarContainer(ana::kCVNnc_oldpresel , "kCVNnc_oldpresel" , "CVN score (oldpresel)" , kCVNBins , {0} , kLow ) ,
96  VarContainer(ana::kCVNnc_looseptp , "kCVNnc_looseptp" , "CVN Score" , kCVNBins , {0.98} , kLow ) ,
97  VarContainer(ana::kCaloE , "kCaloE" , "Calorimetric Energy (GeV)" , ana::kNCNDBinning , {0 , 0} , kNeither) ,
98  VarContainer(ana::kHitsPerPlane , "kHitsPerPlane" , "Number of Hits Per Plane" , kHitsPerPlaneBins , {0.0} , kHigh ) ,
99  VarContainer(ana::kNSliceHits , "kNSliceHits" , "Number of Hits Per Slice" , kNDNSliceHitsBins , {0.0} , kLow ) ,
100  VarContainer(ana::kPartPtp , "kPartPtp" , "Tranverse Momentum Fraction" , kPartPtpBins , {1.0} , kHigh )
101 };
102 
103 std::vector<VarContainer2D> vars2DND = {
104  VarContainer2D(ana::kCaloE, ana::kCVNnc_looseptp , "kCaloEkCVNnc_looseptp" , "Calorimetric Energy (GeV)", "CVN Score (looseptp)", ana::kNCNDBinning, kCVNBins, {0.0}, kNeither),
105  VarContainer2D(ana::kCaloE, ana::kCVNnc_oldpresel, "kCaloEkCVNnc_oldpresel", "Calorimetric Energy (GeV)", "CVN Score (oldpresel)", ana::kNCNDBinning, kCVNBins, {0.0}, kNeither),
106 };
107 
108 // not used right now
109 std::vector<VarContainer3D> vars3DND = {};
110 
const ana::Binning kPartPtpBins
const Var kPartPtp([](const caf::SRProxy *sr){if(std::isnan(1.*sr->sel.nuecosrej.partptp)|| std::isinf(1.*sr->sel.nuecosrej.partptp)) return-5.f;return float(sr->sel.nuecosrej.partptp);})
Definition: NusVars.h:74
const Var kShwDirY
Definition: NusVars.cxx:21
const ana::Binning kNDDistAllFrontBins
const ana::Binning kNContPlanesBins
const ana::Binning kFDVtxYBins
const Var kShwNHitX
Definition: NusVars.cxx:19
const Var kDistAllBottom([](const caf::SRProxy *sr){if(std::isnan(1.*sr->sel.nuecosrej.distallpngbottom)) return-1000.0f;return float(sr->sel.nuecosrej.distallpngbottom);})
Distance of all showers in slice from the bottom edge of detector.
Definition: NueVars.h:33
const ana::Binning kFDDistAllBottomBins
const Var kDistAllWest([](const caf::SRProxy *sr){if(std::isnan(1.*sr->sel.nuecosrej.distallpngwest)) return-1000.0f;return float(sr->sel.nuecosrej.distallpngwest);})
Distance of all showers in slice from the west edge of detector.
Definition: NueVars.h:36
const ana::Binning kShwLenBins
const Var kIsElastic
Definition: NusVars.cxx:11
const Var kDistAllTop([](const caf::SRProxy *sr){if(std::isnan(1.*sr->sel.nuecosrej.distallpngtop)) return-1000.0f;return float(sr->sel.nuecosrej.distallpngtop);})
Distance of all showers in slice from the top edge of detector.
Definition: NueVars.h:30
const ana::Binning kShwNHitXBins
const Var kShwNHitXOverY([](const caf::SRProxy *sr){double hitRatio=(double) sr->vtx.elastic.fuzzyk.png[0].shwlid.nhitx/(double) sr->vtx.elastic.fuzzyk.png[0].shwlid.nhity;return hitRatio;})
Definition: NusVars.h:50
const Var kDistAllBack([](const caf::SRProxy *sr){if(std::isnan(1.*sr->sel.nuecosrej.distallpngback)) return-1000.0f;return float(sr->sel.nuecosrej.distallpngback);})
Distance of all showers in slice from the back edge of detector.
Definition: NueVars.h:42
const Var kShwCalE
const ana::Binning kNMipHitBins
const ana::Binning kShwNHitXPlusYBins
const ana::Binning kNDDistAllTopBins
const Var kNContPlanes
Definition: NusVars.cxx:13
const ana::Binning kShwCalEBins
const ana::Binning kShwGapBins
const Var kVtxX
const ana::Binning kNDDistAllBackBins
const ana::Binning kFDDistAllEastBins
const ana::Binning kNCCosRejBDTA20Bins
const ana::Binning kNDDistAllEastBins
const ana::Binning kFDDistAllTopBins
const Var kShwWidth
const Var kNFuzzyProng
Definition: NusVars.cxx:12
const ana::Binning kNCCosRejBDTG20Bins
const ana::Binning kNDNSliceHitsBins
const Var kDistAllEast([](const caf::SRProxy *sr){if(std::isnan(1.*sr->sel.nuecosrej.distallpngeast)) return-1000.0f;return float(sr->sel.nuecosrej.distallpngeast);})
Distance of all showers in slice from the east edge of detector.
Definition: NueVars.h:39
const Var kHitsPerPlane
const ana::Binning kNFuzzyProngBins
std::vector< VarContainer3D > vars3DFD
Definition: CutVariables.h:74
const ana::Binning kShwNHitXMinYBins
const ana::Binning kShwDirYBins
const Var kCaloE
Summed calorimetric energy of all hits in slice, uncorrected.
Definition: Vars.cxx:52
const Var kNMipHit
Definition: NusVars.cxx:23
const ana::Binning kShwNHitXOverYBins
const ana::Binning kFDDistAllFrontBins
std::vector< VarContainer2D > vars2DFD
Definition: CutVariables.h:63
const Var kShwGap
const ana::Binning kNDDistAllBottomBins
const ana::Binning kFDVtxXBins
const ana::Binning kNDVtxZBins
const ana::Binning kNDVtxYBins
const Var kNSliceHits
Definition: NusVars.cxx:18
const ana::Binning kHitsPerPlaneBins
const ana::Binning kShwNHitYBins
std::vector< VarContainer > varsND
Definition: CutVariables.h:82
const ana::Binning kNCCosRejBDT20GReducedBins
const ana::Binning kCVNBins
const ana::Binning kFDDistAllWestBins
const ana::Binning kNShwLidBins
const Var kCVNnc_oldpresel
Definition: NusVars.cxx:15
const Var kShwNHitXPlusY([](const caf::SRProxy *sr){double nHits=sr->vtx.elastic.fuzzyk.png[0].shwlid.nhitx+sr->vtx.elastic.fuzzyk.png[0].shwlid.nhity;return nHits;})
Definition: NusVars.h:49
const ana::Binning kIsElasticBins
const Var kNShwLid
Definition: NusVars.cxx:22
const Binning kNCNDBinning
NC custom binning.
Definition: Binning.cxx:104
const Var kCVNnc_looseptp
Definition: NusVars.cxx:14
const Var kDistAllFront([](const caf::SRProxy *sr){if(std::isnan(1.*sr->sel.nuecosrej.distallpngfront)) return-1000.0f;return float(sr->sel.nuecosrej.distallpngfront);})
Distance of all showers in slice from the front edge of detector.
Definition: NueVars.h:45
const Var kVtxY
std::vector< VarContainer3D > vars3DND
Definition: CutVariables.h:109
std::vector< VarContainer2D > vars2DND
Definition: CutVariables.h:103
const Var kShwNHitXMinY([](const caf::SRProxy *sr){double nHits=sr->vtx.elastic.fuzzyk.png[0].shwlid.nhitx-sr->vtx.elastic.fuzzyk.png[0].shwlid.nhity;return nHits;})
Definition: NusVars.h:43
const Var kVtxZ
const Binning kNCFDBinning
Definition: Binning.cxx:105
const Var kShwNHitY
Definition: NusVars.cxx:20
const ana::Binning kFDNSliceHitsBins
std::vector< VarContainer > varsFD
Definition: CutVariables.h:28
const ana::Binning kNDDistAllWestBins
const Var kNCCosRejBDTG20
Definition: NusVarsTemp.h:28
const Var kShwLen
const ana::Binning kFDDistAllBackBins
const ana::Binning kShwWidthBins
const ana::Binning kFDVtxZBins
const ana::Binning kNDVtxXBins