CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules 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 8 of file LumiCorrectionParam.h.

Member Enumeration Documentation

◆ LumiType

Enumerator
HF 
PIXEL 

Definition at line 10 of file LumiCorrectionParam.h.

Constructor & Destructor Documentation

◆ LumiCorrectionParam() [1/2]

LumiCorrectionParam::LumiCorrectionParam ( )

default constructor

Definition at line 7 of file LumiCorrectionParam.cc.

◆ 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 15 of file LumiCorrectionParam.h.

15 {}

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.

References m_afterglows.

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

34 { return m_afterglows; }
std::map< unsigned int, float > m_afterglows

◆ 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.

References m_amodetag.

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

35 { return m_amodetag; }

◆ 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.

References m_beamegev.

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

36 { return m_beamegev; }

◆ corrFunc()

std::string LumiCorrectionParam::corrFunc ( ) const

get correction function name

Definition at line 32 of file LumiCorrectionParam.cc.

References m_corrfunc.

Referenced by operator<<().

32 { return m_corrfunc; }

◆ getCorrection()

float LumiCorrectionParam::getCorrection ( float  luminonorm) const

get the final correction factor

Definition at line 24 of file LumiCorrectionParam.cc.

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

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 }
def create(alignables, pedeDump, additionalData, outputFile, config)
std::map< unsigned int, float > m_afterglows
std::map< std::string, float > m_coeffmap
#define get

◆ 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.

References m_intglumi.

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

37 { return m_intglumi; }

◆ ncollidingbunches()

unsigned int LumiCorrectionParam::ncollidingbunches ( ) const

get ncollidingbunches

Definition at line 30 of file LumiCorrectionParam.cc.

References m_ncollidingbx.

Referenced by operator<<().

30 { return m_ncollidingbx; }

◆ nonlinearCoeff()

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

get correction coefficients

Definition at line 33 of file LumiCorrectionParam.cc.

References m_coeffmap.

Referenced by operator<<().

33 { return m_coeffmap; }
std::map< std::string, float > m_coeffmap

◆ normtag()

std::string LumiCorrectionParam::normtag ( ) const

get current normtag

Definition at line 31 of file LumiCorrectionParam.cc.

References m_normtag.

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

31 { return m_normtag; }

◆ 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.

const std::map< unsigned int, float > & afterglows() const
get afterglow threshold/value
std::map< unsigned int, float > m_afterglows

◆ setcorrFunc()

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

set correction function

Definition at line 40 of file LumiCorrectionParam.cc.

References m_corrfunc.

40 { m_corrfunc = corrfunc; }

◆ setdescription()

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

set description

Definition at line 43 of file LumiCorrectionParam.cc.

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

43  {
46 }
std::string amodetag() const
unsigned int beamegev() const

◆ setintglumi()

void LumiCorrectionParam::setintglumi ( float  intglumi)

set intglumi

Definition at line 47 of file LumiCorrectionParam.cc.

References intglumi(), and m_intglumi.

47 { m_intglumi = intglumi; }
float intglumi() const
lumi integrated up to that run. Needed for 2011B correction, otherwise 0.

◆ setNBX()

void LumiCorrectionParam::setNBX ( unsigned int  nbx)

set ncollidingbunches

Definition at line 38 of file LumiCorrectionParam.cc.

References m_ncollidingbx.

38 { m_ncollidingbx = nbx; }

◆ setnonlinearCoeff()

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

set nonlinear constants

Definition at line 41 of file LumiCorrectionParam.cc.

References m_coeffmap.

41 { m_coeffmap = coeffmap; }
std::map< std::string, float > m_coeffmap

◆ setNormtag()

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

set current normtag

Definition at line 39 of file LumiCorrectionParam.cc.

References m_normtag, and normtag().

39 { m_normtag = normtag; }
std::string normtag() const
get current normtag

Member Data Documentation

◆ m_afterglows

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

Definition at line 66 of file LumiCorrectionParam.h.

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

◆ m_amodetag

std::string LumiCorrectionParam::m_amodetag
private

Definition at line 67 of file LumiCorrectionParam.h.

Referenced by amodetag(), and setdescription().

◆ m_beamegev

float LumiCorrectionParam::m_beamegev
private

Definition at line 68 of file LumiCorrectionParam.h.

Referenced by beamegev(), and setdescription().

◆ m_coeffmap

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

Definition at line 65 of file LumiCorrectionParam.h.

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

◆ m_corrfunc

std::string LumiCorrectionParam::m_corrfunc
private

Definition at line 64 of file LumiCorrectionParam.h.

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

◆ m_intglumi

float LumiCorrectionParam::m_intglumi
private

Definition at line 69 of file LumiCorrectionParam.h.

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

◆ m_lumitype

LumiType LumiCorrectionParam::m_lumitype
private

Definition at line 61 of file LumiCorrectionParam.h.

◆ m_ncollidingbx

unsigned int LumiCorrectionParam::m_ncollidingbx
private

Definition at line 62 of file LumiCorrectionParam.h.

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

◆ m_normtag

std::string LumiCorrectionParam::m_normtag
private

Definition at line 63 of file LumiCorrectionParam.h.

Referenced by normtag(), and setNormtag().