CMS 3D CMS Logo

TagInfoPlotterFactory.cc
Go to the documentation of this file.
13 //#include "DQMOffline/RecoB/interface/Track2IPTagPlotter.h"
14 
15 using namespace std;
16 
17 std::unique_ptr<BaseTagInfoPlotter> TagInfoPlotterFactory::buildPlotter(const string& dataFormatType, const std::string & tagName,
18  const EtaPtBin& etaPtBin, const edm::ParameterSet& pSet,
19  const std::string& folderName, unsigned int mc,
20  bool wf, DQMStore::IBooker & ibook)
21 {
22  if (dataFormatType == "TrackCounting") {
23  return std::make_unique<TrackCountingTagPlotter>(folderName, etaPtBin, pSet, mc, wf, ibook);
24  } else if (dataFormatType == "TrackProbability") {
25  return std::make_unique<TrackProbabilityTagPlotter>(folderName, etaPtBin, pSet, mc, wf, ibook);
26  } else if (dataFormatType == "SoftLepton") {
27  return std::make_unique<SoftLeptonTagPlotter>(folderName, etaPtBin, pSet, mc, wf, ibook);
28  } else if (dataFormatType == "TrackIP") {
29  return std::make_unique<IPTagPlotter<reco::TrackRefVector, reco::JTATagInfo>>(folderName, etaPtBin, pSet, mc, wf, ibook);
30  } else if (dataFormatType == "CandIP") {
31  return std::make_unique<IPTagPlotter<std::vector<reco::CandidatePtr>, reco::JetTagInfo>>(folderName, etaPtBin, pSet, mc, wf, ibook);
32  } else if (dataFormatType == "TaggingVariable") {
33  return std::make_unique<TaggingVariablePlotter>(folderName, etaPtBin, pSet, mc, wf, ibook);
34  } else if (dataFormatType == "GenericMVA") {
35  return std::make_unique<MVAJetTagPlotter>(tagName, etaPtBin, pSet, folderName, mc, wf, ibook);
36  }
37  throw cms::Exception("Configuration")
38  << "BTagPerformanceAnalysis: Unknown ExtendedTagInfo " << dataFormatType << endl
39  << "Choose between TrackCounting, TrackProbability, SoftLepton, TrackIP, CandIP, TaggingVariable, GenericMVA\n";
40 }
std::unique_ptr< BaseTagInfoPlotter > buildPlotter(const std::string &dataFormatType, const std::string &tagName, const EtaPtBin &etaPtBin, const edm::ParameterSet &pSet, const std::string &folderName, unsigned int mc, bool wf, DQMStore::IBooker &ibook)