Belle II Software  release-05-02-19
Track.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2012 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Martin Heck, Marco Staric, Nils Braun *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 #include <framework/gearbox/Const.h>
12 #include <framework/datastore/RelationsObject.h>
13 #include <mdst/dataobjects/TrackFitResult.h>
14 #include <algorithm>
15 
16 namespace Belle2 {
27  class Track : public RelationsObject {
28  public:
29 
34  typedef std::pair< Const::ChargedStable, const TrackFitResult*> ChargedStableTrackFitResultPair;
35 
43  explicit Track(float qualityIndicator = 0.) : m_qualityIndicator(qualityIndicator)
44  {
46  }
47 
60  const TrackFitResult* getTrackFitResult(const Const::ChargedStable& chargedStable) const;
61 
80  const TrackFitResult* getTrackFitResultWithClosestMass(const Const::ChargedStable& requestedType) const;
81 
87  std::vector<ChargedStableTrackFitResultPair> getTrackFitResults() const;
88 
96  void setTrackFitResultIndex(const Const::ChargedStable& chargedStable, short index)
97  {
98  m_trackFitIndices[chargedStable.getIndex()] = index;
99  }
100 
102  unsigned int getNumberOfFittedHypotheses() const;
103 
120  float getQualityIndicator() const
121  {
122  return m_qualityIndicator;
123  }
124 
126  virtual std::string getInfoHTML() const override;
127 
128  private:
131 
136  std::vector < short int > getValidIndices() const;
137 
143  float const m_qualityIndicator;
144 
145  ClassDefOverride(Track, 4);
146  };
148 }
Belle2::Const::ChargedStable::c_SetSize
static const unsigned int c_SetSize
Number of elements (for use in array bounds etc.)
Definition: Const.h:491
Belle2::Track::getNumberOfFittedHypotheses
unsigned int getNumberOfFittedHypotheses() const
Returns the number of fitted hypothesis which are stored in this track.
Definition: Track.cc:31
Belle2::Track::getTrackFitResult
const TrackFitResult * getTrackFitResult(const Const::ChargedStable &chargedStable) const
Access to TrackFitResults.
Definition: Track.cc:19
Belle2::Track::Track
Track(float qualityIndicator=0.)
Constructor of Track without any attached TrackFitResults.
Definition: Track.h:51
Belle2::Const::chargedStableSet
static const ParticleSet chargedStableSet
set of charged stable particles
Definition: Const.h:494
Belle2::Track::m_qualityIndicator
const float m_qualityIndicator
Quality indicator for classification of fake vs.
Definition: Track.h:151
Belle2::Track::ClassDefOverride
ClassDefOverride(Track, 4)
Class that bundles various TrackFitResults.
Belle2::TrackFitResult
Values of the result of a track fit with a given particle hypothesis.
Definition: TrackFitResult.h:59
Belle2::Track::getTrackFitResults
std::vector< ChargedStableTrackFitResultPair > getTrackFitResults() const
Access to all track fit results at the same time.
Definition: Track.cc:37
Belle2::Track::setTrackFitResultIndex
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:104
Belle2::Track::getTrackFitResultWithClosestMass
const TrackFitResult * getTrackFitResultWithClosestMass(const Const::ChargedStable &requestedType) const
Return the track fit for a fit hypothesis with the closest mass.
Definition: Track.cc:70
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::Track::getValidIndices
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:55
Belle2::Track::ChargedStableTrackFitResultPair
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:42
Belle2::Track::getQualityIndicator
float getQualityIndicator() const
Getter for quality indicator for classification of fake vs.
Definition: Track.h:128
Belle2::Track::m_trackFitIndices
short int m_trackFitIndices[Const::ChargedStable::c_SetSize]
Index list of the TrackFitResults associated with this Track.
Definition: Track.h:138
Belle2::RelationsObject
RelationsInterface< TObject > RelationsObject
Provides interface for getting/adding relations to objects in StoreArrays.
Definition: RelationsObject.h:443
Belle2::Const::ChargedStable
Provides a type-safe way to pass members of the chargedStableSet set.
Definition: Const.h:465
Belle2::Track
Class that bundles various TrackFitResults.
Definition: Track.h:35
Belle2::Track::getInfoHTML
virtual std::string getInfoHTML() const override
Return a short summary of this object's contents in HTML format.
Definition: Track.cc:90
Belle2::Const::ParticleType::getIndex
int getIndex() const
This particle's index in the associated set.
Definition: Const.h:337