NuePlotLists.cxx
Go to the documentation of this file.
2 
8 
10 
12 
13 namespace ana
14 {
15  void AddNueHistDefShowerND(std::vector<ana::HistDef>& hd){
16  hd.push_back({"shw_startx", {"Shower X Start (cm)", Binning::Simple(50, -200, +200), kShwStartX}});
17  hd.push_back({"shw_starty", {"Shower Y Start (cm)", Binning::Simple(50, -200, +200), kShwStartY}});
18  hd.push_back({"shw_startz", {"Shower Z Start (cm)", Binning::Simple(60, 0, +1300), kShwStartZ}});
19  hd.push_back({"shw_stopx", {"Shower X Stop (cm)", Binning::Simple(50, -200, +200), kShwStopX}});
20  hd.push_back({"shw_stopy", {"Shower Y Stop (cm)", Binning::Simple(50, -200, +200), kShwStopY}});
21  hd.push_back({"shw_stopz", {"Shower Z Stop (cm)", Binning::Simple(70, 0, +1400), kShwStopZ}});
22  }
23 
24  void AddNueHistDefShowerFD(std::vector<HistDef>& hd){
25  hd.push_back({"shw_startx", {"Shower X Start (cm)", Binning::Simple(50, -800, +800), kShwStartX}});
26  hd.push_back({"shw_starty", {"Shower Y Start (cm)", Binning::Simple(50, -800, +800), kShwStartY}});
27  hd.push_back({"shw_startz", {"Shower Z Start (cm)", Binning::Simple(60, 0, +6000), kShwStartZ}});
28  hd.push_back({"shw_stopx", {"Shower X Stop (cm)", Binning::Simple(50, -800, +800), kShwStopX}});
29  hd.push_back({"shw_stopy", {"Shower Y Stop (cm)", Binning::Simple(50, -800, +800), kShwStopY}});
30  hd.push_back({"shw_stopz", {"Shower Z Stop (cm)", Binning::Simple(70, 0, +6000), kShwStopZ}});
31  }
32 
33  void AddNueHistDefVertexND(std::vector<HistDef>& hd){
34  hd.push_back({"vtx_n", {"Number of vertices", Binning::Simple(3, 0, 3), kNElastic}});
35  hd.push_back({"vtx_x", {"Vertex X (cm)", Binning::Simple(50, -200, +200), kVtxX}});
36  hd.push_back({"vtx_y", {"Vertex Y (cm)", Binning::Simple(50, -200, +200), kVtxY}});
37  hd.push_back({"vtx_z", {"Vertex Z (cm)", Binning::Simple(50, 0, +1000), kVtxZ}});
38  }
39 
40  void AddNueHistDefVertexFD(std::vector<HistDef>& hd){
41  hd.push_back({"vtx_n", {"Number of vertices", Binning::Simple(3, 0, 3), kNElastic}});
42  hd.push_back({"vtx_x", {"Vertex X (cm)", Binning::Simple(50, -800, +800), kVtxX}});
43  hd.push_back({"vtx_y", {"Vertex Y (cm)", Binning::Simple(50, -800, +800), kVtxY}});
44  hd.push_back({"vtx_z", {"Vertex Z (cm)", Binning::Simple(50, 0, +6000), kVtxZ}});
45  }
46 
47  void AddNueHistDefShower(std::vector<HistDef>& hd){
48  hd.push_back({"shw_nshw", {"Number of showers", Binning::Simple(10, 0, 10), kNShwLID}});
49  hd.push_back({"shw_nhit", {"Number of hits in primary shower", Binning::Simple(50, 0, 300), kShwNHit}});
50  hd.push_back({"shw_width", {"Width of primary shower (cm)", Binning::Simple(20, 0, 20), kShwWidth}});
51  hd.push_back({"shw_gap", {"Primary shower gap to vertex (cm)", Binning::Simple(25, 0, 200), kShwGap}});
52  hd.push_back({"shw_efrac", {"Fraction of slice energy in shower", Binning::Simple(52, -.02, 1.02), kShwEFrac}});
53  hd.push_back({"had_e", {"(Slice - Primary Shower) calorimetric energy (GeV)", Binning::Simple(30, 0, 3), kHadCalE}});
54  hd.push_back({"had_e_cvn", {"Total CalE of hadronic showers (GeV)", Binning::Simple(30, 0, 3), kCVNhadE}});
55  hd.push_back({"shw_e_cvn", {"Total CalE of EM showers (GeV)", Binning::Simple(50, 0, 5), kCVNemE}});
56  hd.push_back({"shw_e", {"Primary shower calorimetric energy (GeV)", Binning::Simple(50, 0, 5), kShwCalE}});
57  hd.push_back({"shw_len", {"Length of primary shower (cm)", Binning::Simple(55, 0, 550), kShwLen}});
58  hd.push_back({"inelast", {"Fraction of slice energy outside shower", Binning::Simple(30, -0.2, 1.), kInelasticity}});
59  }
60 
61  void AddNueHistDefForLid(std::vector<HistDef>& hd){
62  hd.push_back({"lid_mulll", {"#mu LLL", Binning::Simple(50, -1.2, 3), kMuLLL}});
63  hd.push_back({"lid_elll", {"e LLL", Binning::Simple(50, -1.2, 3), kELLL}});
64  hd.push_back({"lid_emulll", {"e/#mu LLL", Binning::Simple(50, -1.2, 3), kEMuLLL}});
65  hd.push_back({"lid_eglll", {"e/#gamma LLL", Binning::Simple(50, -1.2, 1.2), kEGLLL}});
66  hd.push_back({"lid_eplll", {"e/p LLL", Binning::Simple(50, -1.2, 1.2), kEPLLL}});
67  hd.push_back({"lid_enlll", {"e/n LLL", Binning::Simple(50, -1.2, 1.2), kENLLL}});
68  hd.push_back({"lid_epilll", {"e/#pi LLL", Binning::Simple(50, -1.2, 1.2), kEPiLLL}});
69  hd.push_back({"lid_epi0lll", {"e/#pi^{0} LLL", Binning::Simple(50, -1.2, 1.2), kEPi0LLL}});
70  hd.push_back({"lid_mullt", {"#mu LLT", Binning::Simple(80, 0, 8), kMuLLT}});
71  hd.push_back({"lid_ellt", {"e LLT", Binning::Simple(80, 0, 8), kELLT}});
72  hd.push_back({"lid_emullt", {"e/#mu LLT", Binning::Simple(30, -1, +2), kEMuLLT}});
73  hd.push_back({"lid_egllt", {"e/#gamma LLT", Binning::Simple(30, -1, +2), kEGLLT}});
74  hd.push_back({"lid_epllt", {"e/p LLT", Binning::Simple(30, -1, +2), kEPLLT}});
75  hd.push_back({"lid_enllt", {"e/n LLT", Binning::Simple(30, -1, +2), kENLLT}});
76  hd.push_back({"lid_epillt", {"e/#pi LLT", Binning::Simple(30, -1, +2), kEPiLLT}});
77  hd.push_back({"lid_epi0llt", {"e/#pi^{0} LLT", Binning::Simple(30, -1, +2), kEPi0LLT}});
78  hd.push_back({"lid_pi0mass", {"#pi^{0} mass (GeV)", Binning::Simple(50, 0, .5), kPi0Mass}});
79  hd.push_back({"lid_costheta", {"cos#theta", Binning::Simple(25, 0, +1), kCosTheta}});
80  }
81 
82  //void AddNueHistDefForCvn(std::vector<HistDef>& hd){
83  // hd.push_back({"cvn_mode", {"QE, RES, DIS, Other", Binning::Simple(4, 0, 4), kCVNMode}});
84  //}
85 
86  void AddNueHistDefPIDs(std::vector<HistDef>& hd){
87  hd.push_back({"id_lid", {"LID", Binning::Simple(120, -0.1, 1.1), kLID}});
88  hd.push_back({"id_lid_zoom", {"LID", Binning::Simple(40, 0.63, 1.05), kLID}});
89  hd.push_back({"id_cvne", {"CVN e", Binning::Simple(100, 0, 1), kCVNSSe}});
90  hd.push_back({"id_cvne_zoom", {"CVN e", Binning::Simple(40, 0.75, 1), kCVNSSe}});
91  }
92 
93  void AddNueHistDefConfusion(std::vector<HistDef>& hd){
94  //All commented out are not needed anymore
95  //hd.push_back({"idconfuse_lemlid", {"Neither, LID, LEM, Both", Binning::Simple(4, 0, 4), kConfusion}});
96  hd.push_back({"idconfuse_cvnlid", {"Neither, LID, CVN, Both", Binning::Simple(4, 0, 4), kConfusionCVNLID}});
97  //hd.push_back({"idconfuse_cvnlem", {"Neither, LEM, CVN, Both", Binning::Simple(4, 0, 4), kConfusionCVNLEM}});
98  }
99 
100  void AddNueHistDefBasic(std::vector<HistDef>& hd){
101  hd.push_back({"CalE", {"E_{cal} (GeV)", Binning::Simple(50, 0, 5), kCaloE}});
102  hd.push_back({"Nhits", {"Number of hits", Binning::Simple(50, 0, 250), kNHit}});
103  hd.push_back({"E_per_hit", {"Calorimetric energy / hit (MeV)", Binning::Simple(40, 0, 40), kEPerHit}});
104  hd.push_back({"RecoE_per_hit", {"Reconstructed Energy / hit (MeV)", Binning::Simple(40, 0, 40), kRecoEPerHit}});
105  hd.push_back({"EM_per_hit", {"EM-Prong CalE / EM hit (MeV)" , Binning::Simple(40, 0, 40), kEMEPerHit}});
106  hd.push_back({"HAD_per_hit", {"Slice - EMProng CalE /slc.nhit - EM hit (MeV)" , Binning::Simple(40, 0, 40), kHADEPerHit}});
107  hd.push_back({"Longprong", {"Longest prong (cm)", Binning::Simple(60, 0, 600), kLongestProng}});
108  hd.push_back({"shw_Ptp", {"p_{T}/p", Binning::Simple(50, 0., 1.), kPtP}});
109  hd.push_back({"Hits_per_plane", {"Hits per plane", Binning::Simple(10, 0, 10), kHitsPerPlane}});
110  hd.push_back({"RecoE2018", {"#E_{reco} (GeV) 2018", Binning::Simple(50, 0, 5), kNueEnergy2018}});
111  hd.push_back({"RecoERHC", {"#E_{reco} (GeV) RHC", Binning::Simple(50, 0, 5), kNueEnergyRHC}});
112  //hd.push_back({"emE2017", {"EM Part in #E_{reco} 2017", Binning::Simple(50, 0, 5), kemE2017}});
113  //hd.push_back({"hadE2017", {"HAD Part in #E_{reco} 2017", Binning::Simple(50, 0, 5), khadE2017}});
114  hd.push_back({"emE2018", {"EM Part in #E_{reco} 2018", Binning::Simple(50, 0, 5), kemE2018}});
115  hd.push_back({"hadE2018", {"HAD Part in #E_{reco} 2018", Binning::Simple(50, 0, 5), khadE2018}});
116  hd.push_back({"emCalE", {"EM-Prong CalE (GeV)", Binning::Simple(50, 0, 5), kemCalE}});
117  hd.push_back({"hadEFrac", {"HAD Part Frac", Binning::Simple(20, 0, 1), kNueHadEFrac}});
118  hd.push_back({"hadEFrac2", {"HADE Frac", Binning::Simple(20, 0, 1), kNueHadEFrac2}});
119  hd.push_back({"hadCalEFrac", {"HadCalE Frac", Binning::Simple(20,0,1), kNueHadCalEFrac}});
120  //hd.push_back({"Cvn2d", {"CVN 2D", Binning::Simple(30, 0, 30), kEnergyCVN2D}});
121  //hd.push_back({"CVN2d", kNue2018Axis});
122  //hd.push_back({"Lid2d", {"LID 2D", Binning::Simple(30, 0, 30), kEnergyLID2D}});
123  //hd.push_back({"Lem2d", {"LEM 2D", Binning::Simple(30, 0, 30), kEnergyLEM2D}});
124  hd.push_back({"NMichels", {"Number of Michel electrons", Binning::Simple(4, 0, 4), kNMichels}});
125  }
126 
127  void AddNueHistDefSelectionExtras(std::vector<HistDef>& hd){
128  hd.push_back({"xsel_cosdang",{"Cosine of angle between two leading prongs",Binning::Simple(100,-1,1),kCosdang}});
129  hd.push_back({"xsel_cosAngle_showers",{"Cosine of angle between two leading showers",Binning::Simple(100,-1,1),kCosAngleNextShower}});
130  hd.push_back({"xsel_XYhit_asymmetry",{"Asymmetry in number of hits betwen X and Y views",Binning::Simple(100,-1,1),kShwHitXYAsymm}});
131  hd.push_back({"xsel_shwhitFrac",{"Fraction of hits in a shower",Binning::Simple(50,0,1),kShwHitFrac}});
132  hd.push_back({"xsel_nplanestofront",{"Number of planes to the front",Binning::Simple(100,0,100),kNPlanesToFront}});
133  hd.push_back({"xsel_distAllFront",{"Distance of all prongs to the front (cm)",Binning::Simple(100,-100,1700),kDistAllFront}});
134  hd.push_back({"xsel_distAllBack",{"Distance of all prongs to the back (cm)",Binning::Simple(100,-100,1700),kDistAllBack}});
135  hd.push_back({"xsel_distAllTop",{"Distance of all prongs to the top (cm)",Binning::Simple(100,-200,400),kDistAllTop}});
136  hd.push_back({"xsel_distAllBottom",{"Distance of all prongs to the bottom (cm)",Binning::Simple(100,-200,400),kDistAllBottom}});
137  hd.push_back({"xsel_distAllEast",{"Distance of all prongs to the east (cm)",Binning::Simple(100,-200,400),kDistAllEast}});
138  hd.push_back({"xsel_distAllWest",{"Distance of all prongs to the west (cm)",Binning::Simple(100,-200,400),kDistAllWest}});
139  hd.push_back({"xsel_shwMaxY",{"Maximum y of all start and stop points (cm)",Binning::Simple(100,-200,200),kMaxY}});
140  hd.push_back({"xsel_sparsenessAsymm",{"Sparseness asymmetry",Binning::Simple(50,-1,1),kSparsenessAsymm}});
141 
142  }
143 
144  void AddNueHistDefTruth(std::vector<HistDef>& hd){
145  hd.push_back({"true_E",{"True neutrino energy (GeV)",Binning::Simple(20,0,10),kTrueE}});
146  hd.push_back({"true_mode",{"Neutrino interaction mode",Binning::Simple(15,-1.5,13.5),kMode}});
147  hd.push_back({"true_nnu",{"Number of neutrinos in nu vector",Binning::Simple(2,-0.5,1.5),SIMPLEVAR(mc.nnu)}});
148  hd.push_back({"true_q2",{"True square of four-momentum transfer",Binning::Simple(20,0,30),kTrueQ2}});
149  hd.push_back({"true_q0",{"True energy transfer",Binning::Simple(20,0,130),kTrueQ0}});
150  }
151 
152  void AddNueHistDefWeight(std::vector<HistDef>& hd){
153  hd.push_back({"wgt_tufts",{"Tufts weight",Binning::Simple(20,0,2),kTuftsWeightCC}});
154  hd.push_back({"wgt_ppfx",{"PPFX CV weight",Binning::Simple(50,0,5),kPPFXFluxCVWgt}});
155  hd.push_back({"wgt_xsec",{"XSec CV weights", Binning::Simple(50,0,5), kXSecCVWgt2018}});
156  }
157 
158  void AddNueHistDefFinalStatesCvn(std::vector<HistDef>& hd){
159  hd.push_back({"fs_electron_cvn", {"Final State Electron CVN",Binning::Simple(50,0,1), kCVNFSElectronScore2018}});
160  hd.push_back({"fs_muon_cvn", {"Final State Muon CVN",Binning::Simple(50,0,1), kCVNFSMuonScore2018}});
161  hd.push_back({"fs_pi0_cvn", {"Final State Pi0 CVN",Binning::Simple(50,0,1), kCVNFSPi0Score2018}});
162  hd.push_back({"fs_pich_cvn", {"Final State Charged Pi CVN",Binning::Simple(50,0,1), kCVNFSChargedPiScore2018}});
163  hd.push_back({"fs_neutron_cvn", {"Final State Neutron CVN",Binning::Simple(50,0,1), kCVNFSNeutronScore2018}});
164  hd.push_back({"cvnfsp", {"CVN Final State proton score",Binning::Simple(50,0,1), kCVNFSProtonScore2018}});
165  }
166 
167  void AddNueHistDefProngCVN(std::vector<HistDef>& hd){
168  hd.push_back({"protoncvn", {"Primary Prong Proton CVN",Binning::Simple(50,0,1), kProtonCVN}});
169  hd.push_back({"othercvn", {"Primary Prong Other CVN",Binning::Simple(50,0,1), kOtherCVN}});
170  hd.push_back({"electroncvn", {"Primary Prong Electron CVN",Binning::Simple(50,0,1), kElectronCVN}});
171  hd.push_back({"photoncvn", {"Primary Prong Photon CVN",Binning::Simple(50,0,1), kPhotonCVN}});
172  hd.push_back({"neutroncvn", {"Primary Prong Neutron CVN",Binning::Simple(50,0,1), kNeutronCVN}});
173  hd.push_back({"muoncvn", {"Primary Prong Muon CVN",Binning::Simple(50,0,1), kMuonCVN}});
174  hd.push_back({"pizerocvn", {"Primary Prong Pizero CVN",Binning::Simple(50,0,1), kPizeroCVN}});
175  //hd.push_back({"cvnfsp", {"CVN Final State proton score",Binning::Simple(50,0,1), kCVNFSProtonScore2018}});
176  }
177 
178 }
const Var kShwNHit
const Var kCVNFSChargedPiScore2018([](const caf::SRProxy *sr){return CVNFinalStateScore2018(sr, 211);})
Charged Pion score from CVN Final State labels, using Prod3Train CVN.
const Var kMode([](const caf::SRProxy *sr){return(sr->mc.nnu==0)?-1:int(sr->mc.nu[0].mode);})
Neutrino interaction mode.
Definition: Vars.h:99
void AddNueHistDefWeight(std::vector< HistDef > &hd)
void AddNueHistDefShowerFD(std::vector< HistDef > &hd)
const Var kCVNemE([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.0;if(sr->vtx.elastic.fuzzyk.npng< 1) return-1.0;double CVNem_CalE=0;for(const caf::SRFuzzyKProngProxy &png:sr->vtx.elastic.fuzzyk.png){double png_CalE=png.shwlid.calE;double emPID=((double) png.cvnpart.photonid+ (double) png.cvnpart.pizeroid+ (double) png.cvnpart.electronid);double haPID=((double) png.cvnpart.protonid+ (double) png.cvnpart.pionid+ (double) png.cvnpart.neutronid+ (double) png.cvnpart.otherid+ (double) png.cvnpart.muonid);if(emPID<=0) continue;if(emPID >=haPID ) CVNem_CalE+=png_CalE;}return CVNem_CalE *CalibrationBugCorrectionFactor(sr->hdr);})
Definition: NueEnergy2017.h:9
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
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 Var kHADEPerHit([](const caf::SRProxy *sr){if((sr->slc.nhit-kEMNhit(sr))>0) return 1000.0 *(sr->slc.calE *CalibrationBugCorrectionFactor(sr->hdr)-kemCalE(sr))/(sr->slc.nhit-kEMNhit(sr));else return-5.;})
Definition: NueVarsExtra.h:21
const Var kConfusionCVNLID([](const caf::SRProxy *sr){std::cout<< "ERROR::kConfusionCVNLID. Looking for cvnProd3Train. Branch no longer exists."<< std::endl;abort();return-5.;})
Definition: NueVarsExtra.h:97
const Var kEPi0LLL
const Var kPPFXFluxCVWgt
Definition: PPFXWeights.h:16
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 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 Var kCVNFSMuonScore2018([](const caf::SRProxy *sr){return CVNFinalStateScore2018(sr, 13);})
Muon score from CVN Final State labels.
const Var kemCalE([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.0;if(sr->vtx.elastic.fuzzyk.npng< 1) return-1.0;double CVNem_CalE=0;for(const caf::SRFuzzyKProngProxy &png:sr->vtx.elastic.fuzzyk.png){double png_CalE=png.calE;double emPID=((double) png.cvnpart.photonid+ (double) png.cvnpart.pizeroid+ (double) png.cvnpart.electronid);double haPID=((double) png.cvnpart.protonid+ (double) png.cvnpart.pionid+ (double) png.cvnpart.neutronid+ (double) png.cvnpart.otherid+ (double) png.cvnpart.muonid);if(emPID<=0) continue;if(emPID >=haPID ) CVNem_CalE+=png_CalE;}return CVNem_CalE *CalibrationBugCorrectionFactor(sr->hdr);})
Definition: NueVarsExtra.h:17
const Var kCosdang
const Var kShwStopX
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 Var kEGLLL
const Var kCVNhadE([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.0;if(sr->vtx.elastic.fuzzyk.npng< 1) return-1.0;const double calE=sr->slc.calE *CalibrationBugCorrectionFactor(sr->hdr);return std::max(calE-kCVNemE(sr), 0.);})
Definition: NueEnergy2017.h:10
void AddNueHistDefBasic(std::vector< HistDef > &hd)
const Var kEGLLT
const Var kENLLT
const Var kShwStartY
void AddNueHistDefFinalStatesCvn(std::vector< HistDef > &hd)
const Var kNueHadEFrac2([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.0;if(sr->vtx.elastic.fuzzyk.npng< 1) return-1.0;if(kNueEnergy2018(sr) >0) return(kRecoHADE(sr)/kNueEnergy2018(sr));else return-5.;})
Definition: NueVarsExtra.h:49
const Var kNueHadEFrac([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.0;if(sr->vtx.elastic.fuzzyk.npng< 1) return-1.0;if(kNueEnergy2018(sr)>0){if(kIsRHC(sr)) return(NueRecoE_2018RHCFit(0.0, kRecoHADE(sr)))/(NueRecoE_2018RHCFit(kRecoEME(sr), kRecoHADE(sr)));else return(NueRecoE_2017FDFit(0.0, kRecoHADE(sr)))/NueRecoE_2017FDFit(kRecoEME(sr), kRecoHADE(sr));}else return-5.;})
Definition: NueVarsExtra.h:48
const Var kPizeroCVN
const Var kTrueQ0
Definition: TruthVars.h:32
const Var kEPerHit([](const caf::SRProxy *sr){if(sr->slc.nhit >0) return 1000.0 *(sr->slc.calE/sr->slc.nhit);else return-5.;})
Definition: NueVarsExtra.h:14
const Var kVtxX
#define SIMPLEVAR(CAFNAME)
For Vars where literally all you need is a single CAF variable.
Definition: Var.h:88
const Var kSparsenessAsymm
Definition: NueVars.cxx:92
const Var kShwEFrac
const Var kLID
PID
Definition: Vars.cxx:27
const Var kHadCalE([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return float(sr->slc.calE);if(sr->vtx.elastic.fuzzyk.nshwlid< 1) return float(sr->slc.calE);return((sr->slc.calE- sr->vtx.elastic.fuzzyk.png[0].shwlid.calE));})
Definition: NueVarsExtra.h:40
const Var kTrueQ2
Definition: TruthVars.h:27
const Var kShwWidth
void AddNueHistDefShowerND(std::vector< ana::HistDef > &hd)
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 kENLLL
const Var kHitsPerPlane
const Var kNueEnergyRHC([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.0;if(sr->vtx.elastic.fuzzyk.npng< 1) return-1.0;return NueRecoE_2018RHCFit(kRecoEME(sr), kRecoHADE(sr));})
Definition: NueEnergy2018.h:23
const Var kPtP
Transverse momentum fraction in slice.
Definition: NueVars.cxx:90
const Var kEMuLLT
const Var kTrueE([](const caf::SRProxy *sr){assert(sr->mc.nnu==1);return sr->mc.nu[0].E;})
Definition: Vars.cxx:85
const Var kShwStopY
const Var kMuLLT
void AddNueHistDefSelectionExtras(std::vector< HistDef > &hd)
const Var kMaxY([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1000.0f;if(sr->vtx.elastic.fuzzyk.nshwlid==0) return-1000.0f;float maxyall=-999.0;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.nshwlid;i++){maxyall=std::max(std::max(sr->vtx.elastic.fuzzyk.png[i].shwlid.start.Y(), sr->vtx.elastic.fuzzyk.png[i].shwlid.stop.Y()), maxyall);}return maxyall;})
Definition: NueVars.h:60
const Var kShwStartX
const Var kLongestProng([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return 0.f;if(sr->vtx.elastic.fuzzyk.npng==0) return 0.f;auto idx=sr->vtx.elastic.fuzzyk.longestidx;return float(sr->vtx.elastic.fuzzyk.png[idx].len);})
Definition: Vars.h:89
const Var kCosAngleNextShower([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-5.f;if(sr->vtx.elastic.fuzzyk.nshwlid >=2) return(sr->vtx.elastic.fuzzyk.png[0].shwlid.dir).Dot(sr->vtx.elastic.fuzzyk.png[1].shwlid.dir);else return-5.f;})
Definition: NueVarsExtra.h:116
const Var kNueEnergy2018([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.0;if(sr->vtx.elastic.fuzzyk.npng< 1) return-1.0;if(kIsRHC(sr)) return kNueEnergyRHC(sr);else return kNueEnergyFHC(sr);})
Definition: NueEnergy2018.h:25
const Var kCaloE
Summed calorimetric energy of all hits in slice, uncorrected.
Definition: Vars.cxx:52
const Var kEPiLLL
const Var kNHit
Definition: Vars.cxx:71
const Var kEMuLLL
const Var kEPiLLT
const Var kEPi0LLT
const Var kShwGap
const Var kMuLLL
const Var kShwStopZ
const Var kELLT
const Var kCVNFSProtonScore2018([](const caf::SRProxy *sr){return CVNFinalStateScore2018(sr, 2212);})
Proton score from CVN Final State labels, using Prod3Train CVN.
const Var kCVNSSe([](const caf::SRProxy *sr){throw std::runtime_error("kCVNSSe is no longer available. Fix your macro so you don't use it.");return-5.;})
2018 nue PID
Definition: Vars.h:52
const Var kELLL
const Var kNMichels([](const caf::SRProxy *sr){int n_me=0;for(int i=0;i< (int) sr->me.nslc;i++) if(sr->me.slc[i].mid > 1. &&sr->me.slc[i].deltat > 1200.) n_me++;for(int i=0;i< (int) sr->me.nkalman;i++) if(sr->me.trkkalman[i].mid > 0. &&sr->me.trkkalman[i].deltat > 800.) n_me++;if(n_me > 2) n_me=2;return n_me;})
Number of SlcME&#39;s assoc with slice.
Definition: Vars.h:85
void AddNueHistDefProngCVN(std::vector< HistDef > &hd)
const Var kRecoEPerHit([](const caf::SRProxy *sr){if(sr->slc.nhit >0) return 1000.0 *(kNueEnergy2018(sr)/sr->slc.nhit);else return-5.;})
Definition: NueVarsExtra.h:15
const Var kNueHadCalEFrac([](const caf::SRProxy *sr){return kHadCalE(sr)/sr->slc.calE;})
Definition: NueVarsExtra.h:52
void AddNueHistDefShower(std::vector< HistDef > &hd)
const Var khadE2018([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.0;if(sr->vtx.elastic.fuzzyk.npng< 1) return-1.0;if(kIsRHC(sr)) return NueRecoE_2018RHCFit(0.0, kRecoHADE(sr));else return NueRecoE_2017FDFit(0.0, kRecoHADE(sr));})
Definition: NueVarsExtra.h:46
const Var kInelasticity([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return 1.f;if(sr->vtx.elastic.fuzzyk.nshwlid< 1) return 1.f;return((sr->slc.calE- sr->vtx.elastic.fuzzyk.png[0].shwlid.calE)/(sr->slc.calE));})
Definition: NueVarsExtra.h:38
void AddNueHistDefVertexFD(std::vector< HistDef > &hd)
void AddNueHistDefTruth(std::vector< HistDef > &hd)
const Var kPhotonCVN
const Var kCVNFSElectronScore2018([](const caf::SRProxy *sr){return CVNFinalStateScore2018(sr, 11);})
Electron score from CVN Final State labels.
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 kMuonCVN
const Var kShwHitFrac([](const caf::SRProxy *sr){if(sr->slc.nhit< 1) return-5.f;if(!sr->vtx.elastic.IsValid) return 0.f;float nhitall=0.0;for(unsigned int j=0;j< sr->vtx.elastic.fuzzyk.nshwlid;j++){nhitall+=sr->vtx.elastic.fuzzyk.png[j].shwlid.nhit;}return(nhitall/sr->slc.nhit);})
Fraction of hits in a 3D shower out of total slice.
Definition: NueVarsExtra.h:125
const Var kVtxY
const Var kTuftsWeightCC
Definition: XsecTunes.h:30
const Var kEMEPerHit([](const caf::SRProxy *sr){if(kEMNhit(sr)>0) return 1000.0 *(kemCalE(sr)/kEMNhit(sr));else return-5.;})
Definition: NueVarsExtra.h:20
const Var kPi0Mass
const Var kXSecCVWgt2018
Definition: XsecTunes.h:48
const Var kNPlanesToFront
const Var kemE2018([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1.0;if(sr->vtx.elastic.fuzzyk.npng< 1) return-1.0;if(kIsRHC(sr)) return NueRecoE_2018RHCFit(kRecoEME(sr), 0.0);else return NueRecoE_2017FDFit(kRecoEME(sr), 0.0);})
Definition: NueVarsExtra.h:45
const Var kElectronCVN
const Var kShwHitXYAsymm([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-5.f;if(sr->vtx.elastic.fuzzyk.nshwlid< 1) return-5.f;float xyhitdiff=sr->vtx.elastic.fuzzyk.png[0].shwlid.nhitx-sr->vtx.elastic.fuzzyk.png[0].shwlid.nhity;float xyhitsum=(sr->vtx.elastic.fuzzyk.png[0].shwlid.nhitx+ sr->vtx.elastic.fuzzyk.png[0].shwlid.nhity);if(xyhitsum >0) return xyhitdiff/xyhitsum;else return-5.f;})
asymmetry between x and y hits of most energetic shower
Definition: NueVarsExtra.h:119
const Var kVtxZ
const Var kEPLLT
void AddNueHistDefForLid(std::vector< HistDef > &hd)
const Var kEPLLL
const Var kNShwLID([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return 0u;return(unsigned int) sr->vtx.elastic.fuzzyk.nshwlid;})
Definition: NueVarsExtra.h:108
const Var kCVNFSNeutronScore2018([](const caf::SRProxy *sr){return CVNFinalStateScore2018(sr, 2112);})
Neutron score from CVN Final Staet labels.
const Var kCosTheta
void AddNueHistDefVertexND(std::vector< HistDef > &hd)
const Var kNElastic([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid){return 0.;}else{return 1.;}})
Definition: NueVarsExtra.h:106
const Var kShwStartZ
const Var kOtherCVN
const Var kShwLen
TH1F * hd
Definition: Xdiff_gwt.C:57
const Var kNeutronCVN
void AddNueHistDefConfusion(std::vector< HistDef > &hd)
static Binning Simple(int n, double lo, double hi, const std::vector< std::string > &labels={})
Definition: Binning.cxx:107
const Var kProtonCVN
void AddNueHistDefPIDs(std::vector< HistDef > &hd)
const Var kCVNFSPi0Score2018([](const caf::SRProxy *sr){return CVNFinalStateScore2018(sr, 111);})
Pi0 score from CVN Final State labels.