Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
MuonCombined::MuonStauRecoTool Class Reference

ID seeded Stau reconstruction. More...

#include <MuonStauRecoTool.h>

Inheritance diagram for MuonCombined::MuonStauRecoTool:
Collaboration diagram for MuonCombined::MuonStauRecoTool:

Classes

struct  AssociatedData
 
struct  BetaSeed
 
struct  Candidate
 
struct  LayerData
 
struct  MaximumData
 
struct  RpcTimeMeasurement
 
struct  TruthInfo
 

Public Types

typedef std::vector< const MuonHough::MuonLayerHough::Maximum * > MaximumVec
 
typedef std::vector< const MuonHough::MuonPhiLayerHough::Maximum * > PhiMaximumVec
 
typedef std::vector< RpcTimeMeasurementRpcTimeMeasurementVec
 
using MaximumDataVec = std::vector< std::shared_ptr< MaximumData > >
 
typedef std::vector< LayerDataLayerDataVec
 
typedef std::vector< std::shared_ptr< Candidate > > CandidateVec
 

Public Member Functions

 MuonStauRecoTool (const std::string &type, const std::string &name, const IInterface *parent)
 Default AlgTool functions. More...
 
virtual ~MuonStauRecoTool ()=default
 
virtual StatusCode initialize () override
 
virtual void extend (const InDetCandidateCollection &inDetCandidates, InDetCandidateToTagMap *tagMap, TrackCollection *combTracks, TrackCollection *meTracks, Trk::SegmentCollection *segments, const EventContext &ctx) const override
 IMuonCombinedInDetExtensionTool interface: extend ID candidate. More...
 
virtual void extendWithPRDs (const InDetCandidateCollection &inDetCandidates, InDetCandidateToTagMap *tagMap, IMuonCombinedInDetExtensionTool::MuonPrdData prdData, TrackCollection *combTracks, TrackCollection *meTracks, Trk::SegmentCollection *segments, const EventContext &ctx) const override
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

void handleCandidate (const EventContext &ctx, const InDetCandidate &inDetCandidate, InDetCandidateToTagMap *tagMap, TrackCollection *combTracks, Trk::SegmentCollection *segments) const
 handle a single candidate More...
 
void associateHoughMaxima (const EventContext &ctx, LayerData &layerData) const
 associate Hough maxima to intersection More...
 
void extractRpcTimingFromMaximum (const Muon::MuonSystemExtension::Intersection &intersection, MaximumData &maximumData) const
 extract RPC hit timing More...
 
void createRpcTimeMeasurementsFromClusters (const Muon::MuonSystemExtension::Intersection &intersection, const std::vector< Muon::RpcClusterObj > &clusterObjects, RpcTimeMeasurementVec &rpcTimeMeasurements) const
 create Rpc hit timing for a set of clusters More...
 
void findSegments (const Muon::MuonSystemExtension::Intersection &intersection, MaximumData &maximumData, std::vector< std::shared_ptr< const Muon::MuonSegment >> &t0fittedSegments, const ToolHandle< Muon::IMuonPRDSelectionTool > &muonPRDSelectionTool, const ToolHandle< Muon::IMuonSegmentMaker > &segmentMaker, float beta=1.) const
 find segments for a given maximum More...
 
bool extractTimeMeasurements (const EventContext &ctx, const Muon::MuonSystemExtension &muonSystemExtension, AssociatedData &associatedData) const
 associate Hough maxima and associate time measurements More...
 
bool createCandidates (const AssociatedData &associatedData, CandidateVec &candidates) const
 create candidates from the beta seeds More...
 
void extendCandidates (CandidateVec &candidates, std::set< const MaximumData * > &usedMaximumData, LayerDataVec::const_iterator it, LayerDataVec::const_iterator it_end) const
 extend a CandidateVec with the next LayerData More...
 
void getBetaSeeds (MaximumData &maximumData) const
 calculate the beta seeds for a give MaximumData More...
 
bool extractTimeHits (const MaximumData &maximumData, Muon::TimePointBetaFitter::HitVec &hits, const BetaSeed *seed=0) const
 extract hits for the beta fit, returns true if hits were added More...
 
bool refineCandidates (const EventContext &ctx, CandidateVec &candidates) const
 refine candidates: find segments for the given beta More...
 
bool combineCandidates (const EventContext &ctx, const xAOD::TrackParticle &indetTrackParticle, CandidateVec &candidates) const
 combine reconstruction More...
 
bool resolveAmbiguities (CandidateVec &candidates) const
 resolve ambiguities between the candidates More...
 
void addTag (const InDetCandidate &inDetCandidate, Candidate &candidate, InDetCandidateToTagMap *tagMap, TrackCollection *combTracks, Trk::SegmentCollection *segments) const
 create final tag object and add it to the inDetCandidate More...
 
void extractTimeMeasurementsFromTrack (const EventContext &ctx, Candidate &candidate) const
 extract time measurements from the track associated with the candidate More...
 
std::unique_ptr< TruthInfogetTruth (const xAOD::TrackParticle &indetTrackParticle) const
 extract truth from the indetTrackParticle More...
 
bool selectTruth (const TruthInfo *truthInfo) const
 if truth tracking is enabled, return whether the pdg is selected More...
 
void addCandidatesToNtuple (const xAOD::TrackParticle &indetTrackParticle, const CandidateVec &candidates, int stage) const
 helper function to add Candidate to ntuple More...
 
bool processMuonSystemExtension (const xAOD::TrackParticle &indetTrackParticle, const Muon::MuonSystemExtension &muonSystemExtension, CandidateVec &candidates)
 match extension to Hough maxima, extract time measurements, create candidates, run segment finding More...
 
void mdtTimeCalibration (const Identifier &id, float &time, float &error) const
 
void rpcTimeCalibration (const Identifier &id, float &time, float &error) const
 
void segmentTimeCalibration (const Identifier &id, float &time, float &error) const
 
float calculateTof (const float beta, const float dist) const
 Calcualte for zero betas. More...
 
float calculateBeta (const float time, const float dist) const
 In cases of invalid times just return an phyisical value of 20 times the speed of light The subsequent checks remove the attempt by default then. More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

SG::ReadHandleKey< Muon::MuonLayerHoughTool::HoughDataPerSectorVecm_houghDataPerSectorVecKey
 storegate More...
 
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 
ServiceHandle< Muon::IMuonEDMHelperSvcm_edmHelperSvc
 
PublicToolHandle< Muon::MuonEDMPrinterToolm_printer {this, "MuonEDMPrinterTool", ""}
 
ToolHandle< Muon::IMuonSegmentMakerm_segmentMaker {this, "MuonSegmentMaker", "Muon::DCMathSegmentMaker/DCMathSegmentMaker"}
 
ToolHandle< Muon::IMuonSegmentMakerm_segmentMakerT0Fit
 
ToolHandle< Muon::IMuonLayerSegmentMatchingToolm_segmentMatchingTool
 
ToolHandle< Muon::IMuonRecoValidationToolm_recoValidationTool {this, "MuonRecoValidationTool", ""}
 
ToolHandle< Trk::ITrackAmbiguityProcessorToolm_trackAmbibuityResolver
 
ToolHandle< Muon::IMuonHitTimingToolm_hitTimingTool {this, "MuonHitTimingTool", "Muon::MuonHitTimingTool/MuonHitTimingTool"}
 
ToolHandle< Muon::IMuonPRDSelectionToolm_muonPRDSelectionTool {this, "MuonPRDSelectionTool", ""}
 
ToolHandle< Muon::IMuonPRDSelectionToolm_muonPRDSelectionToolStau {this, "MuonPRDSelectionToolStau", ""}
 
ToolHandle< Muon::IMdtDriftCircleOnTrackCreatorm_mdtCreator
 
ToolHandle< Muon::IMdtDriftCircleOnTrackCreatorm_mdtCreatorStau
 
ToolHandle< MuonCombined::MuonInsideOutRecoToolm_insideOutRecoTool
 
ToolHandle< Trk::IUpdatorm_updator {this, "Updator", "Trk::KalmanUpdator/KalmanUpdator"}
 
SG::ReadCondHandleKey< MuonCalib::MdtCalibDataContainerm_calibDbKey
 
Muon::MuonSectorMapping m_muonSectorMapping
 
Gaudi::Property< bool > m_doSummary {this, "DoSummary", false, "enable summary output"}
 
Gaudi::Property< bool > m_useTruthMatching {this, "UseTruthMatching", false, "enable usage of truth info for reconstruction"}
 
Gaudi::Property< bool > m_doTruth {this, "DoTruth", false, "enable truth matching"}
 
Gaudi::Property< bool > m_segmentMDTT {this, "UseSegmentMDTT", true}
 
Gaudi::Property< bool > m_ignoreSiAssocated {this, "IgnoreSiAssociatedCandidates", true}
 
Gaudi::Property< std::vector< int > > m_pdgsToBeConsidered {this, "ConsideredPDGs", {}, "PDG IDs considered in truth matching"}
 
Gaudi::Property< double > m_ptThreshold {this, "PtThreshold", 10000}
 
Gaudi::Property< double > m_houghAssociationPullCut {this, "HoughAssociationPullCut", 5}
 
Gaudi::Property< double > m_mdttBetaAssociationCut {this, "MDTTAssocationCut", 0.4}
 
Gaudi::Property< double > m_rpcBetaAssociationCut {this, "RPCAssocationCut", 0.2}
 
Gaudi::Property< double > m_segmentBetaAssociationCut {this, "SegmentAssocationCut", 0.2}
 
Gaudi::Property< bool > m_addMDTExtrasMuGirlLowBeta {this, "AddMDTExtrasMuGirlLowBeta", false}
 
std::set< int > m_selectedPdgs
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

ID seeded Stau reconstruction.

Steps:

Definition at line 54 of file MuonStauRecoTool.h.

Member Typedef Documentation

◆ CandidateVec

typedef std::vector<std::shared_ptr<Candidate> > MuonCombined::MuonStauRecoTool::CandidateVec

Definition at line 119 of file MuonStauRecoTool.h.

◆ LayerDataVec

Definition at line 91 of file MuonStauRecoTool.h.

◆ MaximumDataVec

using MuonCombined::MuonStauRecoTool::MaximumDataVec = std::vector<std::shared_ptr<MaximumData> >

Definition at line 85 of file MuonStauRecoTool.h.

◆ MaximumVec

Definition at line 56 of file MuonStauRecoTool.h.

◆ PhiMaximumVec

Definition at line 57 of file MuonStauRecoTool.h.

◆ RpcTimeMeasurementVec

Definition at line 70 of file MuonStauRecoTool.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ MuonStauRecoTool()

MuonCombined::MuonStauRecoTool::MuonStauRecoTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Default AlgTool functions.

Definition at line 45 of file MuonStauRecoTool.cxx.

45  :

◆ ~MuonStauRecoTool()

virtual MuonCombined::MuonStauRecoTool::~MuonStauRecoTool ( )
virtualdefault

Member Function Documentation

◆ addCandidatesToNtuple()

void MuonCombined::MuonStauRecoTool::addCandidatesToNtuple ( const xAOD::TrackParticle indetTrackParticle,
const CandidateVec candidates,
int  stage 
) const
private

helper function to add Candidate to ntuple

Definition at line 1440 of file MuonStauRecoTool.cxx.

1441  {
1443  ATH_MSG_WARNING("You are calling the non thread-safe MuonRecoValidationTool with multiple threads, will most likely crash");
1444  }
1445  if (m_recoValidationTool.empty()) return;
1446 
1447  ATH_MSG_DEBUG("add candidates to ntuple, stage " << stage);
1448  for (const auto& candidate : candidates) {
1449  int ntimes = 0;
1450  float beta = -1.;
1451  float chi2ndof = -1.;
1452  if (candidate->finalBetaFitResult.status != 0) {
1453  ntimes = candidate->stauHits.size();
1454  beta = candidate->finalBetaFitResult.beta;
1455  chi2ndof = candidate->finalBetaFitResult.chi2PerDOF();
1456  } else if (candidate->betaFitResult.status != 0) {
1457  ntimes = candidate->hits.size();
1458  beta = candidate->betaFitResult.beta;
1459  chi2ndof = candidate->betaFitResult.chi2PerDOF();
1460  } else {
1461  ntimes = 1;
1462  beta = candidate->betaSeed.beta;
1463  chi2ndof = 0;
1464  }
1465  if (candidate->combinedTrack) ATH_MSG_DEBUG("candidate has combined track");
1466  m_recoValidationTool->addMuonCandidate(indetTrackParticle, candidate->muonCandidate.get(), candidate->combinedTrack.get(),
1467  ntimes, beta, chi2ndof, stage);
1468  }
1469  }

◆ addTag()

void MuonCombined::MuonStauRecoTool::addTag ( const InDetCandidate inDetCandidate,
MuonStauRecoTool::Candidate candidate,
InDetCandidateToTagMap tagMap,
TrackCollection combTracks,
Trk::SegmentCollection segments 
) const
private

create final tag object and add it to the inDetCandidate

Definition at line 695 of file MuonStauRecoTool.cxx.

699  {
700  // get combined track and the segments
701  combTracks->push_back(candidate.combinedTrack.release());
702  ElementLink<TrackCollection> comblink(*combTracks, combTracks->size() - 1);
703  std::vector<ElementLink<Trk::SegmentCollection>> segmentLinks;
704  for (const auto& layer : candidate.allLayers) {
705  for (const auto& segment : layer.segments) {
706  segments->push_back(segment->clone());
707  ElementLink<Trk::SegmentCollection> segLink(*segments, segments->size() - 1);
708  segmentLinks.push_back(segLink);
709  }
710  }
711 
712  // create tag
714 
715  // add additional info
716  tag->setMuBeta(candidate.betaFitResult.beta);
717 
718  // add StauExtras
719  std::unique_ptr<MuGirlNS::StauExtras> stauExtras = std::make_unique<MuGirlNS::StauExtras>();
720  stauExtras->betaAll = candidate.betaFitResult.beta;
721  stauExtras->betaAllt = candidate.finalBetaFitResult.beta;
722  stauExtras->hits = candidate.stauHits;
723  // TODO: ALEXIS ADD FLAG
725  stauExtras->extraMDTHitInfo = candidate.stauMDTHitExtras;
726  }
727 
728  tag->setStauExtras(std::move(stauExtras));
729 
730  // print results afer refineCandidate
731  if (m_doSummary || msgLvl(MSG::DEBUG)) {
732  msg(MSG::INFO) << " Summary::addTag ";
733  msg(MSG::INFO) << std::endl
734  << " candidate: beta fit result: beta " << candidate.betaFitResult.beta << " chi2/ndof "
735  << candidate.betaFitResult.chi2PerDOF() << " segments" << segmentLinks.size();
736  for (const auto& segment : segmentLinks) msg(MSG::INFO) << std::endl << " " << m_printer->print(**segment);
737  if (*comblink)
738  msg(MSG::INFO) << std::endl
739  << " track " << m_printer->print(**comblink) << std::endl
740  << m_printer->printStations(**comblink);
741  msg(MSG::INFO) << endmsg;
742  }
743 
744  // add tag to IndetCandidate
745  tagMap->addEntry(&indetCandidate, tag);
746  }

◆ associateHoughMaxima()

void MuonCombined::MuonStauRecoTool::associateHoughMaxima ( const EventContext &  ctx,
MuonStauRecoTool::LayerData layerData 
) const
private

associate Hough maxima to intersection

Definition at line 1300 of file MuonStauRecoTool.cxx.

