CMS 3D CMS Logo

SiPixelPerformanceSummary.h
Go to the documentation of this file.
1 #ifndef SiPixelPerformanceSummary_h
2 #define SiPixelPerformanceSummary_h
3 
5 
6 #include <vector>
7 #include <map>
8 #include <iostream>
9 #include <cstdint>
10 
11 #define kDetSummarySize 60 // float numbers kept in DetSummary.performanceValues
12 #define kDefaultValue -99.9
13 
15 public:
16  struct DetSummary {
17  uint32_t detId_;
18  std::vector<float> performanceValues_;
19 
21  };
22 
23  class StrictWeakOrdering { // sort detSummaries by detId
24  public:
25  bool operator()(const DetSummary& detSumm, const uint32_t& otherDetId) const {
26  return (detSumm.detId_ < otherDetId);
27  };
28  };
29 
30 public:
34 
35  void clear();
36 
37  unsigned int size() { return allDetSummaries_.size(); }
38 
39  void setTimeStamp(unsigned long long timeStamp) { timeStamp_ = timeStamp; }
40  unsigned long long getTimeStamp() const { return timeStamp_; }
41 
42  void setRunNumber(unsigned int runNumber) { runNumber_ = runNumber; }
43  unsigned int getRunNumber() const { return runNumber_; }
44 
45  void setNumberOfEvents(unsigned int numberOfEvents) { numberOfEvents_ = numberOfEvents; }
46  unsigned int getNumberOfEvents() const { return numberOfEvents_; }
47 
48  void setLuminosityBlock(unsigned int lumBlock) { luminosityBlock_ = lumBlock; }
49  unsigned int getLuminosityBlock() const { return luminosityBlock_; };
50 
51  void print() const;
52  void print(const uint32_t detId) const;
53  void printAll() const;
54 
55  std::vector<uint32_t> getAllDetIds() const;
56  std::vector<DetSummary> getAllDetSummaries() const { return allDetSummaries_; }
57  std::vector<float> getDetSummary(uint32_t detId) const;
58 
59  // RawData
60  bool setRawDataErrorType(uint32_t detId, int bin, float nErrors);
61  // Digi
62  bool setNumberOfDigis(uint32_t detId, float mean, float rms, float emPtn);
63  bool setADC(uint32_t detId, float mean, float rms, float emPtn);
64  // Cluster
65  bool setNumberOfClusters(uint32_t detId, float mean, float rms, float emPtn);
66  bool setClusterCharge(uint32_t detId, float mean, float rms, float emPtn);
67  bool setClusterSize(uint32_t detId, float mean, float rms, float emPtn);
68  bool setClusterSizeX(uint32_t detId, float mean, float rms, float emPtn);
69  bool setClusterSizeY(uint32_t detId, float mean, float rms, float emPtn);
70  // RecHit
71  bool setNumberOfRecHits(uint32_t detId, float mean, float rms, float emPtn);
72  // TrackResidual
73  bool setResidualX(uint32_t detId, float mean, float rms, float emPtn);
74  bool setResidualY(uint32_t detId, float mean, float rms, float emPtn);
75  //
76  bool setNumberOfNoisCells(uint32_t detId, float nNpixCells); // N=4,1..
77  bool setNumberOfDeadCells(uint32_t detId, float nNpixCells); // N=4,1..
78  bool setNumberOfPixelHitsInTrackFit(uint32_t detId, float nPixelHits);
79  // Track
80  bool setFractionOfTracks(uint32_t detId, float mean, float rms);
81  bool setNumberOfOnTrackClusters(uint32_t detId, float nClusters);
82  bool setNumberOfOffTrackClusters(uint32_t detId, float nClusters);
83  bool setClusterChargeOnTrack(uint32_t detId, float mean, float rms);
84  bool setClusterChargeOffTrack(uint32_t detId, float mean, float rms);
85  bool setClusterSizeOnTrack(uint32_t detId, float mean, float rms);
86  bool setClusterSizeOffTrack(uint32_t detId, float mean, float rms);
87 
88 private:
89  std::pair<bool, std::vector<DetSummary>::iterator> initDet(const uint32_t detId);
90  std::pair<bool, std::vector<DetSummary>::iterator> setDet(const uint32_t detId,
91  const std::vector<float>& performanceValues);
92  bool setValue(uint32_t detId, int index, float performanceValue);
93  float getValue(uint32_t detId, int index);
94 
95 private:
96  unsigned long long timeStamp_;
97  unsigned int runNumber_;
98  unsigned int luminosityBlock_;
99  unsigned int numberOfEvents_;
100 
101  std::vector<DetSummary> allDetSummaries_;
102 
104 };
105 
106 #endif
heavyionUCCDQM_cfi.nClusters
nClusters
Definition: heavyionUCCDQM_cfi.py:9
SiPixelPerformanceSummary::DetSummary::detId_
uint32_t detId_
Definition: SiPixelPerformanceSummary.h:17
SiStripPI::mean
Definition: SiStripPayloadInspectorHelper.h:169
SiPixelPerformanceSummary::setClusterSizeY
bool setClusterSizeY(uint32_t detId, float mean, float rms, float emPtn)
Definition: SiPixelPerformanceSummary.cc:117
SiPixelPerformanceSummary::setNumberOfDigis
bool setNumberOfDigis(uint32_t detId, float mean, float rms, float emPtn)
Definition: SiPixelPerformanceSummary.cc:93
SiPixelPerformanceSummary::setRunNumber
void setRunNumber(unsigned int runNumber)
Definition: SiPixelPerformanceSummary.h:42
SiPixelPerformanceSummary::StrictWeakOrdering
Definition: SiPixelPerformanceSummary.h:23
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
SiPixelPerformanceSummary::setNumberOfDeadCells
bool setNumberOfDeadCells(uint32_t detId, float nNpixCells)
Definition: SiPixelPerformanceSummary.cc:137
SiPixelPerformanceSummary::setNumberOfPixelHitsInTrackFit
bool setNumberOfPixelHitsInTrackFit(uint32_t detId, float nPixelHits)
Definition: SiPixelPerformanceSummary.cc:141
SiPixelPerformanceSummary::setClusterChargeOnTrack
bool setClusterChargeOnTrack(uint32_t detId, float mean, float rms)
Definition: SiPixelPerformanceSummary.cc:157
SiPixelPerformanceSummary::initDet
std::pair< bool, std::vector< DetSummary >::iterator > initDet(const uint32_t detId)
Definition: SiPixelPerformanceSummary.cc:31
SiPixelPerformanceSummary::getDetSummary
std::vector< float > getDetSummary(uint32_t detId) const
Definition: SiPixelPerformanceSummary.cc:181
SiPixelPerformanceSummary::getLuminosityBlock
unsigned int getLuminosityBlock() const
Definition: SiPixelPerformanceSummary.h:49
SiStripPI::rms
Definition: SiStripPayloadInspectorHelper.h:169
SiPixelPerformanceSummary::setLuminosityBlock
void setLuminosityBlock(unsigned int lumBlock)
Definition: SiPixelPerformanceSummary.h:48
SiPixelPerformanceSummary::setClusterSizeX
bool setClusterSizeX(uint32_t detId, float mean, float rms, float emPtn)
Definition: SiPixelPerformanceSummary.cc:113
SiPixelPerformanceSummary::getTimeStamp
unsigned long long getTimeStamp() const
Definition: SiPixelPerformanceSummary.h:40
SiPixelPerformanceSummary::setDet
std::pair< bool, std::vector< DetSummary >::iterator > setDet(const uint32_t detId, const std::vector< float > &performanceValues)
Definition: SiPixelPerformanceSummary.cc:39
convertSQLiteXML.runNumber
runNumber
Definition: convertSQLiteXML.py:91
SiPixelPerformanceSummary::numberOfEvents_
unsigned int numberOfEvents_
Definition: SiPixelPerformanceSummary.h:99
SiPixelPerformanceSummary::setNumberOfOnTrackClusters
bool setNumberOfOnTrackClusters(uint32_t detId, float nClusters)
Definition: SiPixelPerformanceSummary.cc:149
SiPixelPerformanceSummary::setFractionOfTracks
bool setFractionOfTracks(uint32_t detId, float mean, float rms)
Definition: SiPixelPerformanceSummary.cc:145
SiPixelPerformanceSummary::setNumberOfRecHits
bool setNumberOfRecHits(uint32_t detId, float mean, float rms, float emPtn)
Definition: SiPixelPerformanceSummary.cc:121
SiPixelPerformanceSummary::DetSummary
Definition: SiPixelPerformanceSummary.h:16
SiPixelPerformanceSummary::setClusterSizeOffTrack
bool setClusterSizeOffTrack(uint32_t detId, float mean, float rms)
Definition: SiPixelPerformanceSummary.cc:169
SiPixelPerformanceSummary::setClusterChargeOffTrack
bool setClusterChargeOffTrack(uint32_t detId, float mean, float rms)
Definition: SiPixelPerformanceSummary.cc:161
SiPixelPerformanceSummary::setTimeStamp
void setTimeStamp(unsigned long long timeStamp)
Definition: SiPixelPerformanceSummary.h:39
SiPixelPerformanceSummary::setNumberOfEvents
void setNumberOfEvents(unsigned int numberOfEvents)
Definition: SiPixelPerformanceSummary.h:45
SiPixelPerformanceSummary::setNumberOfClusters
bool setNumberOfClusters(uint32_t detId, float mean, float rms, float emPtn)
Definition: SiPixelPerformanceSummary.cc:101
SiPixelPerformanceSummary::setADC
bool setADC(uint32_t detId, float mean, float rms, float emPtn)
Definition: SiPixelPerformanceSummary.cc:97
SiPixelPerformanceSummary::StrictWeakOrdering::operator()
bool operator()(const DetSummary &detSumm, const uint32_t &otherDetId) const
Definition: SiPixelPerformanceSummary.h:25
SiPixelPerformanceSummary::allDetSummaries_
std::vector< DetSummary > allDetSummaries_
Definition: SiPixelPerformanceSummary.h:101
SiPixelPerformanceSummary::getAllDetIds
std::vector< uint32_t > getAllDetIds() const
Definition: SiPixelPerformanceSummary.cc:173
SiPixelPerformanceSummary::getRunNumber
unsigned int getRunNumber() const
Definition: SiPixelPerformanceSummary.h:43
SiPixelPerformanceSummary::print
void print() const
Definition: SiPixelPerformanceSummary.cc:202
SiPixelPerformanceSummary::getNumberOfEvents
unsigned int getNumberOfEvents() const
Definition: SiPixelPerformanceSummary.h:46
SiPixelPerformanceSummary::size
unsigned int size()
Definition: SiPixelPerformanceSummary.h:37
SiPixelPerformanceSummary::SiPixelPerformanceSummary
SiPixelPerformanceSummary()
Definition: SiPixelPerformanceSummary.cc:10
SiPixelPerformanceSummary::luminosityBlock_
unsigned int luminosityBlock_
Definition: SiPixelPerformanceSummary.h:98
Serializable.h
SiPixelPerformanceSummary::timeStamp_
unsigned long long timeStamp_
Definition: SiPixelPerformanceSummary.h:96
SiPixelPerformanceSummary::setRawDataErrorType
bool setRawDataErrorType(uint32_t detId, int bin, float nErrors)
Definition: SiPixelPerformanceSummary.cc:89
SiPixelPerformanceSummary::setResidualY
bool setResidualY(uint32_t detId, float mean, float rms, float emPtn)
Definition: SiPixelPerformanceSummary.cc:129
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
SiPixelPerformanceSummary::setNumberOfOffTrackClusters
bool setNumberOfOffTrackClusters(uint32_t detId, float nClusters)
Definition: SiPixelPerformanceSummary.cc:153
SiPixelPerformanceSummary
Definition: SiPixelPerformanceSummary.h:14
SiPixelPerformanceSummary::runNumber_
unsigned int runNumber_
Definition: SiPixelPerformanceSummary.h:97
SiPixelPerformanceSummary::setResidualX
bool setResidualX(uint32_t detId, float mean, float rms, float emPtn)
Definition: SiPixelPerformanceSummary.cc:125
SiPixelPerformanceSummary::getAllDetSummaries
std::vector< DetSummary > getAllDetSummaries() const
Definition: SiPixelPerformanceSummary.h:56
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
SiPixelPerformanceSummary::setClusterSizeOnTrack
bool setClusterSizeOnTrack(uint32_t detId, float mean, float rms)
Definition: SiPixelPerformanceSummary.cc:165
SiPixelPerformanceSummary::setNumberOfNoisCells
bool setNumberOfNoisCells(uint32_t detId, float nNpixCells)
Definition: SiPixelPerformanceSummary.cc:133
SiPixelPerformanceSummary::~SiPixelPerformanceSummary
~SiPixelPerformanceSummary()
Definition: SiPixelPerformanceSummary.cc:21
SiPixelPerformanceSummary::DetSummary::performanceValues_
std::vector< float > performanceValues_
Definition: SiPixelPerformanceSummary.h:18
SiPixelPerformanceSummary::setClusterSize
bool setClusterSize(uint32_t detId, float mean, float rms, float emPtn)
Definition: SiPixelPerformanceSummary.cc:109
SiPixelPerformanceSummary::setValue
bool setValue(uint32_t detId, int index, float performanceValue)
Definition: SiPixelPerformanceSummary.cc:61
SiPixelPerformanceSummary::printAll
void printAll() const
Definition: SiPixelPerformanceSummary.cc:210
SiPixelPerformanceSummary::setClusterCharge
bool setClusterCharge(uint32_t detId, float mean, float rms, float emPtn)
Definition: SiPixelPerformanceSummary.cc:105
SiPixelPerformanceSummary::clear
void clear()
Definition: SiPixelPerformanceSummary.cc:23
SiPixelPerformanceSummary::getValue
float getValue(uint32_t detId, int index)
Definition: SiPixelPerformanceSummary.cc:77