CMS 3D CMS Logo

GlobalObject.h
Go to the documentation of this file.
1 #ifndef DataFormats_L1TGlobal_GlobalObject_h
2 #define DataFormats_L1TGlobal_GlobalObject_h
3 
4 #include <string>
5 #include <utility>
6 #include <vector>
7 
8 namespace l1t {
9 
10  /* Enum of L1T GlobalObjects
11 
12  IMPORTANT
13  The elements of the enum l1t::GlobalObject are used in the data format GlobalObjectMapRecord.
14  One instance of GlobalObjectMapRecord is produced online by the HLT,
15  and it is written to disk as part of the RAW data tier.
16  Said instance of GlobalObjectMapRecord is produced at HLT by the plugin L1TGlobalProducer,
17  which implements the emulator of the Stage-2 Level-1 Global Trigger.
18 
19  In order not to change the meaning of existing data when adding entries to the enum l1t::GlobalObject,
20  it is necessary to add such new entries with an explicit integer value which has not been used before in the enum.
21 
22  When adding new elements to the enum l1t::GlobalObject, make sure to also update accordingly
23  (a) the vector l1t::kGlobalObjectEnumStringPairs in this file, and
24  (b) the unit test implemented in test/test_catch2_l1tGlobalObject.cc in this package.
25 
26  For further information on the subject, please see
27  https://github.com/cms-sw/cmssw/pull/42634#discussion_r1302636113
28  https://github.com/cms-sw/cmssw/issues/42719
29  */
30  enum GlobalObject {
31  gtMu = 0,
33  gtEG = 2,
34  gtJet = 3,
35  gtTau = 4,
36  gtETM = 5,
37  gtETT = 6,
38  gtHTT = 7,
39  gtHTM = 8,
40  gtETMHF = 9,
46  gtETTem = 15,
59  gtExternal = 28,
60  gtZDCP = 29,
61  gtZDCM = 30,
62  ObjNull = 31,
63  gtHTMHF = 32,
64  };
65 
66  const std::vector<std::pair<GlobalObject, std::string>> kGlobalObjectEnumStringPairs = {
67  {gtMu, "Mu"}, // 0
68  {gtMuShower, "MuShower"}, // 1
69  {gtEG, "EG"}, // 2
70  {gtJet, "Jet"}, // 3
71  {gtTau, "Tau"}, // 4
72  {gtETM, "ETM"}, // 5
73  {gtETT, "ETT"}, // 6
74  {gtHTT, "HTT"}, // 7
75  {gtHTM, "HTM"}, // 8
76  {gtETMHF, "ETMHF"}, // 9
77  {gtTowerCount, "TowerCount"}, // 10
78  {gtMinBiasHFP0, "MinBiasHFP0"}, // 11
79  {gtMinBiasHFM0, "MinBiasHFM0"}, // 12
80  {gtMinBiasHFP1, "MinBiasHFP1"}, // 13
81  {gtMinBiasHFM1, "MinBiasHFM1"}, // 14
82  {gtETTem, "ETTem"}, // 15
83  {gtAsymmetryEt, "AsymEt"}, // 16
84  {gtAsymmetryHt, "AsymHt"}, // 17
85  {gtAsymmetryEtHF, "AsymEtHF"}, // 18
86  {gtAsymmetryHtHF, "AsymHtHF"}, // 19
87  {gtCentrality0, "CENT0"}, // 20
88  {gtCentrality1, "CENT1"}, // 21
89  {gtCentrality2, "CENT2"}, // 22
90  {gtCentrality3, "CENT3"}, // 23
91  {gtCentrality4, "CENT4"}, // 24
92  {gtCentrality5, "CENT5"}, // 25
93  {gtCentrality6, "CENT6"}, // 26
94  {gtCentrality7, "CENT7"}, // 27
95  {gtExternal, "External"}, // 28
96  {gtZDCP, "ZDCP"}, // 29
97  {gtZDCM, "ZDCM"}, // 30
98  {ObjNull, "ObjNull"}, // 31
99  {gtHTMHF, "HTMHF"}, // 32
100  };
101 
102  // utility functions to convert GlobalObject enum to std::string and viceversa
105 
106 } // namespace l1t
107 
108 #endif
GlobalObject
Definition: GlobalObject.h:30
delete x;
Definition: CaloConfig.h:22
const std::vector< std::pair< GlobalObject, std::string > > kGlobalObjectEnumStringPairs
Definition: GlobalObject.h:66
l1t::GlobalObject GlobalObjectStringToEnum(const std::string &)
Definition: GlobalObject.cc:18
std::string GlobalObjectEnumToString(const GlobalObject &)