1301  {
1302 
1303  if (m_houghDataPerSectorVecKey.empty()) return;
1304  // get intersection and layer identifiers
1305  const Muon::MuonSystemExtension::Intersection& intersection = layerData.intersection;
1306  int sector = intersection.layerSurface.sector;
1307  Muon::MuonStationIndex::DetectorRegionIndex regionIndex = intersection.layerSurface.regionIndex;
1308  Muon::MuonStationIndex::LayerIndex layerIndex = intersection.layerSurface.layerIndex;
1309 
1310  // get hough data
1312  if (!houghDataPerSectorVec.isValid()) {
1313  ATH_MSG_ERROR("Hough data per sector vector not found");
1314  return;
1315  }
1316 
1317  // sanity check
1318  if (static_cast<int>(houghDataPerSectorVec->vec.size()) <= sector - 1) {
1319  ATH_MSG_WARNING(" sector " << sector
1320  << " larger than the available sectors in the Hough tool: " << houghDataPerSectorVec->vec.size());
1321  return;
1322  }
1323 
1324  // get hough maxima in the layer
1325  unsigned int sectorLayerHash = Muon::MuonStationIndex::sectorLayerHash(regionIndex, layerIndex);
1326  const Muon::MuonLayerHoughTool::HoughDataPerSector& houghDataPerSector = houghDataPerSectorVec->vec[sector - 1];
1327 
1328  // sanity check
1329  if (houghDataPerSector.maxVec.size() <= sectorLayerHash) {
1330  ATH_MSG_WARNING(" houghDataPerSector.maxVec.size() smaller than hash " << houghDataPerSector.maxVec.size() << " hash "
1331  << sectorLayerHash);
1332  return;
1333  }
1334  const Muon::MuonLayerHoughTool::MaximumVec& maxVec = houghDataPerSector.maxVec[sectorLayerHash];
1335  if (maxVec.empty()) return;
1336 
1337  // get local coordinates in the layer frame
1338  bool barrelLike = intersection.layerSurface.regionIndex == Muon::MuonStationIndex::Barrel;
1339 
1340  // in the endcaps take the r in the sector frame from the local position of the extrapolation
1341  float phi = intersection.trackParameters->position().phi();
1342  float r = barrelLike ? m_muonSectorMapping.transformRToSector(intersection.trackParameters->position().perp(), phi,
1343  intersection.layerSurface.sector, true)
1344  : intersection.trackParameters->parameters()[Trk::locX];
1345 
1346  float z = intersection.trackParameters->position().z();
1347  float errx = intersection.trackParameters->covariance() ?
1348  Amg::error(*intersection.trackParameters->covariance(), Trk::locX) : 0.;
1349  float x = barrelLike ? z : r;
1350  float y = barrelLike ? r : z;
1351  float theta = std::atan2(y, x);
1352 
1353  // get phi hits
1354  const Muon::MuonLayerHoughTool::PhiMaximumVec& phiMaxVec = houghDataPerSector.phiMaxVec[regionIndex];
1355  ATH_MSG_DEBUG(" Got Phi Hough maxima " << phiMaxVec.size() << " phi " << phi);
1356 
1357  // lambda to handle calibration and selection of clusters
1358  auto handleCluster = [intersection, this](const Muon::MuonCluster& prd,
1359  std::vector<std::shared_ptr<const Muon::MuonClusterOnTrack>>& clusters) {
1360  std::unique_ptr<const Muon::MuonClusterOnTrack> cluster{m_muonPRDSelectionTool->calibrateAndSelect(intersection, prd)};
1361  if (cluster) clusters.push_back(std::move(cluster));
1362  };
1363 
1364  // loop over maxima and associate phi hits with the extrapolation, should optimize this but calculating the residual with the phi
1365  // maximum
1366  std::vector<std::shared_ptr<const Muon::MuonClusterOnTrack>> phiClusterOnTracks;
1367  Muon::MuonLayerHoughTool::PhiMaximumVec::const_iterator pit = phiMaxVec.begin();
1368  Muon::MuonLayerHoughTool::PhiMaximumVec::const_iterator pit_end = phiMaxVec.end();
1369  for (; pit != pit_end; ++pit) {
1370  const MuonHough::MuonPhiLayerHough::Maximum& maximum = **pit;
1371  for (const std::shared_ptr<MuonHough::PhiHit>& hit : maximum.hits) {
1372  // treat the case that the hit is a composite TGC hit
1373  if (hit->tgc) {
1374  Identifier id = hit->tgc->phiCluster.front()->identify();
1375  if (m_idHelperSvc->layerIndex(id) != intersection.layerSurface.layerIndex) continue;
1376  for (const Muon::MuonCluster* prd : hit->tgc->phiCluster) handleCluster(*prd, phiClusterOnTracks);
1377  } else if (hit->prd && !(hit->prd->type(Trk::PrepRawDataType::sTgcPrepData) ||
1379  const Identifier id = hit->prd->identify();
1380  if (m_idHelperSvc->layerIndex(id) != intersection.layerSurface.layerIndex) continue;
1381  handleCluster(static_cast<const Muon::MuonCluster&>(*hit->prd), phiClusterOnTracks);
1382  }
1383  }
1384  }
1385 
1386  ATH_MSG_DEBUG(" associateHoughMaxima: " << printIntersectionToString(intersection) << " maxima " << maxVec.size() << " x,y=(" << x
1387  << "," << y << ") errorx " << errx << " "
1388  << " angle " << theta);
1389 
1390  // loop over maxima and associate them to the extrapolation
1391  for (const auto& mit : maxVec) {
1392  const MuonHough::MuonLayerHough::Maximum& maximum = *mit;
1393  if (std::find_if(maximum.hits.begin(),maximum.hits.end(),
1394  [](const std::shared_ptr<MuonHough::Hit>& hit){
1395  return hit->prd && (hit->prd->type(Trk::PrepRawDataType::sTgcPrepData) ||
1396  hit->prd->type(Trk::PrepRawDataType::MMPrepData));
1397  }) != maximum.hits.end()) continue;
1398  float residual = maximum.pos - x;
1399  float residualTheta = maximum.theta - theta;
1400  float refPos = (maximum.hough != nullptr) ? maximum.hough->m_descriptor.referencePosition : 0;
1401  float maxwidth = (maximum.binposmax - maximum.binposmin);
1402 
1403  if (maximum.hough){
1404  maxwidth *= maximum.hough->m_binsize;
1405  }
1406  const float pullUncert = std::sqrt(errx * errx + maxwidth * maxwidth / 12.);
1407  float pull = residual / (pullUncert > std::numeric_limits<float>::epsilon() ? pullUncert : 1.) ;
1408 
1409  ATH_MSG_DEBUG(" Hough maximum " << maximum.max << " position (" << refPos << "," << maximum.pos << ") residual " << residual
1410  << " pull " << pull << " angle " << maximum.theta << " residual " << residualTheta);
1411 
1412  // fill validation content
1413 
1414  // select maximum and add it to LayerData
1415  if (std::abs(pull) > 5) continue;
1416  layerData.maximumDataVec.emplace_back(std::make_shared<MaximumData>(intersection, &maximum, phiClusterOnTracks));
1417  }
1418  }

◆ calculateBeta()

float MuonCombined::MuonStauRecoTool::calculateBeta ( const float  time,
const float  dist 
) const
private

In cases of invalid times just return an phyisical value of 20 times the speed of light The subsequent checks remove the attempt by default then.

Definition at line 1437 of file MuonStauRecoTool.cxx.

1437  {
1438  return time != 0. ? dist * inverseSpeedOfLight / time : 20.;
1439  }

◆ calculateTof()

float MuonCombined::MuonStauRecoTool::calculateTof ( const float  beta,
const float  dist 
) const
private

Calcualte for zero betas.

Definition at line 1432 of file MuonStauRecoTool.cxx.

1432  {
1433  return std::abs(beta) > 0 ? dist * inverseSpeedOfLight / beta : 1.e12;
1434  }

◆ combineCandidates()

bool MuonCombined::MuonStauRecoTool::combineCandidates ( const EventContext &  ctx,
const xAOD::TrackParticle indetTrackParticle,
MuonStauRecoTool::CandidateVec candidates 
) const
private

combine reconstruction

Definition at line 800 of file MuonStauRecoTool.cxx.

801  {
802  // keep track of candidates that have a successfull fit
803  CandidateVec combinedCandidates;
804 
805  // loop over candidates and redo segments using beta estimate from candidate
806  ATH_MSG_DEBUG("Combining candidates " << candidates.size());
807  for (auto& candidate : candidates) {
808  // find best matching track
809  std::pair<std::unique_ptr<const Muon::MuonCandidate>, std::unique_ptr<Trk::Track>> result =
810  m_insideOutRecoTool->findBestCandidate(ctx, indetTrackParticle, candidate->allLayers);
811 
812  if (result.first && result.second) {
813  ATH_MSG_DEBUG(" combined track found " << std::endl
814  << m_printer->print(*result.second) << std::endl
815  << m_printer->printStations(*result.second));
816  // add segments and track pointer to the candidate
817  candidate->muonCandidate = std::move(result.first);
818  candidate->combinedTrack = std::move(result.second);
819 
820  // extract times form track
821  extractTimeMeasurementsFromTrack(ctx, *candidate);
822  combinedCandidates.push_back(candidate);
823  if (!m_recoValidationTool.empty()) m_recoValidationTool->addTimeMeasurements(indetTrackParticle, candidate->stauHits);
824  }
825  }
826 
827  // remove all candidates that were not combined
828  candidates = combinedCandidates;
829 
830  // print results afer combineCandidate
831  if (m_doSummary || msgLvl(MSG::DEBUG)) {
832  msg(MSG::INFO) << " Summary::combineCandidates ";
833  if (candidates.empty())
834  msg(MSG::INFO) << " No candidated found ";
835  else
836  msg(MSG::INFO) << " candidates " << candidates.size();
837 
838  for (const auto& candidate : candidates) {
839  msg(MSG::INFO) << std::endl
840  << " candidate: beta fit result: " << candidate->betaFitResult.beta << " chi2/ndof "
841  << candidate->betaFitResult.chi2PerDOF();
842  if (candidate->finalBetaFitResult.status != 0)
843  msg(MSG::INFO) << " MDTT beta fit result: " << candidate->finalBetaFitResult.beta << " chi2/ndof "
844  << candidate->finalBetaFitResult.chi2PerDOF();
845  msg(MSG::INFO) << " layers with segments" << candidate->allLayers.size() << std::endl
846  << " track " << m_printer->print(*candidate->combinedTrack) << std::endl
847  << m_printer->printStations(*candidate->combinedTrack);
848  }
849  msg(MSG::INFO) << endmsg;
850  }
851 
852  return !candidates.empty();
853  }

◆ createCandidates()

bool MuonCombined::MuonStauRecoTool::createCandidates ( const AssociatedData associatedData,
CandidateVec candidates 
) const
private

create candidates from the beta seeds

Definition at line 855 of file MuonStauRecoTool.cxx.

856  {
857  // loop over layers and select seed maxima
858  MaximumDataVec seedMaximumDataVec;
859  LayerDataVec::const_iterator it = associatedData.layerData.begin();
860  LayerDataVec::const_iterator it_end = associatedData.layerData.end();
861  for (; it != it_end; ++it) {
862  // loop over maximumDataVec
863  for (const auto& maximumData : it->maximumDataVec) {
864  // add all maximumData that have a time measurement
865  if (!maximumData->betaSeeds.empty()) seedMaximumDataVec.push_back(maximumData);
866  }
867  }
868  ATH_MSG_DEBUG("Creating candidates from seeds " << seedMaximumDataVec.size());
869 
870  if (seedMaximumDataVec.empty()) {
871  if (m_doSummary || msgLvl(MSG::DEBUG)) msg(MSG::INFO) << " Summary::createCandidates, no seeds found " << endmsg;
872  return false;
873  }
874 
875  // sorting lambda for MaximumData seeds
876  auto SortMaximumDataVec = [](const std::shared_ptr<MaximumData>& max1, const std::shared_ptr<MaximumData>& max2) {
877  return max1->maximum->max < max2->maximum->max;
878  };
879  std::stable_sort(seedMaximumDataVec.begin(), seedMaximumDataVec.end(), SortMaximumDataVec);
880 
881  // loop over seeds and create candidates
883  std::set<const MaximumData*> usedMaximumData;
884  MaximumDataVec::iterator sit = seedMaximumDataVec.begin();
885  MaximumDataVec::iterator sit_end = seedMaximumDataVec.end();
886  for (; sit != sit_end; ++sit) {
887  // only use once
888  if (usedMaximumData.count(sit->get())) continue;
889  usedMaximumData.insert(sit->get());
890 
891  // create new candidates from the beta seeds of the maximum
892  CandidateVec newCandidates;
893  for (const auto& betaSeed : (*sit)->betaSeeds) { newCandidates.push_back(std::make_shared<Candidate>(betaSeed)); }
894  // extend the candidates
895  extendCandidates(newCandidates, usedMaximumData, associatedData.layerData.begin(), associatedData.layerData.end());
896 
897  // loop over the candidates and fit them
898  for (auto& newCandidate : newCandidates) {
899  // fit data
900  newCandidate->betaFitResult = fitter.fitWithOutlierLogic(newCandidate->hits);
901  ATH_MSG_DEBUG(" New candidate: time measurements "
902  << newCandidate->hits.size() << " status " << newCandidate->betaFitResult.status << " beta "
903  << newCandidate->betaFitResult.beta << " chi2/ndof " << newCandidate->betaFitResult.chi2PerDOF());
904  // if the fit was successfull add the candidate to the candidate vector
905  if (newCandidate->betaFitResult.status != 0) {
906  newCandidate->combinedTrack = nullptr; // no track exists at this stage
907  candidates.push_back(newCandidate);
908  }
909  }
910  }
911 
912  // print results afer createCandidate
913  if (m_doSummary || msgLvl(MSG::DEBUG)) {
914  msg(MSG::INFO) << " Summary::createCandidates ";
915  if (candidates.empty())
916  msg(MSG::INFO) << " No candidated found ";
917  else
918  msg(MSG::INFO) << " candidates " << candidates.size();
919 
920  for (const auto& candidate : candidates) {
921  msg(MSG::INFO) << std::endl
922  << " candidate: beta seed " << candidate->betaSeed.beta << " beta fit result: beta "
923  << candidate->betaFitResult.beta << " chi2/ndof " << candidate->betaFitResult.chi2PerDOF() << " layers "
924  << candidate->layerDataVec.size();
925  for (const auto& layerData : candidate->layerDataVec)
926  msg(MSG::INFO) << std::endl
927  << " " << printIntersectionToString(layerData.intersection) << " maximumDataVec "
928  << layerData.maximumDataVec.size();
929  }
930  msg(MSG::INFO) << endmsg;
931  }
932 
933  return !candidates.empty();
934  }

◆ createRpcTimeMeasurementsFromClusters()

void MuonCombined::MuonStauRecoTool::createRpcTimeMeasurementsFromClusters ( const Muon::MuonSystemExtension::Intersection intersection,
const std::vector< Muon::RpcClusterObj > &  clusterObjects,
MuonStauRecoTool::RpcTimeMeasurementVec rpcTimeMeasurements 
) const
private

create Rpc hit timing for a set of clusters

Definition at line 1259 of file MuonStauRecoTool.cxx.

1261  {
1262  // loop over the clusters
1263  for (const auto& cluster : clusterObjects) {
1264  if (cluster.hitList.empty() || !cluster.hitList.front()) {
1265  ATH_MSG_WARNING("Cluster without hits: " << cluster.hitList.size());
1266  continue;
1267  }
1268  ATH_MSG_DEBUG(" new cluster: " << m_idHelperSvc->toString(cluster.hitList.front()->identify()) << " size "
1269  << cluster.hitList.size());
1270 
1271  // create the ROTs
1272  std::vector<const Muon::MuonClusterOnTrack*> clusters;
1273  for (const auto* rpc : cluster.hitList) {
1274  const Muon::MuonClusterOnTrack* rot(m_muonPRDSelectionTool->calibrateAndSelect(intersection, *rpc));
1275  if (rot) {
1276  clusters.push_back(rot);
1277  ATH_MSG_DEBUG(" strip " << m_idHelperSvc->toString(rot->identify()) << " time "
1278  << static_cast<const Muon::RpcClusterOnTrack*>(rot)->time());
1279  }
1280  }
1281  // get the timing result for the cluster
1283  if (result.valid) {
1284  // add the result
1285  RpcTimeMeasurement rpcTimeMeasurement;
1286  rpcTimeMeasurement.time = result.time;
1287  rpcTimeMeasurement.error = result.error;
1288  for (const auto* cl : clusters) {
1289  const Muon::RpcClusterOnTrack* rcl = dynamic_cast<const Muon::RpcClusterOnTrack*>(cl);
1290  if (rcl) rpcTimeMeasurement.rpcClusters.push_back(std::shared_ptr<const Muon::RpcClusterOnTrack>(rcl));
1291  }
1292  rpcTimeMeasurements.push_back(rpcTimeMeasurement);
1293  } else {
1294  // if no time measurement was created we need to clean up the memory
1295  for (const auto* cl : clusters) delete cl;
1296  }
1297  }
1298  }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extend()

void MuonCombined::MuonStauRecoTool::extend ( const InDetCandidateCollection inDetCandidates,
InDetCandidateToTagMap tagMap,
TrackCollection combTracks,
TrackCollection meTracks,
Trk::SegmentCollection segments,
const EventContext &  ctx 
) const
overridevirtual

IMuonCombinedInDetExtensionTool interface: extend ID candidate.

Implements MuonCombined::IMuonCombinedInDetExtensionTool.

Definition at line 82 of file MuonStauRecoTool.cxx.

84  {
85  ATH_MSG_DEBUG(" extending " << inDetCandidates.size());
86 
87  if (meTracks) ATH_MSG_DEBUG("Not currently creating ME tracks for staus");
88  for (const InDetCandidate* it : inDetCandidates) { handleCandidate(ctx, *it, tagMap, combTracks, segments); }
89  }

◆ extendCandidates()

void MuonCombined::MuonStauRecoTool::extendCandidates ( CandidateVec candidates,
std::set< const MaximumData * > &  usedMaximumData,
LayerDataVec::const_iterator  it,
LayerDataVec::const_iterator  it_end 
) const
private

extend a CandidateVec with the next LayerData

Definition at line 936 of file MuonStauRecoTool.cxx.

938  {
939  // get current layer and move forward the
940  const LayerData& layerData = *it;
941  ATH_MSG_DEBUG(" extendCandidates: " << printIntersectionToString(layerData.intersection) << " maxima "
942  << layerData.maximumDataVec.size());
943 
944  CandidateVec newCandidates; // store new candidates
945  for (auto& candidate : candidates) {
946  // keep track of how often we extend this candidate
947  unsigned int nextensions = 0;
948 
949  // copy content of the candidate for reference
950  LayerDataVec layerDataVec = candidate->layerDataVec;
951  Muon::TimePointBetaFitter::HitVec hits = candidate->hits;
952 
953  // loop over maximumDataVec of the layer
954  for (const auto& maximumData : layerData.maximumDataVec) {
955  // create new hit vector
956  Muon::TimePointBetaFitter::HitVec newhits; // create new hits vector and add the ones from the maximum
957  if (extractTimeHits(*maximumData, newhits, &candidate->betaSeed)) {
958  // decide which candidate to update, create a new candidate if a maximum was already selected in the layer
959  Candidate* theCandidate = nullptr;
960  if (nextensions == 0)
961  theCandidate = candidate.get();
962  else {
963  std::shared_ptr<Candidate> newCandidate = std::make_unique<Candidate>(candidate->betaSeed);
964  newCandidate->layerDataVec = layerDataVec;
965  newCandidate->hits = hits;
966  newCandidates.push_back(newCandidate);
967  theCandidate = newCandidate.get();
968  }
969 
970  // create a LayerData object to add to the selected candidate
971  LayerData newLayerData(layerData.intersection);
972  newLayerData.maximumDataVec.push_back(maximumData);
973 
974  // update the candidate
975  theCandidate->hits.insert(theCandidate->hits.end(), newhits.begin(), newhits.end());
976  theCandidate->layerDataVec.push_back(newLayerData);
977  usedMaximumData.insert(maximumData.get());
978 
979  ATH_MSG_DEBUG(" adding maximumData: candidate hits " << theCandidate->hits.size() << " LayerDataVec "
980  << theCandidate->layerDataVec.size() << " nextensions "
981  << nextensions);
982 
983  ++nextensions;
984  }
985  }
986  }
987  ATH_MSG_DEBUG(" extendCandidates done, new candidates " << newCandidates.size());
988 
989  // add the new candidates
990  candidates.insert(candidates.end(), newCandidates.begin(), newCandidates.end());
991 
992  // move to the next layer, if we haven't reached the last layer, continue recursion
993  ++it;
994  if (it != it_end) extendCandidates(candidates, usedMaximumData, it, it_end);
995  }

◆ extendWithPRDs()

void MuonCombined::MuonStauRecoTool::extendWithPRDs ( const InDetCandidateCollection inDetCandidates,
InDetCandidateToTagMap tagMap,
IMuonCombinedInDetExtensionTool::MuonPrdData  prdData,
TrackCollection combTracks,
TrackCollection meTracks,
Trk::SegmentCollection segments,
const EventContext &  ctx 
) const
overridevirtual

Implements MuonCombined::IMuonCombinedInDetExtensionTool.

Definition at line 73 of file MuonStauRecoTool.cxx.

75  {
76  // Maybe we'll need this later, I wouldn't be surprised if the PRDs are retrieved somewhere down the chain
77  // For now it's just a placeholder though
78  if (!prdData.mdtPrds) ATH_MSG_DEBUG("empty PRDs passed");
79  extend(inDetCandidates, tagMap, combTracks, meTracks, segments, ctx);
80  }

◆ extractRpcTimingFromMaximum()

void MuonCombined::MuonStauRecoTool::extractRpcTimingFromMaximum ( const Muon::MuonSystemExtension::Intersection intersection,
MaximumData maximumData 
) const
private

extract RPC hit timing

Definition at line 1213 of file MuonStauRecoTool.cxx.

1214  {
1215  // extract trigger hits per chamber
1216  const MuonHough::MuonLayerHough::Maximum& maximum = *maximumData.maximum;
1217  std::map<Identifier, std::vector<const Muon::RpcPrepData*>> rpcPrdsPerChamber;
1218 
1219  // lambda to add the PRD
1220  auto addRpc = [&rpcPrdsPerChamber, this](const Trk::PrepRawData* prd) {
1221  const Muon::RpcPrepData* rpcPrd = dynamic_cast<const Muon::RpcPrepData*>(prd);
1222  if (rpcPrd) {
1223  Identifier chamberId = m_idHelperSvc->chamberId(rpcPrd->identify());
1224  rpcPrdsPerChamber[chamberId].push_back(rpcPrd);
1225  }
1226  };
1227 
1228  // extract eta hits
1229  MuonHough::HitVec::const_iterator hit = maximum.hits.begin();
1230  MuonHough::HitVec::const_iterator hit_end = maximum.hits.end();
1231  for (; hit != hit_end; ++hit) {
1232  if ((*hit)->tgc || !(*hit)->prd || !m_idHelperSvc->isRpc((*hit)->prd->identify())) continue;
1233  addRpc((*hit)->prd);
1234  }
1235 
1236  // extract phi hits
1237  for (const auto& rot : maximumData.phiClusterOnTracks) { addRpc(rot->prepRawData()); }
1238 
1239  // exit if no hits are found
1240  if (rpcPrdsPerChamber.empty()) return;
1241 
1242  std::map<Identifier, std::vector<const Muon::RpcPrepData*>>::iterator chit = rpcPrdsPerChamber.begin();
1243  std::map<Identifier, std::vector<const Muon::RpcPrepData*>>::iterator chit_end = rpcPrdsPerChamber.end();
1244  for (; chit != chit_end; ++chit) {
1245  // cluster hits
1246  Muon::RpcHitClusteringObj clustering(&m_idHelperSvc->rpcIdHelper());
1247  if (!clustering.cluster(chit->second)) {
1248  ATH_MSG_WARNING("Clustering failed");
1249  return;
1250  }
1251 
1252  ATH_MSG_DEBUG(" " << m_idHelperSvc->toStringChamber(chit->first) << " clustered RPCs: " << chit->second.size()
1253  << " eta clusters " << clustering.clustersEta.size() << " phi clusters " << clustering.clustersPhi.size());
1254  createRpcTimeMeasurementsFromClusters(intersection, clustering.clustersEta, maximumData.rpcTimeMeasurements);
1255  createRpcTimeMeasurementsFromClusters(intersection, clustering.clustersPhi, maximumData.rpcTimeMeasurements);
1256  }
1257  }

◆ extractTimeHits()

bool MuonCombined::MuonStauRecoTool::extractTimeHits ( const MaximumData maximumData,
Muon::TimePointBetaFitter::HitVec hits,
const BetaSeed seed = 0 
) const
private

extract hits for the beta fit, returns true if hits were added

Definition at line 1054 of file MuonStauRecoTool.cxx.

1055  {
1056  unsigned int nstart = hits.size();
1057 
1058  auto addHit = [&](float distance, float time, float error, float cut) {
1059  if (seed) {
1060  float beta = calculateBeta(time + calculateTof(1, distance), distance);
1061  ATH_MSG_VERBOSE(" matching hit: distance " << distance << " time " << time << " beta" << beta << " diff "
1062  << std::abs(beta - seed->beta));
1063  if (std::abs(beta - seed->beta) > cut) return;
1064  } else {
1065  ATH_MSG_VERBOSE(" addHit: distance " << distance << " time " << time << " beta"
1066  << calculateBeta(time + calculateTof(1, distance), distance));
1067  }
1068  if (error != 0.) hits.emplace_back(distance, time, error);
1069  };
1070 
1071  // add rpc measurements
1072  for (const auto& rpc : maximumData.rpcTimeMeasurements) {
1073  float time = rpc.time;
1074  float error = rpc.error;
1075  rpcTimeCalibration(rpc.rpcClusters.front()->identify(), time, error);
1076  addHit(rpc.rpcClusters.front()->globalPosition().mag(), time, error, m_rpcBetaAssociationCut);
1077  }
1078 
1079  // add segment t0 fits
1080  // if not seeded take all segments
1081  if (!seed) {
1082  for (const auto& seg : maximumData.t0fittedSegments) {
1083  if (!seg->hasFittedT0()) continue;
1084  float time = seg->time();
1085  float error = seg->errorTime();
1086  Identifier id = m_edmHelperSvc->chamberId(*seg);
1087  segmentTimeCalibration(id, time, error);
1088  addHit(seg->globalPosition().mag(), time, error, m_segmentBetaAssociationCut);
1089  }
1090  } else {
1091  // pick the best match
1092  const Muon::MuonSegment* bestSegment = nullptr;
1093  float smallestResidual = FLT_MAX;
1094  for (const auto& seg : maximumData.t0fittedSegments) {
1095  if (!seg->hasFittedT0()) continue;
1096  float distance = seg->globalPosition().mag();
1097  float time = seg->time();
1098  float beta = calculateBeta(time + calculateTof(1, distance), distance);
1099  float residual = std::abs(beta - seed->beta);
1100 
1101  if (residual < smallestResidual) {
1102  smallestResidual = residual;
1103  bestSegment = seg.get();
1104  }
1105  }
1106  if (bestSegment) {
1107  addHit(bestSegment->globalPosition().mag(), bestSegment->time(), bestSegment->errorTime(), m_segmentBetaAssociationCut);
1108  ATH_MSG_VERBOSE(" adding best segment: " << m_printer->print(*bestSegment));
1109  }
1110  }
1111  ATH_MSG_VERBOSE(" extractTimeHits done: added " << hits.size() - nstart << " hits");
1112 
1113  return nstart != hits.size();
1114  }

◆ extractTimeMeasurements()

bool MuonCombined::MuonStauRecoTool::extractTimeMeasurements ( const EventContext &  ctx,
const Muon::MuonSystemExtension muonSystemExtension,
AssociatedData associatedData 
) const
private

associate Hough maxima and associate time measurements

Definition at line 997 of file MuonStauRecoTool.cxx.

999  {
1000  // get layer intersections
1001  // find RPC time measurements and segments to seed the beta fit using t0 fitting
1002  for (const Muon::MuonSystemExtension::Intersection& iSect: muonSystemExtension.layerIntersections()) {
1003  // create layer data object and add maxima
1004  LayerData layerData{iSect};
1005  associateHoughMaxima(ctx, layerData);
1006 
1007  // skip layer of not maxima are associated
1008  if (layerData.maximumDataVec.empty()) continue;
1009 
1010  associatedData.layerData.push_back(layerData);
1011 
1012  // loop over associated maxima
1013  for (auto& maximum : layerData.maximumDataVec) {
1014  // extract RPC timing
1015  extractRpcTimingFromMaximum(iSect, *maximum);
1016 
1017  // find segments for intersection
1018  std::vector<std::shared_ptr<const Muon::MuonSegment>> t0fittedSegments;
1019  findSegments(iSect, *maximum, t0fittedSegments, m_muonPRDSelectionTool, m_segmentMakerT0Fit);
1020  if (t0fittedSegments.empty()) continue;
1021 
1022  // match segments to intersection, store the ones that match
1023  m_segmentMatchingTool->select(ctx, iSect, t0fittedSegments, maximum->t0fittedSegments);
1024 
1025  // get beta seeds for Maximum
1026  getBetaSeeds(*maximum);
1027  }
1028  }
1029 
1030  // print results afer extractTimeMeasurements
1031  if (m_doSummary || msgLvl(MSG::DEBUG)) {
1032  msg(MSG::INFO) << " Summary::extractTimeMeasurements ";
1033  if (associatedData.layerData.empty())
1034  msg(MSG::INFO) << " No layers associated ";
1035  else
1036  msg(MSG::INFO) << " Associated layers " << associatedData.layerData.size();
1037 
1038  for (const auto& layerData : associatedData.layerData) {
1039  unsigned int nmaxWithBeta = 0;
1040  for (const auto& maximumData : layerData.maximumDataVec) {
1041  if (!maximumData->betaSeeds.empty()) ++nmaxWithBeta;
1042  }
1043  msg(MSG::INFO) << std::endl
1044  << " layer " << printIntersectionToString(layerData.intersection) << " associated maxima "
1045  << layerData.maximumDataVec.size() << " maxima with beta seeds " << nmaxWithBeta;
1046  }
1047  msg(MSG::INFO) << endmsg;
1048  }
1049 
1050  // return false if no layers were associated
1051  return !associatedData.layerData.empty();
1052  }

◆ extractTimeMeasurementsFromTrack()

void MuonCombined::MuonStauRecoTool::extractTimeMeasurementsFromTrack ( const EventContext &  ctx,
Candidate candidate 
) const
private

extract time measurements from the track associated with the candidate

Definition at line 262 of file MuonStauRecoTool.cxx.

263  {
264 
266  if (!mdtCalibConstants.isValid()) {
267  ATH_MSG_FATAL("Failed to retrieve calibration constants "<<m_calibDbKey.fullKey());
268  throw std::runtime_error("Failed to retrieve calibration constants");
269  }
270  ATH_MSG_VERBOSE("extractTimeMeasurementsFromTrack for candidate: beta seed " << candidate.betaSeed.beta);
271  Trk::Track* combinedTrack = candidate.combinedTrack.get();
272  if (!combinedTrack) return;
273 
274  // select around seed
275  float betaSeed = candidate.betaFitResult.beta;
276 
277  // fitter + hits
280 
281  // loop over track and calculate residuals
282  const Trk::TrackStates* states = combinedTrack->trackStateOnSurfaces();
283  if (!states) {
284  ATH_MSG_WARNING(" track without states, cannot extractTimeMeasurementsFromTrack ");
285  return;
286  }
287 
288  ATH_MSG_VERBOSE("Track : " << (*combinedTrack));
289 
290  // store RPC prds for clustering
291  typedef std::vector<const Muon::MuonClusterOnTrack*> RpcClVec;
292  using RpcClPerChMap = std::map<Identifier, std::tuple<const Trk::TrackParameters*, RpcClVec, RpcClVec>>;
293  RpcClPerChMap rpcPrdsPerChamber;
294 
295  using MdtTubeData = std::pair<const Trk::TrackParameters*, const Muon::MdtDriftCircleOnTrack*>;
296  using MdtTubeDataVec = std::vector<MdtTubeData>;
297  using MdtChamberLayerData = std::map<int, MdtTubeDataVec>;
298  MdtChamberLayerData mdtDataPerChamberLayer;
299 
300  // loop over TSOSs
302  Trk::TrackStates::const_iterator tsit_end = states->end();
303  for (; tsit != tsit_end; ++tsit) {
304  const Trk::TrackParameters* pars = (*tsit)->trackParameters();
305  if (!pars) continue;
306 
307  // check whether state is a measurement
308  const Trk::MeasurementBase* meas = (*tsit)->measurementOnTrack();
309  if (!meas || (*tsit)->type(Trk::TrackStateOnSurface::Outlier)) continue;
310 
311  // get Identifier and skip pseudo measurements, ID hits and all but MDT/RPC hits
312  Identifier id = m_edmHelperSvc->getIdentifier(*meas);
313  if (!id.is_valid() || !m_idHelperSvc->isMuon(id)) continue;
314 
315  // extract time measurements for RPCs
316  if (m_idHelperSvc->isMdt(id)) {
317  // MDTs
318  const Muon::MdtDriftCircleOnTrack* mdt = dynamic_cast<const Muon::MdtDriftCircleOnTrack*>(meas);
319  if (!mdt) continue;
320 
321  if (m_segmentMDTT) {
322  int chIndexWithBIR = m_idHelperSvc->chamberIndex(mdt->identify());
323  if (chIndexWithBIR == Muon::MuonStationIndex::BIL) {
324  std::string stName = m_idHelperSvc->chamberNameString(id);
325  if (stName[2] == 'R') { chIndexWithBIR += 1000; }
326  }
327  mdtDataPerChamberLayer[chIndexWithBIR].push_back(std::make_pair(pars, mdt));
328  } else {
330  float distance = pars->position().mag();
331  float time = 0.;
332 
333  float ix = pars->position().x();
334  float iy = pars->position().y();
335  float iz = pars->position().z();
336  float ie = 0.;
337  float er = -1;
338  float sh = 0;
339  bool isEta = !m_idHelperSvc->measuresPhi(id);
340  float propTime = 0;
341  float tof = calculateTof(1, distance);
342 
343  // use inverted RT relation together with track prediction to get estimate of drift time
344  float driftTime = mdt->driftTime(); // we need to add beta seed as it was subtracted when calibrating the hits
345  float locR = pars->parameters()[Trk::locR];
346  float errR = pars->covariance() ? Amg::error(*pars->covariance(), Trk::locR) : 0.3;
347  auto data = mdtCalibConstants->getCalibData(id, msgStream());
348  const auto& rtRelation = data->rtRelation;
349  float drdt = rtRelation->rt()->driftVelocity(driftTime);
350  float rres = rtRelation->rtRes()->resolution(driftTime);
351  float tres = rres / drdt;
352  float TlocR = rtRelation->tr()->driftTime(std::abs(locR)).value_or(0.);
353  float trackTimeRes = errR / drdt;
354  float tofShiftFromBeta = calculateTof(betaSeed, distance) - tof;
355  er = std::sqrt(tres * tres + trackTimeRes * trackTimeRes);
356  mdtTimeCalibration(id, driftTime, er);
357  time = driftTime - TlocR + tofShiftFromBeta;
358  propTime = driftTime;
359  ie = trackTimeRes;
360  // try removal of hit from fit
361  if (!m_updator.empty()) {
362  std::unique_ptr<const Trk::TrackParameters> unbiasedPars(
363  m_updator->removeFromState(*pars, meas->localParameters(), meas->localCovariance()));
364  if (unbiasedPars) {
365  float locRu = unbiasedPars->parameters()[Trk::locR];
366  float TlocRu = rtRelation->tr()->driftTime(std::abs(locRu)).value_or(0.);
367  float errRu = unbiasedPars->covariance() ? Amg::error(*unbiasedPars->covariance(), Trk::locR) : 0.3;
368  float trackTimeResu = errRu / drdt;
369  sh = TlocR - TlocRu;
370  time = driftTime - TlocRu + tofShiftFromBeta;
371  er = std::sqrt(tres * tres + trackTimeResu * trackTimeResu);
372  ie = trackTimeResu;
373  ATH_MSG_VERBOSE(" Got unbiased parameters: r " << locR << " ur " << locRu << " err " << errR << " uerr "
374  << errRu << " terr " << trackTimeRes << " terru "
375  << trackTimeResu);
376  }
377  }
378 
379  ATH_MSG_VERBOSE(" MDT " << mdt->driftRadius() << " locR " << locR << " err " << errR << " drift time " << driftTime
380  << " TlocR " << TlocR << " diff " << driftTime - TlocR << " tofShift " << tofShiftFromBeta
381  << " time " << time << " err " << er << " intrinsic " << tres << " track " << trackTimeRes);
382 
383  float beta = calculateBeta(time + tof, distance);
384  ATH_MSG_VERBOSE(" adding " << m_idHelperSvc->toString(id) << " distance " << distance << " time " << time << " beta"
385  << beta << " diff " << std::abs(beta - betaSeed));
386  if (std::abs(beta - betaSeed) > m_mdttBetaAssociationCut) continue;
387 
388  hits.emplace_back(Muon::TimePointBetaFitter::Hit(distance, time, er));
389  candidate.stauHits.emplace_back(MuGirlNS::StauHit(tech, time + tof, ix, iy, iz, id, ie, er, sh, isEta, propTime));
390 
392  float iadc = mdt->prepRawData()->adc();
393  float irdrift = mdt->driftRadius();
394  candidate.stauMDTHitExtras.emplace_back(MuGirlNS::StauMDTHitExtra(iadc, irdrift));
395  }
396  }
397  } else if (m_idHelperSvc->isRpc(id)) {
398  // treat CompetingMuonClustersOnTrack differently than RpcClusterOnTrack
399  std::vector<const Muon::MuonClusterOnTrack*> clusters;
400  const Muon::CompetingMuonClustersOnTrack* crot = dynamic_cast<const Muon::CompetingMuonClustersOnTrack*>(meas);
401  if (crot) {
402  clusters = crot->containedROTs();
403  } else {
404  const Muon::RpcClusterOnTrack* rpc = dynamic_cast<const Muon::RpcClusterOnTrack*>(meas);
405  if (rpc) clusters.push_back(rpc);
406  }
407  Identifier chamberId = m_idHelperSvc->chamberId(id);
408  bool measuresPhi = m_idHelperSvc->measuresPhi(id);
409  auto pos = rpcPrdsPerChamber.find(chamberId);
410  if (pos == rpcPrdsPerChamber.end()) {
411  if (measuresPhi)
412  rpcPrdsPerChamber[chamberId] = std::make_tuple(pars, clusters, RpcClVec());
413  else
414  rpcPrdsPerChamber[chamberId] = std::make_tuple(pars, RpcClVec(), clusters);
415  } else {
416  RpcClVec& clVec = measuresPhi ? std::get<1>(pos->second) : std::get<2>(pos->second);
417  clVec.insert(clVec.end(), clusters.begin(), clusters.end());
418  }
419  } else if (m_idHelperSvc->isCsc(id)) {
420  const Muon::CscClusterOnTrack* csc = dynamic_cast<const Muon::CscClusterOnTrack*>(meas);
421 
423  float distance = pars->position().mag();
424  float time = csc->prepRawData()->time();
425 
426  float ix = pars->position().x();
427  float iy = pars->position().y();
428  float iz = pars->position().z();
429  float ie = 0.;
430  float er = -1;
431  float sh = 0;
432  bool isEta = !m_idHelperSvc->measuresPhi(id);
433  float propTime = 0;
434  float tof = calculateTof(1, distance);
435  candidate.stauHits.push_back(MuGirlNS::StauHit(tech, time + tof, ix, iy, iz, id, ie, er, sh, isEta, propTime));
436  }
437  }
438 
439  auto insertRpcs = [betaSeed, this](const Trk::TrackParameters& pars, const RpcClVec& clusters,
440  MuonStauRecoTool::Candidate& candidate, Muon::TimePointBetaFitter::HitVec& hits) {
441  if (clusters.empty()) return;
442 
443  std::vector<const Muon::MuonClusterOnTrack*> calibratedClusters;
444  for (const auto* cluster : clusters) {
445  const Muon::MuonClusterOnTrack* cl = m_muonPRDSelectionTool->calibrateAndSelect(pars, *cluster->prepRawData());
446  if (cl) calibratedClusters.push_back(cl);
447  }
448  if (calibratedClusters.empty()) return;
449 
450  Muon::IMuonHitTimingTool::TimingResult result = m_hitTimingTool->calculateTimingResult(calibratedClusters);
451  for (const auto* cl : calibratedClusters) delete cl;
452  if (!result.valid) return;
453 
454  Identifier id = clusters.front()->identify();
455 
457  float distance = pars.position().mag();
458  float time = result.time;
459  float ix = pars.position().x();
460  float iy = pars.position().y();
461  float iz = pars.position().z();
462  float ie = 0.;
463  float er = result.error;
464  rpcTimeCalibration(id, time, er);
465  float sh = 0;
466  bool isEta = !m_idHelperSvc->measuresPhi(id);
467  if (isEta) tech = MuGirlNS::RPCETA_STAU_HIT;
468  float propTime = 0;
469  float tof = calculateTof(1, distance);
470  float beta = calculateBeta(time + tof, distance);
471  ATH_MSG_VERBOSE(" adding " << m_idHelperSvc->toString(id) << " distance " << distance << " time " << time << " beta" << beta
472  << " diff " << std::abs(beta - betaSeed));
473 
474  if (std::abs(beta - betaSeed) > m_mdttBetaAssociationCut) return;
475 
476  hits.push_back(Muon::TimePointBetaFitter::Hit(distance, time, er));
477  candidate.stauHits.push_back(MuGirlNS::StauHit(tech, time + tof, ix, iy, iz, id, ie, er, sh, isEta, propTime));
478  };
479 
480  // get RPC timing per chamber
481  RpcClPerChMap::const_iterator chit = rpcPrdsPerChamber.begin();
482  RpcClPerChMap::const_iterator chit_end = rpcPrdsPerChamber.end();
483  ATH_MSG_VERBOSE("RPCs per chamber " << rpcPrdsPerChamber.size());
484 
485  for (; chit != chit_end; ++chit) {
486  const Trk::TrackParameters* pars = std::get<0>(chit->second);
487  const RpcClVec& phiClusters = std::get<1>(chit->second);
488  const RpcClVec& etaClusters = std::get<2>(chit->second);
489  insertRpcs(*pars, phiClusters, candidate, hits);
490  insertRpcs(*pars, etaClusters, candidate, hits);
491  }
492 
493  // get timing per MDT chamber, use segment error strategy (errors of the RT relation
495  Muon::MuonDriftCircleErrorStrategy calibrationStrategy(bits);
496  calibrationStrategy.setStrategy(Muon::MuonDriftCircleErrorStrategy::Moore);
497  calibrationStrategy.setParameter(Muon::MuonDriftCircleErrorStrategy::Segment, true);
498 
500  TrkDriftCircleMath::SegmentFinder segmentFinder;
501  segmentFinder.setMaxDropDepth(2);
502  segmentFinder.setChi2DropCut(5);
503  segmentFinder.setDeltaCut(3);
504 
505  MdtChamberLayerData::const_iterator mit = mdtDataPerChamberLayer.begin();
506  MdtChamberLayerData::const_iterator mit_end = mdtDataPerChamberLayer.end();
507  for (; mit != mit_end; ++mit) {
508  ATH_MSG_VERBOSE(" new station layer " << Muon::MuonStationIndex::chName((Muon::MuonStationIndex::ChIndex)(mit->first % 1000))
509  << " hits " << mit->second.size());
510  if (mit->second.size() < 4) continue;
511 
512  // get RE element for first hit
513  const MuonGM::MdtReadoutElement* detEl = mit->second.front().second->detectorElement();
514  const Trk::PlaneSurface* surf = dynamic_cast<const Trk::PlaneSurface*>(&detEl->surface());
515  if (!surf) {
516  ATH_MSG_WARNING("MdtReadoutElement should always have a PlaneSurface as reference surface");
517  continue;
518  }
519  Amg::Transform3D gToStation = detEl->GlobalToAmdbLRSTransform();
520 
521  // get TrackParameters and SL intersect the DetEl surface (above a few GeV SL intersection is accurate enough)
522  const Trk::TrackParameters& firstPars = *mit->second.front().first;
523  Trk::Intersection slIntersection = surf->straightLineIntersection(firstPars.position(), firstPars.momentum(), false, false);
524 
525  // calculate seed position and direction
526  Trk::LocalDirection seedLocDir;
527  surf->globalToLocalDirection(firstPars.momentum(), seedLocDir);
528  Amg::Vector3D seedLocPos = gToStation * slIntersection.position;
529  TrkDriftCircleMath::LocVec2D seedPos(seedLocPos.y(), seedLocPos.z());
530  TrkDriftCircleMath::Line seedLine(seedPos, seedLocDir.angleYZ());
532 
533  std::vector<std::pair<std::shared_ptr<const Muon::MdtDriftCircleOnTrack>, const Trk::TrackParameters*>> indexLookUp;
534  unsigned index = 0;
535  for (const auto& entry : mit->second) {
536  const Trk::TrackParameters& pars = *entry.first;
537  const Muon::MdtDriftCircleOnTrack& mdt = *entry.second;
538  Identifier id = mdt.identify();
539  // calibrate MDT
540  std::unique_ptr<const Muon::MdtDriftCircleOnTrack> calibratedMdt(
541  m_mdtCreatorStau->correct(*mdt.prepRawData(), pars, &calibrationStrategy, betaSeed));
542  if (!calibratedMdt) {
543  ATH_MSG_WARNING("Failed to recalibrate existing MDT on track " << m_idHelperSvc->toString(id));
544  continue;
545  }
546  ATH_MSG_VERBOSE(" recalibrated MDT " << m_idHelperSvc->toString(id) << " r " << calibratedMdt->driftRadius() << " "
547  << Amg::error(calibratedMdt->localCovariance(), Trk::locR) << " old r "
548  << mdt.driftRadius() << " " << Amg::error(mdt.localCovariance(), Trk::locR)
549  << " r_track " << pars.parameters()[Trk::locR] << " residual "
550  << std::abs(mdt.driftRadius()) - std::abs(pars.parameters()[Trk::locR]));
551 
552  // calculate tube position taking into account the second coordinate
553  Amg::Vector2D lp(0., pars.parameters()[Trk::locZ]);
554  Amg::Vector3D gpos;
555  mdt.associatedSurface().localToGlobal(lp, pars.momentum(), gpos);
556 
557  // calculate local AMDB position
558  Amg::Vector3D locPos = gToStation * gpos;
559  TrkDriftCircleMath::LocVec2D lpos(locPos.y(), locPos.z());
560 
561  double r = std::abs(calibratedMdt->driftRadius());
562  double dr = Amg::error(calibratedMdt->localCovariance(), Trk::locR);
563 
564  // create identifier
565  TrkDriftCircleMath::MdtId mdtid(m_idHelperSvc->mdtIdHelper().isBarrel(id), m_idHelperSvc->mdtIdHelper().multilayer(id) - 1,
566  m_idHelperSvc->mdtIdHelper().tubeLayer(id) - 1, m_idHelperSvc->mdtIdHelper().tube(id) - 1);
567 
568  // create new DriftCircle
570  TrkDriftCircleMath::DCOnTrack dcOnTrack(dc, 1., 1.);
571 
572  dcs.push_back(dcOnTrack);
573  indexLookUp.emplace_back(std::move(calibratedMdt), &pars);
574  ++index;
575  }
576 
577  // now loop over the hits and fit the segment taking out each of the hits individually
578  for (unsigned int i = 0; i < dcs.size(); ++i) {
580  selection[i] = 1;
582  if (!mdtFitter.fit(result, seedLine, dcs, selection)) {
583  ATH_MSG_DEBUG("Fit failed ");
584  continue;
585  }
587  segment.hitsOnTrack(dcs.size());
588  unsigned int ndofFit = segment.ndof();
589  if (ndofFit < 1) continue;
590  double chi2NdofSegmentFit = segment.chi2() / ndofFit;
591  bool hasDropHit = false;
592  unsigned int dropDepth = 0;
593  if (!segmentFinder.dropHits(segment, hasDropHit, dropDepth)) {
594  ATH_MSG_DEBUG("DropHits failed, fit chi2/ndof " << chi2NdofSegmentFit);
595  if (msgLvl(MSG::VERBOSE)) {
596  segmentFinder.debugLevel(20);
597  segment = result;
598  segmentFinder.dropHits(segment, hasDropHit, dropDepth);
599  segmentFinder.debugLevel(0);
600  }
601  continue;
602  }
603  if (i >= segment.dcs().size()) continue;
605  const TrkDriftCircleMath::DCOnTrack& dc = segment.dcs()[i];
606  double res = dc.residual();
607  double err = std::sqrt(dc.dr() * dc.dr() + dc.errorTrack() * dc.errorTrack());
608  double pull = res / err;
609  double rline = toLine.toLineY(dc.position());
610  int index = dc.index();
611  if (index < 0 || index >= (int)indexLookUp.size()) {
612  ATH_MSG_WARNING(" lookup of TrackParameters and MdtDriftCircleOnTrack failed " << index << " range: 0 - "
613  << indexLookUp.size() - 1);
614  continue;
615  }
616  const Trk::TrackParameters* pars = indexLookUp[dc.index()].second;
617  const Muon::MdtDriftCircleOnTrack* mdt = indexLookUp[dc.index()].first.get();
618  Identifier id = mdt->identify();
619 
620  // calibrate MDT with nominal timing
621  std::shared_ptr<const Muon::MdtDriftCircleOnTrack> calibratedMdt(
622  m_mdtCreator->correct(*mdt->prepRawData(), *pars, &calibrationStrategy, betaSeed));
623  if (!calibratedMdt.get()) {
624  ATH_MSG_WARNING("Failed to recalibrate existing MDT on track " << m_idHelperSvc->toString(id));
625  continue;
626  }
627  float distance = pars->position().mag();
628  float time = 0.;
629 
630  float ix = pars->position().x();
631  float iy = pars->position().y();
632  float iz = pars->position().z();
633  float ie = 0.;
634  float er = -1;
635  float sh = 0;
636  bool isEta = !m_idHelperSvc->measuresPhi(id);
637  float propTime = 0;
638  float tof = calculateTof(1, distance);
639 
640  float iadc = mdt->prepRawData()->adc();
641  float irdrift = mdt->driftRadius();
642 
643  // use inverted RT relation together with track prediction to get estimate of drift time
644  float driftTime = calibratedMdt->driftTime(); // we need to add beta seed as it was subtracted when calibrating the hits
645  float locR = rline;
646  float errR = dc.errorTrack();
647  auto data = mdtCalibConstants->getCalibData(id, msgStream());
648  const auto& rtRelation = data->rtRelation;
649  float drdt = rtRelation->rt()->driftVelocity(driftTime);
650  float rres = rtRelation->rtRes()->resolution(driftTime);
651  float tres = rres / drdt;
652  float TlocR = rtRelation->tr()->driftTime(std::abs(locR)).value_or(0.);
653  float trackTimeRes = errR / drdt;
654  float tofShiftFromBeta = 0.; // muonBetaCalculationUtils.calculateTof(betaSeed,distance)-tof;
655  er = std::sqrt(tres * tres + trackTimeRes * trackTimeRes);
656  mdtTimeCalibration(id, driftTime, er);
657  time = driftTime - TlocR + tofShiftFromBeta;
658  propTime = driftTime;
659  ie = trackTimeRes;
660 
661  const float beta = calculateBeta(time + tof, distance);
662  bool isSelected = std::abs(beta - betaSeed) < m_mdttBetaAssociationCut;
663 
664  if (msgLvl(MSG::DEBUG)) {
665  msg(MSG::DEBUG) << m_idHelperSvc->toString(id) << std::setprecision(2) << " segment: after fit " << std::setw(5)
666  << chi2NdofSegmentFit << " ndof " << std::setw(2) << ndofFit;
667  if (segment.ndof() != ndofFit)
668  msg(MSG::DEBUG) << " after outlier " << std::setw(5) << chi2NdofSegmentFit << " ndof " << std::setw(2) << ndofFit;
669  msg(MSG::DEBUG) << " driftR " << std::setw(4) << dc.r() << " rline " << std::setw(5) << rline << " residual "
670  << std::setw(5) << res << " pull " << std::setw(4) << pull << " time " << std::setw(3) << time
671  << " beta" << std::setw(2) << beta << " err " << std::setw(3) << er << " intrinsic " << std::setw(3)
672  << tres << " track " << std::setw(3) << trackTimeRes;
673  if (!isSelected) msg(MSG::DEBUG) << " outlier";
674  msg(MSG::DEBUG) << std::setprecision(5) << endmsg;
675  }
676 
677  if (!isSelected) continue;
678 
679  hits.emplace_back(distance, time, er);
680  candidate.stauHits.emplace_back(MuGirlNS::MDTT_STAU_HIT, time + tof, ix, iy, iz, id, ie, er, sh, isEta, propTime);
682  candidate.stauMDTHitExtras.emplace_back(MuGirlNS::StauMDTHitExtra(iadc, irdrift));
683  }
684  }
685  }
686  // fit data
687  Muon::TimePointBetaFitter::FitResult betaFitResult = fitter.fitWithOutlierLogic(hits);
688  ATH_MSG_DEBUG(" extractTimeMeasurementsFromTrack: extracted " << candidate.stauHits.size() << " time measurements "
689  << " status fit " << betaFitResult.status << " beta "
690  << betaFitResult.beta << " chi2/ndof " << betaFitResult.chi2PerDOF());
691 
692  candidate.finalBetaFitResult = betaFitResult;
693  }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ findSegments()

