RecoEgamma
EgammaTools
interface
MVAVariableHelper.h
Go to the documentation of this file.
1
#ifndef RecoEgamma_EgammaTools_MVAVariableHelper_H
2
#define RecoEgamma_EgammaTools_MVAVariableHelper_H
3
4
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
5
#include "
FWCore/Utilities/interface/EDGetToken.h
"
6
#include "
FWCore/Framework/interface/Event.h
"
7
8
#include <unordered_map>
9
#include <vector>
10
#include <string>
11
12
class
MVAVariableHelper
{
13
public
:
14
MVAVariableHelper
(
edm::ConsumesCollector
&&
cc
)
15
:
tokens_
({
cc
.consumes<
double
>(
edm::InputTag
(
"fixedGridRhoFastjetAll"
)),
16
cc
.consumes<
double
>(
edm::InputTag
(
"fixedGridRhoAll"
))}) {}
17
18
const
std::vector<float>
getAuxVariables
(
const
edm::Event
&
iEvent
)
const
{
19
return
std::vector<float>{static_cast<float>(
iEvent
.get(
tokens_
[0])), static_cast<float>(
iEvent
.get(
tokens_
[1]))};
20
}
21
22
static
std::unordered_map<std::string, int>
indexMap
() {
23
return
{{
"fixedGridRhoFastjetAll"
, 0}, {
"fixedGridRhoAll"
, 1}};
24
}
25
26
private
:
27
const
std::vector<edm::EDGetTokenT<double>>
tokens_
;
28
};
29
30
#endif
MVAVariableHelper::tokens_
const std::vector< edm::EDGetTokenT< double > > tokens_
Definition:
MVAVariableHelper.h:27
HLT_FULL_cff.InputTag
InputTag
Definition:
HLT_FULL_cff.py:89285
MVAVariableHelper::MVAVariableHelper
MVAVariableHelper(edm::ConsumesCollector &&cc)
Definition:
MVAVariableHelper.h:14
EDGetToken.h
MVAVariableHelper::indexMap
static std::unordered_map< std::string, int > indexMap()
Definition:
MVAVariableHelper.h:22
Event.h
iEvent
int iEvent
Definition:
GenABIO.cc:224
cc
MVAVariableHelper::getAuxVariables
const std::vector< float > getAuxVariables(const edm::Event &iEvent) const
Definition:
MVAVariableHelper.h:18
ConsumesCollector.h
edm::Event
Definition:
Event.h:73
MVAVariableHelper
Definition:
MVAVariableHelper.h:12
edm::InputTag
Definition:
InputTag.h:15
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
Generated for CMSSW Reference Manual by
1.8.16