CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes
PFECALSuperClusterAlgo Class Reference

\ Algorithm for box particle flow super clustering in the ECAL More...

#include <PFECALSuperClusterAlgo.h>

Classes

class  CalibratedPFCluster
 

Public Types

typedef std::shared_ptr
< CalibratedPFCluster
CalibratedClusterPtr
 
typedef std::vector
< CalibratedClusterPtr
CalibratedClusterPtrVector
 
enum  clustering_type { kBOX =1, kMustache =2 }
 
enum  energy_weight { kRaw, kCalibratedNoPS, kCalibratedTotal }
 

Public Member Functions

std::auto_ptr
< reco::SuperClusterCollection > & 
getEBOutputSCCollection ()
 
std::auto_ptr
< reco::SuperClusterCollection > & 
getEEOutputSCCollection ()
 
void loadAndSortPFClusters (const edm::Event &evt)
 
 PFECALSuperClusterAlgo ()
 constructor More...
 
void run ()
 
void setClusteringType (clustering_type thetype)
 
void setCrackCorrections (bool applyCrackCorrections)
 
void setEnergyWeighting (energy_weight thetype)
 
void setEtawidthSuperClusterBarrel (double etawidth)
 
void setEtawidthSuperClusterEndcap (double etawidth)
 
void setMajorityFraction (const double f)
 
void setPFClusterCalibration (const std::shared_ptr< PFEnergyCalibration > &)
 
void setPhiwidthSuperClusterBarrel (double phiwidth)
 
void setPhiwidthSuperClusterEndcap (double phiwidth)
 
void setSatelliteMerging (const bool doit)
 
void setSatelliteThreshold (const double t)
 
void setThreshPFClusterBarrel (double thresh)
 
void setThreshPFClusterEndcap (double thresh)
 
void setThreshPFClusterES (double thresh)
 
void setThreshPFClusterSeedBarrel (double thresh)
 
void setThreshPFClusterSeedEndcap (double thresh)
 
void setThreshSuperClusterEt (double thresh)
 
void setTokens (const edm::ParameterSet &, edm::ConsumesCollector &&)
 
void setUseDynamicDPhi (bool useit)
 
void setUseETForSeeding (bool useET)
 
void setUsePS (bool useit)
 
void setUseRegression (bool useRegression)
 
void setVerbosityLevel (bool verbose)
 
void update (const edm::EventSetup &)
 

Private Member Functions

void buildAllSuperClusters (CalibratedClusterPtrVector &, double seedthresh)
 
void buildSuperCluster (CalibratedClusterPtr &, CalibratedClusterPtrVector &)
 

Private Attributes

CalibratedClusterPtrVector _clustersEB
 
CalibratedClusterPtrVector _clustersEE
 
clustering_type _clustype
 
energy_weight _eweight
 
std::shared_ptr
< PFEnergyCalibration
_pfEnergyCalibration
 
bool _useDynamicDPhi
 
bool applyCrackCorrections_
 
const reco::BeamSpotbeamSpot_
 
bool doSatelliteClusterMerge_
 
const
reco::PFCluster::EEtoPSAssociation
EEtoPS_
 
double etawidthSuperCluster_
 
double etawidthSuperClusterBarrel_
 
double etawidthSuperClusterEndcap_
 
double fractionForMajority_
 
edm::EDGetTokenT< reco::BeamSpotinputTagBeamSpot_
 
edm::EDGetTokenT< edm::View
< reco::PFCluster > > 
inputTagPFClusters_
 
edm::EDGetTokenT
< reco::PFCluster::EEtoPSAssociation
inputTagPFClustersES_
 
double phiwidthSuperCluster_
 
double phiwidthSuperClusterBarrel_
 
double phiwidthSuperClusterEndcap_
 
std::unique_ptr
< PFSCRegressionCalc
regr_
 
double satelliteThreshold_
 
std::auto_ptr
< reco::SuperClusterCollection
superClustersEB_
 
std::auto_ptr
< reco::SuperClusterCollection
superClustersEE_
 
bool threshIsET_
 
double threshPFCluster_
 
double threshPFClusterBarrel_
 
double threshPFClusterEndcap_
 
double threshPFClusterES_
 
double threshPFClusterSeed_
 
double threshPFClusterSeedBarrel_
 
double threshPFClusterSeedEndcap_
 
double threshSuperClusterEt_
 
bool usePS
 
bool useRegression_
 
bool verbose_
 

Detailed Description

