CMS 3D CMS Logo

Classes | Functions
HGCRecHit.h File Reference
#include "DataFormats/CaloRecHit/interface/CaloRecHit.h"
#include <vector>

Go to the source code of this file.

Classes

class  HGCRecHit
 

Functions

std::ostream & operator<< (std::ostream &s, const HGCRecHit &hit)
 

Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const HGCRecHit hit 
)

Definition at line 119 of file HGCRecHit.cc.

References DetId::det(), CaloRecHit::detid(), CaloRecHit::energy(), DetId::Forward, DetId::Hcal, HcalEndcap, HFNose, DetId::HGCalEE, DetId::HGCalHSc, DetId::HGCalHSi, HGCEE, HGCHEF, DetId::subdetId(), and CaloRecHit::time().

119  {
120  if (hit.detid().det() == DetId::Forward && hit.detid().subdetId() == HGCEE)
121  return s << HGCalDetId(hit.detid()) << ": " << hit.energy() << " GeV, " << hit.time() << " ns";
122  else if (hit.detid().det() == DetId::Forward && hit.detid().subdetId() == HGCHEF)
123  return s << HGCalDetId(hit.detid()) << ": " << hit.energy() << " GeV, " << hit.time() << " ns";
124  else if (hit.detid().det() == DetId::Hcal && hit.detid().subdetId() == HcalEndcap)
125  return s << HcalDetId(hit.detid()) << ": " << hit.energy() << " GeV, " << hit.time() << " ns";
126  else if (hit.detid().det() == DetId::HGCalEE || hit.detid().det() == DetId::HGCalHSi)
127  return s << HGCSiliconDetId(hit.detid()) << ": " << hit.energy() << " GeV, " << hit.time() << " ns";
128  else if (hit.detid().det() == DetId::HGCalHSc)
129  return s << HGCScintillatorDetId(hit.detid()) << ": " << hit.energy() << " GeV, " << hit.time() << " ns";
130  else if (hit.detid().det() == DetId::Forward && hit.detid().subdetId() == HFNose)
131  return s << HFNoseDetId(hit.detid()) << ": " << hit.energy() << " GeV, " << hit.time() << " ns";
132  else
133  return s << "HGCRecHit undefined subdetector";
134 }
constexpr float energy() const
Definition: CaloRecHit.h:29
constexpr const DetId & detid() const
Definition: CaloRecHit.h:33
constexpr float time() const
Definition: CaloRecHit.h:31
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46