Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:18:09

0001 #ifndef RecoHi_HiEgammaAlgos_HiBremRecoveryClusterAlgo_h_
0002 #define RecoHi_HiEgammaAlgos_HiBremRecoveryClusterAlgo_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 HiBremRecoveryClusterAlgo 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 HiBremRecoveryClusterAlgo {
0022 public:
0023   enum VerbosityLevel { pDEBUG = 0, pWARNING = 1, pINFO = 2, pERROR = 3 };
0024 
0025   HiBremRecoveryClusterAlgo(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                             double theBarrelBremEnergyThreshold = 2.3,
0031                             double theEndcapBremEnergyThreshold = 5.7,
0032                             VerbosityLevel the_verbosity = pERROR) {
0033     // e*_rdeta_ and e*_rdphi_ are half the total window
0034     // because they correspond to one direction (positive or negative)
0035     eb_rdeta_ = eb_sc_road_etasize / 2;
0036     eb_rdphi_ = eb_sc_road_phisize / 2;
0037     ec_rdeta_ = ec_sc_road_etasize / 2;
0038     ec_rdphi_ = ec_sc_road_phisize / 2;
0039 
0040     seedTransverseEnergyThreshold = theSeedTransverseEnergyThreshold;
0041     BarrelBremEnergyThreshold = theBarrelBremEnergyThreshold;
0042     EndcapBremEnergyThreshold = theEndcapBremEnergyThreshold;
0043     verbosity = the_verbosity;
0044   }
0045 
0046   void setVerbosity(VerbosityLevel the_verbosity) { verbosity = the_verbosity; }
0047 
0048   // the method called from outside to do the SuperClustering - returns a vector of SCs:
0049   reco::SuperClusterCollection makeSuperClusters(reco::CaloClusterPtrVector &clusters);
0050 
0051 private:
0052   // make superclusters out of clusters produced by the Island algorithm:
0053   void makeIslandSuperClusters(reco::CaloClusterPtrVector &clusters_v, double etaRoad, double phiRoad);
0054 
0055   // return true if the cluster is within the search phi-eta window of the seed
0056   bool match(reco::CaloClusterPtr seed_p, reco::CaloClusterPtr cluster_p, double etaRoad, double phiRoad);
0057 
0058   VerbosityLevel verbosity;
0059 
0060   double eb_rdeta_;
0061   double eb_rdphi_;
0062   double ec_rdeta_;
0063   double ec_rdphi_;
0064 
0065   double seedTransverseEnergyThreshold;
0066 
0067   // Barrel Basic Cluster threshold in the brem recovery process
0068   double BarrelBremEnergyThreshold;
0069   double EndcapBremEnergyThreshold;
0070 
0071   reco::SuperClusterCollection superclusters_v;
0072 };
0073 
0074 #endif