ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | Static Private Attributes | List of all members
MuonR4::SpacePointCalibrator Class Reference

#include <SpacePointCalibrator.h>

Inheritance diagram for MuonR4::SpacePointCalibrator:
Collaboration diagram for MuonR4::SpacePointCalibrator:

Public Types

enum  ProjectorType {
  ProjectorType::e1DimNoTime = 0, ProjectorType::e1DimRotNoTime = 1, ProjectorType::e2DimNoTime = 2, ProjectorType::e1DimWithTime = 3,
  ProjectorType::e1DimRotWithTime = 4, ProjectorType::e2DimWithTime = 5
}
 Enum encoding the possible projectors used in ATLAS. More...
 
template<typename trajectory_t >
using TrackState_t = typename Acts::MultiTrajectory< trajectory_t >::TrackStateProxy
 Abbrivation of the track state proxy type. More...
 
template<typename trajectory_t >
using ConstTrackState_t = typename Acts::MultiTrajectory< trajectory_t >::ConstTrackStateProxy
 Abbrivation of the const track state proxy type. More...
 

Public Member Functions

StatusCode initialize () override final
 
CalibSpacePointPtr calibrate (const EventContext &ctx, const SpacePoint *spacePoint, const Amg::Vector3D &seedPosInChamb, const Amg::Vector3D &seedDirInChamb, const double timeDelay) const override final
 
CalibSpacePointPtr calibrate (const EventContext &ctx, const CalibratedSpacePoint &spacePoint, const Amg::Vector3D &seedPosInChamb, const Amg::Vector3D &seedDirInChamb, const double timeDelay) const override final
 
CalibSpacePointVec calibrate (const EventContext &ctx, const std::vector< const SpacePoint * > &spacePoints, const Amg::Vector3D &seedPosInChamb, const Amg::Vector3D &seedDirInChamb, const double timeDelay) const override final
 
CalibSpacePointVec calibrate (const EventContext &ctx, CalibSpacePointVec &&spacePoints, const Amg::Vector3D &seedPosInChamb, const Amg::Vector3D &seedDirInChamb, const double timeDelay) const override final
 
double driftVelocity (const EventContext &ctx, const CalibratedSpacePoint &spacePoint) const override final
 
double driftAcceleration (const EventContext &ctx, const CalibratedSpacePoint &spacePoint) const override final
 
std::pair< double, double > calibrateMM (const EventContext &ctx, const ActsGeometryContext &gctx, const xAOD::MMCluster &cluster, const Amg::Vector3D &globalPos, const Amg::Vector3D &globalDir) const
 Calibrates the position and covariance of a MicroMegas (MM) cluster. More...
 
std::pair< double, double > calibratesTGC (const EventContext &ctx, const ActsGeometryContext &gctx, const xAOD::sTgcStripCluster &cluster, double posAlongTheStrip, const Amg::Vector3D &globalPos, const Amg::Vector3D &globalDir) const
 Calibrates the position and covariance of an sTGC (small-strip Thin Gap Chamber) cluster. More...
 
void calibrateSourceLink (const Acts::GeometryContext &geoctx, const Acts::CalibrationContext &cctx, const Acts::SourceLink &link, ActsTrk::MutableTrackContainer::TrackStateProxy state) const override final
 
template<std::size_t Dim, typename trajectory_t , typename pos_t , typename cov_t >
void setState (const ProjectorType projector, const pos_t &locpos, const cov_t &cov, Acts::SourceLink link, TrackState_t< trajectory_t > &trackState) const
 Copy the local position & covariance into the Acts track state proxy. More...
 

Private Attributes

SG::ReadHandleKey< ActsGeometryContextm_geoCtxKey {this, "AlignmentKey", "ActsAlignment", "cond handle key"}
 access to the ACTS geometry context More...
 
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 
ToolHandle< IMdtCalibrationToolm_mdtCalibrationTool {this, "MdtCalibrationTool", ""}
 
ToolHandle< Muon::INSWCalibToolm_nswCalibTool {this, "NSWCalibTool", ""}
 
ToolHandle< Muon::IMMClusterBuilderToolm_clusterBuilderToolMM {this, "MMClusterBuilder", ""}
 
const MuonGMR4::MuonDetectorManagerm_detMgr {nullptr}
 
Gaudi::Property< double > m_muonPropSpeed {this, "PropagationSpeed", 1./ Gaudi::Units::c_light }
 Assumed propagation velocity of the muon through the detector. More...
 
Gaudi::Property< double > m_rpcSignalVelocity
 How fast does an electron signal travel along an rpc strip
More...
 
Gaudi::Property< double > m_rpcTimeResolution
 
Gaudi::Property< bool > m_useRpcTime {this, "useRpcTime", false}
 Load the Rpc time on the track states for the track fit. More...
 
Gaudi::Property< bool > m_useTgcTime
 Load the Tgc bunch crossing ID on the track states. More...
 
Gaudi::Property< bool > m_usesTgcTime
 

Static Private Attributes

constexpr static std::array< Acts::BoundSubspaceIndices, 6 > s_boundSpaceIndices
 Array to map the Projector types to the bound index configurations used by the ATLAS detector measurements. More...
 

Detailed Description

Definition at line 30 of file SpacePointCalibrator.h.

Member Typedef Documentation

◆ ConstTrackState_t

template<typename trajectory_t >
using ActsTrk::detail::MeasurementCalibratorBase::ConstTrackState_t = typename Acts::MultiTrajectory<trajectory_t>::ConstTrackStateProxy
inherited

Abbrivation of the const track state proxy type.

Definition at line 44 of file MeasurementCalibratorBase.h.

◆ TrackState_t

template<typename trajectory_t >
using ActsTrk::detail::MeasurementCalibratorBase::TrackState_t = typename Acts::MultiTrajectory<trajectory_t>::TrackStateProxy
inherited

Abbrivation of the track state proxy type.

Definition at line 41 of file MeasurementCalibratorBase.h.

Member Enumeration Documentation

◆ ProjectorType

Enum encoding the possible projectors used in ATLAS.

Their integer representations correspond to the element index in the s_boundSpaceIndices member

Enumerator
e1DimNoTime 
e1DimRotNoTime 

Project out solely the locX (Applies to Itk strips, Rpc, Tgc, sTgc, Mm)

e2DimNoTime 

Project out solely the locY - Complementary projector if the strip plane is rotated (Applies to Itk endcap strips, Rpc, Tgc, sTgc)

e1DimWithTime 

Project out the two spatial coordinates - (Applies to ITk pixel, BI-Rpc, sTgc pad)

e1DimRotWithTime 

Project out the locX & time coordinate - (Applies to Rpc, Tgc, Mm, sTgc)

e2DimWithTime 

Project out the locY & time coordinate - (Applies to Rpc, Tgc, sTgc)

Definition at line 29 of file MeasurementCalibratorBase.h.

29  {
30  e1DimNoTime = 0,
31  e1DimRotNoTime = 1,
32  e2DimNoTime = 2,
34  e1DimWithTime = 3,
35  e1DimRotWithTime = 4,
36  e2DimWithTime = 5,
37  };

Member Function Documentation

◆ calibrate() [1/4]

