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.

References HLT_2022v12_cff::InputTag.

15  : tokens_({cc.consumes<double>(edm::InputTag("fixedGridRhoFastjetAll")),
16  cc.consumes<double>(edm::InputTag("fixedGridRhoAll"))}) {}
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
const std::vector< edm::EDGetTokenT< double > > tokens_

Member Function Documentation

◆ getAuxVariables()

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

Definition at line 18 of file MVAVariableHelper.h.

References iEvent, and tokens_.

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

18  {
19  return std::vector<float>{static_cast<float>(iEvent.get(tokens_[0])), static_cast<float>(iEvent.get(tokens_[1]))};
20  }
int iEvent
Definition: GenABIO.cc:224
const std::vector< edm::EDGetTokenT< double > > tokens_

◆ indexMap()

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

Definition at line 22 of file MVAVariableHelper.h.

Referenced by ElectronMVAEstimatorRun2::ElectronMVAEstimatorRun2().

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().