\ Algorithm for box particle flow super clustering in the ECAL

Original Author: Nicolas Chanon Additional Authors (Mustache): Y. Gershtein, R. Patel, L. Gray

Date
July 2012

Definition at line 47 of file PFECALSuperClusterAlgo.h.

Member Typedef Documentation

Definition at line 67 of file PFECALSuperClusterAlgo.h.

Definition at line 68 of file PFECALSuperClusterAlgo.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

PFECALSuperClusterAlgo::PFECALSuperClusterAlgo ( )

constructor

Definition at line 169 of file PFECALSuperClusterAlgo.cc.

169 : beamSpot_(0) { }
const reco::BeamSpot * beamSpot_

Member Function Documentation

void PFECALSuperClusterAlgo::buildAllSuperClusters ( CalibratedClusterPtrVector ,
double  seedthresh 
)
private

Definition at line 274 of file PFECALSuperClusterAlgo.cc.

References buildSuperCluster(), and threshIsET_.

Referenced by run().

275  {
276  IsASeed seedable(seedthresh,threshIsET_);
277  // make sure only seeds appear at the front of the list of clusters
278  std::stable_partition(clusters.begin(),clusters.end(),seedable);
279  // in each iteration we are working on a list that is already sorted
280  // in the cluster energy and remains so through each iteration
281  // NB: since clusters is sorted in loadClusters any_of has O(1)
282  // timing until you run out of seeds!
283  while( std::any_of(clusters.cbegin(), clusters.cend(), seedable) ) {
284  buildSuperCluster(clusters.front(),clusters);
285  }
286 }
void buildSuperCluster(CalibratedClusterPtr &, CalibratedClusterPtrVector &)
void PFECALSuperClusterAlgo::buildSuperCluster ( CalibratedClusterPtr ,
CalibratedClusterPtrVector  
)
private

Definition at line 289 of file PFECALSuperClusterAlgo.cc.

References _clustype, _eweight, _pfEnergyCalibration, _useDynamicDPhi, reco::SuperCluster::addCluster(), reco::CaloCluster::addHitAndFraction(), reco::SuperCluster::addPreshowerCluster(), applyCrackCorrections_, beamSpot_, reco::CaloCluster::correctedEnergy(), doSatelliteClusterMerge_, PFLayer::ECAL_BARREL, PFLayer::ECAL_ENDCAP, EEtoPS_, reco::CaloCluster::energy(), etawidthSuperClusterBarrel_, etawidthSuperClusterEndcap_, edm::hlt::Exception, spr::find(), fractionForMajority_, edm::Ptr< T >::get(), kCalibratedNoPS, kCalibratedTotal, kRaw, PFClusterWidthAlgo::pflowEtaWidth(), PFClusterWidthAlgo::pflowPhiWidth(), phiwidthSuperClusterBarrel_, phiwidthSuperClusterEndcap_, reco::BeamSpot::position(), reco::CaloCluster::position(), reco::SuperCluster::preshowerClustersBegin(), reco::SuperCluster::preshowerClustersEnd(), PFLayer::PS1, PFLayer::PS2, reco::SuperCluster::rawEnergy(), regr_, satelliteThreshold_, reco::CaloCluster::setCorrectedEnergy(), reco::CaloCluster::setEnergy(), reco::SuperCluster::setEtaWidth(), reco::SuperCluster::setPhiWidth(), reco::SuperCluster::setPreshowerEnergy(), reco::SuperCluster::setPreshowerEnergyPlane1(), reco::SuperCluster::setPreshowerEnergyPlane2(), reco::SuperCluster::setSeed(), superClustersEB_, superClustersEE_, threshSuperClusterEt_, useRegression_, and verbose_.

Referenced by buildAllSuperClusters().

290  {
291  IsClustered IsClusteredWithSeed(seed,_clustype,_useDynamicDPhi);
292  IsLinkedByRecHit MatchesSeedByRecHit(seed,satelliteThreshold_,
293  fractionForMajority_,0.1,0.2);
294  bool isEE = false;
295  SumPSEnergy sumps1(PFLayer::PS1), sumps2(PFLayer::PS2);
296  switch( seed->the_ptr()->layer() ) {
298  IsClusteredWithSeed.phiwidthSuperCluster_ = phiwidthSuperClusterBarrel_;
299  IsClusteredWithSeed.etawidthSuperCluster_ = etawidthSuperClusterBarrel_;
300  edm::LogInfo("PFClustering") << "Building SC number "
301  << superClustersEB_->size() + 1
302  << " in the ECAL barrel!";
303  break;
304  case PFLayer::ECAL_ENDCAP:
305  IsClusteredWithSeed.phiwidthSuperCluster_ = phiwidthSuperClusterEndcap_;
306  IsClusteredWithSeed.etawidthSuperCluster_ = etawidthSuperClusterEndcap_;
307  edm::LogInfo("PFClustering") << "Building SC number "
308  << superClustersEE_->size() + 1
309  << " in the ECAL endcap!" << std::endl;
310  isEE = true;
311  break;
312  default:
313  break;
314  }
315 
316  // this function shuffles the list of clusters into a list
317  // where all clustered sub-clusters are at the front
318  // and returns a pointer to the first unclustered cluster.
319  // The relative ordering of clusters is preserved
320  // (i.e. both resulting sub-lists are sorted by energy).
321  auto not_clustered = std::stable_partition(clusters.begin(),clusters.end(),
322  IsClusteredWithSeed);
323  // satellite cluster merging
324  // it was found that large clusters can split!
325  if( doSatelliteClusterMerge_ ) {
326  not_clustered = std::stable_partition(not_clustered,clusters.end(),
327  MatchesSeedByRecHit);
328  }
329 
330  if(verbose_) {
331  edm::LogInfo("PFClustering") << "Dumping cluster detail";
332  edm::LogVerbatim("PFClustering")
333  << "\tPassed seed: e = " << seed->energy_nocalib()
334  << " eta = " << seed->eta() << " phi = " << seed->phi()
335  << std::endl;
336  for( auto clus = clusters.cbegin(); clus != not_clustered; ++clus ) {
337  edm::LogVerbatim("PFClustering")
338  << "\t\tClustered cluster: e = " << (*clus)->energy_nocalib()
339  << " eta = " << (*clus)->eta() << " phi = " << (*clus)->phi()
340  << std::endl;
341  }
342  for( auto clus = not_clustered; clus != clusters.end(); ++clus ) {
343  edm::LogVerbatim("PFClustering")
344  << "\tNon-Clustered cluster: e = " << (*clus)->energy_nocalib()
345  << " eta = " << (*clus)->eta() << " phi = " << (*clus)->phi()
346  << std::endl;
347  }
348  }
349  // move the clustered clusters out of available cluster list
350  // and into a temporary vector for building the SC
351  CalibratedClusterPtrVector clustered(clusters.begin(),not_clustered);
352  clusters.erase(clusters.begin(),not_clustered);
353  // need the vector of raw pointers for a PF width class
354  std::vector<const reco::PFCluster*> bare_ptrs;
355  // calculate necessary parameters and build the SC
356  double posX(0), posY(0), posZ(0),
357  corrSCEnergy(0), corrPS1Energy(0), corrPS2Energy(0),
358  ePS1(0), ePS2(0), energyweight(0), energyweighttot(0);
359  std::vector<double> ps1_energies, ps2_energies;
360  for( auto& clus : clustered ) {
361  ePS1 = ePS2 = 0;
362  energyweight = clus->energy_nocalib();
363  bare_ptrs.push_back(clus->the_ptr().get());
364  // update EE calibrated super cluster energies
365  if( isEE ) {
366  ps1_energies.clear();
367  ps2_energies.clear();
368  auto ee_key_val =
369  std::make_pair(clus->the_ptr().key(),edm::Ptr<reco::PFCluster>());
370  const auto clustops = std::equal_range(EEtoPS_->begin(),
371  EEtoPS_->end(),
372  ee_key_val,
373  sortByKey);
374  for( auto i_ps = clustops.first; i_ps != clustops.second; ++i_ps) {
375  edm::Ptr<reco::PFCluster> psclus(i_ps->second);
376  switch( psclus->layer() ) {
377  case PFLayer::PS1:
378  ps1_energies.push_back(psclus->energy());
379  break;
380  case PFLayer::PS2:
381  ps2_energies.push_back(psclus->energy());
382  break;
383  default:
384  break;
385  }
386  }
387  _pfEnergyCalibration->energyEm(*(clus->the_ptr()),
388  ps1_energies,ps2_energies,
389  ePS1,ePS2,
391  }
392 
393  switch( _eweight ) {
394  case kRaw: // energyweight is initialized to raw cluster energy
395  break;
396  case kCalibratedNoPS:
397  energyweight = clus->energy() - ePS1 - ePS2;
398  break;
399  case kCalibratedTotal:
400  energyweight = clus->energy();
401  break;
402  default:
403  break;
404  }
405  const math::XYZPoint& cluspos = clus->the_ptr()->position();
406  posX += energyweight * cluspos.X();
407  posY += energyweight * cluspos.Y();
408  posZ += energyweight * cluspos.Z();
409 
410  energyweighttot += energyweight;
411  corrSCEnergy += clus->energy();
412  corrPS1Energy += ePS1;
413  corrPS2Energy += ePS2;
414  }
415  posX /= energyweighttot;
416  posY /= energyweighttot;
417  posZ /= energyweighttot;
418 
419  // now build the supercluster
420  reco::SuperCluster new_sc(corrSCEnergy,math::XYZPoint(posX,posY,posZ));
421  new_sc.setCorrectedEnergy(corrSCEnergy);
422  new_sc.setSeed(clustered.front()->the_ptr());
423  new_sc.setPreshowerEnergy(corrPS1Energy+corrPS2Energy);
424  new_sc.setPreshowerEnergyPlane1(corrPS1Energy);
425  new_sc.setPreshowerEnergyPlane2(corrPS2Energy);
426  for( const auto& clus : clustered ) {
427  new_sc.addCluster(clus->the_ptr());
428 
429  auto& hits_and_fractions = clus->the_ptr()->hitsAndFractions();
430  for( auto& hit_and_fraction : hits_and_fractions ) {
431  new_sc.addHitAndFraction(hit_and_fraction.first,hit_and_fraction.second);
432  }
433  if( isEE ) {
434  auto ee_key_val =
435  std::make_pair(clus->the_ptr().key(),edm::Ptr<reco::PFCluster>());
436  const auto clustops = std::equal_range(EEtoPS_->begin(),
437  EEtoPS_->end(),
438  ee_key_val,
439  sortByKey);
440  // EE rechits should be uniquely matched to sets of pre-shower
441  // clusters at this point, so we throw an exception if otherwise
442  // now wrapped in EDM debug flags
443  for( auto i_ps = clustops.first; i_ps != clustops.second; ++i_ps) {
444  edm::Ptr<reco::PFCluster> psclus(i_ps->second);
445 #ifdef EDM_ML_DEBUG
446  auto found_pscluster = std::find(new_sc.preshowerClustersBegin(),
447  new_sc.preshowerClustersEnd(),
448  i_ps->second);
449  if( found_pscluster == new_sc.preshowerClustersEnd() ) {
450 #endif
451  new_sc.addPreshowerCluster(psclus);
452 #ifdef EDM_ML_DEBUG
453  } else {
454  throw cms::Exception("PFECALSuperClusterAlgo::buildSuperCluster")
455  << "Found a PS cluster matched to more than one EE cluster!"
456  << std::endl << std::hex << psclus.get() << " == "
457  << found_pscluster->get() << std::dec << std::endl;
458  }
459 #endif
460  }
461  }
462  }
463 
464  // calculate linearly weighted cluster widths
465  PFClusterWidthAlgo pfwidth(bare_ptrs);
466  new_sc.setEtaWidth(pfwidth.pflowEtaWidth());
467  new_sc.setPhiWidth(pfwidth.pflowPhiWidth());
468 
469  // cache the value of the raw energy
470  new_sc.rawEnergy();
471 
472  //apply regression energy corrections
473  if( useRegression_ ) {
474  double cor = regr_->getCorrection(new_sc);
475  new_sc.setEnergy(cor*new_sc.correctedEnergy());
476  }
477 
478  // save the super cluster to the appropriate list (if it passes the final
479  // Et threshold)
480  //Note that Et is computed here with respect to the beamspot position
481  //in order to be consistent with the cut applied in the
482  //ElectronSeedProducer
483  double scEtBS =
484  ptFast(new_sc.energy(),new_sc.position(),beamSpot_->position());
485 
486  if ( scEtBS > threshSuperClusterEt_ ) {
487  switch( seed->the_ptr()->layer() ) {
489  superClustersEB_->push_back(new_sc);
490  break;
491  case PFLayer::ECAL_ENDCAP:
492  superClustersEE_->push_back(new_sc);
493  break;
494  default:
495  break;
496  }
497  }
498 }
std::auto_ptr< reco::SuperClusterCollection > superClustersEB_
const reco::BeamSpot * beamSpot_
const reco::PFCluster::EEtoPSAssociation * EEtoPS_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
std::vector< CalibratedClusterPtr > CalibratedClusterPtrVector
std::shared_ptr< PFEnergyCalibration > _pfEnergyCalibration
std::unique_ptr< PFSCRegressionCalc > regr_
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::auto_ptr< reco::SuperClusterCollection > superClustersEE_
const Point & position() const
position
Definition: BeamSpot.h:62
std::auto_ptr<reco::SuperClusterCollection>& PFECALSuperClusterAlgo::getEBOutputSCCollection ( )
inline

Definition at line 116 of file PFECALSuperClusterAlgo.h.

References superClustersEB_.

116 { return superClustersEB_; }
std::auto_ptr< reco::SuperClusterCollection > superClustersEB_
std::auto_ptr<reco::SuperClusterCollection>& PFECALSuperClusterAlgo::getEEOutputSCCollection ( )
inline

Definition at line 118 of file PFECALSuperClusterAlgo.h.

References superClustersEE_.

118 { return superClustersEE_; }
std::auto_ptr< reco::SuperClusterCollection > superClustersEE_
void PFECALSuperClusterAlgo::loadAndSortPFClusters ( const edm::Event evt)

Definition at line 205 of file PFECALSuperClusterAlgo.cc.

References _clustersEB, _clustersEE, beamSpot_, PFLayer::ECAL_BARREL, PFLayer::ECAL_ENDCAP, EEtoPS_, edm::Event::getByToken(), inputTagBeamSpot_, inputTagPFClusters_, inputTagPFClustersES_, LogDebug, edm::Handle< T >::product(), regr_, python.multivaluedict::sort(), superClustersEB_, superClustersEE_, threshPFClusterBarrel_, threshPFClusterEndcap_, and useRegression_.

205  {
206 
207  //load input collections
208  //Load the pfcluster collections
209  edm::Handle<edm::View<reco::PFCluster> > pfclustersHandle;
210  iEvent.getByToken( inputTagPFClusters_, pfclustersHandle );
211 
213  iEvent.getByToken( inputTagPFClustersES_, psAssociationHandle);
214 
215  const PFClusterView& clusters = *pfclustersHandle.product();
216  const reco::PFCluster::EEtoPSAssociation& psclusters = *psAssociationHandle.product();
217 
218  //load BeamSpot
220  iEvent.getByToken( inputTagBeamSpot_, bsHandle);
221  beamSpot_ = bsHandle.product();
222 
223  //initialize regression for this event
224  if (useRegression_) {
225  regr_->varCalc()->setEvent(iEvent);
226  }
227 
228  // reset the system for running
230  _clustersEB.clear();
232  _clustersEE.clear();
233  EEtoPS_ = &psclusters;
234 
235  auto clusterPtrs = clusters.ptrVector();
236  //Select PF clusters available for the clustering
237  for ( auto& cluster : clusterPtrs ){
238  LogDebug("PFClustering")
239  << "Loading PFCluster i="<<cluster.key()
240  <<" energy="<<cluster->energy()<<std::endl;
241 
242  CalibratedClusterPtr calib_cluster(new CalibratedPFCluster(cluster));
243  switch( cluster->layer() ) {
245  if( calib_cluster->energy() > threshPFClusterBarrel_ ) {
246  _clustersEB.push_back(calib_cluster);
247  }
248  break;
250  if( calib_cluster->energy() > threshPFClusterEndcap_ ) {
251  _clustersEE.push_back(calib_cluster);
252  }
253  break;
254  default:
255  break;
256  }
257  }
258  // sort full cluster collections by their calibrated energy
259  // this will put all the seeds first by construction
260  GreaterByEt greater;
261  std::sort(_clustersEB.begin(), _clustersEB.end(), greater);
262  std::sort(_clustersEE.begin(), _clustersEE.end(), greater);
263 
264 }
#define LogDebug(id)
std::auto_ptr< reco::SuperClusterCollection > superClustersEB_
edm::EDGetTokenT< edm::View< reco::PFCluster > > inputTagPFClusters_
const reco::BeamSpot * beamSpot_
const reco::PFCluster::EEtoPSAssociation * EEtoPS_
std::shared_ptr< CalibratedPFCluster > CalibratedClusterPtr
int iEvent
Definition: GenABIO.cc:243
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
std::unique_ptr< PFSCRegressionCalc > regr_
std::vector< std::pair< CaloClusterPtr::key_type, edm::Ptr< PFCluster > > > EEtoPSAssociation
Definition: PFCluster.h:46
CalibratedClusterPtrVector _clustersEE
edm::EDGetTokenT< reco::PFCluster::EEtoPSAssociation > inputTagPFClustersES_
edm::EDGetTokenT< reco::BeamSpot > inputTagBeamSpot_
std::auto_ptr< reco::SuperClusterCollection > superClustersEE_
T const * product() const
Definition: Handle.h:81
CalibratedClusterPtrVector _clustersEB
void PFECALSuperClusterAlgo::run ( void  )

Definition at line 266 of file PFECALSuperClusterAlgo.cc.

References _clustersEB, _clustersEE, buildAllSuperClusters(), threshPFClusterSeedBarrel_, and threshPFClusterSeedEndcap_.

266  {
267  // clusterize the EB
269  // clusterize the EE
271 }
void buildAllSuperClusters(CalibratedClusterPtrVector &, double seedthresh)
CalibratedClusterPtrVector _clustersEE
CalibratedClusterPtrVector _clustersEB
void PFECALSuperClusterAlgo::setClusteringType ( clustering_type  thetype)
inline

Definition at line 76 of file PFECALSuperClusterAlgo.h.

References _clustype.

76 { _clustype = thetype; }
void PFECALSuperClusterAlgo::setCrackCorrections ( bool  applyCrackCorrections)
inline

Definition at line 109 of file PFECALSuperClusterAlgo.h.

References applyCrackCorrections_.

109 { applyCrackCorrections_ = applyCrackCorrections;}
void PFECALSuperClusterAlgo::setEnergyWeighting ( energy_weight  thetype)
inline

Definition at line 78 of file PFECALSuperClusterAlgo.h.

References _eweight.

78 { _eweight = thetype; }
void PFECALSuperClusterAlgo::setEtawidthSuperClusterBarrel ( double  etawidth)
inline

Definition at line 94 of file PFECALSuperClusterAlgo.h.

References etawidthSuperClusterBarrel_.

void PFECALSuperClusterAlgo::setEtawidthSuperClusterEndcap ( double  etawidth)
inline

Definition at line 96 of file PFECALSuperClusterAlgo.h.

References etawidthSuperClusterEndcap_.

void PFECALSuperClusterAlgo::setMajorityFraction ( const double  f)
inline

Definition at line 105 of file PFECALSuperClusterAlgo.h.

References f, and fractionForMajority_.

105 { fractionForMajority_ = f; }
double f[11][100]
void PFECALSuperClusterAlgo::setPFClusterCalibration ( const std::shared_ptr< PFEnergyCalibration > &  calib)

Definition at line 172 of file PFECALSuperClusterAlgo.cc.

References _pfEnergyCalibration, and calib.

172  {
174 }
MVATrainerComputer * calib
Definition: MVATrainer.cc:64
std::shared_ptr< PFEnergyCalibration > _pfEnergyCalibration
void PFECALSuperClusterAlgo::setPhiwidthSuperClusterBarrel ( double  phiwidth)
inline

Definition at line 93 of file PFECALSuperClusterAlgo.h.

References phiwidthSuperClusterBarrel_.

void PFECALSuperClusterAlgo::setPhiwidthSuperClusterEndcap ( double  phiwidth)
inline

Definition at line 95 of file PFECALSuperClusterAlgo.h.

References phiwidthSuperClusterEndcap_.

void PFECALSuperClusterAlgo::setSatelliteMerging ( const bool  doit)
inline

Definition at line 103 of file PFECALSuperClusterAlgo.h.

References doSatelliteClusterMerge_.

void PFECALSuperClusterAlgo::setSatelliteThreshold ( const double  t)
inline

Definition at line 104 of file PFECALSuperClusterAlgo.h.

References satelliteThreshold_, and lumiQTWidget::t.

void PFECALSuperClusterAlgo::setThreshPFClusterBarrel ( double  thresh)
inline
void PFECALSuperClusterAlgo::setThreshPFClusterEndcap ( double  thresh)
inline
void PFECALSuperClusterAlgo::setThreshPFClusterES ( double  thresh)
inline
void PFECALSuperClusterAlgo::setThreshPFClusterSeedBarrel ( double  thresh)
inline
void PFECALSuperClusterAlgo::setThreshPFClusterSeedEndcap ( double  thresh)
inline
void PFECALSuperClusterAlgo::setThreshSuperClusterEt ( double  thresh)
inline
void PFECALSuperClusterAlgo::setTokens ( const edm::ParameterSet iConfig,
edm::ConsumesCollector &&  cc 
)

Definition at line 176 of file PFECALSuperClusterAlgo.cc.

References edm::ParameterSet::getParameter(), inputTagBeamSpot_, inputTagPFClusters_, inputTagPFClustersES_, regr_, and useRegression_.

176  {
177 
179  cc.consumes<edm::View<reco::PFCluster> >(iConfig.getParameter<edm::InputTag>("PFClusters"));
183  cc.consumes<reco::BeamSpot>(iConfig.getParameter<edm::InputTag>("BeamSpot"));
184 
185  if (useRegression_) {
186  const edm::ParameterSet &regconf = iConfig.getParameter<edm::ParameterSet>("regressionConfig");
187 
188  regr_.reset(new PFSCRegressionCalc(regconf));
189  regr_->varCalc()->setTokens(regconf,std::move(cc));
190  }
191 
192 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::View< reco::PFCluster > > inputTagPFClusters_
std::unique_ptr< PFSCRegressionCalc > regr_
std::vector< std::pair< CaloClusterPtr::key_type, edm::Ptr< PFCluster > > > EEtoPSAssociation
Definition: PFCluster.h:46
edm::EDGetTokenT< reco::PFCluster::EEtoPSAssociation > inputTagPFClustersES_
edm::EDGetTokenT< reco::BeamSpot > inputTagBeamSpot_
SCRegressionCalculator< BaselinePFSCRegression > PFSCRegressionCalc
void PFECALSuperClusterAlgo::setUseDynamicDPhi ( bool  useit)
inline

Definition at line 82 of file PFECALSuperClusterAlgo.h.

References _useDynamicDPhi.

void PFECALSuperClusterAlgo::setUseETForSeeding ( bool  useET)
inline

Definition at line 80 of file PFECALSuperClusterAlgo.h.

References threshIsET_.

void PFECALSuperClusterAlgo::setUsePS ( bool  useit)
inline

Definition at line 97 of file PFECALSuperClusterAlgo.h.

References usePS.

97 { usePS = useit; }
void PFECALSuperClusterAlgo::setUseRegression ( bool  useRegression)
inline

Definition at line 84 of file PFECALSuperClusterAlgo.h.

References useRegression_.

84 { useRegression_ = useRegression; }
void PFECALSuperClusterAlgo::setVerbosityLevel ( bool  verbose)
inline
void PFECALSuperClusterAlgo::update ( const edm::EventSetup setup)

Definition at line 194 of file PFECALSuperClusterAlgo.cc.

References regr_, and useRegression_.

Referenced by progressbar.ProgressBar::__next__(), relval_steps.Matrix::__setitem__(), relval_steps.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), relval_steps.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

194  {
195 
196  if (useRegression_) {
197  regr_->update(setup);
198  }
199 
200 }
std::unique_ptr< PFSCRegressionCalc > regr_

Member Data Documentation

CalibratedClusterPtrVector PFECALSuperClusterAlgo::_clustersEB
private

Definition at line 132 of file PFECALSuperClusterAlgo.h.

Referenced by loadAndSortPFClusters(), and run().

CalibratedClusterPtrVector PFECALSuperClusterAlgo::_clustersEE
private

Definition at line 133 of file PFECALSuperClusterAlgo.h.

Referenced by loadAndSortPFClusters(), and run().

clustering_type PFECALSuperClusterAlgo::_clustype
private

Definition at line 138 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and setClusteringType().

energy_weight PFECALSuperClusterAlgo::_eweight
private

Definition at line 139 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and setEnergyWeighting().

std::shared_ptr<PFEnergyCalibration> PFECALSuperClusterAlgo::_pfEnergyCalibration
private

Definition at line 137 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and setPFClusterCalibration().

bool PFECALSuperClusterAlgo::_useDynamicDPhi
private

Definition at line 172 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and setUseDynamicDPhi().

bool PFECALSuperClusterAlgo::applyCrackCorrections_
private

Definition at line 174 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and setCrackCorrections().

const reco::BeamSpot* PFECALSuperClusterAlgo::beamSpot_
private

Definition at line 130 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and loadAndSortPFClusters().

bool PFECALSuperClusterAlgo::doSatelliteClusterMerge_
private

Definition at line 169 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and setSatelliteMerging().

const reco::PFCluster::EEtoPSAssociation* PFECALSuperClusterAlgo::EEtoPS_
private

Definition at line 136 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and loadAndSortPFClusters().

double PFECALSuperClusterAlgo::etawidthSuperCluster_
private

Definition at line 155 of file PFECALSuperClusterAlgo.h.

double PFECALSuperClusterAlgo::etawidthSuperClusterBarrel_
private

Definition at line 165 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and setEtawidthSuperClusterBarrel().

double PFECALSuperClusterAlgo::etawidthSuperClusterEndcap_
private

Definition at line 167 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and setEtawidthSuperClusterEndcap().

double PFECALSuperClusterAlgo::fractionForMajority_
private

Definition at line 170 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and setMajorityFraction().

edm::EDGetTokenT<reco::BeamSpot> PFECALSuperClusterAlgo::inputTagBeamSpot_
private

Definition at line 128 of file PFECALSuperClusterAlgo.h.

Referenced by loadAndSortPFClusters(), and setTokens().

edm::EDGetTokenT<edm::View<reco::PFCluster> > PFECALSuperClusterAlgo::inputTagPFClusters_
private

Definition at line 126 of file PFECALSuperClusterAlgo.h.

Referenced by loadAndSortPFClusters(), and setTokens().

edm::EDGetTokenT<reco::PFCluster::EEtoPSAssociation> PFECALSuperClusterAlgo::inputTagPFClustersES_
private

Definition at line 127 of file PFECALSuperClusterAlgo.h.

Referenced by loadAndSortPFClusters(), and setTokens().

double PFECALSuperClusterAlgo::phiwidthSuperCluster_
private

Definition at line 156 of file PFECALSuperClusterAlgo.h.

double PFECALSuperClusterAlgo::phiwidthSuperClusterBarrel_
private

Definition at line 164 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and setPhiwidthSuperClusterBarrel().

double PFECALSuperClusterAlgo::phiwidthSuperClusterEndcap_
private

Definition at line 166 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and setPhiwidthSuperClusterEndcap().

std::unique_ptr<PFSCRegressionCalc> PFECALSuperClusterAlgo::regr_
private
double PFECALSuperClusterAlgo::satelliteThreshold_
private

Definition at line 170 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and setSatelliteThreshold().

std::auto_ptr<reco::SuperClusterCollection> PFECALSuperClusterAlgo::superClustersEB_
private
std::auto_ptr<reco::SuperClusterCollection> PFECALSuperClusterAlgo::superClustersEE_
private
bool PFECALSuperClusterAlgo::threshIsET_
private

Definition at line 175 of file PFECALSuperClusterAlgo.h.

Referenced by buildAllSuperClusters(), and setUseETForSeeding().

double PFECALSuperClusterAlgo::threshPFCluster_
private

Definition at line 154 of file PFECALSuperClusterAlgo.h.

double PFECALSuperClusterAlgo::threshPFClusterBarrel_
private

Definition at line 159 of file PFECALSuperClusterAlgo.h.

Referenced by loadAndSortPFClusters(), and setThreshPFClusterBarrel().

double PFECALSuperClusterAlgo::threshPFClusterEndcap_
private

Definition at line 161 of file PFECALSuperClusterAlgo.h.

Referenced by loadAndSortPFClusters(), and setThreshPFClusterEndcap().

double PFECALSuperClusterAlgo::threshPFClusterES_
private

Definition at line 162 of file PFECALSuperClusterAlgo.h.

Referenced by setThreshPFClusterES().

double PFECALSuperClusterAlgo::threshPFClusterSeed_
private

Definition at line 153 of file PFECALSuperClusterAlgo.h.

double PFECALSuperClusterAlgo::threshPFClusterSeedBarrel_
private

Definition at line 158 of file PFECALSuperClusterAlgo.h.

Referenced by run(), and setThreshPFClusterSeedBarrel().

double PFECALSuperClusterAlgo::threshPFClusterSeedEndcap_
private

Definition at line 160 of file PFECALSuperClusterAlgo.h.

Referenced by run(), and setThreshPFClusterSeedEndcap().

double PFECALSuperClusterAlgo::threshSuperClusterEt_
private

Definition at line 151 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and setThreshSuperClusterEt().

bool PFECALSuperClusterAlgo::usePS
private

Definition at line 177 of file PFECALSuperClusterAlgo.h.

Referenced by setUsePS().

bool PFECALSuperClusterAlgo::useRegression_
private
bool PFECALSuperClusterAlgo::verbose_
private

Definition at line 145 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and setVerbosityLevel().