void MuonCombined::MuonStauRecoTool::findSegments ( const Muon::MuonSystemExtension::Intersection intersection,
MaximumData maximumData,
std::vector< std::shared_ptr< const Muon::MuonSegment >> &  t0fittedSegments,
const ToolHandle< Muon::IMuonPRDSelectionTool > &  muonPRDSelectionTool,
const ToolHandle< Muon::IMuonSegmentMaker > &  segmentMaker,
float  beta = 1. 
) const
private

find segments for a given maximum

Definition at line 1133 of file MuonStauRecoTool.cxx.

1137  {
1138  const MuonHough::MuonLayerHough::Maximum& maximum = *maximumData.maximum;
1139  const std::vector<std::shared_ptr<const Muon::MuonClusterOnTrack>>& phiClusterOnTracks = maximumData.phiClusterOnTracks;
1140 
1141  // lambda to handle calibration and selection of MDTs
1142  auto handleMdt = [intersection, muonPRDSelectionTool](const Muon::MdtPrepData& prd,
1143  std::vector<const Muon::MdtDriftCircleOnTrack*>& mdts,
1144  float beta) {
1145  const Muon::MdtDriftCircleOnTrack* mdt = muonPRDSelectionTool->calibrateAndSelect(intersection, prd, beta);
1146  if (mdt) mdts.push_back(mdt);
1147  };
1148 
1149  // lambda to handle calibration and selection of clusters
1150  auto handleCluster = [intersection, muonPRDSelectionTool](const Muon::MuonCluster& prd,
1151  std::vector<const Muon::MuonClusterOnTrack*>& clusters) {
1152  const Muon::MuonClusterOnTrack* cluster = muonPRDSelectionTool->calibrateAndSelect(intersection, prd);
1153  if (cluster) clusters.push_back(cluster);
1154  };
1155 
1156  // loop over hits in maximum and add them to the hit list
1157  std::vector<const Muon::MdtDriftCircleOnTrack*> mdts;
1158  std::vector<const Muon::MuonClusterOnTrack*> clusters;
1159 
1160  // insert phi hits, clone them
1161  clusters.reserve(phiClusterOnTracks.size());
1162 
1163  for (const auto& phiClusterOnTrack : phiClusterOnTracks) { clusters.push_back(phiClusterOnTrack->clone()); }
1164 
1165  ATH_MSG_DEBUG("About to loop over Hough::Hits");
1166 
1167  MuonHough::HitVec::const_iterator hit = maximum.hits.begin();
1168  MuonHough::HitVec::const_iterator hit_end = maximum.hits.end();
1169  for (; hit != hit_end; ++hit) {
1170  ATH_MSG_DEBUG("hit x,y_min,y_max,w = " << (*hit)->x << "," << (*hit)->ymin << "," << (*hit)->ymax << "," << (*hit)->w);
1171  // treat the case that the hit is a composite TGC hit
1172  if ((*hit)->tgc) {
1173  for (const auto& prd : (*hit)->tgc->etaCluster) handleCluster(*prd, clusters);
1174  } else if ((*hit)->prd) {
1175  Identifier id = (*hit)->prd->identify();
1176  if (m_idHelperSvc->isMdt(id))
1177  handleMdt(static_cast<const Muon::MdtPrepData&>(*(*hit)->prd), mdts, beta);
1178  else
1179  handleCluster(static_cast<const Muon::MuonCluster&>(*(*hit)->prd), clusters);
1180  }
1181  }
1182 
1183  ATH_MSG_DEBUG("About to loop over calibrated hits");
1184 
1185  ATH_MSG_DEBUG("Dumping MDTs");
1186  for (const auto* it : mdts) ATH_MSG_DEBUG(*it);
1187 
1188  ATH_MSG_DEBUG("Dumping clusters");
1189  for (const auto* it : clusters) ATH_MSG_DEBUG(*it);
1190 
1191  // require at least 2 MDT hits
1192  if (mdts.size() > 2) {
1193  // run segment finder
1194  auto segColl = std::make_unique<Trk::SegmentCollection>(SG::VIEW_ELEMENTS);
1195  segmentMaker->find(intersection.trackParameters->position(), intersection.trackParameters->momentum(), mdts, clusters,
1196  !clusters.empty(), segColl.get(), intersection.trackParameters->momentum().mag(), 0, beta);
1197  if (segColl) {
1198  Trk::SegmentCollection::iterator sit = segColl->begin();
1199  Trk::SegmentCollection::iterator sit_end = segColl->end();
1200  for (; sit != sit_end; ++sit) {
1201  Trk::Segment* tseg = *sit;
1202  Muon::MuonSegment* mseg = dynamic_cast<Muon::MuonSegment*>(tseg);
1203  ATH_MSG_DEBUG("Segment: " << m_printer->print(*mseg));
1204  segments.push_back(std::shared_ptr<const Muon::MuonSegment>(mseg));
1205  }
1206  }
1207  }
1208  // clean-up memory
1209  for (const auto* hit : mdts) delete hit;
1210  for (const auto* hit : clusters) delete hit;
1211  }

