test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CaloHit.cc
Go to the documentation of this file.
1 // File: CaloHit.cc
3 // Description: Temporary Hit class for QIE Analysis
6 
7 #include <iomanip>
8 
9 CaloHit::CaloHit(int deti, int layi, double ei, double etai, double fi,
10  double timi, uint32_t idi): deth(deti), layerh(layi),
11  eh(ei), etah(etai), phih(fi),
12  timeh(timi), idh(idi) {}
13 
14 CaloHit::CaloHit(): deth(0), layerh(0), eh(0), etah(0), phih(0), timeh(0),
15  idh(0) {}
16 
17 CaloHit::CaloHit(const CaloHit &right) {
18  deth = right.deth;
19  layerh = right.layerh;
20  eh = right.eh;
21  etah = right.etah;
22  phih = right.phih;
23  timeh = right.timeh;
24  idh = right.idh;
25 }
26 
28 
29 bool CaloHit::operator<(const CaloHit& hit) const {
30  return (eh/cosh(etah) < hit.e()/cosh(hit.eta())) ? false : true ;
31 }
32 
33 std::ostream& operator<<(std::ostream& os, const CaloHit& hit) {
34  os << "E " << std::setw(6) << hit.e() << " eta " << std::setw(6)
35  << hit.eta() << " phi " << std::setw(6) << hit.phi() << " t "
36  << std::setw(6) << hit.t() << " layer " << hit.layer() << " det "
37  << hit.det() << " id 0x" << std::hex << hit.id() << std::dec;
38  return os;
39 }
int layerh
Definition: CaloHit.h:35
bool operator<(const CaloHit &hit) const
Definition: CaloHit.cc:29
int det() const
Definition: CaloHit.h:22
double phi() const
Definition: CaloHit.h:26
double timeh
Definition: CaloHit.h:36
double eta() const
Definition: CaloHit.h:25
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
double phih
Definition: CaloHit.h:36
virtual ~CaloHit()
Definition: CaloHit.cc:27
double eh
Definition: CaloHit.h:36
uint32_t id() const
Definition: CaloHit.h:28
double t() const
Definition: CaloHit.h:27
int layer() const
Definition: CaloHit.h:23
double e() const
Definition: CaloHit.h:24
double etah
Definition: CaloHit.h:36
int deth
Definition: CaloHit.h:35
CaloHit()
Definition: CaloHit.cc:14
uint32_t idh
Definition: CaloHit.h:37