CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/DataFormats/CastorReco/interface/CastorCell.h

Go to the documentation of this file.
00001 #ifndef CastorReco_CastorCell_h
00002 #define CastorReco_CastorCell_h
00003 
00013 #include <vector>
00014 #include <memory>
00015 #include "DataFormats/Math/interface/Point3D.h"
00016 
00017 #include "DataFormats/Common/interface/RefProd.h"
00018 #include "DataFormats/Common/interface/Ref.h"
00019 #include "DataFormats/Common/interface/RefVector.h"
00020 
00021 namespace reco {
00022 
00023   class CastorCell {
00024   public:
00025 
00027     CastorCell() : energy_(0.), position_(ROOT::Math::XYZPoint(0.,0.,0.)) { }
00028 
00030     CastorCell(const double energy, const ROOT::Math::XYZPoint& position);
00031 
00033     virtual ~CastorCell();
00034 
00036     double energy() const { return energy_; }
00037 
00039     ROOT::Math::XYZPoint position() const { return position_; }
00040 
00042     bool operator >=(const CastorCell& rhs) const { return (energy_>=rhs.energy_); }
00043 
00045     bool operator > (const CastorCell& rhs) const { return (energy_> rhs.energy_); }
00046 
00048     bool operator <=(const CastorCell& rhs) const { return (energy_<=rhs.energy_); }
00049 
00051     bool operator < (const CastorCell& rhs) const { return (energy_< rhs.energy_); }
00052 
00054     double z() const { return position_.z(); }
00055 
00057     double phi() const { return position_.phi(); }
00058 
00060     double x() const { return position_.x(); }
00061 
00063     double y() const { return position_.y(); }
00064 
00066     double rho() const { return position_.rho(); }
00067 
00069     double eta() const { return position_.eta(); }
00070 
00071   private:
00072 
00074     double energy_;
00075 
00077     ROOT::Math::XYZPoint position_;
00078   };
00079   
00081   typedef std::vector<CastorCell> CastorCellCollection;
00082 
00083   // persistent reference to CastorCell objects
00084   typedef edm::Ref<CastorCellCollection> CastorCellRef;
00085  
00087   typedef edm::RefVector<CastorCellCollection> CastorCellRefVector;
00088  
00090   typedef CastorCellRefVector::iterator CastorCell_iterator;
00091 }
00092 
00093 #endif