Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:09:49

0001 #include "DQMOffline/RecoB/interface/TagInfoPlotterFactory.h"
0002 #include "DQMOffline/RecoB/interface/TrackCountingTagPlotter.h"
0003 #include "DQMOffline/RecoB/interface/TrackProbabilityTagPlotter.h"
0004 #include "DQMOffline/RecoB/interface/SoftLeptonTagPlotter.h"
0005 #include "DQMOffline/RecoB/interface/IPTagPlotter.h"
0006 #include "DataFormats/BTauReco/interface/JTATagInfo.h"
0007 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0008 #include "DataFormats/Candidate/interface/CandidateFwd.h"
0009 #include "DataFormats/BTauReco/interface/JetTagInfo.h"
0010 #include "DQMOffline/RecoB/interface/TaggingVariablePlotter.h"
0011 #include "FWCore/Utilities/interface/Exception.h"
0012 //#include "DQMOffline/RecoB/interface/Track2IPTagPlotter.h"
0013 
0014 using namespace std;
0015 
0016 std::unique_ptr<BaseTagInfoPlotter> TagInfoPlotterFactory::buildPlotter(const string& dataFormatType,
0017                                                                         const std::string& tagName,
0018                                                                         const EtaPtBin& etaPtBin,
0019                                                                         const edm::ParameterSet& pSet,
0020                                                                         const std::string& folderName,
0021                                                                         unsigned int mc,
0022                                                                         bool wf,
0023                                                                         DQMStore::IBooker& ibook) {
0024   if (dataFormatType == "TrackCounting") {
0025     return std::make_unique<TrackCountingTagPlotter>(folderName, etaPtBin, pSet, mc, wf, ibook);
0026   } else if (dataFormatType == "TrackProbability") {
0027     return std::make_unique<TrackProbabilityTagPlotter>(folderName, etaPtBin, pSet, mc, wf, ibook);
0028   } else if (dataFormatType == "SoftLepton") {
0029     return std::make_unique<SoftLeptonTagPlotter>(folderName, etaPtBin, pSet, mc, wf, ibook);
0030   } else if (dataFormatType == "TrackIP") {
0031     return std::make_unique<IPTagPlotter<reco::TrackRefVector, reco::JTATagInfo>>(
0032         folderName, etaPtBin, pSet, mc, wf, ibook);
0033   } else if (dataFormatType == "CandIP") {
0034     return std::make_unique<IPTagPlotter<std::vector<reco::CandidatePtr>, reco::JetTagInfo>>(
0035         folderName, etaPtBin, pSet, mc, wf, ibook);
0036   } else if (dataFormatType == "TaggingVariable") {
0037     return std::make_unique<TaggingVariablePlotter>(folderName, etaPtBin, pSet, mc, wf, ibook);
0038   }
0039   throw cms::Exception("Configuration")
0040       << "BTagPerformanceAnalysis: Unknown ExtendedTagInfo " << dataFormatType << endl
0041       << "Choose between TrackCounting, TrackProbability, SoftLepton, TrackIP, CandIP, TaggingVariable, GenericMVA\n";
0042 }