CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes | Friends
PxMeasurementDetSet Class Reference

#include <TkMeasurementDetSet.h>

Public Types

typedef std::vector< std::pair< LocalPoint, LocalPoint > > BadFEDChannelPositions
 
typedef edmNew::DetSet< SiPixelClusterPixelDetSet
 
typedef edm::Ref< edmNew::DetSetVector< SiPixelCluster >, SiPixelClusterSiPixelClusterRef
 

Public Member Functions

void addBadFEDChannelPositions (int i, BadFEDChannelPositions &positions)
 
const PxMeasurementConditionSetconditions () const
 
const PixelDetSetdetSet (int i) const
 
bool empty (int i) const
 
int find (unsigned int jd, int i=0) const
 
const BadFEDChannelPositionsgetBadFEDChannelPositions (int i) const
 
const edm::Handle< edmNew::DetSetVector< SiPixelCluster > > & handle () const
 
edm::Handle< edmNew::DetSetVector< SiPixelCluster > > & handle ()
 
unsigned int id (int i) const
 
bool isActive (int i) const
 
int nDet () const
 
 PxMeasurementDetSet (const PxMeasurementConditionSet &cond)
 
void setActiveThisEvent (bool active)
 
void setActiveThisEvent (int i, bool active)
 Turn on/off the module for reconstruction for one events. This per-event flag is cleared by any call to 'update' or 'setEmpty'. More...
 
void setEmpty (int i)
 
void setEmpty ()
 
int size () const
 
void update (int i, const PixelDetSet &detSet)
 

Private Attributes

std::vector< bool > activeThisEvent_
 
std::unordered_map< int, BadFEDChannelPositionsbadFEDChannelPositionsSet_
 
const PxMeasurementConditionSetconditionSet_
 
std::vector< PixelDetSetdetSet_
 
std::vector< bool > empty_
 
edm::Handle< edmNew::DetSetVector< SiPixelCluster > > handle_
 

Friends

class MeasurementTrackerImpl
 

Detailed Description

Definition at line 344 of file TkMeasurementDetSet.h.

Member Typedef Documentation

◆ BadFEDChannelPositions

Definition at line 348 of file TkMeasurementDetSet.h.

◆ PixelDetSet

Definition at line 347 of file TkMeasurementDetSet.h.

◆ SiPixelClusterRef

Definition at line 346 of file TkMeasurementDetSet.h.

Constructor & Destructor Documentation

◆ PxMeasurementDetSet()

PxMeasurementDetSet::PxMeasurementDetSet ( const PxMeasurementConditionSet cond)
inline

Definition at line 350 of file TkMeasurementDetSet.h.

351  : conditionSet_(&cond), detSet_(cond.nDet()), empty_(cond.nDet(), true), activeThisEvent_(cond.nDet(), true) {}
const PxMeasurementConditionSet * conditionSet_
std::vector< bool > empty_
Definition: plugin.cc:23
std::vector< bool > activeThisEvent_
std::vector< PixelDetSet > detSet_

Member Function Documentation

◆ addBadFEDChannelPositions()

void PxMeasurementDetSet::addBadFEDChannelPositions ( int  i,
BadFEDChannelPositions positions 
)
inline

Definition at line 390 of file TkMeasurementDetSet.h.

References badFEDChannelPositionsSet_, newFWLiteAna::found, and mps_fire::i.

Referenced by MeasurementTrackerEventProducer::updatePixels().

390  {
391  auto found = badFEDChannelPositionsSet_.find(i);
392  if (found == badFEDChannelPositionsSet_.end()) {
393  badFEDChannelPositionsSet_.emplace(i, positions);
394  } else {
395  found->second.insert(found->second.end(), positions.begin(), positions.end());
396  }
397  }
std::unordered_map< int, BadFEDChannelPositions > badFEDChannelPositionsSet_

◆ conditions()

const PxMeasurementConditionSet& PxMeasurementDetSet::conditions ( ) const
inline

Definition at line 353 of file TkMeasurementDetSet.h.

References conditionSet_.

Referenced by find(), id(), isActive(), and size().

353 { return *conditionSet_; }
const PxMeasurementConditionSet * conditionSet_

◆ detSet()

const PixelDetSet& PxMeasurementDetSet::detSet ( int  i) const
inline

Definition at line 408 of file TkMeasurementDetSet.h.

References detSet_, and mps_fire::i.

Referenced by update().

408 { return detSet_[i]; }
std::vector< PixelDetSet > detSet_

◆ empty()

bool PxMeasurementDetSet::empty ( int  i) const
inline

Definition at line 365 of file TkMeasurementDetSet.h.

References empty_, and mps_fire::i.

365 { return empty_[i]; }
std::vector< bool > empty_

◆ find()

int PxMeasurementDetSet::find ( unsigned int  jd,
int  i = 0 
) const
inline

Definition at line 358 of file TkMeasurementDetSet.h.

References conditions(), PxMeasurementConditionSet::find(), and mps_fire::i.

Referenced by MeasurementTrackerEventProducer::updatePixels().

358 { return conditions().find(jd, i); }
int find(unsigned int jd, int i=0) const
const PxMeasurementConditionSet & conditions() const

◆ getBadFEDChannelPositions()

const BadFEDChannelPositions* PxMeasurementDetSet::getBadFEDChannelPositions ( int  i) const
inline

Definition at line 384 of file TkMeasurementDetSet.h.

References badFEDChannelPositionsSet_, newFWLiteAna::found, and mps_fire::i.

384  {
385  auto found = badFEDChannelPositionsSet_.find(i);
386  if (found == badFEDChannelPositionsSet_.end())
387  return nullptr;
388  return &(found->second);
389  }
std::unordered_map< int, BadFEDChannelPositions > badFEDChannelPositionsSet_

