Belle II Software  release-06-01-15
Track.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 #pragma once
9 #include <framework/gearbox/Const.h>
10 #include <framework/datastore/RelationsObject.h>
11 #include <mdst/dataobjects/TrackFitResult.h>
12 #include <algorithm>
13 
14 namespace Belle2 {
25  class Track : public RelationsObject {
26  public:
27 
32  typedef std::pair< Const::ChargedStable, const TrackFitResult*> ChargedStableTrackFitResultPair;
33 
41  explicit Track(float qualityIndicator = 0.) : m_qualityIndicator(qualityIndicator)
42  {
44  }
45 
58  const TrackFitResult* getTrackFitResult(const Const::ChargedStable& chargedStable) const;
59 
78  const TrackFitResult* getTrackFitResultWithClosestMass(const Const::ChargedStable& requestedType) const;
79 
85  std::vector<ChargedStableTrackFitResultPair> getTrackFitResults() const;
86 
94  void setTrackFitResultIndex(const Const::ChargedStable& chargedStable, short index)
95  {
96  m_trackFitIndices[chargedStable.getIndex()] = index;
97  }
98 
100  unsigned int getNumberOfFittedHypotheses() const;
101 
118  float getQualityIndicator() const
119  {
120  return m_qualityIndicator;
121  }
122 
124  virtual std::string getInfoHTML() const override;
125 
126  private:
129 
134  std::vector < short int > getValidIndices() const;
135 
141  float const m_qualityIndicator;
142 
144  };
146 }
Provides a type-safe way to pass members of the chargedStableSet set.
Definition: Const.h:470
static const unsigned int c_SetSize
Number of elements (for use in array bounds etc.)
Definition: Const.h:496
int getIndex() const
This particle's index in the associated set.
Definition: Const.h:342
static const ParticleSet chargedStableSet
set of charged stable particles
Definition: Const.h:499
Defines interface for accessing relations of objects in StoreArray.
Values of the result of a track fit with a given particle hypothesis.
Class that bundles various TrackFitResults.
Definition: Track.h:25
std::vector< ChargedStableTrackFitResultPair > getTrackFitResults() const
Access to all track fit results at the same time.
Definition: Track.cc:35
virtual std::string getInfoHTML() const override
Return a short summary of this object's contents in HTML format.
Definition: Track.cc:88
ClassDefOverride(Track, 4)
Class that bundles various TrackFitResults.
const TrackFitResult * getTrackFitResult(const Const::ChargedStable &chargedStable) const
Access to TrackFitResults.
Definition: Track.cc:17
std::vector< short int > getValidIndices() const
Returns a vector of all fit hypothesis indices in m_trackFitIndices which have been set (meaning are ...
Definition: Track.cc:53
float getQualityIndicator() const
Getter for quality indicator for classification of fake vs.
Definition: Track.h:118
void setTrackFitResultIndex(const Const::ChargedStable &chargedStable, short index)
Set an index (for positive values) or unavailability-code (with negative values) for a specific mass ...
Definition: Track.h:94
unsigned int getNumberOfFittedHypotheses() const
Returns the number of fitted hypothesis which are stored in this track.
Definition: Track.cc:29
std::pair< Const::ChargedStable, const TrackFitResult * > ChargedStableTrackFitResultPair
Pair to hold the particle hypothesis used for the fit as first entry and the result of the track fit ...
Definition: Track.h:32
const TrackFitResult * getTrackFitResultWithClosestMass(const Const::ChargedStable &requestedType) const
Return the track fit for a fit hypothesis with the closest mass.
Definition: Track.cc:68
Track(float qualityIndicator=0.)
Constructor of Track without any attached TrackFitResults.
Definition: Track.h:41
short int m_trackFitIndices[Const::ChargedStable::c_SetSize]
Index list of the TrackFitResults associated with this Track.
Definition: Track.h:128
float const m_qualityIndicator
Quality indicator for classification of fake vs.
Definition: Track.h:141
Abstract base class for different kinds of events.