#include "DataFormats/CaloRecHit/interface/CaloRecHit.h"
Go to the source code of this file.
Classes | |
class | EcalRecHit |
Functions | |
std::ostream & | operator<< (std::ostream &s, const EcalRecHit &hit) |
std::ostream& operator<< | ( | std::ostream & | s, |
const EcalRecHit & | hit | ||
) |
Definition at line 144 of file EcalRecHit.cc.
References DetId::det(), CaloRecHit::detid(), DetId::Ecal, EcalBarrel, EcalEndcap, EcalPreshower, CaloRecHit::energy(), DetId::subdetId(), and CaloRecHit::time().
{ if (hit.detid().det() == DetId::Ecal && hit.detid().subdetId() == EcalBarrel) return s << EBDetId(hit.detid()) << ": " << hit.energy() << " GeV, " << hit.time() << " ns"; else if (hit.detid().det() == DetId::Ecal && hit.detid().subdetId() == EcalEndcap) return s << EEDetId(hit.detid()) << ": " << hit.energy() << " GeV, " << hit.time() << " ns"; else if (hit.detid().det() == DetId::Ecal && hit.detid().subdetId() == EcalPreshower) return s << ESDetId(hit.detid()) << ": " << hit.energy() << " GeV, " << hit.time() << " ns"; else return s << "EcalRecHit undefined subdetector" ; }