Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:32:03

0001 #ifndef EcalEndcapDigisValidation_H
0002 #define EcalEndcapDigisValidation_H
0003 
0004 /*
0005  * \file EcalEndcapDigisValidation.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/EEDataFrame.h"
0025 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
0026 
0027 #include "CalibCalorimetry/EcalTrivialCondModules/interface/EcalTrivialConditionRetriever.h"
0028 
0029 #include <iostream>
0030 #include <fstream>
0031 #include <vector>
0032 #include <map>
0033 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0034 
0035 class EcalEndcapDigisValidation : public DQMEDAnalyzer {
0036   typedef std::map<uint32_t, float, std::less<uint32_t> > MapType;
0037 
0038 public:
0039   /// Constructor
0040   EcalEndcapDigisValidation(const edm::ParameterSet& ps);
0041 
0042   /// Destructor
0043   ~EcalEndcapDigisValidation() override;
0044 
0045   void dqmBeginRun(edm::Run const&, edm::EventSetup const&) override;
0046   void bookHistograms(DQMStore::IBooker& i, edm::Run const&, edm::EventSetup const&) override;
0047 
0048 protected:
0049   /// Analyze
0050   void analyze(edm::Event const& e, edm::EventSetup const& c) override;
0051 
0052   void checkCalibrations(edm::EventSetup const& c);
0053 
0054 private:
0055   bool verbose_;
0056 
0057   std::string outputFile_;
0058 
0059   edm::EDGetTokenT<EEDigiCollection> EEdigiCollectionToken_;
0060   edm::ESGetToken<EcalADCToGeVConstant, EcalADCToGeVConstantRcd> pAgc;
0061 
0062   std::map<int, double, std::less<int> > gainConv_;
0063 
0064   double barrelADCtoGeV_;
0065   double endcapADCtoGeV_;
0066 
0067   MonitorElement* meEEDigiOccupancyzp_;
0068   MonitorElement* meEEDigiOccupancyzm_;
0069 
0070   MonitorElement* meEEDigiMultiplicityzp_;
0071   MonitorElement* meEEDigiMultiplicityzm_;
0072 
0073   MonitorElement* meEEDigiADCGlobal_;
0074 
0075   MonitorElement* meEEDigiADCAnalog_[10];
0076 
0077   MonitorElement* meEEDigiADCgS_[10];
0078   MonitorElement* meEEDigiADCg1_[10];
0079   MonitorElement* meEEDigiADCg6_[10];
0080   MonitorElement* meEEDigiADCg12_[10];
0081 
0082   MonitorElement* meEEDigiGain_[10];
0083 
0084   MonitorElement* meEEPedestal_;
0085 
0086   MonitorElement* meEEMaximumgt100ADC_;
0087 
0088   MonitorElement* meEEMaximumgt20ADC_;
0089 
0090   MonitorElement* meEEnADCafterSwitch_;
0091 };
0092 
0093 #endif