DESY Hbb Analysis Framework
PhysicsObjectTree.h
Go to the documentation of this file.
1 #ifndef Analysis_Tools_PhysicsObjectTree_h
2 #define Analysis_Tools_PhysicsObjectTree_h 1
3 
4 // -*- C++ -*-
5 //
6 // Package: Analysis/Tools
7 // Class: PhysicsObjectTree
8 //
16 //
17 // Original Author: Roberval Walsh Bastos Rangel
18 // Created: Mon, 20 Oct 2014 14:24:08 GMT
19 //
20 //
21 
22 // system include files
23 #include <memory>
24 #include <vector>
25 //
26 // user include files
27 
28 #include "TTree.h"
29 #include "TChain.h"
32 
33 //
34 // class declaration
35 //
36 
37 namespace analysis {
38  namespace tools {
39 
40  template <class Object>
41  class PhysicsObjectTree : public PhysicsObjectTreeBase<Object> {
42  public:
44  PhysicsObjectTree(TChain * tree, const std::string & name);
46 
48 
49  // ----------member data ---------------------------
50  protected:
51 
52  private:
53 
54  };
55 
56  // Specialization for JET
57  template <>
59  public:
61  PhysicsObjectTree(TChain * tree, const std::string & name);
63 
65 
66  // ----------member data ---------------------------
67  protected:
68  // PatJets
69  float btag_ [max_];
70  float btags_[15][max_];
71  std::map<std::string, float*> mbtag_;
72  int flavour_ [max_];
73  int hadrflavour_ [max_];
74  int partflavour_ [max_];
75  int physflavour_ [max_];
76  float nHadFrac_[max_];
77  float nEmFrac_ [max_];
78  float nMult_ [max_];
79  float cHadFrac_[max_];
80  float cEmFrac_ [max_];
81  float cMult_ [max_];
82  float muFrac_ [max_];
83  float puppi_ [max_];
84  bool idLoose_ [max_];
85  bool idTight_ [max_];
86  float jecUnc_ [max_];
87  float jerSF_ [max_];
88  float jerSFUp_ [max_];
89  float jerSFDown_ [max_];
90  float jerResolution_ [max_];
91  float qgLikelihood_ [max_];
92  float puJetIdFullDisc_ [max_];
93  int puJetIdFullId_ [max_];
94 
95  float bRegCorr_ [max_];
96  float bRegRes_ [max_];
97 
103 
104  bool hasRho_;
105  double rho_;
106 
107  private:
108 
109  };
110 
111  // Specialization for Candidate
112  template <>
113  class PhysicsObjectTree<Candidate> : public PhysicsObjectTreeBase<Candidate> {
114  public:
116  PhysicsObjectTree(TChain * tree, const std::string & name);
118 
120 
121  // ----------member data ---------------------------
122  protected:
123 
124  private:
125 
126  };
127 
128  // Specialization for GENPARTICLE
129  template <>
130  class PhysicsObjectTree<GenParticle> : public PhysicsObjectTreeBase<GenParticle> {
131  public:
133  PhysicsObjectTree(TChain * tree, const std::string & name);
135 
137 
138  // ----------member data ---------------------------
139  protected:
140  // PatJets
141  int pdgid_ [max_];
142  int status_ [max_];
143  bool higgs_dau_[max_];
144  int indx_ [max_];
145  int mo1_ [max_];
146  int mo2_ [max_];
147  int da1_ [max_];
148  int da2_ [max_];
149 
151 
152  private:
153 
154  };
155 
156  // Specialization for MET
157  template <>
159  public:
161  PhysicsObjectTree(TChain * tree, const std::string & name);
163 
165  // ----------member data ---------------------------
166  protected:
167  // METs
168  float sigxx_ [max_];
169  float sigxy_ [max_];
170  float sigyx_ [max_];
171  float sigyy_ [max_];
172 
173  float gen_px_ [max_];
174  float gen_py_ [max_];
175  float gen_pz_ [max_];
176 
177  private:
178 
179  };
180 
181  // Specialization for Muon
182  template <>
184  public:
186  PhysicsObjectTree(TChain * tree, const std::string & name);
188 
190 
191  // ----------member data ---------------------------
192  protected:
193  bool isPFMuon_ [max_];
194  bool isGlobalMuon_ [max_];
195  bool isTrackerMuon_ [max_];
196  bool isLooseMuon_ [max_];
197  bool isMediumMuon_ [max_];
198  bool isTightMuon_ [max_];
199 
200  float validFraction_ [max_];
201  float segmentCompatibility_ [max_];
202  float trkKink_ [max_];
203  float chi2LocalPos_ [max_];
204 
205  float normChi2_ [max_];
206 
208 
209  private:
210 
211  };
212 
213  // Specialization for JetTag
214  template <>
216  public:
218  PhysicsObjectTree(TChain * tree, const std::string & name);
220 
222 
223  // ----------member data ---------------------------
224  protected:
225  float btag_[max_] ;
226  private:
227 
228  };
229 
230  // Specialization for GenJet
231  template <>
233  public:
235  PhysicsObjectTree(TChain * tree, const std::string & name);
237 
239 
240  // ----------member data ---------------------------
241  protected:
242 
243  private:
244 
245  };
246 
247  // Specialization for Vertex
248  template <>
250  public:
252  PhysicsObjectTree(TChain * tree, const std::string & name);
254 
256 
257  // ----------member data ---------------------------
258  protected:
259 
260  private:
261 
262  };
263 
264  // Specialization for TriggerObject
265  template <>
266  class PhysicsObjectTree<TriggerObject> : public PhysicsObjectTreeBase<TriggerObject> {
267  public:
269  PhysicsObjectTree(TChain * tree, const std::string & name);
271 
273 
274  // ----------member data ---------------------------
275  protected:
276  int type_ [max_];
277 
278  private:
279  };
280 
281  // Specialization for L1TMuon
282  template <>
284  public:
286  PhysicsObjectTree(TChain * tree, const std::string & name);
288 
290 
291  // ----------member data ---------------------------
292  protected:
293  int hwQual_ [max_];
294  float etaAtVtx_ [max_];
295  float phiAtVtx_ [max_];
296 
297  private:
298 
299  };
300 
301  // Specialization for L1TJet
302  template <>
304  public:
306  PhysicsObjectTree(TChain * tree, const std::string & name);
308 
310 
311  // ----------member data ---------------------------
312  protected:
313 
314  private:
315 
316  };
317 
318  // Specialization for RecoMuon
319  template <>
321  public:
323  PhysicsObjectTree(TChain * tree, const std::string & name);
325 
327 
328  // ----------member data ---------------------------
329  protected:
330 
331  private:
332 
333  };
334 
335  // Specialization for RecoTrack
336  template <>
337  class PhysicsObjectTree<RecoTrack> : public PhysicsObjectTreeBase<RecoTrack> {
338  public:
340  PhysicsObjectTree(TChain * tree, const std::string & name);
342 
344 
345  // ----------member data ---------------------------
346  protected:
347  float chi2_[max_];
348  float ndof_[max_];
349  float d0_[max_];
350  float dxy_[max_];
351  int nLostMuHits_[max_];
352  int nBadMuHits_[max_];
353  int nValMuHits_[max_];
354  int nValTrackerHits_[max_];
355  int nValStripTECHits_[max_];
356  int nValStripTIBHits_[max_];
357  int nValStripTIDHits_[max_];
358  int nValStripTOBHits_[max_];
359  int muStationsWithValHits_[max_];
360  int muStationsWithBadHits_[max_];
361  int inMuStationWithValHits_[max_];
362  int outMuStationWithValHits_[max_];
363  std::map<TrackQuality,bool*> mqual_;
364  bool qual_[10][max_];
365 
366 
367  private:
368 
369  };
370  }
371 }
372 
373 #endif // Analysis_Tools_PhysicsObjectTree_h
std::map< std::string, float * > mbtag_