ATLAS Offline Software
Loading...
Searching...
No Matches
Muon::MooTrackBuilder Class Reference

Tool to combine two segments or a track and a segment to a track. More...

#include <MooTrackBuilder.h>

Inheritance diagram for Muon::MooTrackBuilder:
Collaboration diagram for Muon::MooTrackBuilder:

Public Types

using PrepVec = std::vector<const Trk::PrepRawData*>
typedef PrepVec::iterator PrepIt
typedef PrepVec::const_iterator PrepCit

Public Member Functions

 MooTrackBuilder (const std::string &, const std::string &, const IInterface *)
 default AlgTool constructor
 ~MooTrackBuilder ()=default
 destructor
virtual StatusCode initialize () override
 initialize method, method taken from bass-class AlgTool
virtual StatusCode finalize () override
 finialize method, method taken from bass-class AlgTool
virtual std::unique_ptr< Trk::Trackrefit (const EventContext &ctx, Trk::Track &track) const override
 refit track
std::unique_ptr< MuonSegmentcombineToSegment (const EventContext &ctx, const MuPatCandidateBase &firstEntry, const MuPatCandidateBase &secondEntry, const PrepVec &patternPhiHits) const
 Methos is used externally by MuonTrackSteering.cxx:233. Should be revised to put it into an interface.
virtual std::unique_ptr< MuonSegmentcombineToSegment (const EventContext &ctx, const MuonSegment &seg1, const MuonSegment &seg2, const PrepVec &patternPhiHits) const override
 combine two segments to a super segment
virtual std::unique_ptr< Trk::Trackcombine (const EventContext &ctx, const MuonSegment &seg1, const MuonSegment &seg2, const PrepVec &patternPhiHits) const override
 combine two segments to a track
virtual std::unique_ptr< Trk::Trackcombine (const EventContext &ctx, const Trk::Track &track, const MuonSegment &seg, const PrepVec &patternPhiHits) const override
 combine a track with a segment
virtual std::unique_ptr< Trk::TrackParametersfindClosestParameters (const Trk::Track &track, const Amg::Vector3D &pos) const override
 find closest TrackParameters to the position.
virtual std::unique_ptr< Trk::TrackParametersgetClosestParameters (const Trk::Track &track, const Trk::Surface &surf) const override
 find closest TrackParameters to the surface.
std::unique_ptr< Trk::TrackParametersgetClosestParameters (const MuPatCandidateBase &candidate, const Trk::Surface &surf) const
 find closest TrackParameters to the surface.
virtual std::unique_ptr< Trk::TrackrecalibrateHitsOnTrack (const EventContext &ctx, const Trk::Track &track, bool doMdts, bool doCompetingClusters) const override
 recalibrate hits on track
virtual std::vector< std::unique_ptr< MuPatTrack > > find (const EventContext &ctx, MuPatCandidateBase &candidate, const std::vector< MuPatSegment * > &segments) const override
 interface for tools to find track in the muon system starting from a vector of segments
virtual void refine (const EventContext &ctx, MuPatTrack &track) const override
 interface for tools which refine the hit content of a given track
 DeclareInterfaceID (Muon::IMuonSegmentTrackBuilder, 1, 0)
 access to tool interface
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()
 access to tool interface

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
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.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

std::unique_ptr< Trk::Trackcombine (const EventContext &ctx, const MuPatCandidateBase &firstEntry, const MuPatCandidateBase &secondEntry, const PrepVec &patternPhiHits) const
 combine two MCTBCandidateEntries
std::vector< std::unique_ptr< Trk::Track > > combineWithSegmentFinding (const EventContext &ctx, const Trk::Track &track, const MuonSegment &seg, const PrepVec &patternPhiHits) const
 find tracks by redoing the segment finding in the chamber of the segment
std::vector< std::unique_ptr< Trk::Track > > combineWithSegmentFinding (const EventContext &ctx, const MuPatTrack &candidate, const MuPatSegment &segInfo, const PrepVec &patternPhiHits) const
 find tracks by redoing the segment finding in the chamber of the segment
std::vector< std::unique_ptr< Trk::Track > > combineWithSegmentFinding (const EventContext &ctx, const MuPatTrack &candidate, const Trk::TrackParameters &pars, const std::set< Identifier > &chIds, const PrepVec &patternPhiHits) const
 find tracks by redoing the segment finding in the chamber of the segment
std::vector< std::unique_ptr< Trk::Track > > combineWithSegmentFinding (const EventContext &ctx, const Trk::Track &track, const Trk::TrackParameters &pars, const std::set< Identifier > &chIds, const PrepVec &patternPhiHits) const
 find tracks by redoing the segment finding in the chamber of the segment
std::pair< std::unique_ptr< Trk::Track >, std::unique_ptr< Trk::Track > > splitTrack (const EventContext &ctx, const Trk::Track &track) const
 split given track if it crosses the calorimeter volume, code assumes that the track was already extrapolated to the muon entry record using the MuonTrackExtrapolationTool.
bool isSplitTrack (const EventContext &ctx, const Trk::Track &track1, const Trk::Track &track2) const
 identify whether two track are split
TrackCollectionmergeSplitTracks (const EventContext &ctx, const TrackCollection &tracks) const
 look for split tracks in collection and merge them
void removeDuplicateWithReference (std::unique_ptr< Trk::SegmentCollection > &segments, std::vector< const MuonSegment * > &referenceSegments) const
Trk::TrackStates::const_iterator insertClustersWithCompetingRotCreation (const EventContext &ctx, Trk::TrackStates::const_iterator tsit, Trk::TrackStates::const_iterator tsit_end, std::vector< std::unique_ptr< const Trk::TrackStateOnSurface > > &states) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ToolHandle< MooTrackFitterm_fitter {this, "Fitter", "Muon::MooTrackFitter/MooTrackFitter", "Tool to fit segments to tracks"}
ToolHandle< MooTrackFitterm_slFitter {this, "SLFitter", "Muon::MooTrackFitter/MooSLTrackFitter", "Tool to fit segments to tracks"}
ToolHandle< MuPatCandidateToolm_candidateHandler
 candidate handler
ToolHandle< MooCandidateMatchingToolm_candidateMatchingTool
ToolHandle< IMuonTrackToSegmentToolm_trackToSegmentTool
ServiceHandle< IMuonEDMHelperSvcm_edmHelperSvc
PublicToolHandle< MuonEDMPrinterToolm_printer
 tool to print out EDM objects;
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
ToolHandle< IMuonSeededSegmentFinderm_seededSegmentFinder
ToolHandle< IMdtDriftCircleOnTrackCreatorm_mdtRotCreator
ToolHandle< IMuonCompetingClustersOnTrackCreatorm_compRotCreator
ToolHandle< Trk::IPropagatorm_propagator {this, "Propagator", "Trk::STEP_Propagator/MuonPropagator"}
ToolHandle< Trk::IResidualPullCalculatorm_pullCalculator
ToolHandle< IMuonHoleRecoveryToolm_muonChamberHoleRecoverTool
ToolHandle< IMuonTrackExtrapolationToolm_trackExtrapolationTool
ToolHandle< IMuonErrorOptimisationToolm_errorOptimisationTool {this, "ErrorOptimisationTool", ""}
ToolHandle< Trk::IExtendedTrackSummaryToolm_trackSummaryTool {this, "TrackSummaryTool", "MuonTrackSummaryTool"}
SG::ReadCondHandleKey< AtlasFieldCacheCondObjm_fieldCacheCondObjInputKey
Trk::MagneticFieldProperties m_magFieldProperties {Trk::FullField}
 magnetic field properties
Gaudi::Property< bool > m_doTimeOutChecks {this, "UseTimeOutGuard", true}
 on/off time out check
Gaudi::Property< bool > m_useExclusionList
 use exclusion list (bit faster at the price of missing chambers)
Gaudi::Property< bool > m_useTrackingHistory
 use history of the track finding up to now to avoid creating duplicates
Gaudi::Property< bool > m_recalibrateMDTHits {this, "RecalibrateMDTHitsOnTrack", true}
std::atomic_uint m_ncalls {0}
std::atomic_uint m_nTimedOut {0}
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Tool to combine two segments or a track and a segment to a track.

In addition it offers the possibility to combine two segments to one larger segment.

The tool can either be configured to perform a straight line association or an association in the magnetic field.

The following steps are performed:

  • simple match of the input using the MuonSegmentTrackMatcher
  • if match successfull, fit of the input using the MuonSegmentTrackFitter
  • if a track was found, cleaning of the track using the MuonTrackCleaner
  • final decision whether to keep track or not

For more details look at the mainpage of this package.

Definition at line 82 of file MooTrackBuilder.h.

Member Typedef Documentation

◆ PrepCit

typedef PrepVec::const_iterator Muon::IMuonSegmentTrackBuilder::PrepCit
inherited

Definition at line 28 of file IMuonSegmentTrackBuilder.h.

◆ PrepIt

typedef PrepVec::iterator Muon::IMuonSegmentTrackBuilder::PrepIt
inherited

Definition at line 27 of file IMuonSegmentTrackBuilder.h.

◆ PrepVec

using Muon::IMuonSegmentTrackBuilder::PrepVec = std::vector<const Trk::PrepRawData*>
inherited

Definition at line 26 of file IMuonSegmentTrackBuilder.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ MooTrackBuilder()

Muon::MooTrackBuilder::MooTrackBuilder ( const std::string & t,
const std::string & n,
const IInterface * p )

default AlgTool constructor

Definition at line 30 of file MooTrackBuilder.cxx.

30 : AthAlgTool(t, n, p) {
31 declareInterface<IMuonSegmentTrackBuilder>(this);
32 declareInterface<MooTrackBuilder>(this);
33 declareInterface<IMuonTrackRefiner>(this);
34 declareInterface<IMuonTrackBuilder>(this);
35 }
AthAlgTool()
Default constructor:

◆ ~MooTrackBuilder()

Muon::MooTrackBuilder::~MooTrackBuilder ( )
default

destructor

Member Function Documentation

◆ combine() [1/3]

std::unique_ptr< Trk::Track > Muon::MooTrackBuilder::combine ( const EventContext & ctx,
const MuonSegment & seg1,
const MuonSegment & seg2,
const PrepVec & patternPhiHits ) const
overridevirtual

combine two segments to a track

Parameters
seg1the first segment
seg2the second segment
externalPhiHitsif provided, the external phi hits will be used instead of the phi hits on the segment
Returns
a pointer to the resulting track, will return zero if combination failed. Ownership passed to user.

Implements Muon::IMuonSegmentTrackBuilder.

Definition at line 151 of file MooTrackBuilder.cxx.

152 {
153
154 // convert segments
155 std::unique_ptr<MuPatSegment> segInfo1{m_candidateHandler->createSegInfo(ctx, seg1)};
156 if (!segInfo1) {return nullptr; }
157 std::unique_ptr<MuPatSegment> segInfo2{m_candidateHandler->createSegInfo(ctx, seg2)};
158 if (!segInfo2) { return nullptr; }
159
160 // call fit()
161 return combine(ctx, *segInfo1, *segInfo2, externalPhiHits);
162 }
ToolHandle< MuPatCandidateTool > m_candidateHandler
candidate handler
std::unique_ptr< Trk::Track > combine(const EventContext &ctx, const MuPatCandidateBase &firstEntry, const MuPatCandidateBase &secondEntry, const PrepVec &patternPhiHits) const
combine two MCTBCandidateEntries

◆ combine() [2/3]

std::unique_ptr< Trk::Track > Muon::MooTrackBuilder::combine ( const EventContext & ctx,
const MuPatCandidateBase & firstEntry,
const MuPatCandidateBase & secondEntry,
const PrepVec & patternPhiHits ) const
private

combine two MCTBCandidateEntries

Parameters
firstEntrythe first entry
secondEntrythe second entry
externalPhiHitsif provided, the external phi hits will be used instead of the phi hits on the segment
Returns
a pointer to the resulting track, will return zero if combination failed. Ownership passed to user.

Definition at line 178 of file MooTrackBuilder.cxx.

179 {
180 ++m_ncalls;
181
182 if (m_doTimeOutChecks && Athena::Timeout::instance(ctx).reached()) {
183 ATH_MSG_DEBUG("Timeout reached. Aborting sequence.");
184 ++m_nTimedOut;
185 return nullptr;
186 }
187
188 std::set<MuonStationIndex::StIndex> stations = firstCandidate.stations();
189 stations.insert(secondCandidate.stations().begin(), secondCandidate.stations().end());
190 unsigned int nstations = stations.size();
191
192 MagField::AtlasFieldCache fieldCache;
193 // Get field cache object
194 SG::ReadCondHandle<AtlasFieldCacheCondObj> readHandle{m_fieldCacheCondObjInputKey, ctx};
195 const AtlasFieldCacheCondObj* fieldCondObj{*readHandle};
196
197 if (!fieldCondObj) {
198 ATH_MSG_ERROR("combine: Failed to retrieve AtlasFieldCacheCondObj with key " << m_fieldCacheCondObjInputKey.key());
199 return nullptr;
200 }
201 fieldCondObj->getInitializedCache(fieldCache);
202 using namespace MuonStationIndex;
203 bool slFit = !fieldCache.toroidOn() || nstations == 1 ||
204 (nstations == 2 && (stations.count(StIndex::EM) &&
205 (stations.count(StIndex::BO) || stations.count(StIndex::EO))));
206 if (msgLvl(MSG::DEBUG)) {
207 msg(MSG::DEBUG) << MSG::DEBUG << " combining entries: nstations " << nstations << " types:";
208 for (std::set<StIndex>::const_iterator it = stations.begin(); it != stations.end(); ++it) {
209 msg(MSG::DEBUG) << MSG::DEBUG << " " << stName(*it);
210 }
211 if (slFit) {
212 msg(MSG::DEBUG) << " doing SL fit ";
213 } else {
214 msg(MSG::DEBUG) << " doing curved fit ";
215 }
216 msg(MSG::DEBUG) << endmsg;
217 }
218
219 const MuPatTrack* trkCan1 = dynamic_cast<const MuPatTrack*>(&firstCandidate);
220 const MuPatTrack* trkCan2 = dynamic_cast<const MuPatTrack*>(&secondCandidate);
221
222 const MuPatSegment* segCan1 = dynamic_cast<const MuPatSegment*>(&firstCandidate);
223 const MuPatSegment* segCan2 = dynamic_cast<const MuPatSegment*>(&secondCandidate);
224
225 const MuPatTrack* candidate = nullptr;
226 const MuPatSegment* segment = nullptr;
227 if (trkCan1 && segCan2) {
228 candidate = trkCan1;
229 segment = segCan2;
230 } else if (trkCan2 && segCan1) {
231 candidate = trkCan2;
232 segment = segCan1;
233 }
234
235 // check whether this combination was already tried, if yes reject the combination
236 if (candidate && segment) {
237 ATH_MSG_DEBUG(" Track/segment combination");
238 const std::vector<MuPatSegment*>& excl = candidate->excludedSegments();
239 if (std::find(excl.begin(),excl.end(), segment) != excl.end()){
240 ATH_MSG_DEBUG(" Rejected segment based on exclusion list");
241 return nullptr;
242 }
243 }
244
245 // the following bit of code checks whether the current combination of segments was already tested
247 // create a set of all segments of the would-be candidate
248 std::set<const MuPatSegment*> segments;
249 if ((segCan1 && segCan2)) {
250 segments.insert(segCan1);
251 segments.insert(segCan2);
252 }
253 if (candidate && segment) {
254 segments.insert(segment);
255 segments.insert(candidate->segments().begin(), candidate->segments().end());
256 }
257 // now loop over the segments and check if any of them is associated with a track that contains all of the segments
258
259 for (const MuPatSegment* used : segments) {
260 // loop over the tracks associated with the current segment
261 for (const MuPatTrack* assoc_track : used->tracks()) {
262 // loop over the segments associated with the track
263 std::set<const MuPatSegment*> foundSegments;
264 for (const MuPatSegment* segOnTrack : assoc_track->segments()) {
265 if (segments.count(segOnTrack)) foundSegments.insert(segOnTrack);
266 }
267 // if all segments are already part of an existing track, don't perform the fit
268 if (foundSegments.size() == segments.size()) {
269 ATH_MSG_DEBUG("Combination already part of an existing track");
270 return nullptr;
271 }
272
273 // if all segments but one are already part of an existing track, check the exclusion list
274 if (candidate && !candidate->excludedSegments().empty() && foundSegments.size() == segments.size() - 1) {
275 // create destination vector for segments that are not found
276 std::vector<const MuPatSegment*> unassociatedSegments(segments.size(), nullptr);
277 std::vector<const MuPatSegment*>::iterator it = std::set_difference(
278 segments.begin(), segments.end(), foundSegments.begin(), foundSegments.end(), unassociatedSegments.begin());
279 const MuPatSegment* zero = nullptr;
280 unassociatedSegments.erase(std::find(unassociatedSegments.begin(), unassociatedSegments.end(), zero),
281 unassociatedSegments.end());
282
283 // check whether any pointers found
284 if (it != unassociatedSegments.begin()) {
285 // this should always be one as we required the difference to be one!
286 if (unassociatedSegments.size() != 1) {
287 ATH_MSG_DEBUG("Inconsistent result from set difference: size result "
288 << unassociatedSegments.size() << " candidate " << segments.size() << " found "
289 << foundSegments.size());
290 return nullptr;
291 }
292
293 // check that the result is indeed part of the original set
294 if (!segments.count(unassociatedSegments.front())) {
295 ATH_MSG_DEBUG("Segment point not part of the original set, aborting!");
296 return nullptr;
297 }
298
299 // now check whether the segment is part of the excluded segments
300 std::vector<MuPatSegment*>::const_iterator pos = std::find(
301 candidate->excludedSegments().begin(), candidate->excludedSegments().end(), unassociatedSegments.front());
302 if (pos != candidate->excludedSegments().end()) {
303 ATH_MSG_DEBUG("Segment found in exclusion list, not performing fit");
304 return nullptr;
305 }
306 }
307 }
308 }
309 }
310 }
311
312 // use slFitter for straight line fit, or toroid off, otherwise use normal Fitter
313 if (slFit) return std::unique_ptr<Trk::Track>(m_slFitter->fit(ctx, firstCandidate, secondCandidate, externalPhiHits));
314
315 return m_fitter->fit(ctx, firstCandidate, secondCandidate, externalPhiHits);
316 }
#define endmsg
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
bool msgLvl(const MSG::Level lvl) const
MsgStream & msg() const
static Timeout & instance()
Get reference to Timeout singleton.
Definition Timeout.h:64
void getInitializedCache(MagField::AtlasFieldCache &cache) const
get B field cache for evaluation as a function of 2-d or 3-d position.
Gaudi::Property< bool > m_useTrackingHistory
use history of the track finding up to now to avoid creating duplicates
std::atomic_uint m_ncalls
ToolHandle< MooTrackFitter > m_fitter
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheCondObjInputKey
std::atomic_uint m_nTimedOut
ToolHandle< MooTrackFitter > m_slFitter
Gaudi::Property< bool > m_doTimeOutChecks
on/off time out check
void zero(TH2 *h)
zero the contents of a 2d histogram
const std::string & stName(StIndex index)
convert StIndex into a string

◆ combine() [3/3]

std::unique_ptr< Trk::Track > Muon::MooTrackBuilder::combine ( const EventContext & ctx,
const Trk::Track & track,
const MuonSegment & seg,
const PrepVec & patternPhiHits ) const
overridevirtual

combine a track with a segment

Parameters
tracka track
sega segment
externalPhiHitsif provided, the external phi hits will be used instead of the phi hits on the segment
Returns
a pointer to the resulting track, will return zero if combination failed. Ownership passed to user.

Implements Muon::IMuonSegmentTrackBuilder.

Definition at line 318 of file MooTrackBuilder.cxx.

319 {
320
321 // convert segments
322 std::unique_ptr<Trk::Track> inTrack = std::make_unique<Trk::Track>(track);
323 std::unique_ptr<MuPatTrack> candidate(m_candidateHandler->createCandidate(inTrack));
324 if (!candidate) return nullptr;
325 std::unique_ptr<MuPatSegment> segInfo(m_candidateHandler->createSegInfo(ctx, seg));
326 if (!segInfo) { return nullptr; }
327
328 // call fit()
329 return combine(ctx, *candidate, *segInfo, externalPhiHits);
330 }

◆ combineToSegment() [1/2]

std::unique_ptr< MuonSegment > Muon::MooTrackBuilder::combineToSegment ( const EventContext & ctx,
const MuonSegment & seg1,
const MuonSegment & seg2,
const PrepVec & patternPhiHits ) const
overridevirtual

combine two segments to a super segment

Parameters
seg1the first segment
seg2the second segment
externalPhiHitsif provided, the external phi hits will be used instead of the phi hits on the segment
Returns
a pointer to the combined segment, will return zero if combination failed. Ownership passed to user.

Implements Muon::IMuonSegmentTrackBuilder.

Definition at line 138 of file MooTrackBuilder.cxx.

138 {
139 // try to get track
140 std::unique_ptr<Trk::Track> track = combine(ctx, seg1, seg2, externalPhiHits);
141
142 if (!track) return nullptr;
143
144 // create MuonSegment
145 std::unique_ptr<MuonSegment> seg{m_trackToSegmentTool->convert(ctx, *track)};
146 if (!seg) { ATH_MSG_WARNING(" conversion of track failed!! "); }
147
148 return seg;
149 }
#define ATH_MSG_WARNING(x)
ToolHandle< IMuonTrackToSegmentTool > m_trackToSegmentTool

◆ combineToSegment() [2/2]

std::unique_ptr< MuonSegment > Muon::MooTrackBuilder::combineToSegment ( const EventContext & ctx,
const MuPatCandidateBase & firstEntry,
const MuPatCandidateBase & secondEntry,
const PrepVec & patternPhiHits ) const

Methos is used externally by MuonTrackSteering.cxx:233. Should be revised to put it into an interface.

combine two MCTBCandidateEntries

Parameters
firstEntrythe first entry
secondEntrythe second entry
externalPhiHitsif provided, the external phi hits will be used instead of the phi hits on the segment
Returns
a pointer to the resulting track, will return zero if combination failed. Ownership passed to user.

Definition at line 164 of file MooTrackBuilder.cxx.

165 {
166 // try to get track
167 std::unique_ptr<Trk::Track> track = combine(ctx, firstCandidate, secondCandidate, externalPhiHits);
168
169 if (!track) return nullptr;
170
171 // create MuonSegment
172 std::unique_ptr<MuonSegment> seg{m_trackToSegmentTool->convert(ctx, *track)};
173 if (!seg) { ATH_MSG_WARNING(" conversion of track failed!! "); }
174
175 return seg;
176 }

◆ combineWithSegmentFinding() [1/4]

std::vector< std::unique_ptr< Trk::Track > > Muon::MooTrackBuilder::combineWithSegmentFinding ( const EventContext & ctx,
const MuPatTrack & candidate,
const MuPatSegment & segInfo,
const PrepVec & patternPhiHits ) const
private

find tracks by redoing the segment finding in the chamber of the segment

Parameters
candidatea reference to a MuPatTrack
segInfoa reference to a MuPatSegment
Returns
a pointer to vector of tracks, the ownership of the vector and the tracks is passed to the client calling the tool.

second stage segment matching:

  • estimate segment parameters at segment position using fit of track + segment position
  • redo segment finding using the predicted parameters as seed
  • redo segment association

Definition at line 426 of file MooTrackBuilder.cxx.

428 {
434
435 const MuonSegment& seg = *segInfo.segment;
436 std::vector<std::unique_ptr<Trk::Track> > newTracks;
437
438 // get chamber Id of segment
439 std::set<Identifier> chIds = m_edmHelperSvc->chamberIds(seg);
440
441 if (chIds.empty()) return newTracks;
442
443 // for now do not redo segment making for CSCs
444 if (m_idHelperSvc->isCsc(*chIds.begin())) {
445 if (m_candidateMatchingTool->match(ctx, candidate, segInfo, true)) {
446 std::unique_ptr<Trk::Track> newtrack(m_fitter->fit(ctx, candidate, segInfo, externalPhiHits));
447 if (newtrack) newTracks.push_back(std::move(newtrack));
448 return newTracks;
449 } else {
450 return newTracks;
451 }
452 }
453
454 const Trk::Track& track = candidate.track();
455 ATH_MSG_DEBUG(" in combineWithSegmentFinding ");
456 ATH_MSG_VERBOSE(" segment " << m_printer->print(seg));
457
458 // find track parameters on segment surface
459 std::unique_ptr<Trk::TrackParameters> closestPars(findClosestParameters(track, seg.globalPosition()));
460
461 if (!closestPars) {
462 ATH_MSG_WARNING(" unable to find closest TrackParameters ");
463 return newTracks;
464 }
465
466 ATH_MSG_VERBOSE(" closest parameter " << m_printer->print(*closestPars));
467
468 // propagate to segment surface
469 std::unique_ptr<Trk::TrackParameters> exPars(
470 m_propagator->propagate(ctx,*closestPars, seg.associatedSurface(), Trk::anyDirection, false, m_magFieldProperties));
471
472 if (!exPars) {
473 ATH_MSG_WARNING(" Propagation failed!! ");
474 return newTracks;
475 }
476
477 ATH_MSG_VERBOSE(" extrapolated parameter " << m_printer->print(*exPars));
478
479 return combineWithSegmentFinding(ctx, candidate, *exPars, chIds, externalPhiHits);
480 }
#define ATH_MSG_VERBOSE(x)
MuonSegment_v1 MuonSegment
Reference the current persistent version:
virtual const Amg::Vector3D & globalPosition() const override final
global position
virtual const Trk::PlaneSurface & associatedSurface() const override final
returns the surface for the local to global transformation
ToolHandle< Trk::IPropagator > m_propagator
Trk::MagneticFieldProperties m_magFieldProperties
magnetic field properties
PublicToolHandle< MuonEDMPrinterTool > m_printer
tool to print out EDM objects;
ServiceHandle< IMuonEDMHelperSvc > m_edmHelperSvc
virtual std::unique_ptr< Trk::TrackParameters > findClosestParameters(const Trk::Track &track, const Amg::Vector3D &pos) const override
find closest TrackParameters to the position.
ToolHandle< MooCandidateMatchingTool > m_candidateMatchingTool
std::vector< std::unique_ptr< Trk::Track > > combineWithSegmentFinding(const EventContext &ctx, const Trk::Track &track, const MuonSegment &seg, const PrepVec &patternPhiHits) const
find tracks by redoing the segment finding in the chamber of the segment
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
@ anyDirection

◆ combineWithSegmentFinding() [2/4]

std::vector< std::unique_ptr< Trk::Track > > Muon::MooTrackBuilder::combineWithSegmentFinding ( const EventContext & ctx,
const MuPatTrack & candidate,
const Trk::TrackParameters & pars,
const std::set< Identifier > & chIds,
const PrepVec & patternPhiHits ) const
private

find tracks by redoing the segment finding in the chamber of the segment

Parameters
candidatea reference to a MuPatTrack
parspredicted track parameters in first chamber
chIdsidentifiers of the chambers in which the search should be performed (should be in same station layer)
Returns
a pointer to vector of tracks, the ownership of the vector and the tracks is passed to the client calling the tool.

Definition at line 539 of file MooTrackBuilder.cxx.

542 {
543 std::vector<std::unique_ptr<Trk::Track> > newTracks;
544
545 if (chIds.empty()) return newTracks;
546
547 if (!m_idHelperSvc->isMdt(*chIds.begin())) {
548 ATH_MSG_WARNING("combineWithSegmentFinding called with CSC hits!! retuning zero pointer");
549 return newTracks;
550 }
551
552 // redo segment finding
553 std::unique_ptr<Trk::SegmentCollection> segments = m_seededSegmentFinder->find(ctx, pars, chIds);
554
555 // check whether we got segments
556 if (!segments) {
557 ATH_MSG_DEBUG(" failed to find new segments ");
558 return newTracks;
559 }
560 if (segments->empty()) {
561 ATH_MSG_DEBUG(" got empty vector!! ");
562 return newTracks;
563 }
564
565 unsigned int nseg = segments->size();
566 if (m_useExclusionList) {
567 std::vector<const MuonSegment*> referenceSegments;
568 for (std::vector<MuPatSegment*>::const_iterator esit = candidate.excludedSegments().begin();
569 esit != candidate.excludedSegments().end(); ++esit) {
570 if ((*esit)->segment) referenceSegments.push_back((*esit)->segment);
571 }
572 removeDuplicateWithReference(segments, referenceSegments);
573 }
574
575 if (msgLvl(MSG::DEBUG) && segments->size() != nseg) {
576 msg(MSG::DEBUG) << MSG::DEBUG
577 << " Rejected segments based on exclusion list, number of removed segments: " << nseg - segments->size()
578 << " total " << segments->size() << endmsg;
579 }
580
581 if (!segments->empty()) {
582 // loop over segments
583 for (Trk::Segment* tseg : *segments) {
584 if (!tseg) continue;
585 MuonSegment* mseg = dynamic_cast<MuonSegment*>(tseg);
586
587 if (msgLvl(MSG::DEBUG)) {
588 msg(MSG::DEBUG) << MSG::DEBUG << " adding segment " << m_printer->print(*mseg);
589 if (msgLvl(MSG::VERBOSE)) {
590 msg(MSG::DEBUG) << std::endl << m_printer->print(mseg->containedMeasurements()) << endmsg;
591 if (msgLvl(MSG::VERBOSE) && candidate.track().measurementsOnTrack())
592 msg(MSG::DEBUG) << " track " << m_printer->print(candidate.track()) << std::endl
593 << m_printer->print(candidate.track().measurementsOnTrack()->stdcont()) << endmsg;
594 } else {
595 msg(MSG::DEBUG) << endmsg;
596 }
597 }
598 std::unique_ptr<MuPatSegment> segInfo{m_candidateHandler->createSegInfo(ctx, *mseg)};
599
600 if (!m_candidateMatchingTool->match(ctx, candidate, *segInfo, true)) { continue; }
601
602 std::unique_ptr<Trk::Track> segTrack = m_fitter->fit(ctx, candidate, *segInfo, externalPhiHits);
603
604 if (!segTrack) continue;
605
606 ATH_MSG_DEBUG(" found new track " << m_printer->print(*segTrack));
607 newTracks.push_back(std::move(segTrack));
608 }
609 }
610
611 if (!newTracks.empty()) ATH_MSG_DEBUG(" found new tracks for segment " << newTracks.size());
612
613 return newTracks;
614 }
void removeDuplicateWithReference(std::unique_ptr< Trk::SegmentCollection > &segments, std::vector< const MuonSegment * > &referenceSegments) const
ToolHandle< IMuonSeededSegmentFinder > m_seededSegmentFinder
Gaudi::Property< bool > m_useExclusionList
use exclusion list (bit faster at the price of missing chambers)
const std::vector< const Trk::MeasurementBase * > & containedMeasurements() const
returns the vector of Trk::MeasurementBase objects

◆ combineWithSegmentFinding() [3/4]

std::vector< std::unique_ptr< Trk::Track > > Muon::MooTrackBuilder::combineWithSegmentFinding ( const EventContext & ctx,
const Trk::Track & track,
const MuonSegment & seg,
const PrepVec & patternPhiHits ) const
private

find tracks by redoing the segment finding in the chamber of the segment

Parameters
tracka reference to a Track
sega reference to a MuonSegment
Returns
a pointer to vector of tracks, the ownership of the vector and the tracks is passed to the client calling the tool.

Definition at line 332 of file MooTrackBuilder.cxx.

333 {
334
335 // convert segments
336 std::unique_ptr<Trk::Track> inTrack = std::make_unique<Trk::Track>(track);
337 std::unique_ptr<MuPatTrack> candidate = m_candidateHandler->createCandidate(inTrack);
338 if (!candidate) return {};
339 std::unique_ptr<MuPatSegment> segInfo(m_candidateHandler->createSegInfo(ctx, seg));
340 if (!segInfo) return {};
341 // call fit()
342 return combineWithSegmentFinding(ctx, *candidate, *segInfo, externalPhiHits);
343 }

◆ combineWithSegmentFinding() [4/4]

std::vector< std::unique_ptr< Trk::Track > > Muon::MooTrackBuilder::combineWithSegmentFinding ( const EventContext & ctx,
const Trk::Track & track,
const Trk::TrackParameters & pars,
const std::set< Identifier > & chIds,
const PrepVec & patternPhiHits ) const
private

find tracks by redoing the segment finding in the chamber of the segment

Parameters
tracka reference to a Track
parspredicted track parameters in first chamber
chIdsidentifiers of the chambers in which the search should be performed (should be in same station layer)
Returns
a pointer to vector of tracks, the ownership of the vector and the tracks is passed to the client calling the tool.

Definition at line 415 of file MooTrackBuilder.cxx.

418 {
419 // convert track
420 std::unique_ptr<Trk::Track> inTrack = std::make_unique<Trk::Track>(track);
421 std::unique_ptr<MuPatTrack> can = m_candidateHandler->createCandidate(inTrack);
422 if (!can) { return {}; }
423 return combineWithSegmentFinding(ctx, *can, pars, chIds, patternPhiHits);
424 }

◆ declareGaudiProperty()

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

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

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ DeclareInterfaceID()

Muon::IMuonSegmentTrackBuilder::DeclareInterfaceID ( Muon::IMuonSegmentTrackBuilder ,
1 ,
0  )
inherited

access to tool interface

◆ declareProperty()

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

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

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

◆ evtStore()

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.

◆ 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

◆ finalize()

StatusCode Muon::MooTrackBuilder::finalize ( )
overridevirtual

finialize method, method taken from bass-class AlgTool

Definition at line 60 of file MooTrackBuilder.cxx.

60 {
61 if (m_nTimedOut > 0 && m_ncalls > 0) {
62 double scale = 1. / m_ncalls;
63 ATH_MSG_INFO(" Number of calls that timed out " << m_nTimedOut << " fraction of total calls " << scale * m_nTimedOut);
64 }
65 return StatusCode::SUCCESS;
66 }
#define ATH_MSG_INFO(x)

◆ find()

std::vector< std::unique_ptr< MuPatTrack > > Muon::MooTrackBuilder::find ( const EventContext & ctx,
MuPatCandidateBase & candidate,
const std::vector< MuPatSegment * > & segments ) const
overridevirtual

interface for tools to find track in the muon system starting from a vector of segments

Parameters
segmentsa vector of input segments in a given chamber layer
Returns
a pointer to a vector of MuPatTrack objects, zero if no tracks are found. The ownership of the tracks is passed to the client calling the tool.

Implements Muon::IMuonTrackBuilder.

Definition at line 918 of file MooTrackBuilder.cxx.

919 {
920 std::vector<std::unique_ptr<MuPatTrack> > candidates;
921 // check whether we have segments
922 if (segVec.empty()) return candidates;
923
924 std::set<MuPatSegment*> usedSegments;
925 std::map<MuPatSegment*, MuPatSegment*> slSegments;
926
927 // int looseQualityLevel = 1; // Not used for the moment
928 bool tightQualityCuts = false;
929 ATH_MSG_DEBUG(" find: " << m_candidateHandler->print(candidate, 0) << std::endl << m_candidateHandler->print(segVec, 0));
930
931 // store whether segment was added to at least one candidates
932
933 // vector to store candidate extensions
934 std::vector<std::pair<MuPatSegment*, std::unique_ptr<Trk::Track> > > extensions;
935 extensions.reserve(segVec.size());
936
937 // loop over segments
938 for (MuPatSegment* seg : segVec) {
939 if (usedSegments.count(seg)) continue;
940
941 // check whether chamber is already included in candidate
942 if (candidate.shareChambers(*seg)) {
943 ATH_MSG_VERBOSE("addStationToSeed:: already on candidate " << std::endl << m_printer->print(*seg->segment));
944 continue;
945 }
946
947 if (!m_candidateMatchingTool->match(ctx, candidate, *seg, tightQualityCuts)) {
948 ATH_MSG_VERBOSE(" track/segment combination rejected based on angular matching " << std::endl
949 << m_printer->print(*seg->segment));
950 continue;
951 }
952
953 ATH_MSG_VERBOSE("combining: " << m_printer->print(*seg->segment));
954
955 // try to combine track with segment
956 std::unique_ptr<Trk::Track> track = combine(ctx, candidate, *seg, emptyPhiHits);
957
958 // additional check in case the candidate is a MuPatTrack
959 MuPatTrack* trkCan = dynamic_cast<MuPatTrack*>(&candidate);
960 MuPatSegment* segCan = dynamic_cast<MuPatSegment*>(&candidate);
961 if (trkCan) {
962 if (!track) {
963 trkCan->addExcludedSegment(seg);
964 continue;
965 }
966
967 // is the new track better
968 SortTracksByHitNumber sortTracks;
969 if (!sortTracks(*track, trkCan->track())) {
970 ATH_MSG_VERBOSE(" rejecting track as new segment results in worse fit");
971 continue;
972 }
973
974 // check whether the track cleaner didn't remove one of the already added chamber layers
975 // loop over hits
976 std::set<MuonStationIndex::StIndex> stationLayersOnTrack;
977 for ( const Trk::MeasurementBase* meas : *track->measurementsOnTrack()) {
978 Identifier id = m_edmHelperSvc->getIdentifier(*meas);
979 if (!id.is_valid() || m_idHelperSvc->isTrigger(id)) { continue; }
980 stationLayersOnTrack.insert(m_idHelperSvc->stationIndex(id));
981 }
982
983 bool hasAllLayers = true;
984 for (const MuonStationIndex::StIndex& stIdx :candidate.stations()) {
985 if (!stationLayersOnTrack.count(stIdx)) {
986 ATH_MSG_VERBOSE(" missing layer " << MuonStationIndex::stName(stIdx));
987 hasAllLayers = false;
988 }
989 }
990
991 if (!hasAllLayers) {
992 ATH_MSG_VERBOSE(" rejecting track as one of the chamber layers of the candidate was removed ");
993 continue;
994 }
995 }
996
997 if (!track) { continue; }
998
999 usedSegments.insert(seg);
1000
1001 // now loop over segments once more and try to add SL overlap if missed
1002 // first check that segment is not an overlap segment
1003 if (!seg->hasSLOverlap()) {
1004 std::unique_ptr<MuPatTrack> newCandidate;
1005 // loop over segments
1006 for (MuPatSegment* seg_1 : segVec) {
1007 // select segments is different chamber
1008 if (seg->chIndex == seg_1->chIndex) continue;
1009
1010 if (!newCandidate) {
1011 std::unique_ptr<Trk::Track> trkTrkCan = std::make_unique<Trk::Track>(*track);
1012 if (trkCan) {
1013 // copy candidate and add segment
1014 newCandidate = std::make_unique<MuPatTrack>(*trkCan);
1015 m_candidateHandler->extendWithSegment(*newCandidate, *seg, trkTrkCan);
1016 } else if (segCan) {
1017 newCandidate = m_candidateHandler->createCandidate(*segCan, *seg, trkTrkCan);
1018 }
1019 if (!newCandidate) break;
1020 }
1021 if (!m_candidateMatchingTool->match(ctx, *newCandidate, *seg_1, tightQualityCuts)) {
1022 ATH_MSG_VERBOSE("track/segment combination rejected based on angular matching "
1023 << std::endl
1024 << m_printer->print(*seg->segment));
1025 continue;
1026 }
1027
1028 ATH_MSG_VERBOSE("adding SL overlap " << m_printer->print(*seg_1->segment));
1029 std::unique_ptr<Trk::Track> slOverlapTrack = combine(ctx, *track, *seg_1->segment, emptyPhiHits);
1030 if (!slOverlapTrack) continue;
1031
1032 // is the new track better
1033 SortTracksByHitNumber sortTracks;
1034 if (!sortTracks(*slOverlapTrack, *track)) {
1035 ATH_MSG_VERBOSE(__FILE__<<":"<<__LINE__<<" rejecting track as new segment results in worse fit");
1036 continue;
1037 }
1038 ATH_MSG_VERBOSE("adding SL overlap ok, new track" << m_printer->print(*slOverlapTrack) << std::endl
1039 << m_printer->printStations(*slOverlapTrack));
1040
1041 track.swap(slOverlapTrack);
1042 usedSegments.insert(seg_1);
1043 slSegments[seg] = seg_1;
1044 break;
1045 }
1046 }
1047
1048 ATH_MSG_VERBOSE(" Track found " << m_printer->print(*track)<<std::endl<<m_printer->printMeasurements(*track));
1049
1050 // add new solution
1051 extensions.emplace_back(seg, std::move(track));
1052
1053 } // for (sit)
1054
1055 // loop over solutions and add them
1056 if (!extensions.empty()) {
1057 candidates.reserve(extensions.size());
1058
1059 // additional check in case the candidate is a MuPatTrack
1060 MuPatTrack* trkCan = dynamic_cast<MuPatTrack*>(&candidate);
1061 MuPatSegment* segCan = dynamic_cast<MuPatSegment*>(&candidate);
1062
1063 // if more than 1 extensions are found, first add the copies
1064 // start from the second one to make copies based on the existing candidates
1065 for (std::pair<MuPatSegment*, std::unique_ptr<Trk::Track> >& ext_itr : extensions) {
1066 std::unique_ptr<MuPatTrack> newCandidate;
1067 if (trkCan) {
1068 // copy candidate and add segment
1069 newCandidate = std::make_unique<MuPatTrack>(*trkCan);
1070 m_candidateHandler->extendWithSegment(*newCandidate, *ext_itr.first, ext_itr.second);
1071 } else if (segCan) {
1072 newCandidate = m_candidateHandler->createCandidate(*segCan, *ext_itr.first, ext_itr.second);
1073 }
1074 ATH_MSG_DEBUG(" " << m_printer->print(*ext_itr.first->segment));
1075 MuPatSegment* slOverlap = slSegments[ext_itr.first];
1076
1077 if (slOverlap) {
1078 ATH_MSG_DEBUG("SLOverlap " << m_printer->print(*slOverlap->segment));
1079 // hack to allow me to add a second segment without changing the track
1080 std::unique_ptr<Trk::Track> nullTrack;
1081 newCandidate->addSegment(slOverlap, nullTrack);
1082 }
1083 candidates.push_back(std::move(newCandidate));
1084
1085 ATH_MSG_DEBUG(" creating new candidate " << candidates.back().get() << std::endl
1086 << m_printer->print(candidates.back()->track()) << std::endl
1087 << m_printer->printStations(candidates.back()->track()));
1088 }
1089 }
1090 return candidates;
1091 }
StIndex
enum to classify the different station layers in the muon spectrometer
static const MooTrackBuilder::PrepVec emptyPhiHits
bool sortTracks(const ElementLink< xAOD::TauTrackContainer > &l1, const ElementLink< xAOD::TauTrackContainer > &l2)

◆ findClosestParameters()

std::unique_ptr< Trk::TrackParameters > Muon::MooTrackBuilder::findClosestParameters ( const Trk::Track & track,
const Amg::Vector3D & pos ) const
overridevirtual

find closest TrackParameters to the position.

Closest is defined as closest in z in the endcap and closest in r in the barrel.

Parameters
tracka reference to a Track
posa reference to a GlobalPosition
Returns
a pointer to TrackParameters, the ownership of the parameters is passed to the client calling the tool.

Implements Muon::IMuonSegmentTrackBuilder.

Definition at line 345 of file MooTrackBuilder.cxx.

345 {
346 // are we in the endcap?
347 bool isEndcap = m_edmHelperSvc->isEndcap(track);
348
349 // position of segment
350 double posSeg = isEndcap ? pos.z() : pos.perp();
351
352 // position closest parameters
353 double closest = 1e8;
354 const Trk::TrackParameters* closestParameters = nullptr;
355 bool closestIsMeasured = false;
356
357 // loop over track and calculate residuals
358 const Trk::TrackStates* states = track.trackStateOnSurfaces();
359 if (!states) {
360 ATH_MSG_DEBUG(" track without states! ");
361 return nullptr;
362 }
363
364 // loop over TSOSs
367 for (; tsit != tsit_end; ++tsit) {
368 // check whether state is a measurement
369 const Trk::MeasurementBase* meas = (*tsit)->measurementOnTrack();
370 if (!meas) { continue; }
371
372 const Trk::TrackParameters* pars = (*tsit)->trackParameters();
373 if (!pars) { continue; }
374
375 // check whether measured parameters
376 bool isMeasured = pars->covariance();
377
378 // skip all none measured TrackParameters as soon as we found one with a measurement
379 if (closestIsMeasured && !isMeasured) continue;
380
381 // calculate position parameters and compare with position segment
382 double posPars = isEndcap ? pars->position().z() : pars->position().perp();
383 double diffPos = std::abs(posPars - posSeg);
384
385 // accept if measured parameters or the current accepted parameters are not yet measured
386 if ((isMeasured && !closestIsMeasured) || diffPos < closest) {
387 closest = diffPos;
388 closestParameters = pars;
389 closestIsMeasured = isMeasured;
390
391 // if we are within 100 mm take current
392 if (closest < 100.) { break; }
393 }
394 }
395
396 // return clone of parameters
397 if (closestParameters) return closestParameters->uniqueClone();
398 return nullptr;
399 }
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
std::unique_ptr< ParametersBase< DIM, T > > uniqueClone() const
clone method for polymorphic deep copy returning unique_ptr; it is not overriden, but uses the existi...
DataVector< const Trk::TrackStateOnSurface > TrackStates
ParametersBase< TrackParametersDim, Charged > TrackParameters

◆ getClosestParameters() [1/2]

std::unique_ptr< Trk::TrackParameters > Muon::MooTrackBuilder::getClosestParameters ( const MuPatCandidateBase & candidate,
const Trk::Surface & surf ) const

find closest TrackParameters to the surface.

The distance is calculated along the track

Parameters
tracka reference to a MuPatCandidateBase
posa reference to a Surface
Returns
a pointer to TrackParameters, the ownership of the parameters is passed to the client calling the tool.

Definition at line 401 of file MooTrackBuilder.cxx.

401 {
402 // cast to segment, return segment parameters if cast success
403 const MuPatSegment* segCandidate = dynamic_cast<const MuPatSegment*>(&candidate);
404 if (segCandidate) return segCandidate->entryPars().uniqueClone();
405
406 // for a track candidate, return the closest parameter on the track
407 const MuPatTrack& trkCandidate = dynamic_cast<const MuPatTrack&>(candidate);
408 return getClosestParameters(trkCandidate.track(), surf);
409 }
virtual std::unique_ptr< Trk::TrackParameters > getClosestParameters(const Trk::Track &track, const Trk::Surface &surf) const override
find closest TrackParameters to the surface.

◆ getClosestParameters() [2/2]

std::unique_ptr< Trk::TrackParameters > Muon::MooTrackBuilder::getClosestParameters ( const Trk::Track & track,
const Trk::Surface & surf ) const
overridevirtual

find closest TrackParameters to the surface.

The distance is calculated along the track

Parameters
tracka reference to a Track
posa reference to a Surface
Returns
a pointer to TrackParameters, the ownership of the parameters is passed to the client calling the tool.

Implements Muon::IMuonSegmentTrackBuilder.

Definition at line 411 of file MooTrackBuilder.cxx.

411 {
413 }
static std::unique_ptr< Trk::TrackParameters > closestParameters(const Trk::Track &track, const Amg::Vector3D &pos, bool onlyUseMeasured=false)

◆ initialize()

StatusCode Muon::MooTrackBuilder::initialize ( )
overridevirtual

initialize method, method taken from bass-class AlgTool

Definition at line 37 of file MooTrackBuilder.cxx.

37 {
38 ATH_CHECK(m_fitter.retrieve());
39 ATH_CHECK(m_slFitter.retrieve());
41 ATH_CHECK(m_errorOptimisationTool.retrieve(DisableTool{m_errorOptimisationTool.empty()}));
42 ATH_CHECK(m_candidateHandler.retrieve());
46 ATH_CHECK(m_idHelperSvc.retrieve());
47 ATH_CHECK(m_edmHelperSvc.retrieve());
48 ATH_CHECK(m_printer.retrieve());
51 ATH_CHECK(m_mdtRotCreator.retrieve());
52 ATH_CHECK(m_compRotCreator.retrieve());
53 ATH_CHECK(m_propagator.retrieve());
54 ATH_CHECK(m_pullCalculator.retrieve());
55 ATH_CHECK(m_trackSummaryTool.retrieve());
56
57 return StatusCode::SUCCESS;
58 }
#define ATH_CHECK
Evaluate an expression and check for errors.
ToolHandle< IMuonCompetingClustersOnTrackCreator > m_compRotCreator
ToolHandle< IMdtDriftCircleOnTrackCreator > m_mdtRotCreator
ToolHandle< Trk::IExtendedTrackSummaryTool > m_trackSummaryTool
ToolHandle< IMuonHoleRecoveryTool > m_muonChamberHoleRecoverTool
ToolHandle< IMuonErrorOptimisationTool > m_errorOptimisationTool
ToolHandle< IMuonTrackExtrapolationTool > m_trackExtrapolationTool
ToolHandle< Trk::IResidualPullCalculator > m_pullCalculator

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

◆ insertClustersWithCompetingRotCreation()

Trk::TrackStates::const_iterator Muon::MooTrackBuilder::insertClustersWithCompetingRotCreation ( const EventContext & ctx,
Trk::TrackStates::const_iterator tsit,
Trk::TrackStates::const_iterator tsit_end,
std::vector< std::unique_ptr< const Trk::TrackStateOnSurface > > & states ) const
private

Definition at line 722 of file MooTrackBuilder.cxx.

725 {
726 // iterator should point to a valid element
727 if (tsit == tsit_end) {
728 ATH_MSG_WARNING(" iterator pointing to end of vector, this should no happen ");
729 return --tsit;
730 }
731
732 // check whether state is a measurement
733 const Trk::MeasurementBase* meas = (*tsit)->measurementOnTrack();
734 const Trk::TrackParameters* pars = (*tsit)->trackParameters();
735 if (!meas || !pars) {
736 ATH_MSG_WARNING(" iterator pointing to a TSOS without a measurement or TrackParameters ");
737 if (tsit + 1 == tsit_end) --tsit;
738 return tsit;
739 }
740
741 ATH_MSG_VERBOSE(" inserting with competing ROT creation ");
742
743 // loop over states until we reached the last tgc hit in this detector element
744 // keep trackof the identifiers and the states
745 std::list<const Trk::PrepRawData*> etaPrds;
746 std::list<const Trk::PrepRawData*> phiPrds;
747 const Trk::TrkDetElementBase* currentDetEl = nullptr;
748 std::vector<std::unique_ptr<const Trk::TrackStateOnSurface> > newStates;
749 // keep track of outliers as we might have to drop them..
750 std::vector<std::pair<bool, const Trk::TrackStateOnSurface*> > outlierStates;
751 bool hasPhi {false}, hasEta{false};
752
753 for (; tsit != tsit_end; ++tsit) {
754 const Trk::TrackStateOnSurface* in_tsos = *tsit;
755 if (!in_tsos) continue;
756
757 // check whether state is a measurement, keep if not
758 const Trk::MeasurementBase* meas = in_tsos->measurementOnTrack();
759 if (!meas) {
760 newStates.emplace_back(in_tsos->clone());
761 continue;
762 }
763
764 // get identifier, keep state if it has no identifier.
765 Identifier id = m_edmHelperSvc->getIdentifier(*meas);
766 if (!id.is_valid()) {
767 newStates.emplace_back(in_tsos->clone());
768 continue;
769 }
770
771 // sanity check, this SHOULD be a RPC, TGC or CSC measurement
772 if (!(m_idHelperSvc->isTrigger(id))) { break; }
773
774 bool measuresPhi = m_idHelperSvc->measuresPhi(id);
775 if (!hasPhi && measuresPhi) hasPhi = true;
776 if (!hasEta && !measuresPhi) hasEta = true;
777
778 // check whether state is a measurement
779 if ((*tsit)->type(Trk::TrackStateOnSurface::Outlier)) {
780 outlierStates.emplace_back(measuresPhi, in_tsos);
781 continue;
782 }
783
784 // check whether we are still in the same chamber, stop loop if not
785
786 ATH_MSG_VERBOSE(" handling " << m_idHelperSvc->toString(id));
787
788 std::list<const Trk::PrepRawData*>& prdList = measuresPhi ? phiPrds : etaPrds;
789 const MuonClusterOnTrack* clus = dynamic_cast<const MuonClusterOnTrack*>(meas);
790 if (clus) {
791 const Trk::TrkDetElementBase* detEl = clus->detectorElement();
792 if (!currentDetEl) currentDetEl = detEl;
793 if (detEl != currentDetEl) {
794 ATH_MSG_VERBOSE(" new detector element stopping ");
795 break;
796 }
797 prdList.push_back(clus->prepRawData());
798 } else {
799 // split competing ROTs into constituents
800 const CompetingMuonClustersOnTrack* comp = dynamic_cast<const CompetingMuonClustersOnTrack*>(meas);
801 if (comp) {
802 const Trk::TrkDetElementBase* detEl = nullptr;
803 if (comp->containedROTs().empty()) {
804 ATH_MSG_WARNING(" CompetingROT without constituents ");
805 break;
806 }
807 detEl = comp->containedROTs().front()->detectorElement();
808 if (!currentDetEl) currentDetEl = detEl;
809 if (detEl != currentDetEl) {
810 ATH_MSG_VERBOSE(" new detector element stopping ");
811 break;
812 }
813 std::vector<const MuonClusterOnTrack*>::const_iterator clit = comp->containedROTs().begin();
814 std::vector<const MuonClusterOnTrack*>::const_iterator clit_end = comp->containedROTs().end();
815 for (; clit != clit_end; ++clit) { prdList.push_back((*clit)->prepRawData()); }
816
817 } else {
818 ATH_MSG_WARNING(" Unknown trigger hit type! ");
819 continue;
820 }
821 }
822 }
823
824 // now that we have the lists of prds we can create the competing rots
825 if (!etaPrds.empty()) {
826 std::unique_ptr<CompetingMuonClustersOnTrack> etaCompRot = m_compRotCreator->createBroadCluster(etaPrds, 0.);
827 if (!etaCompRot) {
828 ATH_MSG_WARNING(" Failed to create CompetingMuonClustersOnTrack for eta hits! ");
829 } else {
830 std::unique_ptr<Trk::TrackParameters> etaPars;;
831 // check whether original parameters are on surface, if so clone original parameters
832 if (etaCompRot->associatedSurface() == pars->associatedSurface()) {
833 etaPars = pars->uniqueClone();
834 } else {
835 // ownership relinquished, should be treated in createMeasTSOS
836 etaPars =
837 m_propagator->propagate(ctx,*pars,
838 etaCompRot->associatedSurface(),
840 }
841 if (!etaPars) {
842 ATH_MSG_WARNING(" Failed to calculate TrackParameters for eta hits! ");
843 } else {
844 std::unique_ptr<Trk::TrackStateOnSurface> tsos =
845 MuonTSOSHelper::createMeasTSOS(std::move(etaCompRot), std::move(etaPars), Trk::TrackStateOnSurface::Measurement);
846 newStates.push_back(std::move(tsos));
847 }
848 }
849 }
850
851 if (!phiPrds.empty()) {
852 std::unique_ptr<CompetingMuonClustersOnTrack> phiCompRot = m_compRotCreator->createBroadCluster(phiPrds, 0.);
853 if (!phiCompRot) {
854 ATH_MSG_WARNING(" Failed to create CompetingMuonClustersOnTrack for phi hits! ");
855 } else {
856 std::unique_ptr<Trk::TrackParameters> phiPars;
857 // check whether original parameters are on surface, if so clone original parameters
858 if (phiCompRot->associatedSurface() == pars->associatedSurface()) {
859 phiPars = pars->uniqueClone();
860 } else {
861 // ownership relinquished, handled in createMeasTSOS
862 phiPars =
863 m_propagator->propagate(ctx, *pars, phiCompRot->associatedSurface(),
865 }
866 if (!phiPars) {
867 ATH_MSG_WARNING(" Failed to calculate TrackParameters for phi hits! ");
868 } else {
869 std::unique_ptr<Trk::TrackStateOnSurface> tsos =
870 MuonTSOSHelper::createMeasTSOS(std::move(phiCompRot), std::move(phiPars), Trk::TrackStateOnSurface::Measurement);
871 newStates.push_back(std::move(tsos));
872 }
873 }
874 }
875
876 // add outliers if there was no measurement on track in the same projection
877 for (const auto& outlier : outlierStates) {
878 if (hasPhi && outlier.first)
879 newStates.emplace_back(outlier.second->clone());
880 else if (hasEta && !outlier.first)
881 newStates.emplace_back(outlier.second->clone());
882 else if (msgLvl(MSG::DEBUG))
883 msg(MSG::DEBUG) << " Dropping outlier " << endmsg;
884 }
885
886 // sort all states in this chamber
887 std::stable_sort(newStates.begin(), newStates.end(), SortTSOSByDistanceToPars(pars));
888
889 // insert the states into
890 states.insert(states.end(), std::make_move_iterator(newStates.begin()),
891 std::make_move_iterator(newStates.end()));
892
893 // iterator should point to the last TGC in this chamber
894 return --tsit;
895 }
virtual const MuonGM::MuonClusterReadoutElement * detectorElement() const override=0
Returns the detector element, associated with the PRD of this class.
virtual const MuonCluster * prepRawData() const override=0
Returns the Trk::PrepRawData - is a MuonCluster in this scope.
static std::unique_ptr< Trk::TrackStateOnSurface > createMeasTSOS(std::unique_ptr< Trk::MeasurementBase > meas, std::unique_ptr< Trk::TrackParameters > pars, Trk::TrackStateOnSurface::TrackStateOnSurfaceType type)
create a TSOS with a measurement, takes ownership of the pointers
virtual TrackStateOnSurface * clone() const
Pseudo-constructor: needed to avoid excessive RTTI.
const MeasurementBase * measurementOnTrack() const
returns MeasurementBase const overload
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
void stable_sort(DataModel_detail::iterator< DVL > beg, DataModel_detail::iterator< DVL > end)
Specialization of stable_sort for DataVector/List.

◆ interfaceID()

const InterfaceID & Muon::MooTrackBuilder::interfaceID ( )
inlinestatic

access to tool interface

Definition at line 99 of file MooTrackBuilder.h.

99 {
100 static const InterfaceID IID_MooTrackBuilder("Muon::MooTrackBuilder", 1, 0);
101 return IID_MooTrackBuilder;
102 }

◆ isSplitTrack()

bool Muon::MooTrackBuilder::isSplitTrack ( const EventContext & ctx,
const Trk::Track & track1,
const Trk::Track & track2 ) const
private

identify whether two track are split

Definition at line 1093 of file MooTrackBuilder.cxx.

1093 {
1094 // some loose association cuts
1095 const DataVector<const Trk::TrackParameters>* parsVec1 = track1.trackParameters();
1096 if (!parsVec1 || parsVec1->empty()) {
1097 ATH_MSG_WARNING(" isSplitTrack::Track without parameters! ");
1098 return false;
1099 }
1100 const Trk::TrackParameters* pars1 = parsVec1->front();
1101 if (!pars1) {
1102 ATH_MSG_WARNING(" isSplitTrack::Track without NULL pointer in parameter vector! ");
1103 return false;
1104 }
1105
1106 const DataVector<const Trk::TrackParameters>* parsVec2 = track2.trackParameters();
1107 if (!parsVec2 || parsVec2->empty()) {
1108 ATH_MSG_WARNING(" isSplitTrack::Track without parameters! ");
1109 return false;
1110 }
1111 const Trk::TrackParameters* pars2 = parsVec2->front();
1112 if (!pars2) {
1113 ATH_MSG_WARNING(" isSplitTrack::Track without NULL pointer in parameter vector! ");
1114 return false;
1115 }
1116
1117 if (!m_candidateMatchingTool->sameSide(pars1->momentum().unit(), pars1->position(), pars2->position(), true)) {
1118 ATH_MSG_DEBUG(" tracks in opposite hemispheres ");
1119 return false;
1120 }
1121
1122 double sinTheta1 = sin(pars1->momentum().theta());
1123 double sinTheta2 = sin(pars2->momentum().theta());
1124 double deltaSinTheta = sinTheta1 - sinTheta2;
1125 if (std::abs(deltaSinTheta) > 1.) {
1126 ATH_MSG_DEBUG(" too large opening angle in theta " << deltaSinTheta);
1127 // return false;
1128 }
1129 double sinPhi1 = sin(pars1->momentum().phi());
1130 double sinPhi2 = sin(pars2->momentum().phi());
1131 double deltaSinPhi = sinPhi1 - sinPhi2;
1132 if (std::abs(deltaSinPhi) > 1.) {
1133 ATH_MSG_DEBUG(" too large opening angle in phi " << deltaSinPhi);
1134 // return false;
1135 }
1136
1137 const Trk::Track* referenceTrack = nullptr;
1138 const Trk::Track* otherTrack = nullptr;
1139
1140 // first check whether the tracks have a momentum measurement
1141 bool isSL1 = m_edmHelperSvc->isSLTrack(track1);
1142 bool isSL2 = m_edmHelperSvc->isSLTrack(track2);
1143
1144 // now decide which track to use as reference
1145 if (isSL1 && !isSL2) {
1146 referenceTrack = &track2;
1147 otherTrack = &track1;
1148 } else if (!isSL1 && isSL2) {
1149 referenceTrack = &track1;
1150 otherTrack = &track2;
1151 } else {
1152 SortTracksByHitNumber sortTracks;
1153 bool pickFirst = sortTracks(track1, track2);
1154 if (pickFirst) {
1155 referenceTrack = &track1;
1156 otherTrack = &track2;
1157 } else {
1158 referenceTrack = &track2;
1159 otherTrack = &track1;
1160 }
1161 }
1162
1163 ATH_MSG_DEBUG(" close tracks " << std::endl << m_printer->print(*referenceTrack) << std::endl << m_printer->print(*otherTrack));
1164
1165 // get iterators to TSOSs
1166 const Trk::TrackStates* statesRef = referenceTrack->trackStateOnSurfaces();
1167 if (!statesRef) {
1168 ATH_MSG_WARNING(" track without states, cannot perform cleaning ");
1169 return false;
1170 }
1171 Trk::TrackStates::const_iterator refTSOS = statesRef->begin();
1172 Trk::TrackStates::const_iterator refTSOS_end = statesRef->end();
1173
1174 const Trk::TrackStates* statesOther = otherTrack->trackStateOnSurfaces();
1175 if (!statesOther) {
1176 ATH_MSG_WARNING(" track without states, cannot perform cleaning ");
1177 return false;
1178 }
1179 Trk::TrackStates::const_iterator otherTSOS = statesOther->begin();
1180 Trk::TrackStates::const_iterator otherTSOS_end = statesOther->end();
1181
1182 DistanceAlongParameters distAlongPars;
1183
1184 unsigned int nmatching(0);
1185 unsigned int noff(0);
1186
1187 // keep track of previous distance and parameters as well
1188 double prevDist = 1e10;
1189 const Trk::TrackParameters* prevPars = nullptr;
1190
1191 // now loop over the TSOSs of both tracks and compare hit by hit
1192 while (refTSOS != refTSOS_end && otherTSOS != otherTSOS_end) {
1193 const Trk::TrackParameters* parsRef = (*refTSOS)->trackParameters();
1194 if (!parsRef) {
1195 ++refTSOS;
1196 continue;
1197 }
1198
1199 const Trk::TrackParameters* parsOther = (*otherTSOS)->trackParameters();
1200 if (!parsOther) {
1201 ++otherTSOS;
1202 continue;
1203 }
1204
1205 double dist = distAlongPars(*parsRef, *parsOther);
1206
1207 if (dist > 0.) {
1208 prevDist = dist;
1209 prevPars = parsRef;
1210 ++refTSOS;
1211 continue;
1212 } else {
1213 const Trk::TrackParameters* closestPars = nullptr;
1214 if (prevPars && std::abs(prevDist) < std::abs(dist)) {
1215 closestPars = prevPars;
1216 } else {
1217 closestPars = parsRef;
1218 }
1219
1220 // check whether state is a measurement
1221 const Trk::MeasurementBase* meas = (*otherTSOS)->measurementOnTrack();
1222 if (meas && (*otherTSOS)->type(Trk::TrackStateOnSurface::Measurement)) {
1223 Identifier id = m_edmHelperSvc->getIdentifier(*meas);
1224 // skip pseudo measurements
1225 if (!id.is_valid()) {
1226 prevDist = dist;
1227 prevPars = parsRef;
1228 ++otherTSOS;
1229 continue;
1230 }
1231 if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << m_idHelperSvc->toString(id);
1232 // unique ptr ownership retained. Original code deleted impactPars
1233 auto impactPars =
1234 m_propagator->propagate(ctx, *closestPars, meas->associatedSurface(),
1236 if (impactPars) {
1237 double residual = 1e10;
1238 double pull = 1e10;
1239 // pointer to resPull
1240 std::optional<Trk::ResidualPull> resPull =
1241 m_pullCalculator->residualPull(meas, impactPars.get(), Trk::ResidualPull::Unbiased);
1242 if (resPull && resPull->pull().size() == 1) {
1243 if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << " residual " << m_printer->print(*resPull);
1244 residual = resPull->residual().front();
1245 pull = resPull->pull().front();
1246 } else {
1247 ATH_MSG_WARNING("failed to calculate residual and pull");
1248 }
1249
1250 bool inBounds = false;
1251 Amg::Vector2D LocVec2D;
1252 bool ok = meas->associatedSurface().globalToLocal(impactPars->position(), impactPars->momentum(), LocVec2D);
1253 // delete impactPars;
1254 if (ok) {
1255 if (msgLvl(MSG::VERBOSE))
1256 msg(MSG::VERBOSE) << " lpos (" << LocVec2D[Trk::locX] << "," << LocVec2D[Trk::locY] << ")";
1257 double tol1 = 50.;
1258 double tol2 = tol1;
1259 Identifier id = m_edmHelperSvc->getIdentifier(*meas);
1260 if (msgLvl(MSG::VERBOSE) && m_idHelperSvc->isMdt(id)) {
1261 const MdtDriftCircleOnTrack* mdt = dynamic_cast<const MdtDriftCircleOnTrack*>(meas);
1262 if (mdt) {
1263 int layer = m_idHelperSvc->mdtIdHelper().tubeLayer(id);
1264 int tube = m_idHelperSvc->mdtIdHelper().tube(id);
1265 double halfTubeLen = 0.5 * mdt->detectorElement()->getActiveTubeLength(layer, tube);
1266 if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << " range " << halfTubeLen;
1267 }
1268 }
1269
1270 // for MM, perform the bound check from the detector element to take into account edge passivation
1271 const MMClusterOnTrack* mmClusterOnTrack = dynamic_cast<const MMClusterOnTrack*>(meas);
1272 if (mmClusterOnTrack) {
1273 inBounds = mmClusterOnTrack->detectorElement()->insideActiveBounds(id, LocVec2D, tol1, tol2);
1274 } else {
1275 inBounds = meas->associatedSurface().insideBounds(LocVec2D, tol1, tol2);
1276 }
1277
1278 if (msgLvl(MSG::VERBOSE)) {
1279 if (inBounds)
1280 msg(MSG::VERBOSE) << " inBounds ";
1281 else
1282 msg(MSG::VERBOSE) << " outBounds ";
1283 }
1284 } else {
1285 ATH_MSG_WARNING("globalToLocal failed");
1286 }
1287
1288 if (inBounds && (std::abs(residual) < 20. || std::abs(pull) < 10.)) {
1289 ATH_MSG_VERBOSE(" --> matching ");
1290 ++nmatching;
1291 } else {
1292 ATH_MSG_VERBOSE(" --> off ");
1293 ++noff;
1294 }
1295
1296 } else {
1297 ATH_MSG_DEBUG("failed to extrapolate parameters to surface");
1298 }
1299 }
1300
1301 prevDist = dist;
1302 prevPars = parsRef;
1303 ++otherTSOS;
1304 continue;
1305 }
1306 }
1307
1308 // if more hits are compatible with reference track than are not consider as split track
1309 return nmatching > noff;
1310 }
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
const T * front() const
Access the first element in the collection as an rvalue.
bool empty() const noexcept
Returns true if the collection is empty.
virtual const MuonGM::MdtReadoutElement * detectorElement() const override final
Returns the detector element, assoicated with the PRD of this class.
double getActiveTubeLength(const int tubeLayer, const int tube) const
virtual const Surface & associatedSurface() const =0
Interface method to get the associated Surface.
const Amg::Vector3D & momentum() const
Access method for the momentum.
const Amg::Vector3D & position() const
Access method for the position.
@ Unbiased
RP with track state that has measurement not included.
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const =0
Specified by each surface type: GlobalToLocal method without dynamic memory allocation - boolean chec...
virtual bool insideBounds(const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const =0
virtual methods to be overwritten by the inherited surfaces
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
const DataVector< const TrackParameters > * trackParameters() const
Return a pointer to a vector of TrackParameters.
Eigen::Matrix< double, 2, 1 > Vector2D
@ layer
Definition HitInfo.h:79
@ locY
local cartesian
Definition ParamDefs.h:38
@ locX
Definition ParamDefs.h:37

◆ mergeSplitTracks()

TrackCollection * Muon::MooTrackBuilder::mergeSplitTracks ( const EventContext & ctx,
const TrackCollection & tracks ) const
private

look for split tracks in collection and merge them

Definition at line 1312 of file MooTrackBuilder.cxx.

1312 {
1313 // vector to store good track, boolean is used to identify whether the track was created in this routine or is from the collection
1314 std::vector<std::pair<bool, std::unique_ptr<Trk::Track> > > goodTracks;
1315 goodTracks.reserve(tracks.size());
1316 bool foundSplitTracks = false;
1317
1318 ATH_MSG_DEBUG(" trying to merge split tracks, collection size " << tracks.size());
1319
1320 // loop over tracks
1321 for (const Trk::Track* in_track : tracks) {
1322 // pointer to merged track
1323 std::unique_ptr<Trk::Track> mergedTrack;
1324
1325 // compare them to all good tracks and look for split tracks
1326 for (std::pair<bool, std::unique_ptr<Trk::Track>>& good_trk : goodTracks) {
1327 // check whether track is split
1328 bool isSplit = isSplitTrack(ctx, *good_trk.second, *in_track);
1329 if (isSplit) {
1330 // if we found a potential split track, try to combine them
1331 std::unique_ptr<Trk::Track> track1 = std::make_unique<Trk::Track>(*good_trk.second);
1332 std::unique_ptr<Trk::Track> track2 = std::make_unique<Trk::Track>(*in_track);
1333 std::unique_ptr<MuPatTrack> can1 = m_candidateHandler->createCandidate(track1);
1334 std::unique_ptr<MuPatTrack> can2 = m_candidateHandler->createCandidate(track2);
1335 mergedTrack = combine(ctx, *can1, *can2, emptyPhiHits);
1336
1337 // we have found a split track and have successfully merged it
1338 // replace the track in goodTracks with the new one
1339 if (mergedTrack) {
1340 ATH_MSG_DEBUG(" origninal tracks " << std::endl
1341 << m_printer->print(*good_trk.second) << std::endl
1342 << m_printer->printStations(*good_trk.second) << std::endl
1343 << m_printer->print(*in_track) << std::endl
1344 << m_printer->printStations(*in_track) << std::endl
1345 << " merged track " << std::endl
1346 << m_printer->print(*mergedTrack) << std::endl
1347 << m_printer->printStations(*mergedTrack));
1348 foundSplitTracks = true;
1349 // check whether this is a new track, if so delete the old one before overwriting it
1350 good_trk.first = true;
1351 good_trk.second.swap(mergedTrack);
1352 break;
1353 } else {
1354 ATH_MSG_VERBOSE(" failed to merge tracks " << std::endl
1355 << m_printer->print(*good_trk.second) << std::endl
1356 << m_printer->printStations(*good_trk.second) << std::endl
1357 << m_printer->print(*in_track) << std::endl
1358 << m_printer->printStations(*in_track));
1359 }
1360 }
1361 }
1362
1363 // if this track was not merged with another track insert it into goodTracks
1364 if (!mergedTrack) {
1365 std::unique_ptr<Trk::Track> newTrack = std::make_unique<Trk::Track>(*in_track);
1366 goodTracks.emplace_back(false, std::move(newTrack));
1367 }
1368 }
1369
1370 // did we find any?
1371 if (!foundSplitTracks) return nullptr;
1372 // loop over the new track vector and create a new TrackCollection
1373 TrackCollection* newTracks = new TrackCollection();
1374 newTracks->reserve(goodTracks.size());
1375 for (std::pair<bool, std::unique_ptr<Trk::Track>>& good_trk: goodTracks) {
1376 // TrackCollection will take ownership
1377 newTracks->push_back(std::move(good_trk.second));
1378 }
1379 return newTracks;
1380 }
DataVector< Trk::Track > TrackCollection
This typedef represents a collection of Trk::Track objects.
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
bool isSplitTrack(const EventContext &ctx, const Trk::Track &track1, const Trk::Track &track2) const
identify whether two track are split

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

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

◆ recalibrateHitsOnTrack()

std::unique_ptr< Trk::Track > Muon::MooTrackBuilder::recalibrateHitsOnTrack ( const EventContext & ctx,
const Trk::Track & track,
bool doMdts,
bool doCompetingClusters ) const
overridevirtual

recalibrate hits on track

Implements Muon::IMuonSegmentTrackBuilder.

Definition at line 616 of file MooTrackBuilder.cxx.

617 {
618 // loop over track and calculate residuals
619 const Trk::TrackStates* states = track.trackStateOnSurfaces();
620 if (!states) {
621 ATH_MSG_DEBUG(" track without states, discarding track ");
622 return nullptr;
623 }
624 if (msgLvl(MSG::DEBUG)) {
625 msg(MSG::DEBUG) << MSG::DEBUG << " recalibrating hits on track " << std::endl << m_printer->print(track);
626
627 if (msgLvl(MSG::VERBOSE)) {
628 if (track.measurementsOnTrack())
629 msg(MSG::DEBUG) << std::endl << m_printer->print(track.measurementsOnTrack()->stdcont()) << endmsg;
630 } else {
631 msg(MSG::DEBUG) << endmsg;
632 }
633 }
634 // vector to store states, the boolean indicated whether the state was create in this routine (true) or belongs to the track (false)
635 // If any new state is created, all states will be cloned and a new track will beformed from them.
636 std::vector<std::unique_ptr<const Trk::TrackStateOnSurface>> newStates;
637 newStates.reserve(states->size() + 5);
638
639 // loop over TSOSs
640 Trk::TrackStates::const_iterator state_itr = states->begin();
642 for (; state_itr != end_itr; ++state_itr) {
643 const Trk::TrackStateOnSurface* tsit = (*state_itr);
644 if (!tsit) continue; // sanity check
645
646 // check whether state is a measurement
648 if (!pars) {
649 newStates.emplace_back(tsit->clone());
650 continue;
651 }
652
653 // check whether state is a measurement
654 const Trk::MeasurementBase* meas = tsit->measurementOnTrack();
655 if (!meas) {
656 newStates.emplace_back(tsit->clone());
657 continue;
658 }
659
660 Identifier id = m_edmHelperSvc->getIdentifier(*meas);
661
662 // Not a ROT, else it would have had an identifier. Keep the TSOS.
663 if (!id.is_valid() || !m_idHelperSvc->isMuon(id)) {
664 newStates.emplace_back(tsit->clone());
665 continue;
666 }
667
668 ATH_MSG_VERBOSE(" new measurement " << m_idHelperSvc->toString(id));
669
670 if (m_idHelperSvc->isMdt(id)) {
671 if (doMdts) {
672 const MdtDriftCircleOnTrack* mdt = dynamic_cast<const MdtDriftCircleOnTrack*>(meas);
673 if (!mdt) {
674 ATH_MSG_WARNING(" Measurement with MDT identifier that is not a MdtDriftCircleOnTrack ");
675 continue;
676 }
677 std::unique_ptr<Trk::RIO_OnTrack> newMdt(m_mdtRotCreator->correct(*mdt->prepRawData(), *pars, ctx));
678 if (!newMdt) {
679 ATH_MSG_WARNING(" Failed to recalibrate MDT ");
680 continue;
681 }
682 std::unique_ptr<Trk::TrackStateOnSurface> tsos = MuonTSOSHelper::createMeasTSOSWithUpdate(
683 *tsit, std::move(newMdt), pars->uniqueClone(),
686 newStates.push_back(std::move(tsos));
687
688 } else {
689 newStates.emplace_back(tsit->clone());
690 }
691
692 } else if (m_idHelperSvc->isCsc(id)) {
693 newStates.emplace_back(tsit->clone());
694
695 } else if (m_idHelperSvc->isTrigger(id)) {
696 if (doCompetingClusters) {
697 state_itr = insertClustersWithCompetingRotCreation(ctx, state_itr, end_itr, newStates);
698 } else {
699 newStates.emplace_back(tsit->clone());
700 }
701
702 } else if (m_idHelperSvc->isMM(id) || m_idHelperSvc->issTgc(id)) {
703 newStates.emplace_back(tsit->clone());
704 } else {
705 ATH_MSG_WARNING(" unknown Identifier ");
706 }
707 }
708
709 ATH_MSG_DEBUG(" original track had " << states->size() << " TSOS, adding " << newStates.size() - states->size() << " new TSOS ");
710
711 // states were added, create a new track
712 auto trackStateOnSurfaces = std::make_unique<Trk::TrackStates>();
713 trackStateOnSurfaces->reserve(newStates.size());
714 for (std::unique_ptr<const Trk::TrackStateOnSurface>& new_state : newStates) {
715 // add states. If nit->first is true we have a new state. If it is false the state is from the old track and has to be cloned
716 trackStateOnSurfaces->push_back(std::move(new_state));
717 }
718 return std::make_unique<Trk::Track>(track.info(), std::move(trackStateOnSurfaces),
719 track.fitQuality() ? track.fitQuality()->uniqueClone() : nullptr);
720 }
virtual const MdtPrepData * prepRawData() const override final
Returns the PrepRawData used to create this corrected measurement.
Trk::TrackStates::const_iterator insertClustersWithCompetingRotCreation(const EventContext &ctx, Trk::TrackStates::const_iterator tsit, Trk::TrackStates::const_iterator tsit_end, std::vector< std::unique_ptr< const Trk::TrackStateOnSurface > > &states) const
static std::unique_ptr< Trk::TrackStateOnSurface > createMeasTSOSWithUpdate(const Trk::TrackStateOnSurface &tsos, std::unique_ptr< Trk::MeasurementBase > meas, std::unique_ptr< Trk::TrackParameters > pars, Trk::TrackStateOnSurface::TrackStateOnSurfaceType type)
create a TSOS with a measurement, takes ownership of the pointers
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
bool type(const TrackStateOnSurfaceType type) const
Use this method to find out if the TSoS is of a certain type: i.e.

◆ refine()

void Muon::MooTrackBuilder::refine ( const EventContext & ctx,
MuPatTrack & track ) const
overridevirtual

interface for tools which refine the hit content of a given track

Parameters
trackinput track
Returns
new refined track. Pointer could be zero, ownership passed to caller

Implements Muon::IMuonTrackRefiner.

Definition at line 92 of file MooTrackBuilder.cxx.

92 {
93
94 ATH_MSG_VERBOSE("refine: before recovery " << std::endl
95 << m_printer->print(track.track()) << std::endl
96 << m_printer->print(track.track().measurementsOnTrack()->stdcont()));
97
98 std::unique_ptr<Trk::Track> finalTrack(m_muonChamberHoleRecoverTool->recover(track.track(), ctx));
99 if (!finalTrack) { ATH_MSG_WARNING(" final track lost, this should not happen "); }
100 ATH_MSG_VERBOSE("refine: after recovery " << std::endl
101 << m_printer->print(*finalTrack) << std::endl
102 << m_printer->print(finalTrack->measurementsOnTrack()->stdcont()));
103
104 // generate a track summary for this track
105 if (m_trackSummaryTool.isEnabled()) { m_trackSummaryTool->computeAndReplaceTrackSummary(*finalTrack, false); }
106
107 bool recalibrateMDTHits = m_recalibrateMDTHits;
108 bool recreateCompetingROTs = true;
109 std::unique_ptr<Trk::Track> recalibratedTrack = recalibrateHitsOnTrack(ctx, *finalTrack, recalibrateMDTHits, recreateCompetingROTs);
110 if (!recalibratedTrack) {
111 ATH_MSG_WARNING(" failed to recalibrate hits on track " << std::endl << m_printer->print(*finalTrack));
112 } else
113 finalTrack.swap(recalibratedTrack);
114
115 std::unique_ptr<Trk::Track> refittedTrack = refit(ctx, *finalTrack);
116 if (!refittedTrack) {
117 ATH_MSG_VERBOSE(" failed to refit track " << std::endl
118 << m_printer->print(*finalTrack) << std::endl
119 << m_printer->printStations(*finalTrack));
120 } else
121 finalTrack.swap(refittedTrack);
122
123 // redo holes as they are dropped in the fitter
124 std::unique_ptr<Trk::Track> finalTrackWithHoles(m_muonChamberHoleRecoverTool->recover(*finalTrack, ctx));
125 if (!finalTrackWithHoles) {
126 ATH_MSG_WARNING(" failed to add holes to final track, this should not happen ");
127 } else
128 finalTrack.swap(finalTrackWithHoles);
129
130 std::unique_ptr<Trk::Track> entryRecordTrack(m_trackExtrapolationTool->extrapolate(*finalTrack, ctx));
131 if (entryRecordTrack) {
132 finalTrack.swap(entryRecordTrack);
133 ATH_MSG_VERBOSE(" track at muon entry record " << std::endl << m_printer->print(*finalTrack));
134 }
135 m_candidateHandler->updateTrack(track, finalTrack);
136 }
Gaudi::Property< bool > m_recalibrateMDTHits
virtual std::unique_ptr< Trk::Track > recalibrateHitsOnTrack(const EventContext &ctx, const Trk::Track &track, bool doMdts, bool doCompetingClusters) const override
recalibrate hits on track
virtual std::unique_ptr< Trk::Track > refit(const EventContext &ctx, Trk::Track &track) const override
refit track

◆ refit()

std::unique_ptr< Trk::Track > Muon::MooTrackBuilder::refit ( const EventContext & ctx,
Trk::Track & track ) const
overridevirtual

refit track

Parameters
trackthe track
Returns
a pointer to the resulting track, will return zero if combination failed. Ownership passed to user.

Implements Muon::IMuonSegmentTrackBuilder.

Definition at line 68 of file MooTrackBuilder.cxx.

68 {
69 // use slFitter for straight line fit, or toroid off, otherwise use normal Fitter
70
71 if (m_edmHelperSvc->isSLTrack(track)) return m_slFitter->refit(ctx, track);
72
73 // Also check if toriod is off:
74 MagField::AtlasFieldCache fieldCache;
75 // Get field cache object
76 SG::ReadCondHandle<AtlasFieldCacheCondObj> readHandle{m_fieldCacheCondObjInputKey, ctx};
77 const AtlasFieldCacheCondObj* fieldCondObj{*readHandle};
78
79 if (!fieldCondObj) {
80 ATH_MSG_ERROR("refit: Failed to retrieve AtlasFieldCacheCondObj with key " << m_fieldCacheCondObjInputKey.key());
81 return nullptr;
82 }
83 fieldCondObj->getInitializedCache(fieldCache);
84 if (!fieldCache.toroidOn()) return m_slFitter->refit(ctx, track);
85
86 // if not refit tool specified do a pure refit
87 if (m_errorOptimisationTool.empty()) return m_fitter->refit(ctx, track);
88 std::unique_ptr<Trk::Track> optTrack = m_errorOptimisationTool->optimiseErrors(track, ctx);
89 return optTrack;
90 }

◆ removeDuplicateWithReference()

void Muon::MooTrackBuilder::removeDuplicateWithReference ( std::unique_ptr< Trk::SegmentCollection > & segments,
std::vector< const MuonSegment * > & referenceSegments ) const
private

Definition at line 482 of file MooTrackBuilder.cxx.

483 {
484 if (referenceSegments.empty()) return;
485
486 ATH_MSG_DEBUG(" Removing duplicates from segment vector of size " << segments->size() << " reference size "
487 << referenceSegments.size());
488
489 CompareMuonSegmentKeys compareSegmentKeys{};
490
491 // create a vector with pairs of MuonSegmentKey and a pointer to the corresponding segment to resolve ambiguities
492 std::vector<std::pair<MuonSegmentKey, Trk::SegmentCollection::iterator> > segKeys;
493 segKeys.reserve(segments->size());
494
495 // loop over reference segments and make keys
496 Trk::SegmentCollection::iterator sit = segments->begin();
497 Trk::SegmentCollection::iterator sit_end = segments->end();
498 for (; sit != sit_end; ++sit) {
499 Trk::Segment* tseg = *sit;
500 MuonSegment* mseg = dynamic_cast<MuonSegment*>(tseg);
501 segKeys.emplace_back(MuonSegmentKey(*mseg), sit);
502 }
503
504 // create a vector with pairs of MuonSegmentKey and a pointer to the corresponding segment to resolve ambiguities
505 std::vector<MuonSegmentKey> referenceSegKeys;
506 referenceSegKeys.reserve(referenceSegments.size());
507
508 // loop over reference segments and make keys
509 std::vector<const MuonSegment*>::iterator vit = referenceSegments.begin();
510 std::vector<const MuonSegment*>::iterator vit_end = referenceSegments.end();
511 for (; vit != vit_end; ++vit) { referenceSegKeys.emplace_back(**vit); }
512
513 // loop over segments and compare the current segment with the reference ones
514 std::vector<std::pair<MuonSegmentKey, Trk::SegmentCollection::iterator> >::iterator skit = segKeys.begin();
515 std::vector<std::pair<MuonSegmentKey, Trk::SegmentCollection::iterator> >::iterator skit_end = segKeys.end();
516 for (; skit != skit_end; ++skit) {
517 bool isDuplicate = false;
518
519 std::vector<MuonSegmentKey>::iterator rskit = referenceSegKeys.begin();
520 std::vector<MuonSegmentKey>::iterator rskit_end = referenceSegKeys.end();
521
522 for (; rskit != rskit_end; ++rskit) {
523 CompareMuonSegmentKeys::OverlapResult overlapResult = compareSegmentKeys(*rskit, skit->first);
524 if (overlapResult == CompareMuonSegmentKeys::Identical) {
525 ATH_MSG_DEBUG(" discarding identical segment");
526 isDuplicate = true;
527 break;
528 } else if (overlapResult == CompareMuonSegmentKeys::SuperSet) {
529 // reference segment superset of current: discard
530 ATH_MSG_DEBUG(" discarding (subset) ");
531 isDuplicate = true;
532 break;
533 }
534 }
535 if (isDuplicate) segments->erase(skit->second);
536 }
537 }
DataModel_detail::iterator< DataVector > iterator
Definition DataVector.h:842
OverlapResult
enum for the overlap result

◆ 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();
384 }
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)

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

◆ splitTrack()

std::pair< std::unique_ptr< Trk::Track >, std::unique_ptr< Trk::Track > > Muon::MooTrackBuilder::splitTrack ( const EventContext & ctx,
const Trk::Track & track ) const
private

split given track if it crosses the calorimeter volume, code assumes that the track was already extrapolated to the muon entry record using the MuonTrackExtrapolationTool.

It uses the double perigee to spot the tracks to be split.

Definition at line 897 of file MooTrackBuilder.cxx.

897 {
898 // use slFitter for straight line fit, or toroid off, otherwise use normal Fitter
899
900 if (m_edmHelperSvc->isSLTrack(track)) return m_slFitter->splitTrack(ctx, track);
901
902 MagField::AtlasFieldCache fieldCache;
903 // Get field cache object
904 SG::ReadCondHandle<AtlasFieldCacheCondObj> readHandle{m_fieldCacheCondObjInputKey, ctx};
905 const AtlasFieldCacheCondObj* fieldCondObj{*readHandle};
906
907 if (!fieldCondObj) {
908 ATH_MSG_ERROR("splitTrack: Failed to retrieve AtlasFieldCacheCondObj with key " << m_fieldCacheCondObjInputKey.key());
909 return {};
910 }
911 fieldCondObj->getInitializedCache(fieldCache);
912
913 if (!fieldCache.toroidOn()) return m_slFitter->splitTrack(ctx, track);
914
915 return m_fitter->splitTrack(ctx, track);
916 }

◆ 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 asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ 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) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_candidateHandler

ToolHandle<MuPatCandidateTool> Muon::MooTrackBuilder::m_candidateHandler
private
Initial value:
{this, "CandidateTool",
"Muon::MuPatCandidateTool/MuPatCandidateTool"}

candidate handler

Definition at line 257 of file MooTrackBuilder.h.

257 {this, "CandidateTool",
258 "Muon::MuPatCandidateTool/MuPatCandidateTool"};

◆ m_candidateMatchingTool

ToolHandle<MooCandidateMatchingTool> Muon::MooTrackBuilder::m_candidateMatchingTool
private
Initial value:
{this, "CandidateMatchingTool",
"Muon::MooCandidateMatchingTool/MooCandidateMatchingTool"}

Definition at line 259 of file MooTrackBuilder.h.

259 {this, "CandidateMatchingTool",
260 "Muon::MooCandidateMatchingTool/MooCandidateMatchingTool"};

◆ m_compRotCreator

ToolHandle<IMuonCompetingClustersOnTrackCreator> Muon::MooTrackBuilder::m_compRotCreator
private
Initial value:
{
this, "CompetingClustersCreator", "Muon::TriggerChamberClusterOnTrackCreator/TriggerChamberClusterOnTrackCreator"}

Definition at line 272 of file MooTrackBuilder.h.

272 {
273 this, "CompetingClustersCreator", "Muon::TriggerChamberClusterOnTrackCreator/TriggerChamberClusterOnTrackCreator"};

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

Gaudi::Property<bool> Muon::MooTrackBuilder::m_doTimeOutChecks {this, "UseTimeOutGuard", true}
private

on/off time out check

Definition at line 290 of file MooTrackBuilder.h.

290{this, "UseTimeOutGuard", true};

◆ m_edmHelperSvc

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

Definition at line 263 of file MooTrackBuilder.h.

263 {this, "edmHelper", "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
264 "Handle to the service providing the IMuonEDMHelperSvc interface"};

◆ m_errorOptimisationTool

ToolHandle<IMuonErrorOptimisationTool> Muon::MooTrackBuilder::m_errorOptimisationTool {this, "ErrorOptimisationTool", ""}
private

Definition at line 283 of file MooTrackBuilder.h.

283{this, "ErrorOptimisationTool", ""};

◆ 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> Muon::MooTrackBuilder::m_fieldCacheCondObjInputKey
private
Initial value:
{this, "AtlasFieldCacheCondObj", "fieldCondObj",
"Name of the Magnetic Field conditions object key"}

Definition at line 286 of file MooTrackBuilder.h.

286 {this, "AtlasFieldCacheCondObj", "fieldCondObj",
287 "Name of the Magnetic Field conditions object key"};

◆ m_fitter

ToolHandle<MooTrackFitter> Muon::MooTrackBuilder::m_fitter {this, "Fitter", "Muon::MooTrackFitter/MooTrackFitter", "Tool to fit segments to tracks"}
private

Definition at line 255 of file MooTrackBuilder.h.

255{this, "Fitter", "Muon::MooTrackFitter/MooTrackFitter", "Tool to fit segments to tracks"};

◆ m_idHelperSvc

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

Definition at line 267 of file MooTrackBuilder.h.

267{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};

◆ m_magFieldProperties

Trk::MagneticFieldProperties Muon::MooTrackBuilder::m_magFieldProperties {Trk::FullField}
private

magnetic field properties

Definition at line 288 of file MooTrackBuilder.h.

@ FullField
Field is set to be realistic, but within a given Volume.

◆ m_mdtRotCreator

ToolHandle<IMdtDriftCircleOnTrackCreator> Muon::MooTrackBuilder::m_mdtRotCreator
private
Initial value:
{this, "MdtRotCreator",
"Muon::MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator"}

Definition at line 270 of file MooTrackBuilder.h.

270 {this, "MdtRotCreator",
271 "Muon::MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator"};

◆ m_muonChamberHoleRecoverTool

ToolHandle<IMuonHoleRecoveryTool> Muon::MooTrackBuilder::m_muonChamberHoleRecoverTool
private
Initial value:
{
this, "ChamberHoleRecoveryTool",
"Muon::MuonChamberHoleRecoveryTool/MuonChamberHoleRecoveryTool"}

Definition at line 277 of file MooTrackBuilder.h.

277 {
278 this, "ChamberHoleRecoveryTool",
279 "Muon::MuonChamberHoleRecoveryTool/MuonChamberHoleRecoveryTool"}; //<! tool to add holes on track

◆ m_ncalls

std::atomic_uint Muon::MooTrackBuilder::m_ncalls {0}
mutableprivate

Definition at line 296 of file MooTrackBuilder.h.

296{0};

◆ m_nTimedOut

std::atomic_uint Muon::MooTrackBuilder::m_nTimedOut {0}
mutableprivate

Definition at line 297 of file MooTrackBuilder.h.

297{0};

◆ m_printer

PublicToolHandle<MuonEDMPrinterTool> Muon::MooTrackBuilder::m_printer
private
Initial value:
{this, "Printer",
"Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"}

tool to print out EDM objects;

Definition at line 265 of file MooTrackBuilder.h.

265 {this, "Printer",
266 "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"};

◆ m_propagator

ToolHandle<Trk::IPropagator> Muon::MooTrackBuilder::m_propagator {this, "Propagator", "Trk::STEP_Propagator/MuonPropagator"}
private

Definition at line 274 of file MooTrackBuilder.h.

274{this, "Propagator", "Trk::STEP_Propagator/MuonPropagator"};

◆ m_pullCalculator

ToolHandle<Trk::IResidualPullCalculator> Muon::MooTrackBuilder::m_pullCalculator
private
Initial value:
{this, "PullCalculator",
"Trk::ResidualPullCalculator/ResidualPullCalculator"}

Definition at line 275 of file MooTrackBuilder.h.

275 {this, "PullCalculator",
276 "Trk::ResidualPullCalculator/ResidualPullCalculator"};

◆ m_recalibrateMDTHits

Gaudi::Property<bool> Muon::MooTrackBuilder::m_recalibrateMDTHits {this, "RecalibrateMDTHitsOnTrack", true}
private

Definition at line 295 of file MooTrackBuilder.h.

295{this, "RecalibrateMDTHitsOnTrack", true};

◆ m_seededSegmentFinder

ToolHandle<IMuonSeededSegmentFinder> Muon::MooTrackBuilder::m_seededSegmentFinder
private
Initial value:
{this, "SeededSegmentFinder",
"Muon::MuonSeededSegmentFinder/MuonSeededSegmentFinder"}

Definition at line 268 of file MooTrackBuilder.h.

268 {this, "SeededSegmentFinder",
269 "Muon::MuonSeededSegmentFinder/MuonSeededSegmentFinder"};

◆ m_slFitter

ToolHandle<MooTrackFitter> Muon::MooTrackBuilder::m_slFitter {this, "SLFitter", "Muon::MooTrackFitter/MooSLTrackFitter", "Tool to fit segments to tracks"}
private

Definition at line 256 of file MooTrackBuilder.h.

256{this, "SLFitter", "Muon::MooTrackFitter/MooSLTrackFitter", "Tool to fit segments to tracks"};

◆ m_trackExtrapolationTool

ToolHandle<IMuonTrackExtrapolationTool> Muon::MooTrackBuilder::m_trackExtrapolationTool
private
Initial value:
{
this, "Extrapolator", "Muon::MuonTrackExtrapolationTool/MuonTrackExtrapolationTool"}

Definition at line 280 of file MooTrackBuilder.h.

280 {
281 this, "Extrapolator", "Muon::MuonTrackExtrapolationTool/MuonTrackExtrapolationTool"}; //<! track extrapolation tool

◆ m_trackSummaryTool

ToolHandle<Trk::IExtendedTrackSummaryTool> Muon::MooTrackBuilder::m_trackSummaryTool {this, "TrackSummaryTool", "MuonTrackSummaryTool"}
private

Definition at line 284 of file MooTrackBuilder.h.

284{this, "TrackSummaryTool", "MuonTrackSummaryTool"};

◆ m_trackToSegmentTool

ToolHandle<IMuonTrackToSegmentTool> Muon::MooTrackBuilder::m_trackToSegmentTool
private
Initial value:
{this, "TrackToSegmentTool",
"Muon::MuonTrackToSegmentTool/MuonTrackToSegmentTool"}

Definition at line 261 of file MooTrackBuilder.h.

261 {this, "TrackToSegmentTool",
262 "Muon::MuonTrackToSegmentTool/MuonTrackToSegmentTool"};

◆ m_useExclusionList

Gaudi::Property<bool> Muon::MooTrackBuilder::m_useExclusionList
private
Initial value:
{this, "UseExclusionList",
true}

use exclusion list (bit faster at the price of missing chambers)

Definition at line 291 of file MooTrackBuilder.h.

291 {this, "UseExclusionList",
292 true};

◆ m_useTrackingHistory

Gaudi::Property<bool> Muon::MooTrackBuilder::m_useTrackingHistory
private
Initial value:
{this, "UseTrackingHistory",
true}

use history of the track finding up to now to avoid creating duplicates

Definition at line 293 of file MooTrackBuilder.h.

293 {this, "UseTrackingHistory",
294 true};

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