CMS 3D CMS Logo

Functions
HGCRecHit.cc File Reference
#include "DataFormats/HGCRecHit/interface/HGCRecHit.h"
#include "DataFormats/ForwardDetId/interface/HFNoseDetId.h"
#include "DataFormats/ForwardDetId/interface/HGCSiliconDetId.h"
#include "DataFormats/ForwardDetId/interface/HGCScintillatorDetId.h"
#include "DataFormats/ForwardDetId/interface/HGCalDetId.h"
#include "DataFormats/HcalDetId/interface/HcalDetId.h"
#include <cassert>
#include <cmath>

Go to the source code of this file.

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 106 of file HGCRecHit.cc.

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

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

DetId::Hcal
Definition: DetId.h:28
HFNoseDetId
Definition: HFNoseDetId.h:22
HGCSiliconDetId
Definition: HGCSiliconDetId.h:22
DetId::HGCalHSi
Definition: DetId.h:33
DetId::HGCalEE
Definition: DetId.h:32
alignCSCRings.s
s
Definition: alignCSCRings.py:92
HFNose
Definition: ForwardSubdetector.h:11
HGCEE
Definition: ForwardSubdetector.h:8
HcalDetId
Definition: HcalDetId.h:12
HGCalDetId
Definition: HGCalDetId.h:8
HcalEndcap
Definition: HcalAssistant.h:34
HGCScintillatorDetId
Definition: HGCScintillatorDetId.h:21
DetId::HGCalHSc
Definition: DetId.h:34
HGCHEF
Definition: ForwardSubdetector.h:9
DetId::Forward
Definition: DetId.h:30
hit
Definition: SiStripHitEffFromCalibTree.cc:88