CMS 3D CMS Logo

SiPixelStatusHarvester.h
Go to the documentation of this file.
1 #ifndef SiPixelStatusHarvester_H
2 #define SiPixelStatusHarvester_H
3 
11 
21 
22 // Pixel quality harvester
24 // PixelDQM Framework
26 // PixelPhase1 HelperClass
28 
29 // Threshold testing
30 #include "TH1.h"
31 #include "TFile.h"
32 
33 class SiPixelStatusHarvester : public DQMOneEDAnalyzer<edm::one::WatchLuminosityBlocks>,
34  private HistogramManagerHolder {
36 
37 public:
38  // Constructor
40 
41  // Destructor
42  ~SiPixelStatusHarvester() override;
43 
44  // Operations
45  void beginJob() override;
46  void bookHistograms(DQMStore::IBooker& iBooker, edm::Run const&, const edm::EventSetup&) final;
47  void dqmEndRun(const edm::Run&, const edm::EventSetup&) final;
48  void analyze(const edm::Event& iEvent, const edm::EventSetup&) final;
49 
51  void endLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) final;
52 
53 private:
54  // Parameters
58  int nLumi_;
61  // harvest helper classs that setup the IOV structure
63  // debug mode
64  bool debug_;
65  // for DB output naming
67 
68  // permanent known bad components
70 
71  // totoal number of lumi blocks with non-zero pixel DIGIs
72  int countLumi_ = 0;
73  // last lumi section of the SiPixeDetectorStatus data
75 
77  const SiPixelFedCabling* cablingMap_ = nullptr;
78  std::map<int, unsigned int> sensorSize_;
79 
81 
82  // pixel online to offline pixel row/column
83  std::map<int, std::map<int, std::pair<int, int> > > pixelO2O_;
84 
89 
90  //Helper functions
91  std::vector<std::string> substructures;
92  double perLayerRingAverage(int detid, SiPixelDetectorStatus tmpSiPixelStatus);
93  std::string substructure(int detid);
94 
95  // "step function" for IOV
97  std::map<edm::LuminosityBlockNumber_t, edm::LuminosityBlockNumber_t> IOV);
98 
99  // boolean function to check whether two SiPixelQualitys (pyloads) are identical
101 
102  // Tag constructor
103  void constructTag(std::map<int, SiPixelQuality*> siPixelQualityTag,
106  edm::Run const& iRun);
107 };
108 
109 #endif
SiPixelStatusHarvester
Definition: SiPixelStatusHarvester.h:33
SiPixelStatusHarvester::beginJob
void beginJob() override
Definition: SiPixelStatusHarvester.cc:98
TrackerGeometry.h
SiPixelStatusHarvester::trackerGeometryToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeometryToken_
Definition: SiPixelStatusHarvester.h:85
SiPixelStatusHarvester::FEDERRORROC
Definition: SiPixelStatusHarvester.h:35
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
SiPixelStatusHarvester::trackerGeometry_
const TrackerGeometry * trackerGeometry_
Definition: SiPixelStatusHarvester.h:76
edm::Run
Definition: Run.h:45
SiPixelStatusHarvester::STUCKTBMROC
Definition: SiPixelStatusHarvester.h:35
DQMOneEDAnalyzer
Definition: DQMOneEDAnalyzer.h:20
SiPixelStatusHarvester::cablingMap_
const SiPixelFedCabling * cablingMap_
Definition: SiPixelStatusHarvester.h:77
SiPixelFedCablingMap.h
SiPixelQualityFromDbRcd.h
SiPixelFedCabling
Definition: SiPixelFedCabling.h:10
edm::LuminosityBlockNumber_t
unsigned int LuminosityBlockNumber_t
Definition: RunLumiEventNumber.h:13
SiPixelStatusHarvester::recordName_
std::string recordName_
Definition: SiPixelStatusHarvester.h:66
SiPixelStatusHarvester::perLayerRingAverage
double perLayerRingAverage(int detid, SiPixelDetectorStatus tmpSiPixelStatus)
Definition: SiPixelStatusHarvester.cc:671
ESGetToken.h
DQMOneEDAnalyzer.h
SiPixelDetectorStatus
Definition: SiPixelDetectorStatus.h:11
SiPixelStatusHarvester::substructures
std::vector< std::string > substructures
Definition: SiPixelStatusHarvester.h:91
SiPixelStatusHarvester::SiPixelStatusHarvester
SiPixelStatusHarvester(const edm::ParameterSet &)
Definition: SiPixelStatusHarvester.cc:53
TrackerTopology.h
SiPixelStatusHarvester::debug_
bool debug_
Definition: SiPixelStatusHarvester.h:64
TrackerTopologyRcd.h
SiPixelStatusHarvester::thresholdL4_
double thresholdL4_
Definition: SiPixelStatusHarvester.h:55
SiPixelStatusHarvester::OTHERBADROC
Definition: SiPixelStatusHarvester.h:35
SiPixelStatusHarvester::beginLuminosityBlock
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) final
Definition: SiPixelStatusHarvester.cc:575
SiPixelStatusHarvester::thresholdRNG1_
double thresholdRNG1_
Definition: SiPixelStatusHarvester.h:55
SiPixelStatusHarvester::thresholdL2_
double thresholdL2_
Definition: SiPixelStatusHarvester.h:55
SiPixelStatusHarvester::sensorSize_
std::map< int, unsigned int > sensorSize_
Definition: SiPixelStatusHarvester.h:78
SiPixelStatusHarvester::endLuminosityBlock
void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) final
Definition: SiPixelStatusHarvester.cc:580
b
double b
Definition: hdecay.h:118
SiPixelStatusHarvester::coord_
SiPixelCoordinates coord_
Definition: SiPixelStatusHarvester.h:80
SiPixelStatusHarvester::thresholdL3_
double thresholdL3_
Definition: SiPixelStatusHarvester.h:55
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiPixelStatusHarvester::outputBase_
std::string outputBase_
Definition: SiPixelStatusHarvester.h:56
SiPixelStatusHarvester::BADROC
Definition: SiPixelStatusHarvester.h:35
TrackerDigiGeometryRecord.h
SiPixelStatusManager.h
edm::ParameterSet
Definition: ParameterSet.h:47
SiPixelStatusManager
Definition: SiPixelStatusManager.h:24
SiPixelQuality
Definition: SiPixelQuality.h:27
SiPixelStatusHarvester::bookHistograms
void bookHistograms(DQMStore::IBooker &iBooker, edm::Run const &, const edm::EventSetup &) final
Definition: SiPixelStatusHarvester.cc:101
a
double a
Definition: hdecay.h:119
SiPixelFedCablingMapRcd.h
SiPixelStatusHarvester::constructTag
void constructTag(std::map< int, SiPixelQuality * > siPixelQualityTag, edm::Service< cond::service::PoolDBOutputService > &poolDbService, std::string tagName, edm::Run const &iRun)
Definition: SiPixelStatusHarvester.cc:649
HistogramManagerHolder
Definition: SiPixelPhase1Base.h:27
SiPixelStatusHarvester::PERMANENTBADROC
Definition: SiPixelStatusHarvester.h:35
edm::Service< cond::service::PoolDBOutputService >
iEvent
int iEvent
Definition: GenABIO.cc:224
SiPixelStatusHarvester::thresholdL1_
double thresholdL1_
Definition: SiPixelStatusHarvester.h:55
SiPixelStatusHarvester::thresholdRNG2_
double thresholdRNG2_
Definition: SiPixelStatusHarvester.h:55
edm::EventSetup
Definition: EventSetup.h:57
SiPixelStatusHarvester::moduleName_
std::string moduleName_
Definition: SiPixelStatusHarvester.h:59
SiPixelStatusHarvester::trackerTopologyToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyToken_
Definition: SiPixelStatusHarvester.h:86
SiPixelStatusHarvester::aveDigiOcc_
int aveDigiOcc_
Definition: SiPixelStatusHarvester.h:57
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord >
SiPixelStatusHarvester::endLumiBlock_
edm::LuminosityBlockNumber_t endLumiBlock_
Definition: SiPixelStatusHarvester.h:74
SiPixelStatusHarvester::equal
bool equal(SiPixelQuality *a, SiPixelQuality *b)
Definition: SiPixelStatusHarvester.cc:612
SiPixelStatusHarvester::siPixelQualityToken_
edm::ESGetToken< SiPixelQuality, SiPixelQualityFromDbRcd > siPixelQualityToken_
Definition: SiPixelStatusHarvester.h:88
SiPixelPhase1Base.h
SiPixelStatusHarvester::PROMPTBADROC
Definition: SiPixelStatusHarvester.h:35
SiPixelStatusHarvester::pixelO2O_
std::map< int, std::map< int, std::pair< int, int > > > pixelO2O_
Definition: SiPixelStatusHarvester.h:83
SiPixelStatusHarvester::~SiPixelStatusHarvester
~SiPixelStatusHarvester() override
Definition: SiPixelStatusHarvester.cc:95
Frameworkfwd.h
SiPixelStatusHarvester::siPixelFedCablingMapToken_
edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcd > siPixelFedCablingMapToken_
Definition: SiPixelStatusHarvester.h:87
SiPixelStatusHarvester::stepIOV
edm::LuminosityBlockNumber_t stepIOV(edm::LuminosityBlockNumber_t pin, std::map< edm::LuminosityBlockNumber_t, edm::LuminosityBlockNumber_t > IOV)
Definition: SiPixelStatusHarvester.cc:588
SiPixelStatusHarvester::nLumi_
int nLumi_
Definition: SiPixelStatusHarvester.h:58
dqm::implementation::IBooker
Definition: DQMStore.h:43
SiPixelQuality.h
SiPixelStatusHarvester::siPixelStatusManager_
SiPixelStatusManager siPixelStatusManager_
Definition: SiPixelStatusHarvester.h:62
ParameterSet.h
SiPixelStatusHarvester::badPixelInfo_
const SiPixelQuality * badPixelInfo_
Definition: SiPixelStatusHarvester.h:69
SiPixelStatusHarvester::analyze
void analyze(const edm::Event &iEvent, const edm::EventSetup &) final
Definition: SiPixelStatusHarvester.cc:110
edm::Event
Definition: Event.h:73
SiPixelCoordinates
Definition: SiPixelCoordinates.h:35
JetPartonCorrections_cff.tagName
tagName
Definition: JetPartonCorrections_cff.py:12
SiPixelStatusHarvester::dqmEndRun
void dqmEndRun(const edm::Run &, const edm::EventSetup &) final
Definition: SiPixelStatusHarvester.cc:113
SiPixelStatusHarvester::substructure
std::string substructure(int detid)
Definition: SiPixelStatusHarvester.cc:696
SiPixelStatusHarvester::countLumi_
int countLumi_
Definition: SiPixelStatusHarvester.h:72
SiPixelCoordinates.h
SiPixelStatusHarvester::label_
std::string label_
Definition: SiPixelStatusHarvester.h:60
TrackerGeometry
Definition: TrackerGeometry.h:14