CMS 3D CMS Logo

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:
25  CastorCell() : energy_(0.), position_(ROOT::Math::XYZPoint(0., 0., 0.)) {}
26 
28  CastorCell(const double energy, const ROOT::Math::XYZPoint& position);
29 
31  virtual ~CastorCell();
32 
34  double energy() const { return energy_; }
35 
38 
40  bool operator>=(const CastorCell& rhs) const { return (energy_ >= rhs.energy_); }
41 
43  bool operator>(const CastorCell& rhs) const { return (energy_ > rhs.energy_); }
44 
46  bool operator<=(const CastorCell& rhs) const { return (energy_ <= rhs.energy_); }
47 
49  bool operator<(const CastorCell& rhs) const { return (energy_ < rhs.energy_); }
50 
52  double z() const { return position_.z(); }
53 
55  double phi() const { return position_.phi(); }
56 
58  double x() const { return position_.x(); }
59 
61  double y() const { return position_.y(); }
62 
64  double rho() const { return position_.rho(); }
65 
67  double eta() const { return position_.eta(); }
68 
69  private:
71  double energy_;
72 
75  };
76 
78  typedef std::vector<CastorCell> CastorCellCollection;
79 
80  // persistent reference to CastorCell objects
82 
85 
88 } // namespace reco
89 
90 #endif
edm::RefVector< CastorCellCollection > CastorCellRefVector
vector of references to CastorCell objects all in the same collection
Definition: CastorCell.h:84
bool operator>=(const CastorCell &rhs) const
comparison >= operator
Definition: CastorCell.h:40
double energy_
cell energy
Definition: CastorCell.h:71
double x() const
x coordinate of cell centroid
Definition: CastorCell.h:58
double y() const
y coordinate of cell centroid
Definition: CastorCell.h:61
double phi() const
azimuthal angle of cell centroid
Definition: CastorCell.h:55
double z() const
z coordinate of cell centroid
Definition: CastorCell.h:52
double rho() const
rho coordinate of cell centroid
Definition: CastorCell.h:64
std::vector< CastorCell > CastorCellCollection
collection of CastorCell objects
Definition: CastorCell.h:78
edm::Ref< CastorCellCollection > CastorCellRef
Definition: CastorCell.h:81
virtual ~CastorCell()
destructor
Definition: CastorCell.cc:8
double eta() const
eta coordinate of cell centroid
Definition: CastorCell.h:67
double energy() const
cell energy
Definition: CastorCell.h:34
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
bool operator<(const CastorCell &rhs) const
comparison <= operator
Definition: CastorCell.h:49
ROOT::Math::XYZPoint position() const
cell centroid position
Definition: CastorCell.h:37
fixed size matrix
Transform3DPJ::Point XYZPoint
bool operator>(const CastorCell &rhs) const
comparison > operator
Definition: CastorCell.h:43
CastorCellRefVector::iterator CastorCell_iterator
iterator over a vector of references to CastorCell objects all in the same collection ...
Definition: CastorCell.h:87
CastorCell()
default constructor. Sets energy and position to zero
Definition: CastorCell.h:25
bool operator<=(const CastorCell &rhs) const
comparison <= operator
Definition: CastorCell.h:46
ROOT::Math::XYZPoint position_
cell centroid position
Definition: CastorCell.h:74