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, HGCEE, HGCHEB, 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::Forward && hit.detid().subdetId() == HGCHEB)
125  return s << HGCHEDetId(hit.detid()) << ": " << hit.energy() << " GeV, " << hit.time() << " ns";
126  else
127  return s << "HGCRecHit undefined subdetector" ;
128 }
const DetId & detid() const
Definition: CaloRecHit.h:21
float time() const
Definition: CaloRecHit.h:19
float energy() const
Definition: CaloRecHit.h:17
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:38
Detector det() const
get the detector field from this detid
Definition: DetId.h:36