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
RefProd.h
reco::CastorCell::energy
double energy() const
cell energy
Definition: CastorCell.h:34
ROOT::Math::XYZPoint
Transform3DPJ::Point XYZPoint
Definition: Transform3DPJ.cc:33
reco::CastorCellRefVector
edm::RefVector< CastorCellCollection > CastorCellRefVector
vector of references to CastorCell objects all in the same collection
Definition: CastorCell.h:84
reco::CastorCell::CastorCell
CastorCell()
default constructor. Sets energy and position to zero
Definition: CastorCell.h:25
edm::RefVector
Definition: EDProductfwd.h:27
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:46
reco::CastorCell::y
double y() const
y coordinate of cell centroid
Definition: CastorCell.h:61
edm::Ref
Definition: AssociativeIterator.h:58
reco::CastorCell::operator>=
bool operator>=(const CastorCell &rhs) const
comparison >= operator
Definition: CastorCell.h:40
reco::CastorCell::z
double z() const
z coordinate of cell centroid
Definition: CastorCell.h:52
reco::CastorCell::operator>
bool operator>(const CastorCell &rhs) const
comparison > operator
Definition: CastorCell.h:43
reco::CastorCell::~CastorCell
virtual ~CastorCell()
destructor
Definition: CastorCell.cc:8
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
reco::CastorCellRef
edm::Ref< CastorCellCollection > CastorCellRef
Definition: CastorCell.h:81
RefVector.h
reco::CastorCell::energy_
double energy_
cell energy
Definition: CastorCell.h:71
Ref.h
reco::CastorCell_iterator
CastorCellRefVector::iterator CastorCell_iterator
iterator over a vector of references to CastorCell objects all in the same collection
Definition: CastorCell.h:87
reco::CastorCell::operator<
bool operator<(const CastorCell &rhs) const
comparison <= operator
Definition: CastorCell.h:49
reco::CastorCell::position
ROOT::Math::XYZPoint position() const
cell centroid position
Definition: CastorCell.h:37
edm::RefVectorIterator
Definition: EDProductfwd.h:33
Point3D.h
reco::CastorCell::eta
double eta() const
eta coordinate of cell centroid
Definition: CastorCell.h:67
reco::CastorCell::rho
double rho() const
rho coordinate of cell centroid
Definition: CastorCell.h:64
reco::CastorCell::position_
ROOT::Math::XYZPoint position_
cell centroid position
Definition: CastorCell.h:74
reco::CastorCell::operator<=
bool operator<=(const CastorCell &rhs) const
comparison <= operator
Definition: CastorCell.h:46
reco::CastorCell
Definition: CastorCell.h:22
ROOT
Definition: Transform3DPJ.h:35
reco::CastorCell::phi
double phi() const
azimuthal angle of cell centroid
Definition: CastorCell.h:55
reco::CastorCell::x
double x() const
x coordinate of cell centroid
Definition: CastorCell.h:58
reco::CastorCellCollection
std::vector< CastorCell > CastorCellCollection
collection of CastorCell objects
Definition: CastorCell.h:78