CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
< JetResolutionObject
m_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 m_object.

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

Definition at line 43 of file JetResolution.cc.

References m_object.

43  {
44  m_object = std::shared_ptr<JetResolutionObject>(new 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.

49  {
50  // Empty
51  }

Member Function Documentation

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

Definition at line 59 of file JetResolution.h.

References m_object.

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.

References m_object.

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(), m_object, and record.

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

56  {
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