CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/RecoParticleFlow/PFClusterProducer/interface/PFHcalSuperClusterAlgo.h

Go to the documentation of this file.
00001 #ifndef RecoParticleFlow_PFClusterProducer_PFHcalSuperClusterAlgo_h
00002 #define RecoParticleFlow_PFClusterProducer_PFHcalSuperClusterAlgo_h
00003 
00004 #include "DataFormats/ParticleFlowReco/interface/PFCluster.h"
00005 #include "DataFormats/ParticleFlowReco/interface/PFClusterFwd.h"
00006 #include "DataFormats/ParticleFlowReco/interface/PFSuperCluster.h"
00007 #include "DataFormats/ParticleFlowReco/interface/PFSuperClusterFwd.h"
00008 #include "DataFormats/ParticleFlowReco/interface/PFLayer.h"
00009 #include "DataFormats/ParticleFlowReco/interface/PFRecHit.h"
00010 #include "DataFormats/Common/interface/PtrVector.h"
00011 #include "DataFormats/Common/interface/OrphanHandle.h"
00012 
00013 #include <vector>
00014 
00015 #include <memory>
00016 
00018 
00027 class PFHcalSuperClusterAlgo {
00028 
00029  public:
00030 
00032   PFHcalSuperClusterAlgo();
00033 
00035   virtual ~PFHcalSuperClusterAlgo() {;}
00036 
00038   void enableDebugging(bool debug) { debug_ = debug;}
00039  
00040 
00041   typedef edm::Handle< reco::PFClusterCollection > PFClusterHandle;
00042   typedef edm::Ptr< reco::PFCluster> PFClusterPtr;
00043   const edm::PtrVector<reco::PFCluster>& clusters() const
00044   {return clusters_; }
00045   
00047   void doClustering( const reco::PFClusterCollection& clusters, const reco::PFClusterCollection& clustersHO );
00048 
00050   std::pair<double, double> calculateWidths(const reco::PFCluster& cluster);
00051 
00053   std::pair<double, double> calculatePosition(const reco::PFCluster& cluster);
00054 
00056   void doClustering( const PFClusterHandle& clustersHandle, const PFClusterHandle& clustersHOHandle );
00057 
00058   // set histogram file pointer
00059 //  void setHistos(TFile* file);
00060 
00061   // write histos
00062   void write();
00063   
00065   
00067  
00069   std::auto_ptr< std::vector< reco::PFCluster > >& clusters()  
00070     {return pfClusters_;}
00071 
00073   std::auto_ptr< std::vector< reco::PFSuperCluster > >& superClusters()  
00074     {return pfSuperClusters_;}
00075 
00076 
00077   friend std::ostream& operator<<(std::ostream& out,const PFHcalSuperClusterAlgo& algo);
00078 
00079 
00080  private:
00082   void doClusteringWorker( const reco::PFClusterCollection& clusters, const reco::PFClusterCollection& clustersHO );
00083 
00085   std::auto_ptr< std::vector<reco::PFCluster> > pfClusters_;
00086   
00088   std::auto_ptr< std::vector<reco::PFSuperCluster> > pfSuperClusters_;
00089 
00090   reco::PFSuperCluster            SuperCluster_; 
00091   PFClusterHandle           clustersHandle_;
00092   PFClusterHandle           clustersHOHandle_;
00093   edm::PtrVector< reco::PFCluster >  clusters_;
00094 
00095 
00097   bool   debug_;
00098 
00100   static  unsigned  prodNum_;
00101 
00102 };
00103 
00104 #endif