CMS 3D CMS Logo

EcalRecHit.cc
Go to the documentation of this file.
6 #include <cassert>
7 #include <cmath>
8 
9 std::ostream& operator<<(std::ostream& s, const EcalRecHit& hit) {
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 }
std::ostream & operator<<(std::ostream &s, const EcalRecHit &hit)
Definition: EcalRecHit.cc:9