Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:08:57

0001 #ifndef DPGAnalysis_SiStripTools_DigiPileupCorrHistogramMaker_H
0002 #define DPGAnalysis_SiStripTools_DigiPileupCorrHistogramMaker_H
0003 
0004 #include <string>
0005 #include <map>
0006 #include "FWCore/Framework/interface/ConsumesCollector.h"
0007 #include "FWCore/Utilities/interface/InputTag.h"
0008 #include "SimDataFormats/PileupSummaryInfo/interface/PileupSummaryInfo.h"
0009 
0010 namespace edm {
0011   class ParameterSet;
0012   class Event;
0013 }  // namespace edm
0014 class TH2F;
0015 class TProfile;
0016 class TProfile2D;
0017 class TFileDirectory;
0018 
0019 class DigiPileupCorrHistogramMaker {
0020 public:
0021   DigiPileupCorrHistogramMaker(edm::ConsumesCollector&& iC);
0022   DigiPileupCorrHistogramMaker(const edm::ParameterSet& iConfig, edm::ConsumesCollector&& iC);
0023 
0024   ~DigiPileupCorrHistogramMaker();
0025 
0026   void book(const std::string dirname, const std::map<unsigned int, std::string>& labels);
0027   void book(const std::string dirname);
0028   void beginRun(const unsigned int nrun);
0029   void fill(const edm::Event& iEvent, const std::map<unsigned int, int>& ndigi);
0030 
0031 private:
0032   edm::EDGetTokenT<std::vector<PileupSummaryInfo> > m_pileupcollectionToken;
0033   bool m_useVisibleVertices;
0034   std::string m_hitname;
0035   const int m_nbins;
0036   const int m_scalefact;
0037   std::map<unsigned int, int> m_binmax;
0038   std::map<unsigned int, std::string> m_labels;
0039 
0040   std::map<unsigned int, TH2F*> m_nmultvsmclumi;
0041   std::map<unsigned int, TProfile*> m_nmultvsmclumiprof;
0042   std::map<unsigned int, TH2F*> m_nmultvsmcnvtx;
0043   std::map<unsigned int, TProfile*> m_nmultvsmcnvtxprof;
0044   std::map<unsigned int, TProfile2D*> m_nmultvsmcnvtxprof2d;
0045   std::map<unsigned int, TFileDirectory*> m_subdirs;
0046 
0047   const bool m_2dhisto;
0048   const int m_ootBX;
0049 };
0050 
0051 #endif  //  DPGAnalysis_SiStripTools_DigiPileupCorrHistogramMaker_H