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

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
 
typedef std::vector< SegColSegColVec
 
typedef SegColVec::iterator SegColVecIt
 
typedef SegColVec::const_iterator SegColVecCit
 
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...
 
virtual std::unique_ptr< TrackCollectionfind (const EventContext &ctx, const std::vector< const MuonSegment * > &segments) const =0
 interface for tools to find track in the muon system starting from a vector of segments More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 access to tool interface More...
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

std::unique_ptr< TrackCollectionselectTracks (std::vector< std::unique_ptr< MuPatTrack >> &candidates, bool takeOwnership=true) const
 
std::unique_ptr< TrackCollectionfindTracks (const EventContext &ctx, SegColVec &chamberSegments, SegColVec &stationSegments) const
 actual find method More...
 
bool extractSegments (const EventContext &ctx, const MuonSegmentCollection &coll, SegColVec &chamberSegments, SegColVec &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 &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 &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, SegColVec &stationSegments, StSet &stationsWithSegments, GarbageContainer &trash_bin) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

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
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

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 63 of file MuonTrackSteering.h.

◆ ChIt

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

Definition at line 62 of file MuonTrackSteering.h.

◆ ChSet

Definition at line 61 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

Definition at line 57 of file MuonTrackSteering.h.

◆ SegColVecCit

typedef SegColVec::const_iterator Muon::MuonTrackSteering::SegColVecCit

Definition at line 59 of file MuonTrackSteering.h.

◆ SegColVecIt

typedef SegColVec::iterator Muon::MuonTrackSteering::SegColVecIt

Definition at line 58 of file MuonTrackSteering.h.

◆ StCit

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

Definition at line 67 of file MuonTrackSteering.h.

◆ StIt

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

Definition at line 66 of file MuonTrackSteering.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

◆ StSet

Definition at line 65 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  AthAlgTool(t, n, p), m_combinedSLOverlaps(false) {
52  declareInterface<IMuonTrackFinder>(this);
53 
54  declareProperty("StrategyList", m_stringStrategies, "List of strategies to be used by the track steering");
55  declareProperty("SegSeedQCut", m_segQCut[0] = -2, "Required quality for segments to be a seed");
56  declareProperty("Seg2ndQCut", m_segQCut[1] = -2, "Required quality for segments to be the second on a track");
57  declareProperty("SegOtherQCut", m_segQCut[2] = -2, "Required quality for segments to be added to a track");
58  declareProperty("OutputSingleStationTracks", m_outputSingleStationTracks = false);
59  declareProperty("DoSummary", m_doSummary = false);
60  declareProperty("UseTightSegmentMatching", m_useTightMatching = true);
61  declareProperty("SegmentThreshold", m_segThreshold = 8);
62  declareProperty("OnlyMdtSeeding", m_onlyMDTSeeding = true);
63  }

◆ ~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,
SegColVec 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  MuonStationIndex::StIndex stIndex = !ch1.empty() ? ch1.front()->stIndex : ch2.front()->stIndex;
171 
172  SegCol& stationVec = stationSegments[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->quality < 2 || (segInfo->quality < sit1->quality || segInfo->quality < sit2->quality)) {
238  ATH_MSG_VERBOSE("resolveSLOverlaps::bad segment " << std::endl << m_printer->print(*segInfo->segment));
239  continue;
240  }
241  int shared_eta = 0, shared_phi = 0; // check for hits shared between segments
242 
243  const MuPatSegment* const_sit1 = sit1;
244  const MuPatSegment* const_sit2 = sit2;
245  for (const MuPatHitPtr& hit_ch1 : const_sit1->hitList()) {
246  for (const MuPatHitPtr& hit_ch2 : const_sit2->hitList()) {
247  if (hit_ch1->info().id == hit_ch2->info().id) {
248  if (hit_ch1->info().measuresPhi)
249  shared_phi++;
250  else
251  shared_eta++;
252  }
253  }
254  }
255 
256  if (sit1->etaHits().size() + sit2->etaHits().size() - shared_eta - segInfo->etaHits().size() > 1) {
257  ATH_MSG_VERBOSE("resolveSLOverlaps::more than one eta measurement removed, dropping track "
258  << std::endl
259  << m_printer->print(*segInfo->segment));
260  continue;
261  }
262 
263  int phiHitDiff = sit1->phiHits().size() + sit2->phiHits().size() - shared_phi - segInfo->phiHits().size();
264  if (phiHitDiff > 1 || (sit1->phiHits().size() + sit2->phiHits().size() > 0 && segInfo->phiHits().empty())) {
265  ATH_MSG_VERBOSE("resolveSLOverlaps::more than one phi measurement removed, dropping track "
266  << std::endl
267  << m_printer->print(*segInfo->segment));
268  continue;
269  }
272  double cosPointingAngle = (newseg->globalPosition().x() * newseg->globalDirection().x() +
273  newseg->globalPosition().y() * newseg->globalDirection().y()) /
274  (newseg->globalPosition().perp() * newseg->globalDirection().perp());
275  if (cosPointingAngle < 0.995) {
276  ATH_MSG_VERBOSE("resolveSLOverlaps: rejected due to too large pointing angle " << std::endl
277  << m_printer->print(*segInfo->segment));
278  continue;
279  }
280  ATH_MSG_VERBOSE("created SL overlap segment: cos pointing " << cosPointingAngle << std::endl
281  << m_printer->print(*segInfo->segment));
282 
283  // flag segments as matched
284  wasMatched1 = true;
285  wasMatched2[idx_ch2] = true;
286 
287  // add segment
288  stationVec.push_back(segInfo.get());
289  trash_bin.push_back(std::move(newseg));
290  trash_bin.push_back(std::move(segInfo));
291 
292  }
293 
294  // if entry was not associated with entry in other station add it to entries
295  if (!wasMatched1) { stationVec.push_back(sit1); }
296  }
297 
298  // loop over entries in second station and add unassociated entries to candidate entries
299  for (unsigned int i = 0; i < wasMatched2.size(); ++i) {
300  if (!wasMatched2[i]) { stationVec.push_back(ch2[i]); }
301  }
302 
303  // add station to list of stations with segments
304  if (!stationVec.empty()) { stationsWithSegments.insert(stIndex); }
305 
306  // sort segment according to their quality
307  std::stable_sort(stationVec.begin(), stationVec.end(), SortSegInfoByQuality());
308  }

◆ declareGaudiProperty() [1/4]

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

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

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

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

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

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

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

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

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ decodeList()

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

Definition at line 812 of file MuonTrackSteering.cxx.

812  {
813  bool result = true;
814  std::string::size_type begIdx = 0;
815  std::string::size_type endIdx = 0;
816  do {
817  endIdx = input.find(',', begIdx);
818  std::string::size_type lstIdx = endIdx;
819  if (std::string::npos == endIdx) { lstIdx = input.length(); }
820  std::string item = input.substr(begIdx, lstIdx - begIdx);
821  list.push_back(item);
822  begIdx = lstIdx + 1;
823  } while (std::string::npos != endIdx);
824  return result;
825  }

◆ decodeStrategy()

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

Definition at line 719 of file MuonTrackSteering.cxx.

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

◆ decodeStrategyVector()

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

Definition at line 702 of file MuonTrackSteering.cxx.

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

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extendWithLayer()

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

Definition at line 617 of file MuonTrackSteering.cxx.

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

◆ extractSegments()

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

Definition at line 103 of file MuonTrackSteering.cxx.

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

◆ 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

◆ find() [1/2]

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 85 of file MuonTrackSteering.cxx.

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

◆ find() [2/2]

virtual std::unique_ptr<TrackCollection> Muon::IMuonTrackFinder::find ( const EventContext &  ctx,
const std::vector< const MuonSegment * > &  segments 
) const
pure virtualinherited

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

Parameters
segmentsa vector of input segments
Returns
a pointer to a vector of Trk::Track objects, zero if no tracks are found. The ownership of the tracks is passed to the client calling the tool.

◆ findTrackFromSeed()

std::vector< std::unique_ptr< MuPatTrack > > Muon::MuonTrackSteering::findTrackFromSeed ( const EventContext &  ctx,
MuPatSegment seedSeg,
const MuonTrackSteeringStrategy strat,
const unsigned int  layer,
const SegColVec 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 539 of file MuonTrackSteering.cxx.

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

◆ findTracks()

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

actual find method

Definition at line 312 of file MuonTrackSteering.cxx.

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

◆ initialize()

StatusCode Muon::MuonTrackSteering::initialize ( )
overridevirtual

initialize method, method taken from bass-class AlgTool

Definition at line 65 of file MuonTrackSteering.cxx.

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

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

static const InterfaceID& Muon::IMuonTrackFinder::interfaceID ( )
inlinestaticinherited

access to tool interface

Definition at line 30 of file IMuonTrackFinder.h.

30  {
31  static const InterfaceID IID_IMuonTrackFinder("Muon::IMuonTrackFinder", 1, 0);
32  return IID_IMuonTrackFinder;
33  }

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ refineTracks()

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

Definition at line 665 of file MuonTrackSteering.cxx.

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

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ selectTracks()

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

Definition at line 645 of file MuonTrackSteering.cxx.

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

◆ 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 671 of file MuonTrackSteering.cxx.

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

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_ambiTool

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

Definition at line 135 of file MuonTrackSteering.h.

◆ m_candidateMatchingTool

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

Definition at line 138 of file MuonTrackSteering.h.

◆ m_candidateTool

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

Definition at line 133 of file MuonTrackSteering.h.

◆ m_combinedSLOverlaps

bool Muon::MuonTrackSteering::m_combinedSLOverlaps
private

Definition at line 154 of file MuonTrackSteering.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doSummary

bool Muon::MuonTrackSteering::m_doSummary
private

Definition at line 155 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 130 of file MuonTrackSteering.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_mooBTool

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

Definition at line 137 of file MuonTrackSteering.h.

◆ m_muonHoleRecoverTool

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

Definition at line 145 of file MuonTrackSteering.h.

◆ m_onlyMDTSeeding

bool Muon::MuonTrackSteering::m_onlyMDTSeeding
private

Definition at line 157 of file MuonTrackSteering.h.

◆ m_outputSingleStationTracks

bool Muon::MuonTrackSteering::m_outputSingleStationTracks
private

Definition at line 153 of file MuonTrackSteering.h.

◆ m_printer

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

Definition at line 132 of file MuonTrackSteering.h.

◆ m_segmentFitter

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

Definition at line 141 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 152 of file MuonTrackSteering.h.

◆ m_segThreshold

int Muon::MuonTrackSteering::m_segThreshold
private

Definition at line 158 of file MuonTrackSteering.h.

◆ m_strategies

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

Definition at line 149 of file MuonTrackSteering.h.

◆ m_stringStrategies

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

Definition at line 150 of file MuonTrackSteering.h.

◆ m_trackBTool

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

Definition at line 134 of file MuonTrackSteering.h.

◆ m_trackRefineTool

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

Definition at line 140 of file MuonTrackSteering.h.

◆ m_trackSelector

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

Definition at line 143 of file MuonTrackSteering.h.

◆ m_trackSummaryTool

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

Definition at line 147 of file MuonTrackSteering.h.

◆ m_useTightMatching

bool Muon::MuonTrackSteering::m_useTightMatching
private

Definition at line 156 of file MuonTrackSteering.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
xAOD::strategy
strategy
Definition: L2CombinedMuon_v1.cxx:107
Muon::MuonStationIndex::BIS
@ BIS
Definition: MuonStationIndex.h:17
Muon::MuonTrackSteering::m_segQCut
std::array< int, 3 > m_segQCut
Required segment quality for seed, 2nd, and other segments.
Definition: MuonTrackSteering.h:152
Muon::MuonStationIndex::BE
@ BE
Definition: MuonStationIndex.h:25
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
Muon::MuonStationIndex::CSS
@ CSS
Definition: MuonStationIndex.h:18
Muon::MuonStationIndex::toStationIndex
static StIndex toStationIndex(ChIndex index)
convert ChIndex into StIndex
Definition: MuonStationIndex.cxx:43
Muon::MuonTrackSteering::SegCol
std::vector< MuPatSegment * > SegCol
Definition: MuonTrackSteering.h:55
Muon::MuonStationIndex::chIndex
static ChIndex chIndex(const std::string &index)
convert ChIndex name string to enum
Definition: MuonStationIndex.cxx:20
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:812
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:128
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
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::MuonTrackSteering::refineTracks
void refineTracks(const EventContext &ctx, std::vector< std::unique_ptr< MuPatTrack >> &candidates) const
Definition: MuonTrackSteering.cxx:665
Muon::MuonStationIndex::EEL
@ EEL
Definition: MuonStationIndex.h:18
Muon::MuonTrackSteering::decodeStrategy
std::unique_ptr< const MuonTrackSteeringStrategy > decodeStrategy(const std::string &strategy) const
Definition: MuonTrackSteering.cxx:719
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
make_unique
std::unique_ptr< T > make_unique(Args &&... args)
Definition: SkimmingToolEXOT5.cxx:23
drawFromPickle.candidates
candidates
Definition: drawFromPickle.py:271
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
xAOD::deltaPhi
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
Definition: L2StandAloneMuon_v1.cxx:160
Muon::MuonStationIndex::BML
@ BML
Definition: MuonStationIndex.h:17
Muon::MuonTrackSteeringStrategy::CutSeedsOnTracks
@ CutSeedsOnTracks
Definition: MuonTrackSteeringStrategy.h:20
xAOD::JetInput::Track
@ Track
Definition: JetContainerInfo.h:61
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
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:132
InDetSecVtxTruthMatchUtils::isMatched
bool isMatched(int matchInfo)
Definition: InDetSecVtxTruthMatchTool.h:48
Muon::MuonStationIndex::BOS
@ BOS
Definition: MuonStationIndex.h:17
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Muon::MuonStationIndex::BMS
@ BMS
Definition: MuonStationIndex.h:17
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Muon::MuonTrackSteering::m_useTightMatching
bool m_useTightMatching
Definition: MuonTrackSteering.h:156
xAOD::MuonSegment
MuonSegment_v1 MuonSegment
Reference the current persistent version:
Definition: Event/xAOD/xAODMuon/xAODMuon/MuonSegment.h:13
empty
bool empty(TH1 *h)
Definition: computils.cxx:295
Muon::MuonStationIndex::EIS
@ EIS
Definition: MuonStationIndex.h:18
Muon::MuonTrackSteering::m_trackSummaryTool
ToolHandle< Trk::IExtendedTrackSummaryTool > m_trackSummaryTool
Definition: MuonTrackSteering.h:147
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::MuonTrackSteering::m_outputSingleStationTracks
bool m_outputSingleStationTracks
Definition: MuonTrackSteering.h:153
Muon::MuonTrackSteeringStrategy::BarrelEndcapFilter
@ BarrelEndcapFilter
Definition: MuonTrackSteeringStrategy.h:27
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
Muon::MuonStationIndex::EOS
@ EOS
Definition: MuonStationIndex.h:18
Muon::MuonTrackSteering::m_combinedSLOverlaps
bool m_combinedSLOverlaps
Definition: MuonTrackSteering.h:154
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
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:210
PlotPulseshapeFromCool.can
can
Definition: PlotPulseshapeFromCool.py:91
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
P4Helpers::deltaEta
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
Definition: P4Helpers.h:66
Muon::MuonTrackSteering::extendWithLayer
std::vector< std::unique_ptr< MuPatTrack > > extendWithLayer(const EventContext &ctx, MuPatTrack &candidate, const SegColVec &segcol, unsigned int nextlayer, const unsigned int endlayer, int cutLevel=0) const
Definition: MuonTrackSteering.cxx:617
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:731
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::MuonTrackSteering::m_trackSelector
ToolHandle< Muon::MuonTrackSelectorTool > m_trackSelector
Definition: MuonTrackSteering.h:143
Muon::MuonTrackSteering::StSet
std::set< MuonStationIndex::StIndex > StSet
Definition: MuonTrackSteering.h:65
Muon::MuonTrackSteering::m_strategies
std::vector< std::unique_ptr< const MuonTrackSteeringStrategy > > m_strategies
Definition: MuonTrackSteering.h:149
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Muon::MuonTrackSteering::m_edmHelperSvc
ServiceHandle< IMuonEDMHelperSvc > m_edmHelperSvc
Definition: MuonTrackSteering.h:130
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
Muon::MuonTrackSteering::ChSet
std::set< MuonStationIndex::ChIndex > ChSet
Definition: MuonTrackSteering.h:61
Muon::MuonTrackSteering::SegColVec
std::vector< SegCol > SegColVec
Definition: MuonTrackSteering.h:57
python.AtlRunQueryLib.options
options
Definition: AtlRunQueryLib.py:379
Trk::FitQuality
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
Definition: FitQuality.h:97
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Muon::MuonTrackSteering::findTracks
std::unique_ptr< TrackCollection > findTracks(const EventContext &ctx, SegColVec &chamberSegments, SegColVec &stationSegments) const
actual find method
Definition: MuonTrackSteering.cxx:312
Muon::MuonTrackSteering::m_segmentFitter
ToolHandle< IMuonSegmentFittingTool > m_segmentFitter
Definition: MuonTrackSteering.h:141
Muon::MuonTrackSteering::extractSegments
bool extractSegments(const EventContext &ctx, const MuonSegmentCollection &coll, SegColVec &chamberSegments, SegColVec &stationSegments, ChSet &chambersWithSegments, StSet &stationsWithSegments, GarbageContainer &trash_bin) const
Definition: MuonTrackSteering.cxx:103
DataVector< Trk::Track >
Muon::MuPatHitPtr
std::shared_ptr< MuPatHit > MuPatHitPtr
Definition: MuPatHit.h:25
Muon::MuonTrackSteering::m_trackRefineTool
ToolHandle< IMuonTrackRefiner > m_trackRefineTool
Definition: MuonTrackSteering.h:140
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
Muon::MuonStationIndex::EES
@ EES
Definition: MuonStationIndex.h:18
Muon::MuonTrackSteering::m_muonHoleRecoverTool
ToolHandle< IMuonHoleRecoveryTool > m_muonHoleRecoverTool
Definition: MuonTrackSteering.h:145
Muon::MuonStationIndex::ChUnknown
@ ChUnknown
Definition: MuonStationIndex.h:16
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
dso-stats.pat
pat
Definition: dso-stats.py:39
Muon::MuonTrackSteering::decodeStrategyVector
StatusCode decodeStrategyVector(const std::vector< std::string > &strategy)
Definition: MuonTrackSteering.cxx:702
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Muon::MuonStationIndex::StIndexMax
@ StIndexMax
Definition: MuonStationIndex.h:27
Muon::MuonTrackSteering::m_mooBTool
ToolHandle< MooTrackBuilder > m_mooBTool
Definition: MuonTrackSteering.h:137
Muon::MuonTrackSteering::m_candidateTool
ToolHandle< MuPatCandidateTool > m_candidateTool
Definition: MuonTrackSteering.h:133
Muon::MuonTrackSteering::selectTracks
std::unique_ptr< TrackCollection > selectTracks(std::vector< std::unique_ptr< MuPatTrack >> &candidates, bool takeOwnership=true) const
Definition: MuonTrackSteering.cxx:645
Muon::MuonTrackSteering::m_candidateMatchingTool
ToolHandle< MooCandidateMatchingTool > m_candidateMatchingTool
Definition: MuonTrackSteering.h:138
item
Definition: ItemListSvc.h:43
Muon::MuonTrackSteering::m_segThreshold
int m_segThreshold
Definition: MuonTrackSteering.h:158
Cut::all
@ all
Definition: SUSYToolsAlg.cxx:67
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:671
Muon::MuonStationIndex::ChIndexMax
@ ChIndexMax
Definition: MuonStationIndex.h:19
Muon::MuonStationIndex::EML
@ EML
Definition: MuonStationIndex.h:18
Muon::MuonTrackSteering::m_doSummary
bool m_doSummary
Definition: MuonTrackSteering.h:155
a
TList * a
Definition: liststreamerinfos.cxx:10
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
Muon::MuonTrackSteering::m_onlyMDTSeeding
bool m_onlyMDTSeeding
Definition: MuonTrackSteering.h:157
h
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Muon::MuonStationIndex::BIL
@ BIL
Definition: MuonStationIndex.h:17
Muon::MuonTrackSteeringStrategy::DynamicSeeding
@ DynamicSeeding
Definition: MuonTrackSteeringStrategy.h:22
Muon::MuonStationIndex::BEE
@ BEE
Definition: MuonStationIndex.h:17
DEBUG
#define DEBUG
Definition: page_access.h:11
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
Muon::MuonTrackSteering::findTrackFromSeed
std::vector< std::unique_ptr< MuPatTrack > > findTrackFromSeed(const EventContext &ctx, MuPatSegment &seedSeg, const MuonTrackSteeringStrategy &strat, const unsigned int layer, const SegColVec &segs) const
Find tracks starting from a good segment.
Definition: MuonTrackSteering.cxx:539
Muon::MuonTrackSteering::m_stringStrategies
std::vector< std::string > m_stringStrategies
Definition: MuonTrackSteering.h:150
Muon::MuonStationIndex::ChIndex
ChIndex
enum to classify the different chamber layers in the muon spectrometer
Definition: MuonStationIndex.h:15
Muon::MuonTrackSteering::combineOverlapSegments
void combineOverlapSegments(const EventContext &ctx, std::vector< MuPatSegment * > &ch1, std::vector< MuPatSegment * > &ch2, SegColVec &stationSegments, StSet &stationsWithSegments, GarbageContainer &trash_bin) const
Definition: MuonTrackSteering.cxx:161
Trk::FitQuality::chiSquared
double chiSquared() const
returns the of the overall track fit
Definition: FitQuality.h:56
Muon::MuonStationIndex::StIndex
StIndex
enum to classify the different station layers in the muon spectrometer
Definition: MuonStationIndex.h:23
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
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
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
Muon::MuonTrackSteeringStrategy::CombineSegInStation
@ CombineSegInStation
Definition: MuonTrackSteeringStrategy.h:21
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
Muon::MuonStationIndex::EMS
@ EMS
Definition: MuonStationIndex.h:18
Muon::MuonStationIndex::EOL
@ EOL
Definition: MuonStationIndex.h:18
Muon::MuonTrackSteering::m_trackBTool
ToolHandle< IMuonTrackBuilder > m_trackBTool
Definition: MuonTrackSteering.h:134
Muon::IMuonSegmentTrackBuilder::PrepVec
std::vector< const Trk::PrepRawData * > PrepVec
Definition: IMuonSegmentTrackBuilder.h:26
makeComparison.deltaR
float deltaR
Definition: makeComparison.py:36
Muon::MuonStationIndex::BOL
@ BOL
Definition: MuonStationIndex.h:17
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
Muon::MuonStationIndex::EM
@ EM
Definition: MuonStationIndex.h:26
Muon::MuonTrackSteering::m_ambiTool
ToolHandle< Trk::ITrackAmbiguityProcessorTool > m_ambiTool
Definition: MuonTrackSteering.h:135
Muon::MuonStationIndex::CSL
@ CSL
Definition: MuonStationIndex.h:18
fitman.k
k
Definition: fitman.py:528
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5
Muon::MuonStationIndex::EIL
@ EIL
Definition: MuonStationIndex.h:18