CalibSpacePointVec MuonR4::SpacePointCalibrator::calibrate ( const EventContext &  ctx,
CalibSpacePointVec &&  spacePoints,
const Amg::Vector3D seedPosInChamb,
const Amg::Vector3D seedDirInChamb,
const double  timeDelay 
) const
finaloverride

Definition at line 69 of file SpacePointCalibrator.cxx.

73  {
74  for (CalibSpacePointPtr& sp : spacePoints){
75  sp = calibrate(ctx, *sp, segPos, segDir, timeDelay);
76  }
77  return spacePoints;
78  }

◆ calibrate() [2/4]

CalibSpacePointPtr MuonR4::SpacePointCalibrator::calibrate ( const EventContext &  ctx,
const CalibratedSpacePoint spacePoint,
const Amg::Vector3D seedPosInChamb,
const Amg::Vector3D seedDirInChamb,
const double  timeDelay 
) const
finaloverride

Definition at line 52 of file SpacePointCalibrator.cxx.

56  {
57  CalibSpacePointPtr calibSP{};
58  if (spacePoint.type() != xAOD::UncalibMeasType::Other){
59  calibSP = calibrate(ctx, spacePoint.spacePoint(), segPos, segDir, timeDelay);
60  } else {
61  calibSP = std::make_unique<CalibratedSpacePoint>(spacePoint);
62  }
63  if (spacePoint.fitState() == State::Outlier) {
64  calibSP->setFitState(State::Outlier);
65  }
66  return calibSP;
67  }

◆ calibrate() [3/4]

CalibSpacePointPtr MuonR4::SpacePointCalibrator::calibrate ( const EventContext &  ctx,
const SpacePoint spacePoint,
const Amg::Vector3D seedPosInChamb,
const Amg::Vector3D seedDirInChamb,
const double  timeDelay 
) const
finaloverride

In valid drift radius has been created

Transform the space point into the local frame to calculate the propagation time towards the readout

Average the time

Add the difference to the covariance though

Definition at line 80 of file SpacePointCalibrator.cxx.

