CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
SiStripHitEfficiencyWorker::EffTkMap Struct Reference

Public Member Functions

bool check (uint32_t id)
 
 EffTkMap ()
 
 EffTkMap (std::unique_ptr< TkHistoMap > &&total, std::unique_ptr< TkHistoMap > &&found)
 
void fill (uint32_t id, bool found, float weight=1.)
 

Public Attributes

std::unique_ptr< TkHistoMaphFound
 
std::unique_ptr< TkHistoMaphTotal
 

Detailed Description

Definition at line 153 of file SiStripHitEfficiencyWorker.cc.

Constructor & Destructor Documentation

◆ EffTkMap() [1/2]

SiStripHitEfficiencyWorker::EffTkMap::EffTkMap ( )
inline

Definition at line 154 of file SiStripHitEfficiencyWorker.cc.

154 : hTotal(nullptr), hFound(nullptr) {}

◆ EffTkMap() [2/2]

SiStripHitEfficiencyWorker::EffTkMap::EffTkMap ( std::unique_ptr< TkHistoMap > &&  total,
std::unique_ptr< TkHistoMap > &&  found 
)
inline

Member Function Documentation

◆ check()

bool SiStripHitEfficiencyWorker::EffTkMap::check ( uint32_t  id)
inline

Definition at line 165 of file SiStripHitEfficiencyWorker.cc.

References hFound, and hTotal.

Referenced by SiStripHitEfficiencyWorker::fillForTraj().

165  {
166  if (hTotal->getValue(id) < hFound->getValue(id)) {
167  return false;
168  } else {
169  return true;
170  }
171  }

◆ fill()

void SiStripHitEfficiencyWorker::EffTkMap::fill ( uint32_t  id,
bool  found,
float  weight = 1. 
)
inline

Definition at line 158 of file SiStripHitEfficiencyWorker.cc.

References newFWLiteAna::found, hFound, and hTotal.

Referenced by SiStripHitEfficiencyWorker::fillForTraj().

158  {
159  hTotal->fill(id, weight);
160  if (found) {
161  hFound->fill(id, weight);
162  }
163  }
Definition: weight.py:1

Member Data Documentation

◆ hFound

std::unique_ptr<TkHistoMap> SiStripHitEfficiencyWorker::EffTkMap::hFound

Definition at line 173 of file SiStripHitEfficiencyWorker.cc.

Referenced by check(), and fill().

◆ hTotal

std::unique_ptr<TkHistoMap> SiStripHitEfficiencyWorker::EffTkMap::hTotal

Definition at line 173 of file SiStripHitEfficiencyWorker.cc.

Referenced by check(), and fill().