ATLAS Offline Software
MuonSeededSegmentFinder.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 
7 #include <iostream>
8 
17 #include "TrkRoad/TrackRoad.h"
20 
21 namespace Muon {
22 
23  MuonSeededSegmentFinder::MuonSeededSegmentFinder(const std::string& ty, const std::string& na, const IInterface* pa) :
24  AthAlgTool(ty, na, pa), m_magFieldProperties(Trk::NoField) {
25  declareInterface<IMuonSeededSegmentFinder>(this);
26  }
27 
30  ATH_CHECK(m_segMaker.retrieve());
31  ATH_CHECK(m_segMakerNoHoles.retrieve());
32  ATH_CHECK(m_propagator.retrieve());
33  ATH_CHECK(m_mdtRotCreator.retrieve());
34  ATH_CHECK(m_idHelperSvc.retrieve());
35  ATH_CHECK(m_printer.retrieve());
36 
37  ATH_CHECK(m_key_mdt.initialize());
38  ATH_CHECK(m_key_csc.initialize(!m_key_csc.empty())); // check for layouts without CSCs
39  ATH_CHECK(m_key_tgc.initialize());
40  ATH_CHECK(m_key_rpc.initialize());
41  ATH_CHECK(m_key_stgc.initialize(!m_key_stgc.empty())); // check for layouts without STGCs
42  ATH_CHECK(m_key_mm.initialize(!m_key_mm.empty())); // check for layouts without MicroMegas
43 
44  return StatusCode::SUCCESS;
45  }
46 
47  std::unique_ptr<Trk::SegmentCollection> MuonSeededSegmentFinder::find(const EventContext& ctx, const Trk::TrackParameters& pars,
48  const std::set<Identifier>& chIds) const {
49  // get MdtPrepData collections correspondign to the chamber Identifiers
50  std::vector<const MdtPrepData*> mdtPrds = extractPrds(ctx, chIds);
51 
52  if (mdtPrds.empty()) {
53  ATH_MSG_DEBUG(" no MdtPrepData found ");
54  return {};
55  }
56 
57  // find segments
58  return find(ctx, pars, mdtPrds);
59  }
60 
61  std::unique_ptr<Trk::SegmentCollection> MuonSeededSegmentFinder::find(const EventContext& ctx, const Trk::TrackParameters& pars,
62  const std::set<IdentifierHash>& chIdHs) const {
63  // get MdtPrepData collections correspondign to the chamber Identifiers
64  std::vector<const MdtPrepData*> mdtPrds = extractPrds(ctx, chIdHs);
65 
66  if (mdtPrds.empty()) {
67  ATH_MSG_DEBUG(" no MdtPrepData found ");
68  return {};
69  }
70 
71  // find segments
72  return find(ctx, pars, mdtPrds);
73  }
74 
75  std::unique_ptr<Trk::SegmentCollection> MuonSeededSegmentFinder::find(const EventContext& ctx, const Trk::TrackParameters& pars,
76  const std::vector<const MdtPrepData*>& mdtPrds) const {
77  // are we close to the chamber edge?
78  bool doHoleSearch = true;
79 
80  // select and calibrate the MdtPrepData
81  std::vector<const MdtDriftCircleOnTrack*> mdtROTs;
82  mdtROTs.reserve(mdtPrds.size());
83  selectAndCalibrate(ctx, pars, mdtPrds, mdtROTs, doHoleSearch);
84 
85  if (mdtROTs.empty()) {
86  ATH_MSG_DEBUG(" no MdtDriftCircles selected ");
87  return nullptr;
88  }
89 
90  // create track road
91  double roadWidthEta = 1.;
92  if (pars.covariance()) {
93  double trackError = Amg::error(*pars.covariance(), Trk::theta);
94  ATH_MSG_DEBUG(" local track Error on theta " << trackError);
95  if (trackError < 0.2) trackError = 0.2;
96  roadWidthEta = 5. * trackError;
97  }
98  Trk::TrackRoad road(pars.position(), pars.momentum(), roadWidthEta, 1.);
99 
100  // create dummy vector<vector>
101  std::vector<std::vector<const MdtDriftCircleOnTrack*> > mdtROTsVec;
102  mdtROTsVec.push_back(mdtROTs);
103  std::vector<std::vector<const MuonClusterOnTrack*> > clusterROTsVec;
104 
105  // call segment finder
106  std::unique_ptr<Trk::SegmentCollection> segments(new Trk::SegmentCollection());
107  doHoleSearch ? m_segMaker->find(road, mdtROTsVec, clusterROTsVec, segments.get(), true)
108  : m_segMakerNoHoles->find(road, mdtROTsVec, clusterROTsVec, segments.get(), true);
109 
110  // delete ROTs
111  std::for_each(mdtROTs.begin(), mdtROTs.end(), MuonDeleteObject<const MdtDriftCircleOnTrack>());
112 
113  if (!segments) {
114  ATH_MSG_DEBUG(" No segments found ");
115  } else {
116  ATH_MSG_DEBUG(" Number of segments found: " << segments->size());
117  }
118 
119  return segments;
120  }
121 
122  std::vector<const MdtPrepData*> MuonSeededSegmentFinder::extractPrds(const EventContext& ctx, const std::set<Identifier>& chIds) const {
124  const MuonGM::MuonDetectorManager* MuonDetMgr{*DetectorManagerHandle};
125  if (MuonDetMgr == nullptr) {
126  ATH_MSG_ERROR("Null pointer to the read MuonDetectorManager conditions object");
127  // return;
128  }
129 
130  // set of IdHashes corresponding to these identifiers
131  std::set<IdentifierHash> chIdHs;
132 
133  // loop over chambers and get collections
134  std::set<Identifier>::const_iterator chit = chIds.begin();
135  std::set<Identifier>::const_iterator chit_end = chIds.end();
136  for (; chit != chit_end; ++chit) {
137  if (!m_idHelperSvc->isMdt(*chit)) {
138  ATH_MSG_WARNING(" Requested chamber is not an MDT: " << m_idHelperSvc->toStringChamber(*chit));
139  continue;
140  }
141 
142  const MuonGM::MdtReadoutElement* detEl = MuonDetMgr->getMdtReadoutElement(*chit);
143  if (!detEl) {
144  ATH_MSG_WARNING(" Requested chamber does not exist in geometry: " << m_idHelperSvc->toStringChamber(*chit));
145  continue;
146  }
147  chIdHs.insert(detEl->identifyHash());
148  }
149 
150  // vector to store pointers to collections
151  std::vector<const MdtPrepData*> mdtPrds = extractPrds(ctx, chIdHs);
152 
153  return mdtPrds;
154  }
155 
156  std::vector<const MdtPrepData*> MuonSeededSegmentFinder::extractPrds(const EventContext& ctx,
157  const std::set<IdentifierHash>& chIdHs) const {
159  const Muon::MdtPrepDataContainer* mdtPrdContainer;
160  if (h_mdtPrdCont.isValid()) {
161  mdtPrdContainer = h_mdtPrdCont.cptr();
162  } else {
163  ATH_MSG_WARNING("Cannot retrieve mdtPrepDataContainer " << m_key_mdt.key());
164  return {};
165  }
166 
167  // vector to store pointers to collections
168  std::vector<const MdtPrepData*> mdtPrds;
169 
170  // loop over chambers and get collections
171  std::set<IdentifierHash>::const_iterator chit = chIdHs.begin();
172  std::set<IdentifierHash>::const_iterator chit_end = chIdHs.end();
173  for (; chit != chit_end; ++chit) {
174  const auto* collptr = mdtPrdContainer->indexFindPtr(*chit);
175  if (collptr == nullptr) { continue; }
176 
177  // reserve space for the new PRDs
178  mdtPrds.insert(mdtPrds.end(), collptr->begin(), collptr->end());
179  }
180 
181  return mdtPrds;
182  }
183 
184  void MuonSeededSegmentFinder::extractMdtPrdCols(const EventContext& ctx, const std::set<IdentifierHash>& chIdHs,
185  std::vector<const MdtPrepDataCollection*>& target) const {
187  const Muon::MdtPrepDataContainer* mdtPrdContainer;
188  if (h_mdtPrdCont.isValid()) {
189  mdtPrdContainer = h_mdtPrdCont.cptr();
190  } else {
191  ATH_MSG_WARNING("Cannot retrieve mdtPrepDataContainer " << m_key_mdt.key());
192  return;
193  }
194  if (mdtPrdContainer->empty()) return;
195 
196  // loop over chambers and get collections
197  std::set<IdentifierHash>::const_iterator chit = chIdHs.begin();
198  std::set<IdentifierHash>::const_iterator chit_end = chIdHs.end();
199  for (; chit != chit_end; ++chit) {
200  const auto* collptr = mdtPrdContainer->indexFindPtr(*chit);
201  if (collptr == nullptr || collptr->empty()) { continue; }
202  ATH_MSG_DEBUG(" Adding for: " << m_idHelperSvc->toStringChamber(collptr->front()->identify()) << " size "
203  << collptr->size());
204 
205  // reserve space for the new PRDs
206  target.push_back(collptr);
207  }
208  }
209 
210  void MuonSeededSegmentFinder::extractRpcPrdCols(const EventContext& ctx, const std::set<IdentifierHash>& chIdHs,
211  std::vector<const RpcPrepDataCollection*>& target) const {
213  const Muon::RpcPrepDataContainer* rpcPrdContainer;
214  if (h_rpcPrdCont.isValid()) {
215  rpcPrdContainer = h_rpcPrdCont.cptr();
216  } else {
217  ATH_MSG_WARNING("Cannot retrieve rpcPrepDataContainer " << m_key_rpc.key());
218  return;
219  }
220  if (rpcPrdContainer->empty()) return;
221 
222  // loop over chambers and get collections
223  std::set<IdentifierHash>::const_iterator chit = chIdHs.begin();
224  std::set<IdentifierHash>::const_iterator chit_end = chIdHs.end();
225  for (; chit != chit_end; ++chit) {
226  const auto* collptr = rpcPrdContainer->indexFindPtr(*chit);
227  if (collptr == nullptr || collptr->empty()) { continue; }
228  ATH_MSG_DEBUG(" Adding for: " << m_idHelperSvc->toStringChamber(collptr->front()->identify()) << " size "
229  << collptr->size());
230 
231  // reserve space for the new PRDs
232  target.push_back(collptr);
233  }
234  }
235 
236  void MuonSeededSegmentFinder::extractTgcPrdCols(const EventContext& ctx, const std::set<IdentifierHash>& chIdHs,
237  std::vector<const TgcPrepDataCollection*>& target) const {
239  const Muon::TgcPrepDataContainer* tgcPrdContainer;
240  if (h_tgcPrdCont.isValid()) {
241  tgcPrdContainer = h_tgcPrdCont.cptr();
242  } else {
243  ATH_MSG_WARNING("Cannot retrieve tgcPrepDataContainer " << m_key_tgc.key());
244  return;
245  }
246  if (tgcPrdContainer->empty()) return;
247 
248  // loop over chambers and get collections
249  std::set<IdentifierHash>::const_iterator chit = chIdHs.begin();
250  std::set<IdentifierHash>::const_iterator chit_end = chIdHs.end();
251  for (; chit != chit_end; ++chit) {
252  const auto* collptr = tgcPrdContainer->indexFindPtr(*chit);
253  if (collptr == nullptr || collptr->empty()) { continue; }
254  ATH_MSG_DEBUG(" Adding for: " << m_idHelperSvc->toStringChamber(collptr->front()->identify()) << " size "
255  << collptr->size());
256 
257  // reserve space for the new PRDs
258  target.push_back(collptr);
259  }
260  }
261 
262  void MuonSeededSegmentFinder::extractCscPrdCols(const std::set<IdentifierHash>& chIdHs,
263  std::vector<const CscPrepDataCollection*>& target) const {
264  if (m_key_csc.key().empty()) {
265  ATH_MSG_DEBUG("No CSC collection");
266  return;
267  }
268 
270  const Muon::CscPrepDataContainer* cscPrdContainer;
271  if (h_cscPrdCont.isValid()) {
272  cscPrdContainer = h_cscPrdCont.cptr();
273  } else {
274  ATH_MSG_WARNING("Cannot retrieve cscPrepDataContainer " << m_key_csc.key());
275  return;
276  }
277  if (cscPrdContainer->empty()) return;
278 
279  // loop over chambers and get collections
280  std::set<IdentifierHash>::const_iterator chit = chIdHs.begin();
281  std::set<IdentifierHash>::const_iterator chit_end = chIdHs.end();
282  for (; chit != chit_end; ++chit) {
283  const auto* collptr = cscPrdContainer->indexFindPtr(*chit);
284  if (collptr == nullptr || collptr->empty()) { continue; }
285 
286  ATH_MSG_DEBUG(" Adding for: " << m_idHelperSvc->toStringChamber(collptr->front()->identify()) << " size "
287  << collptr->size());
288 
289  // reserve space for the new PRDs
290  target.push_back(collptr);
291  }
292  }
293 
294  // New Small Wheel
295  // sTGC
296 
297  void MuonSeededSegmentFinder::extractsTgcPrdCols(const EventContext& ctx, const std::set<IdentifierHash>& chIdHs,
298  std::vector<const sTgcPrepDataCollection*>& target) const {
299  if (m_key_stgc.key().empty()) {
300  ATH_MSG_DEBUG("no sTGC collection");
301  return;
302  }
303 
305  const Muon::sTgcPrepDataContainer* stgcPrdContainer;
306  if (h_stgcPrdCont.isValid()) {
307  stgcPrdContainer = h_stgcPrdCont.cptr();
308  } else {
309  ATH_MSG_WARNING("Cannot retrieve stgcPrepDataContainer " << m_key_stgc.key());
310  return;
311  }
312  if (stgcPrdContainer->empty()) return;
313 
314  // loop over chambers and get collections
315  std::set<IdentifierHash>::const_iterator chit = chIdHs.begin();
316  std::set<IdentifierHash>::const_iterator chit_end = chIdHs.end();
317  for (; chit != chit_end; ++chit) {
318  const auto* collptr = stgcPrdContainer->indexFindPtr(*chit);
319  if (collptr == nullptr || collptr->empty()) { continue; }
320  ATH_MSG_DEBUG(" Adding for: " << m_idHelperSvc->toStringChamber(collptr->front()->identify()) << " size "
321  << collptr->size());
322 
323  // reserve space for the new PRDs
324  target.push_back(collptr);
325  }
326  }
327 
328  // MM
329  void MuonSeededSegmentFinder::extractMMPrdCols(const std::set<IdentifierHash>& chIdHs,
330  std::vector<const MMPrepDataCollection*>& target) const {
331  if (m_key_mm.key().empty()) {
332  ATH_MSG_DEBUG("no MM collection");
333  return;
334  }
335 
337  const Muon::MMPrepDataContainer* mmPrdContainer;
338  if (h_mmPrdCont.isValid()) {
339  mmPrdContainer = h_mmPrdCont.cptr();
340  } else {
341  ATH_MSG_WARNING("Cannot retrieve mmPrepDataContainer " << m_key_mm.key());
342  return;
343  }
344  if (mmPrdContainer->empty()) return;
345 
346  // loop over chambers and get collections
347  std::set<IdentifierHash>::const_iterator chit = chIdHs.begin();
348  std::set<IdentifierHash>::const_iterator chit_end = chIdHs.end();
349  for (; chit != chit_end; ++chit) {
350  const auto* collptr = mmPrdContainer->indexFindPtr(*chit);
351  if (collptr == nullptr || collptr->empty()) { continue; }
352  ATH_MSG_DEBUG(" Adding for: " << m_idHelperSvc->toStringChamber(collptr->front()->identify()) << " size "
353  << collptr->size());
354 
355  target.push_back(collptr);
356  }
357  }
358 
360  const std::vector<const MdtPrepData*>& mdtPrdCols,
361  std::vector<const MdtDriftCircleOnTrack*>& mdtROTs, bool& doHoleSearch) const {
362  ATH_MSG_VERBOSE(" in selectAndCalibrate, get PRDs " << mdtPrdCols.size());
363 
364  // loop over MdtPrepDataCollections
365  std::vector<const MdtPrepData*>::const_iterator mit = mdtPrdCols.begin();
366  std::vector<const MdtPrepData*>::const_iterator mit_end = mdtPrdCols.end();
367  for (; mit != mit_end; ++mit) {
368  if (!MC::isStable(*mit)) continue;
369  // calibrate MDT
370  const MdtDriftCircleOnTrack* mdt = handleMdtPrd(ctx, pars, **mit, doHoleSearch);
371 
372  // not selected
373  if (!mdt) continue;
374 
375  mdtROTs.push_back(mdt);
376  }
377  ATH_MSG_VERBOSE(" calibrated " << mdtROTs.size() << " prds out of " << mdtPrdCols.size());
378  }
379 
381  const MdtPrepData& mdtPrd, bool& doHoleSearch) const {
382  // skip noise hits
383  if (mdtPrd.adc() < m_adcCut) return nullptr;
384 
385  // get surface of PRD
386  const Identifier& id = mdtPrd.identify();
387  const MuonGM::MdtReadoutElement& detEl = *mdtPrd.detectorElement();
388  const Trk::StraightLineSurface& surf = detEl.surface(id);
389 
390  // propagate segment parameters to first measurement
391  // retain ownership; this code deleted the exPars before
392  auto exPars = m_propagator->propagate(ctx, pars, surf, Trk::anyDirection, false, m_magFieldProperties);
393  if (!exPars) {
394  ATH_MSG_DEBUG(" Propagation failed!! ");
395  return nullptr;
396  }
397 
398  // calculate position on wire + error
399  double distanceToWire = exPars->parameters()[Trk::locR];
400  double posAlongWire = exPars->parameters()[Trk::locZ];
401 
402  double errorR = exPars->covariance() ? fabs(Amg::error(*exPars->covariance(), Trk::locR)) : 500.;
403  double errorZ = exPars->covariance() ? fabs(Amg::error(*exPars->covariance(), Trk::locZ)) : 300.;
404 
405  // range check
406  bool isOnSurface = surf.isOnSurface(exPars->position(), true, 5 * errorR, 5 * errorZ);
407 
408  // get tube length
409  int layer = m_idHelperSvc->mdtIdHelper().tubeLayer(id);
410  int tube = m_idHelperSvc->mdtIdHelper().tube(id);
411  double halfTubeLength = 0.5 * detEl.getActiveTubeLength(layer, tube);
412  double tubeRadius = detEl.innerTubeRadius();
413 
414  // take into account the tube width
415  double roadWidthR = 5 * errorR + 4 * tubeRadius;
416  double roadWidthZ = 5 * errorZ + 100.;
417 
418  double driftdr = Amg::error(mdtPrd.localCovariance(), Trk::locR);
419  double nSigmaFromTrack = fabs(fabs(distanceToWire) - mdtPrd.localPosition()[Trk::locR]) / sqrt(errorR * errorR + driftdr * driftdr);
420 
421  if (msgLvl(MSG::VERBOSE)) {
422  std::string boundCheckStr = isOnSurface ? " onSurface" : " outOfSurface";
423  msg() << MSG::VERBOSE << " " << m_idHelperSvc->toString(mdtPrd.identify()) << " r " << distanceToWire << " range "
424  << roadWidthR << " z " << posAlongWire << " range " << halfTubeLength + roadWidthZ << boundCheckStr;
425  }
426 
427  // if( fabs(distanceToWire) > roadWidthR || fabs(posAlongWire) > halfTubeLength + roadWidthZ ){
428  if (nSigmaFromTrack > m_maxSigma || fabs(posAlongWire) > halfTubeLength + roadWidthZ) {
429  if (msgLvl(MSG::VERBOSE)) msg() << " --- dropped" << endmsg;
430  // delete exPars;
431  return nullptr;
432  }
433 
434  // update hole search flag, set to false if we are close to the tube edge
435  if (doHoleSearch && fabs(posAlongWire) < halfTubeLength + roadWidthZ) doHoleSearch = false;
436 
437  Amg::Vector3D momentum = exPars->momentum();
438 
439  // pointer to ROT
440  const MdtDriftCircleOnTrack* mdtROT = m_mdtRotCreator->createRIO_OnTrack(mdtPrd, exPars->position(), &momentum);
441 
442  // clean up pointers
443  // delete exPars;
444 
445  // check whether ROT is created
446  if (!mdtROT) {
447  ATH_MSG_DEBUG(" failed to calibrate MdtPrepData " << m_idHelperSvc->toString(mdtPrd.identify()));
448  return nullptr;
449  }
450 
451  if (msgLvl(MSG::VERBOSE)) {
452  double radius = mdtROT->localParameters()[Trk::locR];
453  double error = driftdr;
454  double residual = radius - fabs(distanceToWire);
455  double fullError = sqrt(errorR * errorR + error * error);
456  double radialPull = residual / fullError;
457  std::string hitType;
458  if (fabs(radialPull) < 5)
459  hitType = "onTrack";
460  else if (fabs(radialPull) > 5 && residual > 0)
461  hitType = "delta";
462  else
463  hitType = "outOfTime";
464  msg() << " r_drift " << radius << " res " << residual << " pull " << radialPull << " " << hitType << endmsg;
465  }
466  return mdtROT;
467  }
468 
469 } // namespace Muon
Trk::TrackRoad
Encapsulates the information required by the find() method of the muon segment makers.
Definition: TrackRoad.h:21
Muon::MuonSeededSegmentFinder::find
std::unique_ptr< Trk::SegmentCollection > find(const EventContext &ctx, const Trk::TrackParameters &pars, const std::set< Identifier > &chIds) const
find segments in a set of chambers starting from seeding TrackParameters
Definition: MuonSeededSegmentFinder.cxx:47
Trk::anyDirection
@ anyDirection
Definition: PropDirection.h:22
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
MdtReadoutElement.h
Muon::MuonSeededSegmentFinder::m_key_csc
SG::ReadHandleKey< Muon::CscPrepDataContainer > m_key_csc
Definition: MuonSeededSegmentFinder.h:110
Muon::MuonPrepDataContainer
Template for Muon PRD containers (which are basically collections of MuonPrepDataCollections).
Definition: MuonPrepDataContainer.h:42
Muon::MuonSeededSegmentFinder::m_propagator
ToolHandle< Trk::IPropagator > m_propagator
propagator
Definition: MuonSeededSegmentFinder.h:100
Muon::MuonSeededSegmentFinder::m_key_stgc
SG::ReadHandleKey< Muon::sTgcPrepDataContainer > m_key_stgc
Definition: MuonSeededSegmentFinder.h:113
Muon::MuonSeededSegmentFinder::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonSeededSegmentFinder.h:105
StraightLineSurface.h
MeasurementBase.h
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
Muon::MuonSeededSegmentFinder::extractsTgcPrdCols
void extractsTgcPrdCols(const EventContext &ctx, const std::set< IdentifierHash > &chIdHs, std::vector< const sTgcPrepDataCollection * > &target) const
retrieve STGC PRD collections for the given hashes
Definition: MuonSeededSegmentFinder.cxx:297
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
MuonGM::MdtReadoutElement::innerTubeRadius
double innerTubeRadius() const
Returns the inner tube radius excluding the aluminium walls.
Muon::MuonSeededSegmentFinder::m_mdtRotCreator
ToolHandle< Muon::IMdtDriftCircleOnTrackCreator > m_mdtRotCreator
IMdtDriftCircleOnTrackCreator.
Definition: MuonSeededSegmentFinder.h:102
ClusterSeg::residual
@ residual
Definition: ClusterNtuple.h:20
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
Muon::MuonSeededSegmentFinder::extractPrds
std::vector< const MdtPrepData * > extractPrds(const EventContext &ctx, const std::set< Identifier > &chIds) const
retrieve the MdtPrepDataCollections for the give Identifiers
Definition: MuonSeededSegmentFinder.cxx:122
EventPrimitivesHelpers.h
MuonSeededSegmentFinder.h
Trk::PrepRawData::localCovariance
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
Trk::StraightLineSurface::isOnSurface
virtual bool isOnSurface(const Amg::Vector3D &glopo, const BoundaryCheck &bchk=true, double tol1=0., double tol2=0.) const override final
This method checks if the provided GlobalPosition is inside the assigned straw radius,...
Definition: StraightLineSurface.cxx:188
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
Muon::MuonSeededSegmentFinder::handleMdtPrd
const MdtDriftCircleOnTrack * handleMdtPrd(const EventContext &ctx, const Trk::TrackParameters &pars, const MdtPrepData &mdtPrd, bool &doHoleSearch) const
select and calibrate a single MdtPrepData
Definition: MuonSeededSegmentFinder.cxx:380
Muon::MuonSeededSegmentFinder::m_DetectorManagerKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
Definition: MuonSeededSegmentFinder.h:93
Trk::locR
@ locR
Definition: ParamDefs.h:50
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
MdtDriftCircleOnTrack.h
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:49
Muon::MdtPrepData::adc
int adc() const
Returns the ADC (typically range is 0 to 250)
Definition: MdtPrepData.h:166
MuonTrackMakerStlTools.h
IdentifiableContainerMT::empty
bool empty() const
return true if container is empty
Definition: IdentifiableContainerMT.h:247
Muon::MuonSeededSegmentFinder::initialize
StatusCode initialize()
AlgTool initilize.
Definition: MuonSeededSegmentFinder.cxx:28
Muon::MuonSeededSegmentFinder::m_key_tgc
SG::ReadHandleKey< Muon::TgcPrepDataContainer > m_key_tgc
Definition: MuonSeededSegmentFinder.h:111
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Trk::locZ
@ locZ
local cylindrical
Definition: ParamDefs.h:48
ParticleGun_EoverP_Config.momentum
momentum
Definition: ParticleGun_EoverP_Config.py:63
MuonGM::MdtReadoutElement
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:50
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
Muon::MuonSeededSegmentFinder::m_printer
ToolHandle< Muon::MuonEDMPrinterTool > m_printer
EDM printer tool.
Definition: MuonSeededSegmentFinder.h:106
Trk::theta
@ theta
Definition: ParamDefs.h:72
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
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
Muon::MuonSeededSegmentFinder::extractMdtPrdCols
void extractMdtPrdCols(const EventContext &ctx, const std::set< IdentifierHash > &chIdHs, std::vector< const MdtPrepDataCollection * > &target) const
retrieve MDT PRD collections for the given hashes
Definition: MuonSeededSegmentFinder.cxx:184
MuonGM::MdtReadoutElement::getActiveTubeLength
double getActiveTubeLength(const int tubeLayer, const int tube) const
Muon::MuonSeededSegmentFinder::m_maxSigma
Gaudi::Property< double > m_maxSigma
Definition: MuonSeededSegmentFinder.h:117
Muon::MuonSeededSegmentFinder::MuonSeededSegmentFinder
MuonSeededSegmentFinder(const std::string &, const std::string &, const IInterface *)
constructor
Definition: MuonSeededSegmentFinder.cxx:23
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Muon::MuonSeededSegmentFinder::m_adcCut
Gaudi::Property< double > m_adcCut
Definition: MuonSeededSegmentFinder.h:116
Muon::MuonSeededSegmentFinder::extractRpcPrdCols
void extractRpcPrdCols(const EventContext &ctx, const std::set< IdentifierHash > &chIdHs, std::vector< const RpcPrepDataCollection * > &target) const
retrieve RPC PRD collections for the given hashes
Definition: MuonSeededSegmentFinder.cxx:210
Trk::ParametersBase
Definition: ParametersBase.h:55
Muon::MuonSeededSegmentFinder::m_key_mdt
SG::ReadHandleKey< Muon::MdtPrepDataContainer > m_key_mdt
Definition: MuonSeededSegmentFinder.h:109
Muon::MuonSeededSegmentFinder::m_segMaker
ToolHandle< Muon::IMuonSegmentMaker > m_segMaker
actual segment maker with hole search
Definition: MuonSeededSegmentFinder.h:96
DataVector< Trk::Segment >
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
Trk::NoField
@ NoField
Field is set to 0., 0., 0.,.
Definition: MagneticFieldMode.h:18
EventPrimitives.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Amg::error
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
Definition: EventPrimitivesHelpers.h:40
Trk::PrepRawData::localPosition
const Amg::Vector2D & localPosition() const
return the local position reference
Muon::MdtDriftCircleOnTrack
This class represents the corrected MDT measurements, where the corrections include the effects of wi...
Definition: MdtDriftCircleOnTrack.h:37
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
Muon::MuonSeededSegmentFinder::extractMMPrdCols
void extractMMPrdCols(const std::set< IdentifierHash > &chIdHs, std::vector< const MMPrepDataCollection * > &target) const
retrieve MM PRD collections for the given hashes
Definition: MuonSeededSegmentFinder.cxx:329
Muon::MdtPrepData
Class to represent measurements from the Monitored Drift Tubes.
Definition: MdtPrepData.h:37
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
LocalParameters.h
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
Trk::MeasurementBase::localParameters
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
Definition: MeasurementBase.h:132
Muon::MuonSeededSegmentFinder::m_key_mm
SG::ReadHandleKey< Muon::MMPrepDataContainer > m_key_mm
Definition: MuonSeededSegmentFinder.h:114
IdentifiableContainerMT::indexFindPtr
virtual const T * indexFindPtr(IdentifierHash hashId) const override final
return pointer on the found entry or null if out of range using hashed index - fast version,...
Definition: IdentifiableContainerMT.h:292
Muon::MuonSeededSegmentFinder::selectAndCalibrate
void selectAndCalibrate(const EventContext &ctx, const Trk::TrackParameters &pars, const std::vector< const MdtPrepData * > &mdtPrdCols, std::vector< const MdtDriftCircleOnTrack * > &mdtROTs, bool &doHoleSearch) const
select a set of Mdt hits and calibrate them
Definition: MuonSeededSegmentFinder.cxx:359
MC::isStable
bool isStable(const T &p)
Definition: HepMCHelpers.h:30
Muon::MuonDeleteObject
Definition: MuonTrackMakerStlTools.h:10
MuonGM::MuonDetectorManager
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:49
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
MuonGM::MdtReadoutElement::surface
virtual const Trk::Surface & surface() const override final
Return surface associated with this detector element.
Definition: MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx:875
MuonClusterOnTrack.h
MuonGM::MuonReadoutElement::identifyHash
IdentifierHash identifyHash() const override final
Returns the IdentifierHash of the MuonStation, i.e.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:185
COOLRates.target
target
Definition: COOLRates.py:1106
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
AthAlgTool
Definition: AthAlgTool.h:26
error
Definition: IImpactPoint3dEstimator.h:70
Muon::MuonSeededSegmentFinder::m_key_rpc
SG::ReadHandleKey< Muon::RpcPrepDataContainer > m_key_rpc
Definition: MuonSeededSegmentFinder.h:112
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
Muon::MuonSeededSegmentFinder::extractCscPrdCols
void extractCscPrdCols(const std::set< IdentifierHash > &chIdHs, std::vector< const CscPrepDataCollection * > &target) const
retrieve CSC PRD collections for the given hashes
Definition: MuonSeededSegmentFinder.cxx:262
Muon::MdtPrepData::detectorElement
virtual const MuonGM::MdtReadoutElement * detectorElement() const override
Returns the detector element corresponding to this PRD.
Definition: MdtPrepData.h:156
TrackRoad.h
Muon::MuonSeededSegmentFinder::extractTgcPrdCols
void extractTgcPrdCols(const EventContext &ctx, const std::set< IdentifierHash > &chIdHs, std::vector< const TgcPrepDataCollection * > &target) const
retrieve TGC PRD collections for the given hashes
Definition: MuonSeededSegmentFinder.cxx:236
calibdata.tube
tube
Definition: calibdata.py:31
HepMCHelpers.h
Trk::StraightLineSurface
Definition: StraightLineSurface.h:51
Muon::MuonSeededSegmentFinder::m_magFieldProperties
Trk::MagneticFieldProperties m_magFieldProperties
magnetic field properties
Definition: MuonSeededSegmentFinder.h:104
Muon::MuonSeededSegmentFinder::m_segMakerNoHoles
ToolHandle< Muon::IMuonSegmentMaker > m_segMakerNoHoles
actual segment maker no hole search
Definition: MuonSeededSegmentFinder.h:98