File indexing completed on 2024-04-06 12:03:49
0001 #ifndef CastorReco_CastorCell_h
0002 #define CastorReco_CastorCell_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include <vector>
0013 #include <memory>
0014 #include "DataFormats/Math/interface/Point3D.h"
0015
0016 #include "DataFormats/Common/interface/RefProd.h"
0017 #include "DataFormats/Common/interface/Ref.h"
0018 #include "DataFormats/Common/interface/RefVector.h"
0019
0020 namespace reco {
0021
0022 class CastorCell {
0023 public:
0024
0025 CastorCell() : energy_(0.), position_(ROOT::Math::XYZPoint(0., 0., 0.)) {}
0026
0027
0028 CastorCell(const double energy, const ROOT::Math::XYZPoint& position);
0029
0030
0031 virtual ~CastorCell();
0032
0033
0034 double energy() const { return energy_; }
0035
0036
0037 ROOT::Math::XYZPoint position() const { return position_; }
0038
0039
0040 bool operator>=(const CastorCell& rhs) const { return (energy_ >= rhs.energy_); }
0041
0042
0043 bool operator>(const CastorCell& rhs) const { return (energy_ > rhs.energy_); }
0044
0045
0046 bool operator<=(const CastorCell& rhs) const { return (energy_ <= rhs.energy_); }
0047
0048
0049 bool operator<(const CastorCell& rhs) const { return (energy_ < rhs.energy_); }
0050
0051
0052 double z() const { return position_.z(); }
0053
0054
0055 double phi() const { return position_.phi(); }
0056
0057
0058 double x() const { return position_.x(); }
0059
0060
0061 double y() const { return position_.y(); }
0062
0063
0064 double rho() const { return position_.rho(); }
0065
0066
0067 double eta() const { return position_.eta(); }
0068
0069 private:
0070
0071 double energy_;
0072
0073
0074 ROOT::Math::XYZPoint position_;
0075 };
0076
0077
0078 typedef std::vector<CastorCell> CastorCellCollection;
0079
0080
0081 typedef edm::Ref<CastorCellCollection> CastorCellRef;
0082
0083
0084 typedef edm::RefVector<CastorCellCollection> CastorCellRefVector;
0085
0086
0087 typedef CastorCellRefVector::iterator CastorCell_iterator;
0088 }
0089
0090 #endif