Project

General

Profile

Actions

Sim-Development #1287

closed

Store digis and their matches in std::vector instead of in TClonesArrays

Added by Volker Friese about 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
06/03/2019
Due date:
09/10/2019
% Done:

100%

Estimated time:
40.00 h
Spent time:

Description

The next step in optimising the digitization procedure is to store the produced digi objects (and their associated match objects) in std::vector containers instead of in TClonesArrays as we do now. This will allow to remove the inheritance of CbmDigi from TObject.

ROOT can handle STL containers in branches.


Related issues

Related to Simulation - Sim-Development #1345: Store digis and their matches in std::vector instead of in TClonesArraysClosedVolker Friese10/14/201912/20/2019

Actions
Follows Simulation - Sim-Development #1091: Common scheme for storing digi match objectsClosedVolker Friese06/21/201805/31/2019

Actions
Actions #1

Updated by Volker Friese about 3 years ago

  • Due date set to 06/03/2019
  • Start date changed from 05/27/2019 to 06/03/2019
  • Follows Sim-Development #1091: Common scheme for storing digi match objects added
Actions #2

Updated by Volker Friese about 3 years ago

  • Due date changed from 06/03/2019 to 06/21/2019
  • Estimated time set to 40.00 h
Actions #3

Updated by Volker Friese about 3 years ago

  • Status changed from Assigned to In Progress
  • % Done changed from 0 to 10

In a preparatory stage, I introduce unique pointers for the transport of digis and matches through the DAQ. Up to now, I see no performance impact (test on 1000 central Au+Au events (STS only) in the following modes: event-by-event; time-slice of 1000 ns with 10 events per timeslice on average; all data in one timeslice).

Actions #4

Updated by Volker Friese about 3 years ago

  • % Done changed from 10 to 30
Actions #5

Updated by Volker Friese almost 3 years ago

Performance for vector implementation compared to TClonesArray. See report at Software meeting of 11 July 2019. No penalty found.

Introduced abstract interface CbmDigiManager for access to digi and digiMatch branches. Covers vectors as well as TClonesArrays (r14588).

Actions #6

Updated by Volker Friese almost 3 years ago

  • % Done changed from 30 to 50

The performance tests for switching to std::vector for digis are described in CBM-CN-19001.

Actions #7

Updated by Volker Friese almost 3 years ago

  • % Done changed from 50 to 60
The digi output for STS was changed to std::vector with r14594. CbmDigiManager was introduced for STS in the following consumer classes:
  • CbmStsDigitizerQa
  • CbmStsClusterAnalysis
  • CbmStsFindClusters
  • CbmStsMatchReco
  • CbmStsReco
  • CbmMatchRecoToMC

There may be more, but that is hard to find out. All regular tests are running through.

Actions #8

Updated by Florian Uhlig almost 3 years ago

I found two more places where the CbmDigiManager was not introduced or not introduced completely. The first occurrence in CbmKFParticleFinderPID was fixed with r14704, the second in CbmMatchRecoToMC with r14723.

Actions #9

Updated by Florian Uhlig almost 3 years ago

To search for all occurrences where the CbmStsDigi is accesses from a TClonesArray I ran the following command

find . -name "*.cxx" -exec grep -H GetObject {} \; | grep -i stsdigi

which results in the following list of files where the CbmStsDigi is accessed from a TClonesArray

