CMS 3D CMS Logo

HBHERecHit.cc
Go to the documentation of this file.
4 
7  const HcalDetId myId(id());
8  return HcalDetId(myId.subdet(), myId.ieta(), myId.iphi(), auxHBHE_ & 0xf);
9  } else {
10  return id();
11  }
12 }
13 
15 
16 std::ostream& operator<<(std::ostream& s, const HBHERecHit& hit) {
17  s << hit.id() << ": " << hit.energy() << " GeV";
18  if (hit.eraw() > -0.9e21) {
19  s << ", eraw=" << hit.eraw() << " GeV";
20  }
21  if (hit.eaux() > -0.9e21) {
22  s << ", eaux=" << hit.eaux() << " GeV";
23  }
24  if (hit.time() > -998) {
25  s << ", t= " << hit.time() << " to " << hit.timeFalling() << " ns";
26  }
27  return s;
28 }
29 
30 void HBHERecHit::getMergedIds(std::vector<HcalDetId>* ids) const {
31  if (ids) {
32  ids->clear();
34  const unsigned nMerged = CaloRecHitAuxSetter::getField(
36  ids->reserve(nMerged);
37  const HcalDetId myId(id());
38  for (unsigned i = 0; i < nMerged; ++i) {
39  const unsigned depth = CaloRecHitAuxSetter::getField(auxHBHE_, 0xf, i * 4);
40  ids->emplace_back(myId.subdet(), myId.ieta(), myId.iphi(), depth);
41  }
42  }
43  }
44 }
static const unsigned MASK_NSAMPLES
bool isMerged() const
Definition: HBHERecHit.cc:14
uint32_t auxPhase1_
Definition: HBHERecHit.h:78
static const unsigned OFF_NSAMPLES
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
constexpr int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
HcalDetId idFront() const
Definition: HBHERecHit.cc:5
constexpr unsigned getField(const uint32_t u, const unsigned mask, const unsigned offset)
uint32_t auxHBHE_
Definition: HBHERecHit.h:77
unsigned int id
std::ostream & operator<<(std::ostream &s, const HBHERecHit &hit)
Definition: HBHERecHit.cc:16
constexpr HcalDetId id() const
get the id
Definition: HBHERecHit.h:41
static const unsigned OFF_COMBINED
void getMergedIds(std::vector< HcalDetId > *ids) const
Definition: HBHERecHit.cc:30
constexpr int iphi() const
get the cell iphi
Definition: HcalDetId.h:157