ATLAS Offline Software
MdtCalibrationTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "MdtCalibrationTool.h"
6 
24 
25 #include "GeoModelHelpers/throwExcept.h"
26 namespace {
27  static double const twoBySqrt12 = 2/std::sqrt(12);
28 }
29 
33 MdtCalibrationTool::MdtCalibrationTool(const std::string& type, const std::string &name, const IInterface* parent) :
34  base_class(type, name, parent) {}
35 
37  ToolSettings settings{};
38  using Property = ToolSettings::Property;
39  settings.setBit(Property::TofCorrection, m_doTof);
40  settings.setBit(Property::PropCorrection, m_doProp);
41  settings.setBit(Property::TempCorrection, m_doTemp);
42  settings.setBit(Property::MagFieldCorrection, m_doField);
43  settings.setBit(Property::SlewCorrection, m_doSlew);
44  settings.setBit(Property::BackgroundCorrection, m_doBkg);
45  settings.window = static_cast<timeWindowMode>(m_windowSetting.value());
46  return settings;
47 }
49  ATH_MSG_DEBUG( "Initializing" );
50 
51  switch(m_windowSetting.value()) {
52  case timeWindowMode::UserDefined:
53  ATH_MSG_DEBUG("Use predefined user values of "<<m_timeWindowLowerBound<<" & "<<m_timeWindowUpperBound);
54  break;
56  ATH_MSG_DEBUG("Use 1000. & 2000. as the lower and upper time window values ");
57  m_timeWindowLowerBound = 1000.;
58  m_timeWindowUpperBound = 2000.;
59  break;
60  case timeWindowMode::CollisionG4:
61  ATH_MSG_DEBUG("Use Geant4 collision time window of 20-30");
64  break;
65  case timeWindowMode::CollisionData:
66  ATH_MSG_DEBUG("Use collision data time window of 10 to 30");
69  break;
70  case timeWindowMode::CollisionFitT0:
71  ATH_MSG_DEBUG("Use collision data time window of 50 to 100 to fit T0 in the end");
74  break;
75  default:
76  ATH_MSG_FATAL("Unknown time window setting "<<m_windowSetting<<" provided.");
77  return StatusCode::FAILURE;
78  };
79 
80  ATH_CHECK(m_idHelperSvc.retrieve());
85  ATH_CHECK(m_t0ShiftTool.retrieve(EnableTool{m_doT0Shift}));
86  ATH_CHECK(m_tMaxShiftTool.retrieve(EnableTool{m_doTMaxShift}));
87  ATH_MSG_DEBUG("Initialization finalized "<<std::endl
88  <<" TimeWindow: ["<< m_timeWindowLowerBound.value()<<";"<<m_timeWindowUpperBound.value()<<"]"<<std::endl
89  <<" Correct time of flight "<<(m_doTof ? "yay" : "nay")<<std::endl
90  <<" Correct propagation time "<<(m_doProp ? "si" : "no")<<std::endl
91  <<" Correct temperature "<<(m_doTemp ? "si" : "no")<<std::endl
92  <<" Correct magnetic field "<<(m_doField ? "si" : "no")<<std::endl
93  <<" Correct time slew "<<(m_doSlew ? "si" : "no")<<std::endl
94  <<" Correct background "<<(m_doBkg ? "si" : "no"));
95  return StatusCode::SUCCESS;
96 } //end MdtCalibrationTool::initialize
97 
98 
100  const Identifier& channelId) const {
101  SG::ReadCondHandle constantHandle{m_calibDbKey, ctx};
102  if (!constantHandle.isValid()){
103  THROW_EXCEPTION("Failed to retrieve the Mdt calibration constants "<<m_calibDbKey.fullKey());
104  }
105  return constantHandle->getCalibData(channelId, msgStream());
106 }
108  const MdtCalibInput& calibIn,
109  bool resolFromRtrack) const {
110 
111  const Identifier& id{calibIn.identify()};
112  const MuonCalib::MdtFullCalibData* calibConstants = getCalibConstants(ctx, id);
113  if (!calibConstants) {
114  ATH_MSG_WARNING("Could not find calibration data for channel "<<m_idHelperSvc->toString(id));
115  return MdtCalibOutput{};
116  }
117 
118  // require at least the MdtRtRelation to be available
119  const RtRelationPtr& rtRelation{calibConstants->rtRelation};
120  // Hardcoded MDT tube radius 14.6mm here - not correct for sMDT
121  // on the other hand it should be rare that a tube does not have an RT
122  if(!rtRelation) {
123  ATH_MSG_WARNING("No rtRelation found, cannot calibrate tube "<<m_idHelperSvc->toString(id));
124  return MdtCalibOutput{};
125  }
126  if (!calibConstants->tubeCalib) {
127  ATH_MSG_WARNING("Cannot extract the single tube calibrations for tube "<<m_idHelperSvc->toString(id));
128  return MdtCalibOutput{};
129  }
131  const SingleTubeCalib* singleTubeData = calibConstants->tubeCalib->getCalib(id);
132  if (!singleTubeData) {
133  ATH_MSG_WARNING("Failed to access tubedata for " << m_idHelperSvc->toString(id));
134  return MdtCalibOutput{};
135  }
136 
137  MdtCalibOutput calibResult{};
138  // correct for global t0 of rt-region
139 
140  calibResult.setTubeT0(singleTubeData->t0 + rtRelation->t0Global());
141  calibResult.setMeanAdc(singleTubeData->adcCal);
142 
143  // set propagation delay
144  if (m_doProp) {
145  const double propagationDistance = calibIn.signalPropagationDistance();
146  ATH_MSG_VERBOSE("Calibration of "<<m_idHelperSvc->toString(id)<<", propagation distance: "<<propagationDistance<<" -> "
147  <<(singleTubeData->inversePropSpeed * propagationDistance));
148  calibResult.setPropagationTime(singleTubeData->inversePropSpeed * propagationDistance);
149  }
150 
152  const double driftTime = calibIn.tdc() * tdcBinSize
153  - (m_doTof ? calibIn.timeOfFlight() : 0.)
154  - calibIn.triggerTime()
155  - calibResult.tubeT0()
156  - calibResult.signalPropagationTime();
157 
158  calibResult.setDriftTime(driftTime);
159  // apply corrections
160  double corrTime{0.};
161  const bool doCorrections = m_doField || m_doTemp || m_doBkg;
162  if (doCorrections) {
163  const CorrectionPtr& corrections{calibConstants->corrections};
164  const RtRelationPtr& rtRelation{calibConstants->rtRelation};
165  const MuonCalib::IRtRelation* rt = rtRelation->rt();
166  ATH_MSG_VERBOSE("There are correction functions.");
168  if (m_doSlew && corrections->slewing()) {
169  double slewTime=corrections->slewing()->correction(calibResult.driftTime(), calibIn.adc());
170  corrTime -= slewTime;
171  calibResult.setSlewingTime(slewTime);
172  }
173 
174 
175  if (m_doField && corrections->bField()) {
176  MagField::AtlasFieldCache fieldCache{};
177 
179  if (!readHandle.isValid()) {
180  THROW_EXCEPTION("calibrate: Failed to retrieve AtlasFieldCacheCondObj with key " << m_fieldCacheCondObjInputKey.key());
181  }
182  readHandle->getInitializedCache(fieldCache);
183 
185  fieldCache.getField(calibIn.closestApproach().data(), globalB.data());
186  const Amg::Vector2D locBField = calibIn.projectMagneticField(globalB);
187  using BFieldComp = MdtCalibInput::BFieldComp;
188  calibResult.setLorentzTime(corrections->bField()->correction(calibResult.driftTime(),
189  locBField[static_cast<int>(BFieldComp::alongWire)],
190  locBField[static_cast<int>(BFieldComp::alongTrack)]));
191  corrTime -= calibResult.lorentzTime();
192  }
193  if(m_doTemp && rt && rt->hasTmaxDiff()) {
194  const MdtIdHelper& id_helper{m_idHelperSvc->mdtIdHelper()};
195  const int mL = id_helper.multilayer(id);
196  const double tempTime = MuonCalib::RtScaleFunction(calibResult.driftTime(), mL == 2, *rt);
197  calibResult.setTemperatureTime(tempTime);
198  corrTime-=calibResult.temperatureTime();
199  }
200  // background corrections (I guess this is never active)
201  if (m_doBkg && corrections->background()) {
202  double bgLevel{0.};
203  calibResult.setBackgroundTime(corrections->background()->correction(calibResult.driftTime(), bgLevel ));
204  corrTime += calibResult.backgroundTime();
205  }
206  }
207 
208  calibResult.setDriftTime(calibResult.driftTime() + corrTime);
209 
210  // calculate drift radius + error
211  double r{0.}, reso{0.};
212  double t = calibResult.driftTime();
213  double t_inrange = t;
214  Muon::MdtDriftCircleStatus timeStatus = driftTimeStatus(t, *rtRelation);
215 
216  assert(rtRelation->rt() != nullptr);
217  r = rtRelation->rt()->radius(t);
218  // apply tUpper gshift
219  if (m_doTMaxShift) {
220  float tShift = m_tMaxShiftTool->getValue(id);
221  r = rtRelation->rt()->radius( t * (1 + tShift) );
222  }
223  // check whether drift times are within range, if not fix them to the min/max range
224  if ( t < rtRelation->rt()->tLower() ) {
225  t_inrange = rtRelation->rt()->tLower();
226  double rmin = rtRelation->rt()->radius( t_inrange );
227  double drdt = (rtRelation->rt()->radius( t_inrange + 30. ) - rmin)/30.;
229  if (timeStatus == Muon::MdtStatusBeforeSpectrum) {
230  t = rtRelation->rt()->tLower() - m_timeWindowLowerBound;
231  }
232  // if we get here we are outside the rt range but inside the window.
233  r = std::max(rmin + drdt*(t-t_inrange), m_unphysicalHitRadiusLowerBound.value());
234  } else if( t > rtRelation->rt()->tUpper() ) {
235  t_inrange = rtRelation->rt()->tUpper();
236  double rmax = rtRelation->rt()->radius( t_inrange );
237  double drdt = (rmax - rtRelation->rt()->radius( t_inrange - 30. ))/30.;
238  // now check whether we are outside the time window
239  if ( timeStatus == Muon::MdtStatusAfterSpectrum ) {
240  t = rtRelation->rt()->tUpper() + m_timeWindowUpperBound;
241  }
242  // if we get here we are outside the rt range but inside the window.
243  r = rmax + drdt*(t-t_inrange);
244  }
245 
246  assert(rtRelation->rtRes() != nullptr);
247  if (!resolFromRtrack) {
248  reso = rtRelation->rtRes()->resolution( t_inrange );
249  } else {
250  bool boundFlag{false};
251  const double tFromR = rtRelation->tr()->tFromR(std::abs(calibIn.distanceToTrack()),
252  boundFlag);
253  reso = rtRelation->rtRes()->resolution(tFromR);
254  }
255 
256 
257  if (m_doPropUncert) {
258  assert(rtRelation->rt() != nullptr);
259 
260  const double driftTimeUp = std::min(rtRelation->rt()->tUpper(),
261  calibIn.tdc() * tdcBinSize
262  - (m_doTof ? calibIn.timeOfFlight() : 0.)
263  - calibIn.triggerTime()
264  - calibResult.tubeT0());
265 
266  const double driftTimeDn = std::max(rtRelation->rt()->tLower(),
267  calibIn.tdc() * tdcBinSize
268  - (m_doTof ? calibIn.timeOfFlight() : 0.)
269  - calibIn.triggerTime()
270  - calibResult.tubeT0()
271  - calibIn.tubeLength() * singleTubeData->inversePropSpeed);
272 
273  const double radiusUp = rtRelation->rt()->radius(driftTimeUp);
274  const double radiusDn = rtRelation->rt()->radius(driftTimeDn);
275  ATH_MSG_VERBOSE("Measurement "<<m_idHelperSvc->toString(calibIn.identify())
276  <<" nominal drift time "<<driftTime<<", down: "<<driftTimeDn<<", up: "<<driftTimeUp
277  <<" --> driftRadius: "<<r<<" pm "<<reso<<", prop-up: "<<radiusUp<<", prop-dn: "<<radiusDn
278  <<" delta: "<<(radiusUp-radiusDn));
279  calibResult.setDriftUncertSigProp(0.5*std::abs(radiusUp - radiusDn));
280  }
281 
282  calibResult.setDriftRadius(r, reso);
283  calibResult.setStatus(timeStatus);
284  // summary
285  ATH_MSG_VERBOSE( "Calibration for tube " << m_idHelperSvc->toString(id)
286  <<" passed. "<<std::endl<<"Input: "<<calibIn<<std::endl<<"Extracted calib constants: "<<calibResult<<std::endl);
287  return calibResult;
288 } //end MdtCalibrationTool::calibrate
289 
291  MdtCalibInput&& primHit,
292  MdtCalibInput&& twinHit) const {
293 
294  MdtCalibOutput primResult = calibrate(ctx, primHit);
295  MdtCalibOutput twinResult = calibrate(ctx, twinHit);
296 
297  // get Identifier and MdtReadOutElement for twin tubes
298  // get 'raw' drifttimes of twin pair; we don't use timeofFlight or propagationTime cause they are irrelevant for twin coordinate
299  double primdriftTime = primHit.tdc()*tdcBinSize - primResult.tubeT0();
300  double twinDriftTime = twinHit.tdc()*tdcBinSize - twinResult.tubeT0();
302  if (primdriftTime >= twinDriftTime) {
303  ATH_MSG_VERBOSE("Swap "<<m_idHelperSvc->toString(primHit.identify())<<" & "<<m_idHelperSvc->toString(twinHit.identify())
304  <<" primDriftTime: "<<primdriftTime<<", secondTime: "<<twinDriftTime);
305  std::swap(primdriftTime, twinDriftTime);
306  std::swap(primResult, twinResult);
307  std::swap(primHit, twinHit);
308  }
309  const Identifier& primId = primHit.identify();
310  const Identifier& twinId = twinHit.identify();
311 
312  // get calibration constants from DbTool
313  const MuonCalib::MdtFullCalibData* data1st = getCalibConstants(ctx, primId);
314  const MuonCalib::MdtFullCalibData* data2nd = getCalibConstants(ctx, twinId);
315  if (!data1st || !data2nd) {
316  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" Failed to access calibration constants for tubes "<<
317  m_idHelperSvc->toString(primId)<<" & "<<m_idHelperSvc->toString(twinId));
318  return MdtCalibTwinOutput{};
319  }
320  const SingleTubeCalib* calibSingleTube1st = data1st->tubeCalib->getCalib(primId);
321  const SingleTubeCalib* calibSingleTube2nd = data2nd->tubeCalib->getCalib(twinId);
322  if (!calibSingleTube1st || !calibSingleTube2nd) {
323  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" Failed to access calibration constants for tubes "<<
324  m_idHelperSvc->toString(primId)<<" & "<<m_idHelperSvc->toString(twinId));
325  return MdtCalibTwinOutput{};
326  }
327 
328  // get tubelength and set HV-delay (~6ns)
329  constexpr double HVdelay = 6.;
330 
332  double twin_timedif = twinDriftTime - primdriftTime - calibSingleTube2nd->inversePropSpeed * twinHit.tubeLength() - HVdelay;
335 
336  const double tubeHalfLength = 0.5*primHit.tubeLength();
337  const double zTwin = std::clamp(0.5* primHit.readOutSide()* twin_timedif / calibSingleTube1st->inversePropSpeed,
338  -tubeHalfLength, tubeHalfLength);
339  const double errZTwin = m_resTwin / calibSingleTube1st->inversePropSpeed;
340 
341  ATH_MSG_VERBOSE( "Twin calibration - tube: " << m_idHelperSvc->toString(primId)<< " twintube: " << m_idHelperSvc->toString(twinId)<<endmsg
342  << " prompthit tdc = " << primHit.tdc() << " twinhit tdc = " << twinHit.tdc()
343  << " tube driftTime = " << primResult<< " second tube driftTime = " << twinResult<<endmsg
344  << " Time difference =" << twin_timedif << " zTwin=" << zTwin<<", errorZ="<<errZTwin);
345  MdtCalibTwinOutput calibResult{primHit,twinHit,primResult, twinResult};
346 
347 
348  calibResult.setLocZ(zTwin, errZTwin);
349  return calibResult;
350 }
351 
353  const MuonCalib::MdtRtRelation& rtRelation ) const {
354  if (rtRelation.rt()) {
355  if(driftTime < rtRelation.rt()->tLower() - m_timeWindowLowerBound) {
356  ATH_MSG_VERBOSE( " drift time outside time window "
357  << driftTime << ". Mininum time = "
358  << rtRelation.rt()->tLower() - m_timeWindowLowerBound );
360  } else if (driftTime > rtRelation.rt()->tUpper() + m_timeWindowUpperBound) {
361  ATH_MSG_VERBOSE( " drift time outside time window "
362  << driftTime << ". Maximum time = "
363  << rtRelation.rt()->tUpper() + m_timeWindowUpperBound);
365  }
366  } else {
367  ATH_MSG_WARNING( "No valid rt relation supplied for driftTimeStatus method" );
369  }
371 }
372 double MdtCalibrationTool::getResolutionFromRt(const EventContext& ctx, const Identifier& moduleID, const double time) const {
373 
374  const MuonCalib::MdtFullCalibData* moduleConstants = getCalibConstants(ctx, moduleID);
375  if (!moduleConstants){
376  THROW_EXCEPTION("Failed to retrieve set of calibration constants for "<<m_idHelperSvc->toString(moduleID));
377  }
378  const RtRelationPtr& rtRel{moduleConstants->rtRelation};
379  if (!rtRel) {
380  THROW_EXCEPTION("No rt-relation found for "<<m_idHelperSvc->toString(moduleID));
381  }
382  const double t = std::min(std::max(time, rtRel->rt()->tLower()), rtRel->rt()->tUpper());
383  return rtRel->rtRes()->resolution(t);
384 }
MdtCalibInput::distanceToTrack
double distanceToTrack() const
Returns the distance to track (signed)
Definition: MdtCalibInput.cxx:152
MuonCalib::MdtTubeCalibContainer::SingleTubeCalib::t0
float t0
< relative t0 in chamber (ns)
Definition: MdtTubeCalibContainer.h:20
beamspotman.r
def r
Definition: beamspotman.py:676
MdtReadoutElement.h
RtScaleFunction.h
MdtCalibrationTool::calibrate
virtual MdtCalibOutput calibrate(const EventContext &ctx, const MdtCalibInput &hit, bool resolFromRtrack=false) const override final
Convert the raw MDT time (+charge) into a drift radius + error.
Definition: MdtCalibrationTool.cxx:107
GeoModel::TransientConstSharedPtr< MdtRtRelation >
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
SingleTubeCalib
MuonCalib::MdtTubeCalibContainer::SingleTubeCalib SingleTubeCalib
Definition: MdtCalibrationTool.cxx:30
TrRelation.h
max
#define max(a, b)
Definition: cfImp.cxx:41
MdtCalibInput::BFieldComp
BFieldComp
Definition: MdtCalibInput.h:123
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
MdtCalibOutput::MdtDriftCircleStatus
Muon::MdtDriftCircleStatus MdtDriftCircleStatus
Definition: MdtCalibOutput.h:63
MdtCalibInput
Definition: MdtCalibInput.h:35
MdtTubeCalibContainer.h
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
MdtCalibInput::triggerTime
double triggerTime() const
Returns the trigger offset time.
Definition: MdtCalibInput.cxx:114
MuonCalib::MdtFullCalibData::rtRelation
RtRelationPtr rtRelation
Definition: MdtFullCalibData.h:21
MdtCalibrationTool::m_doTof
Gaudi::Property< bool > m_doTof
Definition: MdtCalibrationTool.h:106
MuonCalib::IRtRelation::hasTmaxDiff
bool hasTmaxDiff() const
Definition: IRtRelation.h:36
Muon::MdtStatusAfterSpectrum
@ MdtStatusAfterSpectrum
The tube produced a hit that is inconsistent with the drift time spectrum, the drift time is larger t...
Definition: MdtDriftCircleStatus.h:40
Muon::MdtDriftCircleStatus
MdtDriftCircleStatus
Enum to represent the 'status' of Mdt measurements e.g.
Definition: MdtDriftCircleStatus.h:25
MdtCalibrationTool::m_doBkg
Gaudi::Property< bool > m_doBkg
Definition: MdtCalibrationTool.h:111
MdtCalibInput::closestApproach
const Amg::Vector3D & closestApproach() const
Returns the point of closest approach to the wire.
Definition: MdtCalibInput.cxx:105
MdtCalibrationTool.h
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
MdtCalibrationTool::m_tMaxShiftTool
ToolHandle< MuonCalib::IShiftMapTools > m_tMaxShiftTool
Definition: MdtCalibrationTool.h:116
THROW_EXCEPTION
#define THROW_EXCEPTION(MSG)
Definition: MMReadoutElement.cxx:48
MdtCalibrationTool::calibrateTwinTubes
virtual MdtCalibTwinOutput calibrateTwinTubes(const EventContext &ctx, MdtCalibInput &&hit, MdtCalibInput &&twinHit) const override final
Convert the raw MDT times of two twin hits into a Twin position (coordinate along tube) It returns wh...
Definition: MdtCalibrationTool.cxx:290
Property
Support class for PropertyMgr.
Definition: Property.h:23
MuonCalib::MdtFullCalibData
class which holds the full set of calibration constants for a given tube
Definition: MdtFullCalibData.h:15
MuonCalib::MdtRtRelation
class which holds calibration constants per rt-region
Definition: MdtRtRelation.h:19
Muon::MdtStatusDriftTime
@ MdtStatusDriftTime
The tube produced a vaild measurement.
Definition: MdtDriftCircleStatus.h:34
MdtCalibrationTool::m_timeWindowUpperBound
Gaudi::Property< double > m_timeWindowUpperBound
Definition: MdtCalibrationTool.h:105
IMdtSlewCorFunc.h
MdtCalibInput::identify
const Identifier & identify() const
Returns the Identifier of the hit.
Definition: MdtCalibInput.cxx:84
MdtCalibrationTool::getResolutionFromRt
virtual double getResolutionFromRt(const EventContext &ctx, const Identifier &module, const double time) const override final
Definition: MdtCalibrationTool.cxx:372
MuonCalib::MdtFullCalibData::corrections
CorrectionPtr corrections
Definition: MdtFullCalibData.h:20
MdtCalibrationTool::getSettings
virtual ToolSettings getSettings() const override final
Definition: MdtCalibrationTool.cxx:36
MdtCalibrationTool::m_fieldCacheCondObjInputKey
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheCondObjInputKey
Definition: MdtCalibrationTool.h:134
MdtCalibrationTool::initialize
virtual StatusCode initialize() override final
initialization
Definition: MdtCalibrationTool.cxx:48
MuonCalib::MdtFullCalibData::tubeCalib
TubeContainerPtr tubeCalib
Definition: MdtFullCalibData.h:22
MdtCalibrationTool::m_calibDbKey
SG::ReadCondHandleKey< MuonCalib::MdtCalibDataContainer > m_calibDbKey
Definition: MdtCalibrationTool.h:127
TRT::Hit::driftTime
@ driftTime
Definition: HitInfo.h:43
Muon::MdtStatusBeforeSpectrum
@ MdtStatusBeforeSpectrum
The tube produced a hit that is inconsistent with the drift time spectrum, the drift time is smaller ...
Definition: MdtDriftCircleStatus.h:37
MdtCalibInput::tubeLength
double tubeLength() const
Returns the tube length.
Definition: MdtCalibInput.cxx:154
MdtCalibrationTool::m_unphysicalHitRadiusLowerBound
Gaudi::Property< double > m_unphysicalHitRadiusLowerBound
Definition: MdtCalibrationTool.h:123
MdtCalibrationTool::m_doTemp
Gaudi::Property< bool > m_doTemp
Definition: MdtCalibrationTool.h:108
MdtRtRelation.h
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
MdtCalibrationTool::m_doPropUncert
Gaudi::Property< bool > m_doPropUncert
Definition: MdtCalibrationTool.h:112
IMdtBackgroundCorFunc.h
AtlasFieldCache.h
MdtCalibrationTool::m_doField
Gaudi::Property< bool > m_doField
Definition: MdtCalibrationTool.h:109
MdtIdHelper
Definition: MdtIdHelper.h:61
MdtCalibrationTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MdtCalibrationTool.h:136
test_pyathena.parent
parent
Definition: test_pyathena.py:15
MdtCorFuncSet.h
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MuonCalib::IRtRelation::tUpper
virtual double tUpper() const =0
Returns the upper time covered by the r-t.
IRtResolution.h
MdtCalibInput::signalPropagationDistance
double signalPropagationDistance() const
Calculates the distance that the signal has to travel along the wire.
Definition: MdtCalibInput.cxx:139
MdtCalibOutput
Definition: MdtCalibOutput.h:10
CaloCondBlobAlgs_fillNoiseFromASCII.channelId
channelId
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:122
WriteCalibToCool.swap
swap
Definition: WriteCalibToCool.py:94
MdtCalibrationTool::m_doSlew
Gaudi::Property< bool > m_doSlew
Definition: MdtCalibrationTool.h:110
min
#define min(a, b)
Definition: cfImp.cxx:40
MdtCalibHit.h
MdtCalibrationTool::m_t0ShiftTool
ToolHandle< MuonCalib::IShiftMapTools > m_t0ShiftTool
Definition: MdtCalibrationTool.h:114
MuonCalib::MdtTubeCalibContainer::SingleTubeCalib::adcCal
float adcCal
quality flag for the SingleTubeCalib constants: 0 all ok, 1 no hits found, 2 too few hits,...
Definition: MdtTubeCalibContainer.h:24
MdtCalibrationTool::MdtCalibrationTool
MdtCalibrationTool(const std::string &type, const std::string &name, const IInterface *parent)
constructor
Definition: MdtCalibrationTool.cxx:33
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
MCP::SystVariation::Default
@ Default
Definition: EnumDef.h:73
MuonCalib::MdtTubeCalibContainer::SingleTubeCalib::inversePropSpeed
float inversePropSpeed
multiplicative correction factor for ADC measurement w.r.t.
Definition: MdtTubeCalibContainer.h:22
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
IMdtTempCorFunc.h
MdtCalibOutput::setTubeT0
void setTubeT0(const double T0)
Sets the tube T0.
Definition: MdtCalibOutput.cxx:44
MdtCalibInput::adc
int16_t adc() const
Returns the amount of accumulated charge.
Definition: MdtCalibInput.cxx:86
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonDetectorManager.h
MdtCalibrationTool::m_windowSetting
Gaudi::Property< int > m_windowSetting
Definition: MdtCalibrationTool.h:103
MuonCalib::IRtRelation::tLower
virtual double tLower() const =0
Returns the lower time covered by the r-t.
MuonCalib::MdtRtRelation::rt
const IRtRelation * rt() const
rt relation
Definition: MdtRtRelation.h:27
MdtCalibTwinOutput
Definition: MdtCalibTwinOutput.h:11
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
IRtRelation.h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MdtFullCalibData.h
MdtCalibrationTool::m_timeWindowLowerBound
Gaudi::Property< double > m_timeWindowLowerBound
Definition: MdtCalibrationTool.h:104
MagField::AtlasFieldCache
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
Definition: AtlasFieldCache.h:43
GeoPrimitivesToStringConverter.h
MdtCalibrationTool::m_doTMaxShift
Gaudi::Property< bool > m_doTMaxShift
Definition: MdtCalibrationTool.h:120
MdtCalibInput::projectMagneticField
Amg::Vector2D projectMagneticField(const Amg::Vector3D &fieldInGlob) const
Splits the B-field into the components that point along the transverse track direction & along the tu...
Definition: MdtCalibInput.cxx:121
Muon::MdtStatusUnDefined
@ MdtStatusUnDefined
Undefined.
Definition: MdtDriftCircleStatus.h:43
IMdtBFieldCorFunc.h
MuonCalib::MdtTubeCalibContainer::SingleTubeCalib
Definition: MdtTubeCalibContainer.h:18
MdtCalibrationTool::m_doProp
Gaudi::Property< bool > m_doProp
Definition: MdtCalibrationTool.h:107
MdtCalibrationTool::driftTimeStatus
Muon::MdtDriftCircleStatus driftTimeStatus(double driftTime, const MuonCalib::MdtRtRelation &rtRelation) const
Definition: MdtCalibrationTool.cxx:352
MuonCalib::RtScaleFunction
float RtScaleFunction(const float t, const bool ml2, const IRtRelation &rtrelation)
Definition: RtScaleFunction.cxx:20
ToolSettings
MdtCalibrationTool::ToolSettings ToolSettings
Definition: MdtCalibrationTool.cxx:32
MdtCalibInput::tdc
int16_t tdc() const
Returns the tdc counts of the hit.
Definition: MdtCalibInput.cxx:85
MdtCalibInput::timeOfFlight
double timeOfFlight() const
Returns the time of flight.
Definition: MdtCalibInput.cxx:111
MdtCalibrationTool::getCalibConstants
virtual const MuonCalib::MdtFullCalibData * getCalibConstants(const EventContext &ctx, const Identifier &channelId) const override final
Definition: MdtCalibrationTool.cxx:99
MuonCalib::IRtRelation
generic interface for a rt-relation
Definition: IRtRelation.h:15
MdtCalibOutput::tubeT0
double tubeT0() const
Returns the point in time where the muon typically enters the chamber.
Definition: MdtCalibOutput.cxx:43
MdtCalibrationTool::m_resTwin
Gaudi::Property< double > m_resTwin
Definition: MdtCalibrationTool.h:124
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
Identifier
Definition: IdentifierFieldParser.cxx:14