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 (PixelData &&rhs)=default
 
 PixelData (std::string name, size_t hitNr, float(reco::ElectronSeed::*func)(size_t) const, const edm::Handle< reco::RecoEcalCandidateCollection > &candHandle)
 
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.

62  valMap_ = std::make_unique<reco::RecoEcalCandidateIsolationMap>(candHandle);
63  valInfoMap_ = std::make_unique<reco::RecoEcalCandidateIsolationMap>(candHandle);
64  }

References valInfoMap_, and valMap_.

◆ 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.

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  }

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

◆ fill() [2/2]

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

Definition at line 80 of file EgammaHLTPixelMatchVarProducer.cc.

80  {
81  valMap_->insert(candRef, val_);
82  valInfoMap_->insert(candRef, valInfo_);
84  valInfo_ = 0;
85  }

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

◆ putInto()

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

Definition at line 87 of file EgammaHLTPixelMatchVarProducer.cc.

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  }

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

◆ resetVal()

void PixelData::resetVal ( )
inline

Definition at line 67 of file EgammaHLTPixelMatchVarProducer.cc.

67  {
69  valInfo_ = 0;
70  }

References SiStripPI::max, val_, and valInfo_.

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().

PixelData::valMap_
std::unique_ptr< reco::RecoEcalCandidateIsolationMap > valMap_
Definition: EgammaHLTPixelMatchVarProducer.cc:93
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
TrackCollections2monitor_cff.func
func
Definition: TrackCollections2monitor_cff.py:359
PixelData::hitNr_
size_t hitNr_
Definition: EgammaHLTPixelMatchVarProducer.cc:96
eostools.move
def move(src, dest)
Definition: eostools.py:511
PixelData::valInfoMap_
std::unique_ptr< reco::RecoEcalCandidateIsolationMap > valInfoMap_
Definition: EgammaHLTPixelMatchVarProducer.cc:94
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
PixelData::val_
float val_
Definition: EgammaHLTPixelMatchVarProducer.cc:98
PixelData::name_
std::string name_
Definition: EgammaHLTPixelMatchVarProducer.cc:95
PixelData::valInfo_
float valInfo_
Definition: EgammaHLTPixelMatchVarProducer.cc:99
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
SurveyInfoScenario_cff.seed
seed
Definition: SurveyInfoScenario_cff.py:295
PixelData::func_
float(reco::ElectronSeed::* func_)(size_t) const
Definition: EgammaHLTPixelMatchVarProducer.cc:97