CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
EGRegressionModifierDRN::partVars< T > Struct Template Reference

Public Member Functions

const void doUserFloat (T &part, const std::pair< float, float > &correction) const
 
const std::pair< float, float > getCorrection (T &part)
 
 partVars (const edm::ParameterSet &config, edm::ConsumesCollector &cc)
 

Public Attributes

const edm::ValueMap< std::pair< float, float > > * corrections
 
edm::InputTag correctionsSource
 
edm::EDGetTokenT< edm::ValueMap< std::pair< float, float > > > correctionsToken
 
std::string energyFloat
 
unsigned i
 
const edm::View< T > * particles
 
std::string resFloat
 
edm::InputTag source
 
edm::EDGetTokenT< edm::View< T > > token
 
bool userFloat
 

Detailed Description

template<typename T>
struct EGRegressionModifierDRN::partVars< T >

Definition at line 56 of file EGRegressionModifierDRN.cc.

Constructor & Destructor Documentation

◆ partVars()

template<typename T >
EGRegressionModifierDRN::partVars< T >::partVars ( const edm::ParameterSet config,
edm::ConsumesCollector cc 
)
inline

Definition at line 70 of file EGRegressionModifierDRN.cc.

References gpuPixelDoublets::cc, EGRegressionModifierDRN::partVars< T >::correctionsSource, EGRegressionModifierDRN::partVars< T >::correctionsToken, EGRegressionModifierDRN::partVars< T >::energyFloat, EGRegressionModifierDRN::partVars< T >::i, EGRegressionModifierDRN::partVars< T >::resFloat, EGRegressionModifierDRN::partVars< T >::source, AlCaHLTBitMon_QueryRunRegistry::string, EGRegressionModifierDRN::partVars< T >::token, and EGRegressionModifierDRN::partVars< T >::userFloat.

70  {
71  source = config.getParameter<edm::InputTag>("source");
72  token = cc.consumes(source);
73 
74  correctionsSource = config.getParameter<edm::InputTag>("correctionsSource");
76 
77  if (config.exists("energyFloat")) {
78  userFloat = true;
79  energyFloat = config.getParameter<std::string>("energyFloat");
80  resFloat = config.getParameter<std::string>("resFloat");
81  } else {
82  userFloat = false;
83  }
84 
85  i = 0;
86  }
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
Definition: config.py:1
edm::EDGetTokenT< edm::View< T > > token
edm::EDGetTokenT< edm::ValueMap< std::pair< float, float > > > correctionsToken

Member Function Documentation

◆ doUserFloat()

template<typename T >
const void EGRegressionModifierDRN::partVars< T >::doUserFloat ( T part,
const std::pair< float, float > &  correction 
) const
inline

◆ getCorrection()

template<typename T >
const std::pair< float, float > EGRegressionModifierDRN::partVars< T >::getCorrection ( T part)

Definition at line 210 of file EGRegressionModifierDRN.cc.

References pfMETCorrectionType0_cfi::correction, mps_fire::i, and primaryVertexAssociation_cfi::particles.

210  {
211  edm::Ptr<T> ptr = particles->ptrAt(i++);
212 
213  std::pair<float, float> correction = (*corrections)[ptr];
214 
215  return correction;
216 }

Member Data Documentation

◆ corrections

template<typename T >
const edm::ValueMap<std::pair<float, float> >* EGRegressionModifierDRN::partVars< T >::corrections

Definition at line 63 of file EGRegressionModifierDRN.cc.

◆ correctionsSource

template<typename T >
edm::InputTag EGRegressionModifierDRN::partVars< T >::correctionsSource

◆ correctionsToken

template<typename T >
edm::EDGetTokenT<edm::ValueMap<std::pair<float, float> > > EGRegressionModifierDRN::partVars< T >::correctionsToken

◆ energyFloat

template<typename T >
std::string EGRegressionModifierDRN::partVars< T >::energyFloat

◆ i

template<typename T >
unsigned EGRegressionModifierDRN::partVars< T >::i

◆ particles

template<typename T >
const edm::View<T>* EGRegressionModifierDRN::partVars< T >::particles

Definition at line 59 of file EGRegressionModifierDRN.cc.

◆ resFloat

template<typename T >
std::string EGRegressionModifierDRN::partVars< T >::resFloat

◆ source

template<typename T >
edm::InputTag EGRegressionModifierDRN::partVars< T >::source

◆ token

template<typename T >
edm::EDGetTokenT<edm::View<T> > EGRegressionModifierDRN::partVars< T >::token

◆ userFloat

template<typename T >
bool EGRegressionModifierDRN::partVars< T >::userFloat