◆ getBetaSeeds()

void MuonCombined::MuonStauRecoTool::getBetaSeeds ( MaximumData maximumData) const
private

calculate the beta seeds for a give MaximumData

Definition at line 1116 of file MuonStauRecoTool.cxx.

1116  {
1117  // skip maximumData if no timing information is available
1118  if (maximumData.rpcTimeMeasurements.empty() && maximumData.t0fittedSegments.empty()) return;
1119 
1120  // fitter + hits
1123  extractTimeHits(maximumData, hits);
1124 
1125  Muon::TimePointBetaFitter::FitResult result = fitter.fitWithOutlierLogic(hits);
1126  float chi2ndof = result.chi2PerDOF();
1127 
1128  ATH_MSG_DEBUG(" fitting beta for maximum: time measurements " << hits.size() << " status " << result.status << " beta "
1129  << result.beta << " chi2/ndof " << chi2ndof);
1130  if (result.status != 0) maximumData.betaSeeds.emplace_back(result.beta, 1.);
1131  }

◆ getTruth()

std::unique_ptr< MuonStauRecoTool::TruthInfo > MuonCombined::MuonStauRecoTool::getTruth ( const xAOD::TrackParticle indetTrackParticle) const
private

extract truth from the indetTrackParticle

Definition at line 92 of file MuonStauRecoTool.cxx.

92  {
93  // in case we are using the truth, check if the truth link is set and create the TruthInfo object
95  truthParticleLinkAcc("truthParticleLink");
96  if (m_doTruth && truthParticleLinkAcc.isAvailable(indetTrackParticle)) {
97  const ElementLink<xAOD::TruthParticleContainer>& truthLink = truthParticleLinkAcc(indetTrackParticle);
98  if (truthLink.isValid()) {
99  return std::make_unique<TruthInfo>((*truthLink)->pdgId(), (*truthLink)->m(), (*truthLink)->p4().Beta());
100  }
101  }
102  return nullptr;
103  }

◆ handleCandidate()

void MuonCombined::MuonStauRecoTool::handleCandidate ( const EventContext &  ctx,
const InDetCandidate inDetCandidate,
InDetCandidateToTagMap tagMap,
TrackCollection combTracks,
Trk::SegmentCollection segments 
) const
private

handle a single candidate

STAGE 0 Preselection, preparation of truth related quantities, extrapolation in muon system

STAGE 1 process the muon system extension: loop over intersections, get associated data, time measurement, build beta seeds

STAGE 2 build candidates from seeds in the chamber layers

STAGE 3 refine candidates: find segments using the beta seed of the candidate

STAGE 4 combineCandidates: run the combined reconstruction

STAGE 5 resolve ambiguities

STAGE 6 create tag

Definition at line 105 of file MuonStauRecoTool.cxx.

106  {
107  if (m_ignoreSiAssocated && indetCandidate.isSiliconAssociated()) {
108  ATH_MSG_DEBUG(" skip silicon associated track for extension ");
109  return;
110  }
111 
116  // get TrackParticle and apply the kinematic selection
117  const xAOD::TrackParticle& indetTrackParticle = indetCandidate.indetTrackParticle();
118  if (!indetTrackParticle.track() || indetTrackParticle.pt() < m_ptThreshold) return;
119 
120  // get truth info (will be zero pointer if running on data or m_doTruth == false)
121  std::unique_ptr<TruthInfo> truthInfo(getTruth(indetTrackParticle));
122 
123  // if truth based reconstruction is enabled, check whether to accept the given pdgId
124  if (!selectTruth(truthInfo.get())) {
125  ATH_MSG_DEBUG("Truth reconstruction enabled: skipping ID track with pdgId: " << (truthInfo ? truthInfo->pdgId : 0));
126  return;
127  }
128 
129  // get intersections which precision layers in the muon system
130  const Muon::MuonSystemExtension* muonSystemExtension = indetCandidate.getExtension();
131 
132  // summary for selected ID track
133  if (m_doSummary || msgLvl(MSG::DEBUG)) {
134  msg(MSG::INFO) << " ID track: pt " << indetTrackParticle.pt() << " eta " << indetTrackParticle.eta() << " phi "
135  << indetTrackParticle.phi();
136  if (truthInfo) msg(MSG::INFO) << truthInfo->toString();
137  if (!muonSystemExtension) msg(MSG::INFO) << " failed muonSystemExtension";
138  msg(MSG::INFO) << endmsg;
139  }
140 
141  // exit if no MuonSystemExtension was found
142  if (!muonSystemExtension) { return; }
143 
144  // fill validation content
145  if (!m_recoValidationTool.empty()) m_recoValidationTool->addTrackParticle(indetTrackParticle, *muonSystemExtension);
150  AssociatedData associatedData;
151  if (!extractTimeMeasurements(ctx, *muonSystemExtension, associatedData)) { return; }
152 
158  if (!createCandidates(associatedData, candidates)) { return; }
159 
160  if (!m_recoValidationTool.empty()) addCandidatesToNtuple(indetTrackParticle, candidates, 0);
161 
166  if (!refineCandidates(ctx, candidates)) { return; }
167 
168  if (!m_recoValidationTool.empty()) addCandidatesToNtuple(indetTrackParticle, candidates, 1);
169 
174  if (!combineCandidates(ctx, indetTrackParticle, candidates)) { return; }
175 
176  if (!m_recoValidationTool.empty()) addCandidatesToNtuple(indetTrackParticle, candidates, 2);
181  if (!resolveAmbiguities(candidates)) { return; }
182 
183  if (!m_recoValidationTool.empty()) addCandidatesToNtuple(indetTrackParticle, candidates, 3);
187  addTag(indetCandidate, *candidates.front(), tagMap, combTracks, segments);
188  }

◆ initialize()

StatusCode MuonCombined::MuonStauRecoTool::initialize ( )
overridevirtual

Definition at line 48 of file MuonStauRecoTool.cxx.

48  {
49  ATH_CHECK(m_idHelperSvc.retrieve());
50  ATH_CHECK(m_printer.retrieve());
51  ATH_CHECK(m_edmHelperSvc.retrieve());
52  ATH_CHECK(m_segmentMaker.retrieve());
53  ATH_CHECK(m_segmentMakerT0Fit.retrieve());
54  ATH_CHECK(m_segmentMatchingTool.retrieve());
56  ATH_CHECK(m_hitTimingTool.retrieve());
59  ATH_CHECK(m_mdtCreator.retrieve());
60  ATH_CHECK(m_mdtCreatorStau.retrieve());
61  ATH_CHECK(m_insideOutRecoTool.retrieve());
62  ATH_CHECK(m_updator.retrieve());
65 
66  if (m_doTruth) {
67  // add pdgs from jobO to set
68  for (auto pdg : m_pdgsToBeConsidered.value()) { m_selectedPdgs.insert(pdg); }
69  }
70  return StatusCode::SUCCESS;
71  }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

static const InterfaceID& MuonCombined::IMuonCombinedInDetExtensionTool::interfaceID ( )
inlinestaticinherited

Definition at line 37 of file IMuonCombinedInDetExtensionTool.h.

37  {
38  static const InterfaceID IID_IMuonCombinedInDetExtensionTool("MuonCombined::IMuonCombinedInDetExtensionTool", 1, 0);
39  return IID_IMuonCombinedInDetExtensionTool;
40  }

◆ mdtTimeCalibration()

void MuonCombined::MuonStauRecoTool::mdtTimeCalibration ( const Identifier id,
float &  time,
float &  error 
) const
private

Definition at line 1419 of file MuonStauRecoTool.cxx.

1419  {
1420  time -= 1.5;
1421  error *= 1.;
1422  }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ processMuonSystemExtension()

bool MuonCombined::MuonStauRecoTool::processMuonSystemExtension ( const xAOD::TrackParticle indetTrackParticle,
const Muon::MuonSystemExtension muonSystemExtension,
CandidateVec candidates 
)
private

match extension to Hough maxima, extract time measurements, create candidates, run segment finding

◆ refineCandidates()

bool MuonCombined::MuonStauRecoTool::refineCandidates ( const EventContext &  ctx,
MuonStauRecoTool::CandidateVec candidates 
) const
private

refine candidates: find segments for the given beta

Definition at line 190 of file MuonStauRecoTool.cxx.

