Go to the documentation of this file.00001 #ifndef CastorReco_CastorCluster_h
00002 #define CastorReco_CastorCluster_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 #include "DataFormats/CastorReco/interface/CastorTower.h"
00022
00023 namespace reco {
00024
00025 class CastorCluster {
00026 public:
00027
00029 CastorCluster() : energy_(0.), position_(ROOT::Math::XYZPoint(0.,0.,0.)), emEnergy_(0.), hadEnergy_(0.), fem_(0.), width_(0.),
00030 depth_(0.), fhot_(0.), sigmaz_(0.) { }
00031
00033 CastorCluster(const double energy, const ROOT::Math::XYZPoint& position, const double emEnergy, const double hadEnergy, const double fem,
00034 const double width, const double depth, const double fhot, const double sigmaz, const CastorTowerRefVector& usedTowers);
00035
00036
00038 virtual ~CastorCluster();
00039
00041 double energy() const { return energy_; }
00042
00044 ROOT::Math::XYZPoint position() const { return position_; }
00045
00047 double emEnergy() const { return emEnergy_; }
00048
00050 double hadEnergy() const { return hadEnergy_; }
00051
00053 double fem() const { return fem_; }
00054
00056 double width() const { return width_; }
00057
00059 double depth() const { return depth_; }
00060
00062 double fhot() const { return fhot_; }
00063
00065 double sigmaz() const { return sigmaz_; }
00066
00068 CastorTowerRefVector getUsedTowers() const { return usedTowers_; }
00069
00071 CastorTower_iterator towersBegin() const { return usedTowers_.begin(); }
00072
00074 CastorTower_iterator towersEnd() const { return usedTowers_.end(); }
00075
00077 size_t towersSize() const { return usedTowers_.size(); }
00078
00080 void add( const CastorTowerRef & tower ) { usedTowers_.push_back( tower ); }
00081
00083 bool operator >=(const CastorCluster& rhs) const { return (energy_>=rhs.energy_); }
00084
00086 bool operator > (const CastorCluster& rhs) const { return (energy_> rhs.energy_); }
00087
00089 bool operator <=(const CastorCluster& rhs) const { return (energy_<=rhs.energy_); }
00090
00092 bool operator < (const CastorCluster& rhs) const { return (energy_< rhs.energy_); }
00093
00095 double eta() const { return position_.eta(); }
00096
00098 double phi() const { return position_.phi(); }
00099
00101 double x() const { return position_.x(); }
00102
00104 double y() const { return position_.y(); }
00105
00107 double rho() const { return position_.rho(); }
00108
00109 private:
00110
00112 double energy_;
00113
00115 ROOT::Math::XYZPoint position_;
00116
00118 double emEnergy_;
00119
00121 double hadEnergy_;
00122
00124 double fem_;
00125
00127 double width_;
00128
00130 double depth_;
00131
00133 double fhot_;
00134
00136 double sigmaz_;
00137
00139 CastorTowerRefVector usedTowers_;
00140 };
00141
00143 typedef std::vector<CastorCluster> CastorClusterCollection;
00144
00145
00146 typedef edm::Ref<CastorClusterCollection> CastorClusterRef;
00147
00149 typedef edm::RefVector<CastorClusterCollection> CastorClusterRefVector;
00150
00152 typedef CastorClusterRefVector::iterator CastorCluster_iterator;
00153 }
00154
00155 #endif