ATLAS Offline Software
Loading...
Searching...
No Matches
MdtCalibHitBase.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5/***************************************************************************
6 * Mdt Calibration Input Event Data Model
7 ***************************************************************************/
8
9#ifndef MUONCALIB_MDTCALIBHITBASE_H
10#define MUONCALIB_MDTCALIBHITBASE_H
11
12// std
13#include <float.h>
14
15#include <cassert>
16#include <cmath>
17#include <iostream>
18
19// other packages
21
22// this package
24
25namespace MuonCalib {
26
35
37 public:
38 static constexpr float kNoValue{FLT_MAX};
39 struct defineParams {
40 /* Fixed, Athena-independent Identifier*/
42 int tdc{0};
43 int adc{0};
48 float driftTime{FLT_MAX};
49 float driftRadius{FLT_MAX};
50 float sigma2DriftRadius{FLT_MAX};
51 float timeFromTrackDistance{FLT_MAX};
53 float slewingTime{FLT_MAX};
54 float bFieldTime{FLT_MAX};
55 float propagationTime{FLT_MAX};
56 float timeOfFlight{FLT_MAX};
57 float distanceToReadout{FLT_MAX};
58 float signedDistanceToTrack{FLT_MAX};
59 float sigma2DistanceToTrack{FLT_MAX};
60 float wiresagTime{FLT_MAX};
61 float temperatureTime{FLT_MAX};
62 float backgroundTime{FLT_MAX};
63 float bFieldPerp{FLT_MAX};
64 float bFieldPara{FLT_MAX};
65 float temperature{FLT_MAX};
66 float projSag{FLT_MAX};
67 float tube_t0{FLT_MAX};
68 float tube_adccal{FLT_MAX};
69 float xtwin{FLT_MAX};
70 float sigmaXTwin{FLT_MAX};
71 bool segmentT0Applied{false};
72 float tubeRadius{FLT_MAX};
73 };
74
75 MdtCalibHitBase() = default;
76 MdtCalibHitBase &operator=(const MdtCalibHitBase &rhs) = default;
77 MdtCalibHitBase(const MdtCalibHitBase &event) = default;
78 ~MdtCalibHitBase() = default;
79
82 int tdc, int adc, const Amg::Vector3D &globalPos,
83 const Amg::Vector3D &localPos);
84
85 // setters
86 void setIdentifier(const MuonFixedId &id);
87 void setTdc(unsigned short tdc);
88 void setAdc(unsigned short adc);
89 void setGlobalPos(const Amg::Vector3D &globalPos);
90 void setLocalPos(const Amg::Vector3D &localPos);
93 void setDriftTime(float t);
94 void setDriftRadius(float r, float sigmaR);
95 void setTubeRadius(float r);
96 void setDistanceToTrack(float dist, float sigmaDist);
97 void setTimeFromTrackDistance(float t, float sigmaT);
98 void setSlewingTime(float slew);
99 void setBFieldTime(float lor);
100 void setPropagationTime(float prop);
101 void setTimeOfFlight(float tof);
102 void setDistanceToReadout(float dist);
103 void setWiresagTime(float wsag);
104 void setTemperatureTime(float temp);
105 void setBackgroundTime(float bkgr);
106 void setBFieldPerp(float bfperp);
107 void setBFieldPara(float bfpara);
108 void setTemperature(float temp);
109 void setProjSag(float sag);
110 void setTubeT0(float t0);
111 void setTubeAdcCal(float adccal);
112 void setLocXtwin(float xtwin);
113 void setSigmaLocXtwin(float xtwin);
114 void setSegmentT0Applied(bool flag);
115
116 /* getters */
117 const MuonFixedId &identify() const;
118 const Amg::Vector3D &globalPosition() const;
119 const Amg::Vector3D &localPosition() const;
122 unsigned short tdcCount() const;
123 unsigned short adcCount() const;
124 float driftTime() const;
125 float driftRadius() const;
126 float sigmaDriftRadius() const;
127 float sigma2DriftRadius() const;
128 float signedDistanceToTrack() const;
129 float sigmaDistanceToTrack() const;
130 float sigma2DistanceToTrack() const;
131 float tubeRadius() const;
132 float distanceToReadout() const;
133 float slewingTime() const;
134 float bFieldTime() const;
135 float propagationTime() const;
136 float timeOfFlight() const;
137 float timeFromTrackDistance() const;
138 float sigmaTimeFromTrackDistance() const;
139 float sigma2TimeFromTrackDistance() const;
140 float radialResidual() const;
141 float trackResidual() const;
142 float timeResidual() const;
143 float WiresagTime() const;
144 float TemperatureTime() const;
145 float BackgroundTime() const;
146 float bFieldPerp() const;
147 float bFieldPara() const;
148 float temperature() const;
149 float projSag() const;
150 float tubeT0() const;
151 float tubeAdcCal() const;
152 float xtwin() const;
153 float sigmaXtwin() const;
154 bool segmentT0Applied() const;
155
156 /* ostream operators */
157 std::ostream &dump(std::ostream &stream) const;
158
159 private:
161 };
162
163} // namespace MuonCalib
164
165std::ostream &operator<<(std::ostream &stream, const MuonCalib::MdtCalibHitBase &hit);
166
167#endif // MUONCALIB_MDTCALIBHITBASE_H
static Double_t t0
std::ostream & operator<<(std::ostream &stream, const MuonCalib::MdtCalibHitBase &hit)
Athena-independent part of the MdtCalibHit.
float driftRadius() const
retrieve the radius of the drift circle
void setLocXtwin(float xtwin)
sets the local twin position
unsigned short adcCount() const
retrieve the adc counts
void setDriftRadius(float r, float sigmaR)
sets drift radius and drift radius error
float sigma2DistanceToTrack() const
retrieve the error squared on the distance of the track to the wire
float propagationTime() const
retrieve the timing correction due to the propagation of the signal
float tubeAdcCal() const
retrieve the tube mean ADC
const Amg::Vector3D & globalPointOfClosestApproach() const
retrieve the point of closest approach in global coordinates
float sigmaDistanceToTrack() const
retrieve the error on the distance of the track to the wire
float WiresagTime() const
retrieve the timing correction due to wiresag
float trackResidual() const
retrieve difference between driftcircle and distance to track (signed)
void setBFieldTime(float lor)
sets the time correction due to the magnetic field
float timeFromTrackDistance() const
retrieve the time corresponding to the distance to track
float distanceToReadout() const
retrieve the distance to readout
void setLocalPos(const Amg::Vector3D &localPos)
sets the position in the station coordinates
float xtwin() const
retrieve the local twin position
unsigned short tdcCount() const
retrieve the tdc counts
void setGlobalPointOfClosestApproach(const Amg::Vector3D &point)
sets point of closest approach in global coordinates
float bFieldPara() const
retrieve the Bfield parallel to the tube
float driftTime() const
retrieve the drift time
float BackgroundTime() const
float tubeRadius() const
retrieve the inner radius of the drift tube
float timeOfFlight() const
retrieve the timing correction due to time of flight of the muon
float sigma2DriftRadius() const
retrieve the error squared on the radius of the drift circle
void setTemperature(float temp)
sets the temperature
void setTemperatureTime(float temp)
sets the time correction due to temperature effects
float sigmaDriftRadius() const
retrieve the error on the radius of the drift circle
float bFieldTime() const
retrieve the timing correction due to the magnetic field (lorentz angle)
const Amg::Vector3D & localPointOfClosestApproach() const
retrieve the point of closest approach in local coordinates
float timeResidual() const
retrieve difference between drifttime and timeFromTrackDistance
const MuonFixedId & identify() const
retrieve the MuonFixedId of the hit
void setSegmentT0Applied(bool flag)
sets flag if Segment T0 has been applied to hit
bool segmentT0Applied() const
retrieve the segment T0 applied flag
void setDistanceToTrack(float dist, float sigmaDist)
sets the distance to the fitted track and its error
void setTimeOfFlight(float tof)
sets the time correction due to the muon time of flight
const Amg::Vector3D & localPosition() const
retrieve the position expressed in local (station) coordinates
static constexpr float kNoValue
const Amg::Vector3D & globalPosition() const
retrieve the position given in global coordinates
float slewingTime() const
retrieve the timing correction due to slewing
float projSag() const
retrieve the projected sag
void setDriftTime(float t)
sets drift time
void setSigmaLocXtwin(float xtwin)
sets the local twin position error
float TemperatureTime() const
retrieve the timing correction due to temperature
void setIdentifier(const MuonFixedId &id)
sets the MuonFixedIdentifier of the hit
void setTubeRadius(float r)
sets tube inner radius
void setWiresagTime(float wsag)
sets the time correction due to wire sag
MdtCalibHitBase & operator=(const MdtCalibHitBase &rhs)=default
assignment operator
void setPropagationTime(float prop)
sets the time correction due to the propagation of the signal over the wire
void setBFieldPara(float bfpara)
sets the B field parallel to the tube
float radialResidual() const
retrieve difference between driftcircle and distance to track (unsigned)
void setBFieldPerp(float bfperp)
sets the B field perpendicular to the tube
float sigmaXtwin() const
retrieve the local twin position error
void setDistanceToReadout(float dist)
sets the distance to read out
float sigmaTimeFromTrackDistance() const
retrieve the error of the time corresponding to the distance to track
void setAdc(unsigned short adc)
sets the adc counts
void setGlobalPos(const Amg::Vector3D &globalPos)
sets the position in ATLAS coordinates
void setTubeT0(float t0)
sets the tube t0
void setProjSag(float sag)
sets the projected wire sag
float temperature() const
retrieve the temperature
void setTdc(unsigned short tdc)
sets the tdc counts
void setBackgroundTime(float bkgr)
sets the time correction due to background signal
~MdtCalibHitBase()=default
destructor
void setTimeFromTrackDistance(float t, float sigmaT)
sets the time of the distance to the fitted track (and its error)
float bFieldPerp() const
retrieve the Bfield perpendicular to the tube
MdtCalibHitBase(const MdtCalibHitBase &event)=default
Copy constructor.
void setLocalPointOfClosestApproach(const Amg::Vector3D &point)
sets point of closest approach in local coordinates
float sigma2TimeFromTrackDistance() const
retrieve the error squared of the time corresponding to distance to track
void setTubeAdcCal(float adccal)
sets the tube mean ADC
void setSlewingTime(float slew)
sets the time correction due to slewing
float tubeT0() const
retrieve the tube T0
float signedDistanceToTrack() const
retrieve the distance of the track to the wire
MdtCalibHitBase()=default
default constructor
Implements fixed identifiers not dependent upon Athena Identifier for internal use in the calibration...
Definition MuonFixedId.h:50
int r
Definition globals.cxx:22
Eigen::Matrix< double, 3, 1 > Vector3D
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
-event-from-file
Amg::Vector3D localPosition
position of the hit in local (station) coordinates
float bFieldPerp
local bfield perpendicular to the wire
float driftTime
drift time after all corrections
float signedDistanceToTrack
signed distance from track to wire
float slewingTime
time correction due to slewing (electronics)
float bFieldPara
local bfield parallel to the wire
Amg::Vector3D globalPointOfClosestApproach
point of closest approach of track to wire in global coordinates
float timeOfFlight
time correction due to the time of flight in ns
float sigma2DriftRadius
error squared on the drift radius
float tube_adccal
tube mean ADC (calibration)
float sigma2DistanceToTrack
square of sigma on signedDistanceToTrack
float wiresagTime
extra time due to wiresag
float propagationTime
time correction due to signal propagation along the wire
float temperatureTime
extra time due to temperature
Amg::Vector3D localPointOfClosestApproach
point of closest approach of track to wire in local coordinates
float distanceToReadout
from hit to read-out side of tube
bool segmentT0Applied
true if segment t0 is substr.
float timeFromTrackDistance
time calculated from 'distance to track', for calibration or trackfit in time-domain
float backgroundTime
extra time due to background
float bFieldTime
time correction due to magnetic field
float sigma2TimeFromTrackDistance
(square of) sigma on timeFromTrackDistance
Amg::Vector3D globalPosition
position of the hit in global coordinates