|
CbmRoot
|
Class CbmCaPerformance is an interface to communicate between. More...
#include <CbmCaMCModule.h>
Public Member Functions | |
| MCModule (int verb=1, int perfMode=1) | |
| Constructor. | |
| MCModule (const MCModule &)=delete | |
| Copy constructor. | |
| MCModule (MCModule &&)=delete | |
| Move constructor. | |
| ~MCModule ()=default | |
| Destructor. | |
| MCModule & | operator= (const MCModule &)=delete |
| Copy assignment operator. | |
| MCModule & | operator= (MCModule &&)=delete |
| Move assignment operator. | |
| void | Finish () |
| Defines performance action in the end of the run. | |
| const cbm::algo::ca::McData * | GetMcData () const |
| Gets a pointer to MC data object. | |
| void | InitEvent (CbmEvent *pEvent) |
| Defines performance action in the beginning of each event or time slice. | |
| bool | InitRun () |
| Defines action on the module in the beginning of the run. | |
| template<ca::EDetectorID DetId> | |
| std::tuple< int, std::vector< int > > | MatchHitWithMc (int iHitExt) |
| Matches hit with MC point. | |
| void | MatchHits () |
| Match reconstructed hits and MC points. | |
| void | MatchTracks () |
| Match reconstructed and MC data. | |
| void | ProcessEvent (CbmEvent *pEvent) |
| Processes event. | |
| void | RegisterFirstHitIndexes (const std::array< int, constants::size::MaxNdetectors+1 > &source) |
| Sets first hit indexes container in different detectors. | |
| void | SetDetector (ca::EDetectorID detID, bool flag) |
| Sets used detector subsystems. | |
| void | RegisterMcData (cbm::algo::ca::McData &mcData) |
| Registers MC data object. | |
| void | RegisterRecoTrackContainer (ca::Vector< CbmL1Track > &vRecoTracks) |
| Registers reconstructed track container. | |
| void | RegisterHitIndexContainer (ca::Vector< CbmL1HitId > &vHitIds) |
| Registers hit index container. | |
| void | RegisterParameters (std::shared_ptr< const ca::Parameters< double > > &pParameters) |
| Registers CA parameters object. | |
| void | RegisterQaHitContainer (ca::Vector< cbm::algo::ca::McHitInfo > &vQaHits) |
| Registers debug hit container. | |
| int | GetVerbosity () const |
| Gets verbosity level. | |
| void | CheckInit () const |
| Check class initialization. | |
| void | InitMcTrackInfo () |
| Initializes MC track. | |
| template<ca::EDetectorID DetID> | |
| void | MatchPointsAndHits () |
| Match sets of MC points and reconstructed hits for a given detector. | |
| void | MatchRecoAndMCTracks () |
| Matches reconstructed tracks with MC tracks. | |
| template<ca::EDetectorID DetID> | |
| std::optional< ca::McPoint > | FillMCPoint (int iExtId, int iEvent, int iFile) |
Private Types | |
| enum class | EMonitorKey { kMcTrack , kMcTrackReconstructable , kMcPoint , kRecoNevents , kMissedMatchesMvd , kMissedMatchesSts , kMissedMatchesMuch , kMissedMatchesTrd , kMissedMatchesTof , END } |
| Monitor keys. More... | |
Private Member Functions | |
| template<ca::EDetectorID DetID> | |
| std::optional< algo::ca::McPoint > | FillMCPoint (int iExtId, int iEvent, int iFile) |
| Fills a single detector-specific MC point. | |
| void | ReadMCTracks () |
| Reads MC tracks from external trees and saves them to MCDataObject. | |
| void | ReadMCPoints () |
| Reads MC points from external trees and saves them to MCDataObject. | |
| template<ca::EDetectorID DetID> | |
| void | ReadMCPointsForDetector () |
| Reads MC points in particular detector. | |
Private Attributes | |
| ca::Monitor< EMonitorKey > | fMonitor {"CA MC Module"} |
| Monitor. | |
| DetIdArr_t< bool > | fvbUseDet = {{false}} |
| Flag: is detector subsystem used. | |
| int | fVerbose = 1 |
| Verbosity level. | |
| int | fPerformanceMode = -1 |
| Mode of performance. | |
| std::shared_ptr< const ca::Parameters< double > > | fpParameters = nullptr |
| Pointer to tracking parameters object. | |
| const CbmTimeSlice * | fpTimeSlice = nullptr |
| Current time slice. | |
| CbmMCEventList * | fpMCEventList = nullptr |
| MC event list. | |
| CbmMCDataObject * | fpMCEventHeader = nullptr |
| MC event header. | |
| CbmMCDataArray * | fpMCTracks = nullptr |
| MC tracks input. | |
| DetIdArr_t< CbmMCDataArray * > | fvpBrPoints = {{nullptr}} |
| Array of points vs. detector. | |
| DetIdArr_t< TClonesArray * > | fvpBrHitMatches = {{nullptr}} |
| Array of hit match branches vs. detector. | |
| std::set< std::pair< int, int > > | fFileEventIDs |
| Set of file and event indexes: first - iFile, second - iEvent. | |
| int | fBestMcFile = -1 |
| Index of bestly matched MC file. | |
| int | fBestMcEvent = -1 |
| Index of bestly matched MC event. | |
| algo::ca::McData * | fpMcData = nullptr |
| MC information (hits and tracks) instance. | |
| ca::Vector< CbmL1Track > * | fpvRecoTracks = nullptr |
| Pointer to reconstructed track container. | |
| ca::Vector< CbmL1HitId > * | fpvHitIds = nullptr |
| Pointer to hit index container. | |
| ca::Vector< algo::ca::McHitInfo > * | fpvQaHits = nullptr |
| Pointer to QA hit container. | |
| std::unordered_map< uint32_t, double > | fmTofRpcZpos |
| A map of TOF RPC reference z-position vs. address. | |
| const std::array< int, constants::size::MaxNdetectors+1 > * | fpvFstHitId = nullptr |
| Pointer to array of first hit indexes in the detector subsystem. | |
Class CbmCaPerformance is an interface to communicate between.
Definition at line 54 of file CbmCaMCModule.h.
|
strongprivate |
Monitor keys.
Definition at line 189 of file CbmCaMCModule.h.
|
inline |
Constructor.
| verbosity | Verbosity level |
| perfMode | Performance mode (defines cut on number of consecutive stations with hit or point) |
Definition at line 61 of file CbmCaMCModule.h.
|
delete |
Copy constructor.
|
delete |
Move constructor.
|
default |
Destructor.
| void MCModule::CheckInit | ( | ) | const |
Check class initialization.
Definition at line 384 of file CbmCaMCModule.cxx.
|
private |
Fills a single detector-specific MC point.
| DetID | Detector subsystem ID |
| [in] | iExtId | Index of point in the external points container |
| [in] | iEvent | EventID of point in the external points container |
| [in] | iFile | FileID of point int the external points container |
| [out] | intMCPoint | Reference to the internal tracking MC point object (ca::tools::MCData) |
| std::optional< ca::McPoint > cbm::ca::MCModule::FillMCPoint | ( | int | iExtId, |
| int | iEvent, | ||
| int | iFile ) |
TODO: Set from track
Definition at line 324 of file CbmCaMCModule.h.
| void MCModule::Finish | ( | ) |
Defines performance action in the end of the run.
Definition at line 284 of file CbmCaMCModule.cxx.
|
inline |
Gets a pointer to MC data object.
Definition at line 86 of file CbmCaMCModule.h.
|
inline |
Gets verbosity level.
Definition at line 154 of file CbmCaMCModule.h.
| void MCModule::InitEvent | ( | CbmEvent * | pEvent | ) |
Defines performance action in the beginning of each event or time slice.
| pEvent | Pointer to a current CbmEvent |
Definition at line 185 of file CbmCaMCModule.cxx.
| void MCModule::InitMcTrackInfo | ( | ) |
Initializes MC track.
Initializes information about arrangement of points and hits of MC tracks within stations and the status of track ability to be reconstructed, 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 237 of file CbmCaMCModule.cxx.
| bool MCModule::InitRun | ( | ) |
Defines action on the module in the beginning of the run.
Definition at line 59 of file CbmCaMCModule.cxx.
| void MCModule::MatchHits | ( | ) |
Match reconstructed hits and MC points.
Definition at line 294 of file CbmCaMCModule.cxx.
| std::tuple< int, std::vector< int > > cbm::ca::MCModule::MatchHitWithMc | ( | int | iHitExt | ) |
Matches hit with MC point.
| DetId | Detector ID |
| iHitExt | External index of hit |
This method finds a match for a given hit or matches for hits clusters (in case of STS), finds the best link in the match and returns the corresponding global ID of the MC points.
Definition at line 273 of file CbmCaMCModule.h.
| void cbm::ca::MCModule::MatchPointsAndHits | ( | ) |
Match sets of MC points and reconstructed hits for a given detector.
| DetID | Index of the detector |
Writes indexes of MC points to each hit and indexes of hits to each MC point.
Definition at line 474 of file CbmCaMCModule.h.
| void MCModule::MatchRecoAndMCTracks | ( | ) |
Matches reconstructed tracks with MC tracks.
In the procedure, the maps of associated MC track indexes to corresponding number of hits are filled out and the max purity is calculated for each reconstructed track in the TS/event. If the value of purity for a given MC track is larger then a threshold, the corresponding track index is saved to the reconstructed track object, in the same time the index of the reconstructed track object is saved to this MC track object. If purity for the MC track does not pass the threshold, its index will not be accounted as a matched track, and the index of reconstructed track will be added as an index of "touched" track.
Definition at line 321 of file CbmCaMCModule.cxx.
| void MCModule::MatchTracks | ( | ) |
Match reconstructed and MC data.
Runs matching of reconstructed tracks with MC ones. Reconstructed tracks are updated with true information.
Definition at line 307 of file CbmCaMCModule.cxx.
| void MCModule::ProcessEvent | ( | CbmEvent * | pEvent | ) |
Processes event.
Fills histograms and tables, should be called after the tracking done
Definition at line 233 of file CbmCaMCModule.cxx.
|
private |
Reads MC points from external trees and saves them to MCDataObject.
Definition at line 555 of file CbmCaMCModule.cxx.
|
private |
Reads MC points in particular detector.
Definition at line 497 of file CbmCaMCModule.h.
Referenced by MCModule::ReadMCPointsForDetector< ca::EDetectorID::kTof >().
|
private |
Reads MC tracks from external trees and saves them to MCDataObject.
iFile, iEvent
Definition at line 580 of file CbmCaMCModule.cxx.
|
inline |
Sets first hit indexes container in different detectors.
| source | Array of indexes |
Definition at line 122 of file CbmCaMCModule.h.
|
inline |
Registers hit index container.
| vHitIds | Reference to hit index container |
Definition at line 143 of file CbmCaMCModule.h.
|
inline |
Registers MC data object.
| mcData | Instance of MC data |
Definition at line 135 of file CbmCaMCModule.h.
|
inline |
Registers CA parameters object.
| pParameters | A shared pointer to the parameters object |
Definition at line 147 of file CbmCaMCModule.h.
|
inline |
Registers debug hit container.
| vQaHits | Reference to debug hit container |
Definition at line 151 of file CbmCaMCModule.h.
|
inline |
Registers reconstructed track container.
| vRecoTrack | Reference to reconstructed track container |
Definition at line 139 of file CbmCaMCModule.h.
|
inline |
Sets used detector subsystems.
| detID | Id of detector |
| flag | Flag: true - detector is used |
Definition at line 131 of file CbmCaMCModule.h.
|
private |
Index of bestly matched MC event.
Definition at line 222 of file CbmCaMCModule.h.
|
private |
Index of bestly matched MC file.
Definition at line 221 of file CbmCaMCModule.h.
|
private |
Set of file and event indexes: first - iFile, second - iEvent.
Definition at line 220 of file CbmCaMCModule.h.
|
private |
Definition at line 202 of file CbmCaMCModule.h.
|
private |
A map of TOF RPC reference z-position vs. address.
Definition at line 236 of file CbmCaMCModule.h.
|
private |
Mode of performance.
Definition at line 207 of file CbmCaMCModule.h.
|
private |
MC information (hits and tracks) instance.
Definition at line 226 of file CbmCaMCModule.h.
|
private |
MC event header.
Definition at line 213 of file CbmCaMCModule.h.
|
private |
MC event list.
Definition at line 212 of file CbmCaMCModule.h.
|
private |
MC tracks input.
Definition at line 214 of file CbmCaMCModule.h.
|
private |
Pointer to tracking parameters object.
Definition at line 209 of file CbmCaMCModule.h.
|
private |
Current time slice.
Definition at line 211 of file CbmCaMCModule.h.
|
private |
Pointer to array of first hit indexes in the detector subsystem.
This array must be initialized in the run initialization function.
Definition at line 241 of file CbmCaMCModule.h.
|
private |
Pointer to hit index container.
Definition at line 230 of file CbmCaMCModule.h.
|
private |
Pointer to QA hit container.
Definition at line 231 of file CbmCaMCModule.h.
|
private |
Pointer to reconstructed track container.
Definition at line 229 of file CbmCaMCModule.h.
|
private |
Flag: is detector subsystem used.
Definition at line 205 of file CbmCaMCModule.h.
|
private |
Verbosity level.
Definition at line 206 of file CbmCaMCModule.h.
|
private |
Array of hit match branches vs. detector.
Definition at line 217 of file CbmCaMCModule.h.
|
private |
Array of points vs. detector.
Definition at line 216 of file CbmCaMCModule.h.