Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:53:22

0001 #ifndef DPGAnalysis_SiStripTools_DigiVertexCorrHistogramMaker_H
0002 #define DPGAnalysis_SiStripTools_DigiVertexCorrHistogramMaker_H
0003 
0004 #include "FWCore/Framework/interface/ConsumesCollector.h"
0005 #include <string>
0006 #include <map>
0007 
0008 namespace edm {
0009   class ParameterSet;
0010   class Event;
0011   class Run;
0012 }  // namespace edm
0013 class TH2F;
0014 class TProfile;
0015 class TProfile2D;
0016 class TFileDirectory;
0017 class RunHistogramManager;
0018 
0019 class DigiVertexCorrHistogramMaker {
0020 public:
0021   DigiVertexCorrHistogramMaker();
0022   DigiVertexCorrHistogramMaker(const edm::ParameterSet& iConfig);
0023 
0024   ~DigiVertexCorrHistogramMaker();
0025 
0026   void book(const std::string dirname, const std::map<unsigned int, std::string>& labels, edm::ConsumesCollector&& iC);
0027   void book(const std::string dirname, edm::ConsumesCollector&& iC) { book(dirname, iC); }
0028   void book(const std::string dirname, edm::ConsumesCollector& iC);
0029   void beginRun(const edm::Run& iRun);
0030   void fill(const edm::Event& iEvent, const unsigned int nvtx, const std::map<unsigned int, int>& ndigi);
0031 
0032 private:
0033   std::map<unsigned int, RunHistogramManager*> m_fhm;
0034   bool m_runHisto;
0035   std::string m_hitname;
0036   const int m_nbins;
0037   const int m_scalefact;
0038   const int m_maxnvtx;
0039   std::map<unsigned int, int> m_binmax;
0040   std::map<unsigned int, std::string> m_labels;
0041 
0042   std::map<unsigned int, TH2F*> m_nmultvsnvtx;
0043   std::map<unsigned int, TProfile*> m_nmultvsnvtxprof;
0044   std::map<unsigned int, TProfile2D**> m_nmultvsnvtxvsbxprofrun;
0045   std::map<unsigned int, TFileDirectory*> m_subdirs;
0046 };
0047 
0048 #endif  //  DPGAnalysis_SiStripTools_DigiVertexCorrHistogramMaker_H