00001 #ifndef DataFormats_ParticleFlowReco_PFCluster_h 00002 #define DataFormats_ParticleFlowReco_PFCluster_h 00003 00004 #include "DataFormats/CaloRecHit/interface/CaloCluster.h" 00005 00006 #include "Math/GenVector/PositionVector3D.h" 00007 #include "DataFormats/Math/interface/Point3D.h" 00008 #include "Rtypes.h" 00009 00010 #include "DataFormats/ParticleFlowReco/interface/PFRecHitFraction.h" 00011 #include "DataFormats/ParticleFlowReco/interface/PFLayer.h" 00012 00013 #include <iostream> 00014 #include <vector> 00015 00016 00017 00018 class PFClusterAlgo; 00019 00020 namespace reco { 00021 00042 class PFCluster : public CaloCluster { 00043 public: 00044 00045 00046 typedef ROOT::Math::PositionVector3D<ROOT::Math::CylindricalEta3D<Double32_t> > REPPoint; 00047 00049 PFCluster() : color_(1) {} 00050 00052 PFCluster(PFLayer::Layer layer, double energy, 00053 double x, double y, double z ); 00054 00055 00056 00058 void reset(); 00059 00061 void addRecHitFraction( const reco::PFRecHitFraction& frac); 00062 00064 const std::vector< reco::PFRecHitFraction >& recHitFractions() const 00065 { return rechits_; } 00066 00068 void setLayer( PFLayer::Layer layer); 00069 00071 PFLayer::Layer layer() const; 00072 00074 double energy() const {return energy_;} 00075 00077 const REPPoint& positionREP() const {return posrep_;} 00078 00080 void calculatePositionREP() { 00081 posrep_.SetCoordinates( position_.Rho(), position_.Eta(), position_.Phi() ); 00082 } 00083 00085 static double getDepthCorrection(double energy, bool isBelowPS = false, 00086 bool isHadron = false); 00087 00089 void setColor(int color) {color_ = color;} 00090 00092 int color() const {return color_;} 00093 00094 00095 PFCluster& operator=(const PFCluster&); 00096 00097 friend std::ostream& operator<<(std::ostream& out, 00098 const PFCluster& cluster); 00100 static unsigned instanceCounter_; 00101 00103 static void setDepthCorParameters(int mode, 00104 double a, double b, 00105 double ap, double bp ) { 00106 depthCorMode_ = mode; 00107 depthCorA_ = a; 00108 depthCorB_ = b; 00109 depthCorAp_ = ap; 00110 depthCorBp_ = bp; 00111 } 00112 00113 00114 private: 00115 00117 std::vector< reco::PFRecHitFraction > rechits_; 00118 00120 REPPoint posrep_; 00121 00122 00124 static int depthCorMode_; 00126 static double depthCorA_; 00128 static double depthCorB_ ; 00130 static double depthCorAp_; 00132 static double depthCorBp_; 00133 00134 00136 int color_; 00137 00138 friend class ::PFClusterAlgo; 00139 }; 00140 } 00141 00142 #endif