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 ECALPFSeedCleaner &)=delete
 
 ECALPFSeedCleaner (const edm::ParameterSet &conf)
 
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() [1/2]

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

Definition at line 3 of file ECALPFSeedCleaner.cc.

◆ ECALPFSeedCleaner() [2/2]

ECALPFSeedCleaner::ECALPFSeedCleaner ( const ECALPFSeedCleaner )
delete

Member Function Documentation

◆ clean()

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

Implements RecHitTopologicalCleanerBase.

Definition at line 7 of file ECALPFSeedCleaner.cc.

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 }

References reco::PFRecHit::detId(), reco::PFRecHit::energy(), hfClusterShapes_cfi::hits, mps_fire::i, heavyIonCSV_trainingSettings::idx, input, dqmiolumiharvest::j, jetUpdater_cfi::sort, and remoteMonitoring_LED_IterMethod_cfg::threshold.

◆ operator=()

ECALPFSeedCleaner& ECALPFSeedCleaner::operator= ( const ECALPFSeedCleaner )
delete

◆ update()

void ECALPFSeedCleaner::update ( const edm::EventSetup iSetup)
overridevirtual

Member Data Documentation

◆ ths_

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

Definition at line 19 of file ECALPFSeedCleaner.h.

Referenced by update().

mps_fire.i
i
Definition: mps_fire.py:428
input
static const std::string input
Definition: EdmProvDump.cc:48
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
reco::PFRecHit::energy
float energy() const
rechit energy
Definition: PFRecHit.h:99
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
EcalPFSeedingThresholdsRcd
Definition: EcalPFSeedingThresholdsRcd.h:5
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
ECALPFSeedCleaner::ths_
edm::ESHandle< EcalPFSeedingThresholds > ths_
Definition: ECALPFSeedCleaner.h:19
RecHitTopologicalCleanerBase::RecHitTopologicalCleanerBase
RecHitTopologicalCleanerBase(const edm::ParameterSet &conf)
Definition: RecHitTopologicalCleanerBase.h:14
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
get
#define get
reco::PFRecHit::detId
unsigned detId() const
rechit detId
Definition: PFRecHit.h:93
reco::PFRecHit
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
Definition: PFRecHit.h:31
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
remoteMonitoring_LED_IterMethod_cfg.threshold
threshold
Definition: remoteMonitoring_LED_IterMethod_cfg.py:430