190  {
191  // keep track of candidates for which segments are found
192  CandidateVec refinedCandidates;
193 
194  // loop over candidates and redo segments using beta estimate from candidate
195  ATH_MSG_DEBUG("Refining candidates " << candidates.size());
196  for (auto& candidate : candidates) {
197  ATH_MSG_DEBUG(" candidate: betaseed beta" << candidate->betaSeed.beta << ", error" << candidate->betaSeed.error
198  << " layerDataVec size" << candidate->layerDataVec.size() << " hits size"
199  << candidate->hits.size());
200 
201  float beta = candidate->betaFitResult.beta;
202  // loop over layers and perform segment finding, collect segments per layer
203  for (const auto& layerData : candidate->layerDataVec) {
204  // store segments in layer
205  std::vector<std::shared_ptr<const Muon::MuonSegment>> segments;
206 
207  // loop over maxima
208  for (const auto& maximumData : layerData.maximumDataVec) {
209  // find segments for intersection
210  findSegments(layerData.intersection, *maximumData, segments, m_muonPRDSelectionToolStau, m_segmentMaker, beta);
211  }
212 
213  // skip if no segment were found
214  if (segments.empty()) continue;
215 
216  // fill validation content
217  if (!m_recoValidationTool.empty()) {
218  for (const auto& seg : segments) m_recoValidationTool->add(layerData.intersection, *seg, 2);
219  }
220 
221  // match segments to intersection, store the ones that match
222  std::vector<std::shared_ptr<const Muon::MuonSegment>> selectedSegments;
223  m_segmentMatchingTool->select(ctx, layerData.intersection, segments, selectedSegments);
224  // fill validation content
225  if (!m_recoValidationTool.empty()) {
226  for (const auto& seg : selectedSegments) m_recoValidationTool->add(layerData.intersection, *seg, 3);
227  }
228 
229  // add layer list
230  candidate->allLayers.emplace_back(layerData.intersection, std::move(selectedSegments));
231  }
232 
233  // keep candidate if any segments were found
234  if (!candidate->allLayers.empty()) refinedCandidates.push_back(candidate);
235  }
236 
237  // set candidates to the refinedCandidates
238  candidates = refinedCandidates;
239 
240  // print results afer refineCandidate
241  if (m_doSummary || msgLvl(MSG::DEBUG)) {
242  msg(MSG::INFO) << " Summary::refineCandidates ";
243  if (candidates.empty())
244  msg(MSG::INFO) << " No candidated found ";
245  else
246  msg(MSG::INFO) << " candidates " << candidates.size();
247 
248  for (const auto& candidate : candidates) {
249  msg(MSG::INFO) << std::endl
250  << " candidate: beta fit result: beta " << candidate->betaFitResult.beta << " chi2/ndof "
251  << candidate->betaFitResult.chi2PerDOF() << " layers with segments" << candidate->allLayers.size();
252  for (const auto& layer : candidate->allLayers)
253  msg(MSG::INFO) << std::endl
254  << " " << printIntersectionToString(layer.intersection) << " segments " << layer.segments.size();
255  }
256  msg(MSG::INFO) << endmsg;
257  }
258 
259  return !candidates.empty();
260  }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ resolveAmbiguities()

bool MuonCombined::MuonStauRecoTool::resolveAmbiguities ( MuonStauRecoTool::CandidateVec candidates) const
private

resolve ambiguities between the candidates

Definition at line 748 of file MuonStauRecoTool.cxx.

748  {
749  ATH_MSG_DEBUG("Resolving ambiguities: candidates " << candidates.size());
750 
751  // push tracks into a collection and run ambi-solver
753  std::map<const Trk::Track*, std::shared_ptr<Candidate>> trackCandidateLookup;
754  for (const auto& candidate : candidates) {
755  Trk::Track* track = candidate->combinedTrack.get();
756  if (track) {
757  tracks.push_back(track);
758  trackCandidateLookup[track] = candidate;
759  }
760  }
761 
762  // first handle easy cases of zero or one track
763  if (tracks.empty()) return false;
764  if (tracks.size() == 1) return true;
765 
766  // more than 1 track call ambiguity solver and select first track
767  std::unique_ptr<const TrackCollection> resolvedTracks(m_trackAmbibuityResolver->process(&tracks));
768  if (!resolvedTracks || resolvedTracks->empty()) {
769  ATH_MSG_WARNING("No track survived the ambiguity solving");
770  return false;
771  }
772  const Trk::Track* selectedTrack = resolvedTracks->front();
773 
774  // get candidate
775  auto pos = trackCandidateLookup.find(selectedTrack);
776  if (pos == trackCandidateLookup.end()) {
777  ATH_MSG_WARNING("candidate lookup failed, this should not happen");
778  return false;
779  }
780 
781  // remove all candidates that were not combined
782  std::shared_ptr<Candidate> candidate = pos->second;
783  candidates.clear();
784  candidates.push_back(candidate);
785 
786  // print results afer resolveAmbiguities
787  if (m_doSummary || msgLvl(MSG::DEBUG)) {
788  msg(MSG::INFO) << " Summary::resolveAmbiguities ";
789  msg(MSG::INFO) << std::endl
790  << " candidate: beta fit result: beta " << candidate->betaFitResult.beta << " chi2/ndof "
791  << candidate->betaFitResult.chi2PerDOF() << " layers with segments" << candidate->allLayers.size() << std::endl
792  << " track " << m_printer->print(*candidate->combinedTrack) << std::endl
793  << m_printer->printStations(*candidate->combinedTrack);
794  msg(MSG::INFO) << endmsg;
795  }
796 
797  return true;
798  }

◆ rpcTimeCalibration()

void MuonCombined::MuonStauRecoTool::rpcTimeCalibration ( const Identifier id,
float &  time,
float &  error 
) const
private

Definition at line 1423 of file MuonStauRecoTool.cxx.

1423  {
1424  time -= 0;
1425  error *= 0.5;
1426  }

◆ segmentTimeCalibration()

void MuonCombined::MuonStauRecoTool::segmentTimeCalibration ( const Identifier id,
float &  time,
float &  error 
) const
private

Definition at line 1427 of file MuonStauRecoTool.cxx.

1427  {
1428  time -= 1.5;
1429  error *= 1.;
1430  }

◆ selectTruth()

bool MuonCombined::MuonStauRecoTool::selectTruth ( const TruthInfo truthInfo) const
inlineprivate

if truth tracking is enabled, return whether the pdg is selected

Definition at line 206 of file MuonStauRecoTool.h.