◆ handle() [1/2]

const edm::Handle<edmNew::DetSetVector<SiPixelCluster> >& PxMeasurementDetSet::handle ( ) const
inline

Definition at line 406 of file TkMeasurementDetSet.h.

References handle_.

Referenced by MeasurementTrackerEvent::MeasurementTrackerEvent(), and MeasurementTrackerEventProducer::updatePixels().

406 { return handle_; }
edm::Handle< edmNew::DetSetVector< SiPixelCluster > > handle_

◆ handle() [2/2]

edm::Handle<edmNew::DetSetVector<SiPixelCluster> >& PxMeasurementDetSet::handle ( )
inline

Definition at line 407 of file TkMeasurementDetSet.h.

References handle_.

407 { return handle_; }
edm::Handle< edmNew::DetSetVector< SiPixelCluster > > handle_

◆ id()

unsigned int PxMeasurementDetSet::id ( int  i) const
inline

Definition at line 357 of file TkMeasurementDetSet.h.

References conditions(), mps_fire::i, and PxMeasurementConditionSet::id().

Referenced by MeasurementTrackerEventProducer::updatePixels().

357 { return conditions().id(i); }
unsigned int id(int i) const
const PxMeasurementConditionSet & conditions() const

◆ isActive()

bool PxMeasurementDetSet::isActive ( int  i) const
inline

◆ nDet()

int PxMeasurementDetSet::nDet ( ) const
inline

Definition at line 356 of file TkMeasurementDetSet.h.

References size().

356 { return size(); }

◆ setActiveThisEvent() [1/2]

void PxMeasurementDetSet::setActiveThisEvent ( bool  active)
inline

Definition at line 382 of file TkMeasurementDetSet.h.

References activeThisEvent_, and ntuplemaker::fill.

Referenced by MeasurementTrackerEventProducer::updatePixels().

382 { std::fill(activeThisEvent_.begin(), activeThisEvent_.end(), active); }
std::vector< bool > activeThisEvent_

◆ setActiveThisEvent() [2/2]

void PxMeasurementDetSet::setActiveThisEvent ( int  i,
bool  active 
)
inline

Turn on/off the module for reconstruction for one events. This per-event flag is cleared by any call to 'update' or 'setEmpty'.

Definition at line 401 of file TkMeasurementDetSet.h.

References activeThisEvent_, empty_, and mps_fire::i.

401  {
402  activeThisEvent_[i] = active;
403  if (!active)
404  empty_[i] = true;
405  }
std::vector< bool > empty_
std::vector< bool > activeThisEvent_

◆ setEmpty() [1/2]

void PxMeasurementDetSet::setEmpty ( int  i)
inline

Definition at line 368 of file TkMeasurementDetSet.h.

References activeThisEvent_, badFEDChannelPositionsSet_, empty_, newFWLiteAna::found, and mps_fire::i.

Referenced by MeasurementTrackerEventProducer::updatePixels().

368  {
369  empty_[i] = true;
370  activeThisEvent_[i] = true;
371  auto found = badFEDChannelPositionsSet_.find(i);
372  if (found != badFEDChannelPositionsSet_.end()) {
374  }
375  }
std::vector< bool > empty_
std::vector< bool > activeThisEvent_
std::unordered_map< int, BadFEDChannelPositions > badFEDChannelPositionsSet_

◆ setEmpty() [2/2]

void PxMeasurementDetSet::setEmpty ( )
inline

Definition at line 377 of file TkMeasurementDetSet.h.

References activeThisEvent_, badFEDChannelPositionsSet_, empty_, and ntuplemaker::fill.

377  {
378  std::fill(empty_.begin(), empty_.end(), true);
379  std::fill(activeThisEvent_.begin(), activeThisEvent_.end(), true);
381  }
std::vector< bool > empty_
std::vector< bool > activeThisEvent_
std::unordered_map< int, BadFEDChannelPositions > badFEDChannelPositionsSet_

◆ size()

int PxMeasurementDetSet::size ( void  ) const
inline

◆ update()

void PxMeasurementDetSet::update ( int  i,
const PixelDetSet detSet 
)
inline

Friends And Related Function Documentation

◆ MeasurementTrackerImpl

friend class MeasurementTrackerImpl
friend

Definition at line 411 of file TkMeasurementDetSet.h.

Member Data Documentation

◆ activeThisEvent_

std::vector<bool> PxMeasurementDetSet::activeThisEvent_
private

Definition at line 421 of file TkMeasurementDetSet.h.

Referenced by isActive(), setActiveThisEvent(), and setEmpty().

◆ badFEDChannelPositionsSet_

std::unordered_map<int, BadFEDChannelPositions> PxMeasurementDetSet::badFEDChannelPositionsSet_
private

◆ conditionSet_

const PxMeasurementConditionSet* PxMeasurementDetSet::conditionSet_
private

Definition at line 413 of file TkMeasurementDetSet.h.

Referenced by conditions().

◆ detSet_

std::vector<PixelDetSet> PxMeasurementDetSet::detSet_
private

Definition at line 419 of file TkMeasurementDetSet.h.

Referenced by detSet(), and update().

◆ empty_

std::vector<bool> PxMeasurementDetSet::empty_
private

Definition at line 420 of file TkMeasurementDetSet.h.

Referenced by empty(), setActiveThisEvent(), setEmpty(), and update().

◆ handle_

edm::Handle<edmNew::DetSetVector<SiPixelCluster> > PxMeasurementDetSet::handle_
private

Definition at line 416 of file TkMeasurementDetSet.h.

Referenced by handle().