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 71 of file SiPixelQuality.h.

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

Definition at line 74 of file SiPixelQuality.h.

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

Definition at line 76 of file SiPixelQuality.h.

76 {;}

Member Function Documentation

void SiPixelQuality::add ( const SiStripDetVOff Voff)

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

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

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

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

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

Definition at line 50 of file SiPixelQuality.cc.

50  {
52  idVector.begin(),
53  idVector.end());
54 
55 }
std::vector< disabledModuleType > theDisabledModules
int SiPixelQuality::BadModuleNumber ( )

Definition at line 98 of file SiPixelQuality.cc.

98  {
99  std::vector<SiPixelQuality::disabledModuleType>disabledModules = theDisabledModules;
100  //does not distinguish between partially dead or not
101  return disabledModules.size();
102 }
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 150 of file SiPixelQuality.cc.

References sipixelobjects::GlobalPixel::col, SiPixelFedCabling::findItem(), mps_fire::i, sipixelobjects::PixelROC::idInDetUnit(), TrackerGeometry::idToDet(), DTRecHitClients_cfi::local, Topology::localPosition(), callgraph::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:40
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:15
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
const TrackerGeomDet * idToDet(DetId) const override
GlobalPixel toGlobal(const LocalPixel &loc) const
Definition: PixelROC.h:59
short SiPixelQuality::getBadRocs ( const uint32_t &  detid) const

Definition at line 141 of file SiPixelQuality.cc.

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

Referenced by MeasurementTrackerImpl::initializePixelStatus().

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

Definition at line 128 of file SiPixelQuality.cc.

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

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

Definition at line 180 of file SiPixelQuality.cc.

180  {
181  return false;
182 }
bool SiPixelQuality::IsModuleBad ( const uint32_t &  detid) const

Definition at line 105 of file SiPixelQuality.cc.

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

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

105  {
106  if(IsFedBad(detid))
107  return true;
108  std::vector<SiPixelQuality::disabledModuleType>disabledModules = theDisabledModules;
109  std::sort(disabledModules.begin(),disabledModules.end(),SiPixelQuality::BadComponentStrictWeakOrdering());
110  std::vector<disabledModuleType>::const_iterator iter = std::lower_bound(disabledModules.begin(),disabledModules.end(),detid,SiPixelQuality::BadComponentStrictWeakOrdering());
111  if (iter != disabledModules.end() && iter->DetID==detid && iter->errorType == 0) //errorType 0 corresponds to "whole" dead module
112  return true;
113  return false;
114 }
bool IsFedBad(const uint32_t &detid) const
std::vector< disabledModuleType > theDisabledModules
bool SiPixelQuality::IsModuleUsable ( const uint32_t &  detid) const

Definition at line 87 of file SiPixelQuality.cc.

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

Referenced by MeasurementTrackerImpl::initializePixelStatus().

87  {
88  if(IsFedBad(detid))
89  return true;
90  std::vector<SiPixelQuality::disabledModuleType>disabledModules = theDisabledModules;
91  std::sort(disabledModules.begin(),disabledModules.end(),SiPixelQuality::BadComponentStrictWeakOrdering());
92  std::vector<disabledModuleType>::const_iterator iter = std::lower_bound(disabledModules.begin(),disabledModules.end(),detid,SiPixelQuality::BadComponentStrictWeakOrdering());
93  if (iter != disabledModules.end() && iter->DetID==detid && iter->errorType ==0)
94  return false;
95  return true;
96 }
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 117 of file SiPixelQuality.cc.

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

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

117  {
118  if(IsModuleBad(detid))
119  return true;
120  std::vector<SiPixelQuality::disabledModuleType>disabledModules = theDisabledModules;
121  std::sort(disabledModules.begin(),disabledModules.end(),SiPixelQuality::BadComponentStrictWeakOrdering());
122  std::vector<disabledModuleType>::const_iterator iter = std::lower_bound(disabledModules.begin(),disabledModules.end(),detid,SiPixelQuality::BadComponentStrictWeakOrdering());
123  if (iter != disabledModules.end() && iter->DetID == detid){
124  return ((iter->BadRocs >> rocNb)&0x1);}
125  return false;
126 }
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 79 of file SiPixelQuality.h.

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

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 127 of file SiPixelQuality.h.

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

Definition at line 127 of file SiPixelQuality.h.

Member Data Documentation

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

Definition at line 123 of file SiPixelQuality.h.