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

References valInfoMap_, and valMap_.

59  :
60  name_(std::move(name)),hitNr_(hitNr),func_(func),
62  valInfo_(0)
63  {
64  valMap_=std::make_unique<reco::RecoEcalCandidateIsolationMap>(candHandle);
65  valInfoMap_=std::make_unique<reco::RecoEcalCandidateIsolationMap>(candHandle);
66  }
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:510
PixelData::PixelData ( PixelData &&  rhs)
default

Member Function Documentation

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

Definition at line 70 of file EgammaHLTPixelMatchVarProducer.cc.

References funct::abs(), func_, reco::ElectronSeed::hitInfo(), hitNr_, val_, and valInfo_.

70  {
71  if(hitNr_<seed.hitInfo().size()){
72  float seedVal = (seed.*func_)(hitNr_);
73  if(std::abs(seedVal) < std::abs(val_) ){
74  val_ = seedVal;
75  valInfo_ = makeSeedInfo(seed);
76  }
77  }
78  }
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 79 of file EgammaHLTPixelMatchVarProducer.cc.

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

79  {
80  valMap_->insert(candRef,val_);
81  valInfoMap_->insert(candRef,valInfo_);
83  valInfo_ = 0;
84  }
std::unique_ptr< reco::RecoEcalCandidateIsolationMap > valInfoMap_
std::unique_ptr< reco::RecoEcalCandidateIsolationMap > valMap_
void PixelData::putInto ( edm::Event event)
inline

Definition at line 86 of file EgammaHLTPixelMatchVarProducer.cc.

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

86  {
87  event.put(std::move(valMap_),name_+std::to_string(hitNr_+1));
88  event.put(std::move(valInfoMap_),name_+std::to_string(hitNr_+1)+"Info");
89  }
std::unique_ptr< reco::RecoEcalCandidateIsolationMap > valInfoMap_
std::unique_ptr< reco::RecoEcalCandidateIsolationMap > valMap_
def move(src, dest)
Definition: eostools.py:510
void PixelData::resetVal ( )
inline

Member Data Documentation

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

Definition at line 96 of file EgammaHLTPixelMatchVarProducer.cc.

Referenced by fill().

size_t PixelData::hitNr_
private

Definition at line 95 of file EgammaHLTPixelMatchVarProducer.cc.

Referenced by fill(), and putInto().

std::string PixelData::name_
private

Definition at line 94 of file EgammaHLTPixelMatchVarProducer.cc.

Referenced by putInto().

float PixelData::val_
private

Definition at line 97 of file EgammaHLTPixelMatchVarProducer.cc.

Referenced by fill(), and resetVal().

float PixelData::valInfo_
private

Definition at line 98 of file EgammaHLTPixelMatchVarProducer.cc.

Referenced by fill(), and resetVal().

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

Definition at line 93 of file EgammaHLTPixelMatchVarProducer.cc.

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

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

Definition at line 92 of file EgammaHLTPixelMatchVarProducer.cc.

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