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 72 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 74 of file EgammaHLTPixelMatchVarProducer.cc.

References valInfoMap_, and valMap_.

79  valMap_ = std::make_unique<reco::RecoEcalCandidateIsolationMap>(candHandle);
80  valInfoMap_ = std::make_unique<reco::RecoEcalCandidateIsolationMap>(candHandle);
81  }
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 88 of file EgammaHLTPixelMatchVarProducer.cc.

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

88  {
89  if (hitNr_ < seed.hitInfo().size()) {
90  float seedVal = (seed.*func_)(hitNr_);
91  if (std::abs(seedVal) < std::abs(val_)) {
92  val_ = seedVal;
93  valInfo_ = makeSeedInfo(seed);
94  }
95  }
96  }
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 97 of file EgammaHLTPixelMatchVarProducer.cc.

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

97  {
98  valMap_->insert(candRef, val_);
99  valInfoMap_->insert(candRef, valInfo_);
101  valInfo_ = 0;
102  }
std::unique_ptr< reco::RecoEcalCandidateIsolationMap > valInfoMap_
std::unique_ptr< reco::RecoEcalCandidateIsolationMap > valMap_

◆ putInto()

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

Definition at line 104 of file EgammaHLTPixelMatchVarProducer.cc.

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

104  {
105  event.put(std::move(valMap_), name_ + std::to_string(hitNr_ + 1));
106  event.put(std::move(valInfoMap_), name_ + std::to_string(hitNr_ + 1) + "Info");
107  }
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 114 of file EgammaHLTPixelMatchVarProducer.cc.

Referenced by fill().

◆ hitNr_

size_t PixelData::hitNr_
private

Definition at line 113 of file EgammaHLTPixelMatchVarProducer.cc.

Referenced by fill(), and putInto().

◆ name_

std::string PixelData::name_
private

Definition at line 112 of file EgammaHLTPixelMatchVarProducer.cc.

Referenced by putInto().

◆ val_

float PixelData::val_
private

Definition at line 115 of file EgammaHLTPixelMatchVarProducer.cc.

Referenced by fill(), and resetVal().

◆ valInfo_

float PixelData::valInfo_
private

Definition at line 116 of file EgammaHLTPixelMatchVarProducer.cc.

Referenced by fill(), and resetVal().

◆ valInfoMap_

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

Definition at line 111 of file EgammaHLTPixelMatchVarProducer.cc.

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

◆ valMap_

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

Definition at line 110 of file EgammaHLTPixelMatchVarProducer.cc.

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