1 #ifndef ECALTRIGPRIMCOMPACTCOLL_H
2 #define ECALTRIGPRIMCOMPACTCOLL_H
34 static size_t index(
int ieta,
int iphi) {
35 size_t r = unsigned(((ieta < 0) ? (ieta + 28) : (ieta + 27)) *
nPhiBins + (iphi - 1));
36 if (r >= (
unsigned)
nBins)
38 <<
"Trigger tower index (" << ieta <<
"," << iphi <<
") are out of range";
49 uint16_t
raw(
int ieta,
int iphi)
const {
return data_[
index(ieta, iphi)]; }
55 int compressedEt(
int ieta,
int iphi)
const {
return raw(ieta, iphi) & 0xFF; }
61 bool fineGrain(
int ieta,
int iphi)
const {
return (
raw(ieta, iphi) & 0x100) != 0; }
67 int ttFlag(
int ieta,
int iphi)
const {
return (
raw(ieta, iphi) >> 9) & 0x7; }
73 int sFGVB(
int ieta,
int iphi)
const {
return (
raw(ieta, iphi) >> 12) & 0x1; }
81 int l1aSpike(
int ieta,
int iphi)
const {
return sFGVB(ieta, iphi); }
97 #endif //ECALTRIGPRIMCOMPACTCOLL_H not defined
EcalTrigPrimCompactColl()
bool fineGrain(const EcalTrigTowerDetId &ttId) const
int ttFlag(int ieta, int iphi) const
get the Trigger tower Flag (3 bits)
void setValue(int ieta, int iphi, uint16_t sample)
Set data.
std::vector< uint16_t > data_
int sFGVB(int ieta, int iphi) const
unsigned ttId(DetId const &, EcalElectronicsMapping const *)
int ieta() const
get the tower ieta
int l1aSpike(const EcalTrigTowerDetId &ttId) const
int compressedEt(int ieta, int iphi) const
get the encoded/compressed Et (8 bits)
int l1aSpike(int ieta, int iphi) const
bool fineGrain(int ieta, int iphi) const
get the fine-grain bit (1 bit)
int iphi() const
get the tower iphi
edm::SortedCollection< EcalTriggerPrimitiveDigi > EcalTrigPrimDigiCollection
static const int nEtaBins
void toEcalTrigPrimDigiCollection(EcalTrigPrimDigiCollection &dest) const
int ttFlag(const EcalTrigTowerDetId &ttId) const
static size_t index(int ieta, int iphi)
uint16_t raw(int ieta, int iphi) const
get the raw word
uint16_t raw(const EcalTrigTowerDetId &ttId) const
static const int nPhiBins
int sFGVB(const EcalTrigTowerDetId &ttId) const
int compressedEt(const EcalTrigTowerDetId &ttId) const