Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:04:52

0001 #ifndef DataFormats_ParticleFlowReco_PFRecHitFraction_h
0002 #define DataFormats_ParticleFlowReco_PFRecHitFraction_h
0003 
0004 #include <iostream>
0005 #include <vector>
0006 
0007 #include "DataFormats/ParticleFlowReco/interface/PFRecHitFwd.h"
0008 
0009 namespace reco {
0010 
0011   /**\class PFRecHitFraction
0012      \brief Fraction of a PFRecHit 
0013      (rechits can be shared between several PFCluster's)
0014           
0015      \author Colin Bernet
0016      \date   July 2006
0017   */
0018   class PFRecHitFraction {
0019   public:
0020     /// default constructor
0021     PFRecHitFraction() : fraction_(-1) {}
0022 
0023     /// constructor
0024     PFRecHitFraction(const PFRecHitRef& recHitRef, double fraction) : recHitRef_(recHitRef), fraction_(fraction) {}
0025 
0026     /// \return index to rechit
0027     const PFRecHitRef& recHitRef() const { return recHitRef_; }
0028 
0029     /// \return energy fraction
0030     double fraction() const { return fraction_; }
0031 
0032   private:
0033     /// corresponding rechit
0034     PFRecHitRef recHitRef_;
0035 
0036     /// fraction of the rechit energy owned by the cluster
0037     double fraction_;
0038   };
0039 
0040   std::ostream& operator<<(std::ostream& out, const PFRecHitFraction& hit);
0041 
0042 }  // namespace reco
0043 
0044 #endif