84  {
85 
86  const ActsGeometryContext* gctx{nullptr};
87  if (!SG::get(gctx, m_geoCtxKey, ctx).isSuccess()) {
88  return nullptr;
89  }
90  const Amg::Vector3D& spPos{spacePoint->localPosition()};
91  const Amg::Transform3D& locToGlob{spacePoint->msSector()->localToGlobalTrans(*gctx)};
92  const Amg::Vector3D& chDir{spacePoint->sensorDirection()};
93 
94  // Adjust the space point position according to the external seed. But only if the space point
95  // is a 1D strip
96  Amg::Vector3D calibSpPos = spacePoint->dimension() == 2 ? spPos
97  : spPos + Amg::intersect<3>(posInChamb, dirInChamb, spPos, chDir).value_or(0) * chDir;
98 
99  SpacePoint::Cov_t cov = spacePoint->covariance();
100  CalibSpacePointPtr calibSP{};
101  switch (spacePoint->type()) {
103  const Amg::Vector3D locClosestApproach = posInChamb
104  + Amg::intersect<3>(spPos, chDir,
105  posInChamb, dirInChamb).value_or(0) * dirInChamb;
106 
107  Amg::Vector3D closestApproach{locToGlob* locClosestApproach};
108  const double timeOfArrival = closestApproach.mag() * c_inv + timeOffset;
109 
110  if (ATH_LIKELY(spacePoint->dimension() == 1)) {
111  auto* dc = static_cast<const xAOD::MdtDriftCircle*>(spacePoint->primaryMeasurement());
112  MdtCalibInput calibInput{*dc, *gctx};
113  calibInput.setTrackDirection(locToGlob.linear() * dirInChamb,
114  Acts::abs(dirInChamb.phi() - 90._degree) > 1.e-7 );
115  calibInput.setTimeOfFlight(timeOfArrival);
116  calibInput.setClosestApproach(std::move(closestApproach));
117  ATH_MSG_VERBOSE("Parse hit calibration "<<m_idHelperSvc->toString(dc->identify())<<", "<<calibInput);
118  MdtCalibOutput calibOutput = m_mdtCalibrationTool->calibrate(ctx, calibInput);
119  ATH_MSG_VERBOSE("Returned calibration object "<<calibOutput);
120  State fitState{State::Valid};
123  ATH_MSG_DEBUG("Failed to create a valid hit from "<<m_idHelperSvc->toString(dc->identify())
124  <<std::endl<<calibInput<<std::endl<<calibOutput);
125  fitState = State::FailedCalib;
126  cov[Acts::toUnderlying(AxisDefs::etaCov)] = dc->readoutElement()->innerTubeRadius();
127  } else {
128  cov[Acts::toUnderlying(AxisDefs::etaCov)] = Acts::square(calibOutput.driftRadiusUncert());
129  }
130  calibSP = std::make_unique<CalibratedSpacePoint>(spacePoint, std::move(calibSpPos), fitState);
131  calibSP->setCovariance(cov);
132  calibSP->setDriftRadius(calibOutput.driftRadius());
133  } else {
134  auto* dc = static_cast<const xAOD::MdtTwinDriftCircle*>(spacePoint->primaryMeasurement());
135  MdtCalibInput calibInput{*dc, *gctx};
136  calibInput.setClosestApproach(closestApproach);
137  calibInput.setTimeOfFlight(timeOfArrival);
138 
139  MdtCalibInput twinInput{dc->twinIdentify(), dc->twinAdc(), dc->twinTdc(), dc->readoutElement(), *gctx};
140  twinInput.setClosestApproach(closestApproach);
141  twinInput.setTimeOfFlight(timeOfArrival);
142 
143  MdtCalibTwinOutput calibOutput = m_mdtCalibrationTool->calibrateTwinTubes(ctx,
144  std::move(calibInput),
145  std::move(twinInput));
146 
147  State fitState{State::Valid};
149  ATH_MSG_DEBUG("Failed to create a valid hit from "<<m_idHelperSvc->toString(dc->identify())
150  <<std::endl<<calibOutput);
151  cov[Acts::toUnderlying(AxisDefs::etaCov)] = Acts::square(dc->readoutElement()->innerTubeRadius());
152  cov[Acts::toUnderlying(AxisDefs::phiCov)] = Acts::square(0.5* dc->readoutElement()->activeTubeLength(dc->measurementHash()));
153  fitState = State::FailedCalib;
154  } else {
155  cov[Acts::toUnderlying(AxisDefs::etaCov)] = Acts::square(calibOutput.uncertPrimaryR());
156  cov[Acts::toUnderlying(AxisDefs::phiCov)] = Acts::square(calibOutput.sigmaZ());
157  }
158  calibSP = std::make_unique<CalibratedSpacePoint>(spacePoint, std::move(calibSpPos), fitState);
159  calibSP->setCovariance(cov);
160  calibSP->setDriftRadius(calibOutput.primaryDriftR());
161  }
162  break;
163  }
165  auto* strip = static_cast<const xAOD::RpcMeasurement*>(spacePoint->primaryMeasurement());
166 
168  const Amg::Transform3D toGasGap{strip->readoutElement()->globalToLocalTrans(*gctx, strip->layerHash()) * locToGlob};
169  const Amg::Vector3D lPos = toGasGap * calibSpPos;
170  using EdgeSide = MuonGMR4::RpcReadoutElement::EdgeSide;
171  calibSP = std::make_unique<CalibratedSpacePoint>(spacePoint, std::move(calibSpPos));
172 
173  cov[Acts::toUnderlying(AxisDefs::timeCov)] = Acts::square(m_rpcTimeResolution);
174 
175  const double time1 = strip->time()
176  - strip->readoutElement()->distanceToEdge(strip->layerHash(),
177  lPos.block<2,1>(0,0),
178  EdgeSide::readOut) /m_rpcSignalVelocity;
179 
180  if (spacePoint->dimension() == 2) {
181  auto* strip2 = static_cast<const xAOD::RpcMeasurement*>(spacePoint->secondaryMeasurement());
182 
183  const double time2 = strip2->time() -
184  strip2->readoutElement()->distanceToEdge(strip2->layerHash(),
185  Eigen::Rotation2D{90._degree}*lPos.block<2,1>(0,0),
186  EdgeSide::readOut)/m_rpcSignalVelocity;
188  calibSP->setTimeMeasurement(0.5*(time1 + time2));
190  cov[Acts::toUnderlying(AxisDefs::timeCov)] += Acts::square(0.5*(time1 - time2));
191  }
192  calibSP->setCovariance(cov);
193  ATH_MSG_VERBOSE("Create rpc space point "<<m_idHelperSvc->toString(strip->identify())<<", dimension "<<spacePoint->dimension()
194  << ", at "<<Amg::toString(calibSP->localPosition())<<", uncalib time: "
195  <<strip->time()<<", calib time: "<<calibSP->time()<<" cov " <<calibSP->covariance());
196  break;
197  }
199  calibSP = std::make_unique<CalibratedSpacePoint>(spacePoint, std::move(calibSpPos));
200  calibSP->setCovariance(cov);
201  break;
202  }
204  const xAOD::MMCluster* cluster = static_cast<const xAOD::MMCluster*>(spacePoint->primaryMeasurement());
205  Amg::Vector3D globalPos{locToGlob * posInChamb};
206  Amg::Vector3D globalDir{locToGlob.linear() * dirInChamb};
207 
208  std::pair<double, double> calibPosCov {calibrateMM(ctx, *gctx, *cluster, globalPos, globalDir)};
209 
210  ATH_MSG_DEBUG("Calibrated pos and cov" << calibPosCov.first << " " << calibPosCov.second);
211  cov[Acts::toUnderlying(AxisDefs::etaCov)] = calibPosCov.second;
212  Amg::Transform3D toChamberTrans{ locToGlob.inverse() * cluster->readoutElement()->localToGlobalTrans(*gctx, cluster->layerHash())};
213 
214  // since we want to take the second coordiante from the external estimate we need to transform the sp posiiton to the layer frame, replace the precission coordinate and transform back
215  Amg::Vector3D calibSpPosInLayer = toChamberTrans.inverse() * calibSpPos;
216  ATH_MSG_DEBUG("in layer before calibration" << Amg::toString(calibSpPosInLayer));
217  calibSpPosInLayer.x() = calibPosCov.first;
218  ATH_MSG_DEBUG("in layer after calibration" << Amg::toString(calibSpPosInLayer));
219  calibSpPos = toChamberTrans * calibSpPosInLayer;
220 
221  calibSP = std::make_unique<CalibratedSpacePoint>(spacePoint, std::move(calibSpPos));
222  calibSP->setCovariance(cov);
223  ATH_MSG_DEBUG("calibrated MM cluster "<<m_idHelperSvc->toString(cluster->identify()) << " loc x old " << cluster->localPosition<1>()[0] << " new loc x " << calibSP->localPosition()[1] << "cov " << calibSP->covariance());
224 
225  break;
226  }
228  const auto* cluster = static_cast<const xAOD::sTgcMeasurement*>(spacePoint->primaryMeasurement());
229 
230  // We do not apply any correction for pads or wire only space points
231  if (cluster->channelType() != sTgcIdHelper::sTgcChannelTypes::Strip) {
232  ATH_MSG_DEBUG("Calibrating an sTGC Pad or wire " << m_idHelperSvc->toString(cluster->identify()));
233  calibSP = std::make_unique<CalibratedSpacePoint>(spacePoint, std::move(calibSpPos));
234  calibSP->setCovariance(cov);
235  break;
236  }
237 
238  double posAlongTheStrip{0.};
239 
240  // check if the space point is a strip/wire combination and take the position along the strip from the wire measurement
241  if(spacePoint->secondaryMeasurement()) {
242  const auto* secMeas = static_cast<const xAOD::sTgcMeasurement*>(spacePoint->secondaryMeasurement());
243  ATH_MSG_VERBOSE("Using secondary measurement "<< m_idHelperSvc->toString(secMeas->identify())<<" for sTGC strip cluster " << m_idHelperSvc->toString(cluster->identify()));
244  posAlongTheStrip = spacePoint->secondaryMeasurement()->localPosition<1>()[0];
245  } else {
246  ATH_MSG_VERBOSE("No secondary measurement for sTGC strip cluster " << m_idHelperSvc->toString(cluster->identify()));
247  }
248 
249  Amg::Vector3D globalPos{locToGlob * posInChamb};
250  Amg::Vector3D globalDir{locToGlob.linear() * dirInChamb};
251 
252  const auto* stripClus = static_cast<const xAOD::sTgcStripCluster*>(cluster);
253  const auto [calibPos, calibCov] = calibratesTGC(ctx, *gctx, *stripClus, posAlongTheStrip, globalPos, globalDir);
254 
255  ATH_MSG_DEBUG("Calibrated pos and cov" << calibPos << " " << calibCov);
256  cov[Acts::toUnderlying(AxisDefs::etaCov)] = calibCov;
257  Amg::Transform3D toChamberTrans{ locToGlob.inverse() * cluster->readoutElement()->localToGlobalTrans(*gctx, cluster->layerHash())};
258 
259  // since we want to take the second coordiante from the external estimate we need to transform the sp posiiton to the layer frame, replace the precission coordinate and transform back
260  Amg::Vector3D calibSpPosInLayer = toChamberTrans.inverse() * calibSpPos;
261  ATH_MSG_DEBUG("in layer before calibration" << Amg::toString(calibSpPosInLayer));
262  calibSpPosInLayer.x() = calibPos;
263  ATH_MSG_DEBUG("in layer after calibration" << Amg::toString(calibSpPosInLayer));
264  calibSpPos = toChamberTrans * calibSpPosInLayer;
265 
266  calibSP = std::make_unique<CalibratedSpacePoint>(spacePoint, std::move(calibSpPos));
267  calibSP->setCovariance(cov);
268  ATH_MSG_DEBUG("calibrated sTGC cluster "<<m_idHelperSvc->toString(cluster->identify()) << " loc x old " << cluster->localPosition<1>()[0] << " new loc x " << calibSP->localPosition()[1] << "cov " << calibSP->covariance());
269 
270  break;
271  }
272 
273  default:
274  ATH_MSG_WARNING("Do not know how to calibrate "<<m_idHelperSvc->toString(spacePoint->identify()));
275  }
276  return calibSP;
277  }

◆ calibrate() [4/4]

