CMS 3D CMS Logo

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

Go to the source code of this file.

Classes

class  EcalRecHit
 

Functions

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

Function Documentation

◆ operator<<()

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

Definition at line 9 of file EcalRecHit.cc.

9  {
10  if (hit.detid().det() == DetId::Ecal && hit.detid().subdetId() == EcalBarrel)
11  return s << EBDetId(hit.detid()) << ": " << hit.energy() << " GeV, " << hit.time() << " ns";
12  else if (hit.detid().det() == DetId::Ecal && hit.detid().subdetId() == EcalEndcap)
13  return s << EEDetId(hit.detid()) << ": " << hit.energy() << " GeV, " << hit.time() << " ns";
14  else if (hit.detid().det() == DetId::Ecal && hit.detid().subdetId() == EcalPreshower)
15  return s << ESDetId(hit.detid()) << ": " << hit.energy() << " GeV, " << hit.time() << " ns";
16  else
17  return s << "EcalRecHit undefined subdetector";
18 }

References DetId::Ecal, EcalBarrel, EcalEndcap, EcalPreshower, and alignCSCRings::s.

EBDetId
Definition: EBDetId.h:17
ESDetId
Definition: ESDetId.h:15
EcalBarrel
Definition: EcalSubdetector.h:10
alignCSCRings.s
s
Definition: alignCSCRings.py:92
EEDetId
Definition: EEDetId.h:14
EcalEndcap
Definition: EcalSubdetector.h:10
DetId::Ecal
Definition: DetId.h:27
EcalPreshower
Definition: EcalSubdetector.h:10
hit
Definition: SiStripHitEffFromCalibTree.cc:88