CMS 3D CMS Logo

Public Member Functions | Private Attributes

MVAJetTagPlotter Class Reference

#include <MVAJetTagPlotter.h>

Inheritance diagram for MVAJetTagPlotter:
BaseTagInfoPlotter BaseBTagPlotter

List of all members.

Public Member Functions

virtual void analyzeTag (const std::vector< const reco::BaseTagInfo * > &baseTagInfos, const int &jetFlavour)
void epsPlot (const std::string &name)
virtual void finalize ()
 MVAJetTagPlotter (const std::string &tagName, const EtaPtBin &etaPtBin, const edm::ParameterSet &pSet, const std::string &folderName, const bool &update, const bool &mc)
void psPlot (const std::string &name)
virtual void setEventSetup (const edm::EventSetup &setup)
virtual std::vector< std::string > tagInfoRequirements () const
 ~MVAJetTagPlotter ()

Private Attributes

std::vector
< TaggingVariablePlotter * > 
categoryPlotters
reco::TaggingVariableName categoryVariable
const GenericMVAJetTagComputercomputer
std::string jetTagComputer

Detailed Description

Definition at line 16 of file MVAJetTagPlotter.h.


Constructor & Destructor Documentation

MVAJetTagPlotter::MVAJetTagPlotter ( const std::string &  tagName,
const EtaPtBin etaPtBin,
const edm::ParameterSet pSet,
const std::string &  folderName,
const bool &  update,
const bool &  mc 
)

Definition at line 16 of file MVAJetTagPlotter.cc.

References categoryPlotters, categoryVariable, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), reco::getTaggingVariableName(), and i.

                                                   :
        BaseTagInfoPlotter(folderName, etaPtBin),
        jetTagComputer(tagName), computer(0),
        categoryVariable(btau::lastTaggingVariable)
{
        typedef std::vector<ParameterSet> VParameterSet;
        VParameterSet pSets;
        if (pSet.exists("categoryVariable")) {
                categoryVariable = getTaggingVariableName(
                        pSet.getParameter<string>("categoryVariable"));
                pSets = pSet.getParameter<VParameterSet>("categories");
        } else
                pSets.push_back(pSet);

        for(unsigned int i = 0; i != pSets.size(); ++i) {
                ostringstream ss;
                ss << "CAT" << i;
                categoryPlotters.push_back(
                        new TaggingVariablePlotter(folderName, etaPtBin,
                                                   pSets[i], update,mc,
                                                   i ? ss.str() : string()));
        }
}
MVAJetTagPlotter::~MVAJetTagPlotter ( )

Definition at line 45 of file MVAJetTagPlotter.cc.

References categoryPlotters.

{
        for_each(categoryPlotters.begin(), categoryPlotters.end(),
                 bind(&::operator delete, _1));
}

Member Function Documentation

virtual void MVAJetTagPlotter::analyzeTag ( const std::vector< const reco::BaseTagInfo * > &  baseTagInfos,
const int &  jetFlavour 
) [virtual]
void MVAJetTagPlotter::epsPlot ( const std::string &  name) [virtual]

Implements BaseBTagPlotter.

Definition at line 100 of file MVAJetTagPlotter.cc.

References categoryPlotters, and TaggingVariablePlotter::epsPlot().

{
        for_each(categoryPlotters.begin(), categoryPlotters.end(),
                 boost::bind(&TaggingVariablePlotter::epsPlot, _1, boost::ref(name)));
}
void MVAJetTagPlotter::finalize ( void  ) [virtual]

Implements BaseBTagPlotter.

Definition at line 82 of file MVAJetTagPlotter.cc.

References categoryPlotters, and TaggingVariablePlotter::finalize().

{
        for_each(categoryPlotters.begin(), categoryPlotters.end(),
                 bind(&TaggingVariablePlotter::finalize, _1));
}
void MVAJetTagPlotter::psPlot ( const std::string &  name) [virtual]

Implements BaseBTagPlotter.

Definition at line 88 of file MVAJetTagPlotter.cc.

References categoryPlotters, and TaggingVariablePlotter::psPlot().

{
        for_each(categoryPlotters.begin(), categoryPlotters.end(),
                 boost::bind(&TaggingVariablePlotter::psPlot, _1, boost::ref(name)));
}
void MVAJetTagPlotter::setEventSetup ( const edm::EventSetup setup) [virtual]

Reimplemented from BaseTagInfoPlotter.

Definition at line 51 of file MVAJetTagPlotter.cc.

References computer, Exception, edm::EventSetup::get(), patZpeak::handle, jetTagComputer, and edm::ESHandle< T >::product().

{
        ESHandle<JetTagComputer> handle;
        setup.get<JetTagComputerRecord>().get(jetTagComputer, handle);
        computer = dynamic_cast<const GenericMVAJetTagComputer*>(handle.product());

        if (!computer)
                throw cms::Exception("Configuration")
                        << "JetTagComputer passed to "
                           "MVAJetTagPlotter::analyzeTag is not a "
                           "GenericMVAJetTagComputer." << endl;
}
vector< string > MVAJetTagPlotter::tagInfoRequirements ( ) const [virtual]

Reimplemented from BaseTagInfoPlotter.

Definition at line 106 of file MVAJetTagPlotter.cc.

References computer, JetTagComputer::getInputLabels(), and L1TDQM_cfg::labels.

{
        vector<string> labels = computer->getInputLabels();
        if (labels.empty())
                labels.push_back("tagInfos");
        return labels;
}

Member Data Documentation

Definition at line 42 of file MVAJetTagPlotter.h.

Referenced by TrackProbabilityTagPlotter::analyzeTag(), and MVAJetTagPlotter().

std::string MVAJetTagPlotter::jetTagComputer [private]

Definition at line 39 of file MVAJetTagPlotter.h.

Referenced by setEventSetup().