CMS 3D CMS Logo

PFECALSuperClusterAlgo.h
Go to the documentation of this file.
1 #ifndef RecoEcal_EgammaClusterAlgos_PFECALSuperClusterAlgo_h
2 #define RecoEcal_EgammaClusterAlgos_PFECALSuperClusterAlgo_h
3 
10 
15 
20 
26 
28 
32 
36 
40 
45 
50 
52 
53 #include <vector>
54 #include <memory>
55 
57 
64 typedef std::vector<CalibratedPFCluster> CalibratedPFClusterVector;
65 
67 public:
68  enum clustering_type { kBOX = 1, kMustache = 2, kDeepSC = 3 };
70 
73 
75 
76  void setClusteringType(clustering_type thetype) { _clustype = thetype; }
77 
78  void setEnergyWeighting(energy_weight thetype) { _eweight = thetype; }
79 
80  void setUseETForSeeding(bool useET) { threshIsET_ = useET; }
81 
82  void setUseDynamicDPhi(bool useit) { useDynamicDPhi_ = useit; }
83 
85 
87 
92 
93  void setPhiwidthSuperClusterBarrel(double phiwidth) { phiwidthSuperClusterBarrel_ = phiwidth; }
94  void setEtawidthSuperClusterBarrel(double etawidth) { etawidthSuperClusterBarrel_ = etawidth; }
95  void setPhiwidthSuperClusterEndcap(double phiwidth) { phiwidthSuperClusterEndcap_ = phiwidth; }
96  void setEtawidthSuperClusterEndcap(double etawidth) { etawidthSuperClusterEndcap_ = etawidth; }
97 
98  void setPFClusterCalibration(const std::shared_ptr<PFEnergyCalibration>&);
99 
100  void setSatelliteMerging(const bool doit) { doSatelliteClusterMerge_ = doit; }
101  void setSatelliteThreshold(const double t) { satelliteThreshold_ = t; }
102  void setMajorityFraction(const double f) { fractionForMajority_ = f; }
103  void setDropUnseedable(const bool d) { dropUnseedable_ = d; }
104 
106 
108 
110 
111  void update(const edm::EventSetup&);
112  void updateSCParams(const edm::EventSetup&);
113 
114  std::unique_ptr<reco::SuperClusterCollection>& getEBOutputSCCollection() { return superClustersEB_; }
115  std::unique_ptr<reco::SuperClusterCollection>& getEEOutputSCCollection() { return superClustersEE_; }
116 
117  void loadAndSortPFClusters(const edm::Event& evt);
118 
119  void run();
120 
121 private:
125 
132 
140 
143 
146  std::unique_ptr<reco::SuperClusterCollection> superClustersEB_;
147  std::unique_ptr<reco::SuperClusterCollection> superClustersEE_;
149  std::shared_ptr<PFEnergyCalibration> _pfEnergyCalibration;
152  void buildAllSuperClusters(CalibratedPFClusterVector&, double seedthresh);
154  void buildAllSuperClustersDeepSC(CalibratedPFClusterVector&, double seedthresh);
157 
158  bool verbose_;
159 
160  // regression
162  std::unique_ptr<SCEnergyCorrectorSemiParm> regr_;
163 
165 
170 
175 
176  bool doSatelliteClusterMerge_; //rock it
179 
181 
184 
186 
187  // OOT photons
193 };
194 
195 #endif
void buildAllSuperClusters(CalibratedPFClusterVector &, double seedthresh)
const ESChannelStatus * channelStatus_
std::unique_ptr< reco::SuperClusterCollection > & getEEOutputSCCollection()
edm::EDGetTokenT< edm::View< reco::PFCluster > > inputTagPFClusters_
CalibratedPFClusterVector _clustersEB
void setMajorityFraction(const double f)
std::unique_ptr< SCEnergyCorrectorSemiParm > regr_
void setSatelliteMerging(const bool doit)
void setThreshPFClusterSeedEndcap(double thresh)
bool verbose
std::unique_ptr< reco::SuperClusterCollection > superClustersEB_
edm::EDGetTokenT< EcalRecHitCollection > inputTagBarrelRecHits_
const reco::BeamSpot * beamSpot_
void setCrackCorrections(bool applyCrackCorrections)
void setThreshPFClusterBarrel(double thresh)
const EcalMustacheSCParameters * mustacheSCParams_
const reco::PFCluster::EEtoPSAssociation * EEtoPS_
const reco::SCProducerCache * SCProducerCache_
void setThreshSuperClusterEt(double thresh)
edm::ESGetToken< ESEEIntercalibConstants, ESEEIntercalibConstantsRcd > esEEInterCalibToken_
std::unique_ptr< reco::SuperClusterCollection > superClustersEE_
void setEtawidthSuperClusterBarrel(double etawidth)
const EcalSCDynamicDPhiParameters * scDynamicDPhiParams_
edm::EDGetTokenT< EcalRecHitCollection > inputTagEndcapRecHits_
void setClusteringType(clustering_type thetype)
void setEtawidthSuperClusterEndcap(double etawidth)
void setPhiwidthSuperClusterBarrel(double phiwidth)
void setVerbosityLevel(bool verbose)
void loadAndSortPFClusters(const edm::Event &evt)
void update(const edm::EventSetup &)
std::shared_ptr< PFEnergyCalibration > _pfEnergyCalibration
void setThreshPFClusterEndcap(double thresh)
void setTokens(const edm::ParameterSet &, edm::ConsumesCollector &&)
void setUseETForSeeding(bool useET)
std::unique_ptr< reco::SuperClusterCollection > & getEBOutputSCCollection()
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeometryToken_
edm::ESGetToken< ESChannelStatus, ESChannelStatusRcd > esChannelStatusToken_
void setEnergyWeighting(energy_weight thetype)
double f[11][100]
CalibratedPFClusterVector _clustersEE
d
Definition: ztail.py:151
edm::ESGetToken< EcalSCDynamicDPhiParameters, EcalSCDynamicDPhiParametersRcd > ecalSCDynamicDPhiParametersToken_
const CaloSubdetectorGeometry * eeGeom_
void setThreshPFClusterSeedBarrel(double thresh)
const CaloSubdetectorGeometry * esGeom_
edm::ESGetToken< CaloTopology, CaloTopologyRecord > caloTopologyToken_
edm::EDGetTokenT< reco::PFCluster::EEtoPSAssociation > inputTagPFClustersES_
std::vector< std::pair< CaloClusterPtr::key_type, edm::Ptr< PFCluster > > > EEtoPSAssociation
Definition: PFCluster.h:44
edm::EDGetTokenT< reco::BeamSpot > inputTagBeamSpot_
edm::ESGetToken< EcalMustacheSCParameters, EcalMustacheSCParametersRcd > ecalMustacheSCParametersToken_
const CaloTopology * topology_
const CaloGeometry * geometry_
PFECALSuperClusterAlgo(const reco::SCProducerCache *cache)
constructor
void setUseDynamicDPhi(bool useit)
void setDropUnseedable(const bool d)
void buildSuperClusterMustacheOrBox(CalibratedPFCluster &, CalibratedPFClusterVector &)
def cache(function)
Definition: utilities.py:3
void updateSCParams(const edm::EventSetup &)
void setPhiwidthSuperClusterEndcap(double phiwidth)
void setUseRegression(bool useRegression)
void finalizeSuperCluster(CalibratedPFCluster &seed, CalibratedPFClusterVector &clustered, bool isEE)
const EcalRecHitCollection * barrelRecHits_
std::vector< CalibratedPFCluster > CalibratedPFClusterVector
\ Algorithm for box particle flow super clustering in the ECAL
void setSatelliteThreshold(const double t)
void setPFClusterCalibration(const std::shared_ptr< PFEnergyCalibration > &)
const CaloSubdetectorGeometry * ebGeom_
const EcalRecHitCollection * endcapRecHits_
void buildAllSuperClustersMustacheOrBox(CalibratedPFClusterVector &, double seedthresh)
void buildAllSuperClustersDeepSC(CalibratedPFClusterVector &, double seedthresh)
void setIsOOTCollection(bool isOOTCollection)