CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/RecoEcal/EgammaClusterAlgos/interface/BremRecoveryClusterAlgo.h

Go to the documentation of this file.
00001 #ifndef RecoEcal_EgammaClusterAlgos_BremRecoveryClusterAlgo_h_
00002 #define RecoEcal_EgammaClusterAlgos_BremRecoveryClusterAlgo_h_
00003 
00004 #include "DataFormats/EgammaReco/interface/BasicCluster.h"
00005 #include "DataFormats/EgammaReco/interface/BasicClusterFwd.h"
00006 #include "DataFormats/EgammaReco/interface/SuperCluster.h"
00007 #include "DataFormats/EgammaReco/interface/SuperClusterFwd.h"
00008 #include "DataFormats/CaloRecHit/interface/CaloClusterFwd.h"
00009 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
00010 
00011 #include <vector>
00012 
00013 
00014 /*
00015   The BremRecoveryClusterAlgo class encapsulates the functionality needed
00016   to perform the SuperClustering.
00017   
00018   WARNING: This code assumes that the BasicClusters 
00019   from the event are sorted by energy
00020 */
00021 
00022 class BremRecoveryClusterAlgo
00023 {
00024  public:
00025   
00026   enum VerbosityLevel { pDEBUG = 0, pWARNING = 1, pINFO = 2, pERROR = 3 }; 
00027 
00028   BremRecoveryClusterAlgo(double eb_sc_road_etasize = 0.06, // Search window in eta - Barrel
00029                           double eb_sc_road_phisize = 0.80, // Search window in phi - Barrel
00030                           double ec_sc_road_etasize = 0.14, // Search window in eta - Endcap
00031                           double ec_sc_road_phisize = 0.40, // Search window in eta - Endcap
00032                           double theSeedTransverseEnergyThreshold = 0.40,
00033                           VerbosityLevel the_verbosity = pERROR
00034                           )
00035     {
00036       // e*_rdeta_ and e*_rdphi_ are half the total window 
00037       // because they correspond to one direction (positive or negative)
00038       eb_rdeta_ = eb_sc_road_etasize / 2;
00039       eb_rdphi_ = eb_sc_road_phisize / 2;
00040       ec_rdeta_ = ec_sc_road_etasize / 2;
00041       ec_rdphi_ = ec_sc_road_phisize / 2;
00042 
00043       seedTransverseEnergyThreshold = theSeedTransverseEnergyThreshold;
00044       verbosity = the_verbosity;
00045     }
00046 
00047   void setVerbosity(VerbosityLevel the_verbosity)
00048     {
00049       verbosity = the_verbosity;
00050     }
00051   
00052   // the method called from outside to do the SuperClustering - returns a vector of SCs:
00053   reco::SuperClusterCollection makeSuperClusters(reco::CaloClusterPtrVector & clusters);
00054   
00055  private:
00056   
00057   // make superclusters out of clusters produced by the Island algorithm:
00058   void makeIslandSuperClusters(reco::CaloClusterPtrVector &clusters_v, 
00059                                double etaRoad, double phiRoad);
00060   
00061   // return true if the cluster is within the search phi-eta window of the seed
00062   bool match(reco::CaloClusterPtr seed_p, 
00063              reco::CaloClusterPtr cluster_p,
00064              double etaRoad, double phiRoad);
00065   
00066   //
00067 
00068   VerbosityLevel verbosity;
00069 
00070   double eb_rdeta_;
00071   double eb_rdphi_;
00072   double ec_rdeta_;
00073   double ec_rdphi_;
00074   
00075   double seedTransverseEnergyThreshold;
00076   
00077   reco::SuperClusterCollection superclusters_v;
00078   
00079 };
00080 
00081 #endif