CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends
SiPixelQuality Class Reference

#include <SiPixelQuality.h>

Classes

class  BadComponentStrictWeakOrdering
 
struct  disabledModuleType
 

Public Member Functions

void add (const SiStripDetVOff *)
 
void addDisabledModule (disabledModuleType module)
 
void addDisabledModule (std::vector< disabledModuleType > &idVector)
 
int BadModuleNumber ()
 
const std::vector
< disabledModuleType
getBadComponentList () const
 
const std::vector< LocalPointgetBadRocPositions (const uint32_t &detid, const TrackerGeometry &theTracker, const SiPixelFedCabling *map) const
 
short getBadRocs (const uint32_t &detid) const
 
bool IsModuleBad (const uint32_t &detid) const
 
bool IsModuleUsable (const uint32_t &detid) const
 
bool IsRocBad (const uint32_t &detid, const short &rocNb) const
 
void setDisabledModuleList (std::vector< disabledModuleType > &disabledModules)
 
 SiPixelQuality ()
 
 SiPixelQuality (std::vector< disabledModuleType > &disabledModules)
 
virtual ~SiPixelQuality ()
 

Private Member Functions

bool IsFedBad (const uint32_t &detid) const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

std::vector< disabledModuleTypetheDisabledModules
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Definition at line 27 of file SiPixelQuality.h.

Constructor & Destructor Documentation

SiPixelQuality::SiPixelQuality ( )
inline

Definition at line 60 of file SiPixelQuality.h.

60 : theDisabledModules(0) { ; }
std::vector< disabledModuleType > theDisabledModules
SiPixelQuality::SiPixelQuality ( std::vector< disabledModuleType > &  disabledModules)
inline

Definition at line 63 of file SiPixelQuality.h.

63 : theDisabledModules(disabledModules) { ; }
std::vector< disabledModuleType > theDisabledModules
virtual SiPixelQuality::~SiPixelQuality ( )
inlinevirtual

Definition at line 65 of file SiPixelQuality.h.

65 { ; }

Member Function Documentation

void SiPixelQuality::add ( const SiStripDetVOff Voff)

Definition at line 46 of file SiPixelQuality.cc.

References SiPixelQuality::disabledModuleType::BadRocs, SiPixelQuality::disabledModuleType::DetID, SiPixelQuality::disabledModuleType::errorType, and SiStripDetVOff::getDetIds().

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

46  {
47  //Get vector of Voff dets
48  std::vector<uint32_t> vdets;
49  Voff->getDetIds(vdets);
50 
51  std::vector<uint32_t>::const_iterator iter = vdets.begin();
52  std::vector<uint32_t>::const_iterator iterEnd = vdets.end();
53 
54  for (; iter != iterEnd; ++iter) {
56  BadModule.DetID = *iter;
57  BadModule.errorType = 0;
58  BadModule.BadRocs = 65535; //NOTE: here all module is bad - no difference for half modules
59  if (IsModuleUsable(BadModule.DetID))
60  addDisabledModule(BadModule);
61  }
62 }
void addDisabledModule(disabledModuleType module)
void getDetIds(std::vector< uint32_t > &DetIds_) const
bool IsModuleUsable(const uint32_t &detid) const
void SiPixelQuality::addDisabledModule ( disabledModuleType  module)
inline

Definition at line 71 of file SiPixelQuality.h.

References theDisabledModules.

Referenced by SiPixelStatusHarvester::dqmEndRun(), and SiPixelFakeQualityESSource::produce().

71 { theDisabledModules.push_back(module); }
std::vector< disabledModuleType > theDisabledModules
tuple module
Definition: callgraph.py:69
void SiPixelQuality::addDisabledModule ( std::vector< disabledModuleType > &  idVector)

Definition at line 42 of file SiPixelQuality.cc.

42  {
43  theDisabledModules.insert(theDisabledModules.end(), idVector.begin(), idVector.end());
44 }
std::vector< disabledModuleType > theDisabledModules
int SiPixelQuality::BadModuleNumber ( )

Definition at line 86 of file SiPixelQuality.cc.

