CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public 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 Public Member Functions

static std::unordered_map< std::string, int > indexMap ()
 

Private Attributes

const std::vector< edm::EDGetTokenT< double > > tokens_
 

Detailed Description

Definition at line 12 of file MVAVariableHelper.h.

Constructor & Destructor Documentation

◆ MVAVariableHelper()

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

Definition at line 14 of file MVAVariableHelper.h.

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

References HLT_FULL_cff::InputTag.

Member Function Documentation

◆ getAuxVariables()

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

Definition at line 18 of file MVAVariableHelper.h.

18  {
19  return std::vector<float>{static_cast<float>(iEvent.get(tokens_[0])), static_cast<float>(iEvent.get(tokens_[1]))};
20  }

References iEvent, and tokens_.

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

◆ indexMap()

static std::unordered_map<std::string, int> MVAVariableHelper::indexMap ( )
inlinestatic

Definition at line 22 of file MVAVariableHelper.h.

22  {
23  return {{"fixedGridRhoFastjetAll", 0}, {"fixedGridRhoAll", 1}};
24  }

Member Data Documentation

◆ tokens_

const std::vector<edm::EDGetTokenT<double> > MVAVariableHelper::tokens_
private

Definition at line 27 of file MVAVariableHelper.h.

Referenced by getAuxVariables().

MVAVariableHelper::tokens_
const std::vector< edm::EDGetTokenT< double > > tokens_
Definition: MVAVariableHelper.h:27
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:85964
iEvent
int iEvent
Definition: GenABIO.cc:224
cc
edm::InputTag
Definition: InputTag.h:15