CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PFECALSuperClusterAlgo.cc
Go to the documentation of this file.
9 #include "Math/GenVector/VectorUtil.h"
10 #include "TVector2.h"
11 
13 
14 #include <memory>
15 
16 #include <cmath>
17 #include <functional>
18 #include <sstream>
19 #include <stdexcept>
20 #include <string>
21 
22 using namespace std;
23 using namespace std::placeholders; // for _1, _2, _3...
24 
25 namespace {
26  typedef edm::View<reco::PFCluster> PFClusterView;
27  typedef edm::Ptr<reco::PFCluster> PFClusterPtr;
28  typedef edm::PtrVector<reco::PFCluster> PFClusterPtrVector;
29  typedef PFECALSuperClusterAlgo::CalibratedClusterPtr CalibClusterPtr;
30  typedef PFECALSuperClusterAlgo::CalibratedClusterPtrVector CalibClusterPtrVector;
31  typedef std::pair<reco::CaloClusterPtr::key_type, reco::CaloClusterPtr> EEPSPair;
32 
33  bool sortByKey(const EEPSPair& a, const EEPSPair& b) { return a.first < b.first; }
34 
35  inline double ptFast(const double energy, const math::XYZPoint& position, const math::XYZPoint& origin) {
36  const auto v = position - origin;
37  return energy * std::sqrt(v.perp2() / v.mag2());
38  }
39 
40  bool greaterByEt(const CalibClusterPtr& x, const CalibClusterPtr& y) {
41  const math::XYZPoint zero(0, 0, 0);
42  const double xpt = ptFast(x->energy(), x->the_ptr()->position(), zero);
43  const double ypt = ptFast(y->energy(), y->the_ptr()->position(), zero);
44  return xpt > ypt;
45  }
46 
47  bool isSeed(const CalibClusterPtr& x, double threshold, bool useETcut) {
48  const math::XYZPoint zero(0, 0, 0);
49  double e_or_et = x->energy();
50  if (useETcut)
51  e_or_et = ptFast(e_or_et, x->the_ptr()->position(), zero);
52  return e_or_et > threshold;
53  }
54 
55  bool isLinkedByRecHit(const CalibClusterPtr& x,
56  const CalibClusterPtr& seed,
57  const double threshold,
58  const double majority,
59  const double maxDEta,
60  const double maxDPhi) {
61  if (seed->energy_nocalib() < threshold) {
62  return false;
63  }
64  const double dEta = std::abs(seed->eta() - x->eta());
65  const double dPhi = std::abs(TVector2::Phi_mpi_pi(seed->phi() - x->phi()));
66  if (maxDEta < dEta || maxDPhi < dPhi) {
67  return false;
68  }
69  // now see if the clusters overlap in rechits
70  const auto& seedHitsAndFractions = seed->the_ptr()->hitsAndFractions();
71  const auto& xHitsAndFractions = x->the_ptr()->hitsAndFractions();
72  double x_rechits_tot = xHitsAndFractions.size();
73  double x_rechits_match = 0.0;
74  for (const std::pair<DetId, float>& seedHit : seedHitsAndFractions) {
75  for (const std::pair<DetId, float>& xHit : xHitsAndFractions) {
76  if (seedHit.first == xHit.first) {
77  x_rechits_match += 1.0;
78  }
79  }
80  }
81  return x_rechits_match / x_rechits_tot > majority;
82  }
83 
84  bool isClustered(const CalibClusterPtr& x,
85  const CalibClusterPtr seed,
87  const EcalMustacheSCParameters* mustache_params,
88  const EcalSCDynamicDPhiParameters* dynamic_dphi_params,
89  const bool dyn_dphi,
90  const double etawidthSuperCluster,
91  const double phiwidthSuperCluster) {
92  const double dphi = std::abs(TVector2::Phi_mpi_pi(seed->phi() - x->phi()));
93  const bool passes_dphi =
94  ((!dyn_dphi && dphi < phiwidthSuperCluster) ||
96  dynamic_dphi_params, seed->eta(), seed->phi(), x->energy_nocalib(), x->eta(), x->phi())));
97 
98  if (type == PFECALSuperClusterAlgo::kBOX) {
99  return (std::abs(seed->eta() - x->eta()) < etawidthSuperCluster && passes_dphi);
100  }
101  if (type == PFECALSuperClusterAlgo::kMustache) {
102  return (passes_dphi && reco::MustacheKernel::inMustache(
103  mustache_params, seed->eta(), seed->phi(), x->energy_nocalib(), x->eta(), x->phi()));
104  }
105  return false;
106  }
107 
108 } // namespace
109 
111 
112 void PFECALSuperClusterAlgo::setPFClusterCalibration(const std::shared_ptr<PFEnergyCalibration>& calib) {
113  _pfEnergyCalibration = calib;
114 }
115 
117  inputTagPFClusters_ = cc.consumes<edm::View<reco::PFCluster> >(iConfig.getParameter<edm::InputTag>("PFClusters"));
119  cc.consumes<reco::PFCluster::EEtoPSAssociation>(iConfig.getParameter<edm::InputTag>("ESAssociation"));
120  inputTagBeamSpot_ = cc.consumes<reco::BeamSpot>(iConfig.getParameter<edm::InputTag>("BeamSpot"));
121 
125 
128  }
129  if (useDynamicDPhi_) {
131  }
132 
133  if (useRegression_) {
134  const edm::ParameterSet& regconf = iConfig.getParameter<edm::ParameterSet>("regressionConfig");
135 
136  regr_ = std::make_unique<SCEnergyCorrectorSemiParm>();
137  regr_->setTokens(regconf, cc);
138  }
139 
140  if (isOOTCollection_) { // OOT photons only
141  inputTagBarrelRecHits_ = cc.consumes<EcalRecHitCollection>(iConfig.getParameter<edm::InputTag>("barrelRecHits"));
142  inputTagEndcapRecHits_ = cc.consumes<EcalRecHitCollection>(iConfig.getParameter<edm::InputTag>("endcapRecHits"));
143  }
144 }
145 
147  if (useRegression_) {
148  regr_->setEventSetup(setup);
149  }
150 
152  _pfEnergyCalibration->initAlphaGamma_ESplanes_fromDB(esEEInterCalibHandle_.product());
153 
154  edm::ESHandle<ESChannelStatus> esChannelStatusHandle_ = setup.getHandle(esChannelStatusToken_);
155  channelStatus_ = esChannelStatusHandle_.product();
156 }
157 
161  }
162  if (useDynamicDPhi_) {
164  }
165 }
166 
168  //load input collections
169  //Load the pfcluster collections
170  edm::Handle<edm::View<reco::PFCluster> > pfclustersHandle;
171  iEvent.getByToken(inputTagPFClusters_, pfclustersHandle);
172 
174  iEvent.getByToken(inputTagPFClustersES_, psAssociationHandle);
175 
176  const PFClusterView& clusters = *pfclustersHandle.product();
177  const reco::PFCluster::EEtoPSAssociation& psclusters = *psAssociationHandle.product();
178 
179  //load BeamSpot
181  iEvent.getByToken(inputTagBeamSpot_, bsHandle);
182  beamSpot_ = bsHandle.product();
183 
184  //initialize regression for this event
185  if (useRegression_) {
186  regr_->setEvent(iEvent);
187  }
188 
189  // reset the system for running
190  superClustersEB_ = std::make_unique<reco::SuperClusterCollection>();
191  _clustersEB.clear();
192  superClustersEE_ = std::make_unique<reco::SuperClusterCollection>();
193  _clustersEE.clear();
194  EEtoPS_ = &psclusters;
195 
196  //Select PF clusters available for the clustering
197  for (size_t i = 0; i < clusters.size(); ++i) {
198  auto cluster = clusters.ptrAt(i);
199  LogDebug("PFClustering") << "Loading PFCluster i=" << cluster.key() << " energy=" << cluster->energy() << std::endl;
200 
201  // protection for sim clusters
202  if (cluster->caloID().detectors() == 0 && cluster->hitsAndFractions().empty())
203  continue;
204 
205  CalibratedClusterPtr calib_cluster(new CalibratedPFCluster(cluster));
206  switch (cluster->layer()) {
208  if (calib_cluster->energy() > threshPFClusterBarrel_) {
209  _clustersEB.push_back(calib_cluster);
210  }
211  break;
212  case PFLayer::HGCAL:
214  if (calib_cluster->energy() > threshPFClusterEndcap_) {
215  _clustersEE.push_back(calib_cluster);
216  }
217  break;
218  default:
219  break;
220  }
221  }
222  // sort full cluster collections by their calibrated energy
223  // this will put all the seeds first by construction
224  std::sort(_clustersEB.begin(), _clustersEB.end(), greaterByEt);
225  std::sort(_clustersEE.begin(), _clustersEE.end(), greaterByEt);
226 
227  // set recHit collections for OOT photons
228  if (isOOTCollection_) {
229  edm::Handle<EcalRecHitCollection> barrelRecHitsHandle;
230  iEvent.getByToken(inputTagBarrelRecHits_, barrelRecHitsHandle);
231  if (!barrelRecHitsHandle.isValid()) {
232  throw cms::Exception("PFECALSuperClusterAlgo")
233  << "If you use OOT photons, need to specify proper barrel rec hit collection";
234  }
235  barrelRecHits_ = barrelRecHitsHandle.product();
236 
237  edm::Handle<EcalRecHitCollection> endcapRecHitsHandle;
238  iEvent.getByToken(inputTagEndcapRecHits_, endcapRecHitsHandle);
239  if (!endcapRecHitsHandle.isValid()) {
240  throw cms::Exception("PFECALSuperClusterAlgo")
241  << "If you use OOT photons, need to specify proper endcap rec hit collection";
242  }
243  endcapRecHits_ = endcapRecHitsHandle.product();
244  }
245 }
246 
248  // clusterize the EB
250  // clusterize the EE
252 }
253 
254 void PFECALSuperClusterAlgo::buildAllSuperClusters(CalibClusterPtrVector& clusters, double seedthresh) {
255  auto seedable = std::bind(isSeed, _1, seedthresh, threshIsET_);
256  // make sure only seeds appear at the front of the list of clusters
257  std::stable_partition(clusters.begin(), clusters.end(), seedable);
258  // in each iteration we are working on a list that is already sorted
259  // in the cluster energy and remains so through each iteration
260  // NB: since clusters is sorted in loadClusters any_of has O(1)
261  // timing until you run out of seeds!
262  while (std::any_of(clusters.cbegin(), clusters.cend(), seedable)) {
263  buildSuperCluster(clusters.front(), clusters);
264  }
265 }
266 
267 void PFECALSuperClusterAlgo::buildSuperCluster(CalibClusterPtr& seed, CalibClusterPtrVector& clusters) {
268  double etawidthSuperCluster = 0.0;
269  double phiwidthSuperCluster = 0.0;
270  bool isEE = false;
271  switch (seed->the_ptr()->layer()) {
273  phiwidthSuperCluster = phiwidthSuperClusterBarrel_;
274  etawidthSuperCluster = etawidthSuperClusterBarrel_;
275  edm::LogInfo("PFClustering") << "Building SC number " << superClustersEB_->size() + 1 << " in the ECAL barrel!";
276  break;
277  case PFLayer::HGCAL:
279 
280  phiwidthSuperCluster = phiwidthSuperClusterEndcap_;
281  etawidthSuperCluster = etawidthSuperClusterEndcap_;
282  edm::LogInfo("PFClustering") << "Building SC number " << superClustersEE_->size() + 1 << " in the ECAL endcap!"
283  << std::endl;
284  isEE = true;
285  break;
286  default:
287  break;
288  }
289  auto isClusteredWithSeed = std::bind(isClustered,
290  _1,
291  seed,
292  _clustype,
296  etawidthSuperCluster,
297  phiwidthSuperCluster);
298  auto matchesSeedByRecHit = std::bind(isLinkedByRecHit, _1, seed, satelliteThreshold_, fractionForMajority_, 0.1, 0.2);
299 
300  // this function shuffles the list of clusters into a list
301  // where all clustered sub-clusters are at the front
302  // and returns a pointer to the first unclustered cluster.
303  // The relative ordering of clusters is preserved
304  // (i.e. both resulting sub-lists are sorted by energy).
305  auto not_clustered = std::stable_partition(clusters.begin(), clusters.end(), isClusteredWithSeed);
306  // satellite cluster merging
307  // it was found that large clusters can split!
309  not_clustered = std::stable_partition(not_clustered, clusters.end(), matchesSeedByRecHit);
310  }
311 
312  if (verbose_) {
313  edm::LogInfo("PFClustering") << "Dumping cluster detail";
314  edm::LogVerbatim("PFClustering") << "\tPassed seed: e = " << seed->energy_nocalib() << " eta = " << seed->eta()
315  << " phi = " << seed->phi() << std::endl;
316  for (auto clus = clusters.cbegin(); clus != not_clustered; ++clus) {
317  edm::LogVerbatim("PFClustering") << "\t\tClustered cluster: e = " << (*clus)->energy_nocalib()
318  << " eta = " << (*clus)->eta() << " phi = " << (*clus)->phi() << std::endl;
319  }
320  for (auto clus = not_clustered; clus != clusters.end(); ++clus) {
321  edm::LogVerbatim("PFClustering") << "\tNon-Clustered cluster: e = " << (*clus)->energy_nocalib()
322  << " eta = " << (*clus)->eta() << " phi = " << (*clus)->phi() << std::endl;
323  }
324  }
325 
326  if (not_clustered == clusters.begin()) {
327  if (dropUnseedable_) {
328  clusters.erase(clusters.begin());
329  return;
330  } else {
331  throw cms::Exception("PFECALSuperClusterAlgo::buildSuperCluster")
332  << "Cluster is not seedable!" << std::endl
333  << "\tNon-Clustered cluster: e = " << (*not_clustered)->energy_nocalib()
334  << " eta = " << (*not_clustered)->eta() << " phi = " << (*not_clustered)->phi() << std::endl;
335  }
336  }
337 
338  // move the clustered clusters out of available cluster list
339  // and into a temporary vector for building the SC
340  CalibratedClusterPtrVector clustered(clusters.begin(), not_clustered);
341  clusters.erase(clusters.begin(), not_clustered);
342  // need the vector of raw pointers for a PF width class
343  std::vector<const reco::PFCluster*> bare_ptrs;
344  // calculate necessary parameters and build the SC
345  double posX(0), posY(0), posZ(0), corrSCEnergy(0), corrPS1Energy(0), corrPS2Energy(0), energyweight(0),
346  energyweighttot(0);
347  for (auto& clus : clustered) {
348  double ePS1 = 0.0;
349  double ePS2 = 0.0;
350  energyweight = clus->energy_nocalib();
351  bare_ptrs.push_back(clus->the_ptr().get());
352  // update EE calibrated super cluster energies
353  if (isEE) {
354  auto ee_key_val = std::make_pair(clus->the_ptr().key(), edm::Ptr<reco::PFCluster>());
355  const auto clustops = std::equal_range(EEtoPS_->begin(), EEtoPS_->end(), ee_key_val, sortByKey);
356  std::vector<reco::PFCluster const*> psClusterPointers;
357  for (auto i_ps = clustops.first; i_ps != clustops.second; ++i_ps) {
358  psClusterPointers.push_back(i_ps->second.get());
359  }
360  auto calibratedEnergies = _pfEnergyCalibration->calibrateEndcapClusterEnergies(
361  *(clus->the_ptr()), psClusterPointers, *channelStatus_, applyCrackCorrections_);
362  ePS1 = calibratedEnergies.ps1Energy;
363  ePS2 = calibratedEnergies.ps2Energy;
364  }
365 
366  if (ePS1 == -1.)
367  ePS1 = 0;
368  if (ePS2 == -1.)
369  ePS2 = 0;
370 
371  switch (_eweight) {
372  case kRaw: // energyweight is initialized to raw cluster energy
373  break;
374  case kCalibratedNoPS:
375  energyweight = clus->energy() - ePS1 - ePS2;
376  break;
377  case kCalibratedTotal:
378  energyweight = clus->energy();
379  break;
380  default:
381  break;
382  }
383  const math::XYZPoint& cluspos = clus->the_ptr()->position();
384  posX += energyweight * cluspos.X();
385  posY += energyweight * cluspos.Y();
386  posZ += energyweight * cluspos.Z();
387 
388  energyweighttot += energyweight;
389  corrSCEnergy += clus->energy();
390  corrPS1Energy += ePS1;
391  corrPS2Energy += ePS2;
392  }
393  posX /= energyweighttot;
394  posY /= energyweighttot;
395  posZ /= energyweighttot;
396 
397  // now build the supercluster
398  reco::SuperCluster new_sc(corrSCEnergy, math::XYZPoint(posX, posY, posZ));
399  new_sc.setCorrectedEnergy(corrSCEnergy);
400  new_sc.setSeed(clustered.front()->the_ptr());
401  new_sc.setPreshowerEnergy(corrPS1Energy + corrPS2Energy);
402  new_sc.setPreshowerEnergyPlane1(corrPS1Energy);
403  new_sc.setPreshowerEnergyPlane2(corrPS2Energy);
404  for (const auto& clus : clustered) {
405  new_sc.addCluster(clus->the_ptr());
406 
407  auto& hits_and_fractions = clus->the_ptr()->hitsAndFractions();
408  for (auto& hit_and_fraction : hits_and_fractions) {
409  new_sc.addHitAndFraction(hit_and_fraction.first, hit_and_fraction.second);
410  }
411  if (isEE) {
412  auto ee_key_val = std::make_pair(clus->the_ptr().key(), edm::Ptr<reco::PFCluster>());
413  const auto clustops = std::equal_range(EEtoPS_->begin(), EEtoPS_->end(), ee_key_val, sortByKey);
414  // EE rechits should be uniquely matched to sets of pre-shower
415  // clusters at this point, so we throw an exception if otherwise
416  // now wrapped in EDM debug flags
417  for (auto i_ps = clustops.first; i_ps != clustops.second; ++i_ps) {
418  edm::Ptr<reco::PFCluster> psclus(i_ps->second);
419 #ifdef EDM_ML_DEBUG
420  auto found_pscluster = std::find_if(new_sc.preshowerClustersBegin(),
421  new_sc.preshowerClustersEnd(),
422  [&i_ps](const auto& i) { return i.key() == i_ps->first; });
423  if (found_pscluster == new_sc.preshowerClustersEnd()) {
424 #endif
425  new_sc.addPreshowerCluster(psclus);
426 #ifdef EDM_ML_DEBUG
427  } else {
428  throw cms::Exception("PFECALSuperClusterAlgo::buildSuperCluster")
429  << "Found a PS cluster matched to more than one EE cluster!" << std::endl
430  << std::hex << psclus.get() << " == " << found_pscluster->get() << std::dec << std::endl;
431  }
432 #endif
433  }
434  }
435  }
436 
437  // calculate linearly weighted cluster widths
438  PFClusterWidthAlgo pfwidth(bare_ptrs);
439  new_sc.setEtaWidth(pfwidth.pflowEtaWidth());
440  new_sc.setPhiWidth(pfwidth.pflowPhiWidth());
441 
442  // cache the value of the raw energy
443  new_sc.rawEnergy();
444 
445  //apply regression energy corrections
446  if (useRegression_) {
447  regr_->modifyObject(new_sc);
448  }
449 
450  // save the super cluster to the appropriate list (if it passes the final
451  // Et threshold)
452  //Note that Et is computed here with respect to the beamspot position
453  //in order to be consistent with the cut applied in the
454  //ElectronSeedProducer
455  double scEtBS = ptFast(new_sc.energy(), new_sc.position(), beamSpot_->position());
456 
457  if (scEtBS > threshSuperClusterEt_) {
458  switch (seed->the_ptr()->layer()) {
460  if (isOOTCollection_) {
461  DetId seedId = new_sc.seed()->seed();
463  if (!seedRecHit->checkFlag(EcalRecHit::kOutOfTime))
464  break;
465  }
466  superClustersEB_->push_back(new_sc);
467  break;
468  case PFLayer::HGCAL:
470  if (isOOTCollection_) {
471  DetId seedId = new_sc.seed()->seed();
473  if (!seedRecHit->checkFlag(EcalRecHit::kOutOfTime))
474  break;
475  }
476  superClustersEE_->push_back(new_sc);
477  break;
478  default:
479  break;
480  }
481  }
482 }
Log< level::Info, true > LogVerbatim
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:154
CaloCluster_iterator preshowerClustersBegin() const
fist iterator over PreshowerCluster constituents
Definition: SuperCluster.h:92
const ESChannelStatus * channelStatus_
void addHitAndFraction(DetId id, float fraction)
Definition: CaloCluster.h:203
edm::EDGetTokenT< edm::View< reco::PFCluster > > inputTagPFClusters_
std::unique_ptr< SCEnergyCorrectorSemiParm > regr_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
std::unique_ptr< reco::SuperClusterCollection > superClustersEB_
void setPreshowerEnergyPlane2(double preshowerEnergy2)
Definition: SuperCluster.h:72
edm::EDGetTokenT< EcalRecHitCollection > inputTagBarrelRecHits_
T const * get() const
Returns C++ pointer to the item.
Definition: Ptr.h:139
double pflowPhiWidth() const
std::vector< EcalRecHit >::const_iterator const_iterator
const reco::BeamSpot * beamSpot_
const EcalMustacheSCParameters * mustacheSCParams_
const reco::PFCluster::EEtoPSAssociation * EEtoPS_
bool inMustache(const EcalMustacheSCParameters *params, const float maxEta, const float maxPhi, const float ClustE, const float ClusEta, const float ClusPhi)
Definition: Mustache.cc:8
void setSeed(const CaloClusterPtr &r)
list of used xtals by DetId // now inherited by CaloCluster
Definition: SuperCluster.h:107
void setPhiWidth(double pw)
Definition: SuperCluster.h:73
edm::ESGetToken< ESEEIntercalibConstants, ESEEIntercalibConstantsRcd > esEEInterCalibToken_
double pflowEtaWidth() const
double ptFast(const double energy, const math::XYZPoint &position, const math::XYZPoint &origin)
std::unique_ptr< reco::SuperClusterCollection > superClustersEE_
const EcalSCDynamicDPhiParameters * scDynamicDPhiParams_
edm::EDGetTokenT< EcalRecHitCollection > inputTagEndcapRecHits_
ESChannelStatusMap ESChannelStatus
bool getData(T &iHolder) const
Definition: EventSetup.h:128
void loadAndSortPFClusters(const edm::Event &evt)
void update(const edm::EventSetup &)
void setEtaWidth(double ew)
Definition: SuperCluster.h:74
std::vector< CalibratedClusterPtr > CalibratedClusterPtrVector
std::shared_ptr< CalibratedPFCluster > CalibratedClusterPtr
int iEvent
Definition: GenABIO.cc:224
void buildAllSuperClusters(CalibratedClusterPtrVector &, double seedthresh)
std::shared_ptr< PFEnergyCalibration > _pfEnergyCalibration
void setTokens(const edm::ParameterSet &, edm::ConsumesCollector &&)
void setCorrectedEnergy(double cenergy)
Definition: CaloCluster.h:137
T sqrt(T t)
Definition: SSEVec.h:19
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
CalibratedClusterPtrVector _clustersEE
edm::ESGetToken< ESChannelStatus, ESChannelStatusRcd > esChannelStatusToken_
double energy() const
cluster energy
Definition: CaloCluster.h:149
bool isValid() const
Definition: HandleBase.h:70
edm::ESGetToken< EcalSCDynamicDPhiParameters, EcalSCDynamicDPhiParametersRcd > ecalSCDynamicDPhiParametersToken_
Log< level::Info, false > LogInfo
Definition: DetId.h:17
double rawEnergy() const
raw uncorrected energy (sum of energies of component BasicClusters)
Definition: SuperCluster.h:58
edm::EDGetTokenT< reco::PFCluster::EEtoPSAssociation > inputTagPFClustersES_
std::vector< std::pair< CaloClusterPtr::key_type, edm::Ptr< PFCluster > > > EEtoPSAssociation
Definition: PFCluster.h:44
T const * product() const
Definition: Handle.h:70
edm::EDGetTokenT< reco::BeamSpot > inputTagBeamSpot_
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
reco::PFCluster::EEtoPSAssociation::value_type EEPSPair
void addPreshowerCluster(const CaloClusterPtr &r)
add reference to constituent BasicCluster
Definition: SuperCluster.h:128
T const * product() const
Definition: ESHandle.h:86
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
bool sortByKey(const EEPSPair &a, const EEPSPair &b)
double b
Definition: hdecay.h:118
edm::ESGetToken< EcalMustacheSCParameters, EcalMustacheSCParametersRcd > ecalMustacheSCParametersToken_
void buildSuperCluster(CalibratedClusterPtr &, CalibratedClusterPtrVector &)
void addCluster(const CaloClusterPtr &r)
add reference to constituent BasicCluster
Definition: SuperCluster.h:122
iterator find(key_type k)
bool inDynamicDPhiWindow(const EcalSCDynamicDPhiParameters *params, const float seedEta, const float seedPhi, const float ClustE, const float ClusEta, const float clusPhi)
Definition: Mustache.cc:64
double a
Definition: hdecay.h:119
static int position[264][3]
Definition: ReadPGInfo.cc:289
void updateSCParams(const edm::EventSetup &)
const Point & position() const
position
Definition: BeamSpot.h:59
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:77
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:157
const EcalRecHitCollection * barrelRecHits_
void setPreshowerEnergyPlane1(double preshowerEnergy1)
Definition: SuperCluster.h:71
void setPFClusterCalibration(const std::shared_ptr< PFEnergyCalibration > &)
CalibratedClusterPtrVector _clustersEB
const EcalRecHitCollection * endcapRecHits_
CaloCluster_iterator preshowerClustersEnd() const
last iterator over PreshowerCluster constituents
Definition: SuperCluster.h:95
void setPreshowerEnergy(double preshowerEnergy)
Definition: SuperCluster.h:70
#define LogDebug(id)