File indexing completed on 2023-03-17 10:58:22
0001 #ifndef TaggingVariablePlotter_H
0002 #define TaggingVariablePlotter_H
0003
0004 #include <string>
0005 #include <vector>
0006
0007 #include "DQMOffline/RecoB/interface/BaseTagInfoPlotter.h"
0008 #include "DataFormats/BTauReco/interface/TaggingVariable.h"
0009 #include "DataFormats/BTauReco/interface/BaseTagInfo.h"
0010 #include "DQMOffline/RecoB/interface/FlavourHistorgrams.h"
0011 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0012
0013 class TaggingVariablePlotter : public BaseTagInfoPlotter {
0014 public:
0015 TaggingVariablePlotter(const std::string& tagName,
0016 const EtaPtBin& etaPtBin,
0017 const edm::ParameterSet& pSet,
0018 unsigned int mc,
0019 bool willFinalize,
0020 DQMStore::IBooker& ibook,
0021 const std::string& category = std::string());
0022
0023 ~TaggingVariablePlotter() override;
0024
0025 using BaseTagInfoPlotter::analyzeTag;
0026 void analyzeTag(const reco::BaseTagInfo* baseTagInfo, double jec, int jetFlavour, float w = 1) override;
0027 void analyzeTag(const reco::TaggingVariableList& variables, int jetFlavour, float w = 1);
0028
0029 void finalize(DQMStore::IBooker& ibook_, DQMStore::IGetter& igetter_) override {}
0030
0031 void epsPlot(const std::string& name) override {}
0032
0033 void psPlot(const std::string& name) override {}
0034
0035 private:
0036 unsigned int mcPlots_;
0037
0038 struct VariableConfig {
0039 VariableConfig(const std::string& name,
0040 const edm::ParameterSet& pSet,
0041 const std::string& category,
0042 const std::string& label,
0043 unsigned int mc,
0044 DQMStore::IBooker& ibook);
0045
0046 reco::TaggingVariableName var;
0047 unsigned int nBins;
0048 double min, max;
0049 bool logScale;
0050
0051 struct Plot {
0052 std::shared_ptr<FlavourHistograms<double> > histo;
0053 unsigned int index;
0054 };
0055
0056 std::vector<Plot> plots;
0057 std::string label;
0058 };
0059
0060 std::vector<VariableConfig> variables;
0061 };
0062
0063 #endif