ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
MuonCombined::MuonCombinedFitTagTool Class Reference

#include <MuonCombinedFitTagTool.h>

Inheritance diagram for MuonCombined::MuonCombinedFitTagTool:
Collaboration diagram for MuonCombined::MuonCombinedFitTagTool:

Public Member Functions

 MuonCombinedFitTagTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~MuonCombinedFitTagTool ()=default
 
virtual StatusCode initialize () override
 
virtual void combine (const MuonCandidate &muonCandidate, const std::vector< const InDetCandidate * > &indetCandidates, InDetCandidateToTagMap &tagMap, TrackCollection *combTracks, TrackCollection *METracks, const EventContext &ctx) const override
 IMuonCombinedTagTool interface: build combined muons from a muon and a vector of indet candidates. More...
 
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

std::unique_ptr< Trk::TrackbuildCombinedTrack (const EventContext &ctx, const Trk::Track &indetTrack, const Trk::Track &spectrometerTrack, const Trk::Track *extrapolatedTrack) const
 
bool combinedTrackQualityCheck (const EventContext &ctx, const Trk::Track &combinedTrack, const Trk::Track &indetTrack) const
 
std::unique_ptr< Trk::TrackevaluateMatchProperties (const EventContext &ctx, const Trk::Track *combinedTrack, CombinedFitTag &tag, const xAOD::TrackParticle &idTrackParticle) const
 
bool extrapolatedNeedsRefit (const EventContext &ctx, const Trk::Track &combTrack, const Trk::Track *extrTrack) const
 
bool bestMatchChooser (const InDetCandidate &curCandidate, const CombinedFitTag &curTag, const Trk::Track &curTrack, const Trk::Track *curMETrack, const InDetCandidate &bestCandidate, const CombinedFitTag &bestTag, const Trk::Track &bestTrack, const Trk::Track *bestMETrack) const
 
void dumpCaloEloss (const EventContext &ctx, const Trk::Track *track, const std::string &txt) const
 
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

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 
ToolHandle< Muon::MuonEDMPrinterToolm_printer {this, "Printer", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"}
 
ToolHandle< Rec::ICombinedMuonTrackBuilderm_trackBuilder {this, "TrackBuilder", ""}
 
ToolHandle< Rec::ICombinedMuonTrackBuilderm_outwardsBuilder {this, "OutwardsTrackBuilder", ""}
 
ToolHandle< Rec::IMuonTrackQuerym_trackQuery {this, "TrackQuery", "Rec::MuonTrackQuery/MuonTrackQuery"}
 
ToolHandle< Rec::IMuonMomentumBalanceSignificancem_momentumBalanceTool
 
ToolHandle< Rec::IMuidMuonRecoverym_muonRecovery {this, "MuonRecovery", ""}
 
ToolHandle< Rec::IMuonMatchQualitym_matchQuality {this, "MatchQuality", "Rec::MuonMatchQuality/MuonMatchQuality"}
 
ToolHandle< Trk::ITrackScoringToolm_trackScoringTool {this, "TrackScoringTool", "Muon::MuonTrackScoringTool/MuonTrackScoringTool"}
 
Gaudi::Property< double > m_badFitChi2 {this, "BadFitChi2", 2.5}
 
Gaudi::Property< double > m_momentumBalanceCut {this, "MomentumBalanceCut", 6}
 
Gaudi::Property< double > m_indetPullCut {this, "IndetPullCut", 6}
 
Gaudi::Property< double > m_matchChiSquaredCut {this, "MatchChiSquaredCut", 30}
 
SG::ReadCondHandleKey< AtlasFieldCacheCondObjm_fieldCacheCondObjInputKey
 
SG::ReadHandleKey< xAOD::VertexContainerm_vertexKey {this, "VertexContainer", "PrimaryVertices", "primary vertex container"}
 
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

Definition at line 36 of file MuonCombinedFitTagTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ MuonCombinedFitTagTool()

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

Definition at line 38 of file MuonCombinedFitTagTool.cxx.

38  :
40  declareInterface<IMuonCombinedTagTool>(this);
41  }

◆ ~MuonCombinedFitTagTool()

virtual MuonCombined::MuonCombinedFitTagTool::~MuonCombinedFitTagTool ( )
virtualdefault

Member Function Documentation

◆ bestMatchChooser()

bool MuonCombined::MuonCombinedFitTagTool::bestMatchChooser ( const InDetCandidate curCandidate,
const CombinedFitTag curTag,
const Trk::Track curTrack,
const Trk::Track curMETrack,
const InDetCandidate bestCandidate,
const CombinedFitTag bestTag,
const Trk::Track bestTrack,
const Trk::Track bestMETrack 
) const
private

Definition at line 530 of file MuonCombinedFitTagTool.cxx.

535  {
536  // pointers to extrapolated track
537  const Trk::Track* curExtrTrack = curMETrack ? curMETrack : curTag.muonCandidate().extrapolatedTrack();
538  const Trk::Track* bestExtrTrack = bestMETrack ? bestMETrack : bestTag.muonCandidate().extrapolatedTrack();
539 
540  // 1 current
541  // 2 best
542  // returned bool: true means current is better; false means "best is better"
543 
544  const double matchChiSq1 = curTag.matchChi2();
545  const double matchChiSq2 = bestTag.matchChi2();
546  const Trk::TrackSummary* summary1 = curTrack.trackSummary();
547  const Trk::TrackSummary* summary2 = bestTrack.trackSummary();
548  ATH_MSG_VERBOSE("bestMatchChooser: matchChiSq " << matchChiSq1 << " " << matchChiSq2);
549  if (summary1 && summary2) {
550  ATH_MSG_VERBOSE("bestMatchChooser: matchChiSq " << matchChiSq1 << " " << matchChiSq2 << " numTRTHits "
551  << summary1->get(Trk::numberOfTRTHits) << " "
552  << summary2->get(Trk::numberOfTRTHits) << " field integrals: ID "
553  << curTag.fieldIntegral().betweenInDetMeasurements() << " "
554  << bestTag.fieldIntegral().betweenInDetMeasurements() << " MS "
555  << curTag.fieldIntegral().betweenSpectrometerMeasurements() << " "
556  << bestTag.fieldIntegral().betweenSpectrometerMeasurements());
557  } else {
558  ATH_MSG_VERBOSE("bestMatchChooser: matchChiSq " << matchChiSq1 << " " << matchChiSq2);
559  }
560 
561  // selection when only one match has a good combined fit
562  const double fitChiSq1 = chi2(curTrack.fitQuality());
563  const double fitChiSq2 = chi2(bestTrack.fitQuality());
564  const unsigned int numberDoF1 = curTrack.fitQuality()->numberDoF();
565  const unsigned int numberDoF2 = bestTrack.fitQuality()->numberDoF();
566  ATH_MSG_VERBOSE("bestMatchChooser: fitChiSq " << fitChiSq1 << " " << fitChiSq2);
567  if (std::abs(fitChiSq1 - fitChiSq2) > m_badFitChi2) {
568  if (fitChiSq1 < m_badFitChi2) {
569  if (matchChiSq1 > matchChiSq2 && matchChiSq2 < m_matchChiSquaredCut) { // may want to suppress this warning!
570  ATH_MSG_DEBUG("bestMatchChooser: choose worse, but acceptable, matchChiSq as better fitChiSq. "
571  << " matchChiSq 1,2 " << matchChiSq1 << ", " << matchChiSq2 << " fitChiSq/DoF 1,2 " << fitChiSq1
572  << "/" << numberDoF1 << ", " << fitChiSq2 << "/" << numberDoF2);
573  }
574  return true;
575  }
576  if (fitChiSq2 < m_badFitChi2) {
577  if (matchChiSq1 < matchChiSq2 && matchChiSq1 < m_matchChiSquaredCut) { // may want to suppress this warning!
578  ATH_MSG_DEBUG("bestMatchChooser: choose worse, but acceptable, matchChiSq as better fitChiSq. "
579  << " matchChiSq 1,2 " << matchChiSq1 << ", " << matchChiSq2 << " fitChiSq/DoF 1,2 " << fitChiSq1
580  << "/" << numberDoF1 << ", " << fitChiSq2 << "/" << numberDoF2);
581  }
582  return false;
583  }
584  }
585 
586  // selection when only one match has a good match chi2
587  if (std::abs(matchChiSq1 - matchChiSq2) > m_matchChiSquaredCut) {
588  if (matchChiSq1 < m_matchChiSquaredCut) return true;
589  if (matchChiSq2 < m_matchChiSquaredCut) return false;
590  }
591 
592  // energy balance (absolute)
593  // track length:
594  // field integral
595  // # MS stations
596  // pixel hits (-outliers)
597  // trt drift hits + outliers
598 
599  // protect momentum balance and field integral when magnets off:
600  if (!curCandidate.indetTrackParticle().track()->info().trackProperties(Trk::TrackInfo::StraightTrack)) {
601  double cutRatio{1.5}, integral1{0.}, integral2{0.};
602 
603  if (curExtrTrack && !curExtrTrack->info().trackProperties(Trk::TrackInfo::StraightTrack) && bestExtrTrack &&
605  // selection when only one match has good momentum balance or a significantly better balance
606  ATH_MSG_VERBOSE("bestMatchChooser: momentumBalanceSignificance " << curTag.momentumBalanceSignificance() << " "
607  << bestTag.momentumBalanceSignificance());
608  double significanceCut = 2.0;
609  const double significance1 = std::abs(curTag.momentumBalanceSignificance());
610  const double significance2 = std::abs(bestTag.momentumBalanceSignificance());
611  if (std::abs(significance1 - significance2) > significanceCut) {
612  if (significance1 < significanceCut) {
613  if (matchChiSq1 > matchChiSq2 && matchChiSq2 < m_matchChiSquaredCut) {
614  // NOT choosing bestMatchChi2:
615  ATH_MSG_DEBUG("bestMatchChooser: choose worse, but acceptable, matchChiSq as better momentum balance. "
616  << " matchChiSq 1,2 " << matchChiSq1 << ", " << matchChiSq2
617  << " momentumBalanceSignificance 1,2 " << curTag.momentumBalanceSignificance() << ", "
618  << bestTag.momentumBalanceSignificance());
619  }
620  return true;
621  }
622  if (significance2 < significanceCut) {
623  if (matchChiSq1 < matchChiSq2 && matchChiSq1 < m_matchChiSquaredCut) {
624  // NOT choosing bestMatchChi2:
625  ATH_MSG_DEBUG("bestMatchChooser: choose worse, but acceptable, matchChiSq as better momentum balance. "
626  << " matchChiSq 1,2 " << matchChiSq1 << ", " << matchChiSq2
627  << " momentumBalanceSignificance 1,2 " << curTag.momentumBalanceSignificance() << ", "
628  << bestTag.momentumBalanceSignificance());
629  }
630  return false;
631  }
632  }
633 
634  // keep significantly larger measured field integral
635  // for MS
636  ATH_MSG_VERBOSE("bestMatchChooser: spectrometer field integral ratio ");
637  integral1 = std::abs(curTag.fieldIntegral().betweenSpectrometerMeasurements());
638  integral2 = std::abs(bestTag.fieldIntegral().betweenSpectrometerMeasurements());
639  if (integral1 > cutRatio * integral2) return true;
640  if (integral2 > cutRatio * integral1) return false;
641  }
642  // for indet
643  ATH_MSG_VERBOSE("bestMatchChooser: indet field integral ratio ");
644  integral1 = std::abs(curTag.fieldIntegral().betweenInDetMeasurements());
645  integral2 = std::abs(bestTag.fieldIntegral().betweenInDetMeasurements());
646  if (integral1 > cutRatio * integral2) return true;
647  if (integral2 > cutRatio * integral1) return false;
648  }
649 
650  // repeat fit/match quality selection with sharper cuts (times 2)
651  ATH_MSG_VERBOSE("bestMatchChooser: sharp fit chi2 cut ");
652  if (std::abs(fitChiSq1 - fitChiSq2) > 0.5 * m_badFitChi2) {
653  if (fitChiSq1 < 0.5 * m_badFitChi2) {
654  if (matchChiSq1 > matchChiSq2 && matchChiSq2 < m_matchChiSquaredCut) {
655  // NOT choosing bestMatchChi2:
656  ATH_MSG_DEBUG("bestMatchChooser: choose worse, but acceptable, matchChiSq according to overall quality. "
657  << " matchChiSq 1,2 " << matchChiSq1 << ", " << matchChiSq2 << " fitChiSq/DoF 1,2 " << fitChiSq1
658  << "/" << numberDoF1 << ", " << fitChiSq2 << "/" << numberDoF2);
659  }
660  return true;
661  }
662  if (fitChiSq2 < 0.5 * m_badFitChi2) {
663  if (matchChiSq1 < matchChiSq2 && matchChiSq1 < m_matchChiSquaredCut) {
664  // NOT choosing bestMatchChi2:
665  ATH_MSG_DEBUG("bestMatchChooser: choose worse, but acceptable, matchChiSq according to overall quality. "
666  << " matchChiSq 1,2 " << matchChiSq1 << ", " << matchChiSq2 << " fitChiSq/DoF 1,2 " << fitChiSq1
667  << "/" << numberDoF1 << ", " << fitChiSq2 << "/" << numberDoF2);
668  }
669  return false;
670  }
671  }
672 
673  ATH_MSG_VERBOSE("bestMatchChooser: sharp match chi2 cut ");
674  if (std::abs(matchChiSq1 - matchChiSq2) > 0.5 * m_matchChiSquaredCut) {
675  if (matchChiSq1 < 0.5 * m_matchChiSquaredCut) return true;
676  if (matchChiSq2 < 0.5 * m_matchChiSquaredCut) return false;
677  }
678 
679  // track quality:
680  // pixel holes (outliers)
681  // silicon holes + outliers
682  // trt drift hits + outliers
683 
684  // kink finding:
685  // neighbour signif
686  // curvature signif
687 
688  // energy balance (absolute)
689 
690  // field off protection
691  if (curExtrTrack && curExtrTrack->info().trackProperties(Trk::TrackInfo::StraightTrack) && bestExtrTrack &&
693  // best fit chi2
694  return fitChiSq1 < fitChiSq2;
695  } else {
696  // best match chi2
697  return matchChiSq1 < matchChiSq2;
698  }
699  }

◆ buildCombinedTrack()

std::unique_ptr< Trk::Track > MuonCombined::MuonCombinedFitTagTool::buildCombinedTrack ( const EventContext &  ctx,
const Trk::Track indetTrack,
const Trk::Track spectrometerTrack,
const Trk::Track extrapolatedTrack 
) const
private

Definition at line 196 of file MuonCombinedFitTagTool.cxx.

199  {
200  // if no extrapolation is available
201  if (!extrapolatedTrack) extrapolatedTrack = &spectrometerTrack;
202  // build and fit the combined track
203  std::unique_ptr<Trk::Track> combinedTrack;
204  double combinedFitChi2 = 9999.;
205  if (!m_trackBuilder.empty()) {
206  combinedTrack = m_trackBuilder->combinedFit(ctx, indetTrack, *extrapolatedTrack, spectrometerTrack);
207  if (combinedTrack && combinedTrack->fitQuality()) {
208  combinedTrack->info().addPatternReco(extrapolatedTrack->info());
209  combinedFitChi2 = chi2(combinedTrack->fitQuality());
210  }
211  }
212  if (combinedFitChi2 > m_badFitChi2 && !m_outwardsBuilder.empty()) {
213  std::unique_ptr<Trk::Track> outwardsTrack(
214  m_outwardsBuilder->combinedFit(ctx, indetTrack, *extrapolatedTrack, spectrometerTrack));
215  if (outwardsTrack && chi2(outwardsTrack->fitQuality()) < combinedFitChi2) {
216  ATH_MSG_VERBOSE("buildCombinedTrack: choose outwards track");
217  outwardsTrack->info().addPatternReco(spectrometerTrack.info());
218  combinedTrack.swap(outwardsTrack);
219  }
220  }
221 
222  // filter out rubbish fits
223  if (combinedTrack && combinedTrackQualityCheck(ctx, *combinedTrack, indetTrack)) {
224  combinedTrack->info().addPatternReco(indetTrack.info());
225  combinedTrack->info().setParticleHypothesis(Trk::muon);
226  combinedTrack->info().setPatternRecognitionInfo(Trk::TrackInfo::MuidCombined);
227  return combinedTrack;
228  }
229  return nullptr;
230  }

◆ combine()

void MuonCombined::MuonCombinedFitTagTool::combine ( const MuonCandidate muonCandidate,
const std::vector< const InDetCandidate * > &  indetCandidates,
InDetCandidateToTagMap tagMap,
TrackCollection combTracks,
TrackCollection METracks,
const EventContext &  ctx 
) const
overridevirtual

IMuonCombinedTagTool interface: build combined muons from a muon and a vector of indet candidates.

Sort such that the track with the largest probability comes first

try recovery

Implements MuonCombined::IMuonCombinedTagTool.

Definition at line 63 of file MuonCombinedFitTagTool.cxx.

65  {
66  ATH_MSG_DEBUG("muon candidate: " << muonCandidate.toString());
67 
68  std::unique_ptr<CombinedFitTag> bestTag, currentTag;
69  std::unique_ptr<Trk::Track> bestCombTrack, bestMETrack, combinedTrack, METrack;
70  const InDetCandidate* bestCandidate = nullptr;
71 
72  // map of ID candidates by max probability of match (based on match chi2 at IP and MS entrance)
73  using InDetProbMatch = std::pair<double, const InDetCandidate*>;
74  std::vector<InDetProbMatch> sortedInDetCandidates;
75  sortedInDetCandidates.reserve(indetCandidates.size());
76  // loop over ID candidates
77  for (const MuonCombined::InDetCandidate* idTP : indetCandidates) {
78  const Trk::Track* id_track = idTP->indetTrackParticle().track();
79  double outerMatchProb = m_matchQuality->outerMatchProbability(*id_track, muonCandidate.muonSpectrometerTrack(), ctx);
80  double innerMatchProb = -1;
81  if (muonCandidate.extrapolatedTrack())
82  innerMatchProb = m_matchQuality->innerMatchProbability(*id_track, *muonCandidate.extrapolatedTrack(), ctx);
83  const double maxProb = std::max(outerMatchProb, innerMatchProb);
84  sortedInDetCandidates.emplace_back(maxProb, idTP);
85  }
87  std::sort(sortedInDetCandidates.begin(), sortedInDetCandidates.end(),
88  [](const InDetProbMatch& a, const InDetProbMatch& b) { return a.first > b.first; });
89 
90  bool fitBadMatches = false;
91  for (const InDetProbMatch& cand_prob : sortedInDetCandidates) {
92  ATH_MSG_DEBUG("in det candidate prob: " << cand_prob.first);
93  if (cand_prob.first < probCut && !fitBadMatches) {
94  if (!bestCombTrack) {
95  ATH_MSG_DEBUG("no combined track yet, keep fitting");
96  fitBadMatches = true;
97  } else {
98  ATH_MSG_DEBUG("combined track found, we're done here");
99  break;
100  }
101  }
102  const Trk::Track* id_track = cand_prob.second->indetTrackParticle().track();
103  ATH_MSG_DEBUG("Doing combined fit with ID track " << cand_prob.second->toString());
104  ATH_MSG_DEBUG("Doing combined fit with MS track " << muonCandidate.toString());
105 
106  // fit the combined ID-MS track
107  combinedTrack = buildCombinedTrack(ctx, *id_track, muonCandidate.muonSpectrometerTrack(), muonCandidate.extrapolatedTrack());
108  if (!combinedTrack) {
109  ATH_MSG_DEBUG("Combination fit failed");
110  continue;
111  }
112 
113  if (msgLevel() >= MSG::DEBUG) {
114  dumpCaloEloss(ctx, combinedTrack.get(), "Combined Track ");
115  dumpCaloEloss(ctx, muonCandidate.extrapolatedTrack(), "Extrapolated Track ");
116  }
117 
118  // calculate track score
120 
121  // add fit info into tag object
122  currentTag = std::make_unique<CombinedFitTag>(xAOD::Muon::MuidCo, muonCandidate, score);
123 
124  // re-fit standalone track (if needed) and store output into tag object
125  METrack = evaluateMatchProperties(ctx, combinedTrack.get(), *currentTag, cand_prob.second->indetTrackParticle());
126 
127  // select the best combined track
128  if (!bestCandidate || bestMatchChooser(*cand_prob.second, *currentTag, *combinedTrack, METrack.get(), *bestCandidate, *bestTag,
129  *bestCombTrack, bestMETrack.get())) {
130  bestCandidate = cand_prob.second;
131  bestTag.swap(currentTag);
132  bestCombTrack.swap(combinedTrack);
133  bestMETrack.swap(METrack);
134  }
135  }
137  if (!bestCandidate && !m_muonRecovery.empty()) {
138  for (const InDetProbMatch& cand_prob : sortedInDetCandidates) {
139  const Trk::Track* id_track = cand_prob.second->indetTrackParticle().track();
140  combinedTrack = m_muonRecovery->recoverableMatch(*id_track, muonCandidate.muonSpectrometerTrack(), ctx);
141  if (combinedTrack && combinedTrackQualityCheck(ctx, *combinedTrack, *id_track)) {
142  combinedTrack->info().addPatternReco(id_track->info());
143  combinedTrack->info().addPatternReco(muonCandidate.muonSpectrometerTrack().info());
144  combinedTrack->info().setParticleHypothesis(Trk::muon);
145  combinedTrack->info().setPatternRecognitionInfo(Trk::TrackInfo::MuidCombined);
146  // calculate track score
148 
149  // add fit info into tag object
150  currentTag = std::make_unique<CombinedFitTag>(xAOD::Muon::MuidCo, muonCandidate, score);
151 
152  if (msgLevel() >= MSG::DEBUG) {
153  dumpCaloEloss(ctx, combinedTrack.get(), "Recovery Combined Track ");
154  dumpCaloEloss(ctx, muonCandidate.extrapolatedTrack(), "Recovery Extrapolated Track ");
155  }
156 
157  // re-fit standalone track (if needed) and store output into tag object
158  METrack = evaluateMatchProperties(ctx, combinedTrack.get(), *currentTag, cand_prob.second->indetTrackParticle());
159 
160  // select the best combined track
161  if (!bestCandidate || bestMatchChooser(*cand_prob.second, *currentTag, *combinedTrack, METrack.get(), *bestCandidate,
162  *bestTag, *bestCombTrack, bestMETrack.get())) {
163  bestCandidate = cand_prob.second;
164  bestTag.swap(currentTag);
165  bestCombTrack.swap(combinedTrack);
166  bestMETrack.swap(METrack);
167  }
168  }
169  }
170  }
171 
172  if (bestCandidate) {
173  // take the best MS Track, first the update extrapolated, than the extrapolated, last the spectrometer track
174  if (msgLevel() >= MSG::DEBUG && bestMETrack) {
175  dumpCaloEloss(ctx, bestCombTrack.get(), " bestCandidate Combined Track ");
176  dumpCaloEloss(ctx, bestMETrack.get(), " bestCandidate Extrapolated Track ");
177  }
178  ATH_MSG_DEBUG("Final combined muon: " << m_printer->print(*bestCombTrack));
179  ATH_MSG_DEBUG(m_printer->printStations(*bestCombTrack));
180  ATH_MSG_DEBUG("Combined Muon with ID " << m_printer->print(bestCandidate->indetTrackParticle().perigeeParameters())
181  << " match chi2 " << bestTag->matchChi2());
182  combTracks->push_back(std::move(bestCombTrack));
183  ElementLink<TrackCollection> comblink(*combTracks, combTracks->size() - 1);
184  bestTag->setCombinedTrackLink(comblink);
185  if (bestMETrack) {
186  METracks->push_back(std::move(bestMETrack));
187  ElementLink<TrackCollection> melink(*METracks, METracks->size() - 1);
188  bestTag->setUpdatedExtrapolatedTrackLink(melink);
189  } else {
190  bestTag->setUpdatedExtrapolatedTrackLink(ElementLink<TrackCollection>());
191  }
192  tagMap.addEntry(bestCandidate, bestTag.release());
193  }
194  }

◆ combinedTrackQualityCheck()

bool MuonCombined::MuonCombinedFitTagTool::combinedTrackQualityCheck ( const EventContext &  ctx,
const Trk::Track combinedTrack,
const Trk::Track indetTrack 
) const
private

Definition at line 232 of file MuonCombinedFitTagTool.cxx.

234  {
235  // require calo correctly associated to track
236  if (!m_trackQuery->isCaloAssociated(combinedTrack, ctx)) {
237  ATH_MSG_DEBUG(" No Calorimeter CaloDeposit found on combined track ");
238  return false;
239  }
240  // loose cut on momentumBalanceSignificance
241  double significance = m_momentumBalanceTool->momentumBalanceSignificance(combinedTrack);
242  if (std::abs(significance) > m_momentumBalanceCut) {
243  ATH_MSG_DEBUG(" combinedTrackQualityCheck fails with momentumBalanceSignificance " << significance);
244  return false;
245  }
246 
247  // loose cut on indet/combined q/p pull (not applicable to indet line fit)
249  const Trk::Perigee* combinedPerigee = combinedTrack.perigeeParameters();
250  const Trk::Perigee* indetPerigee = indetTrack.perigeeParameters();
251  if (combinedPerigee->covariance() && indetPerigee->covariance()) {
252  const double dpOverP2 = Amg::error(*combinedPerigee->covariance(), Trk::qOverP) * combinedPerigee->momentum().mag2();
253  if (dpOverP2 < 1.E-6) {
254  // fail with unphysical momentum covariance
255  ATH_MSG_DEBUG("combinedTrackQualityCheck: fail with unphysical momentum covariance");
256  return false;
257  }
258  const double sigma = Amg::error(*indetPerigee->covariance(), Trk::qOverP);
259  const double pull = (combinedPerigee->parameters()[Trk::qOverP] - indetPerigee->parameters()[Trk::qOverP]) / sigma;
260 
261  if (std::abs(pull) > m_indetPullCut) {
262  // fail with too high momentum pull
263  ATH_MSG_DEBUG("combinedTrackQualityCheck: fail with momentum pull above cut: "
264  << pull << " pid " << 1. / indetPerigee->parameters()[Trk::qOverP] << " pcb "
265  << 1. / combinedPerigee->parameters()[Trk::qOverP] << " 1./sigma " << 1. / sigma);
266  return false;
267  }
268  } else
269  return false;
270  }
271  return true;
272  }

◆ 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; }

◆ dumpCaloEloss()

void MuonCombined::MuonCombinedFitTagTool::dumpCaloEloss ( const EventContext &  ctx,
const Trk::Track track,
const std::string &  txt 
) const
private

Definition at line 378 of file MuonCombinedFitTagTool.cxx.

378  {
379  // will refit if extrapolated track was definitely bad
380  if (!inTrack) return;
381  if (!m_trackQuery->isCaloAssociated(*inTrack, ctx)) {
382  ATH_MSG_DEBUG(txt << " no TSOS in Calorimeter ");
383  return;
384  }
385  const Trk::Track& originalTrack = *inTrack;
386  const CaloEnergy* caloEnergy = m_trackQuery->caloEnergy(originalTrack);
387  if (caloEnergy) {
388  ATH_MSG_DEBUG(txt << " Calorimeter Eloss " << caloEnergy->deltaE());
389  } else {
390  ATH_MSG_DEBUG(txt << " No Calorimeter Eloss");
391  }
392 
393  const Trk::TrackStates* trackTSOS = inTrack->trackStateOnSurfaces();
394 
395  double Eloss{0.}, idEloss{0.}, caloEloss{0.}, msEloss{0.}, deltaP{0.},
396  pcalo{0.}, pstart{0.},eta{0.}, pMuonEntry{0.};
397  for (const Trk::TrackStateOnSurface* m : *trackTSOS) {
398  const Trk::MeasurementBase* mot = m->measurementOnTrack();
399  if (m->trackParameters()) pMuonEntry = m->trackParameters()->momentum().mag();
400  if (mot) {
402  if (id.is_valid()) {
403  // skip after first Muon hit
404  if (m_idHelperSvc->isMuon(id)) break;
405  }
406  }
407  if (pstart == 0 && m->trackParameters()) {
408  pstart = m->trackParameters()->momentum().mag();
409  eta = m->trackParameters()->momentum().eta();
410  ATH_MSG_DEBUG("Start pars found eta " << eta << " r " << (m->trackParameters())->position().perp() << " z "
411  << (m->trackParameters())->position().z() << " pstart " << pstart);
412  }
413  if (m->materialEffectsOnTrack()) {
414  const Trk::MaterialEffectsOnTrack* meot = dynamic_cast<const Trk::MaterialEffectsOnTrack*>(m->materialEffectsOnTrack());
415  if (meot) {
416  if (meot->thicknessInX0() > 20) {
417  const Trk::ScatteringAngles* scatAngles = meot->scatteringAngles();
418  ATH_MSG_DEBUG(" Calorimeter X0 " << meot->thicknessInX0() << " pointer scat " << scatAngles);
419  if (scatAngles) {
420  pcalo = m->trackParameters()->momentum().mag();
421  const double pullPhi = scatAngles->deltaPhi() / scatAngles->sigmaDeltaPhi();
422  const double pullTheta = scatAngles->deltaTheta() / scatAngles->sigmaDeltaTheta();
423  ATH_MSG_DEBUG(" Calorimeter scatterer deltaPhi " << scatAngles->deltaPhi() << " pull " << pullPhi
424  << " deltaTheta " << scatAngles->deltaTheta() << " pull "
425  << pullTheta);
426  }
427  }
428  const Trk::EnergyLoss* energyLoss = meot->energyLoss();
429  if (energyLoss) {
430  ATH_MSG_DEBUG("Eloss found r " << (m->trackParameters())->position().perp() << " z "
431  << (m->trackParameters())->position().z() << " value " << energyLoss->deltaE()
432  << " Eloss " << Eloss);
434  idEloss = Eloss;
435  caloEloss = std::abs(energyLoss->deltaE());
436  Eloss = 0.;
437  deltaP = m->trackParameters()->momentum().mag() - pcalo;
438  const Trk::Surface& surface = m->surface();
439  ATH_MSG_DEBUG(" Calorimeter surface " << surface);
440  ATH_MSG_DEBUG(txt << " Calorimeter delta p " << deltaP << " deltaE " << caloEloss
441  << " delta pID = pcaloEntry-pstart " << pcalo - pstart);
442  } else {
443  Eloss += std::abs(energyLoss->deltaE());
444  }
445  }
446  }
447  }
448  }
449  msEloss = Eloss;
450  Eloss = idEloss + caloEloss + msEloss;
451  ATH_MSG_DEBUG(txt << " eta " << eta << " pstart " << pstart / 1000. << " Eloss on TSOS idEloss " << idEloss << " caloEloss "
452  << caloEloss << " msEloss " << msEloss << " Total " << Eloss << " pstart - pMuonEntry " << pstart - pMuonEntry);
453  }

◆ evaluateMatchProperties()

std::unique_ptr< Trk::Track > MuonCombined::MuonCombinedFitTagTool::evaluateMatchProperties ( const EventContext &  ctx,
const Trk::Track combinedTrack,
CombinedFitTag tag,
const xAOD::TrackParticle idTrackParticle 
) const
private

Definition at line 274 of file MuonCombinedFitTagTool.cxx.

276  {
277  const Trk::Track& idTrack = *idTrackParticle.track();
278  // evaluate field integral and momentum balance significance for combined track
279  tag.fieldIntegral(m_trackQuery->fieldIntegral(*combinedTrack, ctx));
280  tag.momentumBalanceSignificance(m_momentumBalanceTool->momentumBalanceSignificance(*combinedTrack));
281 
282  if (tag.muonCandidate().extrapolatedTrack()) {
283  std::pair<int, std::pair<double, double> > aTriad =
284  m_matchQuality->innerMatchAll(idTrack, *tag.muonCandidate().extrapolatedTrack(), ctx);
285  const int matchDoF = aTriad.first;
286  const double matchChi2 = aTriad.second.first;
287  const double matchProb = aTriad.second.second;
288  // store the inner matching quality in the tag object
289  tag.innerMatch(matchChi2, matchDoF, matchProb);
290  ATH_MSG_DEBUG(" extrapolatedTrack innerMatch " << matchChi2);
291  }
292 
293  // refit extrapolated from combined track (i.e. after cleaning)
294  std::unique_ptr<Trk::Track> refittedExtrapolatedTrack;
295  bool dorefit = true;
296 
297  // no SA refit for Toroid off
298  MagField::AtlasFieldCache fieldCache;
299  // Get field cache object
300 
302  const AtlasFieldCacheCondObj* fieldCondObj{*readHandle};
303 
304  if (!fieldCondObj) {
305  ATH_MSG_ERROR("Failed to retrieve AtlasFieldCacheCondObj with key " << m_fieldCacheCondObjInputKey.key());
306  return nullptr;
307  }
308  fieldCondObj->getInitializedCache(fieldCache);
309  if (!fieldCache.toroidOn()) dorefit = false;
310 
311  Amg::Vector3D origin{0., 0., 0.};
312 
313  const xAOD::Vertex* matchedVertex{nullptr};
314  if (!m_vertexKey.empty()) {
316  if (vertices.isValid()) {
317  for (const xAOD::Vertex* vx : *vertices) {
318  for (const auto& tpLink : vx->trackParticleLinks()) {
319  if (*tpLink == &idTrackParticle) {
320  matchedVertex = vx;
321  break;
322  }
323  }
324  if (matchedVertex) break;
325  }
326  }
327  }
328  if (matchedVertex) {
329  origin = Amg::Vector3D{matchedVertex->x(), matchedVertex->y(), matchedVertex->z()};
330  ATH_MSG_DEBUG(" found matched vertex bs " << origin);
331  } else {
332  // take for beamspot point of closest approach of ID track in x y z
333  origin[Amg::x] = -idTrackParticle.d0() * std::sin(idTrackParticle.phi()) + idTrackParticle.vx();
334  origin[Amg::y] = idTrackParticle.d0() * std::cos(idTrackParticle.phi()) + idTrackParticle.vy();
335  origin[Amg::z] = idTrackParticle.z0() + idTrackParticle.vz();
336  ATH_MSG_DEBUG(" NO matched vertex take track perigee " << origin);
337  }
338 
339  ATH_MSG_DEBUG(" refit SA track " << dorefit);
340  if (dorefit) {
341  if (!m_trackBuilder.empty()) refittedExtrapolatedTrack = m_trackBuilder->standaloneRefit(ctx, *combinedTrack, origin);
342  if (!refittedExtrapolatedTrack && !m_outwardsBuilder.empty())
343  refittedExtrapolatedTrack = m_outwardsBuilder->standaloneRefit(ctx, *combinedTrack, origin);
344  }
345  // include vertex region pseudo for extrapolation failure
346  unsigned numberPseudo =
347  tag.muonCandidate().extrapolatedTrack() ? m_trackQuery->numberPseudoMeasurements(*tag.muonCandidate().extrapolatedTrack()) : 1;
348 
349  // get track quality and store
350  if (refittedExtrapolatedTrack) {
351  std::pair<int, std::pair<double, double> > aTriad = m_matchQuality->innerMatchAll(idTrack, *refittedExtrapolatedTrack, ctx);
352  const int matchDoF = aTriad.first;
353  const double matchChi2 = aTriad.second.first;
354  const double matchProb = aTriad.second.second;
355 
356  // store the inner matching quality in the tag object
357  tag.innerMatch(matchChi2, matchDoF, matchProb);
358  ATH_MSG_DEBUG(" refittedExtrapolatedTrack innerMatch " << matchChi2);
359 
360  // print comparison with original track
361  if (tag.muonCandidate().extrapolatedTrack()) {
362  double oldmatchChi2 = m_matchQuality->innerMatchChi2(idTrack, *tag.muonCandidate().extrapolatedTrack(), ctx);
363 
364  ATH_MSG_VERBOSE("evaluateMatchProperties: chi2 re-evaluated from " << oldmatchChi2 << " to " << matchChi2);
365 
366  if (matchChi2 > 1.1 * oldmatchChi2)
367  ATH_MSG_DEBUG("evaluateMatchProperties: chi2 got worse: from " << oldmatchChi2 << " to " << matchChi2);
368  } else
369  ATH_MSG_VERBOSE("evaluateMatchProperties: added new extrapolated track with chi2 " << matchChi2);
370 
371  } else if (!numberPseudo) {
372  // failed re-evaluation of match chi2
373  ATH_MSG_DEBUG("evaluateMatchProperties: fail re-evaluation of match chi2");
374  }
375  return refittedExtrapolatedTrack;
376  }

◆ 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; }

◆ 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

◆ extrapolatedNeedsRefit()

bool MuonCombined::MuonCombinedFitTagTool::extrapolatedNeedsRefit ( const EventContext &  ctx,
const Trk::Track combTrack,
const Trk::Track extrTrack 
) const
private

Definition at line 455 of file MuonCombinedFitTagTool.cxx.

455  {
456  // will refit if extrapolated track was definitely bad
457  if (!extrTrack) return true;
458  if (!m_trackQuery->isCaloAssociated(*extrTrack, ctx)) return true;
459 
460  // otherwise will keep original SA fit if no change to MS or Calo TSOS
461  const Trk::Track& originalTrack = *extrTrack;
462 
463  // refit if bad extrapolated fit - otherwise no refit if bad combined fit
464  if (chi2(originalTrack.fitQuality()) > m_badFitChi2) return true;
465 
466  if (chi2(combTrack.fitQuality()) > m_badFitChi2) return true;
467 
468  // check if need to update calo association
469  const CaloEnergy* caloEnergyCombined = m_trackQuery->caloEnergy(combTrack);
470  const CaloEnergy* caloEnergyExtrapolated = m_trackQuery->caloEnergy(originalTrack);
471  if (!caloEnergyCombined || !caloEnergyExtrapolated) {
472  // no refit for combined track without CaloEnergy
473  ATH_MSG_VERBOSE("extrapolatedNeedsRefit: no refit for combined track without CaloEnergy");
474  return false;
475  }
476  double deltaE = caloEnergyExtrapolated->deltaE() - caloEnergyCombined->deltaE();
477  if (std::abs(deltaE) > 0.3 * caloEnergyExtrapolated->sigmaDeltaE()) {
478  ATH_MSG_VERBOSE("extrapolatedNeedsRefit: caloEnergy difference " << deltaE << " sigma "
479  << caloEnergyExtrapolated->sigmaDeltaE() << " ratio "
480  << deltaE / caloEnergyExtrapolated->sigmaDeltaE());
481  return true;
482  }
483 
486  for (; o != originalTrack.trackStateOnSurfaces()->rend(); ++o) {
487  if (dynamic_cast<const Trk::PerigeeSurface*>(&(**o).surface())) break;
488 
489  // compare measurements
490  if ((**o).measurementOnTrack() && (**o).trackParameters()) {
491  // check measurements in phase
492  while (c != combTrack.trackStateOnSurfaces()->rend() && (!(**c).measurementOnTrack() || !(**c).trackParameters())) ++c;
493 
494  if (c == combTrack.trackStateOnSurfaces()->rend()) continue;
495 
496  double separation =
497  ((**o).trackParameters()->associatedSurface().center() - (**c).trackParameters()->associatedSurface().center()).mag();
498  if (std::abs(separation) > 1. * CLHEP::mm) {
499  ATH_MSG_VERBOSE("extrapolatedNeedsRefit: measurement out-of-phase: "
500  << " separation " << separation << " extrap " << (**o).trackParameters()->associatedSurface().center()
501  << " comb " << (**c).trackParameters()->associatedSurface().center());
502  return true;
503  }
504 
505  // different outlier
507  if ((**c).type(Trk::TrackStateOnSurface::Outlier)) {
508  ATH_MSG_VERBOSE("extrapolatedNeedsRefit: outlier only on combined track ");
509  } else {
510  ATH_MSG_VERBOSE("extrapolatedNeedsRefit: outlier only on extrapolated track ");
511  }
512  return true;
513  }
514 
515  // drift sign flip
516  if (dynamic_cast<const Muon::MdtDriftCircleOnTrack*>((**o).measurementOnTrack())) {
517  if ((**o).measurementOnTrack()->localParameters()[Trk::driftRadius] *
518  (**c).measurementOnTrack()->localParameters()[Trk::driftRadius] <
519  0.) {
520  ATH_MSG_VERBOSE("extrapolatedNeedsRefit: drift sign flip ");
521  return true;
522  }
523  }
524  ++c;
525  }
526  }
527  return false;
528  }

◆ initialize()

StatusCode MuonCombined::MuonCombinedFitTagTool::initialize ( )
overridevirtual

handle to the magnetic field cache

Definition at line 43 of file MuonCombinedFitTagTool.cxx.

43  {
44  ATH_MSG_INFO("Initializing MuonCombinedFitTagTool");
45 
46  ATH_CHECK(m_printer.retrieve());
47  ATH_CHECK(m_trackBuilder.retrieve());
48  if (!m_outwardsBuilder.empty()) ATH_CHECK(m_outwardsBuilder.retrieve());
49  ATH_CHECK(m_trackQuery.retrieve());
50  ATH_CHECK(m_momentumBalanceTool.retrieve());
51  if (!m_muonRecovery.empty()) ATH_CHECK(m_muonRecovery.retrieve());
52  ATH_CHECK(m_matchQuality.retrieve());
53  ATH_CHECK(m_trackScoringTool.retrieve());
56 
57  // The trigger doesn't use the vertex information
58  if (!m_vertexKey.empty()) ATH_CHECK(m_vertexKey.initialize());
59 
60  return StatusCode::SUCCESS;
61  }

◆ 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::IMuonCombinedTagTool::interfaceID ( )
inlinestaticinherited

Definition at line 25 of file IMuonCombinedTagTool.h.

25  {
26  static const InterfaceID IID_IMuonCombinedTagTool("MuonCombined::IMuonCombinedTagTool", 1, 0);
27  return IID_IMuonCombinedTagTool;
28  }

◆ 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.

◆ 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  }

◆ 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_badFitChi2

Gaudi::Property<double> MuonCombined::MuonCombinedFitTagTool::m_badFitChi2 {this, "BadFitChi2", 2.5}
private

Definition at line 77 of file MuonCombinedFitTagTool.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_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_fieldCacheCondObjInputKey

SG::ReadCondHandleKey<AtlasFieldCacheCondObj> MuonCombined::MuonCombinedFitTagTool::m_fieldCacheCondObjInputKey
private
Initial value:
{this, "AtlasFieldCacheCondObj", "fieldCondObj",
"Name of the Magnetic Field conditions object key"}

Definition at line 83 of file MuonCombinedFitTagTool.h.

◆ m_idHelperSvc

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

Definition at line 65 of file MuonCombinedFitTagTool.h.

◆ m_indetPullCut

Gaudi::Property<double> MuonCombined::MuonCombinedFitTagTool::m_indetPullCut {this, "IndetPullCut", 6}
private

Definition at line 79 of file MuonCombinedFitTagTool.h.

◆ m_matchChiSquaredCut

Gaudi::Property<double> MuonCombined::MuonCombinedFitTagTool::m_matchChiSquaredCut {this, "MatchChiSquaredCut", 30}
private

Definition at line 80 of file MuonCombinedFitTagTool.h.

◆ m_matchQuality

ToolHandle<Rec::IMuonMatchQuality> MuonCombined::MuonCombinedFitTagTool::m_matchQuality {this, "MatchQuality", "Rec::MuonMatchQuality/MuonMatchQuality"}
private

Definition at line 74 of file MuonCombinedFitTagTool.h.

◆ m_momentumBalanceCut

Gaudi::Property<double> MuonCombined::MuonCombinedFitTagTool::m_momentumBalanceCut {this, "MomentumBalanceCut", 6}
private

Definition at line 78 of file MuonCombinedFitTagTool.h.

◆ m_momentumBalanceTool

ToolHandle<Rec::IMuonMomentumBalanceSignificance> MuonCombined::MuonCombinedFitTagTool::m_momentumBalanceTool
private
Initial value:
{
this, "MomentumBalanceTool", "Rec::MuonMomentumBalanceSignificanceTool/MuonMomentumBalanceSignifTool"}

Definition at line 71 of file MuonCombinedFitTagTool.h.

◆ m_muonRecovery

ToolHandle<Rec::IMuidMuonRecovery> MuonCombined::MuonCombinedFitTagTool::m_muonRecovery {this, "MuonRecovery", ""}
private

Definition at line 73 of file MuonCombinedFitTagTool.h.

◆ m_outwardsBuilder

ToolHandle<Rec::ICombinedMuonTrackBuilder> MuonCombined::MuonCombinedFitTagTool::m_outwardsBuilder {this, "OutwardsTrackBuilder", ""}
private

Definition at line 69 of file MuonCombinedFitTagTool.h.

◆ m_printer

ToolHandle<Muon::MuonEDMPrinterTool> MuonCombined::MuonCombinedFitTagTool::m_printer {this, "Printer", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"}
private

Definition at line 67 of file MuonCombinedFitTagTool.h.

◆ m_trackBuilder

ToolHandle<Rec::ICombinedMuonTrackBuilder> MuonCombined::MuonCombinedFitTagTool::m_trackBuilder {this, "TrackBuilder", ""}
private

Definition at line 68 of file MuonCombinedFitTagTool.h.

◆ m_trackQuery

ToolHandle<Rec::IMuonTrackQuery> MuonCombined::MuonCombinedFitTagTool::m_trackQuery {this, "TrackQuery", "Rec::MuonTrackQuery/MuonTrackQuery"}
private

Definition at line 70 of file MuonCombinedFitTagTool.h.

◆ m_trackScoringTool

ToolHandle<Trk::ITrackScoringTool> MuonCombined::MuonCombinedFitTagTool::m_trackScoringTool {this, "TrackScoringTool", "Muon::MuonTrackScoringTool/MuonTrackScoringTool"}
private

Definition at line 75 of file MuonCombinedFitTagTool.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vertexKey

SG::ReadHandleKey<xAOD::VertexContainer> MuonCombined::MuonCombinedFitTagTool::m_vertexKey {this, "VertexContainer", "PrimaryVertices", "primary vertex container"}
private

Definition at line 86 of file MuonCombinedFitTagTool.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:
Trk::ScatteringAngles::deltaPhi
double deltaPhi() const
returns the
Definition: ScatteringAngles.h:82
MuonCombined::MuonCombinedFitTagTool::m_matchChiSquaredCut
Gaudi::Property< double > m_matchChiSquaredCut
Definition: MuonCombinedFitTagTool.h:80
Trk::TrackInfo::MuidCombined
@ MuidCombined
MuidCombined.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:180
MuonCombined::MuonCombinedFitTagTool::m_muonRecovery
ToolHandle< Rec::IMuidMuonRecovery > m_muonRecovery
Definition: MuonCombinedFitTagTool.h:73
Trk::TrackStateOnSurface::CaloDeposit
@ CaloDeposit
This TSOS contains a CaloEnergy object.
Definition: TrackStateOnSurface.h:135
Trk::Track::fitQuality
const FitQuality * fitQuality() const
return a pointer to the fit quality const-overload
pdg_comparison.sigma
sigma
Definition: pdg_comparison.py:324
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
max
#define max(a, b)
Definition: cfImp.cxx:41
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
CaloEnergy
class extending the basic Trk::EnergyLoss to describe the measured or parameterised muon energy loss ...
Definition: CaloEnergy.h:28
MuonCombined::MuonCombinedFitTagTool::bestMatchChooser
bool bestMatchChooser(const InDetCandidate &curCandidate, const CombinedFitTag &curTag, const Trk::Track &curTrack, const Trk::Track *curMETrack, const InDetCandidate &bestCandidate, const CombinedFitTag &bestTag, const Trk::Track &bestTrack, const Trk::Track *bestMETrack) const
Definition: MuonCombinedFitTagTool.cxx:530
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
AtlasFieldCacheCondObj
Definition: AtlasFieldCacheCondObj.h:19
xAOD::TrackParticle_v1::vx
float vx() const
The x origin for the parameters.
MuonCombined::MuonCombinedFitTagTool::m_trackScoringTool
ToolHandle< Trk::ITrackScoringTool > m_trackScoringTool
Definition: MuonCombinedFitTagTool.h:75
Trk::PerigeeSurface
Definition: PerigeeSurface.h:43
DataVector::rend
const_reverse_iterator rend() const noexcept
Return a const_reverse_iterator pointing at the beginning of the collection.
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Trk::Track::trackStateOnSurfaces
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
Trk::Track::info
const TrackInfo & info() const
Returns a const ref to info of a const tracks.
xAOD::TrackParticle_v1::vz
float vz() const
The z origin for the parameters.
MuonCombined::MuonCombinedFitTagTool::m_badFitChi2
Gaudi::Property< double > m_badFitChi2
Definition: MuonCombinedFitTagTool.h:77
Amg::y
@ y
Definition: GeoPrimitives.h:35
Trk::EnergyLoss::sigmaDeltaE
double sigmaDeltaE() const
returns the symmatric error
xAOD::TrackParticle_v1::z0
float z0() const
Returns the parameter.
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
MuonCombined::MuonCombinedFitTagTool::m_momentumBalanceTool
ToolHandle< Rec::IMuonMomentumBalanceSignificance > m_momentumBalanceTool
Definition: MuonCombinedFitTagTool.h:71
MuonCombined::InDetCandidate
Definition: InDetCandidate.h:18
Trk::ScatteringAngles
represents a deflection of the track caused through multiple scattering in material.
Definition: ScatteringAngles.h:26
python.sizes.txt
string txt
Definition: sizes.py:141
Trk::MaterialEffectsBase::thicknessInX0
double thicknessInX0() const
returns the actually traversed material .
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
MagField::AtlasFieldCache::toroidOn
bool toroidOn() const
Trk::combinedTrack
void combinedTrack(long int ICH, double *pv0, double *covi, double BMAG, double *par, double *covo)
Definition: XYZtrp.cxx:113
MuonCombined::MuonCombinedFitTagTool::evaluateMatchProperties
std::unique_ptr< Trk::Track > evaluateMatchProperties(const EventContext &ctx, const Trk::Track *combinedTrack, CombinedFitTag &tag, const xAOD::TrackParticle &idTrackParticle) const
Definition: MuonCombinedFitTagTool.cxx:274
MuonCombined::MuonCombinedFitTagTool::m_trackQuery
ToolHandle< Rec::IMuonTrackQuery > m_trackQuery
Definition: MuonCombinedFitTagTool.h:70
xAOD::TrackParticle_v1::d0
float d0() const
Returns the parameter.
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
MuonCombined::MuonCombinedFitTagTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonCombinedFitTagTool.h:65
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
Trk::TrackInfo::StraightTrack
@ StraightTrack
A straight track.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:84
MuonCombined::MuonCombinedFitTagTool::m_vertexKey
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexKey
Definition: MuonCombinedFitTagTool.h:86
Trk::MaterialEffectsOnTrack
represents the full description of deflection and e-loss of a track in material.
Definition: MaterialEffectsOnTrack.h:40
Amg::z
@ z
Definition: GeoPrimitives.h:36
Trk::ScatteringAngles::sigmaDeltaTheta
double sigmaDeltaTheta() const
returns the
Definition: ScatteringAngles.h:100
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Amg::x
@ x
Definition: GeoPrimitives.h:34
Trk::driftRadius
@ driftRadius
trt, straws
Definition: ParamDefs.h:59
MuonCombined::MuonCombinedFitTagTool::combinedTrackQualityCheck
bool combinedTrackQualityCheck(const EventContext &ctx, const Trk::Track &combinedTrack, const Trk::Track &indetTrack) const
Definition: MuonCombinedFitTagTool.cxx:232
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:522
Trk::EnergyLoss::deltaE
double deltaE() const
returns the
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Trk::TrackScore
float TrackScore
Definition: TrackScore.h:10
python.StandardJetMods.pull
pull
Definition: StandardJetMods.py:264
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Trk::muon
@ muon
Definition: ParticleHypothesis.h:28
DataVector< const Trk::TrackStateOnSurface >
DataVector::rbegin
const_reverse_iterator rbegin() const noexcept
Return a const_reverse_iterator pointing past the end of the collection.
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
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
Trk::MeasurementBase
Definition: MeasurementBase.h:58
Trk::Track::perigeeParameters
const Perigee * perigeeParameters() const
return Perigee.
Definition: Tracking/TrkEvent/TrkTrack/src/Track.cxx:163
Trk::numberOfTRTHits
@ numberOfTRTHits
number of TRT outliers
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:79
MuonCombined::MuonCombinedFitTagTool::m_indetPullCut
Gaudi::Property< double > m_indetPullCut
Definition: MuonCombinedFitTagTool.h:79
xAOD::TrackParticle_v1::vy
float vy() const
The y origin for the parameters.
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
MuonCombined::MuonCombinedFitTagTool::m_trackBuilder
ToolHandle< Rec::ICombinedMuonTrackBuilder > m_trackBuilder
Definition: MuonCombinedFitTagTool.h:68
Trk::TrackSummary
A summary of the information contained by a track.
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:287
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
DataVector< const Trk::TrackStateOnSurface >::const_reverse_iterator
std::reverse_iterator< const_iterator > const_reverse_iterator
Standard const_reverse_iterator.
Definition: DataVector.h:846
VP1PartSpect::E
@ E
Definition: VP1PartSpectFlags.h:21
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
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::EnergyLoss
This class describes energy loss material effects in the ATLAS tracking EDM.
Definition: EnergyLoss.h:34
Muon::MdtDriftCircleOnTrack
This class represents the corrected MDT measurements, where the corrections include the effects of wi...
Definition: MdtDriftCircleOnTrack.h:37
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::MuonCombinedFitTagTool::m_fieldCacheCondObjInputKey
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheCondObjInputKey
Definition: MuonCombinedFitTagTool.h:83
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonCombined::MuonCombinedFitTagTool::m_momentumBalanceCut
Gaudi::Property< double > m_momentumBalanceCut
Definition: MuonCombinedFitTagTool.h:78
xAOD::score
@ score
Definition: TrackingPrimitives.h:513
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
MuonCombined::MuonCombinedFitTagTool::m_outwardsBuilder
ToolHandle< Rec::ICombinedMuonTrackBuilder > m_outwardsBuilder
Definition: MuonCombinedFitTagTool.h:69
Trk::IdentifierExtractor::extract
static void extract(std::vector< Identifier > &ids, const std::vector< const MeasurementBase * > &measurements)
Definition: IdentifierExtractor.cxx:13
MuonParameters::MuidCo
@ MuidCo
Definition: MuonParamDefs.h:60
MuonCombined::MuonCombinedFitTagTool::dumpCaloEloss
void dumpCaloEloss(const EventContext &ctx, const Trk::Track *track, const std::string &txt) const
Definition: MuonCombinedFitTagTool.cxx:378
a
TList * a
Definition: liststreamerinfos.cxx:10
Trk::MaterialEffectsOnTrack::energyLoss
const EnergyLoss * energyLoss() const
returns the energy loss object.
h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
Trk::Track::trackSummary
const Trk::TrackSummary * trackSummary() const
Returns a pointer to the const Trk::TrackSummary owned by this const track (could be nullptr)
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DEBUG
#define DEBUG
Definition: page_access.h:11
Trk::MaterialEffectsOnTrack::scatteringAngles
const ScatteringAngles * scatteringAngles() const
returns the MCS-angles object.
MagField::AtlasFieldCache
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
Definition: AtlasFieldCache.h:43
Trk::qOverP
@ qOverP
perigee
Definition: ParamDefs.h:73
Trk::ScatteringAngles::sigmaDeltaPhi
double sigmaDeltaPhi() const
returns the
Definition: ScatteringAngles.h:94
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
Trk::FitQuality::numberDoF
int numberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as integer
Definition: FitQuality.h:60
MuonCombined::MuonCombinedFitTagTool::m_printer
ToolHandle< Muon::MuonEDMPrinterTool > m_printer
Definition: MuonCombinedFitTagTool.h:67
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
Trk::TrackSummary::get
int get(const SummaryType &type) const
returns the summary information for the passed SummaryType.
Trk::ScatteringAngles::deltaTheta
double deltaTheta() const
returns the
Definition: ScatteringAngles.h:88
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
MuonCombined::MuonCombinedFitTagTool::m_matchQuality
ToolHandle< Rec::IMuonMatchQuality > m_matchQuality
Definition: MuonCombinedFitTagTool.h:74
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
MuonCombined::MuonCombinedFitTagTool::buildCombinedTrack
std::unique_ptr< Trk::Track > buildCombinedTrack(const EventContext &ctx, const Trk::Track &indetTrack, const Trk::Track &spectrometerTrack, const Trk::Track *extrapolatedTrack) const
Definition: MuonCombinedFitTagTool.cxx:196
python.compressB64.c
def c
Definition: compressB64.py:93
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
Trk::TrackInfo::trackProperties
bool trackProperties(const TrackProperties &property) const
Access methods for track properties.
mag
Scalar mag() const
mag method
Definition: AmgMatrixBasePlugin.h:25
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