Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-02-25 23:40:02

0001 #ifndef SiStripMonitorPedestals_SiStripMonitorPedestals_h
0002 #define SiStripMonitorPedestals_SiStripMonitorPedestals_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     SiStripMonitorPedestals
0006 // Class  :     SiStripMonitorPedestals
0007 //
0008 /**\class SiStripMonitorPedestals SiStripMonitorPedestals.h
0009 
0010  Description: <one line class summary>
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Original Author:  gennai, dutta
0018 //         Created:  Sat Feb  4 20:49:51 CET 2006
0019 //
0020 
0021 // system include files
0022 #include <memory>
0023 #include <iomanip>
0024 #include <string>
0025 #include <cstdint>
0026 
0027 // user include files
0028 #include "FWCore/Framework/interface/ESWatcher.h"
0029 #include "FWCore/Framework/interface/Event.h"
0030 #include "FWCore/Framework/interface/Frameworkfwd.h"
0031 #include "FWCore/Framework/interface/MakerMacros.h"
0032 #include "FWCore/Utilities/interface/EDGetToken.h"
0033 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0034 
0035 // data formats
0036 #include "DataFormats/Common/interface/DetSetVector.h"
0037 #include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h"
0038 #include "DataFormats/SiStripDigi/interface/SiStripDigi.h"
0039 #include "DataFormats/SiStripDigi/interface/SiStripRawDigi.h"
0040 
0041 // cabling
0042 #include "CalibFormats/SiStripObjects/interface/SiStripDetCabling.h"
0043 #include "CalibTracker/Records/interface/SiStripDetCablingRcd.h"
0044 
0045 #include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"
0046 #include "DQMServices/Core/interface/DQMStore.h"
0047 
0048 class ApvAnalysisFactory;
0049 class SiStripDetCabling;
0050 
0051 class SiStripMonitorPedestals : public DQMOneEDAnalyzer<> {
0052 public:
0053   explicit SiStripMonitorPedestals(const edm::ParameterSet &);
0054   ~SiStripMonitorPedestals() override;
0055 
0056   void analyze(const edm::Event &, const edm::EventSetup &) override;
0057   void dqmEndRun(edm::Run const &run, edm::EventSetup const &eSetup) override;
0058   void endJob() override;
0059   void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
0060 
0061 private:
0062   edm::EDGetTokenT<edm::DetSetVector<SiStripRawDigi>> digiToken_;
0063 
0064   void resetMEs(uint32_t idet);
0065   void createMEs(DQMStore::IBooker &, edm::EventSetup const &eSetup);
0066   void fillCondDBMEs(edm::EventSetup const &eSetup);
0067 
0068   struct ModMEs {
0069     MonitorElement *PedsPerStrip;
0070     MonitorElement *PedsDistribution;
0071     MonitorElement *PedsEvolution;
0072 
0073     MonitorElement *CMSubNoisePerStrip;
0074     MonitorElement *RawNoisePerStrip;
0075     MonitorElement *CMSubNoiseProfile;
0076     MonitorElement *RawNoiseProfile;
0077     MonitorElement *NoisyStrips;
0078     MonitorElement *NoisyStripDistribution;
0079 
0080     MonitorElement *CMDistribution;
0081     MonitorElement *CMSlopeDistribution;
0082 
0083     // MonitorElements for CondDB data display
0084     MonitorElement *PedsPerStripDB;
0085     MonitorElement *CMSubNoisePerStripDB;
0086     MonitorElement *BadStripsDB;
0087   };
0088 
0089   DQMStore *dqmStore_;
0090   edm::ParameterSet conf_;
0091   std::map<uint32_t, ModMEs> PedMEs;
0092   const SiStripDetCabling *detcabling;
0093   edm::ParameterSet pedsPSet_;
0094   bool analyzed;
0095   bool firstEvent;
0096 
0097   // The following to be put inside the parametersets
0098   int16_t nEvUpdate_;
0099   int16_t signalCutPeds_;
0100   int16_t nEvTot_;
0101   int16_t nEvInit_;
0102   int nIteration_;
0103   ApvAnalysisFactory *apvFactory_;
0104   int theEventInitNumber_;
0105   int theEventIterNumber_;
0106   int NumCMstripsInGroup_;
0107   std::string runTypeFlag_;
0108   std::string outPutFileName;
0109 
0110   edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> tTopoToken_;
0111   edm::ESGetToken<SiStripDetCabling, SiStripDetCablingRcd> detCablingToken_;
0112   edm::ESWatcher<SiStripDetCablingRcd> detCablingWatcher_;
0113   edm::ESGetToken<SiStripPedestals, SiStripPedestalsRcd> pedestalToken_;
0114   edm::ESGetToken<SiStripNoises, SiStripNoisesRcd> noiseToken_;
0115   edm::ESGetToken<SiStripQuality, SiStripQualityRcd> qualityToken_;
0116 
0117   static const std::string RunMode1;
0118   static const std::string RunMode2;
0119   static const std::string RunMode3;
0120 };
0121 
0122 #endif