ATLAS Offline Software
Classes | Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
Muon::MuonTrackSteering Class Reference

Implementation of an IMuonTrackFinder. More...

#include <MuonTrackSteering.h>

Inheritance diagram for Muon::MuonTrackSteering:
Collaboration diagram for Muon::MuonTrackSteering:

Classes

struct  GarbageContainer
 

Public Types

typedef std::vector< MuPatTrack * > TrkVec
 
typedef std::vector< Trk::Track * > TrkCollVec
 
typedef std::vector< MuPatSegment * > SegCol
 
typedef std::vector< MuPatSegment * >::iterator SegColIt
 
using StSegCol_t = std::array< SegCol, MuonStationIndex::toInt(MuonStationIndex::StIndex::StIndexMax)>
 Helper container to sort the segments by station index. More...
 
using ChSegCol_t = std::array< SegCol, MuonStationIndex::toInt(MuonStationIndex::ChIndex::ChIndexMax)>
 Helper container to sort the segments by chamber index. More...
 
using SegColVec_t = std::vector< SegCol >
 
More...
 
typedef std::set< MuonStationIndex::ChIndexChSet
 
typedef ChSet::iterator ChIt
 
typedef ChSet::const_iterator ChCit
 
typedef std::set< MuonStationIndex::StIndexStSet
 
typedef StSet::iterator StIt
 
typedef StSet::const_iterator StCit
 

Public Member Functions

 MuonTrackSteering (const std::string &, const std::string &, const IInterface *)
 default AlgTool constructor More...
 
virtual ~MuonTrackSteering ()=default
 destructor More...
 
virtual StatusCode initialize () override
 initialize method, method taken from bass-class AlgTool More...
 
std::unique_ptr< TrackCollectionfind (const EventContext &ctx, const MuonSegmentCollection &coll) const override
 find tracks starting from a MuonSegmentCollection More...
 

Private Member Functions

std::unique_ptr< TrackCollectionselectTracks (std::vector< std::unique_ptr< MuPatTrack >> &candidates, bool takeOwnership=true) const
 
std::unique_ptr< TrackCollectionfindTracks (const EventContext &ctx, ChSegCol_t &chamberSegments, StSegCol_t &stationSegments) const
 actual find method More...
 
bool extractSegments (const EventContext &ctx, const MuonSegmentCollection &coll, ChSegCol_t &chamberSegments, StSegCol_t &stationSegments, ChSet &chambersWithSegments, StSet &stationsWithSegments, GarbageContainer &trash_bin) const
 
StatusCode decodeStrategyVector (const std::vector< std::string > &strategy)
 
std::unique_ptr< const MuonTrackSteeringStrategydecodeStrategy (const std::string &strategy) const
 
std::vector< std::unique_ptr< MuPatTrack > > extendWithLayer (const EventContext &ctx, MuPatTrack &candidate, const SegColVec_t &segcol, unsigned int nextlayer, const unsigned int endlayer, int cutLevel=0) const
 
std::vector< std::unique_ptr< MuPatTrack > > findTrackFromSeed (const EventContext &ctx, MuPatSegment &seedSeg, const MuonTrackSteeringStrategy &strat, const unsigned int layer, const SegColVec_t &segs) const
 Find tracks starting from a good segment. More...
 
void refineTracks (const EventContext &ctx, std::vector< std::unique_ptr< MuPatTrack >> &candidates) const
 
void solveAmbiguities (std::vector< std::unique_ptr< MuPatTrack >> &tracks, const MuonTrackSteeringStrategy *strat=nullptr) const
 Resolve ambiguities among tracks for a single strategy This allows a strategy-specific ambiguity solving (with some options per strategy) More...
 
void combineOverlapSegments (const EventContext &ctx, std::vector< MuPatSegment * > &ch1, std::vector< MuPatSegment * > &ch2, StSegCol_t &stationSegments, StSet &stationsWithSegments, GarbageContainer &trash_bin) const
 

Static Private Member Functions

static bool decodeList (const std::string &input, std::vector< std::string > &list)
 

Private Attributes

ServiceHandle< IMuonEDMHelperSvcm_edmHelperSvc
 