./KF/KFQA/CbmKFTrackFitQA.cxx: listStsDigi = dynamic_cast<TClonesArray*>( fManger->GetObject("StsDigi") );
./KF/KFQA/CbmKFTrackFitQA.cxx: listStsDigiMatch = dynamic_cast<TClonesArray*>( fManger->GetObject("StsDigiMatch") );
./L1/CbmL1.cxx: fDigis = (TClonesArray*)ioman->GetObject("StsDigi");
./L1/CbmL1.cxx: fDigiMatches = (TClonesArray*)ioman->GetObject("StsDigiMatch");
./analysis/timing/CbmAnaTimingStsDigitizer.cxx: fStsDigis = (TClonesArray*) fManager->GetObject("StsDigi");
./analysis/timing/CbmAnaTimingStsDigitizer.cxx: fStsDigiMatches = (TClonesArray*) fManager->GetObject("StsDigiMatch");
./analysis/timing/CbmAnaTimingStsDigitizer.cxx: fMcEpoch = (CbmMCEpoch*) fManager->GetObject("MCEpoch.");
./analysis/timing/CbmAnaTimingStsDigitizer.cxx: fStsPoints = (TClonesArray*) fManager->GetObject("StsPoint");
./analysis/timing/CbmAnaTimingStsDigitizer.cxx: fMcTracks = (TClonesArray*) fManager->GetObject("MCTrack");
./analysis/timing/CbmAnaTimingStsHitFinder.cxx: fDigis = (TClonesArray*) fManager->GetObject("StsDigi");
./analysis/timing/CbmAnaTimingStsHitFinder.cxx: fDigiMatches = (TClonesArray*) fManager->GetObject("StsDigiMatch");
./analysis/timing/CbmAnaTimingStsTracking.cxx: fDigis = (TClonesArray*) fManager->GetObject("StsDigi");
./analysis/timing/CbmAnaTimingStsTracking.cxx: fDigiMatches = (TClonesArray*) fManager->GetObject("StsDigiMatch");
./analysis/timing/L1/CbmL1.cxx: listStsDigi = L1_DYNAMIC_CAST<TClonesArray*>( fManger->GetObject("StsDigi") );
./analysis/timing/sts/epochs/CbmStsIdealFindHitsEpoch.cxx: fDigis = (TClonesArray*) ioman->GetObject("StsDigi");
./analysis/timing/sts/epochs/CbmStsIdealMatchHitsEpoch.cxx: fDigis = (TClonesArray*) ioman->GetObject("StsDigi");
./analysis/timing/sts/epochs/CbmStsIdealMatchHitsEpoch.cxx: fDigiMatches = (TClonesArray*) ioman->GetObject("StsDigiMatch");
./beamtime/reco/CbmStsHodoCorrelations.cxx: fStsDigi = (TClonesArray*) ioman->GetObject("StsDigi");
./beamtime/sts/reco/cosy/StsCosyBL.cxx: fDigis = (TClonesArray*) ioman->GetObject("StsDigi");
./eventbuilder/CbmBuildEventsFromTracksIdeal.cxx:// fStsDigis = (TClonesArray*) ioman->GetObject("StsDigi");
./fles/mcbm2018/tasks/CbmCheckDigisNbCorr.cxx: fStsDigis = static_cast<TClonesArray*>(ioman->GetObject("CbmStsDigi"));
./fles/mcbm2018/tasks/CbmCheckEvents.cxx: fStsDigis = static_cast<TClonesArray*>(ioman->GetObject("CbmStsDigi"));
./fles/mcbm2018/tasks/CbmCheckTiming.cxx: fStsDigis = static_cast<TClonesArray*>(ioman->GetObject("CbmStsDigi"));
./fles/mcbm2018/tasks/CbmMcbm2018EventBuilder.cxx: fStsDigis = static_cast<TClonesArray*>(ioman->GetObject("CbmStsDigi"));
./fles/mcbm2018/unpacker/CbmMcbm2018UnpackerTaskHodo.cxx: fStsDigiCloneArray = static_cast<TClonesArray*>(ioman->GetObject("CbmStsDigi"));
./hadron/CbmHadronAnalysis.cxx: fStsDigis = (TClonesArray*) rootMgr->GetObject("StsDigi");
./hadron/CbmHadronAnalysis.cxx: fStsDigiMatchColl = (TClonesArray*) rootMgr->GetObject("StsDigiMatch");
./littrack/cbm/qa/clustering/CbmLitClusteringQa.cxx: fStsDigis = (TClonesArray*) ioman->GetObject("StsDigi");
./littrack/cbm/qa/clustering/CbmLitClusteringQa.cxx: fStsDigiMatches = (TClonesArray*) ioman->GetObject("StsDigiMatch");
./rich/mcbm/CbmRichMCbmQaReal.cxx: fStsDigis =(TClonesArray*) ioman->GetObject("CbmStsDigi");
./run/CbmBuildEventsQA.cxx: fStsDigis = (TClonesArray*) ioman->GetObject("StsDigi");
./run/CbmBuildEventsSimple.cxx: fStsDigis = (TClonesArray*) ioman->GetObject("StsDigi");
./sts/CbmStsDigitizeQa.cxx: fStsPoints = (TClonesArray*) ioman > GetObject("StsPoint");
./sts/CbmStsDigitizeQa.cxx: fStsDigis = (TClonesArray*) ioman -> GetObject("StsDigi");
./sts/CbmStsDigitizeQa.cxx: fStsDigiMatches = (TClonesArray*) ioman -> GetObject("StsDigiMatch");
./sts/CbmStsReconstructionQa.cxx: fStsDigis = (TClonesArray*) ioman
>GetObject("StsDigi");
./sts/digitize/CbmStsDigitize.cxx: fPoints = (TClonesArray*) ioman->GetObject("StsPoint");
./sts/digitize/CbmStsDigitize.cxx: fTracks = (TClonesArray*) ioman->GetObject("MCTrack");
./sts/digitize/CbmStsDigitizeQa.cxx: fStsPoints = (TClonesArray*)ioman > GetObject("StsPoint");
./sts/reco/CbmStsTimeBasedQa.cxx: fStsDigis = (TClonesArray*) ioman
>GetObject("StsDigi");
./tracking/BinnedTracker/CbmBinnedTrackerQA.cxx: fStsDigis = static_cast<TClonesArray*> (ioman->GetObject("StsDigi"));
./tracking/BinnedTracker/CbmBinnedTrackerQA.cxx: fStsDigiMatches = static_cast<TClonesArray*> (ioman->GetObject("StsDigiMatch"));
./tracking/BinnedTracker/CbmBinnedTrackerQANew.cxx: fStsDigis = static_cast<TClonesArray*> (ioman->GetObject("StsDigi"));
./tracking/BinnedTracker/CbmBinnedTrackerQANew.cxx: fStsDigiMatches = static_cast<TClonesArray*> (ioman->GetObject("StsDigiMatch"));
./tracking/global/CbmGlobalTrackingQA.cxx: fStsDigis = static_cast<TClonesArray*> (ioman->GetObject("StsDigi"));
./tracking/global/CbmGlobalTrackingQA.cxx: fStsDigiMatches = static_cast<TClonesArray*> (ioman->GetObject("StsDigiMatch"));
./tracking/lx/TBBinned/LxTBTask.cxx: fStsDigiMatches = static_cast<TClonesArray*> (ioman->GetObject("StsDigiMatch"));
./tracking/lx/TBBinned/LxTBTask.cxx: fStsDigis = static_cast<TClonesArray*> (ioman->GetObject("StsDigi"));
./trd/qa/CbmTrdRecoTbQa.cxx: fTrdDigis = (TClonesArray*) ioman->GetObject("StsDigi");

Actions #10

Updated by Volker Friese almost 3 years ago

Florian Uhlig wrote:

To search for all occurrences where the CbmStsDigi is accesses from a TClonesArray I ran the following command

find . -name "*.cxx" -exec grep -H GetObject {} \; | grep -i stsdigi

Nice!

which results in the following list of files where the CbmStsDigi is accessed from a TClonesArray

... none of which is apparently in use or tested.

Question: should we go ahead in changing all instances, or should we take the opportunity to remove obsolete software?

Actions #11

Updated by Volker Friese almost 3 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 60 to 100

For the release OCT19, we stay with the transition to vector for the STS digis. The transition for the other detector systems will be treated in a follow-up issue.

The classes mentioned above are obviously untested code. I will not go through all of them applying the changes. When they are actually in use, they will crash.

Actions #12

Updated by Volker Friese almost 3 years ago

  • Related to Sim-Development #1345: Store digis and their matches in std::vector instead of in TClonesArrays added
Actions #13

Updated by Volker Friese almost 3 years ago

  • Due date changed from 06/21/2019 to 09/10/2019
  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF