CMS 3D CMS Logo

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

Generated on Tue Jun 9 17:43:11 2009 for CMSSW by  doxygen 1.5.4