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

References valInfoMap_, and valMap_.

57  :
58  name_(std::move(name)),hitNr_(hitNr),func_(func),
60  valInfo_(0)
61  {
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:510
PixelData::PixelData ( PixelData &&  rhs)
default

Member Function Documentation

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

Definition at line 68 of file EgammaHLTPixelMatchVarProducer.cc.

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

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

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

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

Definition at line 84 of file EgammaHLTPixelMatchVarProducer.cc.

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

84  {
85  event.put(std::move(valMap_),name_+std::to_string(hitNr_+1));
86  event.put(std::move(valInfoMap_),name_+std::to_string(hitNr_+1)+"Info");
87  }
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 94 of file EgammaHLTPixelMatchVarProducer.cc.

Referenced by fill().

size_t PixelData::hitNr_
private

Definition at line 93 of file EgammaHLTPixelMatchVarProducer.cc.

Referenced by fill(), and putInto().

std::string PixelData::name_
private

Definition at line 92 of file EgammaHLTPixelMatchVarProducer.cc.

Referenced by putInto().

float PixelData::val_
private

Definition at line 95 of file EgammaHLTPixelMatchVarProducer.cc.

Referenced by fill(), and resetVal().

float PixelData::valInfo_
private

Definition at line 96 of file EgammaHLTPixelMatchVarProducer.cc.

Referenced by fill(), and resetVal().

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

Definition at line 91 of file EgammaHLTPixelMatchVarProducer.cc.

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

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

Definition at line 90 of file EgammaHLTPixelMatchVarProducer.cc.

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