File indexing completed on 2024-04-06 12:06:34
0001 #ifndef DPGAnalysis_SiStripTools_DigiVtxPosCorrHistogramMaker_H
0002 #define DPGAnalysis_SiStripTools_DigiVtxPosCorrHistogramMaker_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/GeneratorProducts/interface/HepMCProduct.h"
0009
0010 namespace edm {
0011 class ParameterSet;
0012 class Event;
0013 }
0014 class TH2F;
0015 class TProfile;
0016 class TFileDirectory;
0017
0018 class DigiVtxPosCorrHistogramMaker {
0019 public:
0020 DigiVtxPosCorrHistogramMaker(edm::ConsumesCollector&& iC);
0021 DigiVtxPosCorrHistogramMaker(const edm::ParameterSet& iConfig, edm::ConsumesCollector&& iC);
0022
0023 ~DigiVtxPosCorrHistogramMaker();
0024
0025 void book(const std::string dirname, const std::map<unsigned int, std::string>& labels);
0026 void book(const std::string dirname);
0027 void beginRun(const unsigned int nrun);
0028 void fill(const edm::Event& iEvent, const std::map<unsigned int, int>& ndigi);
0029
0030 private:
0031 edm::EDGetTokenT<edm::HepMCProduct> m_mcvtxcollectionToken;
0032 std::string m_hitname;
0033 const int m_nbins;
0034 const int m_scalefact;
0035 std::map<unsigned int, int> m_binmax;
0036 std::map<unsigned int, std::string> m_labels;
0037
0038 std::map<unsigned int, TH2F*> m_nmultvsvtxpos;
0039 std::map<unsigned int, TProfile*> m_nmultvsvtxposprof;
0040 std::map<unsigned int, TFileDirectory*> m_subdirs;
0041 };
0042
0043 #endif