CbmRoot
Loading...
Searching...
No Matches
CbmTrackMatchNew.cxx
Go to the documentation of this file.
1/* Copyright (C) 2013-2020 GSI/JINR-LIT, Darmstadt/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Andrey Lebedev [committer], Florian Uhlig */
4
10#include "CbmTrackMatchNew.h"
11
12#include "CbmLink.h" // for CbmLink
13
14#include <sstream> // for operator<<, basic_ostream, stringstream
15#include <string> // for char_traits
16#include <utility> // for make_pair
17#include <vector> // for vector
18
19using std::make_pair;
20using std::stringstream;
21
22CbmTrackMatchNew::CbmTrackMatchNew() : CbmMatch(), fNofTrueHits(0), fNofWrongHits(0) {}
23
25
26std::string CbmTrackMatchNew::ToString() const
27{
28 stringstream ss;
29 ss << "CbmMatch: ";
30 int32_t nofLinks = GetNofLinks();
31 ss << "nofLinks=" << nofLinks << "\n";
32 for (int32_t i = 0; i < nofLinks; i++) {
33 const CbmLink& link = fLinks[i];
34 ss << link.ToString();
35 }
36 ss << "| totalWeight=" << fTotalWeight << ", matchedIndex=" << fMatchedIndex << " nofTrueHits=" << fNofTrueHits
37 << " nofWrongHits=" << fNofWrongHits << std::endl;
38 return ss.str();
39}
40
ClassImp(CbmTrackMatchNew)
int32_t GetNofLinks() const
Definition CbmMatch.h:42
double fTotalWeight
Definition CbmMatch.h:59
int32_t fMatchedIndex
Definition CbmMatch.h:60
std::vector< CbmLink > fLinks
Definition CbmMatch.h:58
virtual ~CbmTrackMatchNew()
Destructor.
CbmTrackMatchNew()
Default constructor.
virtual std::string ToString() const
Return string representation of the object.