|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #include "CoralBase/Attribute.h"
8 #include "CoralBase/Blob.h"
9 #include "CoolKernel/StorageType.h"
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());
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;
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;
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;
float rpbx(float sr, float mu)
bool setCalibration(const coral::AttributeList &attrList)
static float getMuVis2(float rawPerBX, float sigo, float siga)
MsgStream & dump(MsgStream &) const
std::vector< float > m_parVec
static float getMuVis(float rawPerBX, float sigo, float siga)
bool calibrateLumi(float rawLumi, float &calLumi) const
constexpr int pow(int base, int exp) noexcept
bool calibrateMu(float rawLumi, float &calMu) const