Go to the documentation of this file.00001 #ifndef EgammaReco_SuperCluster_h
00002 #define EgammaReco_SuperCluster_h
00003
00013 #include "DataFormats/Math/interface/Point3D.h"
00014 #include "DataFormats/CaloRecHit/interface/CaloCluster.h"
00015 #include "DataFormats/CaloRecHit/interface/CaloClusterFwd.h"
00016 #include "DataFormats/DetId/interface/DetId.h"
00017
00018
00019 namespace reco {
00020 class SuperCluster : public CaloCluster {
00021 public:
00022
00023 typedef math::XYZPoint Point;
00024
00026 SuperCluster() : CaloCluster(0., Point(0.,0.,0.)), preshowerEnergy_(0), rawEnergy_(-1.), phiWidth_(0), etaWidth_(0), preshowerEnergy1_(0), preshowerEnergy2_(0) {}
00027
00029 SuperCluster( double energy, const Point& position );
00030
00031 SuperCluster( double energy, const Point& position,
00032 const CaloClusterPtr & seed,
00033 const CaloClusterPtrVector& clusters,
00034 double Epreshower=0.,
00035 double phiWidth=0., double etaWidth=0.,
00036 double Epreshower1=0., double Epreshower2=0.);
00037
00038
00039 SuperCluster( double energy, const Point& position,
00040 const CaloClusterPtr & seed,
00041 const CaloClusterPtrVector& clusters,
00042 const CaloClusterPtrVector& preshowerClusters,
00043 double Epreshower=0.,
00044 double phiWidth=0., double etaWidth=0.,
00045 double Epreshower1=0., double Epreshower2=0.);
00046
00047
00049 double rawEnergy() const { return rawEnergy_; }
00050
00052 double preshowerEnergy() const { return preshowerEnergy_; }
00053 double preshowerEnergyPlane1() const {return preshowerEnergy1_; }
00054 double preshowerEnergyPlane2() const {return preshowerEnergy2_; }
00055
00057 double phiWidth() const { return phiWidth_; }
00058 double etaWidth() const { return etaWidth_; }
00059
00060
00061 void setPreshowerEnergy( double preshowerEnergy ) { preshowerEnergy_ = preshowerEnergy; };
00062 void serPreshowerEnergyPlane1( double preshowerEnergy1 ) { preshowerEnergy1_ = preshowerEnergy1; };
00063 void serPreshowerEnergyPlane2( double preshowerEnergy2 ) { preshowerEnergy2_ = preshowerEnergy2; };
00064 void setPhiWidth( double pw ) { phiWidth_ = pw; }
00065 void setEtaWidth( double ew ) { etaWidth_ = ew; }
00066
00068 const CaloClusterPtr & seed() const { return seed_; }
00069
00071 CaloCluster_iterator clustersBegin() const { return clusters_.begin(); }
00072
00074 CaloCluster_iterator clustersEnd() const { return clusters_.end(); }
00075
00077 CaloCluster_iterator preshowerClustersBegin() const { return preshowerClusters_.begin(); }
00078
00080 CaloCluster_iterator preshowerClustersEnd() const { return preshowerClusters_.end(); }
00081
00083 size_t clustersSize() const { return clusters_.size(); }
00084
00086
00087
00089 void setSeed( const CaloClusterPtr & r ) { seed_ = r; }
00090
00092 void addCluster( const CaloClusterPtr & r ) {
00093 clusters_.push_back( r );
00094 computeRawEnergy();
00095 }
00096
00098 void addPreshowerCluster( const CaloClusterPtr & r ) { preshowerClusters_.push_back( r ); }
00099
00106 void setPreshowerPlanesStatus(const uint32_t& status){
00107 uint32_t flags = flags_ & flagsMask_;
00108 flags_= flags | (status << flagsOffset_);
00109 }
00110
00116 const int getPreshowerPlanesStatus() const {
00117 return (flags_>>flagsOffset_);
00118 }
00119
00120 private:
00121
00122 void computeRawEnergy();
00123
00125 CaloClusterPtr seed_;
00126
00128 CaloClusterPtrVector clusters_;
00129
00131 CaloClusterPtrVector preshowerClusters_;
00132
00134
00135
00136 double preshowerEnergy_;
00137
00138 double rawEnergy_;
00139
00140 double phiWidth_;
00141 double etaWidth_;
00142
00143 double preshowerEnergy1_;
00144 double preshowerEnergy2_;
00145 };
00146
00147 }
00148 #endif