CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
TagCorrelationPlotter Class Reference

#include <TagCorrelationPlotter.h>

Inheritance diagram for TagCorrelationPlotter:
BaseBTagPlotter

Public Member Functions

void analyzeTags (const reco::JetTag &jetTag1, const reco::JetTag &jetTag2, int jetFlavour, float w=1)
 
void analyzeTags (float discr1, float discr2, int jetFlavour, float w=1)
 
void epsPlot (const std::string &name) override
 
void finalize (DQMStore::IBooker &ibook_, DQMStore::IGetter &igetter_) override
 
void psPlot (const std::string &name) override
 
 TagCorrelationPlotter (const std::string &tagName1, const std::string &tagName2, const EtaPtBin &etaPtBin, const edm::ParameterSet &pSet, unsigned int mc, bool doCTagPlots, bool finalize, DQMStore::IBooker &ibook)
 
 ~TagCorrelationPlotter () override
 
- Public Member Functions inherited from BaseBTagPlotter
 BaseBTagPlotter (const std::string &tagName, const EtaPtBin &etaPtBin)
 
const EtaPtBinetaPtBin ()
 
virtual ~BaseBTagPlotter ()
 

Protected Attributes

std::unique_ptr< FlavourHistograms2D< double, double > > correlationHisto_
 
bool createProfile_
 
bool doCTagPlots_
 
std::unique_ptr< EffPurFromHistos2DeffPurFromHistos2D
 
double endEffPur_
 
bool finalize_
 
std::vector< double > fixedEff_
 
double lowerBound1_
 
double lowerBound2_
 
unsigned int mcPlots_
 
int nBinEffPur_
 
double startEffPur_
 
double upperBound1_
 
double upperBound2_
 
- Protected Attributes inherited from BaseBTagPlotter
const EtaPtBin etaPtBin_
 
const std::string tagName_
 
const std::string theExtensionString
 

Detailed Description

Definition at line 12 of file TagCorrelationPlotter.h.

Constructor & Destructor Documentation

TagCorrelationPlotter::TagCorrelationPlotter ( const std::string &  tagName1,
const std::string &  tagName2,
const EtaPtBin etaPtBin,
const edm::ParameterSet pSet,
unsigned int  mc,
bool  doCTagPlots,
bool  finalize,
DQMStore::IBooker ibook 
)

Definition at line 9 of file TagCorrelationPlotter.cc.

References correlationHisto_, createProfile_, finalize_, lowerBound1_, lowerBound2_, CaloTowersParam_cfi::mc, BaseBTagPlotter::theExtensionString, upperBound1_, and upperBound2_.

11  :
12  BaseBTagPlotter(tagName2 + "_vs_" + tagName1, etaPtBin),
13  lowerBound1_(pSet.getParameter<double>("Discr1Start")),
14  lowerBound2_(pSet.getParameter<double>("Discr2Start")),
15  upperBound1_(pSet.getParameter<double>("Discr1End")),
16  upperBound2_(pSet.getParameter<double>("Discr2End")),
17  nBinEffPur_(pSet.getParameter<int>("nBinEffPur")),
18  startEffPur_(pSet.getParameter<double>("startEffPur")),
19  endEffPur_(pSet.getParameter<double>("endEffPur")),
20  createProfile_(pSet.getParameter<bool>("CreateProfile")),
21  fixedEff_(pSet.getParameter<vector<double>>("fixedEff")),
22  mcPlots_(mc), doCTagPlots_(doCTagPlots), finalize_(finalize)
23  {
24  if (finalize_) return;
25  correlationHisto_ = std::make_unique<FlavourHistograms2D<double, double>>(
26  "correlation" + theExtensionString, tagName2 + " discr vs " + tagName1 + " discr",
28  "TagCorrelation" + theExtensionString, mc, createProfile_, ibook);
29  correlationHisto_->settitle(tagName1.c_str(), tagName2.c_str());
30 }
T getParameter(std::string const &) const
std::unique_ptr< FlavourHistograms2D< double, double > > correlationHisto_
const std::string theExtensionString
std::vector< double > fixedEff_
void finalize(DQMStore::IBooker &ibook_, DQMStore::IGetter &igetter_) override
BaseBTagPlotter(const std::string &tagName, const EtaPtBin &etaPtBin)
TagCorrelationPlotter::~TagCorrelationPlotter ( )
override

Definition at line 32 of file TagCorrelationPlotter.cc.

32 {}

Member Function Documentation

void TagCorrelationPlotter::analyzeTags ( const reco::JetTag jetTag1,
const reco::JetTag jetTag2,
int  jetFlavour,
float  w = 1 
)

Definition at line 39 of file TagCorrelationPlotter.cc.

References correlationHisto_.

Referenced by psPlot().

