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::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_
float(reco::ElectronSeed::* func_)(size_t) const
def move(src, dest)
Definition: eostools.py:511
PixelData::PixelData ( PixelData &&  rhs)
default

Member Function Documentation

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

Definition at line 71 of file EgammaHLTPixelMatchVarProducer.cc.

References funct::abs(), func_, reco::ElectronSeed::hitInfo(), hitNr_, 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
const std::vector< PMVars > & hitInfo() const
Definition: ElectronSeed.h:102
float(reco::ElectronSeed::* func_)(size_t) const
void PixelData::fill ( const reco::RecoEcalCandidateRef candRef)
inline

Definition at line 80 of file EgammaHLTPixelMatchVarProducer.cc.

References SiStripPI::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_
void PixelData::putInto ( edm::Event event)
inline

Definition at line 87 of file EgammaHLTPixelMatchVarProducer.cc.

References hitNr_, eostools::move(), name_, 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  }
std::unique_ptr< reco::RecoEcalCandidateIsolationMap > valInfoMap_
std::unique_ptr< reco::RecoEcalCandidateIsolationMap > valMap_
def move(src, dest)
Definition: eostools.py:511
void PixelData::resetVal ( )
inline

Member Data Documentation

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

Definition at line 97 of file EgammaHLTPixelMatchVarProducer.cc.

Referenced by fill().

size_t PixelData::hitNr_
private

Definition at line 96 of file EgammaHLTPixelMatchVarProducer.cc.

Referenced by fill(), and putInto().

std::string PixelData::name_
private

Definition at line 95 of file EgammaHLTPixelMatchVarProducer.cc.

Referenced by putInto().

float PixelData::val_
private

Definition at line 98 of file EgammaHLTPixelMatchVarProducer.cc.

Referenced by fill(), and resetVal().

float PixelData::valInfo_
private

Definition at line 99 of file EgammaHLTPixelMatchVarProducer.cc.

Referenced by fill(), and resetVal().

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

Definition at line 94 of file EgammaHLTPixelMatchVarProducer.cc.

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

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

Definition at line 93 of file EgammaHLTPixelMatchVarProducer.cc.

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