CMS 3D CMS Logo

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

◆ LumiType

Enumerator
HF 
PIXEL 

Definition at line 9 of file LumiCorrectionParam.h.

9 { HF, PIXEL };

Constructor & Destructor Documentation

◆ LumiCorrectionParam() [1/2]

LumiCorrectionParam::LumiCorrectionParam ( )

default constructor

Definition at line 7 of file LumiCorrectionParam.cc.

10  m_normtag(""),
11  m_corrfunc(""),
12  m_amodetag("PROTPHYS"),
13  m_beamegev(0.),
14  m_intglumi(0.) {}

◆ LumiCorrectionParam() [2/2]

LumiCorrectionParam::LumiCorrectionParam ( LumiCorrectionParam::LumiType  lumitype)
explicit

Definition at line 15 of file LumiCorrectionParam.cc.

16  : m_lumitype(lumitype),
17  m_ncollidingbx(0),
18  m_normtag(""),
19  m_corrfunc(""),
20  m_amodetag("PROTPHYS"),
21  m_beamegev(0.),
22  m_intglumi(0.) {}

◆ ~LumiCorrectionParam()

LumiCorrectionParam::~LumiCorrectionParam ( )
inline

destructor

Definition at line 14 of file LumiCorrectionParam.h.

14 {}

Member Function Documentation

◆ afterglows()

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

get afterglow threshold/value

Definition at line 34 of file LumiCorrectionParam.cc.

34 { return m_afterglows; }

References m_afterglows.

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

◆ amodetag()

std::string LumiCorrectionParam::amodetag ( ) const

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

Definition at line 35 of file LumiCorrectionParam.cc.

35 { return m_amodetag; }

References m_amodetag.

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

◆ beamegev()

unsigned int LumiCorrectionParam::beamegev ( ) const

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

Definition at line 36 of file LumiCorrectionParam.cc.

36 { return m_beamegev; }

References m_beamegev.

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

◆ corrFunc()

std::string LumiCorrectionParam::corrFunc ( ) const

get correction function name

Definition at line 32 of file LumiCorrectionParam.cc.

32 { return m_corrfunc; }

References m_corrfunc.

Referenced by operator<<().

◆ getCorrection()

float LumiCorrectionParam::getCorrection ( float  luminonorm) const

get the final correction factor

Definition at line 24 of file LumiCorrectionParam.cc.

24  {
25  std::unique_ptr<lumi::NormFunctor> ptr(lumi::NormFunctorPluginFactory::get()->create(m_corrfunc));
26  (*ptr).initialize(m_coeffmap, m_afterglows);
27  float result = (*ptr).getCorrection(luminonorm, m_intglumi, m_ncollidingbx);
28  return result;
29 }

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

◆ intglumi()

float LumiCorrectionParam::intglumi ( ) const

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

Definition at line 37 of file LumiCorrectionParam.cc.

37 { return m_intglumi; }

References m_intglumi.

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

◆ ncollidingbunches()

unsigned int LumiCorrectionParam::ncollidingbunches ( ) const

get ncollidingbunches

Definition at line 30 of file LumiCorrectionParam.cc.

30 { return m_ncollidingbx; }

References m_ncollidingbx.

Referenced by operator<<().

◆ nonlinearCoeff()

const std::map< std::string, float > & LumiCorrectionParam::nonlinearCoeff ( ) const

get correction coefficients

Definition at line 33 of file LumiCorrectionParam.cc.

33 { return m_coeffmap; }

References m_coeffmap.

Referenced by operator<<().

◆ normtag()

std::string LumiCorrectionParam::normtag ( ) const

get current normtag

Definition at line 31 of file LumiCorrectionParam.cc.

31 { return m_normtag; }

References m_normtag.

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

◆ setafterglows()

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

set afterglow thresholds

Definition at line 42 of file LumiCorrectionParam.cc.

References afterglows(), and m_afterglows.

◆ setcorrFunc()

void LumiCorrectionParam::setcorrFunc ( const std::string &  corrfunc)

set correction function

Definition at line 40 of file LumiCorrectionParam.cc.

40 { m_corrfunc = corrfunc; }

References m_corrfunc.

◆ setdescription()

void LumiCorrectionParam::setdescription ( const std::string &  amodetag,
unsigned int  beamegev 
)

set description

Definition at line 43 of file LumiCorrectionParam.cc.

43  {
46 }

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

◆ setintglumi()

void LumiCorrectionParam::setintglumi ( float  intglumi)

set intglumi

Definition at line 47 of file LumiCorrectionParam.cc.

