CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
ECALPFSeedCleaner Class Reference

#include <ECALPFSeedCleaner.h>

Inheritance diagram for ECALPFSeedCleaner:
RecHitTopologicalCleanerBase

Public Member Functions

void clean (const edm::Handle< reco::PFRecHitCollection > &input, std::vector< bool > &mask) override
 
 ECALPFSeedCleaner (const edm::ParameterSet &conf)
 
 ECALPFSeedCleaner (const ECALPFSeedCleaner &)=delete
 
ECALPFSeedCleaneroperator= (const ECALPFSeedCleaner &)=delete
 
void update (const edm::EventSetup &) override
 
- Public Member Functions inherited from RecHitTopologicalCleanerBase
const std::string & name () const
 
RecHitTopologicalCleanerBaseoperator= (const RecHitTopologicalCleanerBase &)=delete
 
 RecHitTopologicalCleanerBase (const edm::ParameterSet &conf)
 
 RecHitTopologicalCleanerBase (const RecHitTopologicalCleanerBase &)=delete
 
virtual ~RecHitTopologicalCleanerBase ()=default
 

Private Attributes

edm::ESHandle< EcalPFSeedingThresholdsths_
 

Detailed Description

Definition at line 8 of file ECALPFSeedCleaner.h.

Constructor & Destructor Documentation

ECALPFSeedCleaner::ECALPFSeedCleaner ( const edm::ParameterSet conf)

Definition at line 3 of file ECALPFSeedCleaner.cc.

RecHitTopologicalCleanerBase(const edm::ParameterSet &conf)
ECALPFSeedCleaner::ECALPFSeedCleaner ( const ECALPFSeedCleaner )
delete

Member Function Documentation

void ECALPFSeedCleaner::clean ( const edm::Handle< reco::PFRecHitCollection > &  input,
std::vector< bool > &  mask 
)
overridevirtual

Implements RecHitTopologicalCleanerBase.

Definition at line 7 of file ECALPFSeedCleaner.cc.

References reco::PFRecHit::detId(), reco::PFRecHit::energy(), hfClusterShapes_cfi::hits, mps_fire::i, training_settings::idx, input, and electronIdCutBased_cfi::threshold.

7  {
8  //need to run over energy sorted rechits, as this is order used in seeding step
9  // this can cause ambiguity, isn't it better to index by detid ?
10  auto const& hits = *input;
11  std::vector<unsigned> ordered_hits(hits.size());
12  for (unsigned i = 0; i < hits.size(); ++i)
13  ordered_hits[i] = i;
14 
15  std::sort(ordered_hits.begin(), ordered_hits.end(), [&](unsigned i, unsigned j) {
16  return hits[i].energy() > hits[j].energy();
17  });
18 
19  for (const auto& idx : ordered_hits) {
20  if (!mask[idx])
21  continue; // is it useful ?
22  const reco::PFRecHit& rechit = hits[idx];
23 
24  float threshold = (*ths_)[rechit.detId()];
25  if (rechit.energy() < threshold)
26  mask[idx] = false;
27 
28  } // rechit loop
29 }
unsigned detId() const
rechit detId
Definition: PFRecHit.h:93
static std::string const input
Definition: EdmProvDump.cc:48
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
Definition: PFRecHit.h:31
float energy() const
rechit energy
Definition: PFRecHit.h:99
ECALPFSeedCleaner& ECALPFSeedCleaner::operator= ( const ECALPFSeedCleaner )
delete
void ECALPFSeedCleaner::update ( const edm::EventSetup iSetup)
overridevirtual

Reimplemented from RecHitTopologicalCleanerBase.

Definition at line 5 of file ECALPFSeedCleaner.cc.

References edm::EventSetup::get(), and ths_.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.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(), MatrixUtil.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().

5 { iSetup.get<EcalPFSeedingThresholdsRcd>().get(ths_); }
edm::ESHandle< EcalPFSeedingThresholds > ths_
T get() const
Definition: EventSetup.h:71

Member Data Documentation

edm::ESHandle<EcalPFSeedingThresholds> ECALPFSeedCleaner::ths_
private

Definition at line 19 of file ECALPFSeedCleaner.h.

Referenced by update().