 |
Belle II Software
release-05-01-25
|
11 #include <mdst/dataobjects/Track.h>
12 #include <framework/datastore/StoreArray.h>
13 #include <framework/logging/Logger.h>
22 if (trackFitResultArrayIndex < 0) {
23 B2DEBUG(20,
"TrackFitResult for the requested hypothesis is not set. Returning a nullptr instead.");
28 return trackFitResults[trackFitResultArrayIndex];
40 std::vector<Track::ChargedStableTrackFitResultPair> result;
46 for (
auto particleIndex : validParticleIndices) {
49 trackFitResults[indexInStoreArray]));
57 std::vector <short int> resultParticleIndex;
62 resultParticleIndex.push_back(i);
67 return resultParticleIndex;
80 auto bestMassFit = std::min_element(allFitRes.begin(), allFitRes.end(), [requestedType](
auto & a,
auto & b) {
81 const auto massDiffA = std::abs(a.first.getMass() - requestedType.getMass());
82 const auto massDiffB = std::abs(b.first.getMass() - requestedType.getMass());
84 return massDiffA < massDiffB;
87 return bestMassFit->second;
92 std::stringstream out;
99 out <<
"<br><b>-- Hypothesis " << count <<
" --</b><br>";
100 out << fitResults.second->getInfoHTML();
unsigned int getNumberOfFittedHypotheses() const
Returns the number of fitted hypothesis which are stored in this track.
const TrackFitResult * getTrackFitResult(const Const::ChargedStable &chargedStable) const
Access to TrackFitResults.
static const ParticleSet chargedStableSet
set of charged stable particles
Values of the result of a track fit with a given particle hypothesis.
std::vector< ChargedStableTrackFitResultPair > getTrackFitResults() const
Access to all track fit results at the same time.
const TrackFitResult * getTrackFitResultWithClosestMass(const Const::ChargedStable &requestedType) const
Return the track fit for a fit hypothesis with the closest mass.
Abstract base class for different kinds of events.
std::vector< short int > getValidIndices() const
Returns a vector of all fit hypothesis indices in m_trackFitIndices which have been set (meaning are ...
short int m_trackFitIndices[Const::ChargedStable::c_SetSize]
Index list of the TrackFitResults associated with this Track.
Provides a type-safe way to pass members of the chargedStableSet set.
Accessor to arrays stored in the data store.
virtual std::string getInfoHTML() const override
Return a short summary of this object's contents in HTML format.
int getIndex() const
This particle's index in the associated set.