Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-01-11 23:32:53

0001 #ifndef WVALIDATION_H
0002 #define WVALIDATION_H
0003 
0004 /*class WValidation
0005  *  
0006  *  Class to fill Event Generator dqm monitor elements; works on HepMCProduct
0007  *
0008  *
0009  */
0010 
0011 // framework & common header files
0012 #include "FWCore/Framework/interface/Event.h"
0013 #include "FWCore/Framework/interface/EventSetup.h"
0014 #include "FWCore/Framework/interface/Run.h"
0015 
0016 #include "DataFormats/Common/interface/Handle.h"
0017 #include "FWCore/Framework/interface/ESHandle.h"
0018 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0019 #include "FWCore/Utilities/interface/InputTag.h"
0020 
0021 //DQM services
0022 #include "DQMServices/Core/interface/DQMStore.h"
0023 #include "FWCore/ServiceRegistry/interface/Service.h"
0024 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0025 
0026 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
0027 
0028 #include "SimGeneral/HepPDTRecord/interface/ParticleDataTable.h"
0029 
0030 #include "Validation/EventGenerator/interface/WeightManager.h"
0031 
0032 class WValidation : public DQMEDAnalyzer {
0033 public:
0034   explicit WValidation(const edm::ParameterSet &);
0035   ~WValidation() override;
0036   void analyze(const edm::Event &, const edm::EventSetup &) override;
0037   void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override;
0038   void dqmBeginRun(const edm::Run &r, const edm::EventSetup &c) override;
0039 
0040 private:
0041   WeightManager wmanager_;
0042   edm::InputTag hepmcCollection_;
0043 
0044   /// PDT table
0045   edm::ESHandle<HepPDT::ParticleDataTable> fPDGTable;
0046   edm::ESGetToken<HepPDT::ParticleDataTable, edm::DefaultRecord> fPDGTableToken;
0047 
0048   MonitorElement *nEvt;
0049   MonitorElement *Wmass, *WmassPeak, /* *WmT, *WmTPeak, */ *Wpt, *WptLog, *Wrap, *Wdaughters;
0050   MonitorElement *lepmet_mT, *lepmet_mTPeak, *lepmet_pt, *lepmet_ptLog, *lepmet_rap;
0051   MonitorElement *leppt, *met, *lepeta;
0052   MonitorElement *gamma_energy, *cos_theta_gamma_lepton;
0053 
0054   /// decay flavor
0055   int _flavor;
0056   /// decay flavor name
0057   std::string _name;
0058 
0059   edm::EDGetTokenT<edm::HepMCProduct> hepmcCollectionToken_;
0060 };
0061 
0062 #endif