CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 108 of file HGCRecHit.cc.

References DetId::det(), CaloRecHit::detid(), CaloRecHit::energy(), DetId::Forward, HGCEE, HGCHEB, HGCHEF, DetId::subdetId(), and CaloRecHit::time().

108  {
109  if (hit.detid().det() == DetId::Forward && hit.detid().subdetId() == HGCEE)
110  return s << HGCEEDetId(hit.detid()) << ": " << hit.energy() << " GeV, " << hit.time() << " ns";
111  else if (hit.detid().det() == DetId::Forward && hit.detid().subdetId() == HGCHEF)
112  return s << HGCHEDetId(hit.detid()) << ": " << hit.energy() << " GeV, " << hit.time() << " ns";
113  else if (hit.detid().det() == DetId::Forward && hit.detid().subdetId() == HGCHEB)
114  return s << HGCHEDetId(hit.detid()) << ": " << hit.energy() << " GeV, " << hit.time() << " ns";
115  else
116  return s << "HGCRecHit undefined subdetector" ;
117 }
const DetId & detid() const
Definition: CaloRecHit.h:20
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:37
Detector det() const
get the detector field from this detid
Definition: DetId.h:35