ATLAS Offline Software
Typedefs | Enumerations | Functions
AmbiguityProcessor Namespace Reference

Typedefs

using AssociationTool = ToolHandle< Trk::IPRDtoTrackMapTool >
 
using AssociationMap = Trk::PRDtoTrackMap
 
using DuplicationCheckSet = std::set< std::vector< const Trk::PrepRawData * > >
 

Enumerations

enum  TrackFilterCategory { ScoreIsZero, TrackIsDuplicate, TrackAccepted, nCategories }
 

Functions

TrackFilterCategory categoriseTrack (const Trk::Track &track, const Trk::TrackScore &score, const bool dropDuplicates, const AssociationTool &associate, AssociationMap &map, DuplicationCheckSet &set)
 
float calculateFitQuality (const Trk::Track &track)
 
std::unique_ptr< Trk::TrackcreateNewFitQualityTrack (const Trk::Track &track)
 
int getUid ()
 

Typedef Documentation

◆ AssociationMap

Definition at line 26 of file AmbiguityProcessorUtility.h.

◆ AssociationTool

Definition at line 25 of file AmbiguityProcessorUtility.h.

◆ DuplicationCheckSet

using AmbiguityProcessor::DuplicationCheckSet = typedef std::set<std::vector<const Trk::PrepRawData*> >

Definition at line 27 of file AmbiguityProcessorUtility.h.

Enumeration Type Documentation

◆ TrackFilterCategory

Enumerator
ScoreIsZero 
TrackIsDuplicate 
TrackAccepted 
nCategories 

Definition at line 24 of file AmbiguityProcessorUtility.h.

Function Documentation

◆ calculateFitQuality()

float AmbiguityProcessor::calculateFitQuality ( const Trk::Track track)

Definition at line 24 of file AmbiguityProcessorUtility.cxx.

24  {
25  float result{0.0};
26  if (const auto *const quality=track.fitQuality(); quality and quality->numberDoF()>0 ){
27  result = quality->chiSquared()/quality->numberDoF();
28  }
29  return result;
30  }

◆ categoriseTrack()

TrackFilterCategory AmbiguityProcessor::categoriseTrack ( const Trk::Track track,
const Trk::TrackScore score,
const bool  dropDuplicates,
const AssociationTool associate,
AssociationMap map,
DuplicationCheckSet set 
)

Definition at line 15 of file AmbiguityProcessorUtility.cxx.

15  {
16  if (score == 0) return TrackFilterCategory::ScoreIsZero;
17  if (dropDuplicates){
18  if(const auto & [p, uniqueTrack] = set.insert(associate->getPrdsOnTrack( map, track)); not uniqueTrack) return TrackFilterCategory::TrackIsDuplicate;
19  }
21  }

◆ createNewFitQualityTrack()

std::unique_ptr< Trk::Track > AmbiguityProcessor::createNewFitQualityTrack ( const Trk::Track track)

Definition at line 33 of file AmbiguityProcessorUtility.cxx.

33  {
34  double reXi2 = 0.;
35  int nDF = 0;
36  const Trk::TrackStates* tsos = track.trackStateOnSurfaces();
37  auto vecTsos = std::make_unique<Trk::TrackStates>();
38  // loop over TSOS, copy TSOS and push into vector
40  Trk::TrackStates::const_iterator iTsosEnd = tsos->end();
41  for ( ; iTsos != iTsosEnd ; ++iTsos) {
42  const Trk::TrackStateOnSurface* newTsos = new Trk::TrackStateOnSurface(**iTsos);
43  vecTsos->push_back(newTsos);
44  if((*iTsos)->type(Trk::TrackStateOnSurface::Measurement)){ //Get the chi2 and number of hits
45  if ((*iTsos)->fitQualityOnSurface()) {
46  reXi2 += (*iTsos)->fitQualityOnSurface().chiSquared();
47  nDF += (*iTsos)->fitQualityOnSurface().numberDoF();
48  }
49  }
50  }
51  auto fq = std::make_unique<Trk::FitQuality>(reXi2,nDF-5);
53  info.addPatternRecoAndProperties(track.info());
54  Trk::TrackInfo newInfo;
56  info.addPatternReco(newInfo);
57  return std::make_unique<Trk::Track>(info, std::move(vecTsos), std::move(fq));
58  }

◆ getUid()

int AmbiguityProcessor::getUid ( )

Definition at line 60 of file AmbiguityProcessorUtility.cxx.

60  {
61  static std::atomic<std::uint32_t> uid { 0 };
62  return ++uid;
63  }
grepfile.info
info
Definition: grepfile.py:38
Trk::TrackInfo
Contains information about the 'fitter' of this track.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:32
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
get_generator_info.result
result
Definition: get_generator_info.py:21
AmbiguityProcessor::TrackAccepted
@ TrackAccepted
Definition: AmbiguityProcessorUtility.h:24
AmbiguityProcessor::nCategories
@ nCategories
Definition: AmbiguityProcessorUtility.h:24
AmbiguityProcessor::TrackIsDuplicate
@ TrackIsDuplicate
Definition: AmbiguityProcessorUtility.h:24
Trk::TrackInfo::SimpleAmbiguityProcessorTool
@ SimpleAmbiguityProcessorTool
Added because of compilation problems.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:156
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AmbiguityProcessor::ScoreIsZero
@ ScoreIsZero
Definition: AmbiguityProcessorUtility.h:24
DataVector< const Trk::TrackStateOnSurface >
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:232
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
xAOD::score
@ score
Definition: TrackingPrimitives.h:513
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
Trk::TrackInfo::setPatternRecognitionInfo
void setPatternRecognitionInfo(const TrackPatternRecoInfo &patternReco)
Method setting the pattern recognition algorithm.
Trk::TrackStateOnSurface::Measurement
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
Definition: TrackStateOnSurface.h:101
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.