ATLAS Offline Software
MdtCalibHit.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /***************************************************************************
6  * Muon Calibration Input Event Data Model
7  * -----------------------------------------
8  *
9  * Author : Martin Woudstra
10  * Creation Date: 12 May 2004
11  ***************************************************************************/
12 
13 // std
14 #include <float.h>
15 // other packages
16 
17 // this package
18 #include "GaudiKernel/MsgStream.h"
22 
23 // static members
24 const float MdtCalibHit::kNoValue = FLT_MAX;
25 
26 // MdtCalibHit::hitBase copies data from a MdtCalibHit instance to a MdtCalibHitBase
27 // MdtCalibHit and MdtCalibHitBase are nearly identical except that
28 // MdtCalibHit uses an Athena identifier and MdtCalibHitBase uses Muonfixedid
31 
32  hb->setIdentifier(rIdToFixed.idToFixedId(m_id));
33  hb->setTdc(m_tdc);
34  hb->setAdc(m_adc);
38  if (m_sigma2DriftRadius > 0)
40  else
44  else
48  else
55 
62  hb->setProjSag(m_projSag);
63 
64  hb->setTubeT0(m_tube_t0);
68  hb->setLocXtwin(m_xtwin);
69  if (m_sigma2XTwin > 0)
70  hb->setSigmaLocXtwin(std::sqrt(m_sigma2XTwin));
71  else
72  hb->setSigmaLocXtwin(0.);
74  // WARNING: these quantities, foreseen for MdtCalibHitBase, are not
75  // available from MdtCalibHit
77  // hb->setWiresagTime(??);
78  // hb->setTemperatureTime(??);
79  // hb->setBackgroundTime(??);
80 
81  return hb;
82 } // end MdtCalibHit::hitBase
83 
84 std::ostream& MdtCalibHit::dump(std::ostream& stream) const {
85  stream << "MdtMdtCalibHit: " << std::endl;
86  stream << " Drift time " << driftTime() << " radius " << driftRadius() << " DistRO " << distanceToReadout() << std::endl;
87  stream << " Radial residual " << radialResidual() << std::endl;
88  stream << " Global position " << globalPosition() << " local position " << localPosition() << std::endl;
89  return stream;
90 }
91 
92 // overload of ostream operator
93 MsgStream& MdtCalibHit::dump(MsgStream& sl) const {
94  sl << "MdtMdtCalibHit: " << std::endl;
95  sl << " Drift time " << driftTime() << " radius " << driftRadius() << " DistRO " << distanceToReadout() << std::endl;
96  sl << " Radial residual " << radialResidual() << std::endl;
97  sl << " Global position (" << globalPosition().x() << "," << globalPosition().y() << "," << globalPosition().z() << ") "
98  << " local position (" << localPosition().x() << "," << localPosition().y() << "," << localPosition().z() << ") " << std::endl;
99  return sl;
100 }
101 
102 std::ostream& operator<<(std::ostream& stream, const MdtCalibHit& hit) { return hit.dump(stream); }
103 
104 MsgStream& operator<<(MsgStream& sl, const MdtCalibHit& hit) { return hit.dump(sl); }
MuonCalib::MdtCalibHitBase::setDistanceToReadout
void setDistanceToReadout(float dist)
sets the distance to read out
Definition: MdtCalibHitBase.cxx:55
MuonCalib::MdtCalibHitBase::setBackgroundTime
void setBackgroundTime(float bkgr)
sets the time correction due to background signal
Definition: MdtCalibHitBase.cxx:57
MdtCalibHit::m_timeOfFlight
float m_timeOfFlight
time of flight of the muon (CLHEP::ns)
Definition: MdtCalibHit.h:165
MdtCalibHit::m_id
Identifier m_id
(ATLAS) Identifier
Definition: MdtCalibHit.h:149
MdtCalibHit::kNoValue
static const float kNoValue
constant to set values to invalid
Definition: MdtCalibHit.h:52
MdtCalibHit::distanceToReadout
double distanceToReadout() const
retrieve the distance to readout
Definition: MdtCalibHit.h:437
MdtCalibHit::m_adc
int m_adc
ADC counts.
Definition: MdtCalibHit.h:151
MdtCalibHit::m_tube_adccal
float m_tube_adccal
mean ADC of the tube (calibration)
Definition: MdtCalibHit.h:177
MuonCalib::MdtCalibHitBase::setTimeFromTrackDistance
void setTimeFromTrackDistance(float t, float sigmaT)
sets the time of the distance to the fitted track (and its error)
Definition: MdtCalibHitBase.cxx:46
MdtCalibHit::radialResidual
double radialResidual() const
retrieve difference between driftcircle and distance to track (unsigned)
Definition: MdtCalibHit.h:453
MuonCalib::MdtCalibHitBase::setTimeOfFlight
void setTimeOfFlight(float tof)
sets the time correction due to the muon time of flight
Definition: MdtCalibHitBase.cxx:54
MdtCalibHit::m_temperature
float m_temperature
local temperature
Definition: MdtCalibHit.h:174
MdtCalibHit::m_bFieldPara
float m_bFieldPara
local bfield parallel to the wire
Definition: MdtCalibHit.h:173
MdtCalibHit::m_localPointOfClosestApproach
Amg::Vector3D m_localPointOfClosestApproach
point of closest approach of track to wire in local coordinates
Definition: MdtCalibHit.h:155
MdtCalibHit::m_sigma2XTwin
float m_sigma2XTwin
the twin position variance
Definition: MdtCalibHit.h:179
MuonCalib::MdtCalibHitBase::setTemperatureTime
void setTemperatureTime(float temp)
sets the time correction due to temperature effects
Definition: MdtCalibHitBase.cxx:56
MuonCalib::MdtCalibHitBase::setDriftRadius
void setDriftRadius(float r, float sigmaR)
sets drift radius and drift radius error
Definition: MdtCalibHitBase.cxx:37
MdtCalibHit::m_driftRadius
float m_driftRadius
drift radius
Definition: MdtCalibHit.h:158
MdtCalibHit::m_slewingTime
float m_slewingTime
extra time due to slewing (electronics)
Definition: MdtCalibHit.h:162
MuonCalib::IIdToFixedIdTool
Definition: IIdToFixedIdTool.h:40
MdtCalibHit::m_globalPosition
Amg::Vector3D m_globalPosition
position of the hit expressed in ATLAS global coordinates
Definition: MdtCalibHit.h:153
MuonCalib::MdtCalibHitBase::setWiresagTime
void setWiresagTime(float wsag)
sets the time correction due to wire sag
Definition: MdtCalibHitBase.cxx:50
MuonCalib::MdtCalibHitBase::setPropagationTime
void setPropagationTime(float prop)
sets the time correction due to the propagation of the signal over the wire
Definition: MdtCalibHitBase.cxx:53
MdtCalibHit::m_projSag
float m_projSag
projective sag
Definition: MdtCalibHit.h:175
MdtCalibHit::m_globalPointOfClosestApproach
Amg::Vector3D m_globalPointOfClosestApproach
point of closest approach of track to wire in global coordinates
Definition: MdtCalibHit.h:156
MdtCalibHit::m_propagationTime
float m_propagationTime
along the wire
Definition: MdtCalibHit.h:164
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
MdtCalibHit::hitBase
MuonCalib::MdtCalibHitBase * hitBase(const MuonCalib::IIdToFixedIdTool &) const
return a pointer to the MdtCalibHit object to be used in the calibration framework
Definition: MdtCalibHit.cxx:29
MuonCalib::MdtCalibHitBase::setTubeT0
void setTubeT0(float t0)
sets the tube t0
Definition: MdtCalibHitBase.cxx:62
MuonCalib::MdtCalibHitBase::setDriftTime
void setDriftTime(float t)
sets drift time
Definition: MdtCalibHitBase.cxx:36
MuonCalib::MdtCalibHitBase::setGlobalPointOfClosestApproach
void setGlobalPointOfClosestApproach(const Amg::Vector3D &point)
sets point of closest approach in global coordinates
Definition: MdtCalibHitBase.cxx:34
MdtCalibHit::m_xtwin
float m_xtwin
the twin position
Definition: MdtCalibHit.h:178
MuonCalib::MdtCalibHitBase::setLocalPos
void setLocalPos(const Amg::Vector3D &localPos)
sets the position in the station coordinates
Definition: MdtCalibHitBase.cxx:33
MdtCalibHit::m_sigma2DistanceToTrack
float m_sigma2DistanceToTrack
square of sigma on m_signedDistanceToTrack
Definition: MdtCalibHit.h:168
MdtCalibHit::localPosition
const Amg::Vector3D & localPosition() const
retrieve the position in the station coordinates
Definition: MdtCalibHit.h:413
MdtCalibHit::globalPosition
const Amg::Vector3D & globalPosition() const
retrieve the position in ATLAS coordinates
Definition: MdtCalibHit.h:411
MdtCalibHit::m_sigma2DriftRadius
float m_sigma2DriftRadius
drift radius variance
Definition: MdtCalibHit.h:159
MdtCalibHit::m_sigma2TimeFromTrackDistance
float m_sigma2TimeFromTrackDistance
(square of) sigma on m_timeFromTrackDistance
Definition: MdtCalibHit.h:161
MdtCalibHit::driftRadius
double driftRadius() const
retrieve drift radius
Definition: MdtCalibHit.h:425
MdtCalibHit::m_tube_t0
float m_tube_t0
the t0 of the tube
Definition: MdtCalibHit.h:176
MdtCalibHit::m_bFieldPerp
float m_bFieldPerp
local bfield perpendicular to the wire
Definition: MdtCalibHit.h:172
MuonCalib::MdtCalibHitBase::setDistanceToTrack
void setDistanceToTrack(float dist, float sigmaDist)
sets the distance to the fitted track and its error
Definition: MdtCalibHitBase.cxx:42
MdtCalibHit::m_distanceToReadout
float m_distanceToReadout
from hit to read-out side of tube
Definition: MdtCalibHit.h:166
MdtCalibHit::m_localPosition
Amg::Vector3D m_localPosition
position of the hit expressed in local (station) coordinates
Definition: MdtCalibHit.h:154
operator<<
std::ostream & operator<<(std::ostream &stream, const MdtCalibHit &hit)
Definition: MdtCalibHit.cxx:102
MuonCalib::MdtCalibHitBase::setProjSag
void setProjSag(float sag)
sets the projected wire sag
Definition: MdtCalibHitBase.cxx:61
MdtCalibHit
Definition: MdtCalibHit.h:50
MuonCalib::IIdToFixedIdTool::idToFixedId
virtual MuonFixedId idToFixedId(const Identifier &id) const =0
pure virtual member to convert (ATHENA) Identifier to (Calib-EDM) MuonFixedId
MdtCalibHit::m_tdc
int m_tdc
TDC counts.
Definition: MdtCalibHit.h:150
MdtCalibHit.h
MuonCalib::MdtCalibHitBase::setBFieldPerp
void setBFieldPerp(float bfperp)
sets the B field perpendicular to the tube
Definition: MdtCalibHitBase.cxx:58
MuonCalib::MdtCalibHitBase::setAdc
void setAdc(unsigned short adc)
sets the adc counts
Definition: MdtCalibHitBase.cxx:31
MuonCalib::MdtCalibHitBase::setBFieldPara
void setBFieldPara(float bfpara)
sets the B field parallel to the tube
Definition: MdtCalibHitBase.cxx:59
MuonCalib::MdtCalibHitBase::setTdc
void setTdc(unsigned short tdc)
sets the tdc counts
Definition: MdtCalibHitBase.cxx:30
MdtCalibHit::dump
std::ostream & dump(std::ostream &stream) const
ostream operator
Definition: MdtCalibHit.cxx:84
MuonCalib::MdtCalibHitBase::setSigmaLocXtwin
void setSigmaLocXtwin(float xtwin)
sets the local twin position error
Definition: MdtCalibHitBase.cxx:65
MuonCalib::MdtCalibHitBase::setLocalPointOfClosestApproach
void setLocalPointOfClosestApproach(const Amg::Vector3D &point)
sets point of closest approach in local coordinates
Definition: MdtCalibHitBase.cxx:35
MuonCalib::MdtCalibHitBase::setGlobalPos
void setGlobalPos(const Amg::Vector3D &globalPos)
sets the position in ATLAS coordinates
Definition: MdtCalibHitBase.cxx:32
MdtCalibHit::m_backgroundTime
float m_backgroundTime
extra time due to background
Definition: MdtCalibHit.h:171
MuonCalib::MdtCalibHitBase
Definition: MdtCalibHitBase.h:38
MdtCalibHit::m_driftTime
float m_driftTime
drift time after all corrections
Definition: MdtCalibHit.h:157
MdtCalibHit::m_signedDistanceToTrack
float m_signedDistanceToTrack
signed distance from track to wire
Definition: MdtCalibHit.h:167
MdtCalibHit::m_lorentzTime
float m_lorentzTime
extra time due to magnetic field
Definition: MdtCalibHit.h:163
MdtCalibHit::m_wiresagTime
float m_wiresagTime
extra time due to wiresag
Definition: MdtCalibHit.h:169
MuonCalib::MdtCalibHitBase::setIdentifier
void setIdentifier(const MuonFixedId &id)
sets the MuonFixedIdentifier of the hit
Definition: MdtCalibHitBase.cxx:29
MuonCalib::MdtCalibHitBase::setSlewingTime
void setSlewingTime(float slew)
sets the time correction due to slewing
Definition: MdtCalibHitBase.cxx:51
MuonCalib::MdtCalibHitBase::setBFieldTime
void setBFieldTime(float lor)
sets the time correction due to the magnetic field
Definition: MdtCalibHitBase.cxx:52
MuonCalib::MdtCalibHitBase::setLocXtwin
void setLocXtwin(float xtwin)
sets the local twin position
Definition: MdtCalibHitBase.cxx:64
MdtCalibHit::driftTime
double driftTime() const
retrieve drift time
Definition: MdtCalibHit.h:423
MuonCalib::MdtCalibHitBase::setTubeAdcCal
void setTubeAdcCal(float adccal)
sets the tube mean ADC
Definition: MdtCalibHitBase.cxx:63
MuonCalib::MdtCalibHitBase::setTemperature
void setTemperature(float temp)
sets the temperature
Definition: MdtCalibHitBase.cxx:60
MdtCalibHit::m_timeFromTrackDistance
float m_timeFromTrackDistance
for calibration or trackfit in time-domain
Definition: MdtCalibHit.h:160
MdtCalibHit::m_temperatureTime
float m_temperatureTime
extra time due to temperature
Definition: MdtCalibHit.h:170
MdtCalibHitBase.h
IIdToFixedIdTool.h