CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/RecoEcal/EgammaClusterAlgos/interface/Multi5x5BremRecoveryClusterAlgo.h

Go to the documentation of this file.
00001 #ifndef RecoEcal_EgammaClusterAlgos_Multi5x5BremRecoveryClusterAlgo_h_
00002 #define RecoEcal_EgammaClusterAlgos_Multi5x5BremRecoveryClusterAlgo_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 #include "RecoEcal/EgammaCoreTools/interface/BremRecoveryPhiRoadAlgo.h"
00010 
00011 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00012 
00013 #include <vector>
00014 
00015 
00016 /*
00017   The Multi5x5BremRecoveryClusterAlgo class encapsulates the functionality needed
00018   to perform the SuperClustering.
00019   
00020   WARNING: This code assumes that the BasicClusters 
00021   from the event are sorted by energy
00022 */
00023 
00024 class Multi5x5BremRecoveryClusterAlgo
00025 {
00026  public:
00027   
00028 
00029   Multi5x5BremRecoveryClusterAlgo(const edm::ParameterSet &bremRecoveryPset,
00030                           double eb_sc_road_etasize = 0.06, // Search window in eta - Barrel
00031                           double eb_sc_road_phisize = 0.80, // Search window in phi - Barrel
00032                           double ec_sc_road_etasize = 0.14, // Search window in eta - Endcap
00033                           double ec_sc_road_phisize = 0.40, // Search window in eta - Endcap
00034                           bool dynamicPhiRoad = true,
00035                           double theSeedTransverseEnergyThreshold = 0.40
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       dynamicPhiRoad_ = dynamicPhiRoad;
00047       if (dynamicPhiRoad_) phiRoadAlgo_ = new BremRecoveryPhiRoadAlgo(bremRecoveryPset);
00048 
00049     }
00050 
00051   // destructor
00052   ~Multi5x5BremRecoveryClusterAlgo() 
00053   {
00054      if (dynamicPhiRoad_) delete phiRoadAlgo_;
00055   } 
00056 
00057   
00058   // the method called from outside to do the SuperClustering - returns a vector of SCs:
00059   reco::SuperClusterCollection makeSuperClusters(reco::CaloClusterPtrVector & clusters);
00060   
00061  private:
00062   
00063   // make superclusters out of clusters produced by the Island algorithm:
00064   void makeIslandSuperClusters(reco::CaloClusterPtrVector &clusters_v, 
00065                                double etaRoad, double phiRoad);
00066   
00067   // return true if the cluster is within the search phi-eta window of the seed
00068   bool match(reco::CaloClusterPtr seed_p, 
00069              reco::CaloClusterPtr cluster_p,
00070              double etaRoad, double phiRoad);
00071   
00072   //
00073 
00074   double eb_rdeta_;
00075   double eb_rdphi_;
00076   double ec_rdeta_;
00077   double ec_rdphi_;
00078   
00079   double seedTransverseEnergyThreshold;
00080   bool dynamicPhiRoad_;  
00081   BremRecoveryPhiRoadAlgo *phiRoadAlgo_;
00082 
00083   reco::SuperClusterCollection superclusters_v;
00084   
00085 };
00086 
00087 #endif