ATLAS Offline Software
OnlineLumiCalibrator.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
11 #ifndef LUMIBLOCKCOMPS_ONLINELUMICALIBRATOR_H
12 #define LUMIBLOCKCOMPS_ONLINELUMICALIBRATOR_H
13 
14 #include "CoralBase/AttributeList.h"
15 #include "GaudiKernel/MsgStream.h"
16 
17 #include <vector>
18 #include <string>
19 
21 
22  public:
23 
25 
28 
31 
32  // Pass DB object to set parameters, return False on error
33  bool setCalibration(const coral::AttributeList& attrList);
34 
35  // Return False on error
36  bool calibrateMu(float rawLumi, float& calMu) const;
37  bool calibrateLumi(float rawLumi, float& calLumi) const;
38 
39  // Online calibration - no afterglow corrections made. Vector can be arbitrary length
40  bool calibrateMu(const std::vector<float>& rawLumi, std::vector<float>& calMu) const;
41  bool calibrateLumi(const std::vector<float>& rawLumi, std::vector<float>&calLumi) const;
42 
43  float getMuToLumi() const;
44 
45  // Allow to dump out the calibration values
46  MsgStream& dump(MsgStream&) const;
47 
48  private:
49 
50  unsigned int m_nPar;
51  std::string m_fType;
52  float m_muToLumi;
53  std::vector<float> m_parVec;
54 
55  float getMuVis(float rawPerBX, float sigo, float siga) const;
56  float getMuVis2(float rawPerBX, float sigo, float siga) const;
57 
58 };
59 
60 MsgStream& operator<< (MsgStream& ,const OnlineLumiCalibrator&);
61 
62 inline MsgStream& operator<< (MsgStream& stream, const OnlineLumiCalibrator& lc)
63 {
64  return lc.dump(stream);
65 }
66 
67 #endif
OnlineLumiCalibrator::m_nPar
unsigned int m_nPar
Definition: OnlineLumiCalibrator.h:50
OnlineLumiCalibrator::calibrateLumi
bool calibrateLumi(float rawLumi, float &calLumi) const
Definition: OnlineLumiCalibrator.cxx:125
OnlineLumiCalibrator::getMuVis2
float getMuVis2(float rawPerBX, float sigo, float siga) const
Definition: OnlineLumiCalibrator.cxx:285
OnlineLumiCalibrator::operator=
OnlineLumiCalibrator & operator=(const OnlineLumiCalibrator &)=default
OnlineLumiCalibrator::calibrateMu
bool calibrateMu(float rawLumi, float &calMu) const
Definition: OnlineLumiCalibrator.cxx:136
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
python.LumiCalcHtml.lc
lc
Definition: LumiCalcHtml.py:579
OnlineLumiCalibrator::m_parVec
std::vector< float > m_parVec
Definition: OnlineLumiCalibrator.h:53
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
OnlineLumiCalibrator
Utility class to apply calibrations from /TDAQ/OLC/CALIBRATIONS folder.
Definition: OnlineLumiCalibrator.h:20
OnlineLumiCalibrator::getMuVis
float getMuVis(float rawPerBX, float sigo, float siga) const
Definition: OnlineLumiCalibrator.cxx:251
OnlineLumiCalibrator::setCalibration
bool setCalibration(const coral::AttributeList &attrList)
Definition: OnlineLumiCalibrator.cxx:53
OnlineLumiCalibrator::m_muToLumi
float m_muToLumi
Definition: OnlineLumiCalibrator.h:52
operator<<
MsgStream & operator<<(MsgStream &, const OnlineLumiCalibrator &)
Definition: OnlineLumiCalibrator.h:62
OnlineLumiCalibrator::OnlineLumiCalibrator
OnlineLumiCalibrator()
Definition: OnlineLumiCalibrator.cxx:21
OnlineLumiCalibrator::m_fType
std::string m_fType
Definition: OnlineLumiCalibrator.h:51
OnlineLumiCalibrator::dump
MsgStream & dump(MsgStream &) const
Definition: OnlineLumiCalibrator.cxx:322
OnlineLumiCalibrator::OnlineLumiCalibrator
OnlineLumiCalibrator(const OnlineLumiCalibrator &)=default
OnlineLumiCalibrator::getMuToLumi
float getMuToLumi() const
Definition: OnlineLumiCalibrator.cxx:80