File indexing completed on 2024-04-06 12:06:34
0001 #ifndef DPGAnalysis_SiStripTools_DigiLumiCorrHistogramMaker_H
0002 #define DPGAnalysis_SiStripTools_DigiLumiCorrHistogramMaker_H
0003
0004 #include <string>
0005 #include <map>
0006 #include "FWCore/Framework/interface/ConsumesCollector.h"
0007 #include "FWCore/Utilities/interface/InputTag.h"
0008 #include "DataFormats/Luminosity/interface/LumiDetails.h"
0009
0010 namespace edm {
0011 class ParameterSet;
0012 class Event;
0013 class Run;
0014 }
0015 class TH2F;
0016 class TProfile;
0017 class TProfile2D;
0018 class TFileDirectory;
0019 class RunHistogramManager;
0020
0021 class DigiLumiCorrHistogramMaker {
0022 public:
0023 DigiLumiCorrHistogramMaker(edm::ConsumesCollector&& iC);
0024 DigiLumiCorrHistogramMaker(const edm::ParameterSet& iConfig, edm::ConsumesCollector&& iC);
0025
0026 ~DigiLumiCorrHistogramMaker();
0027
0028 void book(const std::string dirname, const std::map<unsigned int, std::string>& labels, edm::ConsumesCollector&& iC);
0029 void book(const std::string dirname, edm::ConsumesCollector&& iC) { book(dirname, iC); }
0030 void book(const std::string dirname, edm::ConsumesCollector& iC);
0031 void beginRun(const edm::Run& iRun);
0032 void fill(const edm::Event& iEvent, const std::map<unsigned int, int>& ndigi);
0033
0034 private:
0035 edm::EDGetTokenT<LumiDetails> m_lumiProducerToken;
0036 std::map<unsigned int, RunHistogramManager*> m_fhm;
0037 bool m_runHisto;
0038 std::string m_hitname;
0039 const int m_nbins;
0040 const int m_scalefact;
0041 const double m_maxlumi;
0042 std::map<unsigned int, int> m_binmax;
0043 std::map<unsigned int, std::string> m_labels;
0044
0045 std::map<unsigned int, TH2F*> m_nmultvslumi;
0046 std::map<unsigned int, TProfile*> m_nmultvslumiprof;
0047 std::map<unsigned int, TProfile2D**> m_nmultvslumivsbxprofrun;
0048 std::map<unsigned int, TFileDirectory*> m_subdirs;
0049 };
0050
0051 #endif