ATLAS Offline Software
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) 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}
 
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 56 of file MuonStauRecoTool.h.

Member Typedef Documentation

◆ CandidateVec

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

Definition at line 120 of file MuonStauRecoTool.h.

◆ LayerDataVec

Definition at line 93 of file MuonStauRecoTool.h.

◆ MaximumDataVec

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

Definition at line 87 of file MuonStauRecoTool.h.

◆ MaximumVec

Definition at line 58 of file MuonStauRecoTool.h.

◆ PhiMaximumVec

Definition at line 59 of file MuonStauRecoTool.h.

◆ RpcTimeMeasurementVec

Definition at line 72 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 1420 of file MuonStauRecoTool.cxx.

1421  {
1423  ATH_MSG_WARNING("You are calling the non thread-safe MuonRecoValidationTool with multiple threads, will most likely crash");
1424  }
1425  if (m_recoValidationTool.empty()) return;
1426 
1427  ATH_MSG_DEBUG("add candidates to ntuple, stage " << stage);
1428  for (const auto& candidate : candidates) {
1429  int ntimes = 0;
1430  float beta = -1.;
1431  float chi2ndof = -1.;
1432  if (candidate->finalBetaFitResult.status != 0) {
1433  ntimes = candidate->stauHits.size();
1434  beta = candidate->finalBetaFitResult.beta;
1435  chi2ndof = candidate->finalBetaFitResult.chi2PerDOF();
1436  } else if (candidate->betaFitResult.status != 0) {
1437  ntimes = candidate->hits.size();
1438  beta = candidate->betaFitResult.beta;
1439  chi2ndof = candidate->betaFitResult.chi2PerDOF();
1440  } else {
1441  ntimes = 1;
1442  beta = candidate->betaSeed.beta;
1443  chi2ndof = 0;
1444  }
1445  if (candidate->combinedTrack) ATH_MSG_DEBUG("candidate has combined track");
1446  m_recoValidationTool->addMuonCandidate(indetTrackParticle, candidate->muonCandidate.get(), candidate->combinedTrack.get(),
1447  ntimes, beta, chi2ndof, stage);
1448  }
1449  }

◆ 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 682 of file MuonStauRecoTool.cxx.

686  {
687  // get combined track and the segments
688  combTracks->push_back(candidate.combinedTrack.release());
689  ElementLink<TrackCollection> comblink(*combTracks, combTracks->size() - 1);
690  std::vector<ElementLink<Trk::SegmentCollection>> segmentLinks;
691  for (const auto& layer : candidate.allLayers) {
692  for (const auto& segment : layer.segments) {
693  segments->push_back(segment->clone());
694  ElementLink<Trk::SegmentCollection> segLink(*segments, segments->size() - 1);
695  segmentLinks.push_back(segLink);
696  }
697  }
698 
699  // create tag
701 
702  // add additional info
703  tag->setMuBeta(candidate.betaFitResult.beta);
704 
705  // add StauExtras
706  std::unique_ptr<MuGirlNS::StauExtras> stauExtras = std::make_unique<MuGirlNS::StauExtras>();
707  stauExtras->betaAll = candidate.betaFitResult.beta;
708  stauExtras->betaAllt = candidate.finalBetaFitResult.beta;
709  stauExtras->hits = candidate.stauHits;
710  tag->setStauExtras(std::move(stauExtras));
711 
712  // print results afer refineCandidate
713  if (m_doSummary || msgLvl(MSG::DEBUG)) {
714  msg(MSG::INFO) << " Summary::addTag ";
715  msg(MSG::INFO) << std::endl
716  << " candidate: beta fit result: beta " << candidate.betaFitResult.beta << " chi2/ndof "
717  << candidate.betaFitResult.chi2PerDOF() << " segments" << segmentLinks.size();
718  for (const auto& segment : segmentLinks) msg(MSG::INFO) << std::endl << " " << m_printer->print(**segment);
719  if (*comblink)
720  msg(MSG::INFO) << std::endl
721  << " track " << m_printer->print(**comblink) << std::endl
722  << m_printer->printStations(**comblink);
723  msg(MSG::INFO) << endmsg;
724  }
725 
726  // add tag to IndetCandidate
727  tagMap->addEntry(&indetCandidate, tag);
728  }

◆ associateHoughMaxima()

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

associate Hough maxima to intersection

Definition at line 1280 of file MuonStauRecoTool.cxx.

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

◆ 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 1417 of file MuonStauRecoTool.cxx.

1417  {
1418  return time != 0. ? dist * inverseSpeedOfLight / time : 20.;
1419  }

◆ calculateTof()

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

Calcualte for zero betas.

Definition at line 1412 of file MuonStauRecoTool.cxx.

1412  {
1413  return std::abs(beta) > 0 ? dist * inverseSpeedOfLight / beta : 1.e12;
1414  }

◆ combineCandidates()

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

combine reconstruction

Definition at line 782 of file MuonStauRecoTool.cxx.

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

◆ createCandidates()

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

create candidates from the beta seeds

Definition at line 837 of file MuonStauRecoTool.cxx.

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

◆ 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 1239 of file MuonStauRecoTool.cxx.

1241  {
1242  // loop over the clusters
1243  for (const auto& cluster : clusterObjects) {
1244  if (cluster.hitList.empty() || !cluster.hitList.front()) {
1245  ATH_MSG_WARNING("Cluster without hits: " << cluster.hitList.size());
1246  continue;
1247  }
1248  ATH_MSG_DEBUG(" new cluster: " << m_idHelperSvc->toString(cluster.hitList.front()->identify()) << " size "
1249  << cluster.hitList.size());
1250 
1251  // create the ROTs
1252  std::vector<const Muon::MuonClusterOnTrack*> clusters;
1253  for (const auto* rpc : cluster.hitList) {
1254  const Muon::MuonClusterOnTrack* rot(m_muonPRDSelectionTool->calibrateAndSelect(intersection, *rpc));
1255  if (rot) {
1256  clusters.push_back(rot);
1257  ATH_MSG_DEBUG(" strip " << m_idHelperSvc->toString(rot->identify()) << " time "
1258  << static_cast<const Muon::RpcClusterOnTrack*>(rot)->time());
1259  }
1260  }
1261  // get the timing result for the cluster
1263  if (result.valid) {
1264  // add the result
1265  RpcTimeMeasurement rpcTimeMeasurement;
1266  rpcTimeMeasurement.time = result.time;
1267  rpcTimeMeasurement.error = result.error;
1268  for (const auto* cl : clusters) {
1269  const Muon::RpcClusterOnTrack* rcl = dynamic_cast<const Muon::RpcClusterOnTrack*>(cl);
1270  if (rcl) rpcTimeMeasurement.rpcClusters.push_back(std::shared_ptr<const Muon::RpcClusterOnTrack>(rcl));
1271  }
1272  rpcTimeMeasurements.push_back(rpcTimeMeasurement);
1273  } else {
1274  // if no time measurement was created we need to clean up the memory
1275  for (const auto* cl : clusters) delete cl;
1276  }
1277  }
1278  }

◆ 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 918 of file MuonStauRecoTool.cxx.

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

◆ 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 1193 of file MuonStauRecoTool.cxx.

1194  {
1195  // extract trigger hits per chamber
1196  const MuonHough::MuonLayerHough::Maximum& maximum = *maximumData.maximum;
1197  std::map<Identifier, std::vector<const Muon::RpcPrepData*>> rpcPrdsPerChamber;
1198 
1199  // lambda to add the PRD
1200  auto addRpc = [&rpcPrdsPerChamber, this](const Trk::PrepRawData* prd) {
1201  const Muon::RpcPrepData* rpcPrd = dynamic_cast<const Muon::RpcPrepData*>(prd);
1202  if (rpcPrd) {
1203  Identifier chamberId = m_idHelperSvc->chamberId(rpcPrd->identify());
1204  rpcPrdsPerChamber[chamberId].push_back(rpcPrd);
1205  }
1206  };
1207 
1208  // extract eta hits
1209  MuonHough::HitVec::const_iterator hit = maximum.hits.begin();
1210  MuonHough::HitVec::const_iterator hit_end = maximum.hits.end();
1211  for (; hit != hit_end; ++hit) {
1212  if ((*hit)->tgc || !(*hit)->prd || !m_idHelperSvc->isRpc((*hit)->prd->identify())) continue;
1213  addRpc((*hit)->prd);
1214  }
1215 
1216  // extract phi hits
1217  for (const auto& rot : maximumData.phiClusterOnTracks) { addRpc(rot->prepRawData()); }
1218 
1219  // exit if no hits are found
1220  if (rpcPrdsPerChamber.empty()) return;
1221 
1222  std::map<Identifier, std::vector<const Muon::RpcPrepData*>>::iterator chit = rpcPrdsPerChamber.begin();
1223  std::map<Identifier, std::vector<const Muon::RpcPrepData*>>::iterator chit_end = rpcPrdsPerChamber.end();
1224  for (; chit != chit_end; ++chit) {
1225  // cluster hits
1226  Muon::RpcHitClusteringObj clustering(&m_idHelperSvc->rpcIdHelper());
1227  if (!clustering.cluster(chit->second)) {
1228  ATH_MSG_WARNING("Clustering failed");
1229  return;
1230  }
1231 
1232  ATH_MSG_DEBUG(" " << m_idHelperSvc->toStringChamber(chit->first) << " clustered RPCs: " << chit->second.size()
1233  << " eta clusters " << clustering.clustersEta.size() << " phi clusters " << clustering.clustersPhi.size());
1234  createRpcTimeMeasurementsFromClusters(intersection, clustering.clustersEta, maximumData.rpcTimeMeasurements);
1235  createRpcTimeMeasurementsFromClusters(intersection, clustering.clustersPhi, maximumData.rpcTimeMeasurements);
1236  }
1237  }

◆ 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 1036 of file MuonStauRecoTool.cxx.

1037  {
1038  unsigned int nstart = hits.size();
1039 
1040  auto addHit = [&](float distance, float time, float error, float cut) {
1041  if (seed) {
1042  float beta = calculateBeta(time + calculateTof(1, distance), distance);
1043  ATH_MSG_VERBOSE(" matching hit: distance " << distance << " time " << time << " beta" << beta << " diff "
1044  << std::abs(beta - seed->beta));
1045  if (std::abs(beta - seed->beta) > cut) return;
1046  } else {
1047  ATH_MSG_VERBOSE(" addHit: distance " << distance << " time " << time << " beta"
1048  << calculateBeta(time + calculateTof(1, distance), distance));
1049  }
1050  if (error != 0.) hits.emplace_back(distance, time, error);
1051  };
1052 
1053  // add rpc measurements
1054  for (const auto& rpc : maximumData.rpcTimeMeasurements) {
1055  float time = rpc.time;
1056  float error = rpc.error;
1057  rpcTimeCalibration(rpc.rpcClusters.front()->identify(), time, error);
1058  addHit(rpc.rpcClusters.front()->globalPosition().mag(), time, error, m_rpcBetaAssociationCut);
1059  }
1060 
1061  // add segment t0 fits
1062  // if not seeded take all segments
1063  if (!seed) {
1064  for (const auto& seg : maximumData.t0fittedSegments) {
1065  if (!seg->hasFittedT0()) continue;
1066  float time = seg->time();
1067  float error = seg->errorTime();
1068  Identifier id = m_edmHelperSvc->chamberId(*seg);
1069  segmentTimeCalibration(id, time, error);
1070  addHit(seg->globalPosition().mag(), time, error, m_segmentBetaAssociationCut);
1071  }
1072  } else {
1073  // pick the best match
1074  const Muon::MuonSegment* bestSegment = nullptr;
1075  float smallestResidual = FLT_MAX;
1076  for (const auto& seg : maximumData.t0fittedSegments) {
1077  if (!seg->hasFittedT0()) continue;
1078  float distance = seg->globalPosition().mag();
1079  float time = seg->time();
1080  float beta = calculateBeta(time + calculateTof(1, distance), distance);
1081  float residual = std::abs(beta - seed->beta);
1082 
1083  if (residual < smallestResidual) {
1084  smallestResidual = residual;
1085  bestSegment = seg.get();
1086  }
1087  }
1088  if (bestSegment) {
1089  addHit(bestSegment->globalPosition().mag(), bestSegment->time(), bestSegment->errorTime(), m_segmentBetaAssociationCut);
1090  ATH_MSG_VERBOSE(" adding best segment: " << m_printer->print(*bestSegment));
1091  }
1092  }
1093  ATH_MSG_VERBOSE(" extractTimeHits done: added " << hits.size() - nstart << " hits");
1094 
1095  return nstart != hits.size();
1096  }

◆ 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 979 of file MuonStauRecoTool.cxx.

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

◆ 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 261 of file MuonStauRecoTool.cxx.

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

◆ 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 
) const
private

find segments for a given maximum

Definition at line 1115 of file MuonStauRecoTool.cxx.

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

◆ getBetaSeeds()

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

calculate the beta seeds for a give MaximumData

Definition at line 1098 of file MuonStauRecoTool.cxx.

1098  {
1099  // skip maximumData if no timing information is available
1100  if (maximumData.rpcTimeMeasurements.empty() && maximumData.t0fittedSegments.empty()) return;
1101 
1102  // fitter + hits
1105  extractTimeHits(maximumData, hits);
1106 
1107  Muon::TimePointBetaFitter::FitResult result = fitter.fitWithOutlierLogic(hits);
1108  float chi2ndof = result.chi2PerDOF();
1109 
1110  ATH_MSG_DEBUG(" fitting beta for maximum: time measurements " << hits.size() << " status " << result.status << " beta "
1111  << result.beta << " chi2/ndof " << chi2ndof);
1112  if (result.status != 0) maximumData.betaSeeds.emplace_back(result.beta, 1.);
1113  }

◆ 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 1399 of file MuonStauRecoTool.cxx.

1399  {
1400  time -= 1.5;
1401  error *= 1.;
1402  }

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

◆ 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 730 of file MuonStauRecoTool.cxx.

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

◆ rpcTimeCalibration()

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

Definition at line 1403 of file MuonStauRecoTool.cxx.

1403  {
1404  time -= 0;
1405  error *= 0.5;
1406  }

◆ segmentTimeCalibration()

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

Definition at line 1407 of file MuonStauRecoTool.cxx.

1407  {
1408  time -= 1.5;
1409  error *= 1.;
1410  }

◆ 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_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 272 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:1036
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:261
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:107
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:87
TileDCSDataPlotter.max1
max1
Definition: TileDCSDataPlotter.py:884
python.FPGATrackSimAnalysisConfig.stage
stage
Definition: FPGATrackSimAnalysisConfig.py:558
MuonCombined::MuonStauRecoTool::m_printer
PublicToolHandle< Muon::MuonEDMPrinterTool > m_printer
Definition: MuonStauRecoTool.h:235
MuGirlNS::StauExtras::betaAll
double betaAll
Definition: CandidateSummary.h:71
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:1420
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:26
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:70
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:120
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
Muon::TimePointBetaFitter
Definition: TimePointBetaFitter.h:15
MuonGM::MuonReadoutElement::GlobalToAmdbLRSTransform
virtual Amg::Transform3D GlobalToAmdbLRSTransform() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:153
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:396
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:1239
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
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
MuonCombined::MuonStauRecoTool::resolveAmbiguities
bool resolveAmbiguities(CandidateVec &candidates) const
resolve ambiguities between the candidates
Definition: MuonStauRecoTool.cxx:730
MuGirlNS::MDTT_STAU_HIT
@ MDTT_STAU_HIT
Definition: CandidateSummary.h:26
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:1193
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:918
TrkDriftCircleMath::DCOnTrack::errorTrack
void errorTrack(double error)
set track error
Definition: DCOnTrack.h:41
TrkDriftCircleMath::Segment
Definition: Tracking/TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:18
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:1407
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:63
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:26
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:26
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:1403
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
MuonCombined::MuonStauRecoTool::LayerDataVec
std::vector< LayerData > LayerDataVec
Definition: MuonStauRecoTool.h:93
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:88
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:112
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:14
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:39
test_pyathena.parent
parent
Definition: test_pyathena.py:15
python.StandardJetMods.pull
pull
Definition: StandardJetMods.py:282
Muon::MuonLayerHoughTool::PhiMaximumVec
HoughDataPerSec::PhiMaximumVec PhiMaximumVec
Definition: MuonLayerHoughTool.h:64
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:1399
MuonCombined::MuonStauRecoTool::createCandidates
bool createCandidates(const AssociatedData &associatedData, CandidateVec &candidates) const
create candidates from the beta seeds
Definition: MuonStauRecoTool.cxx:837
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:260
MuonCombined::MuonStauRecoTool::Candidate::hits
Muon::TimePointBetaFitter::HitVec hits
Definition: MuonStauRecoTool.h:108
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:72
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:33
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:682
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:782
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:272
MuonCombined::MuonStauRecoTool::calculateTof
float calculateTof(const float beta, const float dist) const
Calcualte for zero betas.
Definition: MuonStauRecoTool.cxx:1412
MuonCombined::MuonStauRecoTool::associateHoughMaxima
void associateHoughMaxima(const EventContext &ctx, LayerData &layerData) const
associate Hough maxima to intersection
Definition: MuonStauRecoTool.cxx:1280
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
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) const
find segments for a given maximum
Definition: MuonStauRecoTool.cxx:1115
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:1098
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
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:1417
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)
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:223
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:26
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:116
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
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
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
MuonGM::MdtReadoutElement::surface
virtual const Trk::Surface & surface() const override final
Return surface associated with this detector element.
Definition: MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx:891
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:623
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:109
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:512
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:14
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:979
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