ATLAS Offline Software
PRDTrackSegmentHelper.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
7 // //
8 // Implementation of class PRDTrackSegmentHelper //
9 // //
10 // Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
11 // Initial version: December 2007 //
12 // //
14 
18 
23 #include "TrkTrack/Track.h"
24 #include "TrkSegment/Segment.h"
25 
26 #include <set>
27 
28 //____________________________________________________________________
30 public:
32  std::map< const Trk::PrepRawData *, QList<PRDHandleBase *> >* prd2handles = nullptr;
33 
34  std::map< const Trk::Track*, const SoMaterial* > tracks2mat;
35  std::map< const Trk::Segment*, const SoMaterial* > segments2mat;
36 
37 
38  void addTrackToPRDs(const Trk::Track *, bool outliers );
39  void removeTrackFromPRDs(const Trk::Track *, bool outliers);
40  void updateMaterialOfPRDs(const Trk::Track *, bool outliers );
41 
42  void addSegmentToPRDs(const Trk::Segment * );
43  void removeSegmentFromPRDs(const Trk::Segment *);
44  void updateMaterialOfPRDs(const Trk::Segment * );
45 
46  template <class T>
47  void removeEntryFromVector(std::vector<T*>&v,T*t);//Removes first occurrence of t from v (does nothing if not found).
48  //Element order is not preserved. FIXME: To utility class.
49 
50  //static inline const Trk::PrepRawData* measurementToPRD(const Trk::MeasurementBase*);//Might return null.
51  static inline std::vector<const Trk::PrepRawData*> measurementToPRDs(const Trk::MeasurementBase*);//Might return empty vector.
52 
53  //We keep this map around in order to give track associations for
54  //prds (in particular those whose handles are created after the
55  //change in visible tracks):
56  //
57  //NB (TK): I guess a track association tool could do this too - but
58  //why add that dependency for something which is dead simple?
59  std::map< const Trk::PrepRawData*,TracksAndSegments > prdsOnTracksAndSegments;
60 
61 };
62 
63 //____________________________________________________________________
64 template <class T>
66 {
67  const unsigned n(v.size());
68  for (unsigned i(0); i<n;++i) {
69  if (v[i]==t) {
70  if (i==n-1) {
71  v.resize(n-1);
72  return;
73  } else {
74  v[i]=v[n-1];
75  v.resize(n-1);
76  return;
77  }
78  }
79  }
80 }
81 
82 //____________________________________________________________________
83 PRDTrackSegmentHelper::PRDTrackSegmentHelper(std::map< const Trk::PrepRawData *, QList<PRDHandleBase *> >* prd2handles,
84  IVP1System* sys, QObject * parent)
85  : QObject(parent), VP1HelperClassBase(sys,"PRDTrackSegmentHelper"), m_d(new Imp)
86 {
87  m_d->theclass = this;
88  m_d->prd2handles = prd2handles;
89 }
90 
91 //____________________________________________________________________
93 {
94  delete m_d;
95 }
96 
97 //____________________________________________________________________
98 void PRDTrackSegmentHelper::visibleTracksChanged(const std::vector< std::pair<const Trk::Track*, const SoMaterial*> >& tracks)
99 {
100  //NB: Code here is very similar to code in visibleSegmentsChanged!!
101  messageVerbose("visibleTracksChanged start (old ntracks = "+QString::number(m_d->tracks2mat.size())
102  +", new ntracks = "+QString::number(tracks.size())+")");
103 
104  if (tracks.empty()) {
105  //Special case #1 - loop over previous track's, remove their pointers from the relevant prd handles + update their materials.
106  messageVerbose("special case #1 - new track list is empty");
108  for (it=m_d->tracks2mat.begin();it!=itE;++it) {
109  m_d->removeTrackFromPRDs(it->first,false);//measurements
110  m_d->removeTrackFromPRDs(it->first,true);//outliers
111  }
112  m_d->tracks2mat.clear();
113  messageVerbose("visibleTracksChanged end");
114  return;
115  }
116 
117  if (m_d->tracks2mat.empty()) {
118  //special case #2 - no previous tracks, so just loop over incoming
119  //tracks, and add their pointers to the relevant prd handles + update their materials.
120  messageVerbose("special case #2 - old track list is empty");
121  std::vector< std::pair<const Trk::Track*, const SoMaterial*> >::const_iterator it(tracks.begin()), itE(tracks.end());
122  for (;it!=itE;++it) {
123  m_d->tracks2mat.insert(*it);
124  m_d->addTrackToPRDs(it->first, false );//measurements
125  m_d->addTrackToPRDs(it->first, true );//outliers
126  }
127  messageVerbose("visibleTracksChanged end");
128  return;
129  }
130 
131  //Normal case - need to remove some trackpointers, add some, and for others possibly just update their materials.
132  messageVerbose("normal case - neither old, nor new, track lists are empty");
133 
134  //First check if any previously visible tracks simply disappeared.
135  // --> Create std::set for faster searches.
136  std::set<const Trk::Track*> newtracksset;
137  std::vector< std::pair<const Trk::Track*, const SoMaterial*> >::const_iterator it(tracks.begin()), itE(tracks.end());
138  for (;it!=itE;++it)
139  newtracksset.insert(it->first);
140  std::set<const Trk::Track*>::const_iterator newtrackssetEnd(newtracksset.end());
141 
142  // --> Check old tracks versus this set - remove if no match:
144  for (it2=m_d->tracks2mat.begin();it2!=it2E;) {
145  if (newtracksset.find(it2->first)==newtrackssetEnd) {
146  m_d->removeTrackFromPRDs(it2->first,false);//measurements
147  m_d->removeTrackFromPRDs(it2->first,true);//outliers
148  m_d->tracks2mat.erase(it2++);//postfix ++ operator must be used as here (due to the erase call)
149  } else {
150  ++it2;
151  }
152  }
153 
154  // Next, check all tracks that are now visible - if not previously
155  // visible we add their pointers to the relevant handles. If just
156  // the material changed, we make sure the prd handle updates its
157  // material.
158  it2E=m_d->tracks2mat.end();
159  for (it=tracks.begin();it!=itE;++it) {
160  it2 = m_d->tracks2mat.find(it->first);
161  if (it2==it2E) {
162  m_d->tracks2mat[it->first] = it->second;
163  m_d->addTrackToPRDs(it->first, false );//measurements
164  m_d->addTrackToPRDs(it->first, true );//outliers
165  } else {
166  //we need to update the track material - but only if it changed of course.
167  if (it->second!=it2->second) {
168  m_d->tracks2mat[it->first] = it->second;
169  m_d->updateMaterialOfPRDs(it->first, false );//measurements
170  m_d->updateMaterialOfPRDs(it->first, true );//outliers
171  }
172  }
173  }
174  messageVerbose("visibleTracksChanged end");
175 
176 }
177 
178 //____________________________________________________________________
179 void PRDTrackSegmentHelper::visibleSegmentsChanged(const std::vector< std::pair<const Trk::Segment*, const SoMaterial*> >& segments)
180 {
181  //NB: Code here is very similar to code in visibleTracksChanged!!
182  messageVerbose("visibleSegmentsChanged start (old nsegments = "+QString::number(m_d->segments2mat.size())
183  +", new nsegments = "+QString::number(segments.size())+")");
184 
185  if (segments.empty()) {
186  //Special case #1 - loop over previous segment's, remove their pointers from the relevant prd handles + update their materials.
187  messageVerbose("special case #1 - new segment list is empty");
189  for (it=m_d->segments2mat.begin();it!=itE;++it) {
190  m_d->removeSegmentFromPRDs(it->first);
191  }
192  m_d->segments2mat.clear();
193  messageVerbose("visibleSegmentsChanged end");
194  return;
195  }
196 
197  if (m_d->segments2mat.empty()) {
198  //special case #2 - no previous segments, so just loop over incoming
199  //segments, and add their pointers to the relevant prd handles + update their materials.
200  messageVerbose("special case #2 - old segment list is empty");
201  std::vector< std::pair<const Trk::Segment*, const SoMaterial*> >::const_iterator it(segments.begin()), itE(segments.end());
202  for (;it!=itE;++it) {
203  m_d->segments2mat.insert(*it);
204  m_d->addSegmentToPRDs(it->first );
205  }
206  messageVerbose("visibleSegmentsChanged end");
207  return;
208  }
209 
210  //Normal case - need to remove some segmentpointers, add some, and for others possibly just update their materials.
211  messageVerbose("normal case - neither old, nor new, segment lists are empty");
212 
213  //First check if any previously visible segments simply disappeared.
214  // --> Create std::set for faster searches.
215  std::set<const Trk::Segment*> newsegmentsset;
216  std::vector< std::pair<const Trk::Segment*, const SoMaterial*> >::const_iterator it(segments.begin()), itE(segments.end());
217  for (;it!=itE;++it)
218  newsegmentsset.insert(it->first);
219  std::set<const Trk::Segment*>::const_iterator newsegmentssetEnd(newsegmentsset.end());
220 
221  // --> Check old segments versus this set - remove if no match:
223  for (it2=m_d->segments2mat.begin();it2!=it2E;) {
224  if (newsegmentsset.find(it2->first)==newsegmentssetEnd) {
225  m_d->removeSegmentFromPRDs(it2->first);
226  m_d->segments2mat.erase(it2++);//postfix ++ operator must be used as here (due to the erase call)
227  } else {
228  ++it2;
229  }
230  }
231 
232  // Next, check all segments that are now visible - if not previously
233  // visible we add their pointers to the relevant handles. If just
234  // the material changed, we make sure the prd handle updates its
235  // material.
236  it2E=m_d->segments2mat.end();
237  for (it=segments.begin();it!=itE;++it) {
238  it2 = m_d->segments2mat.find(it->first);
239  if (it2==it2E) {
240  m_d->segments2mat[it->first] = it->second;
241  m_d->addSegmentToPRDs(it->first);
242  } else {
243  //we need to update the segment material - but only if it changed of course.
244  if (it->second!=it2->second) {
245  m_d->segments2mat[it->first] = it->second;
246  m_d->updateMaterialOfPRDs(it->first);
247  }
248  }
249  }
250  messageVerbose("visibleSegmentsChanged end");
251 }
252 
253 //____________________________________________________________________
255 {
256  // if (verbose())
257  // theclass->messageVerbose("addSegmentToPRDs start");
258  if (!seg) {
259  theclass->message("ERROR: Received null segment pointer!");
260  return;
261  }
263  std::map< const Trk::PrepRawData *, QList<PRDHandleBase *> >::const_iterator itHandle, itHandleEnd(prd2handles->end());
264  std::vector<const Trk::MeasurementBase*>::const_iterator
265  it (seg->containedMeasurements().begin()), itE(seg->containedMeasurements().end());
266  const Trk::PrepRawData * prd;
267  for (;it!=itE;++it) {
268  std::vector<const Trk::PrepRawData*> prds = Imp::measurementToPRDs(*it); // need to handle compound measurements too.
269  std::vector<const Trk::PrepRawData*>::const_iterator itPrd = prds.begin(), itEnd=prds.end();
270  for (;itPrd!=itEnd;++itPrd){
271  prd = *itPrd;
272  itInfo = prdsOnTracksAndSegments.find(prd);
273  if (itInfo==prdsOnTracksAndSegments.end()) {
274  prdsOnTracksAndSegments.insert(std::pair<const Trk::PrepRawData*,TracksAndSegments>(prd,
275  TracksAndSegments(std::vector<const Trk::Track*>(),
276  std::vector<const Trk::Track*>(),
277  std::vector< const Trk::Segment* >(1,seg))));
278 
279  } else {
280  itInfo->second.segments.push_back(seg);
281  }
282  itHandle = prd2handles->find(prd);
283  if (itHandle!=itHandleEnd) {
284  QList<PRDHandleBase*> handles = itHandle->second;
285  for (PRDHandleBase*handle : handles)
286  if (handle->collHandle()->colourBySegments())
287  handle->updateMaterial();
288  }
289 
290  }
291  }
292  // theclass->messageVerbose("addSegmentToPRDs end");
293 }
294 
295 //____________________________________________________________________
297 {
298  // if (verbose())
299  // theclass->messageVerbose("removeSegmentFromPRDs start");
300  if (!seg) {
301  theclass->message("ERROR: Received null segment pointer!");
302  return;
303  }
305  std::map< const Trk::PrepRawData *, QList<PRDHandleBase *> >::const_iterator itHandle, itHandleEnd(prd2handles->end());
306  std::vector<const Trk::MeasurementBase*>::const_iterator
307  it (seg->containedMeasurements().begin()), itE(seg->containedMeasurements().end());
308  const Trk::PrepRawData * prd;
309  for (;it!=itE;++it) {
310  std::vector<const Trk::PrepRawData*> prds = Imp::measurementToPRDs(*it); // need to handle compound measurements too.
311  std::vector<const Trk::PrepRawData*>::const_iterator itPrd = prds.begin(), itEnd=prds.end();
312  for (;itPrd!=itEnd;++itPrd){
313  prd = *itPrd;
314  itInfo = prdsOnTracksAndSegments.find(prd);
315  if (itInfo!=prdsOnTracksAndSegments.end()) {
316  removeEntryFromVector(itInfo->second.segments,seg);
317  itHandle = prd2handles->find(prd);
318  if (itHandle!=itHandleEnd) {
319  QList<PRDHandleBase*> handles = itHandle->second;
320  for (PRDHandleBase*handle : handles)
321  if (handle->collHandle()->colourBySegments())
322  handle->updateMaterial();
323  }
324  }
325  }
326  }
327 
328  // if (verbose())
329  // theclass->messageVerbose("removeSegmentToPRDs end");
330 }
331 
332 //____________________________________________________________________
334 {
335  // if (verbose())
336  // theclass->messageVerbose("updateMaterialOfPRDs(segment) start");
337  if (!seg) {
338  theclass->message("ERROR: Received null segment pointer!");
339  return;
340  }
341  std::map< const Trk::PrepRawData *, QList<PRDHandleBase *> >::const_iterator itHandle, itHandleEnd(prd2handles->end());
342  std::vector<const Trk::MeasurementBase*>::const_iterator
343  it (seg->containedMeasurements().begin()), itE(seg->containedMeasurements().end());
344  const Trk::PrepRawData * prd;
345  for (;it!=itE;++it) {
346  std::vector<const Trk::PrepRawData*> prds = Imp::measurementToPRDs(*it); // need to handle compound measurements too.
347  std::vector<const Trk::PrepRawData*>::const_iterator itPrd = prds.begin(), itEnd=prds.end();
348  for (;itPrd!=itEnd;++itPrd){
349  prd = *itPrd;
350  itHandle = prd2handles->find(prd);
351  if (itHandle!=itHandleEnd) {
352  QList<PRDHandleBase*> handles = itHandle->second;
353  for (PRDHandleBase*handle : handles)
354  if (handle->collHandle()->colourByTracks())
355  handle->updateMaterial();
356  }
357  }
358  }
359 
360  // if (verbose())
361  // theclass->messageVerbose("updateMaterialOfPRDs(segment) end");
362 }
363 
364 //____________________________________________________________________
366 {
367  // if (verbose())
368  // theclass->messageVerbose("addTrackToPRDs start");
369  if (!trk) {
370  theclass->message("ERROR: Received null track pointer!");
371  return;
372  }
374  std::map< const Trk::PrepRawData *, QList<PRDHandleBase *> >::const_iterator itHandle, itHandleEnd(prd2handles->end());
376  it ( outliers ? trk->outliersOnTrack()->begin() : trk->measurementsOnTrack()->begin() ),
377  itE( outliers ? trk->outliersOnTrack()->end() : trk->measurementsOnTrack()->end() );
378  const Trk::PrepRawData * prd;
379  for (;it!=itE;++it) {
380  std::vector<const Trk::PrepRawData*> prds = Imp::measurementToPRDs(*it); // need to handle compound measurements too.
381  std::vector<const Trk::PrepRawData*>::const_iterator itPrd = prds.begin(), itEnd=prds.end();
382  for (;itPrd!=itEnd;++itPrd){
383  prd = *itPrd;
384  if (prd) {
385  itInfo = prdsOnTracksAndSegments.find(prd);
386  if (itInfo==prdsOnTracksAndSegments.end()) {
387  prdsOnTracksAndSegments.insert(std::pair<const Trk::PrepRawData*,TracksAndSegments>(prd,
388  TracksAndSegments((outliers?std::vector<const Trk::Track*>():std::vector<const Trk::Track*>(1,trk)),
389  (outliers?std::vector<const Trk::Track*>(1,trk):std::vector<const Trk::Track*>()),
390  std::vector< const Trk::Segment* >())));
391  } else {
392  if (outliers)
393  itInfo->second.tracks_outliers.push_back(trk);
394  else
395  itInfo->second.tracks.push_back(trk);
396  }
397  itHandle = prd2handles->find(prd);
398  if (itHandle!=itHandleEnd) {
399  QList<PRDHandleBase*> handles = itHandle->second;
400  for (PRDHandleBase*handle : handles)
401  if (handle->collHandle()->colourByTracks())
402  handle->updateMaterial();
403  }
404  }
405  }
406  }
407  // if (verbose())
408  // theclass->messageVerbose("addTrackToPRDs end");
409 }
410 
411 //____________________________________________________________________
413 {
414  // if (verbose())
415  // theclass->messageVerbose("removeTrackFromPRDs start");
416  if (!trk) {
417  theclass->message("ERROR: Received null track pointer!");
418  return;
419  }
421  std::map< const Trk::PrepRawData *, QList<PRDHandleBase *> >::const_iterator itHandle, itHandleEnd(prd2handles->end());
423  it ( outliers ? trk->outliersOnTrack()->begin() : trk->measurementsOnTrack()->begin() ),
424  itE( outliers ? trk->outliersOnTrack()->end() : trk->measurementsOnTrack()->end() );
425  const Trk::PrepRawData * prd;
426  for (;it!=itE;++it) {
427  std::vector<const Trk::PrepRawData*> prds = Imp::measurementToPRDs(*it); // need to handle compound measurements too.
428  std::vector<const Trk::PrepRawData*>::const_iterator itPrd = prds.begin(), itEnd=prds.end();
429  for (;itPrd!=itEnd;++itPrd){
430  prd = *itPrd;
431  itInfo = prdsOnTracksAndSegments.find(prd);
432  if (itInfo!=prdsOnTracksAndSegments.end()) {
433  removeEntryFromVector((outliers?itInfo->second.tracks_outliers:itInfo->second.tracks),trk);
434  itHandle = prd2handles->find(prd);
435  if (itHandle!=itHandleEnd) {
436  QList<PRDHandleBase*> handles = itHandle->second;
437  for (PRDHandleBase*handle : handles)
438  if (handle->collHandle()->colourByTracks())
439  handle->updateMaterial();
440  }
441  }
442  }
443  }
444 
445  // if (verbose())
446  // theclass->messageVerbose("removeTrackToPRDs end");
447 }
448 
449 //____________________________________________________________________
451 {
452  // if (verbose())
453  // theclass->messageVerbose("updateMaterialOfPRDs(track) start");
454  if (!trk) {
455  theclass->message("ERROR: Received null track pointer!");
456  return;
457  }
458  std::map< const Trk::PrepRawData *, QList<PRDHandleBase *> >::const_iterator itHandle, itHandleEnd(prd2handles->end());
460  it ( outliers ? trk->outliersOnTrack()->begin() : trk->measurementsOnTrack()->begin() ),
461  itE( outliers ? trk->outliersOnTrack()->end() : trk->measurementsOnTrack()->end() );
462  const Trk::PrepRawData * prd;
463  for (;it!=itE;++it) {
464  std::vector<const Trk::PrepRawData*> prds = Imp::measurementToPRDs(*it); // need to handle compound measurements too.
465  std::vector<const Trk::PrepRawData*>::const_iterator itPrd = prds.begin(), itEnd=prds.end();
466  for (;itPrd!=itEnd;++itPrd){
467  prd = *itPrd;
468  itHandle = prd2handles->find(prd);
469  if (itHandle!=itHandleEnd) {
470  QList<PRDHandleBase*> handles = itHandle->second;
471  for (PRDHandleBase*handle : handles)
472  if (handle->collHandle()->colourByTracks())
473  handle->updateMaterial();
474  }
475  }
476  }
477 
478  // if (verbose())
479  // theclass->messageVerbose("updateMaterialOfPRDs(track) end");
480 }
481 
482 //____________________________________________________________________
484 {
486  return itInfo == m_d->prdsOnTracksAndSegments.end() ? 0 : &(itInfo->second);
487 }
488 
489 
490 //____________________________________________________________________
491 inline std::vector<const Trk::PrepRawData *> PRDTrackSegmentHelper::Imp::measurementToPRDs(const Trk::MeasurementBase* measbase)
492 {
493  std::vector<const Trk::PrepRawData *>prds;
494  const Trk::RIO_OnTrack * rio = dynamic_cast<const Trk::RIO_OnTrack *>(measbase);
495  if (rio) prds.push_back( rio->prepRawData() );
496  const Trk::CompetingRIOsOnTrack * crot = dynamic_cast<const Trk::CompetingRIOsOnTrack *>(measbase);
497  if (crot) {
498 
499  // for (unsigned int i=0; i< crot->numberOfContainedROTs (); ++i) prds.push_back( crot->rioOnTrack(i) ? crot->rioOnTrack(i)->prepRawData() : 0 );
500  for (unsigned int i=0; i< crot->numberOfContainedROTs (); ++i) {
501  if (crot->rioOnTrack(i).identify().getString() != "") { // FIXME: search for a better way to see if the rioOnTrack is present
502  prds.push_back(crot->rioOnTrack(i).prepRawData());
503  }
504  else {
505  prds.push_back(0);
506  }
507  }
508  }
509  return prds;
510 }
511 
512 //____________________________________________________________________
513 inline PRDTrackSegmentHelper::TracksAndSegments::TracksAndSegments(const std::vector<const Trk::Track*>& t,
514  const std::vector<const Trk::Track*>& to,
515  const std::vector< const Trk::Segment* >& s )
516  : tracks(t), tracks_outliers(to), segments(s)
517 {
518 }
519 
520 //____________________________________________________________________
522 {
523  std::map< const Trk::Track*, const SoMaterial* >::const_iterator it = m_d->tracks2mat.find(t);
524  return it == m_d->tracks2mat.end() ? 0 : const_cast<SoMaterial *>(it->second);//fixme; const_cast is temporary hack. Remove const from materials!
525 }
526 
527 //____________________________________________________________________
529 {
530  std::map< const Trk::Segment*, const SoMaterial* >::const_iterator it = m_d->segments2mat.find(s);
531  return it == m_d->segments2mat.end() ? 0 : const_cast<SoMaterial *>(it->second);//fixme; const_cast is temporary hack. Remove const from materials!
532 }
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
PRDCollHandleBase.h
PRDTrackSegmentHelper::Imp::removeTrackFromPRDs
void removeTrackFromPRDs(const Trk::Track *, bool outliers)
Definition: PRDTrackSegmentHelper.cxx:412
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
PRDTrackSegmentHelper::Imp::updateMaterialOfPRDs
void updateMaterialOfPRDs(const Trk::Track *, bool outliers)
Definition: PRDTrackSegmentHelper.cxx:450
MeasurementBase.h
CompetingRIOsOnTrack.h
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
PRDTrackSegmentHelper::Imp::addSegmentToPRDs
void addSegmentToPRDs(const Trk::Segment *)
Definition: PRDTrackSegmentHelper.cxx:254
PRDTrackSegmentHelper.h
PRDTrackSegmentHelper
Definition: PRDTrackSegmentHelper.h:36
VP1HelperClassBase::messageVerbose
void messageVerbose(const QString &) const
Definition: VP1HelperClassBase.cxx:78
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
skel.it
it
Definition: skel.GENtoEVGEN.py:396
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
TruthTest.itE
itE
Definition: TruthTest.py:25
Track.h
PRDTrackSegmentHelper::Imp::tracks2mat
std::map< const Trk::Track *, const SoMaterial * > tracks2mat
Definition: PRDTrackSegmentHelper.cxx:34
Trk::CompetingRIOsOnTrack::rioOnTrack
virtual const RIO_OnTrack & rioOnTrack(unsigned int) const =0
returns the RIO_OnTrack (also known as ROT) objects depending on the integer.
IVP1System
Definition: IVP1System.h:36
Trk::CompetingRIOsOnTrack::numberOfContainedROTs
virtual unsigned int numberOfContainedROTs() const =0
Number of RIO_OnTracks to be contained by this CompetingRIOsOnTrack.
lumiFormat.i
int i
Definition: lumiFormat.py:85
PRDTrackSegmentHelper::tracksAndSegments
const TracksAndSegments * tracksAndSegments(const Trk::PrepRawData *)
Definition: PRDTrackSegmentHelper.cxx:483
beamspotman.n
n
Definition: beamspotman.py:731
PRDTrackSegmentHelper::Imp::addTrackToPRDs
void addTrackToPRDs(const Trk::Track *, bool outliers)
Definition: PRDTrackSegmentHelper.cxx:365
PRDTrackSegmentHelper::visibleTracksChanged
void visibleTracksChanged(const std::vector< std::pair< const Trk::Track *, const SoMaterial * > > &)
Definition: PRDTrackSegmentHelper.cxx:98
Trk::Segment::containedMeasurements
const std::vector< const Trk::MeasurementBase * > & containedMeasurements() const
returns the vector of Trk::MeasurementBase objects
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:166
Trk::Segment
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:56
Trk::CompetingRIOsOnTrack
Base class for all CompetingRIOsOnTack implementations, extends the common MeasurementBase.
Definition: CompetingRIOsOnTrack.h:64
test_pyathena.parent
parent
Definition: test_pyathena.py:15
PRDTrackSegmentHelper::Imp::theclass
PRDTrackSegmentHelper * theclass
Definition: PRDTrackSegmentHelper.cxx:31
PRDTrackSegmentHelper::Imp::prd2handles
std::map< const Trk::PrepRawData *, QList< PRDHandleBase * > > * prd2handles
Definition: PRDTrackSegmentHelper.cxx:32
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
VP1HelperClassBase
Definition: VP1HelperClassBase.h:28
Trk::Track::outliersOnTrack
const DataVector< const MeasurementBase > * outliersOnTrack() const
return a pointer to a vector of MeasurementBase, which represent outliers (i.e.
Definition: Tracking/TrkEvent/TrkTrack/src/Track.cxx:210
Trk::PrepRawData
Definition: PrepRawData.h:62
Trk::MeasurementBase
Definition: MeasurementBase.h:58
PRDTrackSegmentHelper::TracksAndSegments::TracksAndSegments
TracksAndSegments(const std::vector< const Trk::Track * > &, const std::vector< const Trk::Track * > &, const std::vector< const Trk::Segment * > &)
Definition: PRDTrackSegmentHelper.cxx:513
PRDTrackSegmentHelper::Imp
Definition: PRDTrackSegmentHelper.cxx:29
python.selection.number
number
Definition: selection.py:20
RIO_OnTrack.h
PRDTrackSegmentHelper::PRDTrackSegmentHelper
PRDTrackSegmentHelper(std::map< const Trk::PrepRawData *, QList< PRDHandleBase * > > *prd2handle, IVP1System *sys=0, QObject *parent=0)
Definition: PRDTrackSegmentHelper.cxx:83
PRDTrackSegmentHelper::Imp::removeSegmentFromPRDs
void removeSegmentFromPRDs(const Trk::Segment *)
Definition: PRDTrackSegmentHelper.cxx:296
PRDTrackSegmentHelper::~PRDTrackSegmentHelper
virtual ~PRDTrackSegmentHelper()
Definition: PRDTrackSegmentHelper.cxx:92
PRDTrackSegmentHelper::Imp::prdsOnTracksAndSegments
std::map< const Trk::PrepRawData *, TracksAndSegments > prdsOnTracksAndSegments
Definition: PRDTrackSegmentHelper.cxx:59
Trk::RIO_OnTrack::prepRawData
virtual const Trk::PrepRawData * prepRawData() const =0
returns the PrepRawData (also known as RIO) object to which this RIO_OnTrack is associated.
CxxUtils::to
CONT to(RANGE &&r)
Definition: ranges.h:39
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
python.PyAthena.v
v
Definition: PyAthena.py:154
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
Identifier::getString
std::string getString() const
Provide a string form of the identifier - hexadecimal.
Definition: Identifier.cxx:25
PRDTrackSegmentHelper::segmentMaterial
SoMaterial * segmentMaterial(const Trk::Segment *) const
Definition: PRDTrackSegmentHelper.cxx:528
PRDTrackSegmentHelper::m_d
Imp * m_d
Definition: PRDTrackSegmentHelper.h:62
Trk::RIO_OnTrack::identify
Identifier identify() const
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:152
PRDTrackSegmentHelper::Imp::segments2mat
std::map< const Trk::Segment *, const SoMaterial * > segments2mat
Definition: PRDTrackSegmentHelper.cxx:35
PRDTrackSegmentHelper::Imp::removeEntryFromVector
void removeEntryFromVector(std::vector< T * > &v, T *t)
Definition: PRDTrackSegmentHelper.cxx:65
PRDTrackSegmentHelper::trackMaterial
SoMaterial * trackMaterial(const Trk::Track *) const
Definition: PRDTrackSegmentHelper.cxx:521
VP1HelperClassBase::message
void message(const QString &) const
Definition: VP1HelperClassBase.cxx:49
PRDHandleBase
Definition: PRDHandleBase.h:35
PRDTrackSegmentHelper::visibleSegmentsChanged
void visibleSegmentsChanged(const std::vector< std::pair< const Trk::Segment *, const SoMaterial * > > &)
Definition: PRDTrackSegmentHelper.cxx:179
PRDTrackSegmentHelper::Imp::measurementToPRDs
static std::vector< const Trk::PrepRawData * > measurementToPRDs(const Trk::MeasurementBase *)
Definition: PRDTrackSegmentHelper.cxx:491
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
PRDTrackSegmentHelper::TracksAndSegments
Definition: PRDTrackSegmentHelper.h:52
PRDHandleBase.h
Segment.h