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
 
ToolHandle< Muon::MuonEDMPrinterToolm_printer {this, "MuonEDMPrinterTool", "Muon::MuonEDMPrinterTool/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 1418 of file MuonStauRecoTool.cxx.

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

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

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

◆ associateHoughMaxima()

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

associate Hough maxima to intersection

Definition at line 1282 of file MuonStauRecoTool.cxx.

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

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

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

◆ calculateTof()

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

Calcualte for zero betas.

Definition at line 1410 of file MuonStauRecoTool.cxx.

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

◆ combineCandidates()

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

combine reconstruction

Definition at line 784 of file MuonStauRecoTool.cxx.

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

◆ createCandidates()

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

create candidates from the beta seeds

Definition at line 839 of file MuonStauRecoTool.cxx.

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

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

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

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

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

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

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

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

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

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

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

◆ 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  bool out_of_bound_flag = false;
349  float drdt = rtRelation->rt()->driftvelocity(driftTime);
350  float rres = rtRelation->rtRes()->resolution(driftTime);
351  float tres = rres / drdt;
352  float TlocR = rtRelation->tr()->tFromR(std::abs(locR), out_of_bound_flag);
353  float trackTimeRes = errR / drdt;
354  float tofShiftFromBeta = calculateTof(betaSeed, distance) - tof;
355  er = std::sqrt(tres * tres + trackTimeRes * trackTimeRes);
356  mdtTimeCalibration(id, driftTime, er);
357  time = driftTime - TlocR + tofShiftFromBeta;
358  propTime = driftTime;
359  ie = trackTimeRes;
360  // try removal of hit from fit
361  if (!m_updator.empty()) {
362  std::unique_ptr<const Trk::TrackParameters> unbiasedPars(
363  m_updator->removeFromState(*pars, meas->localParameters(), meas->localCovariance()));
364  if (unbiasedPars) {
365  float locRu = unbiasedPars->parameters()[Trk::locR];
366  float TlocRu = rtRelation->tr()->tFromR(std::abs(locRu), out_of_bound_flag);
367  float errRu = unbiasedPars->covariance() ? Amg::error(*unbiasedPars->covariance(), Trk::locR) : 0.3;
368  float trackTimeResu = errRu / drdt;
369  sh = TlocR - TlocRu;
370  time = driftTime - TlocRu + tofShiftFromBeta;
371  er = std::sqrt(tres * tres + trackTimeResu * trackTimeResu);
372  ie = trackTimeResu;
373  ATH_MSG_VERBOSE(" Got unbiased parameters: r " << locR << " ur " << locRu << " err " << errR << " uerr "
374  << errRu << " terr " << trackTimeRes << " terru "
375  << trackTimeResu);
376  }
377  }
378 
379  ATH_MSG_VERBOSE(" MDT " << mdt->driftRadius() << " locR " << locR << " err " << errR << " drift time " << driftTime
380  << " TlocR " << TlocR << " diff " << driftTime - TlocR << " tofShift " << tofShiftFromBeta
381  << " time " << time << " err " << er << " intrinsic " << tres << " track " << trackTimeRes);
382 
383  float beta = calculateBeta(time + tof, distance);
384  ATH_MSG_VERBOSE(" adding " << m_idHelperSvc->toString(id) << " distance " << distance << " time " << time << " beta"
385  << beta << " diff " << std::abs(beta - betaSeed));
386  if (std::abs(beta - betaSeed) > m_mdttBetaAssociationCut) continue;
387 
389  candidate.stauHits.push_back(MuGirlNS::StauHit(tech, time + tof, ix, iy, iz, id, ie, er, sh, isEta, propTime));
390  }
391  } else if (m_idHelperSvc->isRpc(id)) {
392  // treat CompetingMuonClustersOnTrack differently than RpcClusterOnTrack
393  std::vector<const Muon::MuonClusterOnTrack*> clusters;
394  const Muon::CompetingMuonClustersOnTrack* crot = dynamic_cast<const Muon::CompetingMuonClustersOnTrack*>(meas);
395  if (crot) {
396  clusters = crot->containedROTs();
397  } else {
398  const Muon::RpcClusterOnTrack* rpc = dynamic_cast<const Muon::RpcClusterOnTrack*>(meas);
399  if (rpc) clusters.push_back(rpc);
400  }
401  Identifier chamberId = m_idHelperSvc->chamberId(id);
402  bool measuresPhi = m_idHelperSvc->measuresPhi(id);
403  auto pos = rpcPrdsPerChamber.find(chamberId);
404  if (pos == rpcPrdsPerChamber.end()) {
405  if (measuresPhi)
406  rpcPrdsPerChamber[chamberId] = std::make_tuple(pars, clusters, RpcClVec());
407  else
408  rpcPrdsPerChamber[chamberId] = std::make_tuple(pars, RpcClVec(), clusters);
409  } else {
410  RpcClVec& clVec = measuresPhi ? std::get<1>(pos->second) : std::get<2>(pos->second);
411  clVec.insert(clVec.end(), clusters.begin(), clusters.end());
412  }
413  } else if (m_idHelperSvc->isCsc(id)) {
414  const Muon::CscClusterOnTrack* csc = dynamic_cast<const Muon::CscClusterOnTrack*>(meas);
415 
417  float distance = pars->position().mag();
418  float time = csc->prepRawData()->time();
419 
420  float ix = pars->position().x();
421  float iy = pars->position().y();
422  float iz = pars->position().z();
423  float ie = 0.;
424  float er = -1;
425  float sh = 0;
426  bool isEta = !m_idHelperSvc->measuresPhi(id);
427  float propTime = 0;
428  float tof = calculateTof(1, distance);
429  candidate.stauHits.push_back(MuGirlNS::StauHit(tech, time + tof, ix, iy, iz, id, ie, er, sh, isEta, propTime));
430  }
431  }
432 
433  auto insertRpcs = [betaSeed, this](const Trk::TrackParameters& pars, const RpcClVec& clusters,
434  MuonStauRecoTool::Candidate& candidate, Muon::TimePointBetaFitter::HitVec& hits) {
435  if (clusters.empty()) return;
436 
437  std::vector<const Muon::MuonClusterOnTrack*> calibratedClusters;
438  for (const auto* cluster : clusters) {
439  const Muon::MuonClusterOnTrack* cl = m_muonPRDSelectionTool->calibrateAndSelect(pars, *cluster->prepRawData());
440  if (cl) calibratedClusters.push_back(cl);
441  }
442  if (calibratedClusters.empty()) return;
443 
444  Muon::IMuonHitTimingTool::TimingResult result = m_hitTimingTool->calculateTimingResult(calibratedClusters);
445  for (const auto* cl : calibratedClusters) delete cl;
446  if (!result.valid) return;
447 
448  Identifier id = clusters.front()->identify();
449 
451  float distance = pars.position().mag();
452  float time = result.time;
453  float ix = pars.position().x();
454  float iy = pars.position().y();
455  float iz = pars.position().z();
456  float ie = 0.;
457  float er = result.error;
458  rpcTimeCalibration(id, time, er);
459  float sh = 0;
460  bool isEta = !m_idHelperSvc->measuresPhi(id);
461  if (isEta) tech = MuGirlNS::RPCETA_STAU_HIT;
462  float propTime = 0;
463  float tof = calculateTof(1, distance);
464  float beta = calculateBeta(time + tof, distance);
465  ATH_MSG_VERBOSE(" adding " << m_idHelperSvc->toString(id) << " distance " << distance << " time " << time << " beta" << beta
466  << " diff " << std::abs(beta - betaSeed));
467 
468  if (std::abs(beta - betaSeed) > m_mdttBetaAssociationCut) return;
469 
471  candidate.stauHits.push_back(MuGirlNS::StauHit(tech, time + tof, ix, iy, iz, id, ie, er, sh, isEta, propTime));
472  };
473 
474  // get RPC timing per chamber
475  RpcClPerChMap::const_iterator chit = rpcPrdsPerChamber.begin();
476  RpcClPerChMap::const_iterator chit_end = rpcPrdsPerChamber.end();
477  ATH_MSG_VERBOSE("RPCs per chamber " << rpcPrdsPerChamber.size());
478 
479  for (; chit != chit_end; ++chit) {
480  const Trk::TrackParameters* pars = std::get<0>(chit->second);
481  const RpcClVec& phiClusters = std::get<1>(chit->second);
482  const RpcClVec& etaClusters = std::get<2>(chit->second);
483  insertRpcs(*pars, phiClusters, candidate, hits);
484  insertRpcs(*pars, etaClusters, candidate, hits);
485  }
486 
487  // get timing per MDT chamber, use segment error strategy (errors of the RT relation
489  Muon::MuonDriftCircleErrorStrategy calibrationStrategy(bits);
490  calibrationStrategy.setStrategy(Muon::MuonDriftCircleErrorStrategy::Moore);
491  calibrationStrategy.setParameter(Muon::MuonDriftCircleErrorStrategy::Segment, true);
492 
494  TrkDriftCircleMath::SegmentFinder segmentFinder;
495  segmentFinder.setMaxDropDepth(2);
496  segmentFinder.setChi2DropCut(5);
497  segmentFinder.setDeltaCut(3);
498 
499  MdtChamberLayerData::const_iterator mit = mdtDataPerChamberLayer.begin();
500  MdtChamberLayerData::const_iterator mit_end = mdtDataPerChamberLayer.end();
501  for (; mit != mit_end; ++mit) {
502  ATH_MSG_VERBOSE(" new station layer " << Muon::MuonStationIndex::chName((Muon::MuonStationIndex::ChIndex)(mit->first % 1000))
503  << " hits " << mit->second.size());
504  if (mit->second.size() < 4) continue;
505 
506  // get RE element for first hit
507  const MuonGM::MdtReadoutElement* detEl = mit->second.front().second->detectorElement();
508  const Trk::PlaneSurface* surf = dynamic_cast<const Trk::PlaneSurface*>(&detEl->surface());
509  if (!surf) {
510  ATH_MSG_WARNING("MdtReadoutElement should always have a PlaneSurface as reference surface");
511  continue;
512  }
513  Amg::Transform3D gToStation = detEl->GlobalToAmdbLRSTransform();
514 
515  // get TrackParameters and SL intersect the DetEl surface (above a few GeV SL intersection is accurate enough)
516  const Trk::TrackParameters& firstPars = *mit->second.front().first;
517  Trk::Intersection slIntersection = surf->straightLineIntersection(firstPars.position(), firstPars.momentum(), false, false);
518 
519  // calculate seed position and direction
520  Trk::LocalDirection seedLocDir;
521  surf->globalToLocalDirection(firstPars.momentum(), seedLocDir);
522  Amg::Vector3D seedLocPos = gToStation * slIntersection.position;
523  TrkDriftCircleMath::LocVec2D seedPos(seedLocPos.y(), seedLocPos.z());
524  TrkDriftCircleMath::Line seedLine(seedPos, seedLocDir.angleYZ());
526 
527  std::vector<std::pair<std::shared_ptr<const Muon::MdtDriftCircleOnTrack>, const Trk::TrackParameters*>> indexLookUp;
528  unsigned index = 0;
529  for (const auto& entry : mit->second) {
530  const Trk::TrackParameters& pars = *entry.first;
531  const Muon::MdtDriftCircleOnTrack& mdt = *entry.second;
532  Identifier id = mdt.identify();
533  // calibrate MDT
534  std::unique_ptr<const Muon::MdtDriftCircleOnTrack> calibratedMdt(
535  m_mdtCreatorStau->correct(*mdt.prepRawData(), pars, &calibrationStrategy, betaSeed));
536  if (!calibratedMdt) {
537  ATH_MSG_WARNING("Failed to recalibrate existing MDT on track " << m_idHelperSvc->toString(id));
538  continue;
539  }
540  ATH_MSG_VERBOSE(" recalibrated MDT " << m_idHelperSvc->toString(id) << " r " << calibratedMdt->driftRadius() << " "
541  << Amg::error(calibratedMdt->localCovariance(), Trk::locR) << " old r "
542  << mdt.driftRadius() << " " << Amg::error(mdt.localCovariance(), Trk::locR)
543  << " r_track " << pars.parameters()[Trk::locR] << " residual "
544  << std::abs(mdt.driftRadius()) - std::abs(pars.parameters()[Trk::locR]));
545 
546  // calculate tube position taking into account the second coordinate
547  Amg::Vector2D lp(0., pars.parameters()[Trk::locZ]);
548  Amg::Vector3D gpos;
549  mdt.associatedSurface().localToGlobal(lp, pars.momentum(), gpos);
550 
551  // calculate local AMDB position
552  Amg::Vector3D locPos = gToStation * gpos;
553  TrkDriftCircleMath::LocVec2D lpos(locPos.y(), locPos.z());
554 
555  double r = std::abs(calibratedMdt->driftRadius());
556  double dr = Amg::error(calibratedMdt->localCovariance(), Trk::locR);
557 
558  // create identifier
559  TrkDriftCircleMath::MdtId mdtid(m_idHelperSvc->mdtIdHelper().isBarrel(id), m_idHelperSvc->mdtIdHelper().multilayer(id) - 1,
560  m_idHelperSvc->mdtIdHelper().tubeLayer(id) - 1, m_idHelperSvc->mdtIdHelper().tube(id) - 1);
561 
562  // create new DriftCircle
564  TrkDriftCircleMath::DCOnTrack dcOnTrack(dc, 1., 1.);
565 
566  dcs.push_back(dcOnTrack);
567  indexLookUp.emplace_back(std::move(calibratedMdt), &pars);
568  ++index;
569  }
570 
571  // now loop over the hits and fit the segment taking out each of the hits individually
572  for (unsigned int i = 0; i < dcs.size(); ++i) {
574  selection[i] = 1;
576  if (!mdtFitter.fit(result, seedLine, dcs, selection)) {
577  ATH_MSG_DEBUG("Fit failed ");
578  continue;
579  }
581  segment.hitsOnTrack(dcs.size());
582  unsigned int ndofFit = segment.ndof();
583  if (ndofFit < 1) continue;
584  double chi2NdofSegmentFit = segment.chi2() / ndofFit;
585  bool hasDropHit = false;
586  unsigned int dropDepth = 0;
587  if (!segmentFinder.dropHits(segment, hasDropHit, dropDepth)) {
588  ATH_MSG_DEBUG("DropHits failed, fit chi2/ndof " << chi2NdofSegmentFit);
589  if (msgLvl(MSG::VERBOSE)) {
590  segmentFinder.debugLevel(20);
591  segment = result;
592  segmentFinder.dropHits(segment, hasDropHit, dropDepth);
593  segmentFinder.debugLevel(0);
594  }
595  continue;
596  }
597  if (i >= segment.dcs().size()) continue;
599  const TrkDriftCircleMath::DCOnTrack& dc = segment.dcs()[i];
600  double res = dc.residual();
601  double err = std::sqrt(dc.dr() * dc.dr() + dc.errorTrack() * dc.errorTrack());
602  double pull = res / err;
603  double rline = toLine.toLineY(dc.position());
604  int index = dc.index();
605  if (index < 0 || index >= (int)indexLookUp.size()) {
606  ATH_MSG_WARNING(" lookup of TrackParameters and MdtDriftCircleOnTrack failed " << index << " range: 0 - "
607  << indexLookUp.size() - 1);
608  continue;
609  }
610  const Trk::TrackParameters* pars = indexLookUp[dc.index()].second;
611  const Muon::MdtDriftCircleOnTrack* mdt = indexLookUp[dc.index()].first.get();
612  Identifier id = mdt->identify();
613 
614  // calibrate MDT with nominal timing
615  std::shared_ptr<const Muon::MdtDriftCircleOnTrack> calibratedMdt(
616  m_mdtCreator->correct(*mdt->prepRawData(), *pars, &calibrationStrategy, betaSeed));
617  if (!calibratedMdt.get()) {
618  ATH_MSG_WARNING("Failed to recalibrate existing MDT on track " << m_idHelperSvc->toString(id));
619  continue;
620  }
621  float distance = pars->position().mag();
622  float time = 0.;
623 
624  float ix = pars->position().x();
625  float iy = pars->position().y();
626  float iz = pars->position().z();
627  float ie = 0.;
628  float er = -1;
629  float sh = 0;
630  bool isEta = !m_idHelperSvc->measuresPhi(id);
631  float propTime = 0;
632  float tof = calculateTof(1, distance);
633 
634  // use inverted RT relation together with track prediction to get estimate of drift time
635  float driftTime = calibratedMdt->driftTime(); // we need to add beta seed as it was subtracted when calibrating the hits
636  float locR = rline;
637  float errR = dc.errorTrack();
638  auto data = mdtCalibConstants->getCalibData(id, msgStream());
639  const auto& rtRelation = data->rtRelation;
640  bool out_of_bound_flag = false;
641  float drdt = rtRelation->rt()->driftvelocity(driftTime);
642  float rres = rtRelation->rtRes()->resolution(driftTime);
643  float tres = rres / drdt;
644  float TlocR = rtRelation->tr()->tFromR(std::abs(locR), out_of_bound_flag);
645  float trackTimeRes = errR / drdt;
646  float tofShiftFromBeta = 0.; // muonBetaCalculationUtils.calculateTof(betaSeed,distance)-tof;
647  er = std::sqrt(tres * tres + trackTimeRes * trackTimeRes);
648  mdtTimeCalibration(id, driftTime, er);
649  time = driftTime - TlocR + tofShiftFromBeta;
650  propTime = driftTime;
651  ie = trackTimeRes;
652 
653  const float beta = calculateBeta(time + tof, distance);
654  bool isSelected = std::abs(beta - betaSeed) < m_mdttBetaAssociationCut;
655 
656  if (msgLvl(MSG::DEBUG)) {
657  msg(MSG::DEBUG) << m_idHelperSvc->toString(id) << std::setprecision(2) << " segment: after fit " << std::setw(5)
658  << chi2NdofSegmentFit << " ndof " << std::setw(2) << ndofFit;
659  if (segment.ndof() != ndofFit)
660  msg(MSG::DEBUG) << " after outlier " << std::setw(5) << chi2NdofSegmentFit << " ndof " << std::setw(2) << ndofFit;
661  msg(MSG::DEBUG) << " driftR " << std::setw(4) << dc.r() << " rline " << std::setw(5) << rline << " residual "
662  << std::setw(5) << res << " pull " << std::setw(4) << pull << " time " << std::setw(3) << time
663  << " beta" << std::setw(2) << beta << " err " << std::setw(3) << er << " intrinsic " << std::setw(3)
664  << tres << " track " << std::setw(3) << trackTimeRes;
665  if (!isSelected) msg(MSG::DEBUG) << " outlier";
666  msg(MSG::DEBUG) << std::setprecision(5) << endmsg;
667  }
668 
669  if (!isSelected) continue;
670 
671  hits.emplace_back(distance, time, er);
672  candidate.stauHits.emplace_back(MuGirlNS::MDTT_STAU_HIT, time + tof, ix, iy, iz, id, ie, er, sh, isEta, propTime);
673  }
674  }
675  // fit data
676  Muon::TimePointBetaFitter::FitResult betaFitResult = fitter.fitWithOutlierLogic(hits);
677  ATH_MSG_DEBUG(" extractTimeMeasurementsFromTrack: extracted " << candidate.stauHits.size() << " time measurements "
678  << " status fit " << betaFitResult.status << " beta "
679  << betaFitResult.beta << " chi2/ndof " << betaFitResult.chi2PerDOF());
680 
681  candidate.finalBetaFitResult = betaFitResult;
682  }

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

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

◆ getBetaSeeds()

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

calculate the beta seeds for a give MaximumData

Definition at line 1100 of file MuonStauRecoTool.cxx.

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

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

1397  {
1398  time -= 1.5;
1399  error *= 1.;
1400  }

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

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

◆ rpcTimeCalibration()

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

Definition at line 1401 of file MuonStauRecoTool.cxx.

1401  {
1402  time -= 0;
1403  error *= 0.5;
1404  }

◆ segmentTimeCalibration()

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

Definition at line 1405 of file MuonStauRecoTool.cxx.

1405  {
1406  time -= 1.5;
1407  error *= 1.;
1408  }

◆ 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

ToolHandle<Muon::MuonEDMPrinterTool> MuonCombined::MuonStauRecoTool::m_printer {this, "MuonEDMPrinterTool", "Muon::MuonEDMPrinterTool/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:1038
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
get_generator_info.result
result
Definition: get_generator_info.py:21
TrkDriftCircleMath::DCOnTrackVec
std::vector< DCOnTrack > DCOnTrackVec
Definition: DCOnTrack.h:59
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
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:604
MuGirlNS::StauExtras::betaAll
double betaAll
Definition: CandidateSummary.h:71
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
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:1418
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:43
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:136
MuonHough::MuonLayerHough::m_binsize
float m_binsize
Definition: MuonLayerHough.h:168
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:179
Trk::BoundaryCheckResult::Candidate
@ Candidate
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:71
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:423
MuonCombined::MuonStauRecoTool::m_printer
ToolHandle< Muon::MuonEDMPrinterTool > m_printer
Definition: MuonStauRecoTool.h:235
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
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:54
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:1241
Trk::locR
@ locR
Definition: ParamDefs.h:50
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:43
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:732
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:1195
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:920
TrkDriftCircleMath::DCOnTrack::errorTrack
void errorTrack(double error)
set track error
Definition: DCOnTrack.h:41
TrkDriftCircleMath::Segment
Definition: 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
MuonCombined::MuGirlLowBetaTag
TagBase implementation for a combined fit.
Definition: MuGirlLowBetaTag.h:27
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:1405
MuonHough::MuonLayerHough::Maximum::binposmin
int binposmin
Definition: MuonLayerHough.h:68
LB_AnalMapSplitter.rline
rline
Definition: LB_AnalMapSplitter.py:60
MuonHough::MuonLayerHough::Maximum
struct representing the maximum in the hough space
Definition: MuonLayerHough.h:56
Muon::MuonLayerHoughTool::MaximumVec
HoughDataPerSec::MaximumVec MaximumVec
Definition: MuonLayerHoughTool.h:64
MuonHough::MuonLayerHough::Maximum::theta
float theta
Definition: MuonLayerHough.h:61
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:1401
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:59
MuonHough::PhiHit::tgc
const Muon::TgcClusterObj3D * tgc
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLayerHough/MuonLayerHough/Hit.h:123
Trk::locZ
@ locZ
local cylindrical
Definition: ParamDefs.h:48
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:50
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:193
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:92
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
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
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
LArG4ShowerLibProcessing.hits
hits
Definition: LArG4ShowerLibProcessing.py:136
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: 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:264
Muon::MuonLayerHoughTool::PhiMaximumVec
HoughDataPerSec::PhiMaximumVec PhiMaximumVec
Definition: MuonLayerHoughTool.h:65
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:1397
MuonCombined::MuonStauRecoTool::createCandidates
bool createCandidates(const AssociatedData &associatedData, CandidateVec &candidates) const
create candidates from the beta seeds
Definition: MuonStauRecoTool.cxx:839
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:75
Muon::MuonDriftCircleErrorStrategy::Segment
@ Segment
Treating a segment or a track.
Definition: MuonDriftCircleErrorStrategy.h:33
Trk::Intersection::position
Amg::Vector3D position
Definition: Intersection.h:25
selection
std::string selection
Definition: fbtTestBasics.cxx:73
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:684
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:39
MuonCombined::MuonStauRecoTool::combineCandidates
bool combineCandidates(const EventContext &ctx, const xAOD::TrackParticle &indetTrackParticle, CandidateVec &candidates) const
combine reconstruction
Definition: MuonStauRecoTool.cxx:784
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:1410
MuonCombined::MuonStauRecoTool::associateHoughMaxima
void associateHoughMaxima(const EventContext &ctx, LayerData &layerData) const
associate Hough maxima to intersection
Definition: MuonStauRecoTool.cxx:1282
TrkDriftCircleMath::DCOnTrack::residual
void residual(double res)
set residual
Definition: DCOnTrack.h:35
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:122
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:1117
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:1100
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
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:1415
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:60
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:37
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:73
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:362
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
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:875
Trk::RIO_OnTrack::identify
virtual Identifier identify() const final
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:155
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:616
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
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
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:790
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:981
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:69
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