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 
14 bool HBHERecHit::isMerged() const {
16 }
17 
18 std::ostream& operator<<(std::ostream& s, const HBHERecHit& hit) {
19  s << hit.id() << ": " << hit.energy() << " GeV";
20  if (hit.eraw() > -0.9e21) {
21  s << ", eraw=" << hit.eraw() << " GeV";
22  }
23  if (hit.eaux() > -0.9e21) {
24  s << ", eaux=" << hit.eaux() << " GeV";
25  }
26  if(hit.time() > -998) {
27  s << ", t= " << hit.time() << " to " << hit.timeFalling() << " ns";
28  }
29  return s;
30 }
31 
32 void HBHERecHit::getMergedIds(std::vector<HcalDetId>* ids) const
33 {
34  if (ids)
35  {
36  ids->clear();
38  {
39  const unsigned nMerged = CaloRecHitAuxSetter::getField(
42  ids->reserve(nMerged);
43  const HcalDetId myId(id());
44  for (unsigned i=0; i<nMerged; ++i)
45  {
46  const unsigned depth = CaloRecHitAuxSetter::getField(auxHBHE_, 0xf, i*4);
47  ids->emplace_back(myId.subdet(), myId.ieta(), myId.iphi(), depth);
48  }
49  }
50  }
51 }
constexpr float energy() const
Definition: CaloRecHit.h:31
static const unsigned MASK_NSAMPLES
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:146
HcalDetId id() const
get the id
Definition: HBHERecHit.h:42
uint32_t auxPhase1_
Definition: HBHERecHit.h:75
HcalDetId idFront() const
Definition: HBHERecHit.cc:5
static const unsigned OFF_NSAMPLES
constexpr float time() const
Definition: CaloRecHit.h:33
int ieta() const
get the cell ieta
Definition: HcalDetId.h:159
bool isMerged() const
Definition: HBHERecHit.cc:14
constexpr unsigned getField(const uint32_t u, const unsigned mask, const unsigned offset)
float timeFalling() const
get the hit falling time
Definition: HBHERecHit.h:39
uint32_t auxHBHE_
Definition: HBHERecHit.h:74
std::ostream & operator<<(std::ostream &s, const HBHERecHit &hit)
Definition: HBHERecHit.cc:18
int iphi() const
get the cell iphi
Definition: HcalDetId.h:161
void getMergedIds(std::vector< HcalDetId > *ids) const
Definition: HBHERecHit.cc:32
static const unsigned OFF_COMBINED
float eraw() const
Definition: HBHERecHit.h:48
float eaux() const
Definition: HBHERecHit.h:51