File indexing completed on 2023-03-17 11:17:18
0001 #ifndef RecoEcal_EgammaClusterAlgos_HybridClusterAlgo_h
0002 #define RecoEcal_EgammaClusterAlgos_HybridClusterAlgo_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 "RecoCaloTools/Navigation/interface/EcalBarrelNavigator.h"
0009 #include "DataFormats/EcalRecHit/interface/EcalRecHit.h"
0010 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
0011 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
0012 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
0013 #include "Geometry/CaloTopology/interface/EcalBarrelHardcodedTopology.h"
0014 #include "FWCore/Framework/interface/ESHandle.h"
0015 #include "DataFormats/Math/interface/RectangularEtaPhiRegion.h"
0016 #include "RecoEcal/EgammaCoreTools/interface/BremRecoveryPhiRoadAlgo.h"
0017 #include "RecoEcal/EgammaCoreTools/interface/SuperClusterShapeAlgo.h"
0018
0019 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0020
0021 #include <vector>
0022 #include <set>
0023
0024 class EcalSeverityLevelAlgo;
0025
0026 class HybridClusterAlgo {
0027 private:
0028
0029 typedef math::XYZPoint Point;
0030
0031
0032 double eb_st;
0033
0034
0035
0036
0037 int phiSteps_;
0038
0039
0040 double et25(EcalBarrelNavigatorHT &navigator,
0041 const EcalRecHitCollection *hits,
0042 const CaloSubdetectorGeometry *geometry);
0043
0044 double e2Et(EcalBarrelNavigatorHT &navigator,
0045 const EcalRecHitCollection *hits,
0046 const CaloSubdetectorGeometry *geometry);
0047
0048 BremRecoveryPhiRoadAlgo *phiRoadAlgo_;
0049
0050
0051 double eThres_;
0052 double eThresA_;
0053 double eThresB_;
0054
0055
0056 double Eseed;
0057
0058
0059 double Xi;
0060
0061
0062 bool UseEtForXi;
0063
0064
0065 double Ewing;
0066
0067
0068 bool dynamicPhiRoad_;
0069
0070
0071 bool dynamicEThres_;
0072
0073
0074
0075
0076
0077
0078 const EcalRecHitCollection *recHits_;
0079
0080
0081 EcalBarrelHardcodedTopology *topo_;
0082
0083
0084
0085
0086 std::set<DetId> useddetids;
0087
0088
0089 std::vector<EcalRecHit> seeds;
0090
0091
0092 std::vector<reco::BasicCluster> seedClus_;
0093
0094
0095 std::map<int, std::vector<reco::BasicCluster> > clustered_;
0096
0097
0098 PositionCalc posCalculator_;
0099
0100
0101 std::vector<int> v_chstatus_;
0102
0103
0104 std::vector<int> v_severitylevel_;
0105 float severityRecHitThreshold_;
0106 float severitySpikeThreshold_;
0107
0108 bool excludeFromCluster_;
0109 std::set<DetId> excludedCrys_;
0110
0111 public:
0112
0113 HybridClusterAlgo() {}
0114
0115
0116 HybridClusterAlgo(double eb_str,
0117 int step,
0118 double ethres,
0119 double eseed,
0120 double xi,
0121 bool useEtForXi,
0122 double ewing,
0123 const std::vector<int> &v_chstatus,
0124 const PositionCalc &posCalculator,
0125 bool dynamicEThres = false,
0126 double eThresA = 0,
0127 double eThresB = 0.1,
0128 const std::vector<int> &severityToExclude = std::vector<int>().operator=(std::vector<int>(999)),
0129
0130
0131
0132 bool excludeFromCluster = false);
0133
0134
0135
0136 ~HybridClusterAlgo() {
0137 if (dynamicPhiRoad_)
0138 delete phiRoadAlgo_;
0139 delete topo_;
0140
0141 }
0142
0143 void setDynamicPhiRoad(const edm::ParameterSet &bremRecoveryPset) {
0144 dynamicPhiRoad_ = true;
0145 phiRoadAlgo_ = new BremRecoveryPhiRoadAlgo(bremRecoveryPset);
0146 }
0147
0148
0149 void makeClusters(const EcalRecHitCollection *,
0150 const CaloSubdetectorGeometry *geometry,
0151 reco::BasicClusterCollection &basicClusters,
0152 const EcalSeverityLevelAlgo *sevLv,
0153 bool regional = false,
0154 const std::vector<RectangularEtaPhiRegion> ®ions = std::vector<RectangularEtaPhiRegion>());
0155
0156
0157 reco::SuperClusterCollection makeSuperClusters(const reco::CaloClusterPtrVector &);
0158
0159
0160 void mainSearch(const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry);
0161
0162
0163 double makeDomino(EcalBarrelNavigatorHT &navigator, std::vector<EcalRecHit> &cells);
0164 };
0165
0166 #endif