86  {
87  std::vector<SiPixelQuality::disabledModuleType> disabledModules = theDisabledModules;
88  //does not distinguish between partially dead or not
89  return disabledModules.size();
90 }
std::vector< disabledModuleType > theDisabledModules
const std::vector<disabledModuleType> SiPixelQuality::getBadComponentList ( ) const
inline
const std::vector< LocalPoint > SiPixelQuality::getBadRocPositions ( const uint32_t &  detid,
const TrackerGeometry theTracker,
const SiPixelFedCabling map 
) const

Definition at line 132 of file SiPixelQuality.cc.

References sipixelobjects::GlobalPixel::col, SiPixelFedCabling::findItem(), mps_fire::i, sipixelobjects::PixelROC::idInDetUnit(), TrackerGeometry::idToDet(), Topology::localPosition(), fed_dqm_sourceclient-live_cfg::path, SiPixelFedCabling::pathToDetUnit(), sipixelobjects::GlobalPixel::row, PixelGeomDetUnit::specificTopology(), and sipixelobjects::PixelROC::toGlobal().

Referenced by MeasurementTrackerImpl::initializePixelStatus().

134  {
135  std::vector<LocalPoint> badrocpositions(0);
136  for (unsigned int i = 0; i < 16; i++) {
137  if (IsRocBad(detid, i) == true) {
138  std::vector<CablingPathToDetUnit> path = map->pathToDetUnit(detid);
139  typedef std::vector<CablingPathToDetUnit>::const_iterator IT;
140  for (IT it = path.begin(); it != path.end(); ++it) {
141  const PixelROC* myroc = map->findItem(*it);
142  if (myroc->idInDetUnit() == i) {
143  LocalPixel::RocRowCol local = {39, 25}; //corresponding to center of ROC row, col
144  GlobalPixel global = myroc->toGlobal(LocalPixel(local));
145  const PixelGeomDetUnit* theGeomDet = dynamic_cast<const PixelGeomDetUnit*>(theTracker.idToDet(detid));
146 
147  PixelTopology const* topology = &(theGeomDet->specificTopology());
148 
149  MeasurementPoint thepoint(global.row, global.col);
150  LocalPoint localpoint = topology->localPosition(thepoint);
151  badrocpositions.push_back(localpoint);
152  break;
153  }
154  }
155  }
156  }
157  return badrocpositions;
158 }
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
virtual const sipixelobjects::PixelROC * findItem(const sipixelobjects::CablingPathToDetUnit &) const =0
virtual std::vector< sipixelobjects::CablingPathToDetUnit > pathToDetUnit(uint32_t rawDetId) const =0
bool IsRocBad(const uint32_t &detid, const short &rocNb) const
identify pixel inside single ROC
Definition: LocalPixel.h:7
global coordinates (row and column in DetUnit, as in PixelDigi)
Definition: GlobalPixel.h:6
unsigned int idInDetUnit() const
id of this ROC in DetUnit etermined by token path
Definition: PixelROC.h:37
std::vector< LinkConnSpec >::const_iterator IT
const TrackerGeomDet * idToDet(DetId) const override
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
row and collumn in ROC representation
Definition: LocalPixel.h:13
GlobalPixel toGlobal(const LocalPixel &loc) const
Definition: PixelROC.h:55
short SiPixelQuality::getBadRocs ( const uint32_t &  detid) const

Definition at line 122 of file SiPixelQuality.cc.

References cuda_std::lower_bound().

Referenced by SiPixelBadModuleReader::analyze(), MeasurementTrackerImpl::initializePixelStatus(), and SiPixelDigitizerAlgorithm::module_killing_DB().

122  {
123  std::vector<SiPixelQuality::disabledModuleType> disabledModules = theDisabledModules;
124  std::sort(disabledModules.begin(), disabledModules.end(), SiPixelQuality::BadComponentStrictWeakOrdering());
125  std::vector<disabledModuleType>::const_iterator iter = std::lower_bound(
126  disabledModules.begin(), disabledModules.end(), detid, SiPixelQuality::BadComponentStrictWeakOrdering());
127  if (iter != disabledModules.end() && iter->DetID == detid)
128  return iter->BadRocs;
129  return 0;
130 }
std::vector< disabledModuleType > theDisabledModules
__host__ __device__ constexpr RandomIt lower_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
bool SiPixelQuality::IsFedBad ( const uint32_t &  detid) const
private

Definition at line 160 of file SiPixelQuality.cc.

160 { return false; }
bool SiPixelQuality::IsModuleBad ( const uint32_t &  detid) const