206  {
207  if (!m_useTruthMatching) return true;
208  if (truthInfo && m_selectedPdgs.count(truthInfo->pdgId)) return true;
209  return false;
210  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_addMDTExtrasMuGirlLowBeta

Gaudi::Property<bool> MuonCombined::MuonStauRecoTool::m_addMDTExtrasMuGirlLowBeta {this, "AddMDTExtrasMuGirlLowBeta", false}
private

Definition at line 271 of file MuonStauRecoTool.h.

◆ m_calibDbKey

SG::ReadCondHandleKey<MuonCalib::MdtCalibDataContainer> MuonCombined::MuonStauRecoTool::m_calibDbKey
private
Initial value:
{this, "CalibDataKey", "MdtCalibConstants",
"Conditions object containing the calibrations"}

Definition at line 255 of file MuonStauRecoTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doSummary

Gaudi::Property<bool> MuonCombined::MuonStauRecoTool::m_doSummary {this, "DoSummary", false, "enable summary output"}
private

Definition at line 260 of file MuonStauRecoTool.h.

◆ m_doTruth

Gaudi::Property<bool> MuonCombined::MuonStauRecoTool::m_doTruth {this, "DoTruth", false, "enable truth matching"}
private

Definition at line 262 of file MuonStauRecoTool.h.

◆ m_edmHelperSvc

ServiceHandle<Muon::IMuonEDMHelperSvc> MuonCombined::MuonStauRecoTool::m_edmHelperSvc
private
Initial value:
{this, "edmHelper", "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
"Handle to the service providing the IMuonEDMHelperSvc interface"}

Definition at line 232 of file MuonStauRecoTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_hitTimingTool

ToolHandle<Muon::IMuonHitTimingTool> MuonCombined::MuonStauRecoTool::m_hitTimingTool {this, "MuonHitTimingTool", "Muon::MuonHitTimingTool/MuonHitTimingTool"}
private

Definition at line 245 of file MuonStauRecoTool.h.

◆ m_houghAssociationPullCut

Gaudi::Property<double> MuonCombined::MuonStauRecoTool::m_houghAssociationPullCut {this, "HoughAssociationPullCut", 5}
private

Definition at line 267 of file MuonStauRecoTool.h.

◆ m_houghDataPerSectorVecKey

SG::ReadHandleKey<Muon::MuonLayerHoughTool::HoughDataPerSectorVec> MuonCombined::MuonStauRecoTool::m_houghDataPerSectorVecKey
private
Initial value:
{
this, "Key_MuonLayerHoughToolHoughDataPerSectorVec", "HoughDataPerSectorVec", "HoughDataPerSectorVec key"}

storegate

Definition at line 228 of file MuonStauRecoTool.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> MuonCombined::MuonStauRecoTool::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 231 of file MuonStauRecoTool.h.

◆ m_ignoreSiAssocated

Gaudi::Property<bool> MuonCombined::MuonStauRecoTool::m_ignoreSiAssocated {this, "IgnoreSiAssociatedCandidates", true}
private

Definition at line 264 of file MuonStauRecoTool.h.

◆ m_insideOutRecoTool

ToolHandle<MuonCombined::MuonInsideOutRecoTool> MuonCombined::MuonStauRecoTool::m_insideOutRecoTool
private
Initial value:
{this, "MuonInsideOutRecoTool",
"MuonCombined::MuonInsideOutRecoTool/MuonInsideOutRecoTool"}

Definition at line 252 of file MuonStauRecoTool.h.

◆ m_mdtCreator

ToolHandle<Muon::IMdtDriftCircleOnTrackCreator> MuonCombined::MuonStauRecoTool::m_mdtCreator
private
Initial value:
{this, "MdtDriftCircleOnTrackCreator",
"Muon::MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator"}

Definition at line 248 of file MuonStauRecoTool.h.

◆ m_mdtCreatorStau

ToolHandle<Muon::IMdtDriftCircleOnTrackCreator> MuonCombined::MuonStauRecoTool::m_mdtCreatorStau
private
Initial value:
{
this, "MdtDriftCircleOnTrackCreatorStau", "Muon::MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreatorStau"}

Definition at line 250 of file MuonStauRecoTool.h.

◆ m_mdttBetaAssociationCut

Gaudi::Property<double> MuonCombined::MuonStauRecoTool::m_mdttBetaAssociationCut {this, "MDTTAssocationCut", 0.4}
private

Definition at line 268 of file MuonStauRecoTool.h.

◆ m_muonPRDSelectionTool

ToolHandle<Muon::IMuonPRDSelectionTool> MuonCombined::MuonStauRecoTool::m_muonPRDSelectionTool {this, "MuonPRDSelectionTool", ""}
private

Definition at line 246 of file MuonStauRecoTool.h.

◆ m_muonPRDSelectionToolStau

ToolHandle<Muon::IMuonPRDSelectionTool> MuonCombined::MuonStauRecoTool::m_muonPRDSelectionToolStau {this, "MuonPRDSelectionToolStau", ""}
private

Definition at line 247 of file MuonStauRecoTool.h.

◆ m_muonSectorMapping

Muon::MuonSectorMapping MuonCombined::MuonStauRecoTool::m_muonSectorMapping
private

Definition at line 258 of file MuonStauRecoTool.h.

◆ m_pdgsToBeConsidered

Gaudi::Property<std::vector<int> > MuonCombined::MuonStauRecoTool::m_pdgsToBeConsidered {this, "ConsideredPDGs", {}, "PDG IDs considered in truth matching"}
private

Definition at line 265 of file MuonStauRecoTool.h.

◆ m_printer

PublicToolHandle<Muon::MuonEDMPrinterTool> MuonCombined::MuonStauRecoTool::m_printer {this, "MuonEDMPrinterTool", ""}
private

Definition at line 235 of file MuonStauRecoTool.h.

◆ m_ptThreshold

Gaudi::Property<double> MuonCombined::MuonStauRecoTool::m_ptThreshold {this, "PtThreshold", 10000}
private

Definition at line 266 of file MuonStauRecoTool.h.

◆ m_recoValidationTool

ToolHandle<Muon::IMuonRecoValidationTool> MuonCombined::MuonStauRecoTool::m_recoValidationTool {this, "MuonRecoValidationTool", ""}
private

Definition at line 242 of file MuonStauRecoTool.h.

◆ m_rpcBetaAssociationCut

Gaudi::Property<double> MuonCombined::MuonStauRecoTool::m_rpcBetaAssociationCut {this, "RPCAssocationCut", 0.2}
private

Definition at line 269 of file MuonStauRecoTool.h.

◆ m_segmentBetaAssociationCut

Gaudi::Property<double> MuonCombined::MuonStauRecoTool::m_segmentBetaAssociationCut {this, "SegmentAssocationCut", 0.2}
private

Definition at line 270 of file MuonStauRecoTool.h.

◆ m_segmentMaker

ToolHandle<Muon::IMuonSegmentMaker> MuonCombined::MuonStauRecoTool::m_segmentMaker {this, "MuonSegmentMaker", "Muon::DCMathSegmentMaker/DCMathSegmentMaker"}
private

Definition at line 236 of file MuonStauRecoTool.h.

◆ m_segmentMakerT0Fit

ToolHandle<Muon::IMuonSegmentMaker> MuonCombined::MuonStauRecoTool::m_segmentMakerT0Fit
private
Initial value:
{this, "MuonSegmentMakerT0Fit",
"Muon::DCMathSegmentMaker/DCMathT0FitSegmentMaker"}

Definition at line 237 of file MuonStauRecoTool.h.

◆ m_segmentMatchingTool

ToolHandle<Muon::IMuonLayerSegmentMatchingTool> MuonCombined::MuonStauRecoTool::m_segmentMatchingTool
private
Initial value:
{
this, "MuonLayerSegmentMatchingTool", "Muon::MuonLayerSegmentMatchingTool/MuonLayerSegmentMatchingTool"}

Definition at line 239 of file MuonStauRecoTool.h.

◆ m_segmentMDTT

Gaudi::Property<bool> MuonCombined::MuonStauRecoTool::m_segmentMDTT {this, "UseSegmentMDTT", true}
private

Definition at line 263 of file MuonStauRecoTool.h.

◆ m_selectedPdgs

std::set<int> MuonCombined::MuonStauRecoTool::m_selectedPdgs
private

Definition at line 273 of file MuonStauRecoTool.h.

◆ m_trackAmbibuityResolver

ToolHandle<Trk::ITrackAmbiguityProcessorTool> MuonCombined::MuonStauRecoTool::m_trackAmbibuityResolver
private
Initial value:
{this, "TrackAmbiguityProcessor",
"Trk::TrackSelectionProcessorTool/MuonAmbiProcessor"}

Definition at line 243 of file MuonStauRecoTool.h.

◆ m_updator

ToolHandle<Trk::IUpdator> MuonCombined::MuonStauRecoTool::m_updator {this, "Updator", "Trk::KalmanUpdator/KalmanUpdator"}
private

Definition at line 254 of file MuonStauRecoTool.h.

◆ m_useTruthMatching

Gaudi::Property<bool> MuonCombined::MuonStauRecoTool::m_useTruthMatching {this, "UseTruthMatching", false, "enable usage of truth info for reconstruction"}
private

Definition at line 261 of file MuonStauRecoTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Muon::MuonStationIndex::chName
static const std::string & chName(ChIndex index)
convert ChIndex into a string
Definition: MuonStationIndex.cxx:157
Trk::SpaceTimePointBase::errorTime
float errorTime() const
access to the error on the measured time
Definition: SpaceTimePointBase.h:50
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:73
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
MuonCombined::MuonStauRecoTool::m_muonPRDSelectionToolStau
ToolHandle< Muon::IMuonPRDSelectionTool > m_muonPRDSelectionToolStau
Definition: MuonStauRecoTool.h:247
beamspotman.r
def r
Definition: beamspotman.py:676
LArSamples::FitterData::fitter
const ShapeFitter * fitter
Definition: ShapeFitter.cxx:23
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
Muon::MuonDriftCircleErrorStrategy
Definition: MuonDriftCircleErrorStrategy.h:15
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
MuonCombined::MuonStauRecoTool::extractTimeHits
bool extractTimeHits(const MaximumData &maximumData, Muon::TimePointBetaFitter::HitVec &hits, const BetaSeed *seed=0) const
extract hits for the beta fit, returns true if hits were added
Definition: MuonStauRecoTool.cxx:1054
Muon::TimePointBetaFitter::Hit
simple struct holding the input to the fit
Definition: TimePointBetaFitter.h:18
MuonCombined::MuonStauRecoTool::extractTimeMeasurementsFromTrack
void extractTimeMeasurementsFromTrack(const EventContext &ctx, Candidate &candidate) const
extract time measurements from the track associated with the candidate
Definition: MuonStauRecoTool.cxx:262
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
MuonCombined::MuonStauRecoTool::m_useTruthMatching
Gaudi::Property< bool > m_useTruthMatching
Definition: MuonStauRecoTool.h:261
MuonCombined::MuonStauRecoTool::Candidate::layerDataVec
LayerDataVec layerDataVec
Definition: MuonStauRecoTool.h:105
Trk::Intersection
Definition: Intersection.h:24
TrkDriftCircleMath::DriftCircle::index
unsigned int index() const
Definition: DriftCircle.h:99
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
get_generator_info.result
result
Definition: get_generator_info.py:21
TrkDriftCircleMath::DCOnTrackVec
std::vector< DCOnTrack > DCOnTrackVec
Definition: DCOnTrack.h:59
MuonCombined::MuonStauRecoTool::MaximumDataVec
std::vector< std::shared_ptr< MaximumData > > MaximumDataVec
Definition: MuonStauRecoTool.h:85
TileDCSDataPlotter.max1
max1
Definition: TileDCSDataPlotter.py:884
python.FPGATrackSimAnalysisConfig.stage
stage
Definition: FPGATrackSimAnalysisConfig.py:718
MuonCombined::MuonStauRecoTool::m_printer
PublicToolHandle< Muon::MuonEDMPrinterTool > m_printer
Definition: MuonStauRecoTool.h:235
MuGirlNS::StauExtras::betaAll
double betaAll
Definition: CandidateSummary.h:86
MuonCombined::MuonStauRecoTool::m_calibDbKey
SG::ReadCondHandleKey< MuonCalib::MdtCalibDataContainer > m_calibDbKey
Definition: MuonStauRecoTool.h:255
TrkDriftCircleMath::SegmentFinder::setChi2DropCut
void setChi2DropCut(double chi2)
Definition: SegmentFinder.cxx:79
Trk::PrepRawDataType::MMPrepData
@ MMPrepData
MuonCombined::MuonStauRecoTool::addCandidatesToNtuple
void addCandidatesToNtuple(const xAOD::TrackParticle &indetTrackParticle, const CandidateVec &candidates, int stage) const
helper function to add Candidate to ntuple
Definition: MuonStauRecoTool.cxx:1440
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
Muon::MdtDriftCircleOnTrack::prepRawData
virtual const MdtPrepData * prepRawData() const override final
Returns the PrepRawData used to create this corrected measurement.
Definition: MdtDriftCircleOnTrack.h:257
Trk::locX
@ locX
Definition: ParamDefs.h:37
MuGirlNS::StauHitTechnology
StauHitTechnology
Definition: CandidateSummary.h:27
TrkDriftCircleMath::MdtId
Definition: MdtId.h:14
Muon::HoughDataPerSec::phiMaxVec
RegionPhiMaximumVec phiMaxVec
Definition: HoughDataPerSec.h:52
MuonCombined::MuonStauRecoTool::m_rpcBetaAssociationCut
Gaudi::Property< double > m_rpcBetaAssociationCut
Definition: MuonStauRecoTool.h:269
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
Muon::MuonSectorMapping::transformRToSector
double transformRToSector(double r, double phi, int sector, bool toSector=true) const
expresses a radial position from and to the sector coordinate frame, the phi position should always b...
Definition: MuonSectorMapping.h:140
MuonHough::MuonLayerHough::m_binsize
float m_binsize
Definition: MuonLayerHough.h:176
MuonCombined::MuonStauRecoTool::m_ptThreshold
Gaudi::Property< double > m_ptThreshold
Definition: MuonStauRecoTool.h:266
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
ClusterSeg::residual
@ residual
Definition: ClusterNtuple.h:20
TrkDriftCircleMath::DCSLFitter::fit
virtual bool fit(Segment &result, const Line &line, const DCOnTrackVec &dcs, double t0Seed=-99999.) const
Definition: Tracking/TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/DCSLFitter.h:38
MuonCombined::MuonStauRecoTool::m_doTruth
Gaudi::Property< bool > m_doTruth
Definition: MuonStauRecoTool.h:262
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
index
Definition: index.py:1
drawFromPickle.candidates
candidates
Definition: drawFromPickle.py:271
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TrackParticle_v1.cxx:77
MuonCombined::MuonStauRecoTool::m_recoValidationTool
ToolHandle< Muon::IMuonRecoValidationTool > m_recoValidationTool
Definition: MuonStauRecoTool.h:242
MuonCombined::MuonStauRecoTool::m_updator
ToolHandle< Trk::IUpdator > m_updator
Definition: MuonStauRecoTool.h:254
MuonCombined::MuonStauRecoTool::CandidateVec
std::vector< std::shared_ptr< Candidate > > CandidateVec
Definition: MuonStauRecoTool.h:119
MuonCombined::MuonStauRecoTool::m_hitTimingTool
ToolHandle< Muon::IMuonHitTimingTool > m_hitTimingTool
Definition: MuonStauRecoTool.h:245
MuonHough::MuonLayerHough::m_descriptor
RegionDescriptor m_descriptor
Definition: MuonLayerHough.h:187
Trk::BoundaryCheckResult::Candidate
@ Candidate
TrkDriftCircleMath::HitSelection
std::vector< bool > HitSelection
Definition: HitSelection.h:9
MuonCombined::MuonStauRecoTool::findSegments
void findSegments(const Muon::MuonSystemExtension::Intersection &intersection, MaximumData &maximumData, std::vector< std::shared_ptr< const Muon::MuonSegment >> &t0fittedSegments, const ToolHandle< Muon::IMuonPRDSelectionTool > &muonPRDSelectionTool, const ToolHandle< Muon::IMuonSegmentMaker > &segmentMaker, float beta=1.) const
find segments for a given maximum
Definition: MuonStauRecoTool.cxx:1133
Muon::TimePointBetaFitter
Definition: TimePointBetaFitter.h:15
MuonGM::MuonReadoutElement::GlobalToAmdbLRSTransform
virtual Amg::Transform3D GlobalToAmdbLRSTransform() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:154
TrkDriftCircleMath::SegmentFinder::setDeltaCut
void setDeltaCut(double cut)
Definition: SegmentFinder.cxx:81
Muon::MuonStationIndex::LayerIndex
LayerIndex
enum to classify the different layers in the muon spectrometer
Definition: MuonStationIndex.h:38
Muon::MuonStationIndex::sectorLayerHash
static unsigned int sectorLayerHash(DetectorRegionIndex detectorRegionIndex, LayerIndex layerIndex)
create a hash out of region and layer
Definition: MuonStationIndex.cxx:226
MuonCombined::MuonStauRecoTool::m_doSummary
Gaudi::Property< bool > m_doSummary
Definition: MuonStauRecoTool.h:260
TrkDriftCircleMath::DriftCircle::position
const LocVec2D & position() const
access to local position
Definition: DriftCircle.h:74
skel.it
it
Definition: skel.GENtoEVGEN.py:407
TrkDriftCircleMath::DCSLFitter
Definition: Tracking/TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/DCSLFitter.h:17
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
TRTCalib_Extractor.tres
tres
Definition: TRTCalib_Extractor.py:32
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
TrkDriftCircleMath::DriftCircle::dr
double dr() const
access to error drift radius
Definition: DriftCircle.h:89
TrkDriftCircleMath::SegmentFinder::setMaxDropDepth
void setMaxDropDepth(int max)
Definition: SegmentFinder.cxx:46
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
Muon::MuonDriftCircleErrorStrategy::Moore
@ Moore
Definition: MuonDriftCircleErrorStrategy.h:17
MuonCombined::MuonStauRecoTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonStauRecoTool.h:231
Muon::TimePointBetaFitter::FitResult::beta
float beta
status flag (0 = failed, 1 = ok)
Definition: TimePointBetaFitter.h:43
Trk::PrepRawData::type
virtual bool type(PrepRawDataType type) const =0
Interface method checking the type.
Muon::TimePointBetaFitter::FitResult::chi2PerDOF
float chi2PerDOF() const
chi2/ndof, return 0 if ndof == 0 or status == 0
Definition: TimePointBetaFitter.h:39
Muon::RpcClusterOnTrack
Class to represent calibrated clusters formed from RPC strips.
Definition: RpcClusterOnTrack.h:35
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
python.TurnDataReader.dr
dr
Definition: TurnDataReader.py:112
MuonCombined::MuonStauRecoTool::createRpcTimeMeasurementsFromClusters
void createRpcTimeMeasurementsFromClusters(const Muon::MuonSystemExtension::Intersection &intersection, const std::vector< Muon::RpcClusterObj > &clusterObjects, RpcTimeMeasurementVec &rpcTimeMeasurements) const
create Rpc hit timing for a set of clusters
Definition: MuonStauRecoTool.cxx:1259
Trk::locR
@ locR
Definition: ParamDefs.h:44
TrkDriftCircleMath::DriftCircle
This class represents a drift time measurement.
Definition: DriftCircle.h:22
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
MuonHough::RegionDescriptor::referencePosition
float referencePosition
Definition: MuonLayerHough.h:48
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Muon::CompetingMuonClustersOnTrack
Definition: CompetingMuonClustersOnTrack.h:54
TrkDriftCircleMath::DriftCircle::r
double r() const
access to drift radius
Definition: DriftCircle.h:86
Muon::MdtPrepData::adc
int adc() const
Returns the ADC (typically range is 0 to 250)
Definition: MdtPrepData.h:146
x
#define x
intersection
std::vector< std::string > intersection(std::vector< std::string > &v1, std::vector< std::string > &v2)
Definition: compareFlatTrees.cxx:25
Trk::combinedTrack
void combinedTrack(long int ICH, double *pv0, double *covi, double BMAG, double *par, double *covo)
Definition: XYZtrp.cxx:113
TrkDriftCircleMath::TransformToLine
Definition: TransformToLine.h:15
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
MuonCombined::MuonStauRecoTool::resolveAmbiguities
bool resolveAmbiguities(CandidateVec &candidates) const
resolve ambiguities between the candidates
Definition: MuonStauRecoTool.cxx:748
MuGirlNS::MDTT_STAU_HIT
@ MDTT_STAU_HIT
Definition: CandidateSummary.h:27
std::stable_sort
void stable_sort(std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, std::reverse_iterator< DataModel_detail::iterator< DVL > > end, Compare comp)
Specialization of stable_sort for DataVector/List.
Definition: DVL_algorithms.h:711
MuonCombined::MuonStauRecoTool::extractRpcTimingFromMaximum
void extractRpcTimingFromMaximum(const Muon::MuonSystemExtension::Intersection &intersection, MaximumData &maximumData) const
extract RPC hit timing
Definition: MuonStauRecoTool.cxx:1213
Muon::MdtDriftCircleOnTrack::driftTime
double driftTime() const
Returns the value of the drift time used to obtain the drift radius.
Definition: MdtDriftCircleOnTrack.h:280
MuonCombined::MuonStauRecoTool::extendCandidates
void extendCandidates(CandidateVec &candidates, std::set< const MaximumData * > &usedMaximumData, LayerDataVec::const_iterator it, LayerDataVec::const_iterator it_end) const
extend a CandidateVec with the next LayerData
Definition: MuonStauRecoTool.cxx:936
TrkDriftCircleMath::DCOnTrack::errorTrack
void errorTrack(double error)
set track error
Definition: DCOnTrack.h:41
TrkDriftCircleMath::Segment
Definition: Tracking/TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:18
MuGirlNS::StauMDTHitExtra
Definition: CandidateSummary.h:71
TrkDriftCircleMath::LocVec2D
Implementation of 2 dimensional vector class.
Definition: LocVec2D.h:16
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
PlotCalibFromCool.ie
ie
Definition: PlotCalibFromCool.py:420
Trk::LocalDirection::angleYZ
double angleYZ() const
access method for angle of local YZ projection
Definition: LocalDirection.h:106
Trk::TrackStateOnSurface::Outlier
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
Definition: TrackStateOnSurface.h:122
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
MuonCombined::MuGirlLowBetaTag
TagBase implementation for a combined fit.
Definition: MuGirlLowBetaTag.h:27
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
Muon::TimePointBetaFitter::FitResult
simple struct holding the fit result
Definition: TimePointBetaFitter.h:33
TrkDriftCircleMath::Line
Definition: Line.h:17
MuonCombined::MuonStauRecoTool::m_trackAmbibuityResolver
ToolHandle< Trk::ITrackAmbiguityProcessorTool > m_trackAmbibuityResolver
Definition: MuonStauRecoTool.h:243
MuonCombined::MuonStauRecoTool::segmentTimeCalibration
void segmentTimeCalibration(const Identifier &id, float &time, float &error) const
Definition: MuonStauRecoTool.cxx:1427
MuonHough::MuonLayerHough::Maximum::binposmin
int binposmin
Definition: MuonLayerHough.h:76
MuonHough::MuonLayerHough::Maximum
struct representing the maximum in the hough space
Definition: MuonLayerHough.h:64
Muon::MuonLayerHoughTool::MaximumVec
HoughDataPerSec::MaximumVec MaximumVec
Definition: MuonLayerHoughTool.h:62
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
MuonHough::MuonLayerHough::Maximum::theta
float theta
Definition: MuonLayerHough.h:69
MuGirlNS::RPCETA_STAU_HIT
@ RPCETA_STAU_HIT
Definition: CandidateSummary.h:27
MuonCombined::MuonStauRecoTool::m_muonSectorMapping
Muon::MuonSectorMapping m_muonSectorMapping
Definition: MuonStauRecoTool.h:258
AthCommonDataStore
Definition: AthCommonDataStore.h:52
MuGirlNS::RPC_STAU_HIT
@ RPC_STAU_HIT
Definition: CandidateSummary.h:27
Generate_dsid_ranseed.seed
seed
Definition: Generate_dsid_ranseed.py:10
Muon::MuonDriftCircleErrorStrategyInput
std::bitset< 23 > MuonDriftCircleErrorStrategyInput
Definition: MuonDriftCircleErrorStrategy.h:13
MuonCombined::MuonStauRecoTool::rpcTimeCalibration
void rpcTimeCalibration(const Identifier &id, float &time, float &error) const
Definition: MuonStauRecoTool.cxx:1423
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
TRT::Hit::driftTime
@ driftTime
Definition: HitInfo.h:43
MuonHough::MuonLayerHough::Maximum::max
float max
Definition: MuonLayerHough.h:67
MuonHough::PhiHit::tgc
const Muon::TgcClusterObj3D * tgc
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h:127
Trk::locZ
@ locZ
local cylindrical
Definition: ParamDefs.h:42
columnar::ContainerId::cluster
@ cluster
MuonCombined::MuonStauRecoTool::LayerDataVec
std::vector< LayerData > LayerDataVec
Definition: MuonStauRecoTool.h:91
MuonCombined::MuonStauRecoTool::m_segmentMatchingTool
ToolHandle< Muon::IMuonLayerSegmentMatchingTool > m_segmentMatchingTool
Definition: MuonStauRecoTool.h:239
MuonGM::MdtReadoutElement
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:51
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:182
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
MuGirlNS::StauExtras::hits
StauHits hits
Definition: CandidateSummary.h:103
lumiFormat.i
int i
Definition: lumiFormat.py:85
z
#define z
Muon::RpcPrepData
Class to represent RPC measurements.
Definition: RpcPrepData.h:35
MuonCombined::MuonStauRecoTool::m_mdttBetaAssociationCut
Gaudi::Property< double > m_mdttBetaAssociationCut
Definition: MuonStauRecoTool.h:268
MuonCombined::MuonStauRecoTool::m_mdtCreator
ToolHandle< Muon::IMdtDriftCircleOnTrackCreator > m_mdtCreator
Definition: MuonStauRecoTool.h:248
RCU::Shell
Definition: ShellExec.cxx:28
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
MuonHough::MuonPhiLayerHough::Maximum
Definition: MuonPhiLayerHough.h:23
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
urldecode::states
states
Definition: urldecode.h:39
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
Muon::MuonStationIndex::Barrel
@ Barrel
Definition: MuonStationIndex.h:49
Muon::TgcClusterObj3D::phiCluster
HitList phiCluster
Definition: TgcHitClustering.h:27
Muon::MuonSystemExtension
Tracking class to hold the extrapolation from a particle from the calo entry to the end of muon syste...
Definition: MuonSystemExtension.h:18
MuonCombined::MuonStauRecoTool::Candidate::allLayers
std::vector< Muon::MuonLayerRecoData > allLayers
Definition: MuonStauRecoTool.h:110
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
MuonHough::MuonPhiLayerHough::Maximum::hits
PhiHitVec hits
Definition: MuonPhiLayerHough.h:35
Trk::Segment
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:56
Muon::RpcHitClusteringObj
Definition: RpcHitClustering.h:76
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:11
BindingsTest.cut
cut
This script demonstrates how to call a C++ class from Python Also how to use PyROOT is shown.
Definition: BindingsTest.py:13
MuonCombined::MuonStauRecoTool::m_segmentMDTT
Gaudi::Property< bool > m_segmentMDTT
Definition: MuonStauRecoTool.h:263
MuGirlNS::StauHit
Definition: CandidateSummary.h:40
test_pyathena.parent
parent
Definition: test_pyathena.py:15
python.StandardJetMods.pull
pull
Definition: StandardJetMods.py:298
Muon::MuonLayerHoughTool::PhiMaximumVec
HoughDataPerSec::PhiMaximumVec PhiMaximumVec
Definition: MuonLayerHoughTool.h:63
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Muon::CscPrepData::time
double time() const
Returns the time.
Definition: CscPrepData.h:158
MuonCombined::MuonStauRecoTool::mdtTimeCalibration
void mdtTimeCalibration(const Identifier &id, float &time, float &error) const
Definition: MuonStauRecoTool.cxx:1419
MuonCombined::MuonStauRecoTool::createCandidates
bool createCandidates(const AssociatedData &associatedData, CandidateVec &candidates) const
create candidates from the beta seeds
Definition: MuonStauRecoTool.cxx:855
Trk::PlaneSurface::globalToLocalDirection
void globalToLocalDirection(const Amg::Vector3D &glodir, Trk::LocalDirection &locdir) const
This method transforms the global direction to a local direction wrt the plane.
Definition: PlaneSurface.cxx:262
MuonCombined::MuonStauRecoTool::Candidate::hits
Muon::TimePointBetaFitter::HitVec hits
Definition: MuonStauRecoTool.h:106
MuonCombined::MuonStauRecoTool::m_houghDataPerSectorVecKey
SG::ReadHandleKey< Muon::MuonLayerHoughTool::HoughDataPerSectorVec > m_houghDataPerSectorVecKey
storegate
Definition: MuonStauRecoTool.h:228
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Trk::ParametersBase
Definition: ParametersBase.h:55
MuGirlNS::StauExtras::betaAllt
double betaAllt
Definition: CandidateSummary.h:87
Muon::MdtDriftCircleOnTrack::driftRadius
double driftRadius() const
Returns the value of the drift radius.
Definition: MdtDriftCircleOnTrack.h:277
MuonHough::MuonLayerHough::Maximum::hough
const MuonLayerHough * hough
Definition: MuonLayerHough.h:83
Muon::MuonDriftCircleErrorStrategy::Segment
@ Segment
Treating a segment or a track.
Definition: MuonDriftCircleErrorStrategy.h:31
jobOption.theta
theta
Definition: jobOption.ParticleGun_fwd_sequence.py:13
Trk::Intersection::position
Amg::Vector3D position
Definition: Intersection.h:25
DataVector< const Trk::TrackStateOnSurface >
MuonCombined::MuonStauRecoTool::addTag
void addTag(const InDetCandidate &inDetCandidate, Candidate &candidate, InDetCandidateToTagMap *tagMap, TrackCollection *combTracks, Trk::SegmentCollection *segments) const
create final tag object and add it to the inDetCandidate
Definition: MuonStauRecoTool.cxx:695
Trk::LocalDirection
represents the three-dimensional global direction with respect to a planar surface frame.
Definition: LocalDirection.h:81
MuonCombined::MuonStauRecoTool::m_segmentMaker
ToolHandle< Muon::IMuonSegmentMaker > m_segmentMaker
Definition: MuonStauRecoTool.h:236
MuonCombined::MuonStauRecoTool::m_segmentBetaAssociationCut
Gaudi::Property< double > m_segmentBetaAssociationCut
Definition: MuonStauRecoTool.h:270
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
Trk::MeasurementBase::localCovariance
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
Definition: MeasurementBase.h:138
Muon::IMuonHitTimingTool::TimingResult
simple struct holding the result of the tool
Definition: IMuonHitTimingTool.h:38
MuonCombined::MuonStauRecoTool::combineCandidates
bool combineCandidates(const EventContext &ctx, const xAOD::TrackParticle &indetTrackParticle, CandidateVec &candidates) const
combine reconstruction
Definition: MuonStauRecoTool.cxx:800
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
MuonCombined::printIntersectionToString
std::string printIntersectionToString(const Muon::MuonSystemExtension::Intersection &intersection)
Definition: MuonStauRecoTool.cxx:37
Muon::MuonStationIndex::DetectorRegionIndex
DetectorRegionIndex
enum to classify the different layers in the muon spectrometer
Definition: MuonStationIndex.h:47
Trk::PrepRawData
Definition: PrepRawData.h:62
Trk::MeasurementBase
Definition: MeasurementBase.h:58
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
MuonCombined::MuonStauRecoTool::m_selectedPdgs
std::set< int > m_selectedPdgs
Definition: MuonStauRecoTool.h:273
MuonCombined::MuonStauRecoTool::calculateTof
float calculateTof(const float beta, const float dist) const
Calcualte for zero betas.
Definition: MuonStauRecoTool.cxx:1432
MuonCombined::MuonStauRecoTool::associateHoughMaxima
void associateHoughMaxima(const EventContext &ctx, LayerData &layerData) const
associate Hough maxima to intersection
Definition: MuonStauRecoTool.cxx:1300
TrkDriftCircleMath::DCOnTrack::residual
void residual(double res)
set residual
Definition: DCOnTrack.h:35
selection
const std::string selection
Definition: fbtTestBasics.cxx:74
MuonHough::PhiHit::prd
const Trk::PrepRawData * prd
access to assiciated hit, either the prd or the tgc pointer is set in athena
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h:126
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
MuonCombined::MuonStauRecoTool::getBetaSeeds
void getBetaSeeds(MaximumData &maximumData) const
calculate the beta seeds for a give MaximumData
Definition: MuonStauRecoTool.cxx:1116
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
Amg::error
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
Definition: EventPrimitivesHelpers.h:40
Trk::PrepRawDataType::sTgcPrepData
@ sTgcPrepData
MuonCombined::MuonStauRecoTool::calculateBeta
float calculateBeta(const float time, const float dist) const
In cases of invalid times just return an phyisical value of 20 times the speed of light The subsequen...
Definition: MuonStauRecoTool.cxx:1437
Muon::MdtDriftCircleOnTrack
This class represents the corrected MDT measurements, where the corrections include the effects of wi...
Definition: MdtDriftCircleOnTrack.h:37
Trk::StraightLineSurface::localToGlobal
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const override final
Specified for StraightLineSurface: LocalToGlobal method without dynamic memory allocation.
Definition: StraightLineSurface.cxx:139
MuonHough::MuonLayerHough::Maximum::pos
float pos
Definition: MuonLayerHough.h:68
Muon::RpcClusterOnTrack::time
float time() const
Return the time (ns)
Definition: RpcClusterOnTrack.h:159
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
MuGirlNS::StauExtras::extraMDTHitInfo
std::optional< StauMDTHitExtras > extraMDTHitInfo
Definition: CandidateSummary.h:104
MuonCombined::MuonStauRecoTool::handleCandidate
void handleCandidate(const EventContext &ctx, const InDetCandidate &inDetCandidate, InDetCandidateToTagMap *tagMap, TrackCollection *combTracks, Trk::SegmentCollection *segments) const
handle a single candidate
Definition: MuonStauRecoTool.cxx:105
Muon::MdtPrepData
Class to represent measurements from the Monitored Drift Tubes.
Definition: MdtPrepData.h:33
Muon::CompetingMuonClustersOnTrack::containedROTs
const std::vector< const MuonClusterOnTrack * > & containedROTs() const
returns the vector of SCT_ClusterOnTrack objects .
Definition: CompetingMuonClustersOnTrack.h:184
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::PlaneSurface::straightLineIntersection
virtual Intersection straightLineIntersection(const Amg::Vector3D &pos, const Amg::Vector3D &dir, bool forceDir, Trk::BoundaryCheck bchk) const override final
fast straight line intersection schema - standard: provides closest intersection and (signed) path le...
Definition: PlaneSurface.cxx:225
Muon::CscClusterOnTrack::prepRawData
virtual const CscPrepData * prepRawData() const override final
Returns the CscPrepData - is a CscPrepData in this scope.
Definition: CscClusterOnTrack.h:154
Muon::HoughDataPerSec
Definition: HoughDataPerSec.h:20
MuonHough::MuonLayerHough::Maximum::hits
HitVec hits
Definition: MuonLayerHough.h:81
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Trk::MeasurementBase::localParameters
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
Definition: MeasurementBase.h:132
MuonCombined::MuonStauRecoTool::m_segmentMakerT0Fit
ToolHandle< Muon::IMuonSegmentMaker > m_segmentMakerT0Fit
Definition: MuonStauRecoTool.h:237
MuonCombined::MuonStauRecoTool::extend
virtual void extend(const InDetCandidateCollection &inDetCandidates, InDetCandidateToTagMap *tagMap, TrackCollection *combTracks, TrackCollection *meTracks, Trk::SegmentCollection *segments, const EventContext &ctx) const override
IMuonCombinedInDetExtensionTool interface: extend ID candidate.
Definition: MuonStauRecoTool.cxx:82
Trk::ParametersBase::momentum
const Amg::Vector3D & momentum() const
Access method for the momentum.
MuGirlNS::CSC_STAU_HIT
@ CSC_STAU_HIT
Definition: CandidateSummary.h:27
DeMoScan.index
string index
Definition: DeMoScan.py:364
Muon::CscClusterOnTrack
Class to represent the calibrated clusters created from CSC strips.
Definition: CscClusterOnTrack.h:47
a
TList * a
Definition: liststreamerinfos.cxx:10
Muon::TimePointBetaFitter::HitVec
std::vector< Hit > HitVec
Definition: TimePointBetaFitter.h:30
MuonCombined::MuonStauRecoTool::getTruth
std::unique_ptr< TruthInfo > getTruth(const xAOD::TrackParticle &indetTrackParticle) const
extract truth from the indetTrackParticle
Definition: MuonStauRecoTool.cxx:92
y
#define y
MuonCombined::MuonStauRecoTool::Candidate::combinedTrack
std::unique_ptr< Trk::Track > combinedTrack
Definition: MuonStauRecoTool.h:114
h
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
python.BackTrackingConfig.numThreads
int numThreads
Definition: BackTrackingConfig.py:61
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Muon::MuonStationIndex::BIL
@ BIL
Definition: MuonStationIndex.h:17
Trk::PlaneSurface
Definition: PlaneSurface.h:64
Muon::MdtDriftCircleOnTrack::associatedSurface
virtual const Trk::StraightLineSurface & associatedSurface() const override final
Returns the surface on which this measurement was taken.
Definition: MdtDriftCircleOnTrack.h:271
Trk::RIO_OnTrack::identify
Identifier identify() const
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:152
DEBUG
#define DEBUG
Definition: page_access.h:11
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
TrkDriftCircleMath::SegmentFinder::dropHits
bool dropHits(Segment &segment, bool &hasDroppedHit, unsigned int &dropDepth) const
Definition: SegmentFinder.cxx:409
RunTileMonitoring.clusters
clusters
Definition: RunTileMonitoring.py:133
MuonCombined::MuonStauRecoTool::m_addMDTExtrasMuGirlLowBeta
Gaudi::Property< bool > m_addMDTExtrasMuGirlLowBeta
Definition: MuonStauRecoTool.h:271
MuonGM::MdtReadoutElement::surface
virtual const Trk::Surface & surface() const override final
Return surface associated with this detector element.
Definition: MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx:885
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
Muon::MuonSystemExtension::layerIntersections
const std::vector< Intersection > & layerIntersections() const
access to the intersections with the layers.
Definition: MuonSystemExtension.h:62
TrkDriftCircleMath::DCOnTrack
class representing a drift circle meaurement on segment
Definition: DCOnTrack.h:16
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
MuonCombined::MuonStauRecoTool::m_ignoreSiAssocated
Gaudi::Property< bool > m_ignoreSiAssocated
Definition: MuonStauRecoTool.h:264
Muon::MuonStationIndex::ChIndex
ChIndex
enum to classify the different chamber layers in the muon spectrometer
Definition: MuonStationIndex.h:15
MuonCombined::MuonStauRecoTool::m_mdtCreatorStau
ToolHandle< Muon::IMdtDriftCircleOnTrackCreator > m_mdtCreatorStau
Definition: MuonStauRecoTool.h:250
MuonCombined::MuonStauRecoTool::Candidate::betaFitResult
Muon::TimePointBetaFitter::FitResult betaFitResult
Definition: MuonStauRecoTool.h:107
Muon::MuonCluster
Class representing clusters in the muon system.
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonCluster.h:37
Muon::MuonSystemExtension::Intersection
data per intersection
Definition: MuonSystemExtension.h:21
TrkDriftCircleMath::SegmentFinder
Definition: SegmentFinder.h:32
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
Muon::MuonSegment::globalPosition
virtual const Amg::Vector3D & globalPosition() const override final
global position
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:157
MuonCombined::MuonStauRecoTool::m_insideOutRecoTool
ToolHandle< MuonCombined::MuonInsideOutRecoTool > m_insideOutRecoTool
Definition: MuonStauRecoTool.h:252
xAOD::track
@ track
Definition: TrackingPrimitives.h:513
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
Trk::SpaceTimePointBase::time
float time() const
access to the measured time
Definition: SpaceTimePointBase.h:47
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:13
MuonCombined::MuonStauRecoTool::extractTimeMeasurements
bool extractTimeMeasurements(const EventContext &ctx, const Muon::MuonSystemExtension &muonSystemExtension, AssociatedData &associatedData) const
associate Hough maxima and associate time measurements
Definition: MuonStauRecoTool.cxx:997
xAOD::TrackParticle_v1::track
const Trk::Track * track() const
Returns a pointer (which can be NULL) to the Trk::Track which was used to make this TrackParticle.
Definition: TrackParticle_v1.cxx:805
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
Muon::MuonSegment
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:45
MuonCombined::MuonStauRecoTool::m_muonPRDSelectionTool
ToolHandle< Muon::IMuonPRDSelectionTool > m_muonPRDSelectionTool
Definition: MuonStauRecoTool.h:246
MuonParameters::beta
@ beta
Definition: MuonParamDefs.h:144
get_generator_info.error
error
Definition: get_generator_info.py:40
MuonHough::MuonLayerHough::Maximum::binposmax
int binposmax
Definition: MuonLayerHough.h:77
MuonCombined::MuonStauRecoTool::selectTruth
bool selectTruth(const TruthInfo *truthInfo) const
if truth tracking is enabled, return whether the pdg is selected
Definition: MuonStauRecoTool.h:206
error
Definition: IImpactPoint3dEstimator.h:70
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:26
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
MuonCombined::MuonStauRecoTool::m_pdgsToBeConsidered
Gaudi::Property< std::vector< int > > m_pdgsToBeConsidered
Definition: MuonStauRecoTool.h:265
MuonCombined::MuonStauRecoTool::m_edmHelperSvc
ServiceHandle< Muon::IMuonEDMHelperSvc > m_edmHelperSvc
Definition: MuonStauRecoTool.h:232
MuonCombined::MuonStauRecoTool::refineCandidates
bool refineCandidates(const EventContext &ctx, CandidateVec &candidates) const
refine candidates: find segments for the given beta
Definition: MuonStauRecoTool.cxx:190
Muon::MuonClusterOnTrack
Base class for Muon cluster RIO_OnTracks.
Definition: MuonClusterOnTrack.h:34
Muon::TimePointBetaFitter::FitResult::status
int status
data members
Definition: TimePointBetaFitter.h:42
xAOD::TrackParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
fitman.k
k
Definition: fitman.py:528
TrkDriftCircleMath::SegmentFinder::debugLevel
void debugLevel(int debugLevel)
Definition: SegmentFinder.h:71
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5
Muon::HoughDataPerSec::maxVec
RegionMaximumVec maxVec
Definition: HoughDataPerSec.h:51
TrkDriftCircleMath::DriftCircle::InTime
@ InTime
drift time too small to be compatible with drift spectrum
Definition: DriftCircle.h:27
Identifier
Definition: IdentifierFieldParser.cxx:14