CalibSpacePointVec MuonR4::SpacePointCalibrator::calibrate ( const EventContext &  ctx,
const std::vector< const SpacePoint * > &  spacePoints,
const Amg::Vector3D seedPosInChamb,
const Amg::Vector3D seedDirInChamb,
const double  timeDelay 
) const
finaloverride

Definition at line 279 of file SpacePointCalibrator.cxx.

283  {
284  CalibSpacePointVec calibSpacePoints{};
285  calibSpacePoints.reserve(spacePoints.size());
286  for(const SpacePoint* spacePoint : spacePoints) {
287  CalibSpacePointPtr hit = calibrate(ctx, spacePoint, posInChamb, dirInChamb, timeOffset);
288  if (hit) {
289  calibSpacePoints.push_back(std::move(hit));
290  }
291  }
292  return calibSpacePoints;
293  }

◆ calibrateMM()

std::pair< double, double > MuonR4::SpacePointCalibrator::calibrateMM ( const EventContext &  ctx,
const ActsGeometryContext gctx,
const xAOD::MMCluster cluster,
const Amg::Vector3D globalPos,
const Amg::Vector3D globalDir 
) const

Calibrates the position and covariance of a MicroMegas (MM) cluster.

Parameters
ctxThe event context providing the necessary conditions and event-specific information.
gctxPointer to the ActsGeometryContext, used for geometry-related transformations.
clusterPointer to the xAOD::MMCluster representing the MicroMegas cluster to be calibrated.
globalPosThe global position from an external measurement.
globalDirThe global position from an external measurement.
calibLocPosThe calibrated local position of the cluster (output parameter).
calibLocCovThe calibrated local covariance of the cluster (output parameter).

Definition at line 314 of file SpacePointCalibrator.cxx.

314  {
315  std::vector<NSWCalib::CalibratedStrip> calibClus;
316  StatusCode sc = m_nswCalibTool->calibrateClus(ctx, gctx, cluster, globalPos, calibClus);
317  if(sc.isFailure()) {
318  ATH_MSG_WARNING("Failed to calibrate MM cluster "<<m_idHelperSvc->toString(cluster.identify()));
319  return std::make_pair(0., 0.);
320  }
321 
322  Amg::Vector2D locPos{cluster.localPosition<1>()[0] * Amg::Vector2D::UnitX()};
324 
325  Amg::MatrixX calibCov{};
326  calibCov.resize(1,1);
327  calibCov(0,0) = cluster.localCovariance<1>()(0, 0);
328  ATH_MSG_DEBUG("old loc pos " << locPos[0] << " old cov" << calibCov(0,0) );
329 
330  Muon::IMMClusterBuilderTool::RIO_Author rotAuthor = m_clusterBuilderToolMM->getCalibratedClusterPosition(ctx, calibClus, locDir ,locPos, calibCov);
331  if(rotAuthor == Muon::IMMClusterBuilderTool::RIO_Author::unKnownAuthor){
332  THROW_EXCEPTION("Failed to calibrate MM cluster "<<m_idHelperSvc->toString(cluster.identify()));
333  }
334  ATH_MSG_DEBUG("new loc pos " << locPos[0] << " new cov" << calibCov(0,0) );
335  return std::make_pair(locPos[0], calibCov(0,0));
336  }

◆ calibrateSourceLink()

void MuonR4::SpacePointCalibrator::calibrateSourceLink ( const Acts::GeometryContext &  geoctx,
const Acts::CalibrationContext &  cctx,
const Acts::SourceLink &  link,
ActsTrk::MutableTrackContainer::TrackStateProxy  state 
) const
finaloverride

Construct bound track parameters to fetch the global track position

Vast majority of the measurements are ordinary drift tubes

Invalid drift radius has been created

Twin tube case

Legacy BM / BO chambers

BI clusters

Definition at line 356 of file SpacePointCalibrator.cxx.

359  {
360 
362  const Acts::BoundTrackParameters trackPars{trackState.referenceSurface().getSharedPtr(),
363  trackState.parameters(), trackState.covariance(),
365 
366  const Amg::Vector3D trackPos{trackPars.position(geoctx)};
367  const Amg::Vector3D trackDir{trackPars.direction()};
368  const ActsGeometryContext* gctx = geoctx.get<const ActsGeometryContext*>();
369  const EventContext* ctx = cctx.get<const EventContext*>();
370  const auto* muonMeas = ActsTrk::detail::xAODUncalibMeasCalibrator::unpack(link);
371  ATH_MSG_VERBOSE("Calibrate measurement "<<m_idHelperSvc->toString(xAOD::identify(muonMeas))
372  <<" @ surface "<<trackState.referenceSurface().geometryId());
373  switch (muonMeas->type()){
374  using enum xAOD::UncalibMeasType;
375  case MdtDriftCircleType: {
376  const auto* dc = static_cast<const xAOD::MdtDriftCircle*>(muonMeas);
377  MdtCalibInput calibInput{*dc, *gctx};
378  calibInput.setClosestApproach(trackPos);
379  //calibInput.setTimeOfFlight(trackPars.parameters()[Acts::eBoundTime]);
380  calibInput.setTrackDirection(trackDir, true);
381  const double driftSign = sign(trackPars.parameters()[Acts::eBoundLoc0]);
382 
384  if (ATH_LIKELY(muonMeas->numDimensions() == 1)) {
385  MdtCalibOutput calibOutput = m_mdtCalibrationTool->calibrate(*ctx, calibInput);
386  ATH_MSG_VERBOSE("Returned calibration object "<<calibOutput);
387  AmgVector(1) pos{AmgVector(1)::Zero()};
388  AmgSymMatrix(1) cov{AmgSymMatrix(1)::Identity()};
391  ATH_MSG_DEBUG("Failed to create a valid hit from "<<m_idHelperSvc->toString(dc->identify())
392  <<std::endl<<calibInput<<std::endl<<calibOutput);
393  cov(Acts::eBoundLoc0,Acts::eBoundLoc0) = std::pow(dc->readoutElement()->innerTubeRadius(), 2);
394  } else {
395  pos[Acts::eBoundLoc0] = driftSign*calibOutput.driftRadius();
396  cov(Acts::eBoundLoc0, Acts::eBoundLoc0) = std::pow(calibOutput.driftRadiusUncert(), 2);
397  }
398  setState<1, ActsTrk::MutableTrackStateBackend>(ProjectorType::e1DimNoTime, pos, cov, link, trackState);
399  }
401  else {
402  const auto* twinDC = static_cast<const xAOD::MdtTwinDriftCircle*>(muonMeas);
403  MdtCalibInput twinInput{twinDC->twinIdentify(), twinDC->twinAdc(), twinDC->twinTdc(), twinDC->readoutElement(), *gctx};
404  twinInput.setClosestApproach(trackPos);
405  twinInput.setTimeOfFlight(trackPars.parameters()[Acts::eBoundTime]);
406 
407  MdtCalibTwinOutput calibOutput = m_mdtCalibrationTool->calibrateTwinTubes(*ctx,
408  std::move(calibInput),
409  std::move(twinInput));
411  AmgSymMatrix(2) locCov{AmgSymMatrix(2)::Identity()};
413  ATH_MSG_DEBUG("Failed to create a valid hit from "<<m_idHelperSvc->toString(dc->identify())
414  <<std::endl<<calibOutput);
415  locCov(Acts::eBoundLoc0, Acts::eBoundLoc0) = std::pow(dc->readoutElement()->innerTubeRadius(), 2);
416  locCov(Acts::eBoundLoc1, Acts::eBoundLoc1) = std::pow(0.5* dc->readoutElement()->activeTubeLength(dc->measurementHash()), 2);
417  } else {
418  locCov(Acts::eBoundLoc0, Acts::eBoundLoc0) = std::pow(calibOutput.uncertPrimaryR(), 2);
419  locCov(Acts::eBoundLoc1, Acts::eBoundLoc1) = std::pow(calibOutput.sigmaZ(), 2);
420  locPos[Acts::eBoundLoc0] = driftSign*calibOutput.primaryDriftR();
421  locPos[Acts::eBoundLoc1] = calibOutput.locZ();
422  }
423  setState<2, ActsTrk::MutableTrackStateBackend>(ProjectorType::e2DimNoTime, locPos, locCov, link, trackState);
424  }
425  break;
426  } case RpcStripType: {
427  const auto* rpcClust = static_cast<const xAOD::RpcMeasurement*>(muonMeas);
429  if (ATH_LIKELY(rpcClust->numDimensions() == 1)) {
430  if (!m_useRpcTime) {
431  setState<1, ActsTrk::MutableTrackStateBackend>(ProjectorType::e1DimNoTime,
432  rpcClust->localPosition<1>(),
433  rpcClust->localCovariance<1>(), link, trackState);
434  } else {
435  AmgVector(2) measPars{AmgVector(2)::Zero()};
436  AmgSymMatrix(2) measCov{AmgSymMatrix(2)::Identity()};
437  measPars[0] = rpcClust->localPosition<1>()[0];
438  measCov(0,0) = rpcClust->localCovariance<1>()(0, 0);
439  measCov(1,1) = std::pow(m_rpcTimeResolution, 2);
440  setState<2, ActsTrk::MutableTrackStateBackend>(ProjectorType::e1DimWithTime,
441  measPars, measCov, link, trackState);
442  }
443  }
445  else {
446  if (!m_useRpcTime) {
447  setState<2, ActsTrk::MutableTrackStateBackend>(ProjectorType::e1DimNoTime,
448  rpcClust->localPosition<2>(),
449  rpcClust->localCovariance<2>(), link, trackState);
450  } else {
451  AmgVector(3) measPars{AmgVector(3)::Zero()};
452  AmgSymMatrix(3) measCov{AmgSymMatrix(3)::Identity()};
453  measPars.block<2,1>(0,0) = xAOD::toEigen(rpcClust->localPosition<2>());
454  measCov.block<2,2>(0,0) = xAOD::toEigen(rpcClust->localCovariance<2>());
455  measCov(2,2) = std::pow(m_rpcTimeResolution, 2);
456  setState<3, ActsTrk::MutableTrackStateBackend>(ProjectorType::e2DimWithTime,
457  measPars, measCov, link, trackState);
458  }
459  }
460  break;
461  } case TgcStripType: {
462  if (!m_useTgcTime) {
463  setState<1, ActsTrk::MutableTrackStateBackend>(ProjectorType::e1DimRotNoTime,
464  muonMeas->localPosition<1>(),
465  muonMeas->localCovariance<1>(), link, trackState);
466  } else {
467  ATH_MSG_WARNING("Tgc time calibration to be implemented...");
468  }
469  break;
470  }
471  case MMClusterType: {
472  const auto* mmClust = static_cast<const xAOD::MMCluster*>(muonMeas);
473  std::pair<double, double> calibPosCov{calibrateMM(*ctx,* gctx, *mmClust, trackPos, trackDir)};
474  AmgVector(1) pos{AmgVector(1)(calibPosCov.first)};
475  AmgSymMatrix(1) cov{AmgSymMatrix(1)(calibPosCov.second)};
476 
477  setState<1, ActsTrk::MutableTrackStateBackend>(ProjectorType::e1DimNoTime,
478  pos,
479  cov, link, trackState);
480  break;
481  } case sTgcStripType: {
482  const auto* stgcClust = static_cast<const xAOD::sTgcMeasurement*>(muonMeas);
483 
484  if(stgcClust->channelType() == sTgcIdHelper::sTgcChannelTypes::Wire) {
485  setState<1, ActsTrk::MutableTrackStateBackend>(ProjectorType::e1DimNoTime,
486  muonMeas->localPosition<1>(),
487  muonMeas->localCovariance<1>(), link, trackState);
488 
489  } else if(stgcClust->channelType() == sTgcIdHelper::sTgcChannelTypes::Pad) {
490  setState<2, ActsTrk::MutableTrackStateBackend>(ProjectorType::e2DimNoTime,
491  stgcClust->localPosition<2>(),
492  stgcClust->localCovariance<2>(), link, trackState);
493 
494 
495  } else { // strips
496  const auto stgCluster = static_cast<const xAOD::sTgcStripCluster*>(muonMeas);
497  std::pair<double, double> calibPosCov{calibratesTGC(*ctx, *gctx, *stgCluster, -FLT_MAX, trackPos, trackDir)};
498  if(!m_usesTgcTime){
499  AmgVector(1) pos{AmgVector(1)(calibPosCov.first)};
500  AmgSymMatrix(1) cov{AmgSymMatrix(1)(calibPosCov.second)};
501  setState<1, ActsTrk::MutableTrackStateBackend>(ProjectorType::e1DimNoTime,
502  pos,
503  cov, link, trackState);
504  } else {
505  ATH_MSG_WARNING("sTGC time calibration to be implemented...");
506  AmgVector(2) pos{AmgVector(2)::Zero()};
507  AmgSymMatrix(2) cov{AmgSymMatrix(2)::Zero()};
508  pos[0] = calibPosCov.first;
509  pos[1] = stgCluster->time();
510  cov(0,0) = calibPosCov.second;
511  cov(1,1) = std::pow(25 /*ns*/, 2);
512 
513  setState<2, ActsTrk::MutableTrackStateBackend>(ProjectorType::e1DimWithTime,
514  pos,
515  cov, link, trackState);
516  }
517  break;
518 
519  }
520  THROW_EXCEPTION("sTGC measurements are not yet implemented");
521  break;
522  } default: {
523  THROW_EXCEPTION("The parsed measurement is not a muon measurement. Please check.");
524  }
525  }
526  }

◆ calibratesTGC()

std::pair< double, double > MuonR4::SpacePointCalibrator::calibratesTGC ( const EventContext &  ctx,
const ActsGeometryContext gctx,
const xAOD::sTgcStripCluster cluster,
double  posAlongTheStrip,
const Amg::Vector3D globalPos,
const Amg::Vector3D globalDir 
) const

Calibrates the position and covariance of an sTGC (small-strip Thin Gap Chamber) cluster.

Parameters
ctxThe event context providing the necessary conditions for the calibration.
gctxPointer to the ActsGeometryContext, which provides geometry-related information.
clusterPointer to the sTGC strip cluster to be calibrated.
posAlongTheStripThe position along the strip obtained from the secondary measurement(wire), 0 if no wire measurement is present.
globalPosThe global position from an external measurement.
globalDirThe global direction from an external measurement.
[out]calibLocPosThe calibrated local position of the cluster (output parameter).
[out]calibLocCovThe calibrated local covariance of the cluster (output parameter).

