Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-10-14 10:08:27

0001 #ifndef Geometry_HcalCommonData_HcalTopologyMode_H
0002 #define Geometry_HcalCommonData_HcalTopologyMode_H
0003 
0004 #include "FWCore/Utilities/interface/Exception.h"
0005 #include <map>
0006 #include <string>
0007 #include <algorithm>
0008 
0009 template <typename T>
0010 class StringToEnumParser {
0011   std::map<std::string, T> enumMap;
0012 
0013 public:
0014   StringToEnumParser(void);
0015 
0016   T parseString(const std::string &value) {
0017     typename std::map<std::string, T>::const_iterator iValue = enumMap.find(value);
0018     if (iValue == enumMap.end())
0019       throw cms::Exception("Configuration") << "the value " << value << " is not defined.";
0020 
0021     return iValue->second;
0022   }
0023 };
0024 
0025 namespace HcalTopologyMode {
0026   enum Mode {
0027     LHC = 0,    // Legacy HCAL
0028     H2 = 1,     // H2 TB
0029     SLHC = 2,   // Attemptf HE to be used for HGCal
0030     H2HE = 3,   // H2 TB with includng HE
0031     Run3 = 4,   // Run3 with inclusionof ZDC
0032     Run4 = 5,   // Post LS3
0033     Run2A = 6,  // With extended channels for HF
0034     Run2B = 7,  // With extended channels for HE
0035     Run2C = 8   // With extended channels for HB
0036   };
0037 
0038   enum TriggerMode {
0039     TriggerMode_2009 = 0,        // HF is summed in 3x2 regions
0040     TriggerMode_2016 = 1,        // HF is summed in both 3x2 and 1x1 regions
0041     TriggerMode_2018legacy = 2,  // For the database, before 2017 and 2017plan1 was introduced
0042     TriggerMode_2017 = 3,        // HF upgraded to QIE10
0043     TriggerMode_2017plan1 = 4,   // HF upgraded to QIE10, 1 RBX of HE to QIE11
0044     TriggerMode_2018 = 5,        // HF upgraded to QIE10, HE to QIE11
0045     TriggerMode_2021 = 6         // HF upgraded to QIE10, HBHE to QIE11
0046   };
0047 }  // namespace HcalTopologyMode
0048 
0049 #endif  // Geometry_HcalCommonData_HcalTopologyMode_H