Go to the documentation of this file.00001 #ifndef L1GCTEMCAND_H
00002 #define L1GCTEMCAND_H
00003
00004 #include <ostream>
00005 #include <string>
00006
00007 #include "DataFormats/L1GlobalCaloTrigger/interface/L1GctCand.h"
00008
00009 #include "DataFormats/L1CaloTrigger/interface/L1CaloRegionDetId.h"
00010 #include "DataFormats/L1CaloTrigger/interface/L1CaloEmCand.h"
00011
00022 class L1GctEmCand : public L1GctCand {
00023 public:
00024
00026 L1GctEmCand();
00027
00029 L1GctEmCand(uint16_t rawData, bool iso);
00030
00032 L1GctEmCand(uint16_t rawData, bool iso, uint16_t block, uint16_t index, int16_t bx);
00033
00036 L1GctEmCand(unsigned rank, unsigned phi, unsigned eta, bool iso);
00037
00040 L1GctEmCand(unsigned rank, unsigned phi, unsigned eta, bool iso, uint16_t block, uint16_t index, int16_t bx);
00041
00043 L1GctEmCand(L1CaloEmCand& c);
00044
00046 virtual ~L1GctEmCand();
00047
00049 L1CaloRegionDetId regionId() const;
00050
00052 std::string name() const;
00053
00055 bool empty() const;
00056
00058 uint16_t raw() const { return m_data; }
00059
00061 unsigned rank() const;
00062
00064 unsigned etaIndex() const;
00065
00067 unsigned etaSign() const { return (m_data>>9) & 0x1; }
00068
00070 unsigned phiIndex() const;
00071
00073 bool isolated() const { return m_iso; }
00074
00076 unsigned capBlock() const { return m_captureBlock; }
00077
00079 unsigned capIndex() const { return m_captureIndex; }
00080
00082 int16_t bx() const { return m_bx; }
00083
00085 int operator==(const L1GctEmCand& c) const { return ((m_data==c.raw() && m_iso==c.isolated())
00086 || (this->empty() && c.empty())); }
00087
00089 int operator!=(const L1GctEmCand& c) const { return !(*this == c); }
00090
00091 private:
00092
00093
00094 void construct(unsigned rank, unsigned eta, unsigned phi);
00095
00096 private:
00097
00098 uint16_t m_data;
00099 bool m_iso;
00100 uint16_t m_captureBlock;
00101 uint8_t m_captureIndex;
00102 int16_t m_bx;
00103
00104 };
00105
00106
00107 std::ostream& operator<<(std::ostream& s, const L1GctEmCand& cand);
00108
00109
00110
00111 #endif