CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EcalTrigPrimCompactColl.cc
Go to the documentation of this file.
2 
4  const int nTtEtaBins = 56;
5  const int nTtPhiBins = 72;
7  tpColl.reserve(nTtEtaBins * nTtPhiBins);
8 
9  for (int zside = -1; zside <= 1; zside += 2) {
10  for (int iabseta = 1; iabseta <= nTtEtaBins / 2; ++iabseta) {
11  EcalSubdetector subdet = (iabseta <= 17) ? EcalBarrel : EcalEndcap;
12  for (int iphi = 1; iphi <= 72; ++iphi) {
13  const EcalTrigTowerDetId ttId(zside, subdet, iabseta, iphi, EcalTrigTowerDetId::SUBDETIJMODE);
15  const int rawTp = raw(ttId.ieta(), ttId.iphi());
16  const EcalTriggerPrimitiveSample tps(rawTp);
17  tp.setSize(1);
18  tp.setSample(0, tps);
19  tpColl.push_back(tp);
20  }
21  }
22  }
23  tpColl.sort();
24  dest.swap(tpColl);
25 }
static const int SUBDETIJMODE
void swap(SortedCollection &other)
void push_back(T const &t)
int zside(DetId const &)
unsigned ttId(DetId const &, EcalElectronicsMapping const *)
int ieta() const
get the tower ieta
void setSample(int i, const EcalTriggerPrimitiveSample &sam)
int iphi() const
get the tower iphi
void toEcalTrigPrimDigiCollection(EcalTrigPrimDigiCollection &dest) const
void reserve(size_type n)
EcalSubdetector
uint16_t raw(int ieta, int iphi) const
get the raw word