CMS 3D CMS Logo

EgHLTEgCutCodes.h
Go to the documentation of this file.
1 #ifndef DQMOFFLINE_TRIGGER_EGHLTEGCUTCODES
2 #define DQMOFFLINE_TRIGGER_EGHLTEGCUTCODES
3 
5 
6 #include <cstring>
7 
8 #include <string>
9 #include <iostream>
10 
11 namespace egHLT {
12  class EgCutCodes { //class to handle the cutcodes used in electron cutting
13 
14  public:
15  enum CutCode {
16  //kinematic and fiducial cuts
17  ET = 0x00000001,
18  PT = 0x00000002,
19  DETETA = 0x00000004,
20  CRACK = 0x00000008,
21  //track cuts
22  DETAIN = 0x00000010,
23  DPHIIN = 0x00000020,
24  INVEINVP = 0x00000040,
25 
26  //supercluster cuts
27  SIGMAETAETA = 0x00000080,
28  HADEM = 0x00000100,
29  SIGMAIETAIETA = 0x00000200,
30  E2X5OVER5X5 = 0x00000400,
31  //---Morse------
32  //R9 =0x00000800,
33  MINR9 = 0x00000800,
34  MAXR9 = 0x00100000,
35  //--------------
36  //std isolation cuts
37  ISOLEM = 0x00001000,
38  ISOLHAD = 0x00002000,
39  ISOLPTTRKS = 0x00004000,
40  ISOLNRTRKS = 0x00008000,
41  //hlt isolation cuts
42  HLTISOLTRKSELE = 0x00010000,
43  HLTISOLTRKSPHO = 0x00020000,
44  HLTISOLHAD = 0x00040000,
45  HLTISOLEM = 0x00080000,
46  //track quaility cuts (hlt track algo isnt very forgiving)
47  CTFTRACK = 0x01000000,
48  //hlt quantities that are slightly different to reco
49  HLTDETAIN = 0x02000000,
50  HLTDPHIIN = 0x04000000,
51  HLTINVEINVP = 0x08000000,
52  //flag that if its set, shows the code is invalid
53  INVALID = 0x80000000
54 
55  };
56 
57  private:
58  static const ComCodes codes_;
59 
60  private:
61  EgCutCodes() = default; //not going to allow instainitiation
62  ~EgCutCodes() = default;
63 
64  public:
65  static int getCode(const std::string& descript) { return codes_.getCode(descript.c_str()); }
66  static void getCodeName(int code, std::string& id) { return codes_.getCodeName(code, id); }
67 
68  private:
69  static ComCodes setCodes_();
70  };
71 } // namespace egHLT
72 #endif
~EgCutCodes()=default
void getCodeName(int code, std::string &id) const
static const ComCodes codes_
static int getCode(const std::string &descript)
EgCutCodes()=default
int getCode(const char *descript) const
static ComCodes setCodes_()
static void getCodeName(int code, std::string &id)