ATLAS Offline Software
Loading...
Searching...
No Matches
MuonCalib::MdtCalibEventLoop Class Reference

Class collects segments for a given chamber and performs several loops over the sample until the calibration algorithm thinks it converged. More...

#include <MdtCalibEventLoop.h>

Collaboration diagram for MuonCalib::MdtCalibEventLoop:

Public Types

using MuonSegVec = IMdtCalibration::MuonSegVec
using MuonSegIt = MuonSegVec::iterator
using MuonSegCit = MuonSegVec::const_iterator

Public Member Functions

 MdtCalibEventLoop (const std::string &regionKey)
 constructor
 ~MdtCalibEventLoop ()
 destructor
bool handleSegment (const MuonCalibSegment *seg)
 handle segment (for now store)
void performAnalysis ()
 analyse segments using IRtCalibration
void setCalibImp (IMdtCalibration *calibImp)
 set pointer to RtCalibration
IMdtCalibration::MdtCalibOutputPtr calibrationResults () const
 return results rt calibration
void setMaxIterations (unsigned int max)
 set maximum number of iteration (default = 10)
void setPrintLevel (int level)
 set print level

Private Attributes

IMdtCalibrationm_calibrationImp
 pointer to calibration implementation
MuonSegVec m_segments
 segment collection
IMdtCalibration::MdtCalibOutputPtr m_calibrationResult
 results calibration
int m_printLevel
 print level
std::string m_regionKey
 region key

Detailed Description

Class collects segments for a given chamber and performs several loops over the sample until the calibration algorithm thinks it converged.

Definition at line 27 of file MdtCalibEventLoop.h.

Member Typedef Documentation

◆ MuonSegCit

using MuonCalib::MdtCalibEventLoop::MuonSegCit = MuonSegVec::const_iterator

Definition at line 31 of file MdtCalibEventLoop.h.

◆ MuonSegIt

using MuonCalib::MdtCalibEventLoop::MuonSegIt = MuonSegVec::iterator

Definition at line 30 of file MdtCalibEventLoop.h.

◆ MuonSegVec

Constructor & Destructor Documentation

◆ MdtCalibEventLoop()

MuonCalib::MdtCalibEventLoop::MdtCalibEventLoop ( const std::string & regionKey)

constructor

Definition at line 17 of file MdtCalibEventLoop.cxx.

17 :
18 m_calibrationImp(nullptr), m_calibrationResult(nullptr), m_regionKey(regionKey) {
19 m_printLevel = 1;
20 }
std::string m_regionKey
region key
IMdtCalibration::MdtCalibOutputPtr m_calibrationResult
results calibration
IMdtCalibration * m_calibrationImp
pointer to calibration implementation

◆ ~MdtCalibEventLoop()

MuonCalib::MdtCalibEventLoop::~MdtCalibEventLoop ( )
default

destructor

Member Function Documentation

◆ calibrationResults()

IMdtCalibration::MdtCalibOutputPtr MuonCalib::MdtCalibEventLoop::calibrationResults ( ) const
inline

return results rt calibration

Definition at line 71 of file MdtCalibEventLoop.h.

71{ return m_calibrationResult; }

◆ handleSegment()

bool MuonCalib::MdtCalibEventLoop::handleSegment ( const MuonCalibSegment * seg)

handle segment (for now store)

Definition at line 39 of file MdtCalibEventLoop.cxx.

39 {
40 if (m_printLevel >= 4) {
41 MsgStream log(Athena::getMessageSvc(), "MdtCalibEventLoop");
42 log << MSG::WARNING << "MdtCalibEventLoop::handleSegment " << cseg << endmsg;
43 }
44
45 if (cseg) {
46 // eventloop owns the segments so it should make a copy
47 MuonCalibSegment* seg = new MuonCalibSegment(*cseg);
48
49 // add segment to vector
50 m_segments.emplace_back(seg);
51
52 } else {
53 MsgStream log(Athena::getMessageSvc(), "MdtCalibEventLoop");
54 log << MSG::WARNING << "MdtCalibEventLoop::handleSegment: got nullptr " << endmsg;
55 return false;
56 }
57 return true;
58 }
#define endmsg
MuonSegVec m_segments
segment collection
IMessageSvc * getMessageSvc(bool quiet=false)

◆ performAnalysis()

void MuonCalib::MdtCalibEventLoop::performAnalysis ( )

analyse segments using IRtCalibration

Definition at line 24 of file MdtCalibEventLoop.cxx.

24 {
25 if (m_printLevel >= 1) {
26 MsgStream log(Athena::getMessageSvc(), "MdtCalibEventLoop");
27 log << MSG::VERBOSE << "MdtCalibEventLoop::performAnalysis for region " << m_regionKey << endmsg;
28 }
29
30 // perform rt-calibration
32
33 if (m_printLevel >= 2) {
34 MsgStream log(Athena::getMessageSvc(), "MdtCalibEventLoop");
35 log << MSG::DEBUG << "new rtOutput " << m_calibrationResult << endmsg;
36 }
37 }

◆ setCalibImp()

void MuonCalib::MdtCalibEventLoop::setCalibImp ( IMdtCalibration * calibImp)

set pointer to RtCalibration

Definition at line 60 of file MdtCalibEventLoop.cxx.

60 {
61 if (m_printLevel >= 2) {
62 MsgStream log(Athena::getMessageSvc(), "MdtCalibEventLoop");
63 log << MSG::DEBUG << "MdtCalibEventLoop::setRtCalibTool >> new tool " << calibImp << endmsg;
64 }
65 if (calibImp) {
66 m_calibrationImp = calibImp;
67 } else {
68 MsgStream log(Athena::getMessageSvc(), "MdtCalibEventLoop");
69 log << MSG::WARNING << "MdtCalibEventLoop::setCalibImp: got nullptr " << endmsg;
70 m_calibrationImp = nullptr;
71 }
72 }

◆ setMaxIterations()

void MuonCalib::MdtCalibEventLoop::setMaxIterations ( unsigned int max)

set maximum number of iteration (default = 10)

◆ setPrintLevel()

void MuonCalib::MdtCalibEventLoop::setPrintLevel ( int level)
inline

set print level

Definition at line 56 of file MdtCalibEventLoop.h.

Member Data Documentation

◆ m_calibrationImp

IMdtCalibration* MuonCalib::MdtCalibEventLoop::m_calibrationImp
private

pointer to calibration implementation

Definition at line 59 of file MdtCalibEventLoop.h.

◆ m_calibrationResult

IMdtCalibration::MdtCalibOutputPtr MuonCalib::MdtCalibEventLoop::m_calibrationResult
private

results calibration

Definition at line 62 of file MdtCalibEventLoop.h.

◆ m_printLevel

int MuonCalib::MdtCalibEventLoop::m_printLevel
private

print level

Definition at line 65 of file MdtCalibEventLoop.h.

◆ m_regionKey

std::string MuonCalib::MdtCalibEventLoop::m_regionKey
private

region key

Definition at line 68 of file MdtCalibEventLoop.h.

◆ m_segments

MuonSegVec MuonCalib::MdtCalibEventLoop::m_segments
private

segment collection

Definition at line 60 of file MdtCalibEventLoop.h.


The documentation for this class was generated from the following files: