Utility class to apply calibrations from /TDAQ/OLC/CALIBRATIONS folder.
More...
#include <LumiCalibrator.h>
|
static float | getMuVis (float rawPerBX, float sigo, float siga) |
|
static float | getMuVis2 (float rawPerBX, float sigo, float siga) |
|
Utility class to apply calibrations from /TDAQ/OLC/CALIBRATIONS folder.
- Author
- E.Torrence
Definition at line 20 of file LumiCalibrator.h.
◆ LumiCalibrator()
LumiCalibrator::LumiCalibrator |
( |
| ) |
|
◆ calibrateLumi()
bool LumiCalibrator::calibrateLumi |
( |
float |
rawLumi, |
|
|
float & |
calLumi |
|
) |
| const |
◆ calibrateMu()
bool LumiCalibrator::calibrateMu |
( |
float |
rawLumi, |
|
|
float & |
calMu |
|
) |
| const |
Definition at line 65 of file LumiCalibrator.cxx.
77 if (
m_parVec.size() < (8*nrange + 1))
return false;
79 for (
unsigned int i=0;
i<nrange;
i++) {
82 if (rawLumi < rmax and rawLumi >= rmin) {
98 if (
m_parVec.size() != 1)
return false;
101 if ((1.-rawLumi) <= 0.)
return false;
104 if (rawLumi < 0.)
return false;
110 if (
m_fType ==
"HitLogarithm") {
113 if (
m_parVec.size() != 4)
return false;
116 if (
m_parVec[1] <= 0.)
return false;
119 if ((1.-rawLumi/
m_parVec[1]) <= 0.)
return false;
122 if (rawLumi < 0.)
return false;
128 if (
m_fType ==
"LookupTable_EventAND_Lin") {
131 if (
m_parVec.size() != 6)
return false;
133 if (rawLumi < 0.)
return false;
151 if (
m_fType ==
"LookupTable_EventAND_Log") {
154 if (
m_parVec.size() != 8)
return false;
156 if (rawLumi < 0.)
return false;
◆ dump()
MsgStream & LumiCalibrator::dump |
( |
MsgStream & |
stream | ) |
const |
◆ getMuToLumi()
float LumiCalibrator::getMuToLumi |
( |
| ) |
const |
|
inline |
◆ getMuVis()
float LumiCalibrator::getMuVis |
( |
float |
rawPerBX, |
|
|
float |
sigo, |
|
|
float |
siga |
|
) |
| |
|
staticprivate |
Definition at line 180 of file LumiCalibrator.cxx.
187 float a = (sigo/siga + 1) / 2.;
191 for (
int i=0;
i<30;
i++) {
201 if (munew <= 0.)
return -1.;
202 if (std::abs(munew-
mu)/munew < 1.
E-5)
break;
◆ getMuVis2()
float LumiCalibrator::getMuVis2 |
( |
float |
rawPerBX, |
|
|
float |
sigo, |
|
|
float |
siga |
|
) |
| |
|
staticprivate |
Definition at line 214 of file LumiCalibrator.cxx.
225 if (rawPerBX < rbxl || rawPerBX > rbxu)
return -1.;
229 if (rbxl<rawPerBX && rbxm>rawPerBX) {
232 muvm=0.5*(muvu+muvl);
236 muvm=0.5*(muvu+muvl);
242 if ((muvu-muvl)/muvl < 1
e-5)
return muvm;
◆ setCalibration()
bool LumiCalibrator::setCalibration |
( |
const coral::AttributeList & |
attrList | ) |
|
Definition at line 26 of file LumiCalibrator.cxx.
28 if (attrList[
"NumOfParameters"].isNull())
return false;
31 if (attrList[
"Function"].isNull())
return false;
32 m_fType = attrList[
"Function"].data<std::string>();
34 if (attrList[
"MuToLumi"].isNull())
return false;
35 m_muToLumi = attrList[
"MuToLumi"].data<
float>();
37 if (attrList[
"Parameters"].isNull())
return false;
45 const float*
p =
static_cast<const float*
>(
blob.startingAddress());
◆ m_fType
std::string LumiCalibrator::m_fType |
|
private |
◆ m_muToLumi
float LumiCalibrator::m_muToLumi |
|
private |
◆ m_nPar
unsigned int LumiCalibrator::m_nPar |
|
private |
◆ m_parVec
std::vector<float> LumiCalibrator::m_parVec |
|
private |
The documentation for this class was generated from the following files: