CMS 3D CMS Logo

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

#include <LumiCorrector.h>

Public Member Functions

float AfterglowFactor (int nBXs)
 
float getCoefficient (const std::string &name) const
 
float getNormForAlgo (const std::string &algo) const
 
 LumiCorrector ()
 
void setCoefficient (const std::string &name, float value)
 
void setNormForAlgo (const std::string &algo, float value)
 
float TotalNormET (float TotLumi_noNorm, int nBXs)
 
float TotalNormOcc1 (float TotLumi_noNorm, int nBXs)
 
float TotalNormOcc2 (float TotLumi_noNorm, int nBXs)
 
 ~LumiCorrector ()
 

Public Attributes

tuple lcorr = LumiCorrector()
 

Private Attributes

std::map< int, float > AfterglowMap_
 
float Alpha1_
 
float Alpha2_
 
float ETNorm_
 
float Occ1Norm_
 
float Occ2Norm_
 
float PUNorm_
 

Detailed Description

Definition at line 6 of file LumiCorrector.h.

Constructor & Destructor Documentation

these are corrections including unit conversion /mb to /ub if unit is already /ub, use e-03

Definition at line 6 of file LumiCorrector.cc.

References AfterglowMap_, Alpha1_, Alpha2_, ETNorm_, Occ1Norm_, Occ2Norm_, and PUNorm_.

6  {
7  Occ1Norm_=6.36e3; // For 2.76TeV 1.34e3, for HI 2.214e6
8  Occ2Norm_=7.97e3;
9  ETNorm_=1.59e3;
10  PUNorm_=6.37e3;
11  Alpha1_=0.063;
12  Alpha2_=-0.0037;
13  // map doesn't provide any initialization -> do brute force // For HI Afterglow=1.
14  AfterglowMap_[213]=0.992;
15  AfterglowMap_[321]=0.990;
16  AfterglowMap_[423]=0.988;
17  AfterglowMap_[597]=0.985;
18  AfterglowMap_[700]=0.984;
19  AfterglowMap_[873]=0.981;
20  AfterglowMap_[1041]=0.979;
21  AfterglowMap_[1179]=0.977;
22  AfterglowMap_[1317]=0.975;
23 }
std::map< int, float > AfterglowMap_
Definition: LumiCorrector.h:26
LumiCorrector::~LumiCorrector ( )
inline

Definition at line 10 of file LumiCorrector.h.

10 {}

Member Function Documentation

float LumiCorrector::AfterglowFactor ( int  nBXs)

Definition at line 52 of file LumiCorrector.cc.

References AfterglowMap_.

Referenced by TotalNormOcc1().

52  {
53  float Afterglow = 1.;
54  for(std::map<int,float>::iterator it = AfterglowMap_.begin(); it != AfterglowMap_.end(); ++it){
55  if (nBXs >= it->first){
56  Afterglow = it->second;
57  }
58  }
59  return Afterglow;
60 }
std::map< int, float > AfterglowMap_
Definition: LumiCorrector.h:26
float LumiCorrector::getCoefficient ( const std::string &  name) const

Definition at line 46 of file LumiCorrector.cc.

References Alpha1_, and Alpha2_.

46  {
47  if( name=="ALPHA1" ){ return Alpha1_;}
48  if( name=="ALPHA2" ){ return Alpha2_;}
49  return 0.0;
50 }
float LumiCorrector::getNormForAlgo ( const std::string &  algo) const

Definition at line 38 of file LumiCorrector.cc.

References ETNorm_, Occ1Norm_, Occ2Norm_, and PUNorm_.

38  {
39  if( algo=="OCC1" ){return Occ1Norm_;}
40  if( algo=="OCC2" ){return Occ2Norm_;}
41  if( algo=="ET" ){return ETNorm_;}
42  if( algo=="PU" ){return PUNorm_;}
43  return 1.0;
44 }
void LumiCorrector::setCoefficient ( const std::string &  name,
float  value 
)

Definition at line 33 of file LumiCorrector.cc.

References Alpha1_, Alpha2_, and relativeConstraints::value.

33  {
34  if( name=="ALPHA1" ){Alpha1_=value;return;}
35  if( name=="ALPHA2" ){Alpha2_=value;return;}
36 }
void LumiCorrector::setNormForAlgo ( const std::string &  algo,
float  value 
)

Definition at line 26 of file LumiCorrector.cc.

References ETNorm_, Occ1Norm_, Occ2Norm_, PUNorm_, and relativeConstraints::value.

26  {
27  if( algo=="OCC1" ){Occ1Norm_=value;return;}
28  if( algo=="OCC2" ){Occ2Norm_=value;return;}
29  if( algo=="ET" ){ETNorm_=value;return;}
30  if( algo=="PU" ){PUNorm_=value;return;}
31 }
float LumiCorrector::TotalNormET ( float  TotLumi_noNorm,
int  nBXs 
)

Definition at line 72 of file LumiCorrector.cc.

References ETNorm_.

72  {
73  return ETNorm_;
74 }
float LumiCorrector::TotalNormOcc1 ( float  TotLumi_noNorm,
int  nBXs 
)

Definition at line 63 of file LumiCorrector.cc.

References AfterglowFactor(), Alpha1_, Alpha2_, Occ1Norm_, and PUNorm_.

63  {
64  float AvgLumi = (nBXs>0) ? PUNorm_*TotLumi_noNorm/nBXs : 0.;
65  return Occ1Norm_*AfterglowFactor(nBXs)/(1 + Alpha1_*AvgLumi + Alpha2_*AvgLumi*AvgLumi);
66 }
float AfterglowFactor(int nBXs)
float LumiCorrector::TotalNormOcc2 ( float  TotLumi_noNorm,
int  nBXs 
)

Definition at line 68 of file LumiCorrector.cc.

References Occ2Norm_.

68  {
69  return Occ2Norm_;
70 }

Member Data Documentation

std::map<int,float> LumiCorrector::AfterglowMap_
private

Definition at line 26 of file LumiCorrector.h.

Referenced by AfterglowFactor(), and LumiCorrector().

float LumiCorrector::Alpha1_
private

Definition at line 24 of file LumiCorrector.h.

Referenced by getCoefficient(), LumiCorrector(), setCoefficient(), and TotalNormOcc1().

float LumiCorrector::Alpha2_
private

Definition at line 25 of file LumiCorrector.h.

Referenced by getCoefficient(), LumiCorrector(), setCoefficient(), and TotalNormOcc1().

float LumiCorrector::ETNorm_
private

Definition at line 22 of file LumiCorrector.h.

Referenced by getNormForAlgo(), LumiCorrector(), setNormForAlgo(), and TotalNormET().

tuple LumiCorrector.lcorr = LumiCorrector()

Definition at line 94 of file LumiCorrector.py.

float LumiCorrector::Occ1Norm_
private

Definition at line 20 of file LumiCorrector.h.

Referenced by getNormForAlgo(), LumiCorrector(), setNormForAlgo(), and TotalNormOcc1().

float LumiCorrector::Occ2Norm_
private

Definition at line 21 of file LumiCorrector.h.

Referenced by getNormForAlgo(), LumiCorrector(), setNormForAlgo(), and TotalNormOcc2().

float LumiCorrector::PUNorm_
private

Definition at line 23 of file LumiCorrector.h.

Referenced by getNormForAlgo(), LumiCorrector(), setNormForAlgo(), and TotalNormOcc1().