CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
TtFullHadSignalSelMVAComputer Class Reference

#include <TtFullHadSignalSelMVAComputer.h>

Inheritance diagram for TtFullHadSignalSelMVAComputer:
edm::stream::EDProducer<>

Public Member Functions

 TtFullHadSignalSelMVAComputer (const edm::ParameterSet &)
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Member Functions

void produce (edm::Event &evt, const edm::EventSetup &setup) override
 

Private Attributes

edm::EDGetTokenT< std::vector< pat::Jet > > jetsToken_
 
PhysicsTools::MVAComputerCache mvaComputer
 
edm::ESGetToken< PhysicsTools::Calibration::MVAComputerContainer, TtFullHadSignalSelMVARcdmvaToken_
 
edm::EDPutTokenT< double > putToken_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 18 of file TtFullHadSignalSelMVAComputer.h.

Constructor & Destructor Documentation

◆ TtFullHadSignalSelMVAComputer()

TtFullHadSignalSelMVAComputer::TtFullHadSignalSelMVAComputer ( const edm::ParameterSet cfg)
explicit

Definition at line 13 of file TtFullHadSignalSelMVAComputer.cc.

14  : mvaToken_(esConsumes()),
15  jetsToken_(consumes<std::vector<pat::Jet> >(cfg.getParameter<edm::InputTag>("jets"))),
16  putToken_(produces("DiscSel")) {}
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
edm::ESGetToken< PhysicsTools::Calibration::MVAComputerContainer, TtFullHadSignalSelMVARcd > mvaToken_
edm::EDGetTokenT< std::vector< pat::Jet > > jetsToken_

Member Function Documentation

◆ produce()

void TtFullHadSignalSelMVAComputer::produce ( edm::Event evt,
const edm::EventSetup setup 
)
overrideprivate

Definition at line 18 of file TtFullHadSignalSelMVAComputer.cc.

References edm::Event::emplace(), evaluateTtFullHadSignalSel(), edm::Event::get(), PDWG_EXODelayedJetMET_cff::jets, jetsToken_, mvaComputer, mvaToken_, putToken_, corrVsCorr::selection, singleTopDQM_cfi::setup, and PhysicsTools::MVAComputerCache::update().

18  {
19  mvaComputer.update(&setup.getData(mvaToken_), "ttFullHadSignalSelMVA");
20 
21  const auto& jets = evt.get(jetsToken_);
22 
23  //calculation of InputVariables
24  //see TopQuarkAnalysis/TopTools/interface/TtFullHadSignalSel.h
25  // /src/TtFullHadSignalSel.cc
26  //all objects, jets, which are needed for the calculation
27  //of the input-variables have to be passed to this class
29 
31 
32  evt.emplace(putToken_, discrim);
33 }
bool get(ProductID const &oid, Handle< PROD > &result) const
Definition: Event.h:347
selection
main part
Definition: corrVsCorr.py:100
edm::ESGetToken< PhysicsTools::Calibration::MVAComputerContainer, TtFullHadSignalSelMVARcd > mvaToken_
edm::EDGetTokenT< std::vector< pat::Jet > > jetsToken_
bool update(const Calibration::MVAComputer *computer)
OrphanHandle< PROD > emplace(EDPutTokenT< PROD > token, Args &&... args)
puts a new product
Definition: Event.h:434
PhysicsTools::MVAComputerCache mvaComputer
double evaluateTtFullHadSignalSel(PhysicsTools::MVAComputerCache &mvaComputer, const TtFullHadSignalSel &sigsel, double weight=1.0, const bool isSignal=false)

Member Data Documentation

◆ jetsToken_

edm::EDGetTokenT<std::vector<pat::Jet> > TtFullHadSignalSelMVAComputer::jetsToken_
private

Definition at line 26 of file TtFullHadSignalSelMVAComputer.h.

Referenced by produce().

◆ mvaComputer

PhysicsTools::MVAComputerCache TtFullHadSignalSelMVAComputer::mvaComputer
private

Definition at line 29 of file TtFullHadSignalSelMVAComputer.h.

Referenced by produce().

◆ mvaToken_

Definition at line 25 of file TtFullHadSignalSelMVAComputer.h.

Referenced by produce().

◆ putToken_

edm::EDPutTokenT<double> TtFullHadSignalSelMVAComputer::putToken_
private

Definition at line 27 of file TtFullHadSignalSelMVAComputer.h.

Referenced by produce().