CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
PixelData Struct Reference

Public Member Functions

void fill (const reco::ElectronSeed &seed)
 
void fill (const reco::RecoEcalCandidateRef &candRef)
 
 PixelData (std::string name, size_t hitNr, float(reco::ElectronSeed::*func)(size_t) const, const edm::Handle< reco::RecoEcalCandidateCollection > &candHandle)
 
 PixelData (PixelData &&rhs)=default
 
void putInto (edm::Event &event)
 
void resetVal ()
 

Private Attributes

float(reco::ElectronSeed::* func_ )(size_t) const
 
size_t hitNr_
 
std::string name_
 
float val_
 
float valInfo_
 
std::unique_ptr< reco::RecoEcalCandidateIsolationMapvalInfoMap_
 
std::unique_ptr< reco::RecoEcalCandidateIsolationMapvalMap_
 

Detailed Description

Definition at line 55 of file EgammaHLTPixelMatchVarProducer.cc.

Constructor & Destructor Documentation

◆ PixelData() [1/2]

PixelData::PixelData ( std::string  name,
size_t  hitNr,
float(reco::ElectronSeed::*)(size_t) const  func,
const edm::Handle< reco::RecoEcalCandidateCollection > &  candHandle 
)
inline

Definition at line 57 of file EgammaHLTPixelMatchVarProducer.cc.

References valInfoMap_, and valMap_.

62  valMap_ = std::make_unique<reco::RecoEcalCandidateIsolationMap>(candHandle);
63  valInfoMap_ = std::make_unique<reco::RecoEcalCandidateIsolationMap>(candHandle);
64  }
std::unique_ptr< reco::RecoEcalCandidateIsolationMap > valInfoMap_
std::unique_ptr< reco::RecoEcalCandidateIsolationMap > valMap_
def move(src, dest)
Definition: eostools.py:511
float(reco::ElectronSeed::* func_)(size_t) const

◆ PixelData() [2/2]

PixelData::PixelData ( PixelData &&  rhs)
default

Member Function Documentation

◆ fill() [1/2]

void PixelData::fill ( const reco::ElectronSeed seed)
inline

Definition at line 71 of file EgammaHLTPixelMatchVarProducer.cc.

References funct::abs(), func_, hitNr_, fileCollector::seed, val_, and valInfo_.

71  {
72  if (hitNr_ < seed.hitInfo().size()) {
73  float seedVal = (seed.*func_)(hitNr_);
74  if (std::abs(seedVal) < std::abs(val_)) {
75  val_ = seedVal;
76  valInfo_ = makeSeedInfo(seed);
77  }
78  }
79  }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
float(reco::ElectronSeed::* func_)(size_t) const

◆ fill() [2/2]

void PixelData::fill ( const reco::RecoEcalCandidateRef candRef)
inline

Definition at line 80 of file EgammaHLTPixelMatchVarProducer.cc.

References WZElectronSkims53X_cff::max, val_, valInfo_, valInfoMap_, and valMap_.

80  {
81  valMap_->insert(candRef, val_);
82  valInfoMap_->insert(candRef, valInfo_);
84  valInfo_ = 0;
85  }
std::unique_ptr< reco::RecoEcalCandidateIsolationMap > valInfoMap_
std::unique_ptr< reco::RecoEcalCandidateIsolationMap > valMap_

◆ putInto()

void PixelData::putInto ( edm::Event event)
inline

Definition at line 87 of file EgammaHLTPixelMatchVarProducer.cc.

References hitNr_, eostools::move(), name_, to_string(), valInfoMap_, and valMap_.

87  {
88  event.put(std::move(valMap_), name_ + std::to_string(hitNr_ + 1));
89  event.put(std::move(valInfoMap_), name_ + std::to_string(hitNr_ + 1) + "Info");
90  }
static std::string to_string(const XMLCh *ch)
std::unique_ptr< reco::RecoEcalCandidateIsolationMap > valInfoMap_
std::unique_ptr< reco::RecoEcalCandidateIsolationMap > valMap_
def move(src, dest)
Definition: eostools.py:511

◆ resetVal()

void PixelData::resetVal ( )
inline

Member Data Documentation

◆ func_

float(reco::ElectronSeed::* PixelData::func_) (size_t) const
private

Definition at line 97 of file EgammaHLTPixelMatchVarProducer.cc.

Referenced by fill().

◆ hitNr_

size_t PixelData::hitNr_
private

Definition at line 96 of file EgammaHLTPixelMatchVarProducer.cc.

Referenced by fill(), and putInto().

◆ name_

std::string PixelData::name_
private

Definition at line 95 of file EgammaHLTPixelMatchVarProducer.cc.

Referenced by putInto().

◆ val_

float PixelData::val_
private

Definition at line 98 of file EgammaHLTPixelMatchVarProducer.cc.

Referenced by fill(), and resetVal().

◆ valInfo_

float PixelData::valInfo_
private

Definition at line 99 of file EgammaHLTPixelMatchVarProducer.cc.

Referenced by fill(), and resetVal().

◆ valInfoMap_

std::unique_ptr<reco::RecoEcalCandidateIsolationMap> PixelData::valInfoMap_
private

Definition at line 94 of file EgammaHLTPixelMatchVarProducer.cc.

Referenced by fill(), PixelData(), and putInto().

◆ valMap_

std::unique_ptr<reco::RecoEcalCandidateIsolationMap> PixelData::valMap_
private

Definition at line 93 of file EgammaHLTPixelMatchVarProducer.cc.

Referenced by fill(), PixelData(), and putInto().