CbmRoot
|
Access to a MC data branch for time-based analysis. More...
#include <CbmMCDataArray.h>
Public Member Functions | |
virtual | ~CbmMCDataArray () |
TObject * | Get (const CbmLink *lnk) |
TObject * | Get (const CbmLink &lnk) |
TObject * | Get (Int_t fileNumber, Int_t eventNumber, Int_t index) |
Int_t | Size (Int_t fileNumber, Int_t eventNumber) |
Int_t | Size (const CbmLink &lnk) |
Int_t | Size (const CbmLink *lnk) |
Private Member Functions | |
CbmMCDataArray () | |
CbmMCDataArray (const char *branchName, const std::vector< std::list< TString >> &fileList) | |
CbmMCDataArray (const char *branchName) | |
CbmMCDataArray (const CbmMCDataArray &) | |
void | Done () |
void | FinishEvent () |
void | AddFriend (Int_t chainNum1, Int_t chainNum2) |
TObject * | LegacyGet (Int_t fileNumber, Int_t eventNumber, Int_t index) |
CbmMCDataArray & | operator= (const CbmMCDataArray &) |
ClassDef (CbmMCDataArray, 1) | |
Private Attributes | |
Int_t | fLegacy |
TClonesArray * | fLegacyArray |
If true, run in legacy mode. More... | |
TString | fBranchName |
Pointer to TClonesArray for legacy mode. More... | |
Int_t | fSize |
Name of the data branch. More... | |
std::vector< TChain * > | fChains |
Number of input file lists (one per source) More... | |
std::vector< TClonesArray * > | fTArr |
Arrays of chains (one per input source) More... | |
std::vector< Long64_t > | fN |
Data arrays from chains (one per input source) More... | |
std::vector< std::map< Int_t, TClonesArray * > > | fArrays |
Number of entries in chains. More... | |
Friends | |
class | CbmMCDataManager |
Access to a MC data branch for time-based analysis.
This class provides cached access to data for an event-by-event MC data branch, which is used when matching time-based reconstruction data to the input MC data. Data arrays from already used events are cached, which allows switching between events without the performance deterioration induced by frequent calls to TTree::GetEntry(). In legacy mode, the data from the current event will be retrieved from FairRootManager.
Definition at line 35 of file CbmMCDataArray.h.
|
inlinevirtual |
Destructor
Definition at line 40 of file CbmMCDataArray.h.
|
inlineprivate |
Default constructor. Should be called from CbmMCDataManager.
Definition at line 92 of file CbmMCDataArray.h.
|
private |
Standard constructor. Should be called from CbmMCDataManager.
branchName | Name of data branch |
fileList | Vector of file list (one for each input source) |
Definition at line 19 of file CbmMCDataArray.cxx.
|
private |
Constructor in legacy mode. Gets the branch from FairRootManager.
branchName | Name of data branch |
Definition at line 77 of file CbmMCDataArray.cxx.
References fBranchName, and fLegacyArray.
|
private |
Copy constructor. Should not be called.
|
private |
Make TChain number chainNum2 friend of TChain number chainNum2
chainNum1 | a number of chain for which AddFriend is called |
chainNum2 | number of chain which became a friend |
Definition at line 56 of file CbmMCDataArray.cxx.
References fChains, and fLegacy.
Referenced by CbmMCDataManager::InitBranch().
|
private |
|
private |
Done. Clear all arrays and delete file chain.
Definition at line 169 of file CbmMCDataArray.cxx.
References fChains, FinishEvent(), fLegacy, fSize, and i.
|
private |
|
inline |
Get an object by CbmLink reference
link | Reference to CbmLink object @value Pointer to linked object |
Definition at line 56 of file CbmMCDataArray.h.
References Get(), CbmLink::GetEntry(), CbmLink::GetFile(), and CbmLink::GetIndex().
|
inline |
Get an object by CbmLink pointer
link | Pointer to CbmLink object @value Pointer to linked object |
Definition at line 47 of file CbmMCDataArray.h.
References CbmLink::GetEntry(), CbmLink::GetFile(), and CbmLink::GetIndex().
Referenced by CbmLitMCTrackCreator::AddPoints(), CbmLitMCTrackCreator::AddRingParameters(), CbmEventBuilderQA::CalculateIsReconstructable(), CbmRichRingFinderIdeal::DoFind(), CbmLitTrackingQa::ElectronId(), CbmBinnedTrackerQA::Exec(), CbmKFParticleFinderQA::Exec(), CbmKFParticleFinder::Exec(), CbmKFTrackQA::Exec(), LxTBTrdFinder::Exec(), CbmEventBuilderQA::Exec(), LxTBMLFinder::Exec(), CbmBinnedDebug::Exec(), CbmLitMCTrackCreator::FairMCPointToLitMCPoint(), CbmL1::Fill_vMCTracks(), CbmTofAnaTestbeam::FillHistos(), CbmStsFindTracksQa::FillHitMap(), CbmLitMCTrackCreator::FillStationMaps(), Get(), CbmMuchToTofVectors::GetHits(), CbmTrdToTofVector::GetHits(), CbmMatchRecoToMC::GetMcTrackMotherIdsForRichHit(), CbmRichRecoTbQa::GetNofPrimaryMcTracks(), CbmBinnedTrackerQA::HandleMuch(), CbmBinnedTrackerQA::HandleSts(), CbmBinnedTrackerQA::HandleTof(), CbmBinnedTrackerQA::HandleTrd(), CbmTofHitFinderTBQA::Init(), CbmBinnedTrackerQA::Init(), LxTBTrdFinder::Init(), LxTBFinder::Init(), LxTBMLFinder::Init(), CbmGlobalTrackingQA::Init(), CbmL1::InputPerformance(), CbmRichRecoTbQa::IsCherenkovPhoton(), CbmRichRecoTbQa::IsCherenkovPhotonFromPion(), CbmRichRecoTbQa::IsCherenkovPhotonFromPrimaryElectron(), CbmRichRecoTbQa::IsCherenkovPhotonFromSecondaryElectron(), CbmBinnedTrackerQA::IterateTrdHits(), CbmMatchRecoToMC::MatchStsTracks(), CbmMatchRecoToMC::MatchTracks(), CbmRichUrqmdTest::NofHitsAndPoints(), CbmRichUrqmdTest::NofRings(), CbmLitTrackingQa::PionSuppression(), CbmRichUrqmdTest::PmtXYSource(), CbmStsFindTracksQa::ProcessEvent(), CbmLitTofQa::ProcessGlobalTracks(), CbmLitTrackingQa::ProcessGlobalTracks(), CbmRichGeoTest::ProcessHits(), CbmRichRecoTbQa::ProcessMc(), CbmLitTofQa::ProcessMC(), CbmRichGeoTest::ProcessMc(), CbmLitTrackingQa::ProcessMcTracks(), CbmLitTrackingQa::ProcessMvd(), CbmLitTofQa::ProcessTofHits(), CbmLitTofQa::ProcessTofTracks(), CbmLitFitQa::ProcessTrackMomentumAtVertex(), CbmLitFitQa::ProcessTrackParamsAtVertex(), CbmL1::ReadEvent(), CbmL1::ReadMCPoint(), CbmRecoQa::record(), CbmRichGeoTest::RingParameters(), CbmRichRecoTbQa::RingRecoEfficiency(), CbmMuchFindVectorsGem::SelectHitId(), CbmKFParticleFinderPID::SetMCPID(), CbmMuchFindVectorsGem::SetTrackId(), CbmTrdFindVectors::SetTrackId(), and CbmRichUrqmdTest::Vertex().
TObject * CbmMCDataArray::Get | ( | Int_t | fileNumber, |
Int_t | eventNumber, | ||
Int_t | index | ||
) |
Get an object by file number, event number and index
fileNumber | Input file number |
eventNumber | Event number |
index | Index of desired object in its array @value Pointer to referenced object |
Definition at line 112 of file CbmMCDataArray.cxx.
References eventNumber, fArrays, fChains, fLegacy, fN, fSize, fTArr, and LegacyGet().
|
private |
Get an object in legacy mode
fileNumber | Input number |
eventNumber | Event number |
index | Index of desired object in its array @value Pointer to referenced object |
Definition at line 101 of file CbmMCDataArray.cxx.
References eventNumber, and fLegacyArray.
Referenced by Get().
|
private |
|
inline |
Get a size of TClonesArray . Slow if TClonesArray not in cache
link | Reference to CbmLink object, index field is ignored @value Size of corresponding TClonesArray |
Definition at line 80 of file CbmMCDataArray.h.
References CbmLink::GetEntry(), CbmLink::GetFile(), and Size().
Referenced by Size().
|
inline |
Get a size of TClonesArray . Slow if TClonesArray not in cache
link | Pointer to CbmLink object, index field is ignored @value Size of corresponding TClonesArray |
Definition at line 86 of file CbmMCDataArray.h.
References CbmLink::GetEntry(), CbmLink::GetFile(), and Size().
Int_t CbmMCDataArray::Size | ( | Int_t | fileNumber, |
Int_t | eventNumber | ||
) |
Get a size of TClonesArray . Slow if TClonesArray not in cache
fileNumber | Input file number |
eventNumber | Event number @value Size of corresponding TClonesArray |
Definition at line 133 of file CbmMCDataArray.cxx.
References eventNumber, fArrays, fChains, fLegacy, fLegacyArray, fN, fSize, and fTArr.
Referenced by CbmLitMCTrackCreator::AddPoints(), CbmLitMCTrackCreator::AddRingParameters(), CbmRichRingFinderIdeal::DoFind(), CbmKFParticleFinderQA::Exec(), CbmKFParticleFinder::Exec(), CbmEventBuilderQA::Exec(), CbmBinnedDebug::Exec(), CbmL1::Fill_vMCTracks(), CbmLitClusteringQa::FillEventCounterHistograms(), CbmLitMCTrackCreator::FillStationMaps(), CbmRichRecoTbQa::GetNofPrimaryMcTracks(), CbmTofHitFinderTBQA::Init(), CbmBinnedTrackerQANew::Init(), CbmBinnedTrackerQA::Init(), LxTBTrdFinder::Init(), LxTBFinder::Init(), LxTBMLFinder::Init(), CbmGlobalTrackingQA::Init(), CbmRichUrqmdTest::NofHitsAndPoints(), CbmRichUrqmdTest::PmtXYSource(), CbmStsFindTracksQa::ProcessEvent(), CbmRichRecoTbQa::ProcessMc(), CbmLitTofQa::ProcessMC(), CbmRichGeoTest::ProcessMc(), CbmLitTrackingQa::ProcessMcTracks(), CbmL1::ReadEvent(), CbmRichGeoTest::RingParameters(), CbmRichRecoTbQa::RingRecoEfficiency(), Size(), and CbmRichUrqmdTest::Vertex().
|
friend |
Definition at line 36 of file CbmMCDataArray.h.
|
private |
Number of entries in chains.
Cached data arrays. The vector index is the input source number, the map index is the event number.
Definition at line 155 of file CbmMCDataArray.h.
Referenced by CbmMCDataArray(), FinishEvent(), Get(), and Size().
|
private |
Pointer to TClonesArray for legacy mode.
Definition at line 145 of file CbmMCDataArray.h.
Referenced by CbmMCDataArray().
|
private |
Number of input file lists (one per source)
Definition at line 147 of file CbmMCDataArray.h.
Referenced by AddFriend(), CbmMCDataArray(), Done(), Get(), and Size().
|
private |
Definition at line 143 of file CbmMCDataArray.h.
Referenced by AddFriend(), Done(), FinishEvent(), Get(), and Size().
|
private |
If true, run in legacy mode.
Definition at line 144 of file CbmMCDataArray.h.
Referenced by CbmMCDataArray(), LegacyGet(), and Size().
|
private |
Data arrays from chains (one per input source)
Definition at line 150 of file CbmMCDataArray.h.
Referenced by CbmMCDataArray(), Get(), and Size().
|
private |
Name of the data branch.
Definition at line 146 of file CbmMCDataArray.h.
Referenced by CbmMCDataArray(), Done(), FinishEvent(), Get(), and Size().
|
private |
Arrays of chains (one per input source)
Definition at line 149 of file CbmMCDataArray.h.
Referenced by CbmMCDataArray(), Get(), and Size().