CMS 3D CMS Logo

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

#include <MVAVariableHelper.h>

Public Member Functions

const std::vector< float > getAuxVariables (const edm::Event &iEvent) const
 
 MVAVariableHelper (edm::ConsumesCollector &&cc)
 

Static Private Member Functions

static float getVariableFromDoubleToken (edm::EDGetToken const &token, const edm::Event &iEvent)
 

Private Attributes

const std::vector< edm::EDGetTokentokens_
 

Detailed Description

Definition at line 23 of file MVAVariableHelper.h.

Constructor & Destructor Documentation

◆ MVAVariableHelper()

MVAVariableHelper::MVAVariableHelper ( edm::ConsumesCollector &&  cc)

Definition at line 3 of file MVAVariableHelper.cc.

4  : tokens_({cc.consumes<double>(edm::InputTag("fixedGridRhoFastjetAll")),
5  cc.consumes<double>(edm::InputTag("fixedGridRhoAll"))}) {}

References HLT_2018_cff::InputTag.

Member Function Documentation

◆ getAuxVariables()

const std::vector< float > MVAVariableHelper::getAuxVariables ( const edm::Event iEvent) const

Definition at line 7 of file MVAVariableHelper.cc.

7  {
8  return std::vector<float>{getVariableFromDoubleToken(tokens_[0], iEvent),
10 }

References getVariableFromDoubleToken(), iEvent, and tokens_.

Referenced by PhotonMVANtuplizer::analyze(), and ElectronMVANtuplizer::analyze().

◆ getVariableFromDoubleToken()

static float MVAVariableHelper::getVariableFromDoubleToken ( edm::EDGetToken const &  token,
const edm::Event iEvent 
)
inlinestaticprivate

Definition at line 30 of file MVAVariableHelper.h.

30  {
32  iEvent.getByToken(token, handle);
33  return *handle;
34  }

References patZpeak::handle, iEvent, and unpackBuffers-CaloStage2::token.

Referenced by getAuxVariables().

Member Data Documentation

◆ tokens_

const std::vector<edm::EDGetToken> MVAVariableHelper::tokens_
private

Definition at line 36 of file MVAVariableHelper.h.

Referenced by getAuxVariables().

patZpeak.handle
handle
Definition: patZpeak.py:23
edm::Handle< double >
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
iEvent
int iEvent
Definition: GenABIO.cc:224
cc
MVAVariableHelper::tokens_
const std::vector< edm::EDGetToken > tokens_
Definition: MVAVariableHelper.h:36
MVAVariableHelper::getVariableFromDoubleToken
static float getVariableFromDoubleToken(edm::EDGetToken const &token, const edm::Event &iEvent)
Definition: MVAVariableHelper.h:30
edm::InputTag
Definition: InputTag.h:15
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:316