Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:24:38

0001 #ifndef RecoEcal_EgammaClusterAlgos_BremRecoveryClusterAlgo_h_
0002 #define RecoEcal_EgammaClusterAlgos_BremRecoveryClusterAlgo_h_
0003 
0004 #include "DataFormats/EgammaReco/interface/BasicCluster.h"
0005 #include "DataFormats/EgammaReco/interface/BasicClusterFwd.h"
0006 #include "DataFormats/EgammaReco/interface/SuperCluster.h"
0007 #include "DataFormats/EgammaReco/interface/SuperClusterFwd.h"
0008 #include "DataFormats/CaloRecHit/interface/CaloClusterFwd.h"
0009 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
0010 
0011 #include <vector>
0012 
0013 /*
0014   The BremRecoveryClusterAlgo class encapsulates the functionality needed
0015   to perform the SuperClustering.
0016   
0017   WARNING: This code assumes that the BasicClusters 
0018   from the event are sorted by energy
0019 */
0020 
0021 class BremRecoveryClusterAlgo {
0022 public:
0023   enum VerbosityLevel { pDEBUG = 0, pWARNING = 1, pINFO = 2, pERROR = 3 };
0024 
0025   BremRecoveryClusterAlgo(double eb_sc_road_etasize = 0.06,  // Search window in eta - Barrel
0026                           double eb_sc_road_phisize = 0.80,  // Search window in phi - Barrel
0027                           double ec_sc_road_etasize = 0.14,  // Search window in eta - Endcap
0028                           double ec_sc_road_phisize = 0.40,  // Search window in eta - Endcap
0029                           double theSeedTransverseEnergyThreshold = 0.40,
0030                           VerbosityLevel the_verbosity = pERROR) {
0031     // e*_rdeta_ and e*_rdphi_ are half the total window
0032     // because they correspond to one direction (positive or negative)
0033     eb_rdeta_ = eb_sc_road_etasize / 2;
0034     eb_rdphi_ = eb_sc_road_phisize / 2;
0035     ec_rdeta_ = ec_sc_road_etasize / 2;
0036     ec_rdphi_ = ec_sc_road_phisize / 2;
0037 
0038     seedTransverseEnergyThreshold = theSeedTransverseEnergyThreshold;
0039     verbosity = the_verbosity;
0040   }
0041 
0042   void setVerbosity(VerbosityLevel the_verbosity) { verbosity = the_verbosity; }
0043 
0044   // the method called from outside to do the SuperClustering - returns a vector of SCs:
0045   reco::SuperClusterCollection makeSuperClusters(reco::CaloClusterPtrVector &clusters);
0046 
0047 private:
0048   // make superclusters out of clusters produced by the Island algorithm:
0049   void makeIslandSuperClusters(reco::CaloClusterPtrVector &clusters_v, double etaRoad, double phiRoad);
0050 
0051   // return true if the cluster is within the search phi-eta window of the seed
0052   bool match(reco::CaloClusterPtr seed_p, reco::CaloClusterPtr cluster_p, double etaRoad, double phiRoad);
0053 
0054   //
0055 
0056   VerbosityLevel verbosity;
0057 
0058   double eb_rdeta_;
0059   double eb_rdphi_;
0060   double ec_rdeta_;
0061   double ec_rdphi_;
0062 
0063   double seedTransverseEnergyThreshold;
0064 
0065   reco::SuperClusterCollection superclusters_v;
0066 };
0067 
0068 #endif