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 IsAreaBad (uint32_t detid, sipixelobjects::GlobalPixel global, const edm::EventSetup &es, const SiPixelFedCabling *map) 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 31 of file SiPixelQuality.h.

Constructor & Destructor Documentation

SiPixelQuality::SiPixelQuality ( )
inline

Definition at line 64 of file SiPixelQuality.h.

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

Definition at line 67 of file SiPixelQuality.h.

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

Definition at line 69 of file SiPixelQuality.h.

69 { ; }

Member Function Documentation

void SiPixelQuality::add ( const SiStripDetVOff Voff)

Definition at line 50 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().

50  {
51  //Get vector of Voff dets
52  std::vector<uint32_t> vdets;
53  Voff->getDetIds(vdets);
54 
55  std::vector<uint32_t>::const_iterator iter = vdets.begin();
56  std::vector<uint32_t>::const_iterator iterEnd = vdets.end();
57 
58  for (; iter != iterEnd; ++iter) {
60  BadModule.DetID = *iter;
61  BadModule.errorType = 0;
62  BadModule.BadRocs = 65535; //NOTE: here all module is bad - no difference for half modules
63  if (IsModuleUsable(BadModule.DetID))
64  addDisabledModule(BadModule);
65  }
66 }
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 75 of file SiPixelQuality.h.

References PVValHelper::add(), and genParticles_cff::map.

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

75 { theDisabledModules.push_back(module); }
std::vector< disabledModuleType > theDisabledModules
Definition: vlib.h:198
void SiPixelQuality::addDisabledModule ( std::vector< disabledModuleType > &  idVector)

Definition at line 46 of file SiPixelQuality.cc.

46  {
47  theDisabledModules.insert(theDisabledModules.end(), idVector.begin(), idVector.end());
48 }
std::vector< disabledModuleType > theDisabledModules
int SiPixelQuality::BadModuleNumber ( )

Definition at line 90 of file SiPixelQuality.cc.

90  {
91  std::vector<SiPixelQuality::disabledModuleType> disabledModules = theDisabledModules;
92  //does not distinguish between partially dead or not
93  return disabledModules.size();
94 }
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 148 of file SiPixelQuality.cc.

References sipixelobjects::GlobalPixel::col, SiPixelFedCabling::findItem(), mps_fire::i, sipixelobjects::PixelROC::idInDetUnit(), TrackerGeometry::idToDet(), DTRecHitClients_cfi::local, Topology::localPosition(), castor_dqm_sourceclient_file_cfg::path, SiPixelFedCabling::pathToDetUnit(), sipixelobjects::GlobalPixel::row, PixelGeomDetUnit::specificTopology(), sipixelobjects::PixelROC::toGlobal(), and ecaldqm::topology().

Referenced by MeasurementTrackerImpl::initializePixelStatus().

