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

Enumerator
HF 
PIXEL 

Definition at line 9 of file LumiCorrectionParam.h.

Constructor & Destructor Documentation

LumiCorrectionParam::LumiCorrectionParam ( )

default constructor

Definition at line 7 of file LumiCorrectionParam.cc.

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 ( )
inline

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<<(), setafterglows(), and ~LumiCorrectionParam().

34 { return m_afterglows; }
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 35 of file LumiCorrectionParam.cc.

References m_amodetag.

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

35 { return m_amodetag; }
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<<(), setdescription(), and ~LumiCorrectionParam().

36 { return m_beamegev; }
std::string LumiCorrectionParam::corrFunc ( ) const

get correction function name

Definition at line 32 of file LumiCorrectionParam.cc.

References m_corrfunc.

Referenced by operator<<(), and ~LumiCorrectionParam().

32 { return m_corrfunc; }
float LumiCorrectionParam::getCorrection ( float  luminonorm) const

get the final correction factor

Definition at line 24 of file LumiCorrectionParam.cc.

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

Referenced by ~LumiCorrectionParam().

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
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<<(), setintglumi(), and ~LumiCorrectionParam().

37 { return m_intglumi; }
unsigned int LumiCorrectionParam::ncollidingbunches ( ) const

get ncollidingbunches

Definition at line 30 of file LumiCorrectionParam.cc.

References m_ncollidingbx.

Referenced by operator<<(), and ~LumiCorrectionParam().

30 { return m_ncollidingbx; }
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<<(), and ~LumiCorrectionParam().

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

get current normtag

Definition at line 31 of file LumiCorrectionParam.cc.

References m_normtag.

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

31 { return m_normtag; }
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.

Referenced by ~LumiCorrectionParam().

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 40 of file LumiCorrectionParam.cc.

References m_corrfunc.

Referenced by ~LumiCorrectionParam().

40 { m_corrfunc = corrfunc; }
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.

Referenced by ~LumiCorrectionParam().

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

set intglumi

Definition at line 47 of file LumiCorrectionParam.cc.

References intglumi(), and m_intglumi.

Referenced by ~LumiCorrectionParam().

47 { m_intglumi = intglumi; }
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 38 of file LumiCorrectionParam.cc.

References m_ncollidingbx.

Referenced by ~LumiCorrectionParam().

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

set nonlinear constants

Definition at line 41 of file LumiCorrectionParam.cc.

References m_coeffmap.

Referenced by ~LumiCorrectionParam().

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

set current normtag

Definition at line 39 of file LumiCorrectionParam.cc.

References m_normtag, and normtag().

Referenced by ~LumiCorrectionParam().

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

Member Data Documentation

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

Definition at line 65 of file LumiCorrectionParam.h.

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

std::string LumiCorrectionParam::m_amodetag
private

Definition at line 66 of file LumiCorrectionParam.h.

Referenced by amodetag(), and setdescription().

float LumiCorrectionParam::m_beamegev
private

Definition at line 67 of file LumiCorrectionParam.h.

Referenced by beamegev(), and setdescription().

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

Definition at line 64 of file LumiCorrectionParam.h.

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

std::string LumiCorrectionParam::m_corrfunc
private

Definition at line 63 of file LumiCorrectionParam.h.

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

float LumiCorrectionParam::m_intglumi
private

Definition at line 68 of file LumiCorrectionParam.h.

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

LumiType LumiCorrectionParam::m_lumitype
private

Definition at line 60 of file LumiCorrectionParam.h.

unsigned int LumiCorrectionParam::m_ncollidingbx
private

Definition at line 61 of file LumiCorrectionParam.h.

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

std::string LumiCorrectionParam::m_normtag
private

Definition at line 62 of file LumiCorrectionParam.h.

Referenced by normtag(), and setNormtag().