ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | List of all members
MuonCalib::MdtCalibEventLoop Class Reference

#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 More...
 
 ~MdtCalibEventLoop ()
 destructor More...
 
bool handleSegment (const MuonCalibSegment *seg)
 handle segment (for now store) More...
 
void performAnalysis ()
 analyse segments using IRtCalibration More...
 
void setCalibImp (IMdtCalibration *calibImp)
 set pointer to RtCalibration More...
 
IMdtCalibration::MdtCalibOutputPtr calibrationResults () const
 return results rt calibration More...
 
void setMaxIterations (unsigned int max)
 set maximum number of iteration (default = 10) More...
 
void setPrintLevel (int level)
 set print level More...
 

Private Attributes

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

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

Definition at line 29 of file MdtCalibEventLoop.h.

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  }

◆ ~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  }

◆ 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.

56 { m_printLevel = level; }

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:
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
MuonCalib::MdtCalibEventLoop::m_calibrationImp
IMdtCalibration * m_calibrationImp
pointer to calibration implementation
Definition: MdtCalibEventLoop.h:59
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
MuonCalib::MdtCalibEventLoop::m_regionKey
std::string m_regionKey
region key
Definition: MdtCalibEventLoop.h:68
MuonCalib::MdtCalibEventLoop::m_segments
MuonSegVec m_segments
segment collection
Definition: MdtCalibEventLoop.h:60
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
MuonCalib::MdtCalibEventLoop::m_calibrationResult
IMdtCalibration::MdtCalibOutputPtr m_calibrationResult
results calibration
Definition: MdtCalibEventLoop.h:62
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
MuonCalib::IMdtCalibration::analyseSegments
virtual MdtCalibOutputPtr analyseSegments(const MuonSegVec &segs)=0
final analyse results
MuonCalib::MdtCalibEventLoop::m_printLevel
int m_printLevel
print level
Definition: MdtCalibEventLoop.h:65