150  {
151  std::vector<LocalPoint> badrocpositions(0);
152  for (unsigned int i = 0; i < 16; i++) {
153  if (IsRocBad(detid, i) == true) {
154  std::vector<CablingPathToDetUnit> path = map->pathToDetUnit(detid);
155  typedef std::vector<CablingPathToDetUnit>::const_iterator IT;
156  for (IT it = path.begin(); it != path.end(); ++it) {
157  const PixelROC* myroc = map->findItem(*it);
158  if (myroc->idInDetUnit() == i) {
159  LocalPixel::RocRowCol local = {39, 25}; //corresponding to center of ROC row, col
160  GlobalPixel global = myroc->toGlobal(LocalPixel(local));
161  // edm::ESHandle<TrackerGeometry> geom;
162  // es.get<TrackerDigiGeometryRecord>().get( geom );
163  // const TrackerGeometry& theTracker(*geom);
164  const PixelGeomDetUnit* theGeomDet = dynamic_cast<const PixelGeomDetUnit*>(theTracker.idToDet(detid));
165 
166  PixelTopology const* topology = &(theGeomDet->specificTopology());
167 
168  MeasurementPoint thepoint(global.row, global.col);
169  LocalPoint localpoint = topology->localPosition(thepoint);
170  badrocpositions.push_back(localpoint);
171  break;
172  }
173  }
174  }
175  }
176  return badrocpositions;
177 }
virtual std::vector< sipixelobjects::CablingPathToDetUnit > pathToDetUnit(uint32_t rawDetId) const =0
CaloTopology const * topology(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
virtual const sipixelobjects::PixelROC * findItem(const sipixelobjects::CablingPathToDetUnit &) const =0
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
row and collumn in ROC representation
Definition: LocalPixel.h:13
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
const TrackerGeomDet * idToDet(DetId) const override
GlobalPixel toGlobal(const LocalPixel &loc) const
Definition: PixelROC.h:55
short SiPixelQuality::getBadRocs ( const uint32_t &  detid) const

Definition at line 138 of file SiPixelQuality.cc.

Referenced by MeasurementTrackerImpl::initializePixelStatus().

138  {
139  std::vector<SiPixelQuality::disabledModuleType> disabledModules = theDisabledModules;
140  std::sort(disabledModules.begin(), disabledModules.end(), SiPixelQuality::BadComponentStrictWeakOrdering());
141  std::vector<disabledModuleType>::const_iterator iter = std::lower_bound(
142  disabledModules.begin(), disabledModules.end(), detid, SiPixelQuality::BadComponentStrictWeakOrdering());
143  if (iter != disabledModules.end() && iter->DetID == detid)
144  return iter->BadRocs;
145  return 0;
146 }
std::vector< disabledModuleType > theDisabledModules
bool SiPixelQuality::IsAreaBad ( uint32_t  detid,
sipixelobjects::GlobalPixel  global,
const edm::EventSetup es,
const SiPixelFedCabling map 
) const

Definition at line 124 of file SiPixelQuality.cc.

References SiPixelFrameReverter::findRocInDet(), and IsRocBad().

127  {
128  SiPixelFrameReverter reverter(es, map);
129  int rocfromarea = -1;
130  rocfromarea = reverter.findRocInDet(detid, global);
131 
132  return SiPixelQuality::IsRocBad(detid, rocfromarea);
133  return false;
134 }
bool IsRocBad(const uint32_t &detid, const short &rocNb) const
bool SiPixelQuality::IsFedBad ( const uint32_t &  detid) const
private

Definition at line 179 of file SiPixelQuality.cc.

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

Definition at line 97 of file SiPixelQuality.cc.

Referenced by MCMisalignmentScaler::analyze(), SiPixelQualityHistory::beginRun(), OccupancyPlots::endRun(), and TrackerGeometryCompare::fillTree().

97  {
98  if (IsFedBad(detid))
99  return true;
100  std::vector<SiPixelQuality::disabledModuleType> disabledModules = theDisabledModules;
101  std::sort(disabledModules.begin(), disabledModules.end(), SiPixelQuality::BadComponentStrictWeakOrdering());
102  std::vector<disabledModuleType>::const_iterator iter = std::lower_bound(
103  disabledModules.begin(), disabledModules.end(), detid, SiPixelQuality::BadComponentStrictWeakOrdering());
104  //errorType 0 corresponds to "whole" dead module
105  if (iter != disabledModules.end() && iter->DetID == detid && iter->errorType == 0)
106  return true;
107  return false;
108 }
bool IsFedBad(const uint32_t &detid) const
std::vector< disabledModuleType > theDisabledModules
bool SiPixelQuality::IsModuleUsable ( const uint32_t &  detid) const

Definition at line 78 of file SiPixelQuality.cc.

Referenced by MeasurementTrackerImpl::initializePixelStatus().

78  {
79  if (IsFedBad(detid))
80  return true;
81  std::vector<SiPixelQuality::disabledModuleType> disabledModules = theDisabledModules;
82  std::sort(disabledModules.begin(), disabledModules.end(), SiPixelQuality::BadComponentStrictWeakOrdering());
83  std::vector<disabledModuleType>::const_iterator iter = std::lower_bound(
84  disabledModules.begin(), disabledModules.end(), detid, SiPixelQuality::BadComponentStrictWeakOrdering());
85  if (iter != disabledModules.end() && iter->DetID == detid && iter->errorType == 0)
86  return false;
87  return true;
88 }
bool IsFedBad(const uint32_t &detid) const
std::vector< disabledModuleType > theDisabledModules
bool SiPixelQuality::IsRocBad ( const uint32_t &  detid,
const short &  rocNb 
) const

Definition at line 111 of file SiPixelQuality.cc.

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

111  {
112  if (IsModuleBad(detid))
113  return true;
114  std::vector<SiPixelQuality::disabledModuleType> disabledModules = theDisabledModules;
115  std::sort(disabledModules.begin(), disabledModules.end(), SiPixelQuality::BadComponentStrictWeakOrdering());
116  std::vector<disabledModuleType>::const_iterator iter = std::lower_bound(
117  disabledModules.begin(), disabledModules.end(), detid, SiPixelQuality::BadComponentStrictWeakOrdering());
118  if (iter != disabledModules.end() && iter->DetID == detid) {
119  return ((iter->BadRocs >> rocNb) & 0x1);
120  }
121  return false;
122 }
bool IsModuleBad(const uint32_t &detid) const
std::vector< disabledModuleType > theDisabledModules
template<class Archive >
void SiPixelQuality::serialize ( Archive &  ar,
const unsigned int  version 
)
private
void SiPixelQuality::setDisabledModuleList ( std::vector< disabledModuleType > &  disabledModules)
inline

Definition at line 72 of file SiPixelQuality.h.

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

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 121 of file SiPixelQuality.h.

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

Definition at line 121 of file SiPixelQuality.h.

Member Data Documentation

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

Definition at line 118 of file SiPixelQuality.h.