Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 10:06:13

0001 #ifndef BPhysicsSpectrum_H
0002 #define BPhysicsSpectrum_H
0003 
0004 /*class BPhysicsSpectrum
0005  *  
0006  *  Class to fill Event Generator dqm monitor elements; works on HepMCProduct
0007  *
0008  *
0009  */
0010 #include <iostream>
0011 #include "TMath.h"
0012 // framework & common header files
0013 
0014 #include "FWCore/Framework/interface/Event.h"
0015 #include "FWCore/Framework/interface/EventSetup.h"
0016 #include "FWCore/Framework/interface/Run.h"
0017 
0018 #include "DataFormats/Common/interface/Handle.h"
0019 #include "FWCore/Framework/interface/ESHandle.h"
0020 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0021 #include "FWCore/Utilities/interface/InputTag.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 "DataFormats/HepMCCandidate/interface/GenParticle.h"
0029 #include "DataFormats/HepMCCandidate/interface/GenParticle.h"
0030 #include "DataFormats/HepMCCandidate/interface/GenParticleFwd.h"
0031 
0032 #include "Validation/EventGenerator/interface/DQMHelper.h"
0033 
0034 class BPhysicsSpectrum : public DQMEDAnalyzer {
0035 public:
0036   explicit BPhysicsSpectrum(const edm::ParameterSet &);
0037   ~BPhysicsSpectrum() override;
0038 
0039   void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override;
0040   void analyze(edm::Event const &, edm::EventSetup const &) override;
0041 
0042 private:
0043   MonitorElement *mass, *Nobj;
0044   edm::InputTag genparticleCollection_;
0045   edm::EDGetTokenT<reco::GenParticleCollection> genparticleCollectionToken_;
0046   std::string name;
0047   double mass_min, mass_max;
0048   std::vector<int> Particles;
0049 };
0050 
0051 #endif