CMS 3D CMS Logo

SiPixelQuality.h
Go to the documentation of this file.
1 // SiPixelQuality.h
2 //
3 // class definition to hold a list of disabled pixel modules
4 //
5 // M. Eads
6 // Apr 2008
7 
8 #ifndef SiPixelQuality_H
9 #define SiPixelQuality_H
10 
12 
13 #include <vector>
14 #include <utility>
15 
24 
25 class TrackerGeometry;
26 
28 public:
30  uint32_t DetID;
31  int errorType;
32  unsigned short BadRocs;
33 
35  };
36 
38  // errortype "whole" = int 0 in DB //
39  // errortype "tbmA" = int 1 in DB //
40  // errortype "tbmB" = int 2 in DB //
41  // errortype "none" = int 3 in DB //
43 
45  //each bad roc correspond to a bit to 1: num= //
46  // 0 <-> all good rocs //
47  // 1 <-> only roc 0 bad //
48  // 2<-> only roc 1 bad //
49  // 3<-> roc 0 and 1 bad //
50  // 4 <-> only roc 2 bad //
51  // ... //
53 
55  public:
56  bool operator()(const disabledModuleType& p, const uint32_t i) const { return p.DetID < i; }
57  bool operator()(const disabledModuleType& p, const disabledModuleType& q) const { return p.DetID < q.DetID; }
58  };
59 
61 
62  // constructor from a list of disabled modules
63  SiPixelQuality(std::vector<disabledModuleType>& disabledModules) : theDisabledModules(disabledModules) { ; }
64 
65  virtual ~SiPixelQuality() { ; }
66 
67  // set the list of disabled modules (current list is lost)
68  void setDisabledModuleList(std::vector<disabledModuleType>& disabledModules) { theDisabledModules = disabledModules; }
69 
70  // add a single module to the vector of disabled modules
72 
73  // add a vector of modules to the vector of disabled modules
74  void addDisabledModule(std::vector<disabledModuleType>& idVector);
75 
76  // remove disabled module from the list
77  // returns false if id not in disable list, true otherwise
78  // bool removeDisabledModule(const disabledModuleType & module);
79  // bool removeDisabledModule(const uint32_t & detid);
80 
81  //--------------- Interface for the user -----------------//
82  //------- designed to match SiStripQuality methods ----------//
83  //method copied from the SiStripQuality
84  void add(const SiStripDetVOff*);
85  //----------------------------------------
86  //number of Bad modules
87  int BadModuleNumber();
88 
89  bool IsModuleBad(const uint32_t& detid) const; //returns True if module disabled
90  bool IsModuleUsable(const uint32_t& detid) const; //returns True if module NOT disabled
91  bool IsRocBad(const uint32_t& detid, const short& rocNb) const; //returns True if ROC is disabled
92  short getBadRocs(const uint32_t& detid) const; //returns bad Rocs for given DetId
93  //each bad roc correspond to a bit to 1: num=
94  //0 <-> all good rocs
95  //1 <-> only roc 0 bad
96  //2<-> only roc 1 bad
97  //3<-> roc 0 and 1 bad
98  // 4 <-> only roc 2 bad
99  //...
100  const std::vector<disabledModuleType> getBadComponentList() const //returns list of disabled modules/ROCs
101  {
102  return theDisabledModules;
103  }
104  const std::vector<LocalPoint> getBadRocPositions(const uint32_t& detid,
105  const TrackerGeometry& theTracker,
106  const SiPixelFedCabling* map) const;
107  // const std::vector< std::pair <uint8_t, uint8_t> > getBadRocPositions(const uint32_t & detid, const edm::EventSetup& es, const SiPixelFedCabling* map ) const;
108 
109 private:
110  std::vector<disabledModuleType> theDisabledModules;
111  bool IsFedBad(const uint32_t& detid) const;
112 
114 }; // class SiPixelQuality
115 
116 #endif
SiPixelQuality::IsModuleBad
bool IsModuleBad(const uint32_t &detid) const
Definition: SiPixelQuality.cc:93
mps_fire.i
i
Definition: mps_fire.py:428
SiPixelQuality::getBadRocs
short getBadRocs(const uint32_t &detid) const
Definition: SiPixelQuality.cc:122
SiPixelQuality::add
void add(const SiStripDetVOff *)
Definition: SiPixelQuality.cc:46
SiPixelQuality::BadComponentStrictWeakOrdering
Definition: SiPixelQuality.h:54
SiPixelQuality::SiPixelQuality
SiPixelQuality(std::vector< disabledModuleType > &disabledModules)
Definition: SiPixelQuality.h:63
SiPixelQuality::disabledModuleType
Definition: SiPixelQuality.h:29
GlobalPixel.h
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
SiPixelFedCablingMap.h
SiPixelQuality::disabledModuleType::errorType
int errorType
Definition: SiPixelQuality.h:31
SiPixelFedCabling
Definition: SiPixelFedCabling.h:10
watchdog.const
const
Definition: watchdog.py:83
SiPixelQuality::IsModuleUsable
bool IsModuleUsable(const uint32_t &detid) const
Definition: SiPixelQuality.cc:74
SiPixelQuality::BadModuleNumber
int BadModuleNumber()
Definition: SiPixelQuality.cc:86
SiPixelQuality::SiPixelQuality
SiPixelQuality()
Definition: SiPixelQuality.h:60
SiPixelQuality::BadComponentStrictWeakOrdering::operator()
bool operator()(const disabledModuleType &p, const disabledModuleType &q) const
Definition: SiPixelQuality.h:57
SiPixelFedCabling.h
SiPixelQuality::theDisabledModules
std::vector< disabledModuleType > theDisabledModules
Definition: SiPixelQuality.h:110
SiPixelQuality::setDisabledModuleList
void setDisabledModuleList(std::vector< disabledModuleType > &disabledModules)
Definition: SiPixelQuality.h:68
SiPixelQuality
Definition: SiPixelQuality.h:27
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
PixelROC.h
SiPixelQuality::disabledModuleType::DetID
uint32_t DetID
Definition: SiPixelQuality.h:30
SiPixelQuality::addDisabledModule
void addDisabledModule(disabledModuleType module)
Definition: SiPixelQuality.h:71
Serializable.h
LocalPixel.h
SiStripDetVOff
Definition: SiStripDetVOff.h:31
submitPVResolutionJobs.q
q
Definition: submitPVResolutionJobs.py:84
SiPixelQuality::getBadRocPositions
const std::vector< LocalPoint > getBadRocPositions(const uint32_t &detid, const TrackerGeometry &theTracker, const SiPixelFedCabling *map) const
Definition: SiPixelQuality.cc:132
SiPixelQuality::getBadComponentList
const std::vector< disabledModuleType > getBadComponentList() const
Definition: SiPixelQuality.h:100
callgraph.module
module
Definition: callgraph.py:61
SiPixelQuality::disabledModuleType::BadRocs
unsigned short BadRocs
Definition: SiPixelQuality.h:32
SiPixelQuality::~SiPixelQuality
virtual ~SiPixelQuality()
Definition: SiPixelQuality.h:65
DetId.h
LocalPoint.h
genParticles_cff.map
map
Definition: genParticles_cff.py:11
SiStripDetVOff.h
SiPixelQuality::IsRocBad
bool IsRocBad(const uint32_t &detid, const short &rocNb) const
Definition: SiPixelQuality.cc:107
SiPixelQuality::IsFedBad
bool IsFedBad(const uint32_t &detid) const
Definition: SiPixelQuality.cc:160
SiPixelQuality::BadComponentStrictWeakOrdering::operator()
bool operator()(const disabledModuleType &p, const uint32_t i) const
Definition: SiPixelQuality.h:56
TrackerGeometry
Definition: TrackerGeometry.h:14