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::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 TtFullHadSignalSelMVAComputer (const edm::ParameterSet &)
 
 ~TtFullHadSignalSelMVAComputer () override
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducer () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

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

Private Attributes

double DiscSel
 
edm::EDGetTokenT< std::vector< pat::Jet > > jetsToken_
 
PhysicsTools::MVAComputerCache mvaComputer
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

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  : jetsToken_(consumes<std::vector<pat::Jet> >(cfg.getParameter<edm::InputTag>("jets"))) {
15  produces<double>("DiscSel");
16 }

◆ ~TtFullHadSignalSelMVAComputer()

TtFullHadSignalSelMVAComputer::~TtFullHadSignalSelMVAComputer ( )
override

Definition at line 18 of file TtFullHadSignalSelMVAComputer.cc.

18 {}

Member Function Documentation

◆ beginJob()

void TtFullHadSignalSelMVAComputer::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDProducer.

Definition at line 51 of file TtFullHadSignalSelMVAComputer.cc.

51 {}

◆ endJob()

void TtFullHadSignalSelMVAComputer::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDProducer.

Definition at line 53 of file TtFullHadSignalSelMVAComputer.cc.

53 {}

◆ produce()

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

Implements edm::EDProducer.

Definition at line 20 of file TtFullHadSignalSelMVAComputer.cc.

20  {
21  std::unique_ptr<double> pOutDisc(new double);
22 
23  mvaComputer.update<TtFullHadSignalSelMVARcd>(setup, "ttFullHadSignalSelMVA");
24 
25  // read name of the last processor in the MVA calibration
26  // (to be used as meta information)
28  setup.get<TtFullHadSignalSelMVARcd>().get(calibContainer);
29  std::vector<PhysicsTools::Calibration::VarProcessor*> processors =
30  (calibContainer->find("ttFullHadSignalSelMVA")).getProcessors();
31 
34 
35  //calculation of InputVariables
36  //see TopQuarkAnalysis/TopTools/interface/TtFullHadSignalSel.h
37  // /src/TtFullHadSignalSel.cc
38  //all objects, jets, which are needed for the calculation
39  //of the input-variables have to be passed to this class
41 
43 
44  *pOutDisc = discrim;
45 
46  evt.put(std::move(pOutDisc), "DiscSel");
47 
48  DiscSel = discrim;
49 }

References DiscSel, evaluateTtFullHadSignalSel(), get, edm::Event::getByToken(), singleTopDQM_cfi::jets, jetsToken_, eostools::move(), mvaComputer, edm::Event::put(), corrVsCorr::selection, singleTopDQM_cfi::setup, and PhysicsTools::MVAComputerCache::update().

Member Data Documentation

◆ DiscSel

double TtFullHadSignalSelMVAComputer::DiscSel
private

Definition at line 32 of file TtFullHadSignalSelMVAComputer.h.

Referenced by produce().

◆ jetsToken_

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

Definition at line 28 of file TtFullHadSignalSelMVAComputer.h.

Referenced by produce().

◆ mvaComputer

PhysicsTools::MVAComputerCache TtFullHadSignalSelMVAComputer::mvaComputer
private

Definition at line 30 of file TtFullHadSignalSelMVAComputer.h.

Referenced by produce().

singleTopDQM_cfi.jets
jets
Definition: singleTopDQM_cfi.py:42
edm::Handle
Definition: AssociativeIterator.h:50
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
TtFullHadSignalSel
Definition: TtFullHadSignalSel.h:10
TtFullHadSignalSelMVARcd
Definition: TtFullHadSignalSelMVAComputer.h:15
corrVsCorr.selection
selection
main part
Definition: corrVsCorr.py:100
edm::ESHandle
Definition: DTSurvey.h:22
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:528
TtFullHadSignalSelMVAComputer::DiscSel
double DiscSel
Definition: TtFullHadSignalSelMVAComputer.h:32
evaluateTtFullHadSignalSel
double evaluateTtFullHadSignalSel(PhysicsTools::MVAComputerCache &mvaComputer, const TtFullHadSignalSel &sigsel, double weight=1.0, const bool isSignal=false)
Definition: TtFullHadSignalSelEval.h:13
edm::Event::put
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:132
get
#define get
TtFullHadSignalSelMVAComputer::jetsToken_
edm::EDGetTokenT< std::vector< pat::Jet > > jetsToken_
Definition: TtFullHadSignalSelMVAComputer.h:28
TtFullHadSignalSelMVAComputer::mvaComputer
PhysicsTools::MVAComputerCache mvaComputer
Definition: TtFullHadSignalSelMVAComputer.h:30
looper.cfg
cfg
Definition: looper.py:297
eostools.move
def move(src, dest)
Definition: eostools.py:511
PhysicsTools::MVAComputerCache::update
bool update(const Calibration::MVAComputer *computer)
Definition: MVAComputerCache.cc:15
edm::EDConsumerBase::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: EDConsumerBase.h:126
edm::InputTag
Definition: InputTag.h:15