Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-10-20 10:42:32

0001 #ifndef DRELLYANVALIDATION_H
0002 #define DRELLYANVALIDATION_H
0003 
0004 /*class DrellYanValidation
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 DrellYanValidation : public DQMEDAnalyzer {
0033 public:
0034   explicit DrellYanValidation(const edm::ParameterSet &);
0035   ~DrellYanValidation() override;
0036 
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   void analyze(edm::Event const &, edm::EventSetup const &) override;
0040 
0041 private:
0042   WeightManager wmanager_;
0043   edm::InputTag hepmcCollection_;
0044 
0045   /// PDT table
0046   edm::ESHandle<HepPDT::ParticleDataTable> fPDGTable;
0047   edm::ESGetToken<HepPDT::ParticleDataTable, edm::DefaultRecord> fPDGTableToken;
0048 
0049   MonitorElement *nEvt;
0050   MonitorElement *Zmass, *ZmassPeak, *Zpt, *ZptLog, *Zrap, *Zdaughters;
0051   MonitorElement *dilep_mass, *dilep_massPeak, *dilep_pt, *dilep_ptLog, *dilep_rap;
0052   MonitorElement *leadpt, *secpt, *leadeta, *seceta;
0053   MonitorElement *gamma_energy, *cos_theta_gamma_lepton;
0054 
0055   /// decay flavor
0056   int _flavor;
0057   /// decay flavor name
0058   std::string _name;
0059 
0060   edm::EDGetTokenT<edm::HepMCProduct> hepmcCollectionToken_;
0061 };
0062 
0063 #endif