ATLAS Offline Software
Loading...
Searching...
No Matches
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
10
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;
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
60MsgStream& operator<< (MsgStream& ,const OnlineLumiCalibrator&);
61
62inline MsgStream& operator<< (MsgStream& stream, const OnlineLumiCalibrator& lc)
63{
64 return lc.dump(stream);
65}
66
67#endif
MsgStream & operator<<(MsgStream &, const OnlineLumiCalibrator &)
Utility class to apply calibrations from /TDAQ/OLC/CALIBRATIONS folder.
float getMuVis2(float rawPerBX, float sigo, float siga) const
float getMuVis(float rawPerBX, float sigo, float siga) const
bool calibrateLumi(float rawLumi, float &calLumi) const
bool calibrateMu(float rawLumi, float &calMu) const
std::vector< float > m_parVec
OnlineLumiCalibrator(const OnlineLumiCalibrator &)=default
OnlineLumiCalibrator & operator=(const OnlineLumiCalibrator &)=default
bool setCalibration(const coral::AttributeList &attrList)
-event-from-file