NusPlotLists.cxx
Go to the documentation of this file.
2 
3 #include "NuXAna/Vars/NusVars.h"
6 
8 
9 namespace ana
10 {
11 
12  void AddNusHistDefAna01Basic(std::vector<HistDef>& hd)
13  {
14  hd.push_back({"cvnnc", {"CVN nc", Binning::Simple(100, 0, 1), kCVNnc}});
15  hd.push_back({"nhits", {"Number of hits", Binning::Simple(50, 0, 250), kNHit}});
16  hd.push_back({"calE", {"Calorimetric energy (GeV)", Binning::Simple(100, 0, 5), kCaloE}});
17  hd.push_back({"longprong", {"Longest prong (cm)", Binning::Simple(60, 0, 600), kLongestProng}});
18  hd.push_back({"numucontpid", {"BDT score (numucontpid)", Binning::Simple(100, 0, 1), kNumuContPID}});
19  hd.push_back({"e_per_hit", {"Calorimetric energy / hit (GeV)", Binning::Simple(50, 0, .05), kEPerHit}});
20  hd.push_back({"phot_ptp", {"Photon p_{T}/p", Binning::Simple(50, 0., 1.), kPtpMassless}});
21  hd.push_back({"part_ptp", {"Particle p_{T}/p", Binning::Simple(50, 0., 1.), kPartPtp}});
22  hd.push_back({"hits_per_plane", {"Hits per plane", Binning::Simple(10, 0, 10), kHitsPerPlane}});
23  hd.push_back({"nmichel", {"Number of Michels", Binning::Simple(10, 0, 10), kNMichels}});
24  }
25 
26  void AddNusHistDefTruth(std::vector<HistDef>& hd)
27  {
28  hd.push_back({"true_pt",{"True p_{T}",Binning::Simple(50,0,1),kTruetpT}});
29  hd.push_back({"true_pz",{"True p_{z}",Binning::Simple(60,0,60),kTruetpz}});
30  hd.push_back({"trueE",{"True E",Binning::Simple(100,0,5),kTrueE}});
31  hd.push_back({"true_muE",{"True #mu E",Binning::Simple(100,0,5),kTrueMuonE}});
32  }
33 
34  void AddNusHistDefFDExtra(std::vector<HistDef>& hd)
35  {
36  hd.push_back({"mindistface", {"Min. Distance to any Detector Face (cm)", Binning::Simple(160, 0., 800.), kDistTop}});
37  hd.push_back({"dist_top", {"Distance to Detector Top (cm)", Binning::Simple(160, 0., 800.), kMinDistFace}});
38  }
39 
40  void AddNusHistDefTrack(std::vector<HistDef>& hd)
41  {
42  hd.push_back({"trklength_kal", {"Kalman Track Length", Binning::Simple(60, 0, 600), kTrkLength}});
43  hd.push_back({"trkEperHit_kal", {"Kalman Track Energy / hit (GeV)", Binning::Simple(50, 0., 0.05), kTrkCalEPerNHit}});
44  hd.push_back({"trkNht_kal", {"Number of kalman track hits", Binning::Simple(50, 0., 250.), kTrkNhits}});
45  }
46 
47  std::vector<HistDef> getAllNusAna01NDHistDefs()
48  {
49  std::vector<HistDef> ret;
54  AddNusHistDefTrack(ret);
55  AddNueHistDefPIDs(ret);
56  AddNusHistDefTruth(ret);
57  return ret;
58  }
59 
60  std::vector<HistDef> getAllNusAna01FDHistDefs()
61  {
62  std::vector <HistDef> ret;
68  AddNusHistDefTrack(ret);
69  AddNueHistDefPIDs(ret);
70  return ret;
71  }
72 
73 }//namespace
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
void AddNueHistDefShowerFD(std::vector< HistDef > &hd)
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
std::vector< HistDef > getAllNusAna01NDHistDefs()
const Var kCVNnc
PID
Definition: Vars.cxx:44
void AddNusHistDefTruth(std::vector< HistDef > &hd)
const Var kDistTop([](const caf::SRProxy *sr){return std::min(sr->sel.nuecosrej.starttop, sr->sel.nuecosrej.stoptop);})
Definition: NusVars.h:76
const Var kNumuContPID
Definition: NumuVars.cxx:553
const Var kTrkCalEPerNHit([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return 0.f;return sr->trk.kalman.tracks[0].calE/sr->trk.kalman.tracks[0].nhit;})
Definition: NumuVars.h:68
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 kMinDistFace([](const caf::SRProxy *sr){const caf::SRNueCosRejProxy &cr=sr->sel.nuecosrej;float mindist=10000.;mindist=std::min(mindist, std::min(cr.starteast, cr.stopeast));mindist=std::min(mindist, std::min(cr.startwest, cr.stopwest));mindist=std::min(mindist, std::min(cr.starttop, cr.stoptop));mindist=std::min(mindist, std::min(cr.startbottom, cr.stopbottom));mindist=std::min(mindist, std::min(cr.startfront, cr.stopfront));mindist=std::min(mindist, std::min(cr.startback, cr.stopback));return(mindist > 9999.?(float)-5.:mindist);})
Definition: NusVars.h:78
const Var kTrkLength([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-5.f;return sr->trk.kalman.tracks[0].len/100;})
Definition: NumuVars.h:65
const Var kTruetpT([](const caf::SRProxy *sr){return(sr->mc.nnu==0)?0.:util::pythag(sr->mc.nu[0].beam.tp.X(), sr->mc.nu[0].beam.tp.Y());})
True neutrino ancestor (off-target) pT.
Definition: Vars.h:102
void AddNueHistDefShowerND(std::vector< ana::HistDef > &hd)
const Var kPtpMassless([](const caf::SRProxy *sr){if(std::isnan(1.*sr->sel.nuecosrej.photptp)|| std::isinf(1.*sr->sel.nuecosrej.photptp)) return-1.f;return float(sr->sel.nuecosrej.photptp);})
Definition: NueVarsExtra.h:110
const Var kHitsPerPlane
std::vector< HistDef > getAllNusAna01FDHistDefs()
const Var kTrueE([](const caf::SRProxy *sr){assert(sr->mc.nnu==1);return sr->mc.nu[0].E;})
Definition: Vars.cxx:85
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 kCaloE
Summed calorimetric energy of all hits in slice, uncorrected.
Definition: Vars.cxx:52
const Var kTruetpz([](const caf::SRProxy *sr){return(sr->mc.nnu==0)?0.:float(sr->mc.nu[0].beam.tp.z);})
True neutrino ancestor (off-target) pz.
Definition: Vars.h:105
const Var kNHit
Definition: Vars.cxx:71
void AddNusHistDefTrack(std::vector< HistDef > &hd)
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 AddNueHistDefShower(std::vector< HistDef > &hd)
void AddNueHistDefVertexFD(std::vector< HistDef > &hd)
void AddNusHistDefFDExtra(std::vector< HistDef > &hd)
void AddNusHistDefAna01Basic(std::vector< HistDef > &hd)
const Var kTrueMuonE([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return 0.f;if(sr->mc.nu[0].prim.empty()) return 0.f;if(std::abs(sr->mc.nu[0].prim[0].pdg)!=13) return 0.f;return float(sr->mc.nu[0].prim[0].p.E);})
Definition: NumuVars.h:107
void AddNueHistDefVertexND(std::vector< HistDef > &hd)
TH1F * hd
Definition: Xdiff_gwt.C:57
static Binning Simple(int n, double lo, double hi, const std::vector< std::string > &labels={})
Definition: Binning.cxx:107
void AddNueHistDefPIDs(std::vector< HistDef > &hd)
const Var kTrkNhits([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return 65535;return int(sr->trk.kalman.tracks[0].nhit);})
Definition: NumuVars.h:59