CMS 3D CMS Logo

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< disabledModuleTypegetBadComponentList () 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() [1/2]

SiPixelQuality::SiPixelQuality ( )
inline

Definition at line 60 of file SiPixelQuality.h.

60 : theDisabledModules(0) { ; }
std::vector< disabledModuleType > theDisabledModules

◆ SiPixelQuality() [2/2]

SiPixelQuality::SiPixelQuality ( std::vector< disabledModuleType > &  disabledModules)
inline

Definition at line 63 of file SiPixelQuality.h.

63 : theDisabledModules(disabledModules) { ; }
std::vector< disabledModuleType > theDisabledModules

◆ ~SiPixelQuality()

virtual SiPixelQuality::~SiPixelQuality ( )
inlinevirtual

Definition at line 65 of file SiPixelQuality.h.

65 { ; }

Member Function Documentation

◆ add()

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._TaskBase::remove(), and SequenceTypes._TaskBase::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

◆ addDisabledModule() [1/2]

void SiPixelQuality::addDisabledModule ( disabledModuleType  module)
inline

Definition at line 71 of file SiPixelQuality.h.

References theDisabledModules.

Referenced by SiPixelStatusHarvester::dqmEndRun().

71 { theDisabledModules.push_back(module); }
std::vector< disabledModuleType > theDisabledModules

◆ addDisabledModule() [2/2]

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

◆ BadModuleNumber()

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

◆ getBadComponentList()

const std::vector<disabledModuleType> SiPixelQuality::getBadComponentList ( ) const
inline

◆ getBadRocPositions()

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, mps_fire::i, sipixelobjects::PixelROC::idInDetUnit(), TrackerGeometry::idToDet(), DTRecHitClients_cfi::local, Topology::localPosition(), genParticles_cff::map, castor_dqm_sourceclient_file_cfg::path, sipixelobjects::GlobalPixel::row, PixelGeomDetUnit::specificTopology(), and sipixelobjects::PixelROC::toGlobal().

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 }
bool IsRocBad(const uint32_t &detid, const short &rocNb) const
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
identify pixel inside single ROC
Definition: LocalPixel.h:7
global coordinates (row and column in DetUnit, as in PixelDigi)
Definition: GlobalPixel.h:6
GlobalPixel toGlobal(const LocalPixel &loc) const
Definition: PixelROC.h:55
std::vector< LinkConnSpec >::const_iterator IT
const TrackerGeomDet * idToDet(DetId) const override
row and collumn in ROC representation
Definition: LocalPixel.h:13
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
unsigned int idInDetUnit() const
id of this ROC in DetUnit etermined by token path
Definition: PixelROC.h:37

◆ getBadRocs()

short SiPixelQuality::getBadRocs ( const uint32_t &  detid) const

Definition at line 122 of file SiPixelQuality.cc.

References pfDeepBoostedJetPreprocessParams_cfi::lower_bound, and jetUpdater_cfi::sort.

Referenced by SiPixelBadModuleReader::analyze(), 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

◆ IsFedBad()

bool SiPixelQuality::IsFedBad ( const uint32_t &  detid) const
private

Definition at line 160 of file SiPixelQuality.cc.

160 { return false; }

◆ IsModuleBad()

bool SiPixelQuality::IsModuleBad ( const uint32_t &  detid) const

Definition at line 93 of file SiPixelQuality.cc.

References pfDeepBoostedJetPreprocessParams_cfi::lower_bound, and jetUpdater_cfi::sort.

Referenced by SiPixelBadModuleReader::analyze(), MCMisalignmentScaler::analyze(), PixelBaryCentreAnalyzer::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

◆ IsModuleUsable()

bool SiPixelQuality::IsModuleUsable ( const uint32_t &  detid) const

Definition at line 74 of file SiPixelQuality.cc.

References pfDeepBoostedJetPreprocessParams_cfi::lower_bound, and jetUpdater_cfi::sort.

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

◆ IsRocBad()

bool SiPixelQuality::IsRocBad ( const uint32_t &  detid,
const short &  rocNb 
) const

Definition at line 107 of file SiPixelQuality.cc.

References pfDeepBoostedJetPreprocessParams_cfi::lower_bound, and jetUpdater_cfi::sort.

Referenced by SiPixelStatusHarvester::dqmEndRun(), PixelDataFormatter::interpretRawData(), 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

◆ serialize()

template<class Archive >
void SiPixelQuality::serialize ( Archive &  ar,
const unsigned int  version 
)
private

◆ setDisabledModuleList()

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

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 113 of file SiPixelQuality.h.

◆ cond::serialization::access

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

Definition at line 113 of file SiPixelQuality.h.

Member Data Documentation

◆ theDisabledModules

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

Definition at line 110 of file SiPixelQuality.h.

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