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  };
64 
65  const std::vector<std::pair<GlobalObject, std::string>> kGlobalObjectEnumStringPairs = {
66  {gtMu, "Mu"}, // 0
67  {gtMuShower, "MuShower"}, // 1
68  {gtEG, "EG"}, // 2
69  {gtJet, "Jet"}, // 3
70  {gtTau, "Tau"}, // 4
71  {gtETM, "ETM"}, // 5
72  {gtETT, "ETT"}, // 6
73  {gtHTT, "HTT"}, // 7
74  {gtHTM, "HTM"}, // 8
75  {gtETMHF, "ETMHF"}, // 9
76  {gtTowerCount, "TowerCount"}, // 10
77  {gtMinBiasHFP0, "MinBiasHFP0"}, // 11
78  {gtMinBiasHFM0, "MinBiasHFM0"}, // 12
79  {gtMinBiasHFP1, "MinBiasHFP1"}, // 13
80  {gtMinBiasHFM1, "MinBiasHFM1"}, // 14
81  {gtETTem, "ETTem"}, // 15
82  {gtAsymmetryEt, "AsymEt"}, // 16
83  {gtAsymmetryHt, "AsymHt"}, // 17
84  {gtAsymmetryEtHF, "AsymEtHF"}, // 18
85  {gtAsymmetryHtHF, "AsymHtHF"}, // 19
86  {gtCentrality0, "CENT0"}, // 20
87  {gtCentrality1, "CENT1"}, // 21
88  {gtCentrality2, "CENT2"}, // 22
89  {gtCentrality3, "CENT3"}, // 23
90  {gtCentrality4, "CENT4"}, // 24
91  {gtCentrality5, "CENT5"}, // 25
92  {gtCentrality6, "CENT6"}, // 26
93  {gtCentrality7, "CENT7"}, // 27
94  {gtExternal, "External"}, // 28
95  {gtZDCP, "ZDCP"}, // 29
96  {gtZDCM, "ZDCM"}, // 30
97  {ObjNull, "ObjNull"}, // 31
98  };
99 
100  // utility functions to convert GlobalObject enum to std::string and viceversa
103 
104 } // namespace l1t
105 
106 #endif
GlobalObject
Definition: GlobalObject.h:30
delete x;
Definition: CaloConfig.h:22
const std::vector< std::pair< GlobalObject, std::string > > kGlobalObjectEnumStringPairs
Definition: GlobalObject.h:65
l1t::GlobalObject GlobalObjectStringToEnum(const std::string &)
Definition: GlobalObject.cc:18
std::string GlobalObjectEnumToString(const GlobalObject &)