00001 #ifndef BASICGENPARICLEVALIDATION_H 00002 #define BASICGENPARICLEVALIDATION_H 00003 00004 /*class BasicGenParticleValidation 00005 * 00006 * Class to fill Event Generator dqm monitor elements; works on HepMCProduct 00007 * 00008 * $Date: 2011/12/29 10:53:10 $ 00009 * $Revision: 1.3 $ 00010 * 00011 */ 00012 00013 // framework & common header files 00014 #include "FWCore/Framework/interface/EDAnalyzer.h" 00015 #include "FWCore/Framework/interface/Event.h" 00016 #include "FWCore/Framework/interface/EventSetup.h" 00017 #include "FWCore/Framework/interface/Run.h" 00018 00019 #include "DataFormats/Common/interface/Handle.h" 00020 #include "FWCore/Framework/interface/ESHandle.h" 00021 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00022 #include "FWCore/Utilities/interface/InputTag.h" 00023 00024 #include "FWCore/MessageLogger/interface/MessageLogger.h" 00025 00026 //DQM services 00027 #include "DQMServices/Core/interface/DQMStore.h" 00028 #include "FWCore/ServiceRegistry/interface/Service.h" 00029 #include "DQMServices/Core/interface/MonitorElement.h" 00030 00031 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" 00032 #include "DataFormats/HepMCCandidate/interface/GenParticle.h" 00033 #include "DataFormats/JetReco/interface/GenJetCollection.h" 00034 00035 #include "SimGeneral/HepPDTRecord/interface/ParticleDataTable.h" 00036 00037 #include "Validation/EventGenerator/interface/WeightManager.h" 00038 00039 class BasicGenParticleValidation : public edm::EDAnalyzer 00040 { 00041 public: 00042 explicit BasicGenParticleValidation(const edm::ParameterSet&); 00043 virtual ~BasicGenParticleValidation(); 00044 virtual void beginJob(); 00045 virtual void endJob(); 00046 virtual void analyze(const edm::Event&, const edm::EventSetup&); 00047 virtual void beginRun(const edm::Run&, const edm::EventSetup&); 00048 virtual void endRun(const edm::Run&, const edm::EventSetup&); 00049 00050 bool matchParticles(const HepMC::GenParticle*&, const reco::GenParticle*&); 00051 00052 private: 00053 00054 WeightManager _wmanager; 00055 00056 edm::InputTag hepmcCollection_; 00057 edm::InputTag genparticleCollection_; 00058 edm::InputTag genjetCollection_; 00059 double matchPr_; 00060 00061 unsigned int verbosity_; 00062 00064 edm::ESHandle<HepPDT::ParticleDataTable> fPDGTable ; 00065 00067 DQMStore *dbe; 00068 00069 MonitorElement *nEvt; 00070 00071 // Basic reco::GenParticle test 00072 00073 MonitorElement *genPMultiplicity; 00074 MonitorElement *genMatched; 00075 MonitorElement *multipleMatching; 00076 MonitorElement *matchedResolution; 00077 00078 // Basci GenJets analysis 00079 00080 MonitorElement *genJetMult; 00081 MonitorElement *genJetEnergy; 00082 MonitorElement *genJetPt; 00083 MonitorElement *genJetEta; 00084 MonitorElement *genJetPhi; 00085 MonitorElement *genJetDeltaEtaMin; 00086 00087 MonitorElement *genJetPto1; 00088 MonitorElement *genJetPto10; 00089 MonitorElement *genJetPto100; 00090 MonitorElement *genJetCentral; 00091 00092 MonitorElement *genJetTotPt; 00093 00094 }; 00095 00096 #endif