Definition at line 338 of file SpacePointCalibrator.cxx.

339  {
340 
341  // avoid unused variable warning while this code is under development
342  (void) ctx;
343  (void) globalDir;
344 
345  // if the second coordiante was not provided by the wire, take it from the seed track position
346  if(posAlongTheStrip == -FLT_MAX){
347  Amg::Vector3D extPosLocal = cluster.readoutElement()->globalToLocalTrans(gctx, cluster.layerHash()) * globalPos;
348  posAlongTheStrip = extPosLocal[1];
349  }
350 
351  // For now just copying over the local position and covariance. Eventually this should apply corrections from B-Lines and as build geometry
352 
353  return std::make_pair(cluster.localPosition<1>()[0], cluster.localCovariance<1>()(0,0));
354  }

◆ driftAcceleration()

double MuonR4::SpacePointCalibrator::driftAcceleration ( const EventContext &  ctx,
const CalibratedSpacePoint spacePoint 
) const
finaloverride

Definition at line 303 of file SpacePointCalibrator.cxx.

304  {
305  if(spacePoint.type() == xAOD::UncalibMeasType::MdtDriftCircleType) {
306  const MuonCalib::MdtFullCalibData* calibConsts = m_mdtCalibrationTool->getCalibConstants(ctx, spacePoint.spacePoint()->identify());
307  const std::optional<double> driftTime = calibConsts->rtRelation->tr()->driftTime(spacePoint.driftRadius());
308  return calibConsts->rtRelation->rt()->driftAcceleration(driftTime.value_or(0.));
309  }
310  return 0.;
311  }

◆ driftVelocity()

double MuonR4::SpacePointCalibrator::driftVelocity ( const EventContext &  ctx,
const CalibratedSpacePoint spacePoint 
) const
finaloverride

Definition at line 294 of file SpacePointCalibrator.cxx.

295  {
296  if(spacePoint.type() == xAOD::UncalibMeasType::MdtDriftCircleType) {
297  const MuonCalib::MdtFullCalibData* calibConsts = m_mdtCalibrationTool->getCalibConstants(ctx, spacePoint.spacePoint()->identify());
298  const std::optional<double> driftTime = calibConsts->rtRelation->tr()->driftTime(spacePoint.driftRadius());
299  return calibConsts->rtRelation->rt()->driftVelocity(driftTime.value_or(0.));
300  }
301  return 0.;
302  }

◆ initialize()

StatusCode MuonR4::SpacePointCalibrator::initialize ( )
finaloverride

Definition at line 43 of file SpacePointCalibrator.cxx.

43  {
45  ATH_CHECK(m_idHelperSvc.retrieve());
46  ATH_CHECK(m_mdtCalibrationTool.retrieve(EnableTool{m_idHelperSvc->hasMDT()}));
47  ATH_CHECK(m_nswCalibTool.retrieve(EnableTool{m_idHelperSvc->hasMM() || m_idHelperSvc->hasSTGC()}));
49  return StatusCode::SUCCESS;
50  }

◆ setState()

template<std::size_t Dim, typename trajectory_t , typename pos_t , typename cov_t >
void ActsTrk::detail::MeasurementCalibratorBase::setState ( const ProjectorType  projector,
const pos_t &  locpos,
const cov_t &  cov,
Acts::SourceLink  link,
TrackState_t< trajectory_t > &  trackState 
) const
inherited

Copy the local position & covariance into the Acts track state proxy.

Template Parameters
DimDimension of the measurement
trajectory_tData type of the track state proxy backend
pos_tData type of the [Dim x 1] position vector
cov_tData type of the [Dim x Dim] covariance matrix
Parameters
projectorProjector configuration of the measurement
locposCalibrated local postion
covCalibrated local covariance
linkSource link to associate with the state
trackStateRefrence to the track state proxy to write.

Member Data Documentation

◆ m_clusterBuilderToolMM

ToolHandle<Muon::IMMClusterBuilderTool> MuonR4::SpacePointCalibrator::m_clusterBuilderToolMM {this, "MMClusterBuilder", ""}
private

Definition at line 117 of file SpacePointCalibrator.h.

◆ m_detMgr

const MuonGMR4::MuonDetectorManager* MuonR4::SpacePointCalibrator::m_detMgr {nullptr}
private

Definition at line 119 of file SpacePointCalibrator.h.

◆ m_geoCtxKey

SG::ReadHandleKey<ActsGeometryContext> MuonR4::SpacePointCalibrator::m_geoCtxKey {this, "AlignmentKey", "ActsAlignment", "cond handle key"}
private

access to the ACTS geometry context

Definition at line 109 of file SpacePointCalibrator.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> MuonR4::SpacePointCalibrator::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 111 of file SpacePointCalibrator.h.

◆ m_mdtCalibrationTool

ToolHandle<IMdtCalibrationTool> MuonR4::SpacePointCalibrator::m_mdtCalibrationTool {this, "MdtCalibrationTool", ""}
private

Definition at line 113 of file SpacePointCalibrator.h.

◆ m_muonPropSpeed

Gaudi::Property<double> MuonR4::SpacePointCalibrator::m_muonPropSpeed {this, "PropagationSpeed", 1./ Gaudi::Units::c_light }
private

Assumed propagation velocity of the muon through the detector.

Needs to be replaced by the proper time estimate once the calibrator is exposed to the Acts propagator

Definition at line 124 of file SpacePointCalibrator.h.

◆ m_nswCalibTool

ToolHandle<Muon::INSWCalibTool> MuonR4::SpacePointCalibrator::m_nswCalibTool {this, "NSWCalibTool", ""}
private

Definition at line 115 of file SpacePointCalibrator.h.

◆ m_rpcSignalVelocity

Gaudi::Property<double> MuonR4::SpacePointCalibrator::m_rpcSignalVelocity
private
Initial value:
{this, "rpcSignalVelocity", 0.5 * Gaudi::Units::c_light,
"Propagation speed of the signal inside the rpc strip"}

How fast does an electron signal travel along an rpc strip

Definition at line 127 of file SpacePointCalibrator.h.

◆ m_rpcTimeResolution

Gaudi::Property<double> MuonR4::SpacePointCalibrator::m_rpcTimeResolution
private
Initial value:
{this, "rpcTimeResolution", 0.6 * Gaudi::Units::nanosecond,
"Estimated time resolution of the strip readout"}

Definition at line 130 of file SpacePointCalibrator.h.

◆ m_useRpcTime

Gaudi::Property<bool> MuonR4::SpacePointCalibrator::m_useRpcTime {this, "useRpcTime", false}
private

Load the Rpc time on the track states for the track fit.

Definition at line 134 of file SpacePointCalibrator.h.

◆ m_usesTgcTime

Gaudi::Property<bool> MuonR4::SpacePointCalibrator::m_usesTgcTime
private
Initial value:
{this, "usesTgcTime", false,
"Load the sTgc time on the track states for the fit"}

Definition at line 138 of file SpacePointCalibrator.h.

◆ m_useTgcTime

Gaudi::Property<bool> MuonR4::SpacePointCalibrator::m_useTgcTime
private
Initial value:
{this, "useTgcTime", false,
"Load the Tgc BC-ID on the track states for the fit"}

