ATLAS Offline Software
UpdateCalibHit.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONCALIB_UPDATECALIBHIT_H
6 #define MUONCALIB_UPDATECALIBHIT_H
7 
8 #include <iostream>
9 
11 #include "GaudiKernel/MsgStream.h"
12 #include "MdtCalibInterfaces/IRtRelation.h"
14 
15 namespace MuonCalib {
16 
24  public:
25  UpdateCalibHit(const IRtRelation* rt) : m_rt(rt) {}
26 
27  void operator()(MdtCalibHit* hit) {
28  if (m_rt) {
29  double t = hit->driftTime();
30  hit->setDriftRadius(m_rt->radius(t), m_rt->sigmaR(t));
31  } else {
32  MsgStream log(Athena::getMessageSvc(), "UpdateCalibHit");
33  log << MSG::WARNING << "UpdateCalibHit failed, invalid rt" << endmsg;
34  }
35  }
36 
37  private:
38  const IRtRelation* m_rt;
39  };
40 
41 } // namespace MuonCalib
42 
43 #endif
MuonCalib::UpdateCalibHit::m_rt
const IRtRelation * m_rt
Definition: UpdateCalibHit.h:38
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
MuonCalib::UpdateCalibHit::operator()
void operator()(MdtCalibHit *hit)
Definition: UpdateCalibHit.h:27
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
MdtCalibHit::setDriftRadius
void setDriftRadius(double r, double sigmaR)
sets drift radius and drift radius error
Definition: MdtCalibHit.h:364
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MdtCalibHit
Definition: MdtCalibHit.h:50
MdtCalibHit.h
MuonCalib::IRtRelation::radius
virtual double radius(double t) const =0
returns drift radius for a given time
MuonCalib::UpdateCalibHit::UpdateCalibHit
UpdateCalibHit(const IRtRelation *rt)
Definition: UpdateCalibHit.h:25
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
MdtCalibHit::driftTime
double driftTime() const
retrieve drift time
Definition: MdtCalibHit.h:423
MuonCalib::IRtRelation
generic interface for a rt-relation
Definition: IRtRelation.h:15
MuonCalib::UpdateCalibHit
Definition: UpdateCalibHit.h:23