ATLAS Offline Software
LargeRJetLabelEnum.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 /*
3  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
4 */
5 #ifndef PARTICLEJETTOOLS_LARGERJETLABELENUM_H
6 #define PARTICLEJETTOOLS_LARGERJETLABELENUM_H
7 
8 // ROOT include(s).
9 #include <TString.h>
10 
12 {
13  enum TypeEnum
14  {
15  UNKNOWN=0, // Not tagged yet
16  tqqb, // fully-contained top->qqb
17  Wqq, // fully-contained W->qq
18  Zbb, // fully-contained Z->bb
19  Zcc, // fully-contained Z->cc
20  Zqq, // fully-contained Z->qq
21  Wqq_From_t, // fully-contained W->qq (also matched to top)
22  other_From_t, // matched to top
23  other_From_V, // matched to W/Z
24  notruth, // failed to truth-jet matching (pileup)
25  qcd, // not matched to top or W/Z (background jet)
26  Hbb, // fully-contained H->bb
27  Hcc, // fully-contained H->cc
28  other_From_H, // matched to H
29  HtautauEl, // fully-contained H->tautau, el
30  HtautauMu, // fully-contained H->tautau, mu
31  HtautauHad, // fully-contained H->tautau, had
32  };
33 
34  inline int enumToInt(const TypeEnum type)
35  {
36  switch (type) {
37  case tqqb: return 1;
38  case Wqq: return 2;
39  case Zbb: return 3;
40  case Zcc: return 4;
41  case Zqq: return 5;
42  case Wqq_From_t: return 6;
43  case other_From_t: return 7;
44  case other_From_V: return 8;
45  case notruth: return 9;
46  case qcd: return 10;
47  case Hbb: return 11;
48  case Hcc: return 12;
49  case other_From_H: return 13;
50  case HtautauEl: return 14;
51  case HtautauMu: return 15;
52  case HtautauHad: return 16;
53  default: return 0;
54  }
55  }
56 
57  inline TypeEnum intToEnum(const int type)
58  {
59  switch (type) {
60  case 1: return tqqb;
61  case 2: return Wqq;
62  case 3: return Zbb;
63  case 4: return Zcc;
64  case 5: return Zqq;
65  case 6: return Wqq_From_t;
66  case 7: return other_From_t;
67  case 8: return other_From_V;
68  case 9: return notruth;
69  case 10: return qcd;
70  case 11: return Hbb;
71  case 12: return Hcc;
72  case 13: return other_From_H;
73  case 14: return HtautauEl;
74  case 15: return HtautauMu;
75  case 16: return HtautauHad;
76  default: return UNKNOWN;
77  }
78 
79  }
80 
81  inline TypeEnum stringToEnum(const TString& name)
82  {
83 #define TRY(STRING) if (name.EqualTo(#STRING, TString::kIgnoreCase)) return STRING
84  TRY(tqqb);
85  TRY(Wqq);
86  TRY(Zbb);
87  TRY(Zcc);
88  TRY(Zqq);
89  TRY(Wqq_From_t);
92  TRY(notruth);
93  TRY(qcd);
94  TRY(Hbb);
95  TRY(Hcc);
97  TRY(HtautauEl);
98  TRY(HtautauMu);
99  TRY(HtautauHad);
100 #undef TRY
101  return UNKNOWN;
102  }
103 }
104 
105 #endif
LargeRJetTruthLabel::TypeEnum
TypeEnum
Definition: LargeRJetLabelEnum.h:14
LargeRJetTruthLabel::UNKNOWN
@ UNKNOWN
Definition: LargeRJetLabelEnum.h:15
TRY
#define TRY(STRING)
LargeRJetTruthLabel::stringToEnum
TypeEnum stringToEnum(const TString &name)
Definition: LargeRJetLabelEnum.h:81
LargeRJetTruthLabel::other_From_t
@ other_From_t
Definition: LargeRJetLabelEnum.h:22
LargeRJetTruthLabel
Definition: LargeRJetLabelEnum.h:12
LargeRJetTruthLabel::Zqq
@ Zqq
Definition: LargeRJetLabelEnum.h:20
LargeRJetTruthLabel::qcd
@ qcd
Definition: LargeRJetLabelEnum.h:25
LargeRJetTruthLabel::Hbb
@ Hbb
Definition: LargeRJetLabelEnum.h:26
LargeRJetTruthLabel::notruth
@ notruth
Definition: LargeRJetLabelEnum.h:24
LargeRJetTruthLabel::HtautauMu
@ HtautauMu
Definition: LargeRJetLabelEnum.h:30
LargeRJetTruthLabel::Wqq
@ Wqq
Definition: LargeRJetLabelEnum.h:17
LargeRJetTruthLabel::HtautauEl
@ HtautauEl
Definition: LargeRJetLabelEnum.h:29
LargeRJetTruthLabel::Hcc
@ Hcc
Definition: LargeRJetLabelEnum.h:27
LargeRJetTruthLabel::Zbb
@ Zbb
Definition: LargeRJetLabelEnum.h:18
LargeRJetTruthLabel::HtautauHad
@ HtautauHad
Definition: LargeRJetLabelEnum.h:31
LargeRJetTruthLabel::Wqq_From_t
@ Wqq_From_t
Definition: LargeRJetLabelEnum.h:21
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
LargeRJetTruthLabel::other_From_V
@ other_From_V
Definition: LargeRJetLabelEnum.h:23
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LargeRJetTruthLabel::intToEnum
TypeEnum intToEnum(const int type)
Definition: LargeRJetLabelEnum.h:57
LargeRJetTruthLabel::other_From_H
@ other_From_H
Definition: LargeRJetLabelEnum.h:28
LargeRJetTruthLabel::Zcc
@ Zcc
Definition: LargeRJetLabelEnum.h:19
LargeRJetTruthLabel::tqqb
@ tqqb
Definition: LargeRJetLabelEnum.h:16
LargeRJetTruthLabel::enumToInt
int enumToInt(const TypeEnum type)
Definition: LargeRJetLabelEnum.h:34