CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CastorCell.h
Go to the documentation of this file.
1 #ifndef CastorReco_CastorCell_h
2 #define CastorReco_CastorCell_h
3 
12 #include <vector>
13 #include <memory>
15 
19 
20 namespace reco {
21 
22  class CastorCell {
23  public:
24 
26  CastorCell() : energy_(0.), position_(ROOT::Math::XYZPoint(0.,0.,0.)) { }
27 
29  CastorCell(const double energy, const ROOT::Math::XYZPoint& position);
30 
32  virtual ~CastorCell();
33 
35  double energy() const { return energy_; }
36 
39 
41  bool operator >=(const CastorCell& rhs) const { return (energy_>=rhs.energy_); }
42 
44  bool operator > (const CastorCell& rhs) const { return (energy_> rhs.energy_); }
45 
47  bool operator <=(const CastorCell& rhs) const { return (energy_<=rhs.energy_); }
48 
50  bool operator < (const CastorCell& rhs) const { return (energy_< rhs.energy_); }
51 
53  double z() const { return position_.z(); }
54 
56  double phi() const { return position_.phi(); }
57 
59  double x() const { return position_.x(); }
60 
62  double y() const { return position_.y(); }
63 
65  double rho() const { return position_.rho(); }
66 
68  double eta() const { return position_.eta(); }
69 
70  private:
71 
73  double energy_;
74 
77  };
78 
80  typedef std::vector<CastorCell> CastorCellCollection;
81 
82  // persistent reference to CastorCell objects
84 
87 
90 }
91 
92 #endif
edm::RefVector< CastorCellCollection > CastorCellRefVector
vector of references to CastorCell objects all in the same collection
Definition: CastorCell.h:86
bool operator>=(const CastorCell &rhs) const
comparison &gt;= operator
Definition: CastorCell.h:41
double energy_
cell energy
Definition: CastorCell.h:73
double x() const
x coordinate of cell centroid
Definition: CastorCell.h:59
double y() const
y coordinate of cell centroid
Definition: CastorCell.h:62
double phi() const
azimuthal angle of cell centroid
Definition: CastorCell.h:56
double z() const
z coordinate of cell centroid
Definition: CastorCell.h:53
double rho() const
rho coordinate of cell centroid
Definition: CastorCell.h:65
std::vector< CastorCell > CastorCellCollection
collection of CastorCell objects
Definition: CastorCell.h:80
edm::Ref< CastorCellCollection > CastorCellRef
Definition: CastorCell.h:83
virtual ~CastorCell()
destructor
Definition: CastorCell.cc:8
double eta() const
eta coordinate of cell centroid
Definition: CastorCell.h:68
double energy() const
cell energy
Definition: CastorCell.h:35
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
bool operator<(const CastorCell &rhs) const
comparison &lt;= operator
Definition: CastorCell.h:50
ROOT::Math::XYZPoint position() const
cell centroid position
Definition: CastorCell.h:38
Transform3DPJ::Point XYZPoint
bool operator>(const CastorCell &rhs) const
comparison &gt; operator
Definition: CastorCell.h:44
CastorCellRefVector::iterator CastorCell_iterator
iterator over a vector of references to CastorCell objects all in the same collection ...
Definition: CastorCell.h:89
CastorCell()
default constructor. Sets energy and position to zero
Definition: CastorCell.h:26
bool operator<=(const CastorCell &rhs) const
comparison &lt;= operator
Definition: CastorCell.h:47
ROOT::Math::XYZPoint position_
cell centroid position
Definition: CastorCell.h:76