CosmicRejBDTVars.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "CAFAna/Core/Var.h"
4 
5 namespace ana
6 {
7  // --- Some Vars that I want internally within my BDT computations.
8  // --- Max Kal / Cos Trk Cell
9  extern const Var kMinTrkCell;
10 
11  // --- Kalman hit ratio.
12  extern const Var kKalHitRat;
13  // --- Max Kal Trk Start / End Y
14  extern const Var kMaxKalTrStEnY;
15 
16  // --- BPF hit ratio.
17  extern const Var kBPFHitRat;
18  // --- Max BPF Start / End Y
19  extern const Var kMaxBPFStEnY;
20 
21  // --- Is this a neutrino interaction?
22  extern const Var kIsNuVar;
23  // --- Is this a CC interaction?
24  extern const Var kIsCCVar;
25  // --- Is this a NuMu interaction?
26  extern const Var kIsNuMuVar;
27 
28  // ============================= FHC Period 1 Vars -- BPF =============================
29  // --- Period 1 BDT
31  {
32  public:
34  float operator() (const caf::SRProxy* sr) const;
35  protected:
36  void InitTMVA() const;
37 
38  };
40 
41  // ============================= FHC Period 2 Vars -- BPF =============================
42  // --- Period 2 BDT
44  {
45  public:
47  float operator() (const caf::SRProxy* sr) const;
48  protected:
49  void InitTMVA() const;
50 
51  };
53 
54  // ============================= FHC High Gain Vars -- BPF =============================
55  // --- FHC High Gain BDT
57  {
58  public:
60  float operator() (const caf::SRProxy* sr) const;
61  protected:
62  void InitTMVA() const;
63 
64  };
66 
67  // ============================= RHC High Gain Vars -- BPF =============================
68  // --- RHC High Gain BDT
70  {
71  public:
73  float operator() (const caf::SRProxy* sr) const;
74  protected:
75  void InitTMVA() const;
76 
77  };
79 
80  // ============================= FHC Period 1 Vars -- Kal =============================
81  // --- Period 1 BDT
83  {
84  public:
86  float operator() (const caf::SRProxy* sr) const;
87  protected:
88  void InitTMVA() const;
89 
90  };
92 
93  // ============================= FHC Period 2 Vars -- Kal =============================
94  // --- Period 2 BDT
96  {
97  public:
99  float operator() (const caf::SRProxy* sr) const;
100  protected:
101  void InitTMVA() const;
102 
103  };
105 
106  // ============================= FHC High Gain Vars -- Kal =============================
107  // --- FHC High Gain BDT
109  {
110  public:
112  float operator() (const caf::SRProxy* sr) const;
113  protected:
114  void InitTMVA() const;
115 
116  };
118 
119  // ============================= RHC High Gain Vars -- Kal =============================
120  // --- RHC High Gain BDT
122  {
123  public:
125  float operator() (const caf::SRProxy* sr) const;
126  protected:
127  void InitTMVA() const;
128 
129  };
131 
132 }
133 
const Var kIsNuVar([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return-1;if(sr->mc.nu[0].pdg > 0){return 1;}else{return 0;}})
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const Var kKalHitRat([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-5.f;float TrkHit=kTrkNhits(sr);float SlcHit=kNHit(sr);return TrkHit/SlcHit;})
const Var kBDTCosRej_BPF_FHCHigh
Proxy for caf::StandardRecord.
Definition: SRProxy.h:2126
_Var< caf::SRProxy > Var
Representation of a variable to be retrieved from a caf::StandardRecord object.
Definition: Var.h:74
const Var kBDTCosRej_Kal_RHCHigh
const Var kBDTCosRej_BPF_FHCPer1
const Var kMaxBPFStEnY([](const caf::SRProxy *sr){return std::max(kBPFBestMuonStarty(sr), kBPFBestMuonStopy(sr));})
const Var kIsCCVar([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return-1;if(sr->mc.nu[0].iscc){return 1;}else{return 0;}})
const Var kMaxKalTrStEnY([](const caf::SRProxy *sr){return std::max(kTrkStartY(sr), kTrkEndY(sr));})
const Var kBDTCosRej_BPF_FHCPer2
const Var kBDTCosRej_BPF_RHCHigh
caf::StandardRecord * sr
const Var kBPFHitRat([](const caf::SRProxy *sr){float BPFHit=kBPFBestMuonNhits(sr);float SlcHit=kNHit(sr);if(BPFHit==-5) return BPFHit;else return BPFHit/SlcHit;})
const Var kBDTCosRej_Kal_FHCPer1
const Var kIsNuMuVar([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return-1;if(abs(sr->mc.nu[0].pdg)==14){return 1;}else{return 0;}})
const Var kBDTCosRej_Kal_FHCHigh
float operator()(const caf::SRProxy *sr) const
const Var kBDTCosRej_Kal_FHCPer2
const Var kMinTrkCell([](const caf::SRProxy *sr){float CosCell=kCosmicForwardCell(sr)+kCosmicBackwardCell(sr);float KalCell=kKalmanForwardCell(sr)+kKalmanBackwardCell(sr);return std::min(CosCell, KalCell);})