ATLAS Offline Software
MuPatCandidateTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "MuPatCandidateTool.h"
6 
7 #include <cstdlib> // for std::abs( int )
8 #include <set>
9 #include <sstream>
10 #include <string>
11 
13 #include "MuPatHitTool.h"
30 #include "TrkTrack/Track.h"
31 
32 namespace Muon {
33 
34  MuPatCandidateTool::MuPatCandidateTool(const std::string& t, const std::string& n, const IInterface* p) : AthAlgTool(t, n, p) {
35  declareInterface<MuPatCandidateTool>(this);
36  }
37 
39  ATH_CHECK(m_idHelperSvc.retrieve());
40  ATH_CHECK(m_mdtRotCreator.retrieve());
41  if (!m_cscRotCreator.empty()) {
42  if (!m_idHelperSvc->hasCSC())
44  "The current layout does not have any CSC chamber but you gave a CscRotCreator, ignoring it, but double-check "
45  "configuration");
46  else
47  ATH_CHECK(m_cscRotCreator.retrieve());
48  }
49  ATH_CHECK(m_compClusterCreator.retrieve());
50  ATH_CHECK(m_hitHandler.retrieve());
51  ATH_CHECK(m_edmHelperSvc.retrieve());
52  ATH_CHECK(m_printer.retrieve());
53  ATH_CHECK(m_segmentSelector.retrieve());
54 
55  return StatusCode::SUCCESS;
56  }
57 
58  std::unique_ptr<MuPatSegment> MuPatCandidateTool::createSegInfo(const EventContext& ctx, const MuonSegment& segment) const {
59  Identifier chid = m_edmHelperSvc->chamberId(segment);
60  if (m_idHelperSvc->isTrigger(chid)) {
61  ATH_MSG_WARNING("Trigger hit only segments not supported " << m_idHelperSvc->toStringChamber(chid));
62  return nullptr;
63  }
64  std::unique_ptr<MuPatSegment> info = std::make_unique<MuPatSegment>();
65  info->segment = &segment;
66  info->chid = chid;
67  info->chIndex = m_idHelperSvc->chamberIndex(info->chid);
68  std::set<Identifier> chIds = m_edmHelperSvc->chamberIds(segment);
69  for (const Identifier& id : chIds) {
70  MuonStationIndex::ChIndex chIdx = m_idHelperSvc->chamberIndex(id);
71  info->addChamber(chIdx);
72  // set default name
73  if (!info->name.empty()) info->name += "+";
74  // stationname_eta_phi
75  std::ostringstream oss;
76  oss << MuonStationIndex::chName(chIdx) << "_" << m_idHelperSvc->stationEta(id) << "_" << m_idHelperSvc->stationPhi(id);
77  info->name += oss.str();
78  }
79  info->stIndex = m_idHelperSvc->stationIndex(info->chid);
80  info->isEndcap = m_idHelperSvc->isEndcap(info->chid);
81  info->isMdt = m_idHelperSvc->isMdt(info->chid);
82  info->usedInFit = 0;
83  info->quality = m_segmentSelector->quality(segment);
84  info->segQuality = dynamic_cast<const MuonSegmentQuality*>(segment.fitQuality());
85 
86  info->segPars.reset(m_edmHelperSvc->createTrackParameters(segment, 5000., 0.));
87  if (!info->segPars) { ATH_MSG_WARNING(" failed to create track parameter for segment "); }
88 
89  updateHits(*info, info->segment->containedMeasurements(), m_doMdtRecreation, m_doCscRecreation, true);
90  m_hitHandler->create(ctx, segment, info->hitList());
91  return info;
92  }
93 
94  bool MuPatCandidateTool::extendWithSegment(MuPatTrack& can, MuPatSegment& segInfo, std::unique_ptr<Trk::Track>& track) const {
95  // add segment to candidate
96  can.addSegment(&segInfo, track);
98  }
99 
100  std::unique_ptr<MuPatTrack> MuPatCandidateTool::copyCandidate(MuPatTrack* canIn) {
101  // copy and update hits
102  std::unique_ptr<MuPatTrack> can = std::make_unique<MuPatTrack>(*canIn);
103  return can;
104  }
105 
106  std::unique_ptr<MuPatTrack> MuPatCandidateTool::createCandidate(MuPatSegment& segInfo, std::unique_ptr<Trk::Track>& track) const {
107  // create the new candidate
108  std::unique_ptr<MuPatTrack> candidate = std::make_unique< MuPatTrack>(&segInfo, track);
110  return candidate;
111  }
112 
113  bool MuPatCandidateTool::updateTrack(MuPatTrack& candidate, std::unique_ptr<Trk::Track>& track) const {
114  candidate.updateTrack(track);
115  return recalculateCandidateSegmentContent(candidate);
116  }
117 
118  std::unique_ptr<MuPatTrack> MuPatCandidateTool::createCandidate(MuPatSegment& segInfo1, MuPatSegment& segInfo2,
119  std::unique_ptr<Trk::Track>& track) const {
120  // create the new candidate
121  std::unique_ptr<MuPatTrack> candidate = std::make_unique<MuPatTrack>(&segInfo1, &segInfo2, track);
123  return candidate;
124  }
125 
126  std::unique_ptr<MuPatTrack> MuPatCandidateTool::createCandidate(std::unique_ptr<Trk::Track>& track) const {
127  // create a dummy segment vector
128  std::vector<MuPatSegment*> segments;
129 
130  // create the new candidate
131  std::unique_ptr<MuPatTrack> candidate = std::make_unique<MuPatTrack>(segments, track);
133  return candidate;
134  }
135 
137  bool recreateMDT, bool recreateCSC, bool createComp) const {
138  MeasVec etaHits{}, phiHits{}, fakePhiHits{}, allHits{};
139 
140  unsigned int nmdtHitsMl1{0}, nmdtHitsMl2{0}, ncscHitsEta{0}, ncscHitsPhi{0}, nrpcHitsEta{0}, nrpcHitsPhi{0}, ntgcHitsEta{0},
141  ntgcHitsPhi{0};
142 
143  entry.clearChambers(); // also clears stations and chamberIds
144 
145  bool hasEndcap{false}, hasSmall{false}, hasLarge{false}, hassloverlap{false}, previssmall{false};
147 
149 
150  // vector to store trigger hits in case we have special treatment for them
151  std::vector<const MuonClusterOnTrack*> triggerHitsPhi;
152  std::vector<const MuonClusterOnTrack*> triggerHitsEta;
153 
154  // loop over hits
155  bool is_first_meas = true;
156  for (const Trk::MeasurementBase* meas : measurements) {
157  Identifier id = m_edmHelperSvc->getIdentifier(*meas);
158  if (!id.is_valid()) {
159  fakePhiHits.push_back(meas);
160  continue;
161  }
162 
163  // skip ID hits
164  if (!m_idHelperSvc->isMuon(id)) continue;
165 
166  Identifier chId = m_idHelperSvc->chamberId(id);
167  MuonStationIndex::ChIndex chIndex = m_idHelperSvc->chamberIndex(chId);
168  MuonStationIndex::StIndex stIndex = m_idHelperSvc->stationIndex(chId);
169  if (!hasEndcap) hasEndcap = m_idHelperSvc->isEndcap(id);
170 
171  bool measuresPhi = false;
172 
173  bool isMdt = m_idHelperSvc->isMdt(id);
174  bool isCsc = m_idHelperSvc->isCsc(id);
175  bool isNSW = m_idHelperSvc->isMM(id) || m_idHelperSvc->issTgc(id);
176  // only add precision hits
177  if (isMdt || isCsc || isNSW) {
178  entry.addChamber(chIndex); // will also add stationIndex
179  entry.chamberIds().insert(chId);
180  }
181  if (isMdt) {
182  // if in MDT recreation mode, recreate MDT using ROT creator. Store the pointer as we have to delete it ourselfs.
183  if (recreateMDT) {
184  if ( !m_doMdtRecreation) {
186  " recreation of MDTs requiered although not configured via jobO, ignoring request. Please check jobO ");
187  } else {
188  const MdtDriftCircleOnTrack* mdt = dynamic_cast<const MdtDriftCircleOnTrack*>(meas);
189  if (!mdt) {
190  ATH_MSG_WARNING(" found MdtDriftCircleOnTrack without MDT identifier " << m_idHelperSvc->toString(id));
191  continue;
192  }
193  ATH_MSG_DEBUG(" recreating MdtDriftCircleOnTrack ");
194  std::unique_ptr<const MdtDriftCircleOnTrack> newMdt{
195  m_mdtRotCreator->createRIO_OnTrack(*mdt->prepRawData(), mdt->globalPosition())};
196  meas = newMdt.get();
197  entry.addToTrash(std::move(newMdt));
198  }
199  }
200 
201  const bool isSmall = m_idHelperSvc->isSmallChamber(id);
202  hasSmall |= isSmall;
203  hasLarge |= !isSmall;
204 
205  if (isSmall != previssmall && !is_first_meas && stIndex == prevstIndex) hassloverlap = true;
206 
207  is_first_meas = false;
208  previssmall = isSmall;
209  prevstIndex = stIndex;
210 
211  unsigned int ml = m_idHelperSvc->mdtIdHelper().multilayer(id);
212  nmdtHitsMl1 += (ml ==1);
213  nmdtHitsMl2 += (ml ==2);
214  } else {
215  measuresPhi = m_idHelperSvc->measuresPhi(id);
216 
217  const bool isRpc = m_idHelperSvc->isRpc(id);
218  const bool isTgc = m_idHelperSvc->isTgc(id);
219  nrpcHitsPhi += (measuresPhi && isRpc);
220  nrpcHitsEta += (!measuresPhi && isRpc);
221 
222  ntgcHitsPhi += (measuresPhi && isTgc);
223  ntgcHitsEta += (!measuresPhi && isTgc);
224 
225  ncscHitsPhi+= (measuresPhi && isCsc);
226  ncscHitsEta+= (!measuresPhi && isCsc);
227  if (isCsc && recreateCSC) {
228  const CscClusterOnTrack* csc = dynamic_cast<const CscClusterOnTrack*>(meas);
229  if (!csc) {
230  ATH_MSG_WARNING(" found CscClusterOnTrack without CSC identifier " << m_idHelperSvc->toString(id));
231  continue;
232  }
233  ATH_MSG_DEBUG(" recreating CscClusterOnTrack ");
234  std::unique_ptr<const MuonClusterOnTrack> newCsc{m_cscRotCreator->createRIO_OnTrack(*csc->prepRawData(), csc->globalPosition())};
235  meas = newCsc.get();
236  entry.addToTrash(std::move(newCsc));
237  }
238 
239 
240  // if selected create competing ROTs for trigger hits
241  if (createComp && (isRpc || isTgc)) {
242  if (measuresPhi && m_createCompetingROTsPhi) {
243  addCluster(*meas, triggerHitsPhi);
244  continue;
245  } else if (!measuresPhi && m_createCompetingROTsEta) {
246  addCluster(*meas, triggerHitsEta);
247  continue;
248  }
249  }
250  }
251 
252  allHits.push_back(meas);
253 
254  if (measuresPhi) {
255  phiHits.push_back(meas);
256  } else {
257  etaHits.push_back(meas);
258  }
259  }
260 
261  if (createComp) {
262  if (m_createCompetingROTsEta && !triggerHitsEta.empty()) createAndAddCompetingROTs(triggerHitsEta, etaHits, allHits, entry);
263  if (m_createCompetingROTsPhi && !triggerHitsPhi.empty()) createAndAddCompetingROTs(triggerHitsPhi, phiHits, allHits, entry);
264  }
265 
266  entry.nmdtHitsMl1 = nmdtHitsMl1;
267  entry.nmdtHitsMl2 = nmdtHitsMl2;
268  entry.ncscHitsEta = ncscHitsEta;
269  entry.ncscHitsPhi = ncscHitsPhi;
270  entry.nrpcHitsEta = nrpcHitsEta;
271  entry.nrpcHitsPhi = nrpcHitsPhi;
272  entry.ntgcHitsEta = ntgcHitsEta;
273  entry.ntgcHitsPhi = ntgcHitsPhi;
274  if (!triggerHitsEta.empty() && etaHits.empty()) ATH_MSG_WARNING("did not find any eta hits");
275  entry.setEtaHits(etaHits);
276  if (!triggerHitsPhi.empty() && phiHits.empty()) ATH_MSG_WARNING("did not find any phi hits");
277  entry.setPhiHits(phiHits);
278  entry.setFakePhiHits(fakePhiHits);
279  entry.setAllHits(allHits);
280  entry.hasEndcap(hasEndcap);
281  entry.hasSmallChamber(hasSmall);
282  entry.hasLargeChamber(hasLarge);
283  entry.hasSLOverlap(hassloverlap);
284  }
285 
286  void MuPatCandidateTool::addCluster(const Trk::MeasurementBase& meas, std::vector<const MuonClusterOnTrack*>& rots) const {
287  const MuonClusterOnTrack* clus = dynamic_cast<const MuonClusterOnTrack*>(&meas);
288  if (clus)
289  rots.push_back(clus);
290  else {
291  const CompetingMuonClustersOnTrack* compclus = dynamic_cast<const CompetingMuonClustersOnTrack*>(&meas);
292  if (compclus) {
293  rots.insert(rots.end(), compclus->containedROTs().begin(), compclus->containedROTs().end());
294  } else {
295  Identifier id = m_edmHelperSvc->getIdentifier(meas);
296  ATH_MSG_WARNING(" Trigger Measurement is not a MuonClusterOnTrack or CompetingMuonClustersOnTrack!! "
297  << m_idHelperSvc->toString(id));
298  }
299  }
300  }
301 
302  void MuPatCandidateTool::createAndAddCompetingROTs(const std::vector<const MuonClusterOnTrack*>& rots,
304  MuPatCandidateBase& trash_bin) const {
305  typedef std::map<Identifier, std::vector<const MuonClusterOnTrack*> > IdClusMap;
306  typedef IdClusMap::iterator IdClusIt;
307  IdClusMap idClusters;
308 
309  // loop over hits and sort by detector element
310  for (const MuonClusterOnTrack* clus : rots) {
311  Identifier id = clus->identify();
312  Identifier detId = m_idHelperSvc->detElId(id);
313  idClusters[detId].push_back(clus);
314  }
315 
316  ATH_MSG_DEBUG(" creating CompetingMuonClustersOnTrack for " << idClusters.size() << " chambers ");
317 
318  IdClusIt chit = idClusters.begin();
319  IdClusIt chit_end = idClusters.end();
320  for (; chit != chit_end; ++chit) {
321  if (msgLvl(MSG::VERBOSE)) {
322  msg(MSG::VERBOSE )<<__FILE__<<":"<<__LINE__ << " in " << m_idHelperSvc->toStringDetEl(chit->first) << " clusters: " << chit->second.size()
323  << std::endl;
324  for (const MuonClusterOnTrack* cl_it : chit->second) {
325  msg(MSG::VERBOSE) << " " << m_idHelperSvc->toString(cl_it->identify());
326 
327  // hack to get correct print-out
328  if (cl_it == chit->second.back())
329  msg(MSG::VERBOSE) << endmsg;
330  else
331  msg(MSG::VERBOSE) << std::endl;
332  }
333  }
334 
335  if (chit->second.empty()) {
336  ATH_MSG_WARNING(" empty list, could not create CompetingMuonClustersOnTrack in chamber "
337  << m_idHelperSvc->toString(chit->first));
338  continue;
339  }
340 
341  // only create competing ROT if there is more than one PRD
342  if (chit->second.size() == 1) {
343  hits.push_back(chit->second.front());
344  allHits.push_back(chit->second.front());
345  continue;
346  }
347 
348  // create list of PRDs
349  std::list<const Trk::PrepRawData*> prds;
350  std::vector<const MuonClusterOnTrack*>::iterator cl_it = chit->second.begin();
351  std::vector<const MuonClusterOnTrack*>::iterator cl_it_end = chit->second.end();
352  for (; cl_it != cl_it_end; ++cl_it) {
353  const Trk::PrepRawData* prd = (*cl_it)->prepRawData();
354  if (prd) {
355  prds.push_back(prd);
356  } else {
357  ATH_MSG_WARNING("MuonClusterOnTrack has no PRD.");
358  }
359  }
360 
361  std::unique_ptr<const CompetingMuonClustersOnTrack> comprot = m_compClusterCreator->createBroadCluster(prds, 0);
362  if (!comprot) {
363  ATH_MSG_WARNING(" could not create CompetingMuonClustersOnTrack in chamber " << m_idHelperSvc->toString(chit->first));
364  continue;
365  }
366  hits.push_back(comprot.get());
367  allHits.push_back(comprot.get());
368 
369  // add to garbage collection
370  trash_bin.addToTrash(std::move(comprot));
371  }
372  }
373 
375  // loop over track and get the chambers on the track
376  const Trk::TrackStates* states = candidate.track().trackStateOnSurfaces();
377  if (!states) return false;
378 
379  std::set<MuonStationIndex::ChIndex> chambers;
380 
381  // loop over TSOSs
382  for (const Trk::TrackStateOnSurface* tsos : *states) {
383  // only look at measurements
384  if (!tsos->type(Trk::TrackStateOnSurface::Measurement) || tsos->type(Trk::TrackStateOnSurface::Outlier)) continue;
385 
386  // check whether state is a measurement
387  const Trk::MeasurementBase* meas = tsos->measurementOnTrack();
388  if (!meas) continue;
389 
390  // get chamber index
391  Identifier id = m_edmHelperSvc->getIdentifier(*meas);
392  if (!id.is_valid() || !m_idHelperSvc->isMuon(id)) continue;
393 
394  // don't include trigger hits
395  if (m_idHelperSvc->isTrigger(id)) continue;
396 
397  chambers.insert(m_idHelperSvc->chamberIndex(id));
398 
399  ATH_MSG_VERBOSE(" in recal " << m_idHelperSvc->toString(id));
400  }
401  if (msgLvl(MSG::VERBOSE)) {
402  ATH_MSG_VERBOSE(" recalculateCandidateSegmentContent, old chambers " << candidate.chambers().size() << " new chambers "
403  << chambers.size());
404  for (const MuonStationIndex::ChIndex& chit : candidate.chambers()) {
405  if (!chambers.count(chit)) { ATH_MSG_VERBOSE(" removing chamber index from candidate " << MuonStationIndex::chName(chit)); }
406  }
407  }
408 
409  // reset chamber content
410  bool bRemovedSegments = candidate.resetChambersOnCandidate(chambers);
411 
412  // recalculate hit list
413  candidate.hitList().clear();
414  m_hitHandler->create(candidate.track(), candidate.hitList());
415  // update the hit summary
416  updateHits(candidate, candidate.track().measurementsOnTrack()->stdcont());
417 
418  ATH_MSG_VERBOSE("Print content after recalculateCandidateSegmentContent() -- "<<m_hitHandler->print(candidate.hitList()));
419 
420  return bRemovedSegments;
421  }
422 
423  std::set<const MuonGM::MuonReadoutElement*> MuPatCandidateTool::readoutElements(const MuPatCandidateBase& entry) const {
424  std::set<const MuonGM::MuonReadoutElement*> roEls;
425 
426  MuPatHitCit it = entry.hitList().begin();
427  MuPatHitCit it_end = entry.hitList().end();
428  for (; it != it_end; ++it) {
429  if (!(*it)->info().id.is_valid()) continue;
430  // only want MDT or CSC detEls
431  if (!m_idHelperSvc->isMdt((*it)->info().id) && !m_idHelperSvc->isCsc((*it)->info().id)) continue;
432 
433  const Trk::MeasurementBase& meas = (*it)->measurement();
434  const Trk::RIO_OnTrack* rot = dynamic_cast<const Trk::RIO_OnTrack*>(&meas);
435  if (!rot) {
436  const CompetingMuonClustersOnTrack* crot = dynamic_cast<const CompetingMuonClustersOnTrack*>(&meas);
437  if (crot) {
438  const std::vector<const MuonClusterOnTrack*>& rots = crot->containedROTs();
439  if (!rots.empty()) rot = rots.front();
440  }
441  }
442  if (rot) {
443  const MuonGM::MuonReadoutElement* roEl = dynamic_cast<const MuonGM::MuonReadoutElement*>(rot->detectorElement());
444  if (roEl) roEls.insert(roEl);
445  }
446  }
447  return roEls;
448  }
449 
450  std::string MuPatCandidateTool::print(const MuPatSegment& segment, int level) const {
451  std::ostringstream oss;
452  oss << segment.name << ": " << m_printer->print(*segment.segment) << " q " << segment.quality;
453  if (level == 0) return oss.str();
454 
455  if (segment.hitList().size() >= 2) {
456  DistanceAlongParameters distCal{};
457  oss << " length " << distCal(segment.hitList().front(), segment.hitList().back());
458  }
459  oss << std::endl << m_hitHandler->print(segment.hitList(), true, false, false);
460  return oss.str();
461  }
462 
463  std::string MuPatCandidateTool::print(const std::vector<MuPatSegment*>& segments, int level) const {
464  std::vector<MuPatSegment*>::const_iterator it = segments.begin();
465  std::vector<MuPatSegment*>::const_iterator it_end = segments.end();
466  std::ostringstream oss;
467  oss << " Segment candidate vector: " << segments.size();
468  for (; it != it_end; ++it) oss << std::endl << print(**it, level);
469 
470  return oss.str();
471  }
472 
473  std::string MuPatCandidateTool::print(const MuPatTrack& track, int level) const {
474  std::ostringstream oss;
475  oss << m_printer->print(track.track()) << std::endl << m_printer->printStations(track.track());
476 
477  if (level == 0) return oss.str();
478 
479  const std::vector<MuPatSegment*>& segs = track.segments();
480  oss << std::endl << print(segs, 0);
481 
482  return oss.str();
483  }
484 
485  std::string MuPatCandidateTool::print(const std::vector<std::unique_ptr<MuPatTrack> >& tracks, int level) const {
486  std::ostringstream oss;
487  oss << "MuPatTracks " << tracks.size() << std::endl;
488  std::vector<std::unique_ptr<MuPatTrack> >::const_iterator tit = tracks.begin();
489  std::vector<std::unique_ptr<MuPatTrack> >::const_iterator tit_end = tracks.end();
490  for (; tit != tit_end; ++tit) oss << " " << print(**tit, level) << std::endl;
491 
492  return oss.str();
493  }
494 
495  std::string MuPatCandidateTool::print(const MuPatCandidateBase& candidate, int level) const {
496  const MuPatSegment* seg = dynamic_cast<const MuPatSegment*>(&candidate);
497  if (seg) return print(*seg, level);
498 
499  const MuPatTrack* track = dynamic_cast<const MuPatTrack*>(&candidate);
500  if (track) return print(*track, level);
501 
502  return "Unknown candidate type";
503  }
504 
505 } // namespace Muon
grepfile.info
info
Definition: grepfile.py:38
Muon::MuonSegmentQuality
Definition: MuonSegmentQuality.h:34
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Muon::MuonStationIndex::chName
static const std::string & chName(ChIndex index)
convert ChIndex into a string
Definition: MuonStationIndex.cxx:157
Muon::MuonStationIndex::StUnknown
@ StUnknown
Definition: MuonStationIndex.h:24
Muon::MuPatCandidateBase::addToTrash
void addToTrash(std::unique_ptr< const Trk::MeasurementBase > meas)
adds the measurement to the garbage container.
Definition: MuPatCandidateBase.cxx:91
Muon::MuPatCandidateTool::print
std::string print(const MuPatSegment &segment, int level=0) const
print the measurements on the track to string
Definition: MuPatCandidateTool.cxx:450
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
TrackParameters.h
MeasurementBase.h
Muon::MuonClusterOnTrack::globalPosition
virtual const Amg::Vector3D & globalPosition() const override
Returns global position.
Definition: MuonClusterOnTrack.cxx:93
Muon::MuPatCandidateBase
track candidate entry object.
Definition: MuPatCandidateBase.h:46
Trk::MagneticFieldProperties
Definition: MagneticFieldProperties.h:31
Muon::MdtDriftCircleOnTrack::prepRawData
virtual const MdtPrepData * prepRawData() const override final
Returns the PrepRawData used to create this corrected measurement.
Definition: MdtDriftCircleOnTrack.h:257
MuPatCandidateTool.h
Trk::Track::trackStateOnSurfaces
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
Muon::MuPatCandidateBase::chambers
const std::set< MuonStationIndex::ChIndex > & chambers() const
returns set with contained chamberIndices
Definition: MuPatCandidateBase.cxx:31
skel.it
it
Definition: skel.GENtoEVGEN.py:396
Muon::MuPatCandidateTool::m_mdtRotCreator
ToolHandle< IMdtDriftCircleOnTrackCreator > m_mdtRotCreator
Definition: MuPatCandidateTool.h:153
CompetingMuonClustersOnTrack.h
Muon::MuPatCandidateTool::m_cscRotCreator
ToolHandle< IMuonClusterOnTrackCreator > m_cscRotCreator
Definition: MuPatCandidateTool.h:155
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
MuPatCandidateBase.h
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
Muon::MuPatCandidateTool::MeasVec
std::vector< const Trk::MeasurementBase * > MeasVec
Definition: MuPatCandidateTool.h:51
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Muon::CompetingMuonClustersOnTrack
Definition: CompetingMuonClustersOnTrack.h:54
MdtDriftCircleOnTrack.h
MuPatHitTool.h
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
Muon::MuPatCandidateTool::m_createCompetingROTsEta
Gaudi::Property< bool > m_createCompetingROTsEta
Definition: MuPatCandidateTool.h:169
Muon::MdtDriftCircleOnTrack::globalPosition
virtual const Amg::Vector3D & globalPosition() const override final
Returns the global Position.
Definition: MdtDriftCircleOnTrack.cxx:108
MuPatSegment.h
MuonTrackMakerStlTools.h
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
Muon::MuPatCandidateTool::m_doCscRecreation
Gaudi::Property< bool > m_doCscRecreation
Definition: MuPatCandidateTool.h:171
Muon::MuPatCandidateTool::createAndAddCompetingROTs
void createAndAddCompetingROTs(const std::vector< const MuonClusterOnTrack * > &rots, MeasVec &hits, MeasVec &allHits, MuPatCandidateBase &entry) const
create CompetingMuonClustersOnTracks from ROTs and add them to the MeasVec.
Definition: MuPatCandidateTool.cxx:302
MuonGM::MuonReadoutElement
Base class for the XxxReadoutElement, with Xxx = Mdt, Rpc, Tgc, Csc.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:40
Trk::TrackStateOnSurface::Outlier
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
Definition: TrackStateOnSurface.h:122
Muon::MuPatCandidateTool::MuPatCandidateTool
MuPatCandidateTool(const std::string &, const std::string &, const IInterface *)
default AlgTool constructor
Definition: MuPatCandidateTool.cxx:34
Track.h
MagneticFieldProperties.h
Muon::MuPatCandidateTool::createSegInfo
std::unique_ptr< MuPatSegment > createSegInfo(const EventContext &ctx, const MuonSegment &segment) const
create a MuPatSegment object from a segment
Definition: MuPatCandidateTool.cxx:58
TileDCSDataPlotter.tit
tit
Definition: TileDCSDataPlotter.py:890
Muon::MuPatTrack::resetChambersOnCandidate
bool resetChambersOnCandidate(const std::set< MuonStationIndex::ChIndex > &chambers)
reset chambers on the candidate.
Definition: MuPatTrack.cxx:239
Muon::MuPatCandidateTool::updateTrack
bool updateTrack(MuPatTrack &candidate, std::unique_ptr< Trk::Track > &track) const
set the new track in the candidate, and update candidate contents.
Definition: MuPatCandidateTool.cxx:113
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
PlotPulseshapeFromCool.can
can
Definition: PlotPulseshapeFromCool.py:91
ResidualPull.h
EventPrimitivesToStringConverter.h
Muon::MuPatCandidateTool::updateHits
void updateHits(MuPatCandidateBase &entry, const MeasVec &measurements, bool recreateMDT=false, bool recreateCSC=false, bool createComp=false) const
update hits for a MuPatCandidateBase
Definition: MuPatCandidateTool.cxx:136
Muon::MuPatHitCit
MuPatHitList::const_iterator MuPatHitCit
Definition: MuPatHit.h:27
beamspotman.n
n
Definition: beamspotman.py:731
SortMuPatHits.h
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
urldecode::states
states
Definition: urldecode.h:39
Muon::MuPatCandidateTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuPatCandidateTool.h:160
CscClusterOnTrack.h
MuPatTrack.h
PseudoMeasurementOnTrack.h
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MuonReadoutElement.h
DataVector< const Trk::TrackStateOnSurface >
Muon::MuPatCandidateTool::initialize
virtual StatusCode initialize() override
initialize method, method taken from bass-class AlgTool
Definition: MuPatCandidateTool.cxx:38
Muon::MuPatCandidateTool::copyCandidate
static std::unique_ptr< MuPatTrack > copyCandidate(MuPatTrack *canIn)
copy a candidate without copying the track (lazy pointer copy)
Definition: MuPatCandidateTool.cxx:100
Muon::MuPatCandidateTool::m_segmentSelector
ToolHandle< Muon::IMuonSegmentSelectionTool > m_segmentSelector
Definition: MuPatCandidateTool.h:165
Trk::PrepRawData
Definition: PrepRawData.h:62
Trk::MeasurementBase
Definition: MeasurementBase.h:58
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
Muon::MuPatCandidateTool::m_compClusterCreator
ToolHandle< IMuonCompetingClustersOnTrackCreator > m_compClusterCreator
Definition: MuPatCandidateTool.h:157
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
Muon::MuPatCandidateTool::m_printer
PublicToolHandle< MuonEDMPrinterTool > m_printer
Definition: MuPatCandidateTool.h:163
Muon::MdtDriftCircleOnTrack
This class represents the corrected MDT measurements, where the corrections include the effects of wi...
Definition: MdtDriftCircleOnTrack.h:37
Muon::MuPatTrack::updateTrack
void updateTrack(std::unique_ptr< Trk::Track > &newTrack)
update track.
Definition: MuPatTrack.cxx:210
Muon::MuPatCandidateTool::m_edmHelperSvc
ServiceHandle< IMuonEDMHelperSvc > m_edmHelperSvc
Definition: MuPatCandidateTool.h:161
Muon::MuPatCandidateTool::m_createCompetingROTsPhi
Gaudi::Property< bool > m_createCompetingROTsPhi
Definition: MuPatCandidateTool.h:168
Muon::CompetingMuonClustersOnTrack::containedROTs
const std::vector< const MuonClusterOnTrack * > & containedROTs() const
returns the vector of SCT_ClusterOnTrack objects .
Definition: CompetingMuonClustersOnTrack.h:184
Muon::MuPatCandidateTool::m_doMdtRecreation
Gaudi::Property< bool > m_doMdtRecreation
Definition: MuPatCandidateTool.h:170
MuonDetectorManager.h
Muon::CscClusterOnTrack::prepRawData
virtual const CscPrepData * prepRawData() const override final
Returns the CscPrepData - is a CscPrepData in this scope.
Definition: CscClusterOnTrack.h:154
Muon::MuPatSegment
segment candidate object.
Definition: MuPatSegment.h:43
Muon::MuPatCandidateTool::readoutElements
std::set< const MuonGM::MuonReadoutElement * > readoutElements(const MuPatCandidateBase &entry) const
get list of the readout elements of the hits on the entry
Definition: MuPatCandidateTool.cxx:423
Trk::Track::measurementsOnTrack
const DataVector< const MeasurementBase > * measurementsOnTrack() const
return a pointer to a vector of MeasurementBase (NOT including any that come from outliers).
Definition: Tracking/TrkEvent/TrkTrack/src/Track.cxx:178
Muon::CscClusterOnTrack
Class to represent the calibrated clusters created from CSC strips.
Definition: CscClusterOnTrack.h:47
Muon::MuPatTrack::track
Trk::Track & track() const
access to track
Definition: MuPatTrack.h:175
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Muon::MuPatCandidateBase::hitList
const MuPatHitList & hitList() const
returns a reference to the hit list
Definition: MuPatCandidateBase.h:108
Muon::MuPatTrack
track candidate object.
Definition: MuPatTrack.h:37
Muon::MuPatCandidateTool::extendWithSegment
bool extendWithSegment(MuPatTrack &can, MuPatSegment &segInfo, std::unique_ptr< Trk::Track > &track) const
extend a track candidate with a segment
Definition: MuPatCandidateTool.cxx:94
Trk::RIO_OnTrack::identify
Identifier identify() const
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:152
Muon::MuPatCandidateTool::createCandidate
std::unique_ptr< MuPatTrack > createCandidate(MuPatSegment &segInfo, std::unique_ptr< Trk::Track > &track) const
create a track candidate from one segment
Definition: MuPatCandidateTool.cxx:106
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
Muon::MuonStationIndex::ChIndex
ChIndex
enum to classify the different chamber layers in the muon spectrometer
Definition: MuonStationIndex.h:15
MuonSegment.h
Muon::MuonStationIndex::StIndex
StIndex
enum to classify the different station layers in the muon spectrometer
Definition: MuonStationIndex.h:23
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
Trk::RIO_OnTrack::detectorElement
virtual const TrkDetElementBase * detectorElement() const =0
returns the detector element, assoicated with the PRD of this class
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
Muon::MuonSegment
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:45
AthAlgTool
Definition: AthAlgTool.h:26
Muon::DistanceAlongParameters
Definition: SortMuPatHits.h:16
Muon::MuPatCandidateTool::recalculateCandidateSegmentContent
bool recalculateCandidateSegmentContent(MuPatTrack &candidate) const
recalculate the chamber indices on the candidate and reset them.
Definition: MuPatCandidateTool.cxx:374
Muon::MuPatCandidateTool::addCluster
void addCluster(const Trk::MeasurementBase &meas, std::vector< const MuonClusterOnTrack * > &rots) const
extract MuonClusterOnTrack('s) from measurement
Definition: MuPatCandidateTool.cxx:286
Trk::TrackStateOnSurface::Measurement
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
Definition: TrackStateOnSurface.h:101
Muon::MuonClusterOnTrack
Base class for Muon cluster RIO_OnTracks.
Definition: MuonClusterOnTrack.h:34
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5
Muon::MuPatCandidateTool::m_hitHandler
ToolHandle< MuPatHitTool > m_hitHandler
Definition: MuPatCandidateTool.h:164
Identifier
Definition: IdentifierFieldParser.cxx:14