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
 
edm::Handle< edmNew::DetSetVector< SiPixelCluster > > & handle ()
 
const edm::Handle< edmNew::DetSetVector< SiPixelCluster > > & handle () const
 
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 ()
 
void setEmpty (int i)
 
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 323 of file TkMeasurementDetSet.h.

Member Typedef Documentation

◆ BadFEDChannelPositions

Definition at line 327 of file TkMeasurementDetSet.h.

◆ PixelDetSet

Definition at line 326 of file TkMeasurementDetSet.h.

◆ SiPixelClusterRef

Definition at line 325 of file TkMeasurementDetSet.h.

Constructor & Destructor Documentation

◆ PxMeasurementDetSet()

PxMeasurementDetSet::PxMeasurementDetSet ( const PxMeasurementConditionSet cond)
inline

Definition at line 329 of file TkMeasurementDetSet.h.

330  : conditionSet_(&cond), detSet_(cond.nDet()), empty_(cond.nDet(), true), activeThisEvent_(cond.nDet(), true) {}

Member Function Documentation

◆ addBadFEDChannelPositions()

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

Definition at line 369 of file TkMeasurementDetSet.h.

369  {
370  auto found = badFEDChannelPositionsSet_.find(i);
371  if (found == badFEDChannelPositionsSet_.end()) {
372  badFEDChannelPositionsSet_.emplace(i, positions);
373  } else {
374  found->second.insert(found->second.end(), positions.begin(), positions.end());
375  }
376  }

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

Referenced by MeasurementTrackerEventProducer::updatePixels().

◆ conditions()

const PxMeasurementConditionSet& PxMeasurementDetSet::conditions ( ) const
inline

Definition at line 332 of file TkMeasurementDetSet.h.

332 { return *conditionSet_; }

References conditionSet_.

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

◆ detSet()

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

Definition at line 387 of file TkMeasurementDetSet.h.

387 { return detSet_[i]; }

References detSet_, and mps_fire::i.

Referenced by update().

◆ empty()

bool PxMeasurementDetSet::empty ( int  i) const
inline

Definition at line 344 of file TkMeasurementDetSet.h.

344 { return empty_[i]; }

References empty_, and mps_fire::i.

◆ find()

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

Definition at line 337 of file TkMeasurementDetSet.h.

337 { return conditions().find(jd, i); }

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

Referenced by MeasurementTrackerEventProducer::updatePixels().

◆ getBadFEDChannelPositions()

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

Definition at line 363 of file TkMeasurementDetSet.h.

363  {
364  auto found = badFEDChannelPositionsSet_.find(i);
365  if (found == badFEDChannelPositionsSet_.end())
366  return nullptr;
367  return &(found->second);
368  }

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

◆ handle() [1/2]

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

Definition at line 386 of file TkMeasurementDetSet.h.

386 { return handle_; }

References handle_.

◆ handle() [2/2]

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

◆ id()

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

◆ isActive()

bool PxMeasurementDetSet::isActive ( int  i) const
inline

◆ nDet()

int PxMeasurementDetSet::nDet ( ) const
inline

Definition at line 335 of file TkMeasurementDetSet.h.

335 { return size(); }

References size().

◆ setActiveThisEvent() [1/2]

void PxMeasurementDetSet::setActiveThisEvent ( bool  active)
inline

Definition at line 361 of file TkMeasurementDetSet.h.

361 { std::fill(activeThisEvent_.begin(), activeThisEvent_.end(), active); }

References activeThisEvent_, and ntuplemaker::fill.

Referenced by MeasurementTrackerEventProducer::updatePixels().

◆ 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 380 of file TkMeasurementDetSet.h.

380  {
381  activeThisEvent_[i] = active;
382  if (!active)
383  empty_[i] = true;
384  }

References activeThisEvent_, empty_, and mps_fire::i.

◆ setEmpty() [1/2]

void PxMeasurementDetSet::setEmpty ( )
inline

Definition at line 356 of file TkMeasurementDetSet.h.

356  {
357  std::fill(empty_.begin(), empty_.end(), true);
358  std::fill(activeThisEvent_.begin(), activeThisEvent_.end(), true);
360  }

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

◆ setEmpty() [2/2]

void PxMeasurementDetSet::setEmpty ( int  i)
inline

Definition at line 347 of file TkMeasurementDetSet.h.

347  {
348  empty_[i] = true;
349  activeThisEvent_[i] = true;
350  auto found = badFEDChannelPositionsSet_.find(i);
351  if (found != badFEDChannelPositionsSet_.end()) {
353  }
354  }

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

Referenced by MeasurementTrackerEventProducer::updatePixels().

◆ 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 390 of file TkMeasurementDetSet.h.

Member Data Documentation

◆ activeThisEvent_

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

Definition at line 400 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 392 of file TkMeasurementDetSet.h.

Referenced by conditions().

◆ detSet_

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

Definition at line 398 of file TkMeasurementDetSet.h.

Referenced by detSet(), and update().

◆ empty_

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

Definition at line 399 of file TkMeasurementDetSet.h.

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

◆ handle_

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

Definition at line 395 of file TkMeasurementDetSet.h.

Referenced by handle().

mps_fire.i
i
Definition: mps_fire.py:355
PxMeasurementDetSet::size
int size() const
Definition: TkMeasurementDetSet.h:334
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
PxMeasurementDetSet::handle_
edm::Handle< edmNew::DetSetVector< SiPixelCluster > > handle_
Definition: TkMeasurementDetSet.h:395
PxMeasurementConditionSet::id
unsigned int id(int i) const
Definition: TkMeasurementDetSet.h:302
PxMeasurementConditionSet::find
int find(unsigned int jd, int i=0) const
Definition: TkMeasurementDetSet.h:303
PxMeasurementDetSet::empty_
std::vector< bool > empty_
Definition: TkMeasurementDetSet.h:399
PxMeasurementDetSet::conditions
const PxMeasurementConditionSet & conditions() const
Definition: TkMeasurementDetSet.h:332
PxMeasurementDetSet::badFEDChannelPositionsSet_
std::unordered_map< int, BadFEDChannelPositions > badFEDChannelPositionsSet_
Definition: TkMeasurementDetSet.h:401
cond
Definition: plugin.cc:23
ntuplemaker.fill
fill
Definition: ntuplemaker.py:304
PxMeasurementConditionSet::nDet
int nDet() const
Definition: TkMeasurementDetSet.h:301
PxMeasurementDetSet::activeThisEvent_
std::vector< bool > activeThisEvent_
Definition: TkMeasurementDetSet.h:400
PxMeasurementDetSet::conditionSet_
const PxMeasurementConditionSet * conditionSet_
Definition: TkMeasurementDetSet.h:392
PxMeasurementDetSet::detSet_
std::vector< PixelDetSet > detSet_
Definition: TkMeasurementDetSet.h:398
PxMeasurementConditionSet::isActiveThisPeriod
bool isActiveThisPeriod(int i) const
Definition: TkMeasurementDetSet.h:306
PxMeasurementDetSet::detSet
const PixelDetSet & detSet(int i) const
Definition: TkMeasurementDetSet.h:387