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

◆ operator<<()

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

Definition at line 107 of file HGCRecHit.cc.

References DetId::Forward, DetId::Hcal, HcalEndcap, HFNose, DetId::HGCalEE, DetId::HGCalHSc, DetId::HGCalHSi, HGCEE, HGCHEF, and alignCSCRings::s.

107  {
108  if (hit.detid().det() == DetId::Forward && hit.detid().subdetId() == HGCEE)
109  return s << HGCalDetId(hit.detid()) << ": " << hit.energy() << " GeV, " << hit.time() << " ns";
110  else if (hit.detid().det() == DetId::Forward && hit.detid().subdetId() == HGCHEF)
111  return s << HGCalDetId(hit.detid()) << ": " << hit.energy() << " GeV, " << hit.time() << " ns";
112  else if (hit.detid().det() == DetId::Hcal && hit.detid().subdetId() == HcalEndcap)
113  return s << HcalDetId(hit.detid()) << ": " << hit.energy() << " GeV, " << hit.time() << " ns";
114  else if (hit.detid().det() == DetId::HGCalEE || hit.detid().det() == DetId::HGCalHSi)
115  return s << HGCSiliconDetId(hit.detid()) << ": " << hit.energy() << " GeV, " << hit.time() << " ns";
116  else if (hit.detid().det() == DetId::HGCalHSc)
117  return s << HGCScintillatorDetId(hit.detid()) << ": " << hit.energy() << " GeV, " << hit.time() << " ns";
118  else if (hit.detid().det() == DetId::Forward && hit.detid().subdetId() == HFNose)
119  return s << HFNoseDetId(hit.detid()) << ": " << hit.energy() << " GeV, " << hit.time() << " ns";
120  else
121  return s << "HGCRecHit undefined subdetector";
122 }