PublicToolHandle< MuonEDMPrinterToolm_printer {this, "MuonPrinterTool", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"}
 
ToolHandle< MuPatCandidateToolm_candidateTool {this, "MuPatCandidateTool", "Muon::MuPatCandidateTool/MuPatCandidateTool"}
 
ToolHandle< IMuonTrackBuilderm_trackBTool {this, "TrackBuilderTool", "Muon::MooTrackBuilder/MooMuonTrackBuilder"}
 
ToolHandle< Trk::ITrackAmbiguityProcessorToolm_ambiTool
 
ToolHandle< MooTrackBuilderm_mooBTool {this, "MooBuilderTool", "Muon::MooTrackBuilder/MooMuonTrackBuilder"}
 
ToolHandle< MooCandidateMatchingToolm_candidateMatchingTool
 
ToolHandle< IMuonTrackRefinerm_trackRefineTool {this, "TrackRefinementTool", "Muon::MooTrackBuilder/MooMuonTrackBuilder"}
 
ToolHandle< IMuonSegmentFittingToolm_segmentFitter
 
ToolHandle< Muon::MuonTrackSelectorToolm_trackSelector
 
ToolHandle< IMuonHoleRecoveryToolm_muonHoleRecoverTool
 
ToolHandle< Trk::IExtendedTrackSummaryToolm_trackSummaryTool {this, "TrackSummaryTool", "MuonTrackSummaryTool"}
 
std::vector< std::unique_ptr< const MuonTrackSteeringStrategy > > m_strategies
 
std::vector< std::string > m_stringStrategies
 
std::array< int, 3 > m_segQCut {}
 Required segment quality for seed, 2nd, and other segments. More...
 
bool m_outputSingleStationTracks
 
bool m_combinedSLOverlaps
 
bool m_doSummary
 
bool m_useTightMatching
 
bool m_onlyMDTSeeding
 
int m_segThreshold
 

Detailed Description

Implementation of an IMuonTrackFinder.

For more details look at the mainpage of this package.

Definition at line 51 of file MuonTrackSteering.h.

Member Typedef Documentation

◆ ChCit

typedef ChSet::const_iterator Muon::MuonTrackSteering::ChCit

Definition at line 65 of file MuonTrackSteering.h.

◆ ChIt

typedef ChSet::iterator Muon::MuonTrackSteering::ChIt

Definition at line 64 of file MuonTrackSteering.h.

◆ ChSegCol_t

Helper container to sort the segments by chamber index.

Definition at line 60 of file MuonTrackSteering.h.

◆ ChSet

Definition at line 63 of file MuonTrackSteering.h.

◆ SegCol

Definition at line 55 of file MuonTrackSteering.h.

◆ SegColIt

typedef std::vector<MuPatSegment*>::iterator Muon::MuonTrackSteering::SegColIt

Definition at line 56 of file MuonTrackSteering.h.

◆ SegColVec_t


Definition at line 62 of file MuonTrackSteering.h.

◆ StCit

typedef StSet::const_iterator Muon::MuonTrackSteering::StCit

Definition at line 69 of file MuonTrackSteering.h.

◆ StIt

typedef StSet::iterator Muon::MuonTrackSteering::StIt

Definition at line 68 of file MuonTrackSteering.h.

◆ StSegCol_t

Helper container to sort the segments by station index.

Definition at line 58 of file MuonTrackSteering.h.

◆ StSet

Definition at line 67 of file MuonTrackSteering.h.

◆ TrkCollVec

Definition at line 54 of file MuonTrackSteering.h.

◆ TrkVec

Definition at line 53 of file MuonTrackSteering.h.

Constructor & Destructor Documentation

◆ MuonTrackSteering()

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

default AlgTool constructor

Definition at line 50 of file MuonTrackSteering.cxx.

50  :
51  base_class(t,n,p), m_combinedSLOverlaps(false) {
52 
53  declareProperty("StrategyList", m_stringStrategies, "List of strategies to be used by the track steering");
54  declareProperty("SegSeedQCut", m_segQCut[0] = -2, "Required quality for segments to be a seed");
55  declareProperty("Seg2ndQCut", m_segQCut[1] = -2, "Required quality for segments to be the second on a track");
56  declareProperty("SegOtherQCut", m_segQCut[2] = -2, "Required quality for segments to be added to a track");
57  declareProperty("OutputSingleStationTracks", m_outputSingleStationTracks = false);
58  declareProperty("DoSummary", m_doSummary = false);
59  declareProperty("UseTightSegmentMatching", m_useTightMatching = true);
60  declareProperty("SegmentThreshold", m_segThreshold = 8);
61  declareProperty("OnlyMdtSeeding", m_onlyMDTSeeding = true);
62  }

◆ ~MuonTrackSteering()

virtual Muon::MuonTrackSteering::~MuonTrackSteering ( )
virtualdefault

destructor

Member Function Documentation

◆ combineOverlapSegments()

void Muon::MuonTrackSteering::combineOverlapSegments ( const EventContext &  ctx,
std::vector< MuPatSegment * > &  ch1,
std::vector< MuPatSegment * > &  ch2,
StSegCol_t stationSegments,
StSet stationsWithSegments,
GarbageContainer trash_bin 
) const
private

try to find small/large overlaps, insert segment into stationVec

Start with -1 as the first operation in the loop over the second set of chambers is the counter incrementation

Actually this should be always 1. What should it conceptionally reject? The angle between the combined segment and the segment from the first collection?

Definition at line 161 of file MuonTrackSteering.cxx.

163  {
166  // if both empty there is nothing to be done
167  if (ch1.empty() && ch2.empty()) return;
168 
169  // get station index from the first segment in the first non empty vector
170  StIndex stIndex = !ch1.empty() ? ch1.front()->stIndex : ch2.front()->stIndex;
171 
172  SegCol& stationVec = stationSegments[toInt(stIndex)];
173 
174  // vector to flag entries in the second station that were matched
175  std::vector<bool> wasMatched2(ch2.size(), false);
176 
177  // loop over all possible combinations
178  for (MuPatSegment* sit1 : ch1) {
179  // do not combine poor quality segments
180  int qualityLevel1 = ch1.size() > 5 ? 1 : 2;
181  if (sit1->quality < qualityLevel1) {
182  ATH_MSG_VERBOSE("resolveSLOverlaps::bad segment1 q: " << sit1->quality << " cut " << qualityLevel1 << std::endl
183  << m_printer->print(*sit1->segment));
184  stationVec.push_back(sit1);
185  continue;
186  }
187 
188  bool wasMatched1 = false;
189 
190  // apply looser cuts as we perform matching
191  int qualityLevel2 = ch2.size() > 5 ? 1 : 2;
194  int idx_ch2 = -1;
195  for (MuPatSegment* sit2 : ch2) {
196  ++idx_ch2;
197  // do not combine poor quality segments AND require at least one of the segments to have a quality beter than 1
198  if (sit2->quality < qualityLevel2) {
199  ATH_MSG_VERBOSE("resolveSLOverlaps::bad segment2: q " << sit2->quality << " cut " << qualityLevel2 << std::endl
200  << m_printer->print(*sit2->segment));
201  continue;
202  }
203  if (sit1->quality < 2 && sit2->quality < 2) {
204  ATH_MSG_VERBOSE("resolveSLOverlaps:: combination of insufficient quality " << std::endl
205  << " q1 " << sit1->quality << " q2 "
206  << sit1->quality);
207  continue;
208  }
209 
210  ATH_MSG_VERBOSE(" combining entries: " << std::endl
211  << m_printer->print(*sit1->segment) << std::endl
212  << m_printer->print(*sit2->segment));
213 
214  if (!m_candidateMatchingTool->match(ctx, *sit1, *sit2, false)) {
215  ATH_MSG_VERBOSE(" overlap combination rejected based on matching" << std::endl << m_printer->print(*sit2->segment));
216  continue;
217  }
218 
219  // create MuonSegment
220  static const Muon::IMuonSegmentTrackBuilder::PrepVec emptyPhiHits{};
221  std::unique_ptr<MuonSegment> newseg{m_mooBTool->combineToSegment(ctx, *sit1, *sit2, emptyPhiHits)};
222  if (!newseg) {
223  ATH_MSG_DEBUG(" Combination of segments failed ");
224  continue;
225  }
226  const Trk::FitQuality* fq = newseg->fitQuality();
227  if (!fq || fq->numberDoF() == 0) {
228  ATH_MSG_WARNING(" no fit quality, dropping segment ");
229  continue;
230  }
231  if (fq->chiSquared() / fq->numberDoF() > 2.5) {
232  ATH_MSG_DEBUG("bad fit quality, dropping segment " << fq->chiSquared() / fq->numberDoF());
233  continue;
234  }
235  std::unique_ptr<MuPatSegment> segInfo = m_candidateTool->createSegInfo(ctx, *newseg);
236  // check whether segment of good quality AND that its quality is equal or better than the input segments
237  if (!segInfo || segInfo->quality < 2 || (segInfo->quality < sit1->quality || segInfo->quality < sit2->quality)) {
238  if(segInfo) ATH_MSG_VERBOSE("resolveSLOverlaps::bad segment " << std::endl << m_printer->print(*segInfo->segment));
239  else ATH_MSG_VERBOSE("Invalid segment info");
240  continue;
241  }
242  int shared_eta = 0, shared_phi = 0; // check for hits shared between segments
243 
244  const MuPatSegment* const_sit1 = sit1;
245  const MuPatSegment* const_sit2 = sit2;
246  for (const MuPatHitPtr& hit_ch1 : const_sit1->hitList()) {
247  for (const MuPatHitPtr& hit_ch2 : const_sit2->hitList()) {
248  if (hit_ch1->info().id == hit_ch2->info().id) {
249  if (hit_ch1->info().measuresPhi)
250  shared_phi++;
251  else
252  shared_eta++;
253  }
254  }
255  }
256 
257  if (sit1->etaHits().size() + sit2->etaHits().size() - shared_eta - segInfo->etaHits().size() > 1) {
258  ATH_MSG_VERBOSE("resolveSLOverlaps::more than one eta measurement removed, dropping track "
259  << std::endl
260  << m_printer->print(*segInfo->segment));
261  continue;
262  }
263 
264  int phiHitDiff = sit1->phiHits().size() + sit2->phiHits().size() - shared_phi - segInfo->phiHits().size();
265  if (phiHitDiff > 1 || (sit1->phiHits().size() + sit2->phiHits().size() > 0 && segInfo->phiHits().empty())) {
266  ATH_MSG_VERBOSE("resolveSLOverlaps::more than one phi measurement removed, dropping track "
267  << std::endl
268  << m_printer->print(*segInfo->segment));
269  continue;
270  }
273  double cosPointingAngle = (newseg->globalPosition().x() * newseg->globalDirection().x() +
274  newseg->globalPosition().y() * newseg->globalDirection().y()) /
275  (newseg->globalPosition().perp() * newseg->globalDirection().perp());
276  if (cosPointingAngle < 0.995) {
277  ATH_MSG_VERBOSE("resolveSLOverlaps: rejected due to too large pointing angle " << std::endl
278  << m_printer->print(*segInfo->segment));
279  continue;
280  }
281  ATH_MSG_VERBOSE("created SL overlap segment: cos pointing " << cosPointingAngle << std::endl
282  << m_printer->print(*segInfo->segment));
283 
284  // flag segments as matched
285  wasMatched1 = true;
286  wasMatched2[idx_ch2] = true;
287 
288  // add segment
289  stationVec.push_back(segInfo.get());
290  trash_bin.push_back(std::move(newseg));
291  trash_bin.push_back(std::move(segInfo));
292 
293  }
294 
295  // if entry was not associated with entry in other station add it to entries
296  if (!wasMatched1) { stationVec.push_back(sit1); }
297  }
298 
299  // loop over entries in second station and add unassociated entries to candidate entries
300  for (unsigned int i = 0; i < wasMatched2.size(); ++i) {
301  if (!wasMatched2[i]) { stationVec.push_back(ch2[i]); }
302  }
303 
304  // add station to list of stations with segments
305  if (!stationVec.empty()) { stationsWithSegments.insert(stIndex); }
306 
307  // sort segment according to their quality
308  std::stable_sort(stationVec.begin(), stationVec.end(), SortSegInfoByQuality());
309  }

◆ decodeList()

bool Muon::MuonTrackSteering::decodeList ( const std::string &  input,
std::vector< std::string > &  list 
)
staticprivate

Definition at line 806 of file MuonTrackSteering.cxx.

806  {
807  bool result = true;
808  std::string::size_type begIdx = 0;
809  std::string::size_type endIdx = 0;
810  do {
811  endIdx = input.find(',', begIdx);
812  std::string::size_type lstIdx = endIdx;
813  if (std::string::npos == endIdx) { lstIdx = input.length(); }
814  std::string item = input.substr(begIdx, lstIdx - begIdx);
815  list.push_back(item);
816  begIdx = lstIdx + 1;
817  } while (std::string::npos != endIdx);
818  return result;
819  }

◆ decodeStrategy()

std::unique_ptr< const MuonTrackSteeringStrategy > Muon::MuonTrackSteering::decodeStrategy ( const std::string &  strategy) const
private

Definition at line 720 of file MuonTrackSteering.cxx.

720  {
721  const std::string delims(" \t[],;");
722 
723  // The strategy name
724  std::string name;
725 
726  // The strategy options (which should be a vector of enums, but I'll use strings now to check that I'm
727  // decoding the stragegy correctly)
728  std::vector<std::string> options;
729 
730  // The strategy sequence (which should be a vector of vector of station enumbs, but again I'll use
731  // strings instead of enums to test that I've got the decoding correct)
732  typedef std::vector<std::string> ChamberGroup;
733  std::vector<ChamberGroup> sequence;
734  std::string seqStr;
735 
736  bool success = false;
737  std::unique_ptr<const MuonTrackSteeringStrategy> result;
738 
739  std::string::size_type length = strategy.length();
740 
741  // Extract the strategy name and options
742  std::string::size_type begIdx, endIdx;
743  begIdx = strategy.find_first_not_of(delims);
744  if (std::string::npos != begIdx) {
745  endIdx = strategy.find(':', begIdx);
746  if (std::string::npos != endIdx) {
747  seqStr = strategy.substr(endIdx + 1, length - endIdx - 1);
748  std::string nameopt = strategy.substr(begIdx, endIdx - begIdx);
749  std::string::size_type bi = nameopt.find('[');
750  if (std::string::npos != bi) {
751  name = nameopt.substr(0, bi);
752 
753  // Decode options
754  std::string::size_type ei = nameopt.find(']', bi);
755  if (std::string::npos == ei) { ei = nameopt.length(); }
756  std::string inputOpt = nameopt.substr(bi + 1, ei - bi - 1);
757  success = decodeList(inputOpt, options);
758  } else {
759  name = nameopt;
760  }
761  }
762  }
763  if (msgLvl(MSG::DEBUG)) {
764  ATH_MSG_DEBUG("From strat: " << strategy << " with success " << success << " end " << endIdx << " beg " << begIdx
765  << " Name: " << name << " options: ");
766  for (std::vector<std::string>::iterator oit = options.begin(); oit != options.end(); ++oit)
767  msg(MSG::DEBUG) << " " << *oit << endmsg;
768  }
769  // Name and options successfully decoded, now decode the sequence and groups
770  if (success) {
771  begIdx = endIdx + 1;
772  do {
773  endIdx = strategy.find(';', begIdx);
774  std::string::size_type lstIdx = endIdx;
775  if (std::string::npos == endIdx) { lstIdx = strategy.length(); }
776  std::string grpString = strategy.substr(begIdx, lstIdx - begIdx);
777  ChamberGroup group;
778  success = success && decodeList(grpString, group);
779  sequence.push_back(group);
780  begIdx = lstIdx + 1;
781  } while (std::string::npos != endIdx && success);
782  }
783 
784  if (success) {
785  std::vector<std::vector<ChIndex> > path;
786  for (unsigned int i = 0; i < sequence.size(); ++i) {
787  std::vector<ChIndex> idxGrp;
788  for (unsigned int j = 0; j < sequence[i].size(); ++j) {
789  ChIndex idx = chIndex(sequence[i][j]);
790  if (ChIndex::ChUnknown == idx) {
791  ATH_MSG_WARNING("I am complaining: Bad station index.");
792  } else {
793  idxGrp.push_back(idx);
794  }
795  }
796  path.push_back(idxGrp);
797  }
798  result = std::make_unique<MuonTrackSteeringStrategy>(name, options, path);
799  }
800 
801  return result;
802  }

◆ decodeStrategyVector()

StatusCode Muon::MuonTrackSteering::decodeStrategyVector ( const std::vector< std::string > &  strategy)
private

Definition at line 703 of file MuonTrackSteering.cxx.

703  {
704  for (unsigned int i = 0; i < strategy.size(); ++i) {
705  std::unique_ptr<const MuonTrackSteeringStrategy> holder = decodeStrategy(strategy[i]);
706  if (!holder) {
707  // complain
708  ATH_MSG_DEBUG("failed to decode strategy");
709  } else {
710  // flag whether segments should be combined
712  m_strategies.emplace_back(std::move(holder));
713  }
714  }
715  return StatusCode::SUCCESS;
716  }

◆ extendWithLayer()

std::vector< std::unique_ptr< MuPatTrack > > Muon::MuonTrackSteering::extendWithLayer ( const EventContext &  ctx,
MuPatTrack candidate,
const SegColVec_t segcol,
unsigned int  nextlayer,
const unsigned int  endlayer,
int  cutLevel = 0 
) const
private

Definition at line 618 of file MuonTrackSteering.cxx.

620  {
621  std::vector<std::unique_ptr<MuPatTrack> > result;
622  if (nextlayer < endlayer) {
623  for (; nextlayer != endlayer; nextlayer++) {
624  if (segs[nextlayer].empty()) continue;
625 
626  std::vector<std::unique_ptr<MuPatTrack> > nextTracks = m_trackBTool->find(ctx, candidate, segs[nextlayer]);
627  if (!nextTracks.empty()) {
628  for (std::unique_ptr<MuPatTrack>& cit : nextTracks) {
629  std::vector<std::unique_ptr<MuPatTrack> > nextTracks2 =
630  extendWithLayer(ctx, *cit, segs, nextlayer + 1, endlayer, cutLevel);
631  if (!nextTracks2.empty()) {
632  result.insert(result.end(), std::make_move_iterator(nextTracks2.begin()),
633  std::make_move_iterator(nextTracks2.end()));
634  } else {
635  result.push_back(std::move(cit));
636  }
637  }
638  }
639  }
640  }
641 
642  return result;
643  }

◆ extractSegments()

bool Muon::MuonTrackSteering::extractSegments ( const EventContext &  ctx,
const MuonSegmentCollection coll,
ChSegCol_t chamberSegments,
StSegCol_t stationSegments,
ChSet chambersWithSegments,
StSet stationsWithSegments,
GarbageContainer trash_bin 
) const
private

Definition at line 102 of file MuonTrackSteering.cxx.

103  {
104  if (coll.empty()) return false;
105 
106  ATH_MSG_DEBUG("New collection " << coll.size());
107 
108  // Sort the input collection by chamber & station IDs
109  for (const MuonSegment* segment : coll) {
110  ATH_MSG_DEBUG("Adding segment ");
111  std::unique_ptr<MuPatSegment> aSeg = m_candidateTool->createSegInfo(ctx, *segment);
112  if (!aSeg) continue;
113  ATH_MSG_DEBUG(" -> MuPatSegment " << m_candidateTool->print(*aSeg));
114 
115  ChIndex chIndex = aSeg->chIndex;
116  StIndex stIndex = aSeg->stIndex;
117  if (chIndex == ChIndex::ChUnknown || stIndex == StIndex::StUnknown) {
118  ATH_MSG_WARNING("Chamber or station index invalid:" << m_candidateTool->print(*aSeg));
119  continue;
120  }
121  chambersWithSegments.insert(chIndex);
122  stationsWithSegments.insert(stIndex);
123 
124  std::vector<MuPatSegment*>& segments = chamberSegments[toInt(chIndex)];
125  segments.push_back(aSeg.get());
126  if (!m_combinedSLOverlaps) {
127  std::vector<MuPatSegment*>& segments2 = stationSegments[toInt(stIndex)];
128  segments2.push_back(aSeg.get());
129  }
130  trash_bin.push_back(std::move(aSeg));
131  }
132 
133  if (m_combinedSLOverlaps) {
134  combineOverlapSegments(ctx, chamberSegments[toInt(ChIndex::BIS)], chamberSegments[toInt(ChIndex::BIL)], stationSegments,
135  stationsWithSegments, trash_bin);
136  combineOverlapSegments(ctx, chamberSegments[toInt(ChIndex::BMS)], chamberSegments[toInt(ChIndex::BML)], stationSegments,
137  stationsWithSegments, trash_bin);
138  combineOverlapSegments(ctx, chamberSegments[toInt(ChIndex::BOS)], chamberSegments[toInt(ChIndex::BOL)], stationSegments,
139  stationsWithSegments, trash_bin);
140  combineOverlapSegments(ctx, chamberSegments[toInt(ChIndex::EIS)], chamberSegments[toInt(ChIndex::EIL)], stationSegments,
141  stationsWithSegments, trash_bin);
142  combineOverlapSegments(ctx, chamberSegments[toInt(ChIndex::EMS)], chamberSegments[toInt(ChIndex::EML)], stationSegments,
143  stationsWithSegments, trash_bin);
144  combineOverlapSegments(ctx, chamberSegments[toInt(ChIndex::EOS)], chamberSegments[toInt(ChIndex::EOL)], stationSegments,
145  stationsWithSegments, trash_bin);
146  combineOverlapSegments(ctx, chamberSegments[toInt(ChIndex::EES)], chamberSegments[toInt(ChIndex::EEL)], stationSegments,
147  stationsWithSegments, trash_bin);
148  combineOverlapSegments(ctx, chamberSegments[toInt(ChIndex::CSS)], chamberSegments[toInt(ChIndex::CSL)], stationSegments,
149  stationsWithSegments, trash_bin);
150  std::vector<MuPatSegment*>& segments = chamberSegments[toInt(ChIndex::BEE)];
151  if (!segments.empty()) {
152  chambersWithSegments.insert(ChIndex::BEE);
153  stationsWithSegments.insert(StIndex::BE);
154  std::vector<MuPatSegment*>& segs = stationSegments[toInt(StIndex::BE)];
155  segs.insert(segs.end(), segments.begin(), segments.end());
156  }
157  }
158  return true;
159  }

◆ find()

std::unique_ptr< TrackCollection > Muon::MuonTrackSteering::find ( const EventContext &  ctx,
const MuonSegmentCollection coll 
) const
override

find tracks starting from a MuonSegmentCollection

Parameters
colla reference to a MuonSegmentCollection
Returns
a pointer to a vector of tracks, the ownership of the tracks is passed to the client calling the tool.

Definition at line 84 of file MuonTrackSteering.cxx.

84  {
85  GarbageContainer trash_bin{};
86  trash_bin.reserve(150);
87 
88  std::unique_ptr<TrackCollection> result = std::make_unique<TrackCollection>();
89 
90  ChSegCol_t chamberSegments{}; // <! Segments sorted per Chamber
91  StSegCol_t stationSegments{}; // <! Segments sorted per station
92  ChSet chambersWithSegments;
93  StSet stationsWithSegments;
94  // Extract segments into work arrays
95  if (extractSegments(ctx, coll, chamberSegments, stationSegments, chambersWithSegments, stationsWithSegments, trash_bin)) {
96  // Perform the actual track finding
97  result = findTracks(ctx, chamberSegments, stationSegments);
98  }
99  return result;
100  }

◆ findTrackFromSeed()

std::vector< std::unique_ptr< MuPatTrack > > Muon::MuonTrackSteering::findTrackFromSeed ( const EventContext &  ctx,
MuPatSegment seedSeg,
const MuonTrackSteeringStrategy strat,
const unsigned int  layer,
const SegColVec_t segs 
) const
private

Find tracks starting from a good segment.

Parameters
seedSegthe seeding MuonSegment pointer
stratthe current track finding strategy
layerthe current layer for the seed

Loop over layers following the seed layer

Definition at line 540 of file MuonTrackSteering.cxx.

542  {
543  // the resulting vector of tracks to be returned
544  std::vector<std::unique_ptr<MuPatTrack> > result;
545  ATH_MSG_DEBUG("Working on seed: " << std::endl << " --- " << m_candidateTool->print(seedSeg));
546  const unsigned int endLayer = strat.getAll().size();
548  for (unsigned int ilayer = 0; ilayer < strat.getAll().size(); ++ilayer) {
549  if (ilayer == layer) continue; // don't include the layer of the seed
550 
551  if (segs[ilayer].empty()) continue;
552 
553  std::vector<MuPatSegment*> matchedSegs;
554  bool tightCuts = false;
555  //
556  if (m_useTightMatching) {
557  double phiSeed = (seedSeg.segment)->globalPosition().phi();
558  double etaSeed = (seedSeg.segment)->globalPosition().eta();
559 
560  int segsInCone = 0;
561  for (unsigned int j = 0; j < segs[ilayer].size(); j++) {
562  double phiSeg = (*segs[ilayer][j]).segment->globalPosition().phi();
563  double etaSeg = (*segs[ilayer][j]).segment->globalPosition().eta();
564 
565  double deltaPhi = xAOD::P4Helpers::deltaPhi(phiSeed, phiSeg);
566  double deltaEta = std::abs(etaSeed - etaSeg);
567  double deltaR = std::hypot(deltaPhi, deltaEta);
568 
569  if (deltaR < 0.35) segsInCone++;
570  }
571 
572  if (segsInCone > m_segThreshold) {
573  for (unsigned int j = 0; j < segs[ilayer].size(); ++j) {
574  bool isMatched = m_candidateMatchingTool->match(ctx, seedSeg, *segs[ilayer][j], true);
575 
576  if (isMatched) matchedSegs.push_back(segs[ilayer][j]);
577  }
578  if (matchedSegs.empty()) continue;
579  tightCuts = true;
580  }
581  }
582 
583  std::vector<std::unique_ptr<MuPatTrack> > tracks;
584 
585  if (!matchedSegs.empty() && m_useTightMatching)
586  tracks = m_trackBTool->find(ctx, seedSeg, matchedSegs);
587  else
588  tracks = m_trackBTool->find(ctx, seedSeg, segs[ilayer]);
589  if (!tracks.empty()) {
590  // if we reached the end of the sequence, we should save what we have else continue to next layer
591  if (ilayer + 1 == strat.getAll().size()) {
592  result.insert(result.end(), std::make_move_iterator(tracks.begin()), std::make_move_iterator(tracks.end()));
593  break;
594  }
595 
596  // loop on found tracks
597  for (std::unique_ptr<MuPatTrack>& cit : tracks) {
598  unsigned int nextLayer = ilayer + 1;
599  if (nextLayer < strat.getAll().size()) {
600  int cutLevel = tightCuts ? 1 : 0;
601  std::vector<std::unique_ptr<MuPatTrack> > nextTracks =
602  extendWithLayer(ctx, *cit, segs, nextLayer, endLayer, cutLevel);
603  if (!nextTracks.empty()) {
604  result.insert(result.end(), std::make_move_iterator(nextTracks.begin()),
605  std::make_move_iterator(nextTracks.end()));
606  } else {
607  result.push_back(std::move(cit));
608  }
609  }
610  }
611  }
612  }
613 
614  ATH_MSG_DEBUG("Constructed " << result.size() << " tracks with strategy " << strat.getName());
615  return result;
616  }

◆ findTracks()

std::unique_ptr< TrackCollection > Muon::MuonTrackSteering::findTracks ( const EventContext &  ctx,
ChSegCol_t chamberSegments,
StSegCol_t stationSegments 
) const
private

actual find method

Definition at line 313 of file MuonTrackSteering.cxx.

313  {
314  // Very basic : output all of the segments we are starting with
315  ATH_MSG_DEBUG("List of all strategies: " << m_strategies.size());
316  for (unsigned int i = 0; i < m_strategies.size(); ++i) ATH_MSG_DEBUG((*(m_strategies[i])));
317 
318  std::vector<std::unique_ptr<MuPatTrack> > resultAll;
319 
320  // Outermost loop over strategies!
321  for (unsigned int i = 0; i < m_strategies.size(); ++i) {
322  if (!m_strategies[i]) continue; // Check for empty strategy pointer
323 
324  const MuonTrackSteeringStrategy& strategy = *m_strategies[i];
325 
326  std::vector<std::unique_ptr<MuPatTrack> > result;
327 
328  // Segments that will be looped over...
329  SegColVec_t mySegColVec(strategy.getAll().size());
330 
331  ATH_MSG_VERBOSE("Segments to be looped on: " << mySegColVec.size());
332 
333  std::set<StIndex> stations;
334  // Preprocessing : loop over layers
335  for (unsigned int lit = 0; lit < strategy.getAll().size(); ++lit) {
336  std::vector<ChIndex> chambers = strategy.getCh(lit);
337 
338  // Optional : combine segments in the same station but different chambers
340  // Loop over stations in the layer
341  for (unsigned int chin = 0; chin < chambers.size(); ++chin) {
342  // get station index for the chamber
343  StIndex stIndex = toStationIndex(chambers[chin]);
344 
345  // skip those that are already included
346  if (stations.count(stIndex)) continue;
347  SegCol& segments = stationSegments[toInt(stIndex)];
348  // Add all of the MuPatSegments into the list for that layer
349  // db
350 
352  // SegCol filteredSegments;
353  for (unsigned int iseg = 0; iseg < segments.size(); iseg++) {
354  double thetaSeg = std::abs((*segments[iseg]).segment->globalPosition().theta());
355 
356  // only select segments in barrel/endcap overlap
357  if ((0.74159 > thetaSeg && thetaSeg > 0.51159) || (2.63 > thetaSeg && thetaSeg > 2.40))
358  mySegColVec[lit].push_back(segments[iseg]);
359  }
360  } else {
361  mySegColVec[lit].insert(mySegColVec[lit].end(), segments.begin(), segments.end());
362  }
363 
364  stations.insert(stIndex);
365  } // End of loop over chambers
366 
367  } else {
368  // Loop over stations in the layer
369  for (unsigned int chin = 0; chin < chambers.size(); ++chin) {
370  SegCol& segments = chamberSegments[toInt(chambers[chin])];
371  // Throw all of the MuPatSegments into the list for that layer
372  mySegColVec[lit].insert(mySegColVec[lit].end(), segments.begin(), segments.end());
373  } // End of loop over chambers
374  } // End of if combine segments in a layer
375 
376  } // End of loop over layers
377 
378  // Preprocessing step two : sort all layers' segments by quality
379  for (unsigned int lit = 0; lit < mySegColVec.size(); ++lit) {
380  std::stable_sort(mySegColVec[lit].begin(), mySegColVec[lit].end(), SortSegInfoByQuality());
381  }
382 
383  if (m_doSummary || msgLvl(MSG::DEBUG)) {
384  bool hasSegments = false;
385  for (unsigned int lit = 0; lit < mySegColVec.size(); ++lit) {
386  if (!mySegColVec[lit].empty()) {
387  hasSegments = true;
388  break;
389  }
390  }
391  if (hasSegments) {
392  msg(m_doSummary ? MSG::INFO : MSG::DEBUG) << "For strategy: " << strategy.getName() << " segments are: ";
393  for (unsigned int lit = 0; lit < mySegColVec.size(); ++lit)
394  for (unsigned int sit = 0; sit < mySegColVec[lit].size(); ++sit)
395  msg(m_doSummary ? MSG::INFO : MSG::DEBUG) << std::endl
396  << " " << m_candidateTool->print(*(mySegColVec[lit])[sit]);
398  }
399  }
400 
401  // Hang on to whether we want to cut seeds or not
403 
404  // Now assign priority for the layers
405  std::vector<unsigned int> seeds;
406 
407  // Assign seeds dynamically according to
409  // Loop through layers and do a little sort
410  std::vector<std::pair<int, unsigned int> > occupancy; // layer , occ
411  for (unsigned int lit = 0; lit < mySegColVec.size(); ++lit) {
412  occupancy.emplace_back(mySegColVec[lit].size(), lit);
413  }
414  std::stable_sort(occupancy.begin(), occupancy.end());
415  for (unsigned int lit = 0; lit < occupancy.size(); ++lit) { seeds.push_back(occupancy[lit].second); }
416  } else {
417  seeds = strategy.seeds();
418  if (seeds.empty()) {
419  for (unsigned int j = 0; j < mySegColVec.size(); ++j) seeds.push_back(j);
420  }
421  }
422  ATH_MSG_VERBOSE("Selected seed layers " << seeds.size());
423 
424  MuPatSegment* seedSeg = nullptr;
425  // Loop over seed layers
426  for (unsigned int lin = 0; lin < seeds.size(); ++lin) {
427  // Loop over segments in that layer
428  ATH_MSG_VERBOSE("New seed layer " << lin << " segments in layer " << mySegColVec[lin].size());
429 
430  for (unsigned int sin = 0; sin < mySegColVec[lin].size(); sin++) {
431  seedSeg = mySegColVec[lin].operator[](sin);
432  if (!seedSeg) continue; // Check for empty poinnter
433 
434  // Optionally, if the seed is on a track we skip it
435  if (cutSeeds && seedSeg->usedInFit) continue;
436 
437  // See if the seed passes our quality cut
438  if (seedSeg->quality < m_segQCut[0] ||
439  (m_segQCut[0] == -99 && !(seedSeg->segQuality && seedSeg->segQuality->isStrict())))
440  continue;
441  if (m_onlyMDTSeeding && !seedSeg->isMdt) continue;
442 
443  int segsInCone = 0;
444  double phiSeed = seedSeg->segment->globalPosition().phi();
445  double etaSeed = seedSeg->segment->globalPosition().eta();
446  for (unsigned int sin2 = 0; sin2 < mySegColVec[lin].size(); sin2++) {
447  if (sin == sin2) continue;
448  MuPatSegment* seg = mySegColVec[lin].operator[](sin2);
449 
450  if (seg->quality < m_segQCut[0] || (m_segQCut[0] == -99 && !(seg->segQuality && seg->segQuality->isStrict())))
451  continue;
452 
453  double phiSeg = seg->segment->globalPosition().phi();
454  double etaSeg = seg->segment->globalPosition().eta();
455 
456  double deltaPhi = xAOD::P4Helpers::deltaPhi(phiSeed, phiSeg);
457  double deltaEta = std::abs(etaSeed - etaSeg);
458  double deltaR = std::hypot(deltaPhi, deltaEta);
459 
460  if (deltaR < 0.35) segsInCone++;
461  }
462  ATH_MSG_VERBOSE("New seed " << sin << " segments in cone " << segsInCone);
463 
464  if (segsInCone > m_segThreshold && seedSeg->quality < m_segQCut[0] + 1) continue;
465 
466  std::vector<std::unique_ptr<MuPatTrack> > found =
467  findTrackFromSeed(ctx, *seedSeg, *(m_strategies[i]), seeds[lin], mySegColVec);
468 
469  ATH_MSG_VERBOSE(" Tracks for seed: " << std::endl << " --- " << m_candidateTool->print(result));
470  if (!found.empty()) {
471  result.insert(result.end(), std::make_move_iterator(found.begin()), std::make_move_iterator(found.end()));
472  }
473  } // End of loop over segments in a layer
474  } // Done with loop over seed layers
475 
476  // Post-processing : refinement
478 
479  // Post-processing : ambiguity resolution
480  if (msgLvl(MSG::DEBUG) && !result.empty()) {
481  msg(MSG::DEBUG) << "Initial track collection for strategy: " << strategy.getName() << " " << m_candidateTool->print(result)
482  << endmsg;
483  }
484 
486 
487  if (!result.empty())
488  resultAll.insert(resultAll.end(), std::make_move_iterator(result.begin()), std::make_move_iterator(result.end()));
489 
490  } // Done with loop over strategies
491 
492  if (!resultAll.empty()) { solveAmbiguities(resultAll); }
493 
495  SegCol& emSegments = stationSegments[toInt(StIndex::EM)];
496  // loop over segments in EM stations
497  if (!emSegments.empty()) {
498  for (MuPatSegment* sit : emSegments) {
499  // skip segments that are associated to a track
500  if (!sit->tracks().empty()) continue;
501 
502  // only take highest quality segments
503  if (sit->quality < 2) continue;
504 
505  // fit segment and add the track if fit ok
506  std::unique_ptr<Trk::Track> segmentTrack(m_segmentFitter->fit(*sit->segment));
507  if (segmentTrack) {
508  // Try to recover hits on the track
509  std::unique_ptr<Trk::Track> recoveredTrack(m_muonHoleRecoverTool->recover(*segmentTrack, ctx));
510  if (recoveredTrack) segmentTrack.swap(recoveredTrack);
511 
512  // generate a track summary for this track
513  if (m_trackSummaryTool.isEnabled()) {
514  m_trackSummaryTool->computeAndReplaceTrackSummary(ctx, *segmentTrack, false);
515  }
516 
517  std::unique_ptr<MuPatTrack> can = m_candidateTool->createCandidate(*sit, segmentTrack);
518  if (can)
519  resultAll.push_back(std::move(can));
520  else
521  ATH_MSG_WARNING("Failed to create MuPatTrack");
522  }
523  }
524  }
525  }
526 
527  // Output all the tracks that we are ending with
528  if (!resultAll.empty()) {
529  if (m_doSummary)
530  ATH_MSG_INFO("Final Output : " << m_candidateTool->print(resultAll) << endmsg);
531  else
532  ATH_MSG_DEBUG("Final Output : " << m_candidateTool->print(resultAll) << endmsg);
533  }
534  std::unique_ptr<TrackCollection> finalTrack = nullptr;
535  if (!resultAll.empty()) { finalTrack = selectTracks(resultAll); }
536 
537  return finalTrack;
538  }

◆ initialize()

StatusCode Muon::MuonTrackSteering::initialize ( )
overridevirtual

initialize method, method taken from bass-class AlgTool

Definition at line 64 of file MuonTrackSteering.cxx.

64  {
65  ATH_CHECK(m_edmHelperSvc.retrieve());
66  ATH_CHECK(m_printer.retrieve());
67  ATH_CHECK(m_candidateTool.retrieve());
69  ATH_CHECK(m_trackBTool.retrieve());
70  ATH_CHECK(m_ambiTool.retrieve());
71  ATH_CHECK(m_mooBTool.retrieve());
72  ATH_CHECK(m_trackRefineTool.retrieve());
73  ATH_CHECK(m_trackSummaryTool.retrieve());
75  if (m_outputSingleStationTracks) ATH_MSG_INFO("Single station track enabled ");
76  ATH_CHECK(m_segmentFitter.retrieve(DisableTool{!m_outputSingleStationTracks}));
77  ATH_CHECK(m_muonHoleRecoverTool.retrieve(DisableTool{!m_outputSingleStationTracks}));
78  ATH_CHECK(m_trackSelector.retrieve(DisableTool{m_trackSelector.empty()}));
79  if (!m_trackSelector.empty()) ATH_MSG_INFO("Track selection enabled: " << m_trackSelector);
80 
81  return StatusCode::SUCCESS;
82  }

◆ refineTracks()

void Muon::MuonTrackSteering::refineTracks ( const EventContext &  ctx,
std::vector< std::unique_ptr< MuPatTrack >> &  candidates 
) const
private

Definition at line 666 of file MuonTrackSteering.cxx.

666  {
667  for (std::unique_ptr<MuPatTrack>& cit : candidates) { m_trackRefineTool->refine(ctx, *cit); }
668  }

◆ selectTracks()

std::unique_ptr< TrackCollection > Muon::MuonTrackSteering::selectTracks ( std::vector< std::unique_ptr< MuPatTrack >> &  candidates,
bool  takeOwnership = true 
) const
private

Definition at line 646 of file MuonTrackSteering.cxx.

646  {
647  std::unique_ptr<TrackCollection> result = takeOwnership ?std::make_unique<TrackCollection>() : std::make_unique<TrackCollection>(SG::VIEW_ELEMENTS);
648  result->reserve(candidates.size());
649  for (std::unique_ptr<MuPatTrack>& cit : candidates) {
650  auto & thisTrack = cit->track();
651  // if track selector is configured, use it and remove bad tracks
652  if (!m_trackSelector.empty() && !m_trackSelector->decision(thisTrack)) continue;
653 
654  Trk::Track* track{nullptr};
655  if (takeOwnership)
656  track = new Trk::Track(thisTrack);
657  else
658  track = &thisTrack;
659  // add track summary to this track
660  if (m_trackSummaryTool.isEnabled()) { m_trackSummaryTool->computeAndReplaceTrackSummary(*track, false); }
661  result->push_back(track);
662  }
663  return result;
664  }

◆ solveAmbiguities()

void Muon::MuonTrackSteering::solveAmbiguities ( std::vector< std::unique_ptr< MuPatTrack >> &  tracks,
const MuonTrackSteeringStrategy strat = nullptr 
) const
private

Resolve ambiguities among tracks for a single strategy This allows a strategy-specific ambiguity solving (with some options per strategy)

Parameters
vectorof tracks that were found
stratthe steering strategy

Definition at line 672 of file MuonTrackSteering.cxx.

673  {
674  // the resulting vector of tracks to be returned
675  std::unique_ptr<TrackCollection> trkColl(selectTracks(tracks, false));
676  if (!trkColl || trkColl->empty()) { return; }
677 
678  std::unique_ptr<const TrackCollection> resolvedTracks(m_ambiTool->process(trkColl.get()));
679  if (!resolvedTracks) { return; }
680 
681  ATH_MSG_DEBUG(" resolved track candidates: old size " << trkColl->size() << " new size " << resolvedTracks->size());
682 
683  std::vector<std::unique_ptr<MuPatTrack> >::iterator pat = tracks.begin();
684  for (; pat != tracks.end();) {
685  bool found = false;
686  for (const Trk::Track* rtrk : *resolvedTracks) {
687  if (&(*pat)->track() == rtrk) {
688  found = true;
689  break;
690  }
691  }
692  if (!found) {
693  pat = tracks.erase(pat);
694  } else {
695  ++pat;
696  }
697  }
698 
699  }

Member Data Documentation

◆ m_ambiTool

ToolHandle<Trk::ITrackAmbiguityProcessorTool> Muon::MuonTrackSteering::m_ambiTool
private
Initial value:
{this, "AmbiguityTool",
"Trk::TrackSelectionProcessorTool/MuonAmbiProcessor"}

Definition at line 137 of file MuonTrackSteering.h.

◆ m_candidateMatchingTool

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

Definition at line 140 of file MuonTrackSteering.h.

◆ m_candidateTool

ToolHandle<MuPatCandidateTool> Muon::MuonTrackSteering::m_candidateTool {this, "MuPatCandidateTool", "Muon::MuPatCandidateTool/MuPatCandidateTool"}
private

Definition at line 135 of file MuonTrackSteering.h.

◆ m_combinedSLOverlaps

bool Muon::MuonTrackSteering::m_combinedSLOverlaps
private

Definition at line 156 of file MuonTrackSteering.h.

◆ m_doSummary

bool Muon::MuonTrackSteering::m_doSummary
private

Definition at line 157 of file MuonTrackSteering.h.

◆ m_edmHelperSvc

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

Definition at line 132 of file MuonTrackSteering.h.

◆ m_mooBTool

ToolHandle<MooTrackBuilder> Muon::MuonTrackSteering::m_mooBTool {this, "MooBuilderTool", "Muon::MooTrackBuilder/MooMuonTrackBuilder"}
private

Definition at line 139 of file MuonTrackSteering.h.

◆ m_muonHoleRecoverTool

ToolHandle<IMuonHoleRecoveryTool> Muon::MuonTrackSteering::m_muonHoleRecoverTool
private
Initial value:
{this, "HoleRecoveryTool",
"Muon::MuonChamberHoleRecoveryTool/MuonChamberHoleRecoveryTool"}

Definition at line 147 of file MuonTrackSteering.h.

◆ m_onlyMDTSeeding

bool Muon::MuonTrackSteering::m_onlyMDTSeeding
private

Definition at line 159 of file MuonTrackSteering.h.

◆ m_outputSingleStationTracks

bool Muon::MuonTrackSteering::m_outputSingleStationTracks
private

Definition at line 155 of file MuonTrackSteering.h.

◆ m_printer

PublicToolHandle<MuonEDMPrinterTool> Muon::MuonTrackSteering::m_printer {this, "MuonPrinterTool", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"}
private

Definition at line 134 of file MuonTrackSteering.h.

◆ m_segmentFitter

ToolHandle<IMuonSegmentFittingTool> Muon::MuonTrackSteering::m_segmentFitter
private
Initial value:
{this, "MuonSegmentFittingTool",
"Muon::MuonSegmentFittingTool/MuonSegmentFittingTool"}

Definition at line 143 of file MuonTrackSteering.h.

◆ m_segQCut

std::array<int, 3> Muon::MuonTrackSteering::m_segQCut {}
private

Required segment quality for seed, 2nd, and other segments.

Definition at line 154 of file MuonTrackSteering.h.

◆ m_segThreshold

int Muon::MuonTrackSteering::m_segThreshold
private

Definition at line 160 of file MuonTrackSteering.h.

◆ m_strategies

std::vector<std::unique_ptr<const MuonTrackSteeringStrategy> > Muon::MuonTrackSteering::m_strategies
private

Definition at line 151 of file MuonTrackSteering.h.

◆ m_stringStrategies

std::vector<std::string> Muon::MuonTrackSteering::m_stringStrategies
private

Definition at line 152 of file MuonTrackSteering.h.

◆ m_trackBTool

ToolHandle<IMuonTrackBuilder> Muon::MuonTrackSteering::m_trackBTool {this, "TrackBuilderTool", "Muon::MooTrackBuilder/MooMuonTrackBuilder"}
private

Definition at line 136 of file MuonTrackSteering.h.

◆ m_trackRefineTool

ToolHandle<IMuonTrackRefiner> Muon::MuonTrackSteering::m_trackRefineTool {this, "TrackRefinementTool", "Muon::MooTrackBuilder/MooMuonTrackBuilder"}
private

Definition at line 142 of file MuonTrackSteering.h.

◆ m_trackSelector

ToolHandle<Muon::MuonTrackSelectorTool> Muon::MuonTrackSteering::m_trackSelector
private
Initial value:
{this, "MuonTrackSelector",
"Muon::MuonTrackSelectorTool/MuonTrackSelectorTool"}

Definition at line 145 of file MuonTrackSteering.h.

◆ m_trackSummaryTool

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

Definition at line 149 of file MuonTrackSteering.h.

◆ m_useTightMatching

bool Muon::MuonTrackSteering::m_useTightMatching
private

Definition at line 158 of file MuonTrackSteering.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
xAOD::strategy
strategy
Definition: L2CombinedMuon_v1.cxx:108
Muon::MuonTrackSteering::m_segQCut
std::array< int, 3 > m_segQCut
Required segment quality for seed, 2nd, and other segments.
Definition: MuonTrackSteering.h:154
Muon::MuonTrackSteering::SegCol
std::vector< MuPatSegment * > SegCol
Definition: MuonTrackSteering.h:55
get_generator_info.result
result
Definition: get_generator_info.py:21
Muon::MuonTrackSteering::decodeList
static bool decodeList(const std::string &input, std::vector< std::string > &list)
Definition: MuonTrackSteering.cxx:806
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:128
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
Muon::MuonTrackSteering::findTracks
std::unique_ptr< TrackCollection > findTracks(const EventContext &ctx, ChSegCol_t &chamberSegments, StSegCol_t &stationSegments) const
actual find method
Definition: MuonTrackSteering.cxx:313
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
Muon::MuonStationIndex::ChIndex::EEL
@ EEL
Muon::MuonTrackSteering::refineTracks
void refineTracks(const EventContext &ctx, std::vector< std::unique_ptr< MuPatTrack >> &candidates) const
Definition: MuonTrackSteering.cxx:666
Muon::MuonTrackSteering::decodeStrategy
std::unique_ptr< const MuonTrackSteeringStrategy > decodeStrategy(const std::string &strategy) const
Definition: MuonTrackSteering.cxx:720
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
Muon::MuonStationIndex::ChIndex::EML
@ EML
make_unique
std::unique_ptr< T > make_unique(Args &&... args)
Definition: SkimmingToolEXOT5.cxx:23
Muon::MuonStationIndex::ChIndex::EOS
@ EOS
drawFromPickle.candidates
candidates
Definition: drawFromPickle.py:271
Muon::MuonStationIndex::StIndex::EM
@ EM
xAOD::deltaPhi
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
Definition: L2StandAloneMuon_v1.cxx:161
Muon::MuonTrackSteeringStrategy::CutSeedsOnTracks
@ CutSeedsOnTracks
Definition: MuonTrackSteeringStrategy.h:20
Muon::MuonStationIndex::ChIndex::BIL
@ BIL
xAOD::JetInput::Track
@ Track
Definition: JetContainerInfo.h:61
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
python.SystemOfUnits.second
float second
Definition: SystemOfUnits.py:135
xAOD::P4Helpers::deltaPhi
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
Definition: xAODP4Helpers.h:69
Muon::MuonTrackSteering::m_printer
PublicToolHandle< MuonEDMPrinterTool > m_printer
Definition: MuonTrackSteering.h:134
InDetSecVtxTruthMatchUtils::isMatched
bool isMatched(int matchInfo)
Definition: InDetSecVtxTruthMatchTool.h:75
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Muon::MuonStationIndex::ChIndex::EIS
@ EIS
Muon::MuonTrackSteering::m_useTightMatching
bool m_useTightMatching
Definition: MuonTrackSteering.h:158
xAOD::MuonSegment
MuonSegment_v1 MuonSegment
Reference the current persistent version:
Definition: Event/xAOD/xAODMuon/xAODMuon/MuonSegment.h:13
Muon::MuonTrackSteering::extendWithLayer
std::vector< std::unique_ptr< MuPatTrack > > extendWithLayer(const EventContext &ctx, MuPatTrack &candidate, const SegColVec_t &segcol, unsigned int nextlayer, const unsigned int endlayer, int cutLevel=0) const
Definition: MuonTrackSteering.cxx:618
Muon::MuonTrackSteering::m_trackSummaryTool
ToolHandle< Trk::IExtendedTrackSummaryTool > m_trackSummaryTool
Definition: MuonTrackSteering.h:149
std::stable_sort
void stable_sort(std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, std::reverse_iterator< DataModel_detail::iterator< DVL > > end, Compare comp)
Specialization of stable_sort for DataVector/List.
Definition: DVL_algorithms.h:711
Muon::MuonStationIndex::ChIndex::CSL
@ CSL
Muon::MuonTrackSteering::m_outputSingleStationTracks
bool m_outputSingleStationTracks
Definition: MuonTrackSteering.h:155
Muon::MuonTrackSteeringStrategy::BarrelEndcapFilter
@ BarrelEndcapFilter
Definition: MuonTrackSteeringStrategy.h:27
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:92
Muon::MuonTrackSteering::combineOverlapSegments
void combineOverlapSegments(const EventContext &ctx, std::vector< MuPatSegment * > &ch1, std::vector< MuPatSegment * > &ch2, StSegCol_t &stationSegments, StSet &stationsWithSegments, GarbageContainer &trash_bin) const
Definition: MuonTrackSteering.cxx:161
Muon::MuonTrackSteering::m_combinedSLOverlaps
bool m_combinedSLOverlaps
Definition: MuonTrackSteering.h:156
Muon::MuonTrackSteering::findTrackFromSeed
std::vector< std::unique_ptr< MuPatTrack > > findTrackFromSeed(const EventContext &ctx, MuPatSegment &seedSeg, const MuonTrackSteeringStrategy &strat, const unsigned int layer, const SegColVec_t &segs) const
Find tracks starting from a good segment.
Definition: MuonTrackSteering.cxx:540
Muon::MuonStationIndex::ChIndex::EIL
@ EIL
Muon::MuonStationIndex::toStationIndex
StIndex toStationIndex(ChIndex index)
convert ChIndex into StIndex
Muon::MuonTrackSteeringStrategy::DoRefinement
@ DoRefinement
Definition: MuonTrackSteeringStrategy.h:25
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
Muon::MuonTrackSteeringStrategy::DoAmbiSolving
@ DoAmbiSolving
Definition: MuonTrackSteeringStrategy.h:26
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
PlotPulseshapeFromCool.can
can
Definition: PlotPulseshapeFromCool.py:91
Muon::MuonStationIndex::ChIndex::BIS
@ BIS
P4Helpers::deltaEta
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
Definition: P4Helpers.h:66
lumiFormat.i
int i
Definition: lumiFormat.py:85
Muon::MuonStationIndex::chIndex
ChIndex chIndex(const std::string &index)
convert ChIndex name string to enum
Definition: MuonStationIndex.cxx:11
beamspotman.n
n
Definition: beamspotman.py:729
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
Muon::MuonStationIndex::ChIndex::BML
@ BML
Muon::MuonTrackSteering::m_trackSelector
ToolHandle< Muon::MuonTrackSelectorTool > m_trackSelector
Definition: MuonTrackSteering.h:145
Muon::MuonTrackSteering::StSet
std::set< MuonStationIndex::StIndex > StSet
Definition: MuonTrackSteering.h:67
Muon::MuonTrackSteering::m_strategies
std::vector< std::unique_ptr< const MuonTrackSteeringStrategy > > m_strategies
Definition: MuonTrackSteering.h:151
Muon::MuonStationIndex::ChIndex::CSS
@ CSS
Muon::MuonStationIndex::ChIndex::BOS
@ BOS
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Muon::MuonTrackSteering::m_edmHelperSvc
ServiceHandle< IMuonEDMHelperSvc > m_edmHelperSvc
Definition: MuonTrackSteering.h:132
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
Muon::MuonTrackSteering::ChSet
std::set< MuonStationIndex::ChIndex > ChSet
Definition: MuonTrackSteering.h:63
python.AtlRunQueryLib.options
options
Definition: AtlRunQueryLib.py:378
Trk::FitQuality
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
Definition: FitQuality.h:97
Muon::MuonTrackSteering::m_segmentFitter
ToolHandle< IMuonSegmentFittingTool > m_segmentFitter
Definition: MuonTrackSteering.h:143
DataVector< Trk::Track >
Muon::MuPatHitPtr
std::shared_ptr< MuPatHit > MuPatHitPtr
Definition: MuPatHit.h:25
Muon::MuonStationIndex::ChIndex::EES
@ EES
Muon::MuonTrackSteering::m_trackRefineTool
ToolHandle< IMuonTrackRefiner > m_trackRefineTool
Definition: MuonTrackSteering.h:142
Muon::MuonTrackSteering::m_muonHoleRecoverTool
ToolHandle< IMuonHoleRecoveryTool > m_muonHoleRecoverTool
Definition: MuonTrackSteering.h:147
Muon::MuonStationIndex::ChIndex::BEE
@ BEE
dso-stats.pat
pat
Definition: dso-stats.py:37
Muon::MuonStationIndex::ChIndex::BMS
@ BMS
Muon::MuonTrackSteering::decodeStrategyVector
StatusCode decodeStrategyVector(const std::vector< std::string > &strategy)
Definition: MuonTrackSteering.cxx:703
Muon::MuonStationIndex::StIndex::BE
@ BE
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
Muon::MuonTrackSteering::m_mooBTool
ToolHandle< MooTrackBuilder > m_mooBTool
Definition: MuonTrackSteering.h:139
Muon::MuonTrackSteering::m_candidateTool
ToolHandle< MuPatCandidateTool > m_candidateTool
Definition: MuonTrackSteering.h:135
Muon::MuonTrackSteering::selectTracks
std::unique_ptr< TrackCollection > selectTracks(std::vector< std::unique_ptr< MuPatTrack >> &candidates, bool takeOwnership=true) const
Definition: MuonTrackSteering.cxx:646
MuonR4::SegmentFit::toInt
constexpr int toInt(const ParamDefs p)
Definition: MuonHoughDefs.h:42
Muon::MuonTrackSteering::m_candidateMatchingTool
ToolHandle< MooCandidateMatchingTool > m_candidateMatchingTool
Definition: MuonTrackSteering.h:140
checkTriggerxAOD.found
found
Definition: checkTriggerxAOD.py:328
item
Definition: ItemListSvc.h:43
Muon::MuonTrackSteering::m_segThreshold
int m_segThreshold
Definition: MuonTrackSteering.h:160
Muon::MuonTrackSteering::solveAmbiguities
void solveAmbiguities(std::vector< std::unique_ptr< MuPatTrack >> &tracks, const MuonTrackSteeringStrategy *strat=nullptr) const
Resolve ambiguities among tracks for a single strategy This allows a strategy-specific ambiguity solv...
Definition: MuonTrackSteering.cxx:672
Muon::MuonTrackSteering::m_doSummary
bool m_doSummary
Definition: MuonTrackSteering.h:157
columnar::empty
bool empty() const noexcept
Definition: ObjectRange.h:163
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
Muon::MuonTrackSteering::m_onlyMDTSeeding
bool m_onlyMDTSeeding
Definition: MuonTrackSteering.h:159
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.Constants.INFO
int INFO
Definition: Control/AthenaCommon/python/Constants.py:15
Muon::MuonTrackSteeringStrategy::DynamicSeeding
@ DynamicSeeding
Definition: MuonTrackSteeringStrategy.h:22
DEBUG
#define DEBUG
Definition: page_access.h:11
Muon::StIndex
MuonStationIndex::StIndex StIndex
Definition: MuonSegmentMatchingTool.cxx:14
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
Muon::MuonStationIndex::ChIndex::EOL
@ EOL
Muon::MuonTrackSteering::m_stringStrategies
std::vector< std::string > m_stringStrategies
Definition: MuonTrackSteering.h:152
Muon::MuonTrackSteering::extractSegments
bool extractSegments(const EventContext &ctx, const MuonSegmentCollection &coll, ChSegCol_t &chamberSegments, StSegCol_t &stationSegments, ChSet &chambersWithSegments, StSet &stationsWithSegments, GarbageContainer &trash_bin) const
Definition: MuonTrackSteering.cxx:102
Trk::FitQuality::chiSquared
double chiSquared() const
returns the of the overall track fit
Definition: FitQuality.h:56
Trk::FitQuality::numberDoF
int numberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as integer
Definition: FitQuality.h:60
Muon::MuonStationIndex::ChIndex
ChIndex
enum to classify the different chamber layers in the muon spectrometer
Definition: MuonStationIndex.h:15
xAOD::track
@ track
Definition: TrackingPrimitives.h:513
Muon::MuonTrackSteeringStrategy::CombineSegInStation
@ CombineSegInStation
Definition: MuonTrackSteeringStrategy.h:21
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
Muon::MuonStationIndex::ChIndex::EMS
@ EMS
Muon::MuonTrackSteering::m_trackBTool
ToolHandle< IMuonTrackBuilder > m_trackBTool
Definition: MuonTrackSteering.h:136
Muon::IMuonSegmentTrackBuilder::PrepVec
std::vector< const Trk::PrepRawData * > PrepVec
Definition: IMuonSegmentTrackBuilder.h:26
makeComparison.deltaR
float deltaR
Definition: makeComparison.py:36
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
Muon::MuonTrackSteering::m_ambiTool
ToolHandle< Trk::ITrackAmbiguityProcessorTool > m_ambiTool
Definition: MuonTrackSteering.h:137
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5
Muon::MuonTrackSteering::SegColVec_t
std::vector< SegCol > SegColVec_t
Definition: MuonTrackSteering.h:62
Muon::MuonTrackSteering::ChSegCol_t
std::array< SegCol, MuonStationIndex::toInt(MuonStationIndex::ChIndex::ChIndexMax)> ChSegCol_t
Helper container to sort the segments by chamber index.
Definition: MuonTrackSteering.h:60
Muon::MuonTrackSteering::StSegCol_t
std::array< SegCol, MuonStationIndex::toInt(MuonStationIndex::StIndex::StIndexMax)> StSegCol_t
Helper container to sort the segments by station index.
Definition: MuonTrackSteering.h:58
Muon::MuonStationIndex::ChIndex::BOL
@ BOL