Load the Tgc bunch crossing ID on the track states.

Definition at line 136 of file SpacePointCalibrator.h.

◆ s_boundSpaceIndices

constexpr static std::array<Acts::BoundSubspaceIndices, 6> ActsTrk::detail::MeasurementCalibratorBase::s_boundSpaceIndices
staticconstexprprivateinherited
Initial value:
{
Acts::BoundSubspaceIndices{Acts::eBoundLoc0},
Acts::BoundSubspaceIndices{Acts::eBoundLoc1},
Acts::BoundSubspaceIndices{Acts::eBoundLoc0, Acts::eBoundLoc1},
Acts::BoundSubspaceIndices{Acts::eBoundLoc0, Acts::eBoundTime},
Acts::BoundSubspaceIndices{Acts::eBoundLoc1, Acts::eBoundTime},
Acts::BoundSubspaceIndices{Acts::eBoundLoc0, Acts::eBoundLoc1, Acts::eBoundTime}
}

Array to map the Projector types to the bound index configurations used by the ATLAS detector measurements.

Definition at line 66 of file MeasurementCalibratorBase.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
MdtCalibInput::setTrackDirection
void setTrackDirection(const Amg::Vector3D &trackDir, bool hasPhi)
Sets the direction of the externally determined track.
Definition: MdtCalibInput.cxx:110
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:196
xAOD::RpcMeasurement_v1
RpcMeasurement_v1: Class storing the geneic.
Definition: RpcMeasurement_v1.h:21
xAOD::identify
const Identifier & identify(const UncalibratedMeasurement *meas)
Returns the associated identifier from the muon measurement.
Definition: MuonSpectrometer/MuonPhaseII/Event/xAOD/xAODMuonPrepData/Root/UtilFunctions.cxx:82
xAOD::sTgcMeasurement_v1::layerHash
IdentifierHash layerHash() const
Returns the hash of the associated gasGap layer.
Definition: sTgcMeasurement_v1.cxx:38
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
ActsTrk::detail::MeasurementCalibratorBase::ProjectorType::e2DimNoTime
@ e2DimNoTime
Project out solely the locY - Complementary projector if the strip plane is rotated (Applies to Itk e...
xAOD::sTgcStripCluster_v1
Definition: sTgcStripCluster_v1.h:13
xAOD::MMCluster_v1
Definition: MMCluster_v1.h:20
MdtCalibInput
Definition: MdtCalibInput.h:34
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
MuonR4::SpacePoint::CovIdx::timeCov
@ timeCov
MuonR4::SpacePoint::Cov_t
std::array< double, 3 > Cov_t
Abrivation of the covariance type.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/MuonSpacePoint/SpacePoint.h:27
MuonCalib::MdtFullCalibData::rtRelation
RtRelationPtr rtRelation
Definition: MdtFullCalibData.h:21
xAOD::UncalibMeasType::MMClusterType
@ MMClusterType
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:200
xAOD::MMCluster_v1::readoutElement
const MuonGMR4::MmReadoutElement * readoutElement() const
Retrieve the associated MmReadoutElement.
MdtCalibTwinOutput::sigmaZ
double sigmaZ() const
Definition: MdtCalibTwinOutput.cxx:49
MuonR4::CalibratedSpacePoint::State::Outlier
@ Outlier
ActsTrk::detail::MeasurementCalibratorBase::ProjectorType::e2DimWithTime
@ e2DimWithTime
Project out the locY & time coordinate - (Applies to Rpc, Tgc, sTgc)
python.SystemOfUnits.nanosecond
float nanosecond
Definition: SystemOfUnits.py:134
MuonGMR4::MuonReadoutElement::globalToLocalTrans
Amg::Transform3D globalToLocalTrans(const ActsGeometryContext &ctx) const
Transformations to translate between local <-> global coordinates.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx:78
ActsTrk::detail::MeasurementCalibratorBase::ProjectorType::e1DimRotNoTime
@ e1DimRotNoTime
Project out solely the locX (Applies to Itk strips, Rpc, Tgc, sTgc, Mm)
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
xAOD::UncalibMeasType::sTgcStripType
@ sTgcStripType
MuonR4::SpacePoint::CovIdx::etaCov
@ etaCov
MuonCalib::MdtFullCalibData
class which holds the full set of calibration constants for a given tube
Definition: MdtFullCalibData.h:15
MuonGMR4::RpcReadoutElement::EdgeSide
EdgeSide
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/RpcReadoutElement.h:109
MdtCalibTwinOutput::uncertPrimaryR
double uncertPrimaryR() const
Definition: MdtCalibTwinOutput.cxx:52
AmgSymMatrix
#define AmgSymMatrix(dim)
Definition: EventPrimitives.h:50
Muon::MdtStatusDriftTime
@ MdtStatusDriftTime
The tube produced a vaild measurement.
Definition: MdtDriftCircleStatus.h:34
keylayer_zslicemap.strip
strip
Definition: keylayer_zslicemap.py:151
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
ActsTrk::detail::xAODUncalibMeasCalibrator::unpack
static const xAOD::UncalibratedMeasurement * unpack(const Acts::SourceLink &sl)
Helper method to unpack an Acts source link to an uncalibrated measurement.
Definition: xAODUncalibMeasCalibrator.cxx:12
SpacePoint
Definition: Trigger/TrigAccel/TrigCudaFitter/src/SpacePoint.h:7
xAOD::UncalibMeasType::TgcStripType
@ TgcStripType
MuonR4::CalibSpacePointVec
ISpacePointCalibrator::CalibSpacePointVec CalibSpacePointVec
Definition: SpacePointCalibrator.cxx:38
MuonR4::SpacePointCalibrator::m_rpcSignalVelocity
Gaudi::Property< double > m_rpcSignalVelocity
How fast does an electron signal travel along an rpc strip
Definition: SpacePointCalibrator.h:127
MuonR4::SpacePointCalibrator::m_useRpcTime
Gaudi::Property< bool > m_useRpcTime
Load the Rpc time on the track states for the track fit.
Definition: SpacePointCalibrator.h:134
MuonR4::SpacePointCalibrator::m_useTgcTime
Gaudi::Property< bool > m_useTgcTime
Load the Tgc bunch crossing ID on the track states.
Definition: SpacePointCalibrator.h:136
xAOD::MMCluster_v1::layerHash
IdentifierHash layerHash() const
Returns the hash of the associated layer (Needed for surface retrieval)
Definition: MMCluster_v1.cxx:23
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
TRT::Hit::driftTime
@ driftTime
Definition: HitInfo.h:43
Muon::NswClustering::toLocal
Amg::Vector3D toLocal(const Amg::Transform3D &toLocalTrans, const Amg::Vector3D &dir)
Rotates a direction vector into a local frame: x-axis : Parallell to the radial direction of the dete...
Definition: NswClusteringUtils.h:21
MuonR4::SpacePointCalibrator::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: SpacePointCalibrator.h:111
MuonR4::SpacePointCalibrator::calibratesTGC
std::pair< double, double > calibratesTGC(const EventContext &ctx, const ActsGeometryContext &gctx, const xAOD::sTgcStripCluster &cluster, double posAlongTheStrip, const Amg::Vector3D &globalPos, const Amg::Vector3D &globalDir) const
Calibrates the position and covariance of an sTGC (small-strip Thin Gap Chamber) cluster.
Definition: SpacePointCalibrator.cxx:338
SG::get
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
Definition: ReadCondHandle.h:287
MuonR4::SpacePointCalibrator::m_nswCalibTool
ToolHandle< Muon::INSWCalibTool > m_nswCalibTool
Definition: SpacePointCalibrator.h:115
xAOD::MMCluster_v1::identify
const Identifier & identify() const
: Returns the Athena identifier of the micro mega cluster It's constructed from the measurementHash &...
Definition: MMCluster_v1.cxx:26
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
AmgVector
AmgVector(4) T2BSTrackFilterTool
Definition: T2BSTrackFilterTool.cxx:114
MuonR4::State
CalibratedSpacePoint::State State
Definition: SpacePointCalibrator.cxx:40
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
MuonR4::CalibratedSpacePoint::State::FailedCalib
@ FailedCalib
xAOD::MdtTwinDriftCircle_v1
Definition: MdtTwinDriftCircle_v1.h:12
xAOD::Other
@ Other
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MdtCalibTwinOutput::locZ
double locZ() const
Definition: MdtCalibTwinOutput.cxx:48
MuonR4::SpacePointCalibrator::m_clusterBuilderToolMM
ToolHandle< Muon::IMMClusterBuilderTool > m_clusterBuilderToolMM
Definition: SpacePointCalibrator.h:117
MdtCalibInput::setClosestApproach
void setClosestApproach(const Amg::Vector3D &approach)
Sets the closest approach.
Definition: MdtCalibInput.cxx:106
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
xAOD::UncalibratedMeasurement_v1::localCovariance
ConstMatrixMap< N > localCovariance() const
Returns the local covariance of the measurement.
F600IntegrationConfig.spacePoints
spacePoints
Definition: F600IntegrationConfig.py:122
MdtCalibOutput::status
MdtDriftCircleStatus status() const
Status of the calibration.
Definition: MdtCalibOutput.cxx:40
MdtCalibOutput
Definition: MdtCalibOutput.h:10
xAOD::UncalibratedMeasurement_v1::localPosition
ConstVectorMap< N > localPosition() const
Returns the local position of the measurement.
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:27
MuonR4::CalibratedSpacePoint::State::Valid
@ Valid
ActsTrk::detail::MeasurementCalibratorBase::ProjectorType::e1DimNoTime
@ e1DimNoTime
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
MuonR4::sign
constexpr double sign(const double x)
Returns the sign of a number.
Definition: MatrixUtils.h:11
CalibSpacePointPtr
MuonR4::ISpacePointCalibrator::CalibSpacePointPtr CalibSpacePointPtr
Definition: MuonSPCalibrationTest.cxx:10
MuonR4::SpacePoint::CovIdx::phiCov
@ phiCov
xAOD::sTgcMeasurement_v1::readoutElement
const MuonGMR4::sTgcReadoutElement * readoutElement() const
Retrieve the associated sTgcReadoutElement.
ActsTrk::detail::MeasurementCalibratorBase::ProjectorType::e1DimWithTime
@ e1DimWithTime
Project out the two spatial coordinates - (Applies to ITk pixel, BI-Rpc, sTgc pad)
MdtCalibTwinOutput::primaryStatus
MdtDriftCircleStatus primaryStatus() const
Definition: MdtCalibTwinOutput.cxx:54
python.PhysicalConstants.c_light
float c_light
Definition: PhysicalConstants.py:73
MuonR4::SpacePointCalibrator::m_usesTgcTime
Gaudi::Property< bool > m_usesTgcTime
Definition: SpacePointCalibrator.h:138
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
THROW_EXCEPTION
#define THROW_EXCEPTION(MESSAGE)
Definition: throwExcept.h:10
python.copyTCTOutput.locDir
locDir
Definition: copyTCTOutput.py:110
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:16
MuonR4::SpacePointCalibrator::m_mdtCalibrationTool
ToolHandle< IMdtCalibrationTool > m_mdtCalibrationTool
Definition: SpacePointCalibrator.h:113
MdtCalibOutput::driftRadiusUncert
double driftRadiusUncert() const
Returns the uncertainty on the drift radius.
Definition: MdtCalibOutput.cxx:20
ATH_LIKELY
#define ATH_LIKELY(x)
Definition: AthUnlikelyMacros.h:16
MuonR4::SpacePointCalibrator::calibrate
CalibSpacePointPtr calibrate(const EventContext &ctx, const SpacePoint *spacePoint, const Amg::Vector3D &seedPosInChamb, const Amg::Vector3D &seedDirInChamb, const double timeDelay) const override final
Definition: SpacePointCalibrator.cxx:80
MdtCalibTwinOutput
Definition: MdtCalibTwinOutput.h:11
MuonR4::SpacePointCalibrator::m_rpcTimeResolution
Gaudi::Property< double > m_rpcTimeResolution
Definition: SpacePointCalibrator.h:130
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
xAOD::UncalibMeasType
UncalibMeasType
Define the type of the uncalibrated measurement.
Definition: MeasurementDefs.h:25
MuonR4::SpacePointCalibrator::m_geoCtxKey
SG::ReadHandleKey< ActsGeometryContext > m_geoCtxKey
access to the ACTS geometry context
Definition: SpacePointCalibrator.h:109
MuonGMR4::MuonReadoutElement::localToGlobalTrans
const Amg::Transform3D & localToGlobalTrans(const ActsGeometryContext &ctx) const
Returns the local to global transformation into the ATLAS coordinate system.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx:81
MuonR4::SpacePointCalibrator::m_detMgr
const MuonGMR4::MuonDetectorManager * m_detMgr
Definition: SpacePointCalibrator.h:119
MdtCalibTwinOutput::primaryDriftR
double primaryDriftR() const
Definition: MdtCalibTwinOutput.cxx:50
xAOD::MdtDriftCircle_v1
https://gitlab.cern.ch/atlas/athena/-/blob/master/MuonSpectrometer/MuonReconstruction/MuonRecEvent/Mu...
Definition: MdtDriftCircle_v1.h:21
Muon::MMClusterOnTrack::Author
Author
Definition: MMClusterOnTrack.h:89
pow
constexpr int pow(int base, int exp) noexcept
Definition: ap_fixedTest.cxx:15
xAOD::UncalibMeasType::RpcStripType
@ RpcStripType
xAOD::RpcMeasurement_v1::time
float time() const
Returns the time.
xAOD::UncalibMeasType::MdtDriftCircleType
@ MdtDriftCircleType
MdtCalibOutput::driftRadius
double driftRadius() const
Returns the drift radius of the calibrated object.
Definition: MdtCalibOutput.cxx:19
xAOD::sTgcMeasurement_v1
Definition: sTgcMeasurement_v1.h:21
MuonR4::SpacePointCalibrator::calibrateMM
std::pair< double, double > calibrateMM(const EventContext &ctx, const ActsGeometryContext &gctx, const xAOD::MMCluster &cluster, const Amg::Vector3D &globalPos, const Amg::Vector3D &globalDir) const
Calibrates the position and covariance of a MicroMegas (MM) cluster.
Definition: SpacePointCalibrator.cxx:314
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32