CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/RecoHI/HiEgammaAlgos/interface/HiBremRecoveryClusterAlgo.h

Go to the documentation of this file.
00001 #ifndef RecoHi_HiEgammaAlgos_HiBremRecoveryClusterAlgo_h_
00002 #define RecoHi_HiEgammaAlgos_HiBremRecoveryClusterAlgo_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 HiBremRecoveryClusterAlgo 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 HiBremRecoveryClusterAlgo
00023 {
00024  public:
00025   
00026   enum VerbosityLevel { pDEBUG = 0, pWARNING = 1, pINFO = 2, pERROR = 3 }; 
00027 
00028   HiBremRecoveryClusterAlgo(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                           double theBarrelBremEnergyThreshold = 2.3,
00034                           double theEndcapBremEnergyThreshold = 5.7,
00035                           VerbosityLevel the_verbosity = pERROR
00036                           )
00037   {
00038       // e*_rdeta_ and e*_rdphi_ are half the total window 
00039       // because they correspond to one direction (positive or negative)
00040       eb_rdeta_ = eb_sc_road_etasize / 2;
00041       eb_rdphi_ = eb_sc_road_phisize / 2;
00042       ec_rdeta_ = ec_sc_road_etasize / 2;
00043       ec_rdphi_ = ec_sc_road_phisize / 2;
00044 
00045       seedTransverseEnergyThreshold = theSeedTransverseEnergyThreshold;
00046       BarrelBremEnergyThreshold = theBarrelBremEnergyThreshold;
00047       EndcapBremEnergyThreshold = theEndcapBremEnergyThreshold;
00048       verbosity = the_verbosity;
00049   }
00050 
00051   void setVerbosity(VerbosityLevel the_verbosity)
00052   {
00053       verbosity = the_verbosity;
00054   }
00055  
00056   // the method called from outside to do the SuperClustering - returns a vector of SCs:
00057   reco::SuperClusterCollection makeSuperClusters(reco::CaloClusterPtrVector & clusters);
00058   
00059  private:
00060   
00061   // make superclusters out of clusters produced by the Island algorithm:
00062   void makeIslandSuperClusters(reco::CaloClusterPtrVector &clusters_v, 
00063                                double etaRoad, double phiRoad);
00064   
00065   // return true if the cluster is within the search phi-eta window of the seed
00066   bool match(reco::CaloClusterPtr seed_p, 
00067              reco::CaloClusterPtr cluster_p,
00068              double etaRoad, double phiRoad);
00069   
00070   VerbosityLevel verbosity;
00071 
00072   double eb_rdeta_;
00073   double eb_rdphi_;
00074   double ec_rdeta_;
00075   double ec_rdphi_;
00076   
00077   double seedTransverseEnergyThreshold;
00078 
00079   // Barrel Basic Cluster threshold in the brem recovery process
00080   double BarrelBremEnergyThreshold;
00081   double EndcapBremEnergyThreshold;
00082   
00083   reco::SuperClusterCollection superclusters_v;
00084   
00085 };
00086 
00087 #endif