CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
InternalObj.h
Go to the documentation of this file.
1 #ifndef InternalObj_H
2 #define InternalObj_H
3 
4 #include <ostream>
5 
6 struct InternalObj{
7 
8  float pt, eta, phi;
9  float disc;
10  int bx, q, charge;
11  int refLayer;
12  int hits;
13 
14  InternalObj() : pt(-1.), eta(99.), phi(9999.), disc(-999), bx(0), q(-1), charge(99), refLayer(-1) {}
15  InternalObj(float pt, float eta, float phi,
16  float disc=-999, int bx=0, int q=-1,
17  int charge=99, int refLayer=-1) :
18  pt(pt), eta(eta), phi(phi), disc(disc), bx(bx), q(q), charge(charge), refLayer(refLayer), hits(0) {}
19 
20  bool isValid() const { return q >= 0;}
21 
22  bool operator< (const InternalObj & o) const {
23  if(q > o.q) return true;
24  else if(q==o.q && disc > o.disc) return true;
25  else return false;
26 
27  }
28 
29  friend std::ostream & operator<< (std::ostream &out, const InternalObj &o);
30 
31 };
32 #endif
float phi
Definition: InternalObj.h:8
InternalObj(float pt, float eta, float phi, float disc=-999, int bx=0, int q=-1, int charge=99, int refLayer=-1)
Definition: InternalObj.h:15
bool isValid() const
Definition: InternalObj.h:20
float pt
Definition: InternalObj.h:8
float eta
Definition: InternalObj.h:8
bool operator<(const InternalObj &o) const
Definition: InternalObj.h:22
friend std::ostream & operator<<(std::ostream &out, const InternalObj &o)
Definition: InternalObj.cc:5
float disc
Definition: InternalObj.h:9