Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef EcalSimHitsValidation_H
0002 #define EcalSimHitsValidation_H
0003 
0004 /*
0005  * \file EcalSimHitsValidation.h
0006  *
0007  * \author C.Rovelli
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/MakerMacros.h"
0016 
0017 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0018 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0019 
0020 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0021 
0022 #include "SimDataFormats/CaloHit/interface/PCaloHit.h"
0023 #include "SimDataFormats/CaloHit/interface/PCaloHitContainer.h"
0024 #include "SimDataFormats/EncodedEventId/interface/EncodedEventId.h"
0025 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
0026 #include "SimDataFormats/Track/interface/SimTrack.h"
0027 #include "SimDataFormats/Track/interface/SimTrackContainer.h"
0028 #include "SimDataFormats/ValidationFormats/interface/PValidationFormats.h"
0029 #include "SimDataFormats/Vertex/interface/SimVertex.h"
0030 #include "SimDataFormats/Vertex/interface/SimVertexContainer.h"
0031 
0032 #include <map>
0033 #include <vector>
0034 
0035 class EcalSimHitsValidation : public DQMEDAnalyzer {
0036   typedef std::map<uint32_t, float, std::less<uint32_t>> MapType;
0037 
0038 public:
0039   /// Constructor
0040   EcalSimHitsValidation(const edm::ParameterSet &ps);
0041 
0042 protected:
0043   void bookHistograms(DQMStore::IBooker &ib, edm::Run const &, edm::EventSetup const &c) override;
0044 
0045   /// Analyze
0046   void analyze(const edm::Event &e, const edm::EventSetup &c) override;
0047 
0048 private:
0049   std::string g4InfoLabel;
0050   edm::EDGetTokenT<edm::HepMCProduct> HepMCToken;
0051   edm::EDGetTokenT<edm::PCaloHitContainer> EBHitsCollectionToken;
0052   edm::EDGetTokenT<edm::PCaloHitContainer> EEHitsCollectionToken;
0053   edm::EDGetTokenT<edm::PCaloHitContainer> ESHitsCollectionToken;
0054 
0055   bool verbose_;
0056 
0057   MonitorElement *meGunEnergy_;
0058   MonitorElement *meGunEta_;
0059   MonitorElement *meGunPhi_;
0060 
0061   MonitorElement *meEBEnergyFraction_;
0062   MonitorElement *meEEEnergyFraction_;
0063   MonitorElement *meESEnergyFraction_;
0064 };
0065 
0066 #endif