Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-11-19 00:05:22

0001 #ifndef BASICGENPARICLEVALIDATION_H
0002 #define BASICGENPARICLEVALIDATION_H
0003 
0004 /*class BasicGenParticleValidation
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 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0022 
0023 //DQM services
0024 #include "DQMServices/Core/interface/DQMStore.h"
0025 #include "FWCore/ServiceRegistry/interface/Service.h"
0026 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0027 
0028 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
0029 #include "DataFormats/HepMCCandidate/interface/GenParticle.h"
0030 #include "DataFormats/JetReco/interface/GenJetCollection.h"
0031 
0032 #include "SimGeneral/HepPDTRecord/interface/ParticleDataTable.h"
0033 
0034 #include "Validation/EventGenerator/interface/WeightManager.h"
0035 
0036 class BasicGenParticleValidation : public DQMEDAnalyzer {
0037 public:
0038   explicit BasicGenParticleValidation(const edm::ParameterSet &);
0039   ~BasicGenParticleValidation() override;
0040 
0041   void analyze(const edm::Event &, const edm::EventSetup &) override;
0042   void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override;
0043 
0044   bool matchParticles(const HepMC::GenParticle *&, const reco::GenParticle *&);
0045 
0046 private:
0047   WeightManager wmanager_;
0048   edm::InputTag hepmcCollection_;
0049   edm::InputTag genparticleCollection_;
0050   edm::InputTag genjetCollection_;
0051   double matchPr_;
0052 
0053   unsigned int verbosity_;
0054   bool signalParticlesOnly_;
0055 
0056   MonitorElement *nEvt;
0057 
0058   // Basic reco::GenParticle test
0059 
0060   MonitorElement *genPMultiplicity;
0061   MonitorElement *genMatched;
0062   MonitorElement *multipleMatching;
0063   MonitorElement *matchedResolution;
0064 
0065   // Basci GenJets analysis
0066 
0067   MonitorElement *genJetMult;
0068   MonitorElement *genJetEnergy;
0069   MonitorElement *genJetPt;
0070   MonitorElement *genJetEta;
0071   MonitorElement *genJetPhi;
0072   MonitorElement *genJetDeltaEtaMin;
0073 
0074   MonitorElement *genJetPto1;
0075   MonitorElement *genJetPto10;
0076   MonitorElement *genJetPto100;
0077   MonitorElement *genJetCentral;
0078 
0079   MonitorElement *genJetTotPt;
0080 
0081   edm::EDGetTokenT<edm::HepMCProduct> hepmcCollectionToken_;
0082   edm::EDGetTokenT<reco::GenParticleCollection> genparticleCollectionToken_;
0083   edm::EDGetTokenT<reco::GenJetCollection> genjetCollectionToken_;
0084 };
0085 
0086 #endif