|
CbmRoot
|
This class represents a package for tracking-related data. More...
#include <CaMcData.h>
Public Member Functions | |
| McData () | |
| Default constructor. | |
| McData (const McData &other) | |
| Copy constructor. | |
| McData (McData &&other) noexcept | |
| Move constructor. | |
| ~McData ()=default | |
| Destructor. | |
| McData & | operator= (const McData &other) |
| Copy assignment operator. | |
| McData & | operator= (McData &&other) noexcept |
| Move assignment operator. | |
| void | Swap (McData &other) noexcept |
| Swap method. | |
| void | AddPoint (const McPoint &point) |
| void | AddTrack (const McTrack &track) |
| void | Clear () |
| Clears contents. | |
| int | FindInternalPointIndex (ca::EDetectorID detID, int index, int event, int file) const |
| Finds an index of MC point in internal point container. | |
| int | FindInternalTrackIndex (int index, int event, int file) const |
| Finds an index of MC track in internal track container. | |
| 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. | |
| int | GetPointGlobExtIndex (ca::EDetectorID detID, int iPointLocal) const |
| Calculates global index of MC point. | |
| int | GetNofTracks () const |
| Gets number of tracks in this event/TS. | |
| int | GetNofPoints () const |
| Gets number of points in this event/TS. | |
| int | GetNofPointsOrig (ca::EDetectorID detID) const |
| Gets original number of MC points in different detectors. | |
| int | GetNofPointsUsed (ca::EDetectorID detID) const |
| Gets used number of MC points in different detectors. | |
| const auto & | GetPoint (int idx) const |
| Gets a reference to MC point by its index. | |
| auto & | GetPoint (int idx) |
| Gets mutual reference to MC point by its index. | |
| const auto & | GetPointContainer () const |
| Gets a reference to the vector of points. | |
| const auto & | GetTrack (int idx) const |
| Gets a reference to MC track by its internal index. | |
| auto & | GetTrack (int idx) |
| Gets a mutual reference to MC track by its internal index. | |
| const auto & | GetTrackContainer () const |
| Gets a reference to the vector of tracks. | |
| auto & | GetTrackContainer () |
| Gets a mutual reference to the vector of tracks. | |
| void | SetMcHitInfo (const ca::Vector< cbm::algo::ca::McHitInfo > &vHits) |
| Initialize information about points and hits association with MC track. | |
| void | ReserveNofTracks (int nTracks) |
| Reserves memory for tracks to avoid extra allocations. | |
| void | ReserveNofPoints (int nPoints) |
| Reserves memory for points to avoid extra allocations. | |
| void | SetNofPointsOrig (ca::EDetectorID detID, int nPoints) |
| Sets original number of MC points in different detectors. | |
| const ca::Vector< cbm::algo::ca::McHitInfo > * | GetMcHitInfo () const |
| Gets pointer to MC hit info container. | |
| int | GetBestMcPointIdForCaHit (int iHit) const |
| int | GetBestMcTrackIdForCaHit (int iHit) const |
| McMatch | GetMcMatchForCaHit (int iHit) const |
| std::string | ToString (int verbose=1) const |
Private Attributes | |
| ca::Vector< McPoint > | fvPoints = {"ca::algo::ca::McData::fvPoints"} |
| Container of points. | |
| ca::Vector< McTrack > | fvTracks = {"ca::algo::ca::McData::fvTracks"} |
| Container of tracks. | |
| std::array< int, constants::size::MaxNdetectors > | fvNofPointsOrig = {0} |
| Total number of points by detector. | |
| std::array< int, constants::size::MaxNdetectors > | fvNofPointsUsed = {0} |
| Number of points used vs. detector. | |
| std::unordered_map< McLinkKey, int > | fmPointLinkMap = {} |
| MC point internal index vs. link. | |
| std::unordered_map< McLinkKey, int > | fmTrackLinkMap = {} |
| MC track internal index vs. link. | |
| const ca::Vector< cbm::algo::ca::McHitInfo > * | fpMcHitInfos = {nullptr} |
This class represents a package for tracking-related data.
Definition at line 33 of file CaMcData.h.
| McData::McData | ( | ) |
Default constructor.
Definition at line 22 of file CaMcData.cxx.
| McData::McData | ( | const McData & | other | ) |
Copy constructor.
Definition at line 26 of file CaMcData.cxx.
|
noexcept |
Move constructor.
Definition at line 38 of file CaMcData.cxx.
|
default |
Destructor.
|
inline |
Adds an MC point to points container and a corresponding link key to the point index map
| point | MC point object |
Definition at line 245 of file CaMcData.h.
|
inline |
Adds an MC track to tracks container and a corresponding link key to the link index map
| track | MC track object |
Definition at line 254 of file CaMcData.h.
| void McData::Clear | ( | ) |
Clears contents.
Definition at line 76 of file CaMcData.cxx.
|
inline |
Finds an index of MC point in internal point container.
| detID | Detector ID |
| index | Index of MC point in external point container |
| event | Index of MC event |
| file | Index of MC file |
Definition at line 78 of file CaMcData.h.
|
inline |
Finds an index of MC track in internal track container.
| index | Index of MC track in external track container |
| event | Index of MC event |
| file | Index of MC file |
Definition at line 91 of file CaMcData.h.
|
inline |
Definition at line 180 of file CaMcData.h.
|
inline |
Definition at line 188 of file CaMcData.h.
|
inline |
Gets the first point index for a given detector subsystem.
| detID | Detector ID |
Definition at line 99 of file CaMcData.h.
|
inline |
Gets the next index of point, which is expected being after the last one for a given detector.
| detID | Detector ID |
Definition at line 106 of file CaMcData.h.
|
inline |
Gets pointer to MC hit info container.
Definition at line 178 of file CaMcData.h.
|
inline |
Definition at line 199 of file CaMcData.h.
|
inline |
Gets number of points in this event/TS.
Definition at line 126 of file CaMcData.h.
|
inline |
Gets original number of MC points in different detectors.
| detID | Detector ID |
Definition at line 130 of file CaMcData.h.
|
inline |
Gets used number of MC points in different detectors.
| detID | Detector ID |
Definition at line 134 of file CaMcData.h.
|
inline |
Gets number of tracks in this event/TS.
Definition at line 123 of file CaMcData.h.
|
inline |
Gets mutual reference to MC point by its index.
Definition at line 142 of file CaMcData.h.
|
inline |
Gets a reference to MC point by its index.
Definition at line 137 of file CaMcData.h.
|
inline |
Gets a reference to the vector of points.
Definition at line 145 of file CaMcData.h.
|
inline |
Calculates global index of MC point.
| iPointLocal | Local index of MC psinoint |
| detID | Detector ID |
The function calculates global external index of MC point as a sum of a given local index and total provided number of points in previous detector subsystem.
Definition at line 117 of file CaMcData.h.
|
inline |
Gets a mutual reference to MC track by its internal index.
Definition at line 151 of file CaMcData.h.
|
inline |
Gets a reference to MC track by its internal index.
Definition at line 148 of file CaMcData.h.
|
inline |
Gets a mutual reference to the vector of tracks.
Definition at line 157 of file CaMcData.h.
|
inline |
Gets a reference to the vector of tracks.
Definition at line 154 of file CaMcData.h.
Copy assignment operator.
Definition at line 42 of file CaMcData.cxx.
Move assignment operator.
Definition at line 52 of file CaMcData.cxx.
|
inline |
Reserves memory for points to avoid extra allocations.
Definition at line 170 of file CaMcData.h.
|
inline |
Reserves memory for tracks to avoid extra allocations.
Definition at line 167 of file CaMcData.h.
| void McData::SetMcHitInfo | ( | const ca::Vector< cbm::algo::ca::McHitInfo > & | vHits | ) |
Initialize information about points and hits association with MC track.
| vHits | Vector of hit objects Initialize tracks: defines indexes of hits and points related to the track, calculates max number of points and hits on a station, number of consecutive stations containing a hit or point and number of stations and points with hits. |
Definition at line 86 of file CaMcData.cxx.
|
inline |
Sets original number of MC points in different detectors.
| detID | Detector ID |
| nPoints | Number of points |
Definition at line 175 of file CaMcData.h.
|
noexcept |
Swap method.
Definition at line 63 of file CaMcData.cxx.
| std::string McData::ToString | ( | int | verbose = 1 | ) | const |
Prints an example of tracks and points
| verbose | Verbose level:
|
Definition at line 109 of file CaMcData.cxx.
|
private |
MC point internal index vs. link.
Definition at line 232 of file CaMcData.h.
|
private |
MC track internal index vs. link.
Definition at line 233 of file CaMcData.h.
|
private |
Definition at line 235 of file CaMcData.h.
|
private |
Total number of points by detector.
Definition at line 229 of file CaMcData.h.
|
private |
Number of points used vs. detector.
Definition at line 230 of file CaMcData.h.
|
private |
Container of points.
Definition at line 226 of file CaMcData.h.
|
private |
Container of tracks.
Definition at line 227 of file CaMcData.h.