Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef EcalPreshowerSimHitsValidation_H
0002 #define EcalPreshowerSimHitsValidation_H
0003 
0004 /*
0005  * \file EcalPreshowerSimHitsValidation.h
0006  *
0007  * \author C.Rovelli
0008  *
0009  */
0010 
0011 #include "FWCore/Framework/interface/Frameworkfwd.h"
0012 
0013 #include "FWCore/Framework/interface/ConsumesCollector.h"
0014 #include "FWCore/Framework/interface/ESHandle.h"
0015 #include "FWCore/Framework/interface/Event.h"
0016 #include "FWCore/Framework/interface/EventSetup.h"
0017 #include "FWCore/Framework/interface/MakerMacros.h"
0018 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0019 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0020 
0021 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0022 
0023 #include "SimDataFormats/CaloHit/interface/PCaloHit.h"
0024 #include "SimDataFormats/CaloHit/interface/PCaloHitContainer.h"
0025 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
0026 #include "SimDataFormats/ValidationFormats/interface/PValidationFormats.h"
0027 
0028 #include <fstream>
0029 #include <iostream>
0030 #include <map>
0031 #include <vector>
0032 
0033 class EcalPreshowerSimHitsValidation : public DQMEDAnalyzer {
0034   typedef std::map<uint32_t, float, std::less<uint32_t>> MapType;
0035 
0036 public:
0037   /// Constructor
0038   EcalPreshowerSimHitsValidation(const edm::ParameterSet &ps);
0039 
0040 protected:
0041   void bookHistograms(DQMStore::IBooker &ib, edm::Run const &, edm::EventSetup const &c) override;
0042 
0043   /// Analyze
0044   void analyze(const edm::Event &e, const edm::EventSetup &c) override;
0045 
0046 private:
0047   std::string g4InfoLabel;
0048   std::string EEHitsCollection;
0049   std::string ESHitsCollection;
0050 
0051   edm::EDGetTokenT<edm::HepMCProduct> HepMCToken;
0052   edm::EDGetTokenT<edm::PCaloHitContainer> EEHitsToken;
0053   edm::EDGetTokenT<edm::PCaloHitContainer> ESHitsToken;
0054 
0055   bool verbose_;
0056 
0057   MonitorElement *menESHits1zp_;
0058   MonitorElement *menESHits2zp_;
0059 
0060   MonitorElement *menESHits1zm_;
0061   MonitorElement *menESHits2zm_;
0062 
0063   MonitorElement *meEShitLog10Energy_;
0064   MonitorElement *meEShitLog10EnergyNorm_;
0065 
0066   MonitorElement *meESEnergyHits1zp_;
0067   MonitorElement *meESEnergyHits2zp_;
0068 
0069   MonitorElement *meESEnergyHits1zm_;
0070   MonitorElement *meESEnergyHits2zm_;
0071 
0072   MonitorElement *meE1alphaE2zp_;
0073   MonitorElement *meE1alphaE2zm_;
0074 
0075   MonitorElement *meEEoverESzp_;
0076   MonitorElement *meEEoverESzm_;
0077 
0078   MonitorElement *me2eszpOver1eszp_;
0079   MonitorElement *me2eszmOver1eszm_;
0080 };
0081 
0082 #endif