CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
LumiCorrectionParam Class Reference

#include <LumiCorrectionParam.h>

Public Types

enum  LumiType { HF, PIXEL }
 

Public Member Functions

const std::map< unsigned int,
float > & 
afterglows () const
 get afterglow threshold/value More...
 
std::string amodetag () const
 
unsigned int beamegev () const
 
std::string corrFunc () const
 get correction function name More...
 
float getCorrection (float luminonorm) const
 get the final correction factor More...
 
float intglumi () const
 lumi integrated up to that run. Needed for 2011B correction, otherwise 0. More...
 
 LumiCorrectionParam ()
 default constructor More...
 
 LumiCorrectionParam (LumiType lumitype)
 
unsigned int ncollidingbunches () const
 get ncollidingbunches More...
 
const std::map< std::string,
float > & 
nonlinearCoeff () const
 get correction coefficients More...
 
std::string normtag () const
 get current normtag More...
 
void setafterglows (std::map< unsigned int, float > &afterglows)
 set afterglow thresholds More...
 
void setcorrFunc (const std::string &corrfunc)
 set correction function More...
 
void setdescription (const std::string &amodetag, unsigned int beamegev)
 set description More...
 
void setintglumi (float intglumi)
 set intglumi More...
 
void setNBX (unsigned int nbx)
 set ncollidingbunches More...
 
void setnonlinearCoeff (std::map< std::string, float > &coeffmap)
 set nonlinear constants More...
 
void setNormtag (const std::string &normtag)
 set current normtag More...
 
 ~LumiCorrectionParam ()
 destructor More...
 

Private Attributes

std::map< unsigned int, float > m_afterglows
 
std::string m_amodetag
 
float m_beamegev
 
std::map< std::string, float > m_coeffmap
 
std::string m_corrfunc
 
float m_intglumi
 
LumiType m_lumitype
 
unsigned int m_ncollidingbx
 
std::string m_normtag
 

Detailed Description

Definition at line 7 of file LumiCorrectionParam.h.

Member Enumeration Documentation

Enumerator
HF 
PIXEL 

Definition at line 9 of file LumiCorrectionParam.h.

Constructor & Destructor Documentation

LumiCorrectionParam::LumiCorrectionParam ( )
LumiCorrectionParam::LumiCorrectionParam ( LumiCorrectionParam::LumiType  lumitype)
explicit
LumiCorrectionParam::~LumiCorrectionParam ( )
inline

destructor

Definition at line 14 of file LumiCorrectionParam.h.

14 {}

Member Function Documentation

const std::map< unsigned int, float > & LumiCorrectionParam::afterglows ( ) const

get afterglow threshold/value

Definition at line 34 of file LumiCorrectionParam.cc.

References m_afterglows.

Referenced by operator<<(), and setafterglows().

34  {
35  return m_afterglows;
36 }
std::map< unsigned int, float > m_afterglows
std::string LumiCorrectionParam::amodetag ( ) const

on which amodetag this correction definition should be applied for information only

Definition at line 38 of file LumiCorrectionParam.cc.

References m_amodetag.

Referenced by operator<<(), and setdescription().

38  {
39  return m_amodetag;
40 }
unsigned int LumiCorrectionParam::beamegev ( ) const

on which single beam egev this correction definition should be applied for information only

Definition at line 42 of file LumiCorrectionParam.cc.

References m_beamegev.

Referenced by operator<<(), and setdescription().

42  {
43  return m_beamegev;
44 }
std::string LumiCorrectionParam::corrFunc ( ) const

get correction function name

Definition at line 26 of file LumiCorrectionParam.cc.

References m_corrfunc.

Referenced by operator<<().

26  {
27  return m_corrfunc;
28 }
float LumiCorrectionParam::getCorrection ( float  luminonorm) const

get the final correction factor

Definition at line 11 of file LumiCorrectionParam.cc.

References beamerCreator::create(), reco::get(), m_afterglows, m_coeffmap, m_corrfunc, m_intglumi, m_ncollidingbx, and mps_fire::result.

11  {
12  std::auto_ptr<lumi::NormFunctor> ptr(lumi::NormFunctorPluginFactory::get()->create(m_corrfunc));
13  (*ptr).initialize(m_coeffmap,m_afterglows);
14  float result=(*ptr).getCorrection(luminonorm,m_intglumi,m_ncollidingbx);
15  return result;
16 }
tuple result
Definition: mps_fire.py:84
std::map< std::string, float > m_coeffmap
std::map< unsigned int, float > m_afterglows
T get(const Candidate &c)
Definition: component.h:55
float luminonorm
Definition: normFunctors.py:62
float LumiCorrectionParam::intglumi ( ) const

lumi integrated up to that run. Needed for 2011B correction, otherwise 0.

