ATLAS Offline Software
Loading...
Searching...
No Matches
MdtCalibHit.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5/***************************************************************************
6 * Mdt Calibration Input Event Data Model
7 * --------------------------------------
8 *
9 * Author : Martin Woudstra
10 * Creation Date: 18 February 2004
11 ***************************************************************************/
12
13#ifndef MUONCALIBEVENT_MDTCALIBHIT_H
14#define MUONCALIBEVENT_MDTCALIBHIT_H
15// std
16#include <cassert>
17#include <cmath>
18#include <iostream>
19// other packages
20
21// this package
24
25// pre-declarations
26namespace MuonGM {
28}
29
30namespace MuonCalib {
31 class MdtCalibHitBase;
32 class IIdToFixedIdTool;
33} // namespace MuonCalib
34
35class MsgStream;
36
49
51public:
52 static const float kNoValue;
53 MdtCalibHit();
54
56 const Muon::MdtPrepData *dig, const Amg::Vector3D &globalPos,
57 const MuonGM::MdtReadoutElement *geo);
58 MdtCalibHit(const Muon::MdtPrepData *dig, const Amg::Vector3D &globalPos, const Amg::Vector3D &localPos,
59 const MuonGM::MdtReadoutElement *geo);
61
62 MdtCalibHit(const Identifier &id, int tdc, int adc, const Amg::Vector3D &globalPos,
64 *geo);
65 MdtCalibHit(const Identifier &id, int tdc, int adc, const Amg::Vector3D &globalPos, const Amg::Vector3D &localPos,
66 const MuonGM::MdtReadoutElement *geo);
68
69 void setPrepData(const Muon::MdtPrepData *dig);
70 void setIdentifier(const Identifier &id);
71 void setTdc(int tdc);
72 void setAdc(int adc);
73 void setGlobalPos(const Amg::Vector3D &globalPos);
74 void setLocalPos(const Amg::Vector3D &localPos);
77 void setGeometry(const MuonGM::MdtReadoutElement *geo);
78 void setDriftTime(double t);
79 void setDriftRadius(double r, double sigmaR);
80 void setDistanceToTrack(double dist, double sigmaDist);
81 void setTimeFromTrackDistance(double t, double sigmaT);
82 void setSlewingTime(double slew);
83 void setLorentzTime(double lor);
84 void setPropagationTime(double prop);
85 void setTimeOfFlight(double tof);
86 void setDistanceToReadout(double dist);
87 void setWiresagTime(float wsag);
88 inline void setTemperatureTime(float temp) {
89 m_temperatureTime = temp;
90 }
91 void setBackgroundTime(float bkgr);
92 void setBFieldPerp(float bfperp);
93 void setBFieldPara(float bfpara);
94 void setTemperature(float temp);
95 void setProjSag(float sag);
96 void setTubeT0(float t0);
97 void setTubeAdcCal(float adccal);
98 void setLocXtwin(float xtwin);
99 void setSigma2LocXtwin(float xtwin);
100
101 const MuonGM::MdtReadoutElement *geometry() const;
102 const Identifier &identify() const;
103 const Amg::Vector3D &globalPosition() const;
104 const Amg::Vector3D &localPosition() const;
107 int tdcCount() const;
108 int adcCount() const;
109 double driftTime() const;
110 double driftRadius() const;
111 double sigmaDriftRadius() const;
112 double sigma2DriftRadius() const;
113 double signedDistanceToTrack() const;
114 double sigmaDistanceToTrack() const;
115 double sigma2DistanceToTrack() const;
116 double distanceToReadout() const;
117 double slewingTime() const;
118 double lorentzTime() const;
119 double propagationTime() const;
120 double timeOfFlight() const;
121 double timeFromTrackDistance() const;
122 double sigmaTimeFromTrackDistance() const;
123 double sigma2TimeFromTrackDistance() const;
124 double radialResidual() const;
125 double trackResidual() const;
126 double timeResidual() const;
127 float WiresagTime() const;
128 inline float TemperatureTime() const {
129 return m_temperatureTime;
130 }
131 float BackgroundTime() const;
132 float bFieldPerp() const;
133 float bFieldPara() const;
134 float temperature() const;
135 float projSag() const;
136 float tubeT0() const;
137 float tubeAdcCal() const;
138 float xtwin() const;
139 float sigmaXtwin() const;
140 float sigma2Xtwin() const;
141
143 const MuonCalib::IIdToFixedIdTool &) const;
144
145 std::ostream &dump(std::ostream &stream) const;
146 MsgStream &dump(MsgStream &sl) const;
147
148private:
150 int m_tdc;
151 int m_adc;
175 float m_projSag;
176 float m_tube_t0;
178 float m_xtwin;
180};
181
212
243
275
307
339
341 m_id = dig->identify();
342 m_tdc = dig->tdc();
343 m_adc = dig->adc();
344}
345
346inline void MdtCalibHit::setIdentifier(const Identifier &id) { m_id = id; }
347
348inline void MdtCalibHit::setTdc(int tdc) { m_tdc = tdc; }
349
350inline void MdtCalibHit::setAdc(int adc) { m_adc = adc; }
351
352inline void MdtCalibHit::setGlobalPos(const Amg::Vector3D &globalPos) { m_globalPosition = globalPos; }
353
354inline void MdtCalibHit::setLocalPos(const Amg::Vector3D &localPos) { m_localPosition = localPos; }
355
357
359
361
362inline void MdtCalibHit::setDriftTime(double t) { m_driftTime = t; }
363
364inline void MdtCalibHit::setDriftRadius(double r, double sigmaR) {
366 m_sigma2DriftRadius = sigmaR * sigmaR;
367}
368
369inline void MdtCalibHit::setDistanceToTrack(double dist, double sigmaDist) {
371 m_sigma2DistanceToTrack = sigmaDist * sigmaDist;
372}
373
374inline void MdtCalibHit::setTimeFromTrackDistance(double t, double sigmaT) {
376 m_sigma2TimeFromTrackDistance = sigmaT * sigmaT;
377}
378
379inline void MdtCalibHit::setSlewingTime(double slew) { m_slewingTime = slew; }
380
381inline void MdtCalibHit::setLorentzTime(double lor) { m_lorentzTime = lor; }
382
383inline void MdtCalibHit::setPropagationTime(double prop) { m_propagationTime = prop; }
384
385inline void MdtCalibHit::setTimeOfFlight(double tof) { m_timeOfFlight = tof; }
386
387inline void MdtCalibHit::setDistanceToReadout(double dist) { m_distanceToReadout = dist; }
388
389inline void MdtCalibHit::setWiresagTime(float wsag) { m_wiresagTime = wsag; }
390
391inline void MdtCalibHit::setBFieldPerp(float val) { m_bFieldPerp = val; }
392
393inline void MdtCalibHit::setBFieldPara(float val) { m_bFieldPara = val; }
394
395inline void MdtCalibHit::setTemperature(float val) { m_temperature = val; }
396
397inline void MdtCalibHit::setProjSag(float val) { m_projSag = val; }
398
399inline void MdtCalibHit::setTubeT0(float t0) { m_tube_t0 = t0; }
400
401inline void MdtCalibHit::setTubeAdcCal(float adccal) { m_tube_adccal = adccal; }
402
404
405inline void MdtCalibHit::setSigma2LocXtwin(float sigma2XTwin) { m_sigma2XTwin = sigma2XTwin; }
406
408
409inline const Identifier &MdtCalibHit::identify() const { return m_id; }
410
412
414
416
418
419inline int MdtCalibHit::tdcCount() const { return m_tdc; }
420
421inline int MdtCalibHit::adcCount() const { return m_adc; }
422
423inline double MdtCalibHit::driftTime() const { return m_driftTime; }
424
425inline double MdtCalibHit::driftRadius() const { return m_driftRadius; }
426
427inline double MdtCalibHit::sigmaDriftRadius() const { return std::sqrt(m_sigma2DriftRadius); }
428
430
432
433inline double MdtCalibHit::sigmaDistanceToTrack() const { return std::sqrt(m_sigma2DistanceToTrack); }
434
436
438
439inline double MdtCalibHit::slewingTime() const { return m_slewingTime; }
440
441inline double MdtCalibHit::lorentzTime() const { return m_lorentzTime; }
442
443inline double MdtCalibHit::propagationTime() const { return m_propagationTime; }
444
445inline double MdtCalibHit::timeOfFlight() const { return m_timeOfFlight; }
446
448
450
452
453inline double MdtCalibHit::radialResidual() const { return std::abs(m_driftRadius) - std::abs(m_signedDistanceToTrack); }
454
456
458
459inline float MdtCalibHit::tubeT0() const { return m_tube_t0; }
460
461inline float MdtCalibHit::tubeAdcCal() const { return m_tube_adccal; }
462
463inline float MdtCalibHit::xtwin() const { return m_xtwin; }
464
465inline float MdtCalibHit::sigmaXtwin() const { return std::sqrt(m_sigma2XTwin); }
466
467inline float MdtCalibHit::sigma2Xtwin() const { return m_sigma2XTwin; }
468
469inline float MdtCalibHit::bFieldPerp() const { return m_bFieldPerp; }
470
471inline float MdtCalibHit::bFieldPara() const { return m_bFieldPara; }
472
473inline float MdtCalibHit::temperature() const { return m_temperature; }
474
475inline float MdtCalibHit::projSag() const { return m_projSag; }
476
477std::ostream &operator<<(std::ostream &stream, const MdtCalibHit &hit);
478
479MsgStream &operator<<(MsgStream &sl, const MdtCalibHit &hit);
480
481#endif // MUONCALIBEVENT_MDTCALIBHIT_H
static Double_t t0
std::ostream & operator<<(std::ostream &stream, const MdtCalibHit &hit)
An MdtCalibHit is an object containing all the intermediate information needed in the conversion of r...
Definition MdtCalibHit.h:50
const Amg::Vector3D & localPosition() const
retrieve the position in the station coordinates
double timeResidual() const
retrieve difference between drifttime and timeFromTrackDistance
const Identifier & identify() const
retrieve Identifier
int tdcCount() const
retrieve TDC counts
void setDriftTime(double t)
sets drift time
void setAdc(int adc)
sets the ADC counts
void setLocalPointOfClosestApproach(const Amg::Vector3D &point)
sets point of closest approach in local coordinates
float xtwin() const
retrieve twin position
float TemperatureTime() const
MuonCalib::MdtCalibHitBase * hitBase(const MuonCalib::IIdToFixedIdTool &) const
return a pointer to the MdtCalibHit object to be used in the calibration framework
float bFieldPerp() const
retrieve the Bfield perpendicular to the tube
double driftRadius() const
retrieve drift radius
Amg::Vector3D m_localPosition
position of the hit expressed in local (station) coordinates
double sigmaDistanceToTrack() const
retrieve the error on the distance of the track to the wire
float temperature() const
retrieve the temperature
float m_temperatureTime
extra time due to temperature
const Amg::Vector3D & globalPointOfClosestApproach() const
retrieve the point of closest approach in global coordinates
void setTubeAdcCal(float adccal)
sets the tube mean ADC
Amg::Vector3D m_globalPointOfClosestApproach
point of closest approach of track to wire in global coordinates
float m_timeFromTrackDistance
for calibration or trackfit in time-domain
void setDistanceToReadout(double dist)
sets the distance to read out
double signedDistanceToTrack() const
retrieve the distance of the track to the wire
void setLocalPos(const Amg::Vector3D &localPos)
sets the position in the station coordinates
void setGeometry(const MuonGM::MdtReadoutElement *geo)
sets the MdtReadoutElement
void setIdentifier(const Identifier &id)
sets Identifier
double distanceToReadout() const
retrieve the distance to readout
double timeOfFlight() const
retrieve the timing correction due to time of flight of the muon
double driftTime() const
retrieve drift time
void setLorentzTime(double lor)
sets the time correction due to the magnetic field
double sigma2TimeFromTrackDistance() const
retrieve the error squared of the time corresponding to distance to track
float sigmaXtwin() const
retrieve twin position error
static const float kNoValue
constant to set values to invalid
Definition MdtCalibHit.h:52
float m_propagationTime
along the wire
float tubeAdcCal() const
retrieve the tube mean ADC
double radialResidual() const
retrieve difference between driftcircle and distance to track (unsigned)
MdtCalibHit()
default constructor
void setTemperature(float temp)
sets the temperature
void setSlewingTime(double slew)
sets the time correction due to slewing
double sigma2DistanceToTrack() const
retrieve the error squared on the distance of the track to the wire
float m_bFieldPara
local bfield parallel to the wire
float m_lorentzTime
extra time due to magnetic field
float m_tube_t0
the t0 of the tube
int adcCount() const
retrieve the ADC counts
float m_wiresagTime
extra time due to wiresag
float bFieldPara() const
retrieve the Bfield parallel to the tube
float m_sigma2DriftRadius
drift radius variance
Amg::Vector3D m_globalPosition
position of the hit expressed in ATLAS global coordinates
void setPrepData(const Muon::MdtPrepData *dig)
sets mdtPrepData
float sigma2Xtwin() const
retrieve twin position variance
float m_bFieldPerp
local bfield perpendicular to the wire
void setProjSag(float sag)
sets the projected wire sag
void setGlobalPos(const Amg::Vector3D &globalPos)
sets the position in ATLAS coordinates
float tubeT0() const
retrieve the tube T0
float WiresagTime() const
retrieve the timing correction due to wiresag
float m_backgroundTime
extra time due to background
void setDriftRadius(double r, double sigmaR)
sets drift radius and drift radius error
void setBFieldPara(float bfpara)
sets the B field parallel to the tube
double trackResidual() const
retrieve difference between driftcircle and distance to track (signed)
Amg::Vector3D m_localPointOfClosestApproach
point of closest approach of track to wire in local coordinates
float m_timeOfFlight
time of flight of the muon (CLHEP::ns)
void setDistanceToTrack(double dist, double sigmaDist)
sets the distance to the fitted track and its error
float m_tube_adccal
mean ADC of the tube (calibration)
void setTubeT0(float t0)
sets the tube t0
void setTdc(int tdc)
sets TDC counts
const MuonGM::MdtReadoutElement * geometry() const
retrieve the MdtReadoutElement
float m_projSag
projective sag
double timeFromTrackDistance() const
retrieve the time corresponding to the distance to track
double sigmaTimeFromTrackDistance() const
retrieve the error of the time corresponding to the distance to track
float m_driftTime
drift time after all corrections
void setLocXtwin(float xtwin)
sets twin local position
int m_tdc
TDC counts.
float m_distanceToReadout
from hit to read-out side of tube
float m_signedDistanceToTrack
signed distance from track to wire
void setTimeFromTrackDistance(double t, double sigmaT)
sets the time of the distance to the fitted track (and its error)
void setSigma2LocXtwin(float xtwin)
sets twin local position variance
double slewingTime() const
retrieve the timing correction due to slewing
float m_sigma2TimeFromTrackDistance
(square of) sigma on m_timeFromTrackDistance
void setGlobalPointOfClosestApproach(const Amg::Vector3D &point)
sets point of closest approach in global coordinates
float m_xtwin
the twin position
float m_sigma2XTwin
the twin position variance
void setBFieldPerp(float bfperp)
sets the B field perpendicular to the tube
void setBackgroundTime(float bkgr)
sets the time correction due to background signal
void setPropagationTime(double prop)
sets the time correction due to the propagation of the signal over the wire
const Amg::Vector3D & localPointOfClosestApproach() const
retrieve the point of closest approach in local coordinates
const Amg::Vector3D & globalPosition() const
retrieve the position in ATLAS coordinates
float m_sigma2DistanceToTrack
square of sigma on m_signedDistanceToTrack
float projSag() const
retrieve the projected sag
double sigmaDriftRadius() const
retrieve the error on the radius of the drift circle
const MuonGM::MdtReadoutElement * m_geometry
MdtReadoutElement.
float BackgroundTime() const
double lorentzTime() const
retrieve the timing correction due to the magnetic field (lorentz angle)
float m_driftRadius
drift radius
Identifier m_id
(ATLAS) Identifier
float m_slewingTime
extra time due to slewing (electronics)
double propagationTime() const
retrieve the timing correction due to the propagation of the signal
int m_adc
ADC counts.
void setTimeOfFlight(double tof)
sets the time correction due to the muon time of flight
void setWiresagTime(float wsag)
sets the time correction due to wire sag
float m_temperature
local temperature
void setTemperatureTime(float temp)
Definition MdtCalibHit.h:88
double sigma2DriftRadius() const
retrieve the error squared on the radius of the drift circle
Interface for tools performing the conversion between Athena Identifiers and Muon Calibration Standal...
Athena-independent part of the MdtCalibHit.
Class to represent measurements from the Monitored Drift Tubes.
Definition MdtPrepData.h:33
int adc() const
Returns the ADC (typically range is 0 to 250)
int tdc() const
Returns the TDC (typically range is 0 to 2500).
Identifier identify() const
return the identifier
int r
Definition globals.cxx:22
Eigen::Matrix< double, 3, 1 > Vector3D
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Ensure that the Athena extensions are properly loaded.
Definition GeoMuonHits.h:27
-event-from-file