Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-09-27 04:04:14

0001 #ifndef ROC__Analyzer_h
0002 #define ROC__Analyzer_h
0003 
0004 // -*- C++ -*-
0005 //
0006 // Package:    SiPixelDQMRocLevelAnalyzer
0007 // Class:      SiPixelDQMRocLevelAnalyzer
0008 //
0009 /**\class SiPixelDQMRocLevelAnalyzer SiPixelDQMRocLevelAnalyzer.cc DQM/SiPixelDQMRocLevelAnalyzer/src/SiPixelDQMRocLevelAnalyzer.cc
0010 
0011  Description: <one line class summary>
0012 
0013  Implementation:
0014      <Notes on implementation>
0015 */
0016 //
0017 // Original Author:  Lukas Wehrli
0018 //         Created:  Thu Sep 30 14:03:02 CEST 2008
0019 //
0020 //
0021 
0022 // system include files
0023 #include <memory>
0024 
0025 // user include files
0026 #include "FWCore/Framework/interface/Frameworkfwd.h"
0027 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0028 
0029 #include "FWCore/Framework/interface/Event.h"
0030 #include "FWCore/Framework/interface/MakerMacros.h"
0031 
0032 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0033 #include "DQMServices/Core/interface/DQMStore.h"
0034 #include "FWCore/ServiceRegistry/interface/Service.h"
0035 #include "CommonTools/UtilAlgos/interface/TFileService.h"
0036 #include <string>
0037 #include "TH1D.h"
0038 #include "TFile.h"
0039 #include <cmath>
0040 //
0041 // class decleration
0042 //
0043 
0044 class SiPixelDQMRocLevelAnalyzer : public edm::one::EDAnalyzer<edm::one::SharedResources> {
0045 public:
0046   typedef dqm::legacy::MonitorElement MonitorElement;
0047   typedef dqm::legacy::DQMStore DQMStore;
0048   explicit SiPixelDQMRocLevelAnalyzer(const edm::ParameterSet &);
0049   ~SiPixelDQMRocLevelAnalyzer() override;
0050 
0051 private:
0052   void beginJob() override;
0053   void analyze(const edm::Event &, const edm::EventSetup &) override;
0054   void endJob() override;
0055 
0056   //
0057   void RocSummary(std::string tagname);
0058   void RocSumOneModule(int maxr,
0059                        int maxc,
0060                        MonitorElement *const &me,
0061                        std::vector<double> &vecCN,
0062                        std::vector<double> &vecMean,
0063                        std::vector<double> &vecSD,
0064                        int &chipNumber);
0065   void FillRocLevelHistos(TH1F *hrocdep, TH1F *hdist, std::vector<double> &vecx, std::vector<double> &vecy);
0066 
0067   // ----------member data ---------------------------
0068   edm::ParameterSet conf_;
0069   DQMStore *dbe;
0070   edm::Service<TFileService> fs_;
0071 
0072   std::vector<MonitorElement *> mes;
0073   bool bRS, fRS, bPixelAlive;
0074 
0075   std::vector<double> vbpixCN;
0076   std::vector<double> vbpixM;
0077   std::vector<double> vbpixSD;
0078   std::vector<double> vfpixCN;
0079   std::vector<double> vfpixM;
0080   std::vector<double> vfpixSD;
0081 
0082   //barrel
0083   TH1F *bhPixelAlive;
0084   TH1F *bhPixelAlive_dist;
0085   TH1F *bhThresholdMean;
0086   TH1F *bhThresholdMean_dist;
0087   TH1F *bhThresholdRMS;
0088   TH1F *bhThresholdRMS_dist;
0089   TH1F *bhNoiseMean;
0090   TH1F *bhNoiseMean_dist;
0091   TH1F *bhNoiseRMS;
0092   TH1F *bhNoiseRMS_dist;
0093   TH1F *bhGainMean;
0094   TH1F *bhGainMean_dist;
0095   TH1F *bhGainRMS;
0096   TH1F *bhGainRMS_dist;
0097   TH1F *bhPedestalMean;
0098   TH1F *bhPedestalMean_dist;
0099   TH1F *bhPedestalRMS;
0100   TH1F *bhPedestalRMS_dist;
0101   //endcap
0102   TH1F *ehPixelAlive;
0103   TH1F *ehPixelAlive_dist;
0104   TH1F *ehThresholdMean;
0105   TH1F *ehThresholdMean_dist;
0106   TH1F *ehThresholdRMS;
0107   TH1F *ehThresholdRMS_dist;
0108   TH1F *ehNoiseMean;
0109   TH1F *ehNoiseMean_dist;
0110   TH1F *ehNoiseRMS;
0111   TH1F *ehNoiseRMS_dist;
0112   TH1F *ehGainMean;
0113   TH1F *ehGainMean_dist;
0114   TH1F *ehGainRMS;
0115   TH1F *ehGainRMS_dist;
0116   TH1F *ehPedestalMean;
0117   TH1F *ehPedestalMean_dist;
0118   TH1F *ehPedestalRMS;
0119   TH1F *ehPedestalRMS_dist;
0120 };
0121 
0122 #endif