Definition at line 46 of file LumiCorrectionParam.cc.

References m_intglumi.

Referenced by operator<<(), and setintglumi().

46  {
47  return m_intglumi;
48 }
unsigned int LumiCorrectionParam::ncollidingbunches ( ) const

get ncollidingbunches

Definition at line 18 of file LumiCorrectionParam.cc.

References m_ncollidingbx.

Referenced by operator<<().

18  {
19  return m_ncollidingbx;
20 }
const std::map< std::string, float > & LumiCorrectionParam::nonlinearCoeff ( ) const

get correction coefficients

Definition at line 30 of file LumiCorrectionParam.cc.

References m_coeffmap.

Referenced by operator<<().

30  {
31  return m_coeffmap;
32 }
std::map< std::string, float > m_coeffmap
std::string LumiCorrectionParam::normtag ( ) const

get current normtag

Definition at line 22 of file LumiCorrectionParam.cc.

References m_normtag.

Referenced by operator<<(), and setNormtag().

22  {
23  return m_normtag;
24 }
void LumiCorrectionParam::setafterglows ( std::map< unsigned int, float > &  afterglows)

set afterglow thresholds

Definition at line 66 of file LumiCorrectionParam.cc.

References afterglows(), and m_afterglows.

66  {
68 }
const std::map< unsigned int, float > & afterglows() const
get afterglow threshold/value
std::map< unsigned int, float > m_afterglows
void LumiCorrectionParam::setcorrFunc ( const std::string &  corrfunc)

set correction function

Definition at line 58 of file LumiCorrectionParam.cc.

References m_corrfunc.

58  {
59  m_corrfunc=corrfunc;
60 }
void LumiCorrectionParam::setdescription ( const std::string &  amodetag,
unsigned int  beamegev 
)

set description

Definition at line 70 of file LumiCorrectionParam.cc.

References amodetag(), beamegev(), m_amodetag, and m_beamegev.

70  {
73 }
std::string amodetag() const
unsigned int beamegev() const
void LumiCorrectionParam::setintglumi ( float  intglumi)

set intglumi

Definition at line 75 of file LumiCorrectionParam.cc.

References intglumi(), and m_intglumi.

75  {
77 }
float intglumi() const
lumi integrated up to that run. Needed for 2011B correction, otherwise 0.
void LumiCorrectionParam::setNBX ( unsigned int  nbx)

set ncollidingbunches

Definition at line 50 of file LumiCorrectionParam.cc.

References m_ncollidingbx.

50  {
51  m_ncollidingbx=nbx;
52 }
void LumiCorrectionParam::setnonlinearCoeff ( std::map< std::string, float > &  coeffmap)

set nonlinear constants

Definition at line 62 of file LumiCorrectionParam.cc.

References m_coeffmap.

62  {
63  m_coeffmap=coeffmap;
64 }
std::map< std::string, float > m_coeffmap
void LumiCorrectionParam::setNormtag ( const std::string &  normtag)

set current normtag

Definition at line 54 of file LumiCorrectionParam.cc.

References m_normtag, and normtag().

54  {
56 }
std::string normtag() const
get current normtag

Member Data Documentation

std::map< unsigned int,float > LumiCorrectionParam::m_afterglows
private

Definition at line 64 of file LumiCorrectionParam.h.

Referenced by afterglows(), getCorrection(), and setafterglows().

std::string LumiCorrectionParam::m_amodetag
private

Definition at line 65 of file LumiCorrectionParam.h.

Referenced by amodetag(), and setdescription().

float LumiCorrectionParam::m_beamegev
private

Definition at line 66 of file LumiCorrectionParam.h.

Referenced by beamegev(), and setdescription().

std::map< std::string,float > LumiCorrectionParam::m_coeffmap
private

Definition at line 63 of file LumiCorrectionParam.h.

Referenced by getCorrection(), nonlinearCoeff(), and setnonlinearCoeff().

std::string LumiCorrectionParam::m_corrfunc
private

Definition at line 62 of file LumiCorrectionParam.h.

Referenced by corrFunc(), getCorrection(), and setcorrFunc().

float LumiCorrectionParam::m_intglumi
private

Definition at line 67 of file LumiCorrectionParam.h.

Referenced by getCorrection(), intglumi(), and setintglumi().

LumiType LumiCorrectionParam::m_lumitype
private

Definition at line 59 of file LumiCorrectionParam.h.

unsigned int LumiCorrectionParam::m_ncollidingbx
private

Definition at line 60 of file LumiCorrectionParam.h.

Referenced by getCorrection(), ncollidingbunches(), and setNBX().

std::string LumiCorrectionParam::m_normtag
private

Definition at line 61 of file LumiCorrectionParam.h.

Referenced by normtag(), and setNormtag().