Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-12-28 05:58:08

0001 #ifndef EcalBarrelDigisValidation_H
0002 #define EcalBarrelDigisValidation_H
0003 
0004 /*
0005  * \file EcalBarrelDigisValidation.h
0006  *
0007  * \author F. Cossutti
0008  *
0009 */
0010 
0011 #include "FWCore/Framework/interface/Frameworkfwd.h"
0012 
0013 #include "FWCore/Framework/interface/Event.h"
0014 #include "FWCore/Framework/interface/EventSetup.h"
0015 #include "FWCore/Framework/interface/ESHandle.h"
0016 #include "FWCore/Framework/interface/MakerMacros.h"
0017 
0018 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0019 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0020 
0021 #include "DQMServices/Core/interface/DQMStore.h"
0022 #include "FWCore/ServiceRegistry/interface/Service.h"
0023 
0024 #include "DataFormats/EcalDigi/interface/EBDataFrame.h"
0025 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
0026 
0027 #include <iostream>
0028 #include <fstream>
0029 #include <vector>
0030 #include <map>
0031 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0032 
0033 #include "CalibCalorimetry/EcalTrivialCondModules/interface/EcalTrivialConditionRetriever.h"
0034 
0035 class EcalBarrelDigisValidation : public DQMEDAnalyzer {
0036   typedef std::map<uint32_t, float, std::less<uint32_t> > MapType;
0037 
0038 public:
0039   /// Constructor
0040   EcalBarrelDigisValidation(const edm::ParameterSet& ps);
0041 
0042   /// Destructor
0043   ~EcalBarrelDigisValidation() override;
0044 
0045   void bookHistograms(DQMStore::IBooker& i, edm::Run const&, edm::EventSetup const&) override;
0046 
0047 protected:
0048   /// Analyze
0049   void analyze(edm::Event const& e, edm::EventSetup const& c) override;
0050   void dqmBeginRun(edm::Run const&, edm::EventSetup const&) override;
0051   void checkCalibrations(edm::EventSetup const& c);
0052 
0053 private:
0054   bool verbose_;
0055 
0056   std::string outputFile_;
0057 
0058   edm::EDGetTokenT<EBDigiCollection> EBdigiCollection_;
0059   edm::ESGetToken<EcalADCToGeVConstant, EcalADCToGeVConstantRcd> pAgc;
0060   std::map<int, double, std::less<int> > gainConv_;
0061 
0062   double barrelADCtoGeV_;
0063   double endcapADCtoGeV_;
0064 
0065   MonitorElement* meEBDigiOccupancy_;
0066 
0067   MonitorElement* meEBDigiMultiplicity_;
0068 
0069   MonitorElement* meEBDigiADCGlobal_;
0070 
0071   MonitorElement* meEBDigiADCAnalog_[10];
0072 
0073   MonitorElement* meEBDigiADCgS_[10];
0074   MonitorElement* meEBDigiADCg1_[10];
0075   MonitorElement* meEBDigiADCg6_[10];
0076   MonitorElement* meEBDigiADCg12_[10];
0077 
0078   MonitorElement* meEBDigiGain_[10];
0079 
0080   MonitorElement* meEBPedestal_;
0081 
0082   MonitorElement* meEBMaximumgt100ADC_;
0083 
0084   MonitorElement* meEBMaximumgt10ADC_;
0085 
0086   MonitorElement* meEBnADCafterSwitch_;
0087 };
0088 
0089 #endif