CMS 3D CMS Logo

List of all members | Public Member Functions
TagInfoPlotterFactory Class Reference

#include <TagInfoPlotterFactory.h>

Public Member Functions

std::unique_ptr< BaseTagInfoPlotterbuildPlotter (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)
 

Detailed Description

Definition at line 9 of file TagInfoPlotterFactory.h.

Member Function Documentation

std::unique_ptr< BaseTagInfoPlotter > TagInfoPlotterFactory::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 
)

Definition at line 17 of file TagInfoPlotterFactory.cc.

References Exception, CaloTowersParam_cfi::mc, and JetPlusTrackCorrections_cff::tagName.

Referenced by BTagPerformanceAnalyzerOnData::bookHistograms(), BTagPerformanceAnalyzerMC::bookHistograms(), and BTagPerformanceHarvester::dqmEndJob().

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 }