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 
13 #include <vector>
14 #include <memory>
16 
20 
21 namespace reco {
22 
23  class CastorCell {
24  public:
25 
27  CastorCell() : energy_(0.), position_(ROOT::Math::XYZPoint(0.,0.,0.)) { }
28 
30  CastorCell(const double energy, const ROOT::Math::XYZPoint& position);
31 
33  virtual ~CastorCell();
34 
36  double energy() const { return energy_; }
37 
40 
42  bool operator >=(const CastorCell& rhs) const { return (energy_>=rhs.energy_); }
43 
45  bool operator > (const CastorCell& rhs) const { return (energy_> rhs.energy_); }
46 
48  bool operator <=(const CastorCell& rhs) const { return (energy_<=rhs.energy_); }
49 
51  bool operator < (const CastorCell& rhs) const { return (energy_< rhs.energy_); }
52 
54  double z() const { return position_.z(); }
55 
57  double phi() const { return position_.phi(); }
58 
60  double x() const { return position_.x(); }
61 
63  double y() const { return position_.y(); }
64 
66  double rho() const { return position_.rho(); }
67 
69  double eta() const { return position_.eta(); }
70 
71  private:
72 
74  double energy_;
75 
78  };
79 
81  typedef std::vector<CastorCell> CastorCellCollection;
82 
83  // persistent reference to CastorCell objects
85 
88 
91 }
92 
93 #endif
edm::RefVector< CastorCellCollection > CastorCellRefVector
vector of references to CastorCell objects all in the same collection
Definition: CastorCell.h:87
bool operator>=(const CastorCell &rhs) const
comparison &gt;= operator
Definition: CastorCell.h:42
double energy_
cell energy
Definition: CastorCell.h:74
double x() const
x coordinate of cell centroid
Definition: CastorCell.h:60
double y() const
y coordinate of cell centroid
Definition: CastorCell.h:63
double phi() const
azimuthal angle of cell centroid
Definition: CastorCell.h:57
double z() const
z coordinate of cell centroid
Definition: CastorCell.h:54
double rho() const
rho coordinate of cell centroid
Definition: CastorCell.h:66
std::vector< CastorCell > CastorCellCollection
collection of CastorCell objects
Definition: CastorCell.h:81
edm::Ref< CastorCellCollection > CastorCellRef
Definition: CastorCell.h:84
virtual ~CastorCell()
destructor
Definition: CastorCell.cc:8
double eta() const
eta coordinate of cell centroid
Definition: CastorCell.h:69
double energy() const
cell energy
Definition: CastorCell.h:36
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
bool operator<(const CastorCell &rhs) const
comparison &lt;= operator
Definition: CastorCell.h:51
ROOT::Math::XYZPoint position() const
cell centroid position
Definition: CastorCell.h:39
Transform3DPJ::Point XYZPoint
bool operator>(const CastorCell &rhs) const
comparison &gt; operator
Definition: CastorCell.h:45
CastorCellRefVector::iterator CastorCell_iterator
iterator over a vector of references to CastorCell objects all in the same collection ...
Definition: CastorCell.h:90
CastorCell()
default constructor. Sets energy and position to zero
Definition: CastorCell.h:27
bool operator<=(const CastorCell &rhs) const
comparison &lt;= operator
Definition: CastorCell.h:48
ROOT::Math::XYZPoint position_
cell centroid position
Definition: CastorCell.h:77