File indexing completed on 2024-04-06 12:02:34
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef SiPixelQuality_H
0009 #define SiPixelQuality_H
0010
0011 #include "CondFormats/Serialization/interface/Serializable.h"
0012
0013 #include <vector>
0014 #include <utility>
0015
0016 #include "DataFormats/DetId/interface/DetId.h"
0017 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
0018 #include "CondFormats/SiPixelObjects/interface/GlobalPixel.h"
0019 #include "CondFormats/SiPixelObjects/interface/SiPixelFedCablingMap.h"
0020 #include "CondFormats/SiPixelObjects/interface/SiPixelFedCabling.h"
0021 #include "CondFormats/SiPixelObjects/interface/PixelROC.h"
0022 #include "CondFormats/SiPixelObjects/interface/LocalPixel.h"
0023 #include "CondFormats/SiStripObjects/interface/SiStripDetVOff.h"
0024
0025 class TrackerGeometry;
0026
0027 class SiPixelQuality {
0028 public:
0029 struct disabledModuleType {
0030 uint32_t DetID;
0031 int errorType;
0032 unsigned short BadRocs;
0033
0034 COND_SERIALIZABLE;
0035 };
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054 class BadComponentStrictWeakOrdering {
0055 public:
0056 bool operator()(const disabledModuleType& p, const uint32_t i) const { return p.DetID < i; }
0057 bool operator()(const disabledModuleType& p, const disabledModuleType& q) const { return p.DetID < q.DetID; }
0058 };
0059
0060 SiPixelQuality() : theDisabledModules(0) { ; }
0061
0062
0063 SiPixelQuality(std::vector<disabledModuleType>& disabledModules) : theDisabledModules(disabledModules) { ; }
0064
0065 virtual ~SiPixelQuality() { ; }
0066
0067
0068 void setDisabledModuleList(std::vector<disabledModuleType>& disabledModules) { theDisabledModules = disabledModules; }
0069
0070
0071 void addDisabledModule(disabledModuleType module) { theDisabledModules.push_back(module); }
0072
0073
0074 void addDisabledModule(std::vector<disabledModuleType>& idVector);
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084 void add(const SiStripDetVOff*);
0085
0086
0087 int BadModuleNumber();
0088
0089 bool IsModuleBad(const uint32_t& detid) const;
0090 bool IsModuleUsable(const uint32_t& detid) const;
0091 bool IsRocBad(const uint32_t& detid, const short& rocNb) const;
0092 short getBadRocs(const uint32_t& detid) const;
0093
0094
0095
0096
0097
0098
0099
0100 const std::vector<disabledModuleType> getBadComponentList() const
0101 {
0102 return theDisabledModules;
0103 }
0104 const std::vector<LocalPoint> getBadRocPositions(const uint32_t& detid,
0105 const TrackerGeometry& theTracker,
0106 const SiPixelFedCabling* map) const;
0107
0108
0109 private:
0110 std::vector<disabledModuleType> theDisabledModules;
0111 bool IsFedBad(const uint32_t& detid) const;
0112
0113 COND_SERIALIZABLE;
0114 };
0115
0116 #endif