CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Discriminants.h
Go to the documentation of this file.
1 #ifndef RecoTauTag_TauTagTools_PFTauDiscriminants
2 #define RecoTauTag_TauTagTools_PFTauDiscriminants
3 
5 
6 /*
7  * Discriminants.h
8  *
9  * Author: Evan K. Friis, UC Davis; friis@physics.ucdavis.edu
10  *
11  * A non-inclusive (for now) set of discriminants to be used for TauID.
12  *
13  * These discriminants inherit from the base class found in PFTauDiscriminantBase.h
14  *
15  * The arguments given in the constructor are:
16  * DiscriminantBase<TYPE>(name, ROOT Branch Name, Is Required, Is Multiple, Default Value)
17  *
18  * Implementation is done by defining the abstract doComputatation(...) method (see src/Discriminants.cc)
19  * The return value(s) should be inserted into 'result', a vector of type TYPE. Note that even if the value returns
20  * a single value, it (and only it) shoudl be inserted into the vector. The vector is automatically cleared by the discriminant
21  * manager.
22  *
23  * Note on adding discriminants: If you get weird vtable errors during linking, make sure that you have implemented the destructor!
24  * i.e. ~DecayMode(){}; versus ~DecayMode();
25  *
26  * TODO: make these macros...
27  *
28  */
29 
30 namespace PFTauDiscriminants {
31 
33 
34 //forward declarations
35 
36 class DecayMode : public DiscriminantBase<int> {
37  public:
38  DecayMode():DiscriminantBase<int>("DecayMode", "I", true, false, -1){};
40  protected:
41  void doComputation(PFTauDiscriminantManager* input, std::vector<int>& result);
42 };
43 
44 class OutlierNCharged : public DiscriminantBase<int> {
45  public:
46  OutlierNCharged():DiscriminantBase<int>("OutlierNCharged", "I", true, false, -1){};
48  protected:
49  void doComputation(PFTauDiscriminantManager* input, std::vector<int>& result);
50 };
51 
52 class OutlierN : public DiscriminantBase<int> {
53  public:
54  OutlierN():DiscriminantBase<int>("OutlierN", "I", true, false, -1){};
55  ~OutlierN(){};
56  protected:
57  void doComputation(PFTauDiscriminantManager* input, std::vector<int>& result);
58 };
59 
60 
61 class Pt : public DiscriminantBase<double> {
62  public:
63  Pt():DiscriminantBase<double>("Pt", "D", true, false, 0.0){};
64  ~Pt(){};
65  protected:
66  void doComputation(PFTauDiscriminantManager* input, std::vector<double>& result);
67 };
68 
69 class Eta : public DiscriminantBase<double> {
70  public:
71  Eta():DiscriminantBase<double>("Eta", "D", true, false, 0.0){};
72  ~Eta(){};
73  protected:
74  void doComputation(PFTauDiscriminantManager* input, std::vector<double>& result);
75 };
76 
77 class MainTrackPt : public DiscriminantBase<double> {
78  public:
79  MainTrackPt():DiscriminantBase<double>("MainTrackPt", "D", true, false, -1){};
81  protected:
82  void doComputation(PFTauDiscriminantManager* input, std::vector<double>& result);
83 };
84 
85 class MainTrackAngle : public DiscriminantBase<double> {
86  public:
87  MainTrackAngle():DiscriminantBase<double>("MainTrackAngle", "D", true, false, -1){};
89  protected:
90  void doComputation(PFTauDiscriminantManager* input, std::vector<double>& result);
91 };
92 
93 class TrackPt : public DiscriminantBase<double> {
94  public:
95  TrackPt():DiscriminantBase<double>("TrackPt", "vector<double>", false, true, 0.0){};
96  ~TrackPt(){};
97  protected:
98  void doComputation(PFTauDiscriminantManager* input, std::vector<double>& result);
99 };
100 
101 class PiZeroPt : public DiscriminantBase<double> {
102  public:
103  PiZeroPt():DiscriminantBase<double>("PiZeroPt", "vector<double>", false, true, 0.0){};
105  protected:
106  void doComputation(PFTauDiscriminantManager* input, std::vector<double>& result);
107 };
108 
109 // any objects in the PFTauDecayMode that were moved filtered
110 class FilteredObjectPt : public DiscriminantBase<double> {
111  public:
112  FilteredObjectPt():DiscriminantBase<double>("FilteredObjectPt", "vector<double>", false, true, 0.0){};
114  protected:
115  void doComputation(PFTauDiscriminantManager* input, std::vector<double>& result);
116 };
117 
118 // Matches to PiZeroPt, each element gives the corresponding # of photons in each PiZero
119 class GammaOccupancy : public DiscriminantBase<double> {
120  public:
121  GammaOccupancy():DiscriminantBase<double>("GammaOccupancy", "vector<double>", false, true, 0.0){}
123  protected:
124  void doComputation(PFTauDiscriminantManager* input, std::vector<double>& result);
125 };
126 
127 // In same order as PiZeroPt. Can be matched to PiZeros using PiZeroPt and GammaOccupancy
128 class GammaPt : public DiscriminantBase<double> {
129  public:
130  GammaPt():DiscriminantBase<double>("GammaPt", "vector<double>", false, true, 0.0){}
131  ~GammaPt(){};
132  protected:
133  void doComputation(PFTauDiscriminantManager* input, std::vector<double>& result);
134 };
135 
136 
137 class TrackAngle : public DiscriminantBase<double> {
138  public:
139  TrackAngle():DiscriminantBase<double>("TrackAngle", "vector<double>", false, true, 0.0){};
141  protected:
142  void doComputation(PFTauDiscriminantManager* input, std::vector<double>& result);
143 };
144 
145 class PiZeroAngle : public DiscriminantBase<double> {
146  public:
147  PiZeroAngle():DiscriminantBase<double>("PiZeroAngle", "vector<double>", false, true, 0.0){};
149  protected:
150  void doComputation(PFTauDiscriminantManager* input, std::vector<double>& result);
151 };
152 
153 class Dalitz : public DiscriminantBase<double> {
154  public:
155  Dalitz():DiscriminantBase<double>("Dalitz", "vector<double>", false, true, 0.0){};
156  ~Dalitz(){};
157  protected:
158  void doComputation(PFTauDiscriminantManager* input, std::vector<double>& result);
159 };
160 
161 // takes invariant mass of all objects in signal cone
162 class InvariantMassOfSignal : public DiscriminantBase<double> {
163  public:
164  InvariantMassOfSignal():DiscriminantBase<double>("InvariantMassOfSignal", "D", true, false, 0.0){};
166  protected:
167  void doComputation(PFTauDiscriminantManager* input, std::vector<double>& result);
168 };
169 
170 // takes invariant mass of all objects in signal cone + filtered objects
172  public:
173  InvariantMassOfSignalWithFiltered():DiscriminantBase<double>("InvariantMassOfSignalWithFiltered", "D", true, false, 0.0){};
175  protected:
176  void doComputation(PFTauDiscriminantManager* input, std::vector<double>& result);
177 };
178 
179 
180 // returns vector of invariant masses of larger and larger subsets of all signal objects e.g. result[2] is
181 // the invariant mass of the lead track with the next highest Pt object
182 class InvariantMass : public DiscriminantBase<double> {
183  public:
184  InvariantMass():DiscriminantBase<double>("InvariantMass", "vector<double>", false, true, 0.0){};
186  protected:
187  void doComputation(PFTauDiscriminantManager* input, std::vector<double>& result);
188 };
189 
190 class OutlierPt : public DiscriminantBase<double> {
191  public:
192  OutlierPt():DiscriminantBase<double>("OutlierPt", "vector<double>", false, true, 0.0){};
194  protected:
195  void doComputation(PFTauDiscriminantManager* input, std::vector<double>& result);
196 };
197 
198 class OutlierSumPt : public DiscriminantBase<double> {
199  public:
200  OutlierSumPt():DiscriminantBase<double>("OutlierSumPt", "D", true, false, 0.0){};
202  protected:
203  void doComputation(PFTauDiscriminantManager* input, std::vector<double>& result);
204 };
205 
206 class OutlierMass : public DiscriminantBase<double> {
207  public:
208  OutlierMass():DiscriminantBase<double>("OutlierMass", "D", true, false, 0.0){};
210  protected:
211  void doComputation(PFTauDiscriminantManager* input, std::vector<double>& result);
212 };
213 
214 class OutlierAngle : public DiscriminantBase<double> {
215  public:
216  OutlierAngle():DiscriminantBase<double>("OutlierAngle", "vector<double>", false, true, 0.0){};
218  protected:
219  void doComputation(PFTauDiscriminantManager* input, std::vector<double>& result);
220 };
221 
222 class ChargedOutlierPt : public DiscriminantBase<double> {
223  public:
224  ChargedOutlierPt():DiscriminantBase<double>("ChargedOutlierPt", "vector<double>", false, true, 0.0){};
226  protected:
227  void doComputation(PFTauDiscriminantManager* input, std::vector<double>& result);
228 };
229 
230 class ChargedOutlierSumPt : public DiscriminantBase<double> {
231  public:
232  ChargedOutlierSumPt():DiscriminantBase<double>("ChargedOutlierSumPt", "D", true, false, 0.0){};
234  protected:
235  void doComputation(PFTauDiscriminantManager* input, std::vector<double>& result);
236 };
237 
238 class ChargedOutlierAngle : public DiscriminantBase<double> {
239  public:
240  ChargedOutlierAngle():DiscriminantBase<double>("ChargedOutlierAngle", "vector<double>", false, true, 0.0){};
242  protected:
243  void doComputation(PFTauDiscriminantManager* input, std::vector<double>& result);
244 };
245 
246 class NeutralOutlierPt : public DiscriminantBase<double> {
247  public:
248  NeutralOutlierPt():DiscriminantBase<double>("NeutralOutlierPt", "vector<double>", false, true, 0.0){};
250  protected:
251  void doComputation(PFTauDiscriminantManager* input, std::vector<double>& result);
252 };
253 
254 class NeutralOutlierSumPt : public DiscriminantBase<double> {
255  public:
256  NeutralOutlierSumPt():DiscriminantBase<double>("NeutralOutlierSumPt", "D", true, false, 0.0){};
258  protected:
259  void doComputation(PFTauDiscriminantManager* input, std::vector<double>& result);
260 };
261 
262 class NeutralOutlierAngle : public DiscriminantBase<double> {
263  public:
264  NeutralOutlierAngle():DiscriminantBase<double>("NeutralOutlierAngle", "vector<double>", false, true, 0.0){};
266  protected:
267  void doComputation(PFTauDiscriminantManager* input, std::vector<double>& result);
268 };
269 
270 
271 }
272 #endif
273 
274 
275 
276 
277 
void doComputation(PFTauDiscriminantManager *input, std::vector< double > &result)
void doComputation(PFTauDiscriminantManager *input, std::vector< double > &result)
reco::Particle::LorentzVector LorentzVector
Definition: Discriminants.h:32
void doComputation(PFTauDiscriminantManager *input, std::vector< int > &result)
void doComputation(PFTauDiscriminantManager *input, std::vector< double > &result)
void doComputation(PFTauDiscriminantManager *input, std::vector< double > &result)
void doComputation(PFTauDiscriminantManager *input, std::vector< double > &result)
void doComputation(PFTauDiscriminantManager *input, std::vector< double > &result)
void doComputation(PFTauDiscriminantManager *input, std::vector< double > &result)
void doComputation(PFTauDiscriminantManager *input, std::vector< double > &result)
void doComputation(PFTauDiscriminantManager *input, std::vector< double > &result)
tuple result
Definition: query.py:137
void doComputation(PFTauDiscriminantManager *input, std::vector< double > &result)
void doComputation(PFTauDiscriminantManager *input, std::vector< double > &result)
void doComputation(PFTauDiscriminantManager *input, std::vector< int > &result)
void doComputation(PFTauDiscriminantManager *input, std::vector< double > &result)
void doComputation(PFTauDiscriminantManager *input, std::vector< double > &result)
void doComputation(PFTauDiscriminantManager *input, std::vector< double > &result)
void doComputation(PFTauDiscriminantManager *input, std::vector< double > &result)
void doComputation(PFTauDiscriminantManager *input, std::vector< double > &result)
void doComputation(PFTauDiscriminantManager *input, std::vector< double > &result)
void doComputation(PFTauDiscriminantManager *input, std::vector< double > &result)
void doComputation(PFTauDiscriminantManager *input, std::vector< double > &result)
void doComputation(PFTauDiscriminantManager *input, std::vector< double > &result)
void doComputation(PFTauDiscriminantManager *input, std::vector< int > &result)
Definition: Discriminants.cc:9
void doComputation(PFTauDiscriminantManager *input, std::vector< double > &result)
void doComputation(PFTauDiscriminantManager *input, std::vector< double > &result)
void doComputation(PFTauDiscriminantManager *input, std::vector< double > &result)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:25
void doComputation(PFTauDiscriminantManager *input, std::vector< double > &result)
void doComputation(PFTauDiscriminantManager *input, std::vector< double > &result)