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 156 of file SiStripHitEfficiencyWorker.cc.

Constructor & Destructor Documentation

◆ EffTkMap() [1/2]

SiStripHitEfficiencyWorker::EffTkMap::EffTkMap ( )
inline

Definition at line 157 of file SiStripHitEfficiencyWorker.cc.

157 : 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 168 of file SiStripHitEfficiencyWorker.cc.

References hFound, and hTotal.

Referenced by SiStripHitEfficiencyWorker::fillForTraj().

168  {
169  if (hTotal->getValue(id) < hFound->getValue(id)) {
170  return false;
171  } else {
172  return true;
173  }
174  }

◆ fill()

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

Definition at line 161 of file SiStripHitEfficiencyWorker.cc.

References newFWLiteAna::found, hFound, and hTotal.

Referenced by SiStripHitEfficiencyWorker::fillForTraj().

161  {
162  hTotal->fill(id, weight);
163  if (found) {
164  hFound->fill(id, weight);
165  }
166  }
Definition: weight.py:1

Member Data Documentation

◆ hFound

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

Definition at line 176 of file SiStripHitEfficiencyWorker.cc.

Referenced by check(), and fill().

◆ hTotal

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

Definition at line 176 of file SiStripHitEfficiencyWorker.cc.

Referenced by check(), and fill().