Utility class to apply calibrations from /TDAQ/OLC/CALIBRATIONS folder.
More...
#include <OnlineLumiCalibrator.h>
Utility class to apply calibrations from /TDAQ/OLC/CALIBRATIONS folder.
- Author
- E.Torrence
Definition at line 20 of file OnlineLumiCalibrator.h.
◆ OnlineLumiCalibrator() [1/3]
OnlineLumiCalibrator::OnlineLumiCalibrator |
( |
| ) |
|
◆ OnlineLumiCalibrator() [2/3]
◆ OnlineLumiCalibrator() [3/3]
◆ calibrateLumi() [1/2]
bool OnlineLumiCalibrator::calibrateLumi |
( |
const std::vector< float > & |
rawLumi, |
|
|
std::vector< float > & |
calLumi |
|
) |
| const |
◆ calibrateLumi() [2/2]
bool OnlineLumiCalibrator::calibrateLumi |
( |
float |
rawLumi, |
|
|
float & |
calLumi |
|
) |
| const |
◆ calibrateMu() [1/2]
bool OnlineLumiCalibrator::calibrateMu |
( |
const std::vector< float > & |
rawLumi, |
|
|
std::vector< float > & |
calMu |
|
) |
| const |
◆ calibrateMu() [2/2]
bool OnlineLumiCalibrator::calibrateMu |
( |
float |
rawLumi, |
|
|
float & |
calMu |
|
) |
| const |
Definition at line 136 of file OnlineLumiCalibrator.cxx.
143 if (
m_parVec.size() < 1)
return false;
148 if (
m_parVec.size() < (8*nrange + 1))
return false;
150 for (
unsigned int i=0;
i<nrange;
i++) {
153 if (rawLumi < rmax and rawLumi >= rmin) {
169 if (
m_parVec.size() != 1)
return false;
172 if ((1.-rawLumi) <= 0.)
return false;
175 if (rawLumi < 0.)
return false;
181 if (
m_fType ==
"HitLogarithm") {
184 if (
m_parVec.size() != 4)
return false;
187 if (
m_parVec[1] <= 0.)
return false;
190 if ((1.-rawLumi/
m_parVec[1]) <= 0.)
return false;
193 if (rawLumi < 0.)
return false;
199 if (
m_fType ==
"LookupTable_EventAND_Lin") {
202 if (
m_parVec.size() != 6)
return false;
204 if (rawLumi < 0.)
return false;
222 if (
m_fType ==
"LookupTable_EventAND_Log") {
225 if (
m_parVec.size() != 8)
return false;
227 if (rawLumi < 0.)
return false;
◆ dump()
MsgStream & OnlineLumiCalibrator::dump |
( |
MsgStream & |
stream | ) |
const |
◆ getMuToLumi()
float OnlineLumiCalibrator::getMuToLumi |
( |
| ) |
const |
◆ getMuVis()
float OnlineLumiCalibrator::getMuVis |
( |
float |
rawPerBX, |
|
|
float |
sigo, |
|
|
float |
siga |
|
) |
| const |
|
private |
Definition at line 251 of file OnlineLumiCalibrator.cxx.
258 float a = (sigo/siga + 1) / 2.;
262 for (
int i=0;
i<30;
i++) {
272 if (munew <= 0.)
return -1.;
273 if (fabs(munew-
mu)/munew < 1.
E-5)
break;
◆ getMuVis2()
float OnlineLumiCalibrator::getMuVis2 |
( |
float |
rawPerBX, |
|
|
float |
sigo, |
|
|
float |
siga |
|
) |
| const |
|
private |
Definition at line 285 of file OnlineLumiCalibrator.cxx.
296 if (rawPerBX < rbxl || rawPerBX > rbxu)
return -1.;
300 if (rbxl<rawPerBX && rbxm>rawPerBX) {
303 muvm=0.5*(muvu+muvl);
307 muvm=0.5*(muvu+muvl);
313 if ((muvu-muvl)/muvl < 1
e-5)
return muvm;
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ setCalibration()
bool OnlineLumiCalibrator::setCalibration |
( |
const coral::AttributeList & |
attrList | ) |
|
Definition at line 53 of file OnlineLumiCalibrator.cxx.
55 if (attrList[
"NumOfParameters"].isNull())
return false;
58 if (attrList[
"Function"].isNull())
return false;
59 m_fType = attrList[
"Function"].data<std::string>();
61 if (attrList[
"MuToLumi"].isNull())
return false;
62 m_muToLumi = attrList[
"MuToLumi"].data<
float>();
64 if (attrList[
"Parameters"].isNull())
return false;
72 const float*
p =
static_cast<const float*
>(
blob.startingAddress());
◆ m_fType
std::string OnlineLumiCalibrator::m_fType |
|
private |
◆ m_muToLumi
float OnlineLumiCalibrator::m_muToLumi |
|
private |
◆ m_nPar
unsigned int OnlineLumiCalibrator::m_nPar |
|
private |
◆ m_parVec
std::vector<float> OnlineLumiCalibrator::m_parVec |
|
private |
The documentation for this class was generated from the following files: