ATLAS Offline Software
MuonInsideOutRecoTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
13 #include "xAODTracking/Vertex.h"
14 
15 namespace MuonCombined {
16 
17  MuonInsideOutRecoTool::MuonInsideOutRecoTool(const std::string& type, const std::string& name, const IInterface* parent) :
19  declareInterface<IMuonCombinedInDetExtensionTool>(this);
20  declareInterface<MuonInsideOutRecoTool>(this);
21  }
22 
24  ATH_CHECK(m_idHelperSvc.retrieve());
25  ATH_CHECK(m_edmHelperSvc.retrieve());
26  ATH_CHECK(m_printer.retrieve());
27  ATH_CHECK(m_segmentFinder.retrieve());
28  ATH_CHECK(m_segmentMatchingTool.retrieve());
29  ATH_CHECK(m_ambiguityResolver.retrieve());
31  ATH_CHECK(m_trackFitter.retrieve());
33  // trigger does not use primary vertex
34  ATH_CHECK(m_vertexKey.initialize(!m_vertexKey.empty()));
35  ATH_CHECK(m_trackSummaryTool.retrieve());
36  ATH_CHECK(m_recoValidationTool.retrieve(DisableTool{m_recoValidationTool.empty()}));
37  return StatusCode::SUCCESS;
38  }
39 
41  TrackCollection* combTracks, TrackCollection* meTracks, Trk::SegmentCollection* segments,
42  const EventContext& ctx) const {
43  ATH_MSG_WARNING("This version is deprecated, please use extendWithPRDs for MuGirl");
45  extendWithPRDs(inDetCandidates, tagMap, prdData, combTracks, meTracks, segments, ctx);
46  }
47 
50  TrackCollection* meTracks, Trk::SegmentCollection* segments, const EventContext& ctx) const {
51  ATH_MSG_DEBUG(" extending " << inDetCandidates.size());
52  for (const InDetCandidate* it : inDetCandidates) { handleCandidate(*it, tagMap, prdData, combTracks, meTracks, segments, ctx); }
53  }
54 
57  TrackCollection* meTracks, Trk::SegmentCollection* segColl, const EventContext& ctx) const {
58  if (m_ignoreSiAssocated && indetCandidate.isSiliconAssociated()) {
59  ATH_MSG_DEBUG(" skip silicon associated track for extension ");
60  return;
61  }
62 
63  const xAOD::TrackParticle& indetTrackParticle = indetCandidate.indetTrackParticle();
64  if (!indetTrackParticle.track() || indetTrackParticle.pt() < m_idTrackMinPt) return;
65 
66  // get intersections which precision layers in the muon system
67  const Muon::MuonSystemExtension* muonSystemExtension = indetCandidate.getExtension();
68  if (!muonSystemExtension) {
69  ATH_MSG_VERBOSE("No MuonSystemExtension, aborting ");
70  return;
71  }
72  // fill validation content
73  if (!m_recoValidationTool.empty()) m_recoValidationTool->addTrackParticle(indetTrackParticle, *muonSystemExtension);
74 
75  // loop over intersections, get segments
76  std::vector<Muon::MuonLayerRecoData> allLayers;
77 
78  const std::vector<Muon::MuonSystemExtension::Intersection>& layerIntersections = muonSystemExtension->layerIntersections();
79  ATH_MSG_DEBUG(" ID track: pt " << indetTrackParticle.pt() << " eta " << indetTrackParticle.eta() << " phi "
80  << indetTrackParticle.phi() << " layers " << layerIntersections.size());
81 
82  for (const Muon::MuonSystemExtension::Intersection& layer_intersect : layerIntersections) {
83  // vector to store segments
84  std::vector<std::shared_ptr<const Muon::MuonSegment>> segments;
85 
86  // find segments for intersection
87  Muon::MuonLayerPrepRawData layerPrepRawData;
88  if (!getLayerData(layer_intersect.layerSurface, layerPrepRawData, prdData)) {
89  ATH_MSG_VERBOSE("Failed to get layer data");
90  continue;
91  }
92  m_segmentFinder->find(ctx, layer_intersect, layerPrepRawData, segments);
93  if (segments.empty()) continue;
94 
95  // fill validation content
96  if (!m_recoValidationTool.empty()) {
97  for (const std::shared_ptr<const Muon::MuonSegment>& seg : segments) m_recoValidationTool->add(layer_intersect, *seg, 0);
98  }
99 
100  // match segments to intersection
101  std::vector<std::shared_ptr<const Muon::MuonSegment>> selectedSegments;
102  m_segmentMatchingTool->select(ctx, layer_intersect, segments, selectedSegments);
103  if (selectedSegments.empty()) continue;
104 
105  // fill validation content
106  if (!m_recoValidationTool.empty()) {
107  for (const auto& seg : selectedSegments) m_recoValidationTool->add(layer_intersect, *seg, 1);
108  }
109 
110  // add to total list
111  allLayers.emplace_back(layer_intersect, std::move(selectedSegments));
112  }
113 
114  if (msgLvl(MSG::DEBUG)) {
115  msg(MSG::DEBUG) << " Layers with segments " << allLayers.size();
116  for (auto& layer : allLayers) {
117  for (auto& seg : layer.segments) { msg(MSG::DEBUG) << std::endl << m_printer->print(*seg); }
118  }
119  msg(MSG::DEBUG) << endmsg;
120  }
121 
122  // find best candidate and exit if none found
123  std::pair<std::unique_ptr<const Muon::MuonCandidate>, std::unique_ptr<Trk::Track>> bestCandidate =
124  findBestCandidate(ctx, indetTrackParticle, allLayers);
125  if (!bestCandidate.first) { return; }
126 
127  // add candidate to indet candidate
128  addTag(ctx, indetCandidate, tagMap, *bestCandidate.first, bestCandidate.second, combTracks, meTracks, segColl);
129  }
130 
131  std::pair<std::unique_ptr<const Muon::MuonCandidate>, std::unique_ptr<Trk::Track>> MuonInsideOutRecoTool::findBestCandidate(
132  const EventContext& ctx, const xAOD::TrackParticle& indetTrackParticle,
133  const std::vector<Muon::MuonLayerRecoData>& allLayers) const {
134  // resolve ambiguities
135  std::vector<Muon::MuonCandidate> resolvedCandidates;
136  m_ambiguityResolver->resolveOverlaps(ctx, allLayers, resolvedCandidates);
137 
138  // fit candidates
140  typedef std::pair<std::unique_ptr<Trk::Track>, std::unique_ptr<const Muon::MuonCandidate>> candidatePair;
141  std::vector<candidatePair> trackCandidateLookup;
142  for (Muon::MuonCandidate& candidate : resolvedCandidates) {
143  std::unique_ptr<Trk::Track> track = m_candidateTrackBuilder->buildCombinedTrack(ctx, *indetTrackParticle.track(), candidate);
145  if (!track || !track->isValid() || !track->fitQuality()->numberDoF()) continue;
146 
147  tracks.push_back(track.get());
148  trackCandidateLookup.emplace_back(std::move(track), std::make_unique<Muon::MuonCandidate>(std::move(candidate)));
149  }
150 
151  ATH_MSG_DEBUG("found " << tracks.size() << " combined tracks");
152 
153  // first handle easy cases of zero or one track
154  if (tracks.empty()) return {nullptr, nullptr};
155 
156  Trk::Track* selectedTrack = nullptr;
157  if (tracks.size() == 1) {
158  selectedTrack = tracks.front();
159  } else {
160  // more than 1 track call ambiguity solver and select first track
161  std::unique_ptr<const TrackCollection> resolvedTracks(m_trackAmbiguityResolver->process(&tracks));
162  if (!resolvedTracks || resolvedTracks->empty()) {
163  ATH_MSG_WARNING("Ambiguity resolver returned no tracks. Arbitrarily using the first track of initial collection.");
164  selectedTrack = tracks.front();
165  } else {
166  TrackCollection::iterator it = std::find(tracks.begin(), tracks.end(), resolvedTracks->front());
167  if (it != tracks.end()) {
168  selectedTrack = *it;
169  } else {
170  ATH_MSG_ERROR("Ambiguity resolver returned an unknown track. Arbitrarily using the first track of initial collection.");
171  selectedTrack = tracks.front();
172  }
173  }
174  }
175  // get candidate
177  std::find_if(trackCandidateLookup.begin(), trackCandidateLookup.end(),
178  [selectedTrack](candidatePair& ele) { return ele.first.get() == selectedTrack; });
179 
180  if (look_itr == trackCandidateLookup.end() || !look_itr->second) {
181  ATH_MSG_WARNING("candidate lookup failed, this should not happen");
182  return {nullptr, nullptr};
183  }
184  // generate a track summary for this candidate
185  if (m_trackSummaryTool.isEnabled()) { m_trackSummaryTool->computeAndReplaceTrackSummary(*selectedTrack, false); }
186 
187  return std::make_pair(std::move(look_itr->second), std::move(look_itr->first));
188  }
189 
190  void MuonInsideOutRecoTool::addTag(const EventContext& ctx, const InDetCandidate& indetCandidate, InDetCandidateToTagMap* tagMap,
191  const Muon::MuonCandidate& candidate, std::unique_ptr<Trk::Track>& selectedTrack,
192  TrackCollection* combTracks, TrackCollection* meTracks, Trk::SegmentCollection* segments) const {
193  const xAOD::TrackParticle& idTrackParticle = indetCandidate.indetTrackParticle();
194  Amg::Vector3D origin{0., 0., 0.};
195 
196  const xAOD::Vertex* matchedVertex = nullptr;
197  if (!m_vertexKey.empty()) {
199  if (!vertices.isValid()) {
200  ATH_MSG_WARNING("No vertex container with key = " << m_vertexKey.key() << " found");
201  } else {
202  for (const auto* const vx : *vertices) {
203  for (const auto& tpLink : vx->trackParticleLinks()) {
204  if (*tpLink == &idTrackParticle) {
205  matchedVertex = vx;
206  break;
207  }
208  if (matchedVertex) break;
209  }
210  }
211  }
212  }
213  if (matchedVertex) {
214  origin = Amg::Vector3D{matchedVertex->x(), matchedVertex->y(), matchedVertex->z()};
215  ATH_MSG_DEBUG(" found matched vertex " << origin);
216  } else {
217  origin = Amg::Vector3D{-idTrackParticle.d0() * std::sin(idTrackParticle.phi()) + idTrackParticle.vx(),
218  idTrackParticle.d0() * std::cos(idTrackParticle.phi()) + idTrackParticle.vy(),
219  idTrackParticle.z0() + idTrackParticle.vz()};
220  ATH_MSG_DEBUG(" NO matched vertex take track perigee " << origin);
221  }
222 
223  ATH_MSG_VERBOSE("selectedTrack:");
224  if (msgLevel(MSG::VERBOSE)) {
225  int tsos = 0;
226  for (const Trk::TrackStateOnSurface* it : *selectedTrack->trackStateOnSurfaces()) {
227  ++tsos;
228  if (it->trackParameters()) {
229  ATH_MSG_VERBOSE("check tsos " << tsos << " r " << it->trackParameters()->position().perp() << " z "
230  << it->trackParameters()->position().z() << " p "
231  << it->trackParameters()->momentum().mag());
232  }
233  }
234  }
235 
236  std::vector<const Muon::MuonSegment*> segLinks;
237  for (const Muon::MuonLayerIntersection& layer : candidate.layerIntersections) {
238  std::unique_ptr<Muon::MuonSegment> copy = std::make_unique<Muon::MuonSegment>(*layer.segment);
239  segLinks.push_back(copy.get());
240  segments->push_back(std::move(copy));
241  }
243  //cppcheck-suppress invalidLifetime
244  std::sort(segLinks.begin(), segLinks.end(), [this](const Muon::MuonSegment* seg_a, const Muon::MuonSegment* seg_b) -> bool {
245  using chamIdx = Muon::MuonStationIndex::ChIndex;
246  chamIdx ch_a = m_idHelperSvc->chamberIndex(m_edmHelperSvc->chamberId(*seg_a));
247  chamIdx ch_b = m_idHelperSvc->chamberIndex(m_edmHelperSvc->chamberId(*seg_b));
248  Muon::MuonStationIndex::StIndex st_a = Muon::MuonStationIndex::toStationIndex(ch_a);
249  Muon::MuonStationIndex::StIndex st_b = Muon::MuonStationIndex::toStationIndex(ch_b);
250  if (st_a != st_b) return st_a < st_b;
252  if (ch_a == chamIdx::CSL || ch_a == chamIdx::CSS || ch_b == chamIdx::CSS || ch_b == chamIdx::CSL)
253  return (ch_a == chamIdx::CSL) + 2 * (ch_a == chamIdx::CSS) > (ch_b == chamIdx::CSL) + 2 * (ch_b == chamIdx::CSS);
254  return ch_a < ch_b;
255  });
256 
257  if (msgLevel(MSG::DEBUG)) {
258  std::stringstream sstr;
259  for (const Muon::MuonSegment* muo_seg : segLinks) {
260  auto chIdx = m_idHelperSvc->chamberIndex(m_edmHelperSvc->chamberId(*muo_seg));
261  auto thIdx = m_idHelperSvc->technologyIndex(m_edmHelperSvc->chamberId(*muo_seg));
262  sstr << Muon::MuonStationIndex::chName(chIdx) << " (" << Muon::MuonStationIndex::technologyName(thIdx) << "), ";
263  }
264  ATH_MSG_DEBUG("Selected segments " << segLinks.size() << " " << sstr.str());
265  }
266 
267  // perform standalone refit
268  std::unique_ptr<Trk::Track> standaloneRefit{m_trackFitter->standaloneRefit(ctx, *selectedTrack, origin)};
269 
270  combTracks->push_back(std::move(selectedTrack));
271  ElementLink<TrackCollection> comblink(*combTracks, combTracks->size() - 1);
272 
273  // create tag and set SA refit
274  MuGirlTag* tag = new MuGirlTag(comblink, segLinks);
275  if (standaloneRefit) {
276  meTracks->push_back(std::move(standaloneRefit));
277  ElementLink<TrackCollection> melink(*meTracks, meTracks->size() - 1);
278  tag->setUpdatedExtrapolatedTrack(melink);
279  }
280 
281  // add tag to IndetCandidateToTagMap
282  tagMap->addEntry(&indetCandidate, tag);
283  }
284 
287  // get technologies in the given layer
289  std::vector<Muon::MuonStationIndex::TechnologyIndex> technologiesInStation =
291  if (msgLevel(MSG::DEBUG)) {
292  std::string techString;
293  for (const Muon::MuonStationIndex::TechnologyIndex& tech : technologiesInStation)
294  techString += " " + Muon::MuonStationIndex::technologyName(tech);
295  ATH_MSG_DEBUG("getLayerData: sector " << surf.sector << " " << Muon::MuonStationIndex::regionName(surf.regionIndex) << " "
296  << Muon::MuonStationIndex::layerName(surf.layerIndex) << " technologies " << techString);
297  }
298 
299  bool isok{false};
300  // loop over technologies and get data
301  for (const Muon::MuonStationIndex::TechnologyIndex& it : technologiesInStation) {
302  // get collections, keep track of failures
304  isok |= getLayerDataTech<Muon::MdtPrepData>(it, surf, prdData.mdtPrds, layerPrepRawData.mdts);
305 
306  else if (it == Muon::MuonStationIndex::RPC)
307  isok |= getLayerDataTech<Muon::RpcPrepData>(it, surf, prdData.rpcPrds, layerPrepRawData.rpcs);
308 
309  else if (it == Muon::MuonStationIndex::TGC)
310  isok |= getLayerDataTech<Muon::TgcPrepData>(it, surf, prdData.tgcPrds, layerPrepRawData.tgcs);
311 
312  else if (it == Muon::MuonStationIndex::CSCI)
313  isok |= getLayerDataTech<Muon::CscPrepData>(it, surf, prdData.cscPrds, layerPrepRawData.cscs);
314 
315  else if (it == Muon::MuonStationIndex::STGC)
316  isok |= getLayerDataTech<Muon::sTgcPrepData>(it, surf, prdData.stgcPrds, layerPrepRawData.stgcs);
317 
318  else if (it == Muon::MuonStationIndex::MM)
319  isok |= getLayerDataTech<Muon::MMPrepData>(it, surf, prdData.mmPrds, layerPrepRawData.mms);
320  }
321 
322  if (msgLvl(MSG::DEBUG)) {
323  msg(MSG::DEBUG) << " Got data: sector " << surf.sector << " " << Muon::MuonStationIndex::regionName(surf.regionIndex) << " "
325  if (!layerPrepRawData.mdts.empty()) msg(MSG::DEBUG) << " MDTs " << layerPrepRawData.mdts.size();
326  if (!layerPrepRawData.rpcs.empty()) msg(MSG::DEBUG) << " RPCs " << layerPrepRawData.rpcs.size();
327  if (!layerPrepRawData.tgcs.empty()) msg(MSG::DEBUG) << " TGCs " << layerPrepRawData.tgcs.size();
328  if (!layerPrepRawData.cscs.empty()) msg(MSG::DEBUG) << " CSCs " << layerPrepRawData.cscs.size();
329  if (!layerPrepRawData.stgcs.empty()) msg(MSG::DEBUG) << " STGCs " << layerPrepRawData.stgcs.size();
330  if (!layerPrepRawData.mms.empty()) msg(MSG::DEBUG) << " MMs " << layerPrepRawData.mms.size();
331  msg(MSG::DEBUG) << endmsg;
332  }
333  return isok;
334  }
335 
336  template <class COL>
339  std::vector<const Muon::MuonPrepDataCollection<COL>*>& output) const {
340  if (!input || input->size() == 0) return false;
341  // get technologies in the given layer
342  unsigned int sectorLayerHash = Muon::MuonStationIndex::sectorLayerHash(surf.regionIndex, surf.layerIndex);
343 
344  // get hashes
345  const Muon::MuonLayerHashProviderTool::HashVec hashes = m_layerHashProvider->getHashes(surf.sector, technology, sectorLayerHash);
346 
347  // skip empty inputs
348  if (hashes.empty()) return false;
349 
350  // loop over hashes
351  for (Muon::MuonLayerHashProviderTool::HashVec::const_iterator it = hashes.begin(); it != hashes.end(); ++it) {
352  // skip if not found
353  const auto* colIt = input->indexFindPtr(*it);
354  if (!colIt) { continue; }
355  ATH_MSG_VERBOSE(" adding " << m_idHelperSvc->toStringChamber(colIt->identify()) << " size " << colIt->size());
356  // else add
357  output.push_back(colIt);
358  }
359  return output.size();
360  }
361 } // namespace MuonCombined
python.root_lsr_rank.hashes
hashes
Definition: root_lsr_rank.py: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::MuonCandidate
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonLayerEvent/MuonLayerEvent/MuonCandidate.h:14
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:73
MuonCombined::MuonInsideOutRecoTool::m_ignoreSiAssocated
Gaudi::Property< bool > m_ignoreSiAssocated
Definition: MuonInsideOutRecoTool.h:112
xAOD::Vertex_v1::x
float x() const
Returns the x position.
Muon::MuonStationIndex::toStationIndex
static StIndex toStationIndex(ChIndex index)
convert ChIndex into StIndex
Definition: MuonStationIndex.cxx:43
Muon::MuonPrepDataContainer
Template for Muon PRD containers (which are basically collections of MuonPrepDataCollections).
Definition: MuonPrepDataContainer.h:42
MuonCombined::InDetCandidate::getExtension
const Muon::MuonSystemExtension * getExtension() const
Definition: InDetCandidate.cxx:46
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
xAOD::TrackParticle_v1::vx
float vx() const
The x origin for the parameters.
Muon::MuonLayerSurface::layerIndex
MuonStationIndex::LayerIndex layerIndex
Definition: MuonLayerSurface.h:30
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
MuonCombined::InDetCandidateToTagMap
Definition: InDetCandidateToTagMap.h:15
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
Trk::Track::trackStateOnSurfaces
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TrackParticle_v1.cxx:77
MuonCombined::MuonInsideOutRecoTool::m_ambiguityResolver
ToolHandle< Muon::IMuonLayerAmbiguitySolverTool > m_ambiguityResolver
Definition: MuonInsideOutRecoTool.h:98
xAOD::TrackParticle_v1::vz
float vz() const
The z origin for the parameters.
Muon::MuonStationIndex::sectorLayerHash
static unsigned int sectorLayerHash(DetectorRegionIndex detectorRegionIndex, LayerIndex layerIndex)
create a hash out of region and layer
Definition: MuonStationIndex.cxx:226
skel.it
it
Definition: skel.GENtoEVGEN.py:423
xAOD::TrackParticle_v1::z0
float z0() const
Returns the parameter.
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
MuonCombined::InDetCandidate
Definition: InDetCandidate.h:18
Muon::MuonLayerPrepRawData::tgcs
std::vector< const TgcPrepDataCollection * > tgcs
Definition: MuonLayerPrepRawData.h:25
Muon::MuonLayerPrepRawData
Struct to hold all PrepRawData collections in a given layer.
Definition: MuonLayerPrepRawData.h:22
MuonCombined::MuonInsideOutRecoTool::extendWithPRDs
virtual void extendWithPRDs(const InDetCandidateCollection &inDetCandidates, InDetCandidateToTagMap *tagMap, IMuonCombinedInDetExtensionTool::MuonPrdData prdData, TrackCollection *combTracks, TrackCollection *meTracks, Trk::SegmentCollection *segments, const EventContext &ctx) const override
IMuonCombinedInDetExtensionTool interface: extend ID candidate with PRDs for segment-finding.
Definition: MuonInsideOutRecoTool.cxx:48
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Muon::MuonStationIndex::MM
@ MM
Definition: MuonStationIndex.h:56
MuonCombined::MuonInsideOutRecoTool::m_segmentMatchingTool
ToolHandle< Muon::IMuonLayerSegmentMatchingTool > m_segmentMatchingTool
Definition: MuonInsideOutRecoTool.h:96
Muon::MuonLayerSurface::regionIndex
MuonStationIndex::DetectorRegionIndex regionIndex
Definition: MuonLayerSurface.h:29
MuonCombined::MuonInsideOutRecoTool::m_printer
ToolHandle< Muon::MuonEDMPrinterTool > m_printer
Definition: MuonInsideOutRecoTool.h:93
xAOD::TrackParticle_v1::d0
float d0() const
Returns the parameter.
Muon::MuonLayerPrepRawData::stgcs
std::vector< const sTgcPrepDataCollection * > stgcs
Definition: MuonLayerPrepRawData.h:27
MuonCombined::MuonInsideOutRecoTool::handleCandidate
void handleCandidate(const InDetCandidate &inDetCandidate, InDetCandidateToTagMap *tagMap, const IMuonCombinedInDetExtensionTool::MuonPrdData &prdData, TrackCollection *combTracks, TrackCollection *meTracks, Trk::SegmentCollection *segments, const EventContext &ctx) const
handle a single candidate
Definition: MuonInsideOutRecoTool.cxx:55
MuonCombined::MuonInsideOutRecoTool::m_segmentFinder
ToolHandle< Muon::IMuonLayerSegmentFinderTool > m_segmentFinder
Definition: MuonInsideOutRecoTool.h:94
MuonCombined::InDetCandidateToTagMap::addEntry
void addEntry(const InDetCandidate *idcand, TagBase *tag)
Definition: InDetCandidateToTagMap.cxx:8
Muon::MuonStationIndex::regionName
static const std::string & regionName(DetectorRegionIndex index)
convert DetectorRegionIndex into a string
Definition: MuonStationIndex.cxx:176
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
MuonCombined::IMuonCombinedInDetExtensionTool::MuonPrdData::cscPrds
const Muon::CscPrepDataContainer * cscPrds
Definition: IMuonCombinedInDetExtensionTool.h:32
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
MuonCombined::MuonInsideOutRecoTool::m_recoValidationTool
ToolHandle< Muon::IMuonRecoValidationTool > m_recoValidationTool
Definition: MuonInsideOutRecoTool.h:109
MuonCombined::MuonInsideOutRecoTool::m_trackFitter
ToolHandle< Rec::ICombinedMuonTrackBuilder > m_trackFitter
Definition: MuonInsideOutRecoTool.h:102
Muon::MuonLayerPrepRawData::mdts
std::vector< const MdtPrepDataCollection * > mdts
Definition: MuonLayerPrepRawData.h:23
Muon::MuonStationIndex::STGC
@ STGC
Definition: MuonStationIndex.h:56
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
MuonCombined::MuonInsideOutRecoTool::getLayerData
bool getLayerData(const Muon::MuonLayerSurface &surf, Muon::MuonLayerPrepRawData &layerPrepRawData, IMuonCombinedInDetExtensionTool::MuonPrdData prdData) const
access data in layer
Definition: MuonInsideOutRecoTool.cxx:285
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Muon::MuonLayerSurface
types
Definition: MuonLayerSurface.h:15
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
MuonCombined::MuonInsideOutRecoTool::findBestCandidate
std::pair< std::unique_ptr< const Muon::MuonCandidate >, std::unique_ptr< Trk::Track > > findBestCandidate(const EventContext &ctx, const xAOD::TrackParticle &indetTrackParticle, const std::vector< Muon::MuonLayerRecoData > &allLayers) const
find the best candidate for a given set of segments
Definition: MuonInsideOutRecoTool.cxx:131
MuonCombined::MuonInsideOutRecoTool::m_idTrackMinPt
Gaudi::Property< double > m_idTrackMinPt
Definition: MuonInsideOutRecoTool.h:111
Muon::MuonSystemExtension
Tracking class to hold the extrapolation from a particle from the calo entry to the end of muon syste...
Definition: MuonSystemExtension.h:18
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
DataVector::front
const T * front() const
Access the first element in the collection as an rvalue.
Muon::MuonStationIndexHelpers::technologiesInStation
static std::vector< MuonStationIndex::TechnologyIndex > technologiesInStation(MuonStationIndex::StIndex stIndex)
get techonolgies in
Definition: MuonStationIndexHelpers.cxx:9
test_pyathena.parent
parent
Definition: test_pyathena.py:15
MuonCombined::MuonInsideOutRecoTool::m_edmHelperSvc
ServiceHandle< Muon::IMuonEDMHelperSvc > m_edmHelperSvc
Definition: MuonInsideOutRecoTool.h:91
MuonCombined::MuonInsideOutRecoTool::m_vertexKey
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexKey
Definition: MuonInsideOutRecoTool.h:115
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Muon::MuonStationIndex::layerName
static const std::string & layerName(LayerIndex index)
convert LayerIndex into a string
Definition: MuonStationIndex.cxx:192
xAOD::Vertex_v1::z
float z() const
Returns the z position.
Muon::MuonStationIndex::CSCI
@ CSCI
Definition: MuonStationIndex.h:56
MuonCombined::MuonInsideOutRecoTool::addTag
void addTag(const EventContext &ctx, const InDetCandidate &indetCandidate, InDetCandidateToTagMap *tagMap, const Muon::MuonCandidate &candidate, std::unique_ptr< Trk::Track > &selectedTrack, TrackCollection *combTracks, TrackCollection *meTracks, Trk::SegmentCollection *segments) const
add muon candidate to indet candidate
Definition: MuonInsideOutRecoTool.cxx:190
Muon::MuonPrepDataCollection
Template to hold collections of MuonPrepRawData objects.
Definition: MuonPrepDataCollection.h:46
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
Vertex.h
python.compareTCTs.isok
isok
Definition: compareTCTs.py:350
MuonStationIndexHelpers.h
merge.output
output
Definition: merge.py:17
MuonSystemExtension.h
xAOD::TrackParticle_v1::vy
float vy() const
The y origin for the parameters.
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
MuonCombined::MuonInsideOutRecoTool::getLayerDataTech
bool getLayerDataTech(Muon::MuonStationIndex::TechnologyIndex technology, const Muon::MuonLayerSurface &surf, const Muon::MuonPrepDataContainerT< COL > *input, std::vector< const Muon::MuonPrepDataCollection< COL > * > &output) const
access data in layer for a given technology
Definition: MuonInsideOutRecoTool.cxx:337
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonCombined::MuonInsideOutRecoTool::MuonInsideOutRecoTool
MuonInsideOutRecoTool(const std::string &type, const std::string &name, const IInterface *parent)
Default AlgTool functions.
Definition: MuonInsideOutRecoTool.cxx:17
Muon::MuonLayerSurface::sector
int sector
Definition: MuonLayerSurface.h:28
Muon::MuonLayerPrepRawData::cscs
std::vector< const CscPrepDataCollection * > cscs
Definition: MuonLayerPrepRawData.h:26
MuonCombined::MuonInsideOutRecoTool::m_candidateTrackBuilder
ToolHandle< Muon::IMuonCandidateTrackBuilderTool > m_candidateTrackBuilder
Definition: MuonInsideOutRecoTool.h:100
MuonCombined::MuGirlTag
TagBase implementation for a combined fit.
Definition: MuGirlTag.h:23
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
MuonCombined::MuonInsideOutRecoTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonInsideOutRecoTool.h:90
Muon::MuonStationIndex::MDT
@ MDT
Definition: MuonStationIndex.h:56
MuonCombined::InDetCandidate::indetTrackParticle
const xAOD::TrackParticle & indetTrackParticle() const
access TrackParticle
Definition: InDetCandidate.cxx:27
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
MuonCombined::InDetCandidate::isSiliconAssociated
bool isSiliconAssociated() const
Returns true if this candidate was formed from a special far forward InDet track.
Definition: InDetCandidate.cxx:35
Muon::MuonLayerHashProviderTool::HashVec
std::vector< IdentifierHash > HashVec
define data structure
Definition: MuonLayerHashProviderTool.h:27
MuonCombined::MuonInsideOutRecoTool::m_layerHashProvider
ToolHandle< Muon::MuonLayerHashProviderTool > m_layerHashProvider
Definition: MuonInsideOutRecoTool.h:106
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
MuonCombined::MuonInsideOutRecoTool::initialize
virtual StatusCode initialize() override
Definition: MuonInsideOutRecoTool.cxx:23
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MuonCombined
The MuonTagToSegMap is an auxillary construct that links the MuonSegments associated with a combined ...
Definition: IMuonSystemExtensionTool.h:23
Muon::MuonLayerPrepRawData::rpcs
std::vector< const RpcPrepDataCollection * > rpcs
Definition: MuonLayerPrepRawData.h:24
MuonCandidate.h
DEBUG
#define DEBUG
Definition: page_access.h:11
Muon::MuonStationIndex::TGC
@ TGC
Definition: MuonStationIndex.h:56
xAOD::Vertex_v1::y
float y() const
Returns the y position.
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
MuonCombined::MuonInsideOutRecoTool::m_trackAmbiguityResolver
ToolHandle< Trk::ITrackAmbiguityProcessorTool > m_trackAmbiguityResolver
Definition: MuonInsideOutRecoTool.h:104
MuonCombined::MuonInsideOutRecoTool::m_trackSummaryTool
ToolHandle< Trk::IExtendedTrackSummaryTool > m_trackSummaryTool
Definition: MuonInsideOutRecoTool.h:108
Muon::MuonStationIndex::RPC
@ RPC
Definition: MuonStationIndex.h:56
Muon::MuonSystemExtension::layerIntersections
const std::vector< Intersection > & layerIntersections() const
access to the intersections with the layers.
Definition: MuonSystemExtension.h:62
Muon::MuonLayerPrepRawData::mms
std::vector< const MMPrepDataCollection * > mms
Definition: MuonLayerPrepRawData.h:28
MuonSegment.h
Muon::MuonStationIndex::StIndex
StIndex
enum to classify the different station layers in the muon spectrometer
Definition: MuonStationIndex.h:23
Muon::MuonSystemExtension::Intersection
data per intersection
Definition: MuonSystemExtension.h:21
MuonLayerPrepRawData.h
MuonCombined::IMuonCombinedInDetExtensionTool::MuonPrdData::rpcPrds
const Muon::RpcPrepDataContainer * rpcPrds
Definition: IMuonCombinedInDetExtensionTool.h:30
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
calibdata.copy
bool copy
Definition: calibdata.py:27
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
MuGirlTag.h
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
xAOD::TrackParticle_v1::track
const Trk::Track * track() const
Returns a pointer (which can be NULL) to the Trk::Track which was used to make this TrackParticle.
Definition: TrackParticle_v1.cxx:805
MuonCombined::IMuonCombinedInDetExtensionTool::MuonPrdData
Definition: IMuonCombinedInDetExtensionTool.h:27
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
Muon::MuonSegment
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:45
MuonCombined::IMuonCombinedInDetExtensionTool::MuonPrdData::tgcPrds
const Muon::TgcPrepDataContainer * tgcPrds
Definition: IMuonCombinedInDetExtensionTool.h:31
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
AthAlgTool
Definition: AthAlgTool.h:26
MuonCombined::IMuonCombinedInDetExtensionTool::MuonPrdData::mmPrds
const Muon::MMPrepDataContainer * mmPrds
Definition: IMuonCombinedInDetExtensionTool.h:34
MuonCombined::MuonInsideOutRecoTool::extend
virtual void extend(const InDetCandidateCollection &inDetCandidates, InDetCandidateToTagMap *tagMap, TrackCollection *combTracks, TrackCollection *meTracks, Trk::SegmentCollection *segments, const EventContext &ctx) const override
IMuonCombinedInDetExtensionTool interface: deprecated.
Definition: MuonInsideOutRecoTool.cxx:40
MuonInsideOutRecoTool.h
Muon::MuonStationIndex::TechnologyIndex
TechnologyIndex
enum to classify the different layers in the muon spectrometer
Definition: MuonStationIndex.h:54
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
MuonCombined::IMuonCombinedInDetExtensionTool::MuonPrdData::stgcPrds
const Muon::sTgcPrepDataContainer * stgcPrds
Definition: IMuonCombinedInDetExtensionTool.h:33
Muon::MuonCandidate::layerIntersections
std::vector< MuonLayerIntersection > layerIntersections
MuonLayerIntersections.
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonLayerEvent/MuonLayerEvent/MuonCandidate.h:20
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
Muon::MuonLayerIntersection
Definition: MuonLayerIntersection.h:13
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
xAOD::TrackParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
MuonCombined::IMuonCombinedInDetExtensionTool::MuonPrdData::mdtPrds
const Muon::MdtPrepDataContainer * mdtPrds
Definition: IMuonCombinedInDetExtensionTool.h:29
Muon::MuonStationIndex::technologyName
static const std::string & technologyName(TechnologyIndex index)
convert LayerIndex into a string
Definition: MuonStationIndex.cxx:209