24#include <unordered_map>
191 int iPoint = (*fpMcHitInfos)[iHit].GetBestMcPointId();
193 return GetPoint(iPoint).GetTrackId();
203 const auto& pointIds = (*fpMcHitInfos)[iHit].GetMcPointIds();
204 for (
int iPoint : pointIds) {
206 const auto& point =
GetPoint(iPoint);
207 match.
AddLink(point.GetTrackId(), 1.0f);
219 std::string
ToString(
int verbose = 1)
const;
Compile-time constants definition for the CA tracking algorithm.
Data structure to represent a MC link in CA tracking MC module.
Data structure to represent a set of MC links in CA tracking MC module.
Internal class describing a MC point for CA tracking QA and performance (header)
Class represents a MC track for CA tracking QA and performance (implementation)
const auto & GetTrack(int idx) const
Gets a reference to MC track by its internal index.
McData & operator=(const McData &other)
Copy assignment operator.
int FindInternalTrackIndex(int index, int event, int file) const
Finds an index of MC track in internal track container.
auto & GetTrack(int idx)
Gets a mutual reference to MC track by its internal index.
int GetNofPointsUsed(ca::EDetectorID detID) const
Gets used number of MC points in different detectors.
int GetNofPoints() const
Gets number of points in this event/TS.
const auto & GetTrackContainer() const
Gets a reference to the vector of tracks.
std::unordered_map< McLinkKey, int > fmPointLinkMap
MC point internal index vs. link.
void Swap(McData &other) noexcept
Swap method.
int GetPointGlobExtIndex(ca::EDetectorID detID, int iPointLocal) const
Calculates global index of MC point.
void SetMcHitInfo(const ca::Vector< cbm::algo::ca::McHitInfo > &vHits)
Initialize information about points and hits association with MC track.
int GetNofPointsOrig(ca::EDetectorID detID) const
Gets original number of MC points in different detectors.
std::array< int, constants::size::MaxNdetectors > fvNofPointsUsed
Number of points used vs. detector.
void Clear()
Clears contents.
void AddTrack(const McTrack &track)
const ca::Vector< cbm::algo::ca::McHitInfo > * fpMcHitInfos
McData()
Default constructor.
ca::Vector< McPoint > fvPoints
Container of points.
McMatch GetMcMatchForCaHit(int iHit) const
const auto & GetPoint(int idx) const
Gets a reference to MC point by its index.
void AddPoint(const McPoint &point)
int FindInternalPointIndex(ca::EDetectorID detID, int index, int event, int file) const
Finds an index of MC point in internal point container.
int GetBestMcPointIdForCaHit(int iHit) const
int GetNofTracks() const
Gets number of tracks in this event/TS.
int GetBestMcTrackIdForCaHit(int iHit) const
ca::Vector< McTrack > fvTracks
Container of tracks.
auto & GetPoint(int idx)
Gets mutual reference to MC point by its index.
const ca::Vector< cbm::algo::ca::McHitInfo > * GetMcHitInfo() const
Gets pointer to MC hit info container.
~McData()=default
Destructor.
std::array< int, constants::size::MaxNdetectors > fvNofPointsOrig
Total number of points by detector.
const auto & GetPointContainer() const
Gets a reference to the vector of points.
void ReserveNofPoints(int nPoints)
Reserves memory for points to avoid extra allocations.
std::unordered_map< McLinkKey, int > fmTrackLinkMap
MC track internal index vs. link.
void SetNofPointsOrig(ca::EDetectorID detID, int nPoints)
Sets original number of MC points in different detectors.
std::string ToString(int verbose=1) const
void ReserveNofTracks(int nTracks)
Reserves memory for tracks to avoid extra allocations.
auto & GetTrackContainer()
Gets a mutual reference to the vector of tracks.
int GetFirstPointIndex(ca::EDetectorID detID) const
Gets the first point index for a given detector subsystem.
int GetLastPointIndex(ca::EDetectorID detID) const
Gets the next index of point, which is expected being after the last one for a given detector.
Class describes a unified MC-point, used in CA tracking QA analysis.
ca::EDetectorID GetDetectorId() const
Gets detector ID.
int GetId() const
Gets index of this point in internal CA container.
McLinkKey GetLinkKey() const
Gets link key.
int GetId() const
Gets index of track.
ca::McLinkKey GetLinkKey() const
Gets link key.
TODO: SZh 8.11.2022: add selection of parameterisation.
EDetectorID
Enumeration for the tracking detector subsystems in CBM-CA.
void AddLink(int linkIndex, float linkWeight)