Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:09:38

0001 #ifndef MuonTestSummary_H
0002 #define MuonTestSummary_H
0003 
0004 /** \class MuonTestSummary
0005  * *
0006  *  DQM Client for global summary
0007  *
0008  *  \author  G. Mila - INFN Torino
0009  *  updates:  G. Hesketh - CERN
0010  *   
0011  */
0012 
0013 #include "FWCore/Framework/interface/Frameworkfwd.h"
0014 #include <FWCore/Framework/interface/Event.h>
0015 #include <FWCore/Framework/interface/MakerMacros.h>
0016 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0017 #include <FWCore/Framework/interface/LuminosityBlock.h>
0018 
0019 #include "DQMServices/Core/interface/DQMStore.h"
0020 #include "DQMServices/Core/interface/DQMEDHarvester.h"
0021 
0022 #include "FWCore/Framework/interface/Run.h"
0023 
0024 #include <memory>
0025 #include <string>
0026 
0027 class MuonTestSummary : public DQMEDHarvester {
0028 public:
0029   /// Constructor
0030   MuonTestSummary(const edm::ParameterSet &ps);
0031 
0032   /// Destructor
0033   ~MuonTestSummary() override;
0034 
0035 protected:
0036   void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override;  //performed in the endJob
0037 
0038   /// test operations
0039   void doKinematicsTests(DQMStore::IGetter &, std::string, int);
0040   void doResidualsTests(DQMStore::IGetter &, std::string, std::string, int);
0041 
0042   void doMuonIDTests(DQMStore::IGetter &);
0043   void doEnergyTests(DQMStore::IGetter &, std::string nameHisto, std::string muonType, int bin);
0044   void doMultiplicityTests(DQMStore::IGetter &);
0045   void ResidualCheck(DQMStore::IGetter &,
0046                      std::string muType,
0047                      const std::vector<std::string> &resHistos,
0048                      int &numPlot,
0049                      double &Mean,
0050                      double &Mean_err,
0051                      double &Sigma,
0052                      double &Sigma_err);
0053   void GaussFit(std::string type,
0054                 std::string parameter,
0055                 MonitorElement *Histo,
0056                 float &mean,
0057                 float &mean_err,
0058                 float &sigma,
0059                 float &sigma_err);
0060 
0061 private:
0062   // Switch for verbosity
0063   std::string metname;
0064 
0065   // test ranges
0066   double etaExpected;
0067   double phiExpected;
0068   double chi2Fraction;
0069   double chi2Spread;
0070   double resEtaSpread_tkGlb;
0071   double resEtaSpread_glbSta;
0072   double resPhiSpread_tkGlb;
0073   double resPhiSpread_glbSta;
0074   double resOneOvPSpread_tkGlb;
0075   double resOneOvPSpread_glbSta;
0076   double pullEtaSpread;
0077   double pullPhiSpread;
0078   double pullOneOvPSpread;
0079   double resChargeLimit_tkGlb;
0080   double resChargeLimit_glbSta;
0081   double resChargeLimit_tkSta;
0082   double numMatchedExpected_min;
0083   double numMatchedExpected_max;
0084   double matchesFractionDt_min;
0085   double matchesFractionDt_max;
0086   double matchesFractionCsc_min;
0087   double matchesFractionCsc_max;
0088   double resSegmTrack_rms_min;
0089   double resSegmTrack_rms_max;
0090   double resSegmTrack_mean_min;
0091   double resSegmTrack_mean_max;
0092   double sigmaResSegmTrackExp;
0093   double expPeakEcalS9_min;
0094   double expPeakEcalS9_max;
0095   double expPeakHadS9_min;
0096   double expPeakHadS9_max;
0097   double expMultiplicityGlb_min;
0098   double expMultiplicityTk_min;
0099   double expMultiplicitySta_min;
0100   double expMultiplicityGlb_max;
0101   double expMultiplicityTk_max;
0102   double expMultiplicitySta_max;
0103 
0104   // the report MEs
0105   //------
0106   MonitorElement *KolmogorovTestSummaryMap;
0107   MonitorElement *chi2TestSummaryMap;
0108   //-----
0109   MonitorElement *kinematicsSummaryMap;
0110   MonitorElement *residualsSummaryMap;
0111   MonitorElement *muonIdSummaryMap;
0112   MonitorElement *energySummaryMap;
0113   MonitorElement *multiplicitySummaryMap;
0114   MonitorElement *summaryReport;
0115   MonitorElement *summaryReportMap;
0116   std::vector<MonitorElement *> theSummaryContents;
0117   MonitorElement *summaryCertification;
0118   MonitorElement *summaryCertificationMap;
0119   std::vector<MonitorElement *> theCertificationContents;
0120 };
0121 
0122 #endif