55 McData tmp(std::move(other));
91 aTrk.ClearHitIndexes();
92 auto& vHitIds = aTrk.GetHitIndexes();
93 for (
int iP : aTrk.GetPointIndexes()) {
95 for (
int iH : point.GetHitIndexes()) {
96 if (std::find(vHitIds.begin(), vHitIds.end(), iH) == vHitIds.end()) {
103 aTrk.InitHitsInfo(vHits);
112 return std::string();
114 std::stringstream msg;
115 msg <<
"McData: " <<
fvTracks.size() <<
" tracks, " <<
fvPoints.size() <<
" points, ";
120 constexpr int kMaxLines = 100;
123 msg <<
"\n Track sample (first " << nTracks <<
" tracks):";
124 msg <<
'\n' << setw(10) << setfill(
' ') <<
fvTracks[0].ToString(verbose,
true);
125 for (
int i = 0; i < nTracks; ++i) {
126 msg <<
'\n' << setw(10) << setfill(
' ') <<
fvTracks[i].ToString(verbose);
128 msg <<
"\n Point sample (first " << nPoints <<
" points):";
129 msg <<
'\n' << setw(10) << setfill(
' ') <<
fvPoints[0].ToString(verbose,
true);
130 for (
int i = 0; i < nPoints; ++i) {
131 msg <<
'\n' << setw(10) << setfill(
' ') <<
fvPoints[i].ToString(verbose);
Data structure for internal tracking MC-information (header)
McData()
Default constructor.
This class represents a package for tracking-related data.
McData & operator=(const McData &other)
Copy assignment operator.
int GetNofPoints() const
Gets number of points in this event/TS.
std::unordered_map< McLinkKey, int > fmPointLinkMap
MC point internal index vs. link.
void Swap(McData &other) noexcept
Swap method.
void SetMcHitInfo(const ca::Vector< cbm::algo::ca::McHitInfo > &vHits)
Initialize information about points and hits association with MC track.
std::array< int, constants::size::MaxNdetectors > fvNofPointsUsed
Number of points used vs. detector.
void Clear()
Clears contents.
const ca::Vector< cbm::algo::ca::McHitInfo > * fpMcHitInfos
McData()
Default constructor.
ca::Vector< McPoint > fvPoints
Container of points.
int GetNofTracks() const
Gets number of tracks in this event/TS.
ca::Vector< McTrack > fvTracks
Container of tracks.
std::array< int, constants::size::MaxNdetectors > fvNofPointsOrig
Total number of points by detector.
std::unordered_map< McLinkKey, int > fmTrackLinkMap
MC track internal index vs. link.
std::string ToString(int verbose=1) const