NueVars.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "CAFAna/Core/Var.h"
4 
5 #include "CAFAna/Vars/Vars.h"
8 
9 namespace ana
10 {
11  /// Raw energy (without calE correction) for the slice,
12  extern const Var kRawE;
13 
14  /// Raw energy (without calE correction) for the leading shower,
15  extern const Var kRawEshw;
16 
17  /// Raw energy (without calE correction) for the slice - leading shower,
18  extern const Var kRawEhad;
19 
20  /// 2D Variable (Energy x 2018CVN Likelyhood)
21  extern const Var kEnergyCVNSS2D;
22 
23  //-----------------------------------------
24  // Variables for containment cuts
25  // Distances of all showers in slice from
26  // various detector edges.
27  //-----------------------------------------
28 
29  /// Distance of all showers in slice from the top edge of detector
30  extern const Var kDistAllTop;
31 
32  /// Distance of all showers in slice from the bottom edge of detector
33  extern const Var kDistAllBottom;
34 
35  /// Distance of all showers in slice from the west edge of detector
36  extern const Var kDistAllWest;
37 
38  /// Distance of all showers in slice from the east edge of detector
39  extern const Var kDistAllEast;
40 
41  /// Distance of all showers in slice from the back edge of detector
42  extern const Var kDistAllBack;
43 
44  /// Distance of all showers in slice from the front edge of detector
45  extern const Var kDistAllFront;
46 
47  //----------------------------------------------------
48  // More distance variables, but using nomenclature from Nue CosRej BDT
49  //----------------------------------------------------
50 
51  /// Distance of all showers in slice from the edge that is not the top
52  extern const Var kDistNotTop;
53 
54  //----------------------------------------------------
55  // Variables needed for transverse momentum cut
56  //----------------------------------------------------
57 
58  /// Maximum y of start and stop points of all showers
59  /// in slice. Higher y means closer to detector top
60  extern const Var kMaxY;
61 
62  /// Transverse momentum fraction in slice
63  extern const Var kPtP;
64 
65 
66  //----------------------------------------------------
67  // Variables needed for backward photon cut
68  //----------------------------------------------------
69 
70  /// Assymmetry in the zero-hit planes at the start and end of the
71  /// shower. Used for rejection of backward cosmic photons in FD
72  extern const Var kSparsenessAsymm;
73 
74  /// Maximum z of start and stop points of all showers
75  /// in slice. Higher z means closer to detector back
76  extern const Var kMaxZ;
77 
78  //----------------------------------------------------
79  // Cosmic Rejection BDT PID variables
80  //---------------------------------------------------
81  extern const Var kCosPID;
82  extern const Var kCosPIDContain;
83 
84  /// 2020 nue cosmic rejection BDT variable - core
85  extern const Var kCosPIDCoreBDT;
86  /// 2020 nue cosmic rejection BDT variable - peripheral
87  extern const Var kCosPIDPeriBDT;
88 
89 } // namespace
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 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 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 kCosPIDContain
Definition: NueVars.cxx:110
const Var kEnergyCVNSS2D
2D Variable (Energy x 2018CVN Likelyhood)
const Var kRawE
Raw energy (without calE correction) for the slice,.
Definition: NueVars.cxx:7
const Var kMaxZ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return-1000.0f;if(sr->vtx.elastic.fuzzyk.nshwlid==0) return-1000.0f;float maxzall=-999.0;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.nshwlid;i++){maxzall=std::max(std::max(sr->vtx.elastic.fuzzyk.png[i].shwlid.start.Z(), sr->vtx.elastic.fuzzyk.png[i].shwlid.stop.Z()), maxzall);}return maxzall;})
Definition: NueVars.h:76
const Var kSparsenessAsymm
Definition: NueVars.cxx:92
_Var< caf::SRProxy > Var
Representation of a variable to be retrieved from a caf::StandardRecord object.
Definition: Var.h:74
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 kRawEshw
Raw energy (without calE correction) for the leading shower,.
Definition: NueVars.cxx:8
const Var kPtP
Transverse momentum fraction in slice.
Definition: NueVars.cxx:90
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 kCosPID
Definition: NueVars.cxx:109
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 kDistNotTop([](const caf::SRProxy *sr){float distnottop=std::min(kDistAllBottom(sr), kDistAllFront(sr));distnottop=std::min(float(kDistAllBack(sr)), distnottop);distnottop=std::min(float(kDistAllEast(sr)), distnottop);distnottop=std::min(float(kDistAllWest(sr)), distnottop);return distnottop;})
Distance of all showers in slice from the edge that is not the top.
Definition: NueVars.h:52
const Var kRawEhad
Raw energy (without calE correction) for the slice - leading shower,.
Definition: NueVars.cxx:9
const Var kCosPIDCoreBDT
2020 nue cosmic rejection BDT variable - core
Definition: NueVars.cxx:112
const Var kCosPIDPeriBDT
2020 nue cosmic rejection BDT variable - peripheral
Definition: NueVars.cxx:113