39  {
40  correlationHisto_->fill(jetFlavour, jetTag1.second, jetTag2.second, w);
41 }
std::unique_ptr< FlavourHistograms2D< double, double > > correlationHisto_
const double w
Definition: UKUtility.cc:23
void TagCorrelationPlotter::analyzeTags ( float  discr1,
float  discr2,
int  jetFlavour,
float  w = 1 
)

Definition at line 43 of file TagCorrelationPlotter.cc.

References correlationHisto_.

void TagCorrelationPlotter::epsPlot ( const std::string &  name)
overridevirtual

Implements BaseBTagPlotter.

Definition at line 34 of file TagCorrelationPlotter.cc.

References effPurFromHistos2D.

35 {
36  effPurFromHistos2D->epsPlot(name);
37 }
std::unique_ptr< EffPurFromHistos2D > effPurFromHistos2D
void TagCorrelationPlotter::finalize ( DQMStore::IBooker ibook_,
DQMStore::IGetter igetter_ 
)
overridevirtual

Implements BaseBTagPlotter.

Definition at line 47 of file TagCorrelationPlotter.cc.

References correlationHisto_, createProfile_, doCTagPlots_, effPurFromHistos2D, endEffPur_, fixedEff_, lowerBound1_, lowerBound2_, mcPlots_, nBinEffPur_, startEffPur_, BaseBTagPlotter::theExtensionString, upperBound1_, and upperBound2_.

48 {
49 
50  correlationHisto_ = std::make_unique<FlavourHistograms2D<double, double>>("correlation" + theExtensionString, " discr vs discr",
52  "TagCorrelation" + theExtensionString, mcPlots_, createProfile_, igetter_);
53 
54  effPurFromHistos2D = std::make_unique<EffPurFromHistos2D>(*correlationHisto_, "TagCorrelation" + theExtensionString, mcPlots_, ibook_,
56  effPurFromHistos2D->doCTagPlots(doCTagPlots_);
57  effPurFromHistos2D->compute(ibook_, fixedEff_);
58 }
std::unique_ptr< FlavourHistograms2D< double, double > > correlationHisto_
const std::string theExtensionString
std::vector< double > fixedEff_
std::unique_ptr< EffPurFromHistos2D > effPurFromHistos2D
void TagCorrelationPlotter::psPlot ( const std::string &  name)
inlineoverridevirtual

Member Data Documentation

std::unique_ptr<FlavourHistograms2D<double, double> > TagCorrelationPlotter::correlationHisto_
protected

Definition at line 41 of file TagCorrelationPlotter.h.

Referenced by analyzeTags(), finalize(), and TagCorrelationPlotter().

bool TagCorrelationPlotter::createProfile_
protected

Definition at line 33 of file TagCorrelationPlotter.h.

Referenced by finalize(), and TagCorrelationPlotter().

bool TagCorrelationPlotter::doCTagPlots_
protected

Definition at line 38 of file TagCorrelationPlotter.h.

Referenced by finalize().

std::unique_ptr<EffPurFromHistos2D> TagCorrelationPlotter::effPurFromHistos2D
protected

Definition at line 43 of file TagCorrelationPlotter.h.

Referenced by epsPlot(), and finalize().

double TagCorrelationPlotter::endEffPur_
protected

Definition at line 32 of file TagCorrelationPlotter.h.

Referenced by finalize().

bool TagCorrelationPlotter::finalize_
protected

Definition at line 39 of file TagCorrelationPlotter.h.

Referenced by TagCorrelationPlotter().

std::vector<double> TagCorrelationPlotter::fixedEff_
protected

Definition at line 35 of file TagCorrelationPlotter.h.

Referenced by finalize().

double TagCorrelationPlotter::lowerBound1_
protected

Definition at line 28 of file TagCorrelationPlotter.h.

Referenced by finalize(), and TagCorrelationPlotter().

double TagCorrelationPlotter::lowerBound2_
protected

Definition at line 28 of file TagCorrelationPlotter.h.

Referenced by finalize(), and TagCorrelationPlotter().

unsigned int TagCorrelationPlotter::mcPlots_
protected

Definition at line 37 of file TagCorrelationPlotter.h.

Referenced by finalize().

int TagCorrelationPlotter::nBinEffPur_
protected

Definition at line 30 of file TagCorrelationPlotter.h.

Referenced by finalize().

double TagCorrelationPlotter::startEffPur_
protected

Definition at line 31 of file TagCorrelationPlotter.h.

Referenced by finalize().

double TagCorrelationPlotter::upperBound1_
protected

Definition at line 29 of file TagCorrelationPlotter.h.

Referenced by finalize(), and TagCorrelationPlotter().

double TagCorrelationPlotter::upperBound2_
protected

Definition at line 29 of file TagCorrelationPlotter.h.

Referenced by finalize(), and TagCorrelationPlotter().