Go to the documentation of this file.00001
00002
00003
00005 #include "SimDataFormats/CaloHit/interface/CaloHit.h"
00006
00007 #include <iomanip>
00008
00009 CaloHit::CaloHit(int deti, int layi, double ei, double etai, double fi,
00010 double timi, uint32_t idi): deth(deti), layerh(layi),
00011 eh(ei), etah(etai), phih(fi),
00012 timeh(timi), idh(idi) {}
00013
00014 CaloHit::CaloHit(): deth(0), layerh(0), eh(0), etah(0), phih(0), timeh(0),
00015 idh(0) {}
00016
00017 CaloHit::CaloHit(const CaloHit &right) {
00018 deth = right.deth;
00019 layerh = right.layerh;
00020 eh = right.eh;
00021 etah = right.etah;
00022 phih = right.phih;
00023 timeh = right.timeh;
00024 idh = right.idh;
00025 }
00026
00027 CaloHit::~CaloHit() {}
00028
00029 bool CaloHit::operator<(const CaloHit& hit) const {
00030 return (eh/cosh(etah) < hit.e()/cosh(hit.eta())) ? false : true ;
00031 }
00032
00033 std::ostream& operator<<(std::ostream& os, const CaloHit& hit) {
00034 os << "E " << std::setw(6) << hit.e() << " eta " << std::setw(6)
00035 << hit.eta() << " phi " << std::setw(6) << hit.phi() << " t "
00036 << std::setw(6) << hit.t() << " layer " << hit.layer() << " det "
00037 << hit.det() << " id 0x" << std::hex << hit.id() << std::dec;
00038 return os;
00039 }