CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
JME::JetResolutionScaleFactor Class Reference

#include <JetResolution.h>

Public Member Functions

void dump () const
 
const JetResolutionObjectgetResolutionObject () const
 
float getScaleFactor (const JetParameters &parameters, Variation variation=Variation::NOMINAL) const
 
 JetResolutionScaleFactor (const std::string &filename)
 
 JetResolutionScaleFactor (const JetResolutionObject &object)
 
 JetResolutionScaleFactor ()
 

Static Public Member Functions

static const JetResolutionScaleFactor get (const edm::EventSetup &, const std::string &)
 

Private Attributes

std::shared_ptr< JetResolutionObjectm_object
 

Detailed Description

Definition at line 45 of file JetResolution.h.

Constructor & Destructor Documentation

JME::JetResolutionScaleFactor::JetResolutionScaleFactor ( const std::string &  filename)

Definition at line 39 of file JetResolution.cc.

References corrVsCorr::filename, and JME::JetResolution::m_object.

39  {
40  m_object = std::make_shared<JetResolutionObject>(filename);
41  }
std::shared_ptr< JetResolutionObject > m_object
Definition: JetResolution.h:69
JME::JetResolutionScaleFactor::JetResolutionScaleFactor ( const JetResolutionObject object)

Definition at line 43 of file JetResolution.cc.

References JME::JetResolution::m_object, and resolutioncreator_cfi::object.

43  {
44  m_object = std::make_shared<JetResolutionObject>(object);
45  }
std::shared_ptr< JetResolutionObject > m_object
Definition: JetResolution.h:69
JME::JetResolutionScaleFactor::JetResolutionScaleFactor ( )
inline

Definition at line 49 of file JetResolution.h.

References NOMINAL, AlCaHLTBitMon_QueryRunRegistry::string, and patPFMETCorrections_cff::variation.

49  {
50  // Empty
51  }

Member Function Documentation

void JME::JetResolutionScaleFactor::dump ( void  ) const
inline

Definition at line 59 of file JetResolution.h.

59  {
60  m_object->dump();
61  }
std::shared_ptr< JetResolutionObject > m_object
Definition: JetResolution.h:69
const JetResolutionScaleFactor JME::JetResolutionScaleFactor::get ( const edm::EventSetup setup,
const std::string &  label 
)
static
const JetResolutionObject* JME::JetResolutionScaleFactor::getResolutionObject ( ) const
inline

Definition at line 64 of file JetResolution.h.

64  {
65  return m_object.get();
66  }
std::shared_ptr< JetResolutionObject > m_object
Definition: JetResolution.h:69
float JME::JetResolutionScaleFactor::getScaleFactor ( const JetParameters parameters,
Variation  variation = Variation::NOMINAL 
) const

Definition at line 56 of file JetResolution.cc.

References JME::JetResolutionObject::Record::getParametersValues(), JME::JetResolution::m_object, record, and patPFMETCorrections_cff::variation.

Referenced by JetResolutionDemo::analyze(), and SmearedJetProducerT< T >::produce().

56  {
57  const JetResolutionObject::Record* record = m_object->getRecord(parameters);
58  if (! record)
59  return 1;
60 
61  const std::vector<float>& parameters_values = record->getParametersValues();
62  return parameters_values[static_cast<size_t>(variation)];
63  }
JetCorrectorParameters::Record record
Definition: classes.h:7
std::shared_ptr< JetResolutionObject > m_object
Definition: JetResolution.h:69

Member Data Documentation

std::shared_ptr<JetResolutionObject> JME::JetResolutionScaleFactor::m_object
private

Definition at line 69 of file JetResolution.h.