47 { m_intglumi = intglumi; }

References intglumi(), and m_intglumi.

◆ setNBX()

void LumiCorrectionParam::setNBX ( unsigned int  nbx)

set ncollidingbunches

Definition at line 38 of file LumiCorrectionParam.cc.

38 { m_ncollidingbx = nbx; }

References m_ncollidingbx.

◆ setnonlinearCoeff()

void LumiCorrectionParam::setnonlinearCoeff ( std::map< std::string, float > &  coeffmap)

set nonlinear constants

Definition at line 41 of file LumiCorrectionParam.cc.

41 { m_coeffmap = coeffmap; }

References m_coeffmap.

◆ setNormtag()

void LumiCorrectionParam::setNormtag ( const std::string &  normtag)

set current normtag

Definition at line 39 of file LumiCorrectionParam.cc.

39 { m_normtag = normtag; }

References m_normtag, and normtag().

Member Data Documentation

◆ m_afterglows

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

Definition at line 65 of file LumiCorrectionParam.h.

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

◆ m_amodetag

std::string LumiCorrectionParam::m_amodetag
private

Definition at line 66 of file LumiCorrectionParam.h.

Referenced by amodetag(), and setdescription().

◆ m_beamegev

float LumiCorrectionParam::m_beamegev
private

Definition at line 67 of file LumiCorrectionParam.h.

Referenced by beamegev(), and setdescription().

◆ m_coeffmap

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

Definition at line 64 of file LumiCorrectionParam.h.

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

◆ m_corrfunc

std::string LumiCorrectionParam::m_corrfunc
private

Definition at line 63 of file LumiCorrectionParam.h.

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

◆ m_intglumi

float LumiCorrectionParam::m_intglumi
private

Definition at line 68 of file LumiCorrectionParam.h.

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

◆ m_lumitype

LumiType LumiCorrectionParam::m_lumitype
private

Definition at line 60 of file LumiCorrectionParam.h.

◆ m_ncollidingbx

unsigned int LumiCorrectionParam::m_ncollidingbx
private

Definition at line 61 of file LumiCorrectionParam.h.

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

◆ m_normtag

std::string LumiCorrectionParam::m_normtag
private

Definition at line 62 of file LumiCorrectionParam.h.

Referenced by normtag(), and setNormtag().

LumiCorrectionParam::m_corrfunc
std::string m_corrfunc
Definition: LumiCorrectionParam.h:63
LumiCorrectionParam::afterglows
const std::map< unsigned int, float > & afterglows() const
get afterglow threshold/value
Definition: LumiCorrectionParam.cc:34
LumiCorrectionParam::m_ncollidingbx
unsigned int m_ncollidingbx
Definition: LumiCorrectionParam.h:61
beamerCreator.create
def create(alignables, pedeDump, additionalData, outputFile, config)
Definition: beamerCreator.py:44
LumiCorrectionParam::amodetag
std::string amodetag() const
Definition: LumiCorrectionParam.cc:35
LumiCorrectionParam::m_intglumi
float m_intglumi
Definition: LumiCorrectionParam.h:68
LumiCorrectionParam::m_beamegev
float m_beamegev
Definition: LumiCorrectionParam.h:67
LumiCorrectionParam::m_amodetag
std::string m_amodetag
Definition: LumiCorrectionParam.h:66
LumiCorrectionParam::beamegev
unsigned int beamegev() const
Definition: LumiCorrectionParam.cc:36
LumiCorrectionParam::HF
Definition: LumiCorrectionParam.h:9
LumiCorrectionParam::m_lumitype
LumiType m_lumitype
Definition: LumiCorrectionParam.h:60
LumiCorrectionParam::m_coeffmap
std::map< std::string, float > m_coeffmap
Definition: LumiCorrectionParam.h:64
LumiCorrectionParam::normtag
std::string normtag() const
get current normtag
Definition: LumiCorrectionParam.cc:31
get
#define get
LumiCorrectionParam::m_afterglows
std::map< unsigned int, float > m_afterglows
Definition: LumiCorrectionParam.h:65
mps_fire.result
result
Definition: mps_fire.py:303
LumiCorrectionParam::PIXEL
Definition: LumiCorrectionParam.h:9
LumiCorrectionParam::m_normtag
std::string m_normtag
Definition: LumiCorrectionParam.h:62
LumiCorrectionParam::intglumi
float intglumi() const
lumi integrated up to that run. Needed for 2011B correction, otherwise 0.
Definition: LumiCorrectionParam.cc:37