Go to the documentation of this file.00001 #ifndef GlobalTrigger_L1GtEtaPhiConversions_h
00002 #define GlobalTrigger_L1GtEtaPhiConversions_h
00003
00020
00021 #include <iostream>
00022 #include <vector>
00023 #include <utility>
00024 #include <cmath>
00025
00026
00027
00028
00029
00030
00031 #include "DataFormats/L1GlobalTrigger/interface/L1GtObject.h"
00032
00033
00034 class L1CaloGeometry;
00035 class L1MuTriggerScales;
00036
00037
00038 class L1GtEtaPhiConversions {
00039
00040 public:
00041
00043 L1GtEtaPhiConversions();
00044
00046 virtual ~L1GtEtaPhiConversions();
00047
00048 public:
00049
00052 const unsigned int gtObjectPairIndex(const L1GtObject&,
00053 const L1GtObject&) const;
00054
00060 const bool convertPhiIndex(const unsigned int pairIndex,
00061 const unsigned int positionPair, const unsigned int initialIndex,
00062 unsigned int& convertedIndex) const ;
00063
00068 const bool convertEtaIndex(const L1GtObject&, const unsigned int initialIndex,
00069 unsigned int& convertedIndex) const;
00070
00072 const unsigned int gtObjectNrBinsPhi(const L1GtObject&) const;
00073
00075 const unsigned int gtObjectNrBinsPhi(const L1GtObject&,
00076 const L1GtObject&) const;
00077
00080 const unsigned int gtObjectNrBinsPhi(const unsigned int) const;
00081
00083 void convertL1Scales(const L1CaloGeometry*, const L1MuTriggerScales*,
00084 const int, const int);
00085
00086 inline void setVerbosity(const int verbosity) {
00087 m_verbosity = verbosity;
00088 }
00089
00091 virtual void print(std::ostream& myCout) const;
00092
00093
00094
00095
00096 private:
00097
00100 static const unsigned int badIndex;
00101
00103 static const double PiConversion;
00104
00106 const double rad2deg(const double&) const;
00107
00108
00109 private:
00110
00112 std::vector<std::pair<L1GtObject, L1GtObject> > m_gtObjectPairVec;
00113
00117 std::vector<bool> m_pairConvertPhiFirstGtObject;
00118
00123 std::vector<const unsigned int*> m_pairNrPhiBinsVec;
00124
00129 std::vector<const std::vector<unsigned int>*> m_pairPhiConvVec;
00130
00131 private:
00132
00134 const L1CaloGeometry* m_l1CaloGeometry;
00135
00137 const L1MuTriggerScales* m_l1MuTriggerScales;
00138
00139 private:
00140
00142 unsigned int m_nrBinsPhiMu;
00143
00145 unsigned int m_nrBinsPhiJetEg;
00146
00148 unsigned int m_nrBinsPhiEtm;
00149
00151 unsigned int m_nrBinsPhiHtm;
00152
00154 unsigned int m_nrBinsEtaCommon;
00155
00156 private:
00157
00159 std::vector<unsigned int> m_lutPhiMuToJetEg;
00160
00162 std::vector<unsigned int> m_lutPhiMuToEtm;
00163
00165 std::vector<unsigned int> m_lutPhiMuToHtm;
00166
00168 std::vector<unsigned int> m_lutPhiEtmToJetEg;
00169
00171 std::vector<unsigned int> m_lutPhiEtmToHtm;
00172
00174 std::vector<unsigned int> m_lutPhiHtmToJetEg;
00175
00179 std::vector<unsigned int> m_lutPhiJetEgToJetEg;
00180
00181 private:
00182
00185 std::vector<unsigned int> m_lutEtaCentralToCommonCalo;
00186
00188 std::vector<unsigned int> m_lutEtaForJetToCommonCalo;
00189
00191 std::vector<unsigned int> m_lutEtaMuToCommonCalo;
00192
00193 private:
00194
00196 int m_verbosity;
00197
00199 bool m_isDebugEnabled;
00200
00201 };
00202
00203 #endif