CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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,
TtFullHadSignalSelMVARcd
mvaToken_
 
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 ( 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")) {}
edm::ESGetToken< PhysicsTools::Calibration::MVAComputerContainer, TtFullHadSignalSelMVARcd > mvaToken_
edm::EDGetTokenT< std::vector< pat::Jet > > jetsToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283

Member Function Documentation

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(), edm::EventSetup::getData(), fwrapper::jets, jetsToken_, mvaComputer, mvaToken_, putToken_, corrVsCorr::selection, 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 }
selection
main part
Definition: corrVsCorr.py:100
bool getData(T &iHolder) const
Definition: EventSetup.h:128
vector< PseudoJet > jets
bool get(ProductID const &oid, Handle< PROD > &result) const
Definition: Event.h:346
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:433
PhysicsTools::MVAComputerCache mvaComputer
double evaluateTtFullHadSignalSel(PhysicsTools::MVAComputerCache &mvaComputer, const TtFullHadSignalSel &sigsel, double weight=1.0, const bool isSignal=false)

Member Data Documentation

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

Definition at line 26 of file TtFullHadSignalSelMVAComputer.h.

Referenced by produce().

PhysicsTools::MVAComputerCache TtFullHadSignalSelMVAComputer::mvaComputer
private

Definition at line 29 of file TtFullHadSignalSelMVAComputer.h.

Referenced by produce().

Definition at line 25 of file TtFullHadSignalSelMVAComputer.h.

Referenced by produce().

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

Definition at line 27 of file TtFullHadSignalSelMVAComputer.h.

Referenced by produce().