Definition at line 93 of file SiPixelQuality.cc.

References cuda_std::lower_bound().

Referenced by SiPixelBadModuleReader::analyze(), PixelBaryCentreAnalyzer::analyze(), MCMisalignmentScaler::analyze(), and TrackerGeometryCompare::fillTree().

93  {
94  if (IsFedBad(detid))
95  return true;
96  std::vector<SiPixelQuality::disabledModuleType> disabledModules = theDisabledModules;
97  std::sort(disabledModules.begin(), disabledModules.end(), SiPixelQuality::BadComponentStrictWeakOrdering());
98  std::vector<disabledModuleType>::const_iterator iter = std::lower_bound(
99  disabledModules.begin(), disabledModules.end(), detid, SiPixelQuality::BadComponentStrictWeakOrdering());
100  //errorType 0 corresponds to "whole" dead module
101  if (iter != disabledModules.end() && iter->DetID == detid && iter->errorType == 0)
102  return true;
103  return false;
104 }
bool IsFedBad(const uint32_t &detid) const
std::vector< disabledModuleType > theDisabledModules
__host__ __device__ constexpr RandomIt lower_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
bool SiPixelQuality::IsModuleUsable ( const uint32_t &  detid) const

Definition at line 74 of file SiPixelQuality.cc.

References cuda_std::lower_bound().

Referenced by MeasurementTrackerImpl::initializePixelStatus().

74  {
75  if (IsFedBad(detid))
76  return true;
77  std::vector<SiPixelQuality::disabledModuleType> disabledModules = theDisabledModules;
78  std::sort(disabledModules.begin(), disabledModules.end(), SiPixelQuality::BadComponentStrictWeakOrdering());
79  std::vector<disabledModuleType>::const_iterator iter = std::lower_bound(
80  disabledModules.begin(), disabledModules.end(), detid, SiPixelQuality::BadComponentStrictWeakOrdering());
81  if (iter != disabledModules.end() && iter->DetID == detid && iter->errorType == 0)
82  return false;
83  return true;
84 }
bool IsFedBad(const uint32_t &detid) const
std::vector< disabledModuleType > theDisabledModules
__host__ __device__ constexpr RandomIt lower_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
bool SiPixelQuality::IsRocBad ( const uint32_t &  detid,
const short &  rocNb 
) const

Definition at line 107 of file SiPixelQuality.cc.

References cuda_std::lower_bound().

Referenced by SiPixelStatusHarvester::dqmEndRun(), PixelDataFormatter::interpretRawData(), Phase2TrackerDigitizerAlgorithm::module_killing_DB(), SiPixelDigitizerAlgorithm::module_killing_DB(), and SiPixelROCsStatusAndMappingWrapper::SiPixelROCsStatusAndMappingWrapper().

107  {
108  if (IsModuleBad(detid))
109  return true;
110  std::vector<SiPixelQuality::disabledModuleType> disabledModules = theDisabledModules;
111  std::sort(disabledModules.begin(), disabledModules.end(), SiPixelQuality::BadComponentStrictWeakOrdering());
112  std::vector<disabledModuleType>::const_iterator iter = std::lower_bound(
113  disabledModules.begin(), disabledModules.end(), detid, SiPixelQuality::BadComponentStrictWeakOrdering());
114  if (iter != disabledModules.end() && iter->DetID == detid) {
115  return ((iter->BadRocs >> rocNb) & 0x1);
116  }
117  return false;
118 }
bool IsModuleBad(const uint32_t &detid) const
std::vector< disabledModuleType > theDisabledModules
__host__ __device__ constexpr RandomIt lower_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
template<class Archive >
void SiPixelQuality::serialize ( Archive &  ar,
const unsigned int  version 
)
private
void SiPixelQuality::setDisabledModuleList ( std::vector< disabledModuleType > &  disabledModules)
inline

Definition at line 68 of file SiPixelQuality.h.

References theDisabledModules.

68 { theDisabledModules = disabledModules; }
std::vector< disabledModuleType > theDisabledModules

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 113 of file SiPixelQuality.h.

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 113 of file SiPixelQuality.h.

Member Data Documentation

std::vector<disabledModuleType> SiPixelQuality::theDisabledModules
private

Definition at line 110 of file SiPixelQuality.h.

Referenced by addDisabledModule(), getBadComponentList(), and setDisabledModuleList().