CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
HFPreRecHitSortedTable Class Reference

#include <HFPreRecHitSortedTable.h>

Public Member Functions

void add (const HFPreRecHitCollection::const_iterator itPreRecHit)
 
 HFPreRecHitSortedTable (const std::vector< HcalDetId > &dids)
 
void reset ()
 

Public Attributes

std::vector< int > chargeAsymmetries_
 
std::vector< int > charges_
 
std::map< HcalDetId, unsigned int > did_indexmap_
 
std::vector< HcalDetIddids_
 
std::vector< bool > valids_
 

Detailed Description

Definition at line 18 of file HFPreRecHitSortedTable.h.

Constructor & Destructor Documentation

◆ HFPreRecHitSortedTable()

HFPreRecHitSortedTable::HFPreRecHitSortedTable ( const std::vector< HcalDetId > &  dids)

Definition at line 3 of file HFPreRecHitSortedTable.cc.

References chargeAsymmetries_, charges_, did_indexmap_, dids_, createfilelist::int, and valids_.

3  {
4  dids_ = dids;
5  for (std::vector<HcalDetId>::const_iterator it_did = dids_.begin(); it_did != dids_.end(); ++it_did) {
6  did_indexmap_[*it_did] = (unsigned int)(it_did - dids_.begin());
7  }
8 
9  charges_.resize(dids_.size());
10  chargeAsymmetries_.resize(dids_.size());
11  valids_.resize(dids_.size());
12 }
std::vector< bool > valids_
std::vector< HcalDetId > dids_
std::vector< int > chargeAsymmetries_
std::map< HcalDetId, unsigned int > did_indexmap_

Member Function Documentation

◆ add()

void HFPreRecHitSortedTable::add ( const HFPreRecHitCollection::const_iterator  itPreRecHit)

Definition at line 14 of file HFPreRecHitSortedTable.cc.

References chargeAsymmetries_, charges_, did_indexmap_, and valids_.

Referenced by counter.Counter::register(), SequenceTypes._TaskBase::remove(), and SequenceTypes._TaskBase::replace().

14  {
15  HcalDetId did = itPreRecHit->id();
16  unsigned int index = did_indexmap_.at(did);
17 
18  charges_[index] = itPreRecHit->charge();
20  itPreRecHit->chargeAsymmetry(0.).first; // chargeAsymmetry() returns std::pair<float qAsym, bool passCut>
21  valids_[index] = true;
22 }
std::vector< bool > valids_
std::vector< int > chargeAsymmetries_
std::map< HcalDetId, unsigned int > did_indexmap_

◆ reset()

void HFPreRecHitSortedTable::reset ( void  )

Member Data Documentation

◆ chargeAsymmetries_

std::vector<int> HFPreRecHitSortedTable::chargeAsymmetries_

Definition at line 24 of file HFPreRecHitSortedTable.h.

Referenced by add(), HFPreRecHitSortedTable(), and reset().

◆ charges_

std::vector<int> HFPreRecHitSortedTable::charges_

Definition at line 23 of file HFPreRecHitSortedTable.h.

Referenced by add(), HFPreRecHitSortedTable(), and reset().

◆ did_indexmap_

std::map<HcalDetId, unsigned int> HFPreRecHitSortedTable::did_indexmap_

Definition at line 21 of file HFPreRecHitSortedTable.h.

Referenced by add(), and HFPreRecHitSortedTable().

◆ dids_

std::vector<HcalDetId> HFPreRecHitSortedTable::dids_

Definition at line 20 of file HFPreRecHitSortedTable.h.

Referenced by HFPreRecHitSortedTable().

◆ valids_

std::vector<bool> HFPreRecHitSortedTable::valids_

Definition at line 25 of file HFPreRecHitSortedTable.h.

Referenced by add(), HFPreRecHitSortedTable(), and reset().