00001 #ifndef L1Trigger_RPCConst_h
00002 #define L1Trigger_RPCConst_h
00003
00004 #ifndef _STAND_ALONE
00005 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00006 #endif //_STAND_ALONE
00007
00008 #include <string>
00009 #include <map>
00010 #include <vector>
00011 #include <bitset>
00023 class RPCConst {
00024
00025 public:
00026
00027 enum {
00028 ITOW_MIN = 0,
00029 ITOW_MAX = 16,
00030
00031 IPT_MAX = 31,
00032 NSTRIPS = 1152,
00033 NSEG = NSTRIPS/8,
00034
00035 OFFSET = 5
00036 };
00037
00038
00039
00040
00041
00042
00043 static const int m_TOWER_COUNT = 16 + 1;
00044
00045 static const int m_PT_CODE_MAX = 31;
00046
00047 static const int m_LOGPLANES_COUNT = 6;
00048
00049 static const int m_LOGPLANE1 = 0;
00050 static const int m_LOGPLANE2 = 1;
00051 static const int m_LOGPLANE3 = 2;
00052 static const int m_LOGPLANE4 = 3;
00053 static const int m_LOGPLANE5 = 4;
00054 static const int m_LOGPLANE6 = 5;
00055
00056 static const int m_FIRST_PLANE = m_LOGPLANE1;
00057 static const int m_LAST_PLANE = m_LOGPLANE6;
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00079 static const std::string m_LOGPLANE_STR[];
00080
00082 static const unsigned int m_LOGPLANE_SIZE[m_TOWER_COUNT][m_LOGPLANES_COUNT];
00083
00085 static const int m_REF_PLANE[m_TOWER_COUNT];
00086
00088 static const int m_USED_PLANES_COUNT[m_TOWER_COUNT];
00089
00091 static const int m_VLPT_PLANES_COUNT[m_TOWER_COUNT];
00092
00093 static const int m_VLPT_CUT = 7;
00094
00095 static const int m_NOT_CONECTED = 99;
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114 typedef std::vector<short> TQualityTab;
00115 typedef std::vector<TQualityTab> TQualityTabsVec;
00116
00117
00119 struct l1RpcConeCrdnts {
00120 int m_Tower;
00121 int m_LogSector;
00122 int m_LogSegment;
00123
00124 l1RpcConeCrdnts() {
00125 m_Tower = 0;
00126 m_LogSector = 0;
00127 m_LogSegment = 0;
00128 }
00129
00130 l1RpcConeCrdnts(int m_tower, int logSector, int logSegment ) {
00131 m_Tower = m_tower;
00132 m_LogSector = logSector ;
00133 m_LogSegment = logSegment;
00134 }
00135
00136 int getSegmentNum() {
00137 return m_LogSector * 12 + m_LogSegment;
00138 }
00139
00140 bool operator < (const l1RpcConeCrdnts& cone) const;
00141
00142 bool operator == (const l1RpcConeCrdnts& cone) const;
00143 };
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158 static const unsigned int m_TOWERS_ON_TB_CNT = 4;
00159 static const unsigned int m_SEGMENTS_IN_SECTOR_CNT = 12;
00160 static const unsigned int m_GBPHI_OUT_MUONS_CNT = 4;
00161 static const unsigned int m_GBETA_OUT_MUONS_CNT = 4;
00162 static const unsigned int m_TCGB_OUT_MUONS_CNT = 4;
00163 static const unsigned int m_FINAL_OUT_MUONS_CNT = 4;
00164
00165
00166
00167
00169 int stringToInt(std::string str);
00170
00172 std::string intToString(int number);
00173
00174
00178 static int iptFromPt(const double pt);
00179
00183 static double ptFromIpt(const int ipt);
00184
00188 static double etaFromTowerNum(const int atower);
00189
00193 static int towerNumFromEta(const double eta);
00194
00198 static double phiFromSegmentNum(const int iseg);
00199
00203 static double phiFromLogSegSec(const int logSegment, const int logSector);
00204
00208 static int segmentNumFromPhi(const double phi);
00209
00210
00214
00215
00216
00217
00221
00222
00223
00227 static double vxMuRate(int ptCode);
00228
00229 static double vxIntegMuRate(int ptCode, double etaFrom, double etaTo);
00230
00231 static double vxIntegMuRate(int ptCode, int m_tower);
00232
00233 private:
00237 static const double m_pts[RPCConst::IPT_MAX+1];
00238
00241 static const double m_etas[RPCConst::ITOW_MAX+2];
00242
00243
00244 };
00245 #endif
00246