GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » EMC » Possible optimization of EMC data classes
Possible optimization of EMC data classes [message #8530] Tue, 12 May 2009 16:20
Dima Melnychuk is currently offline  Dima Melnychuk
Messages: 213
Registered: April 2004
Location: National Centre for Nucle...
first-grade participant
From: *fuw.edu.pl
Dear all,

With this post I would like to discuss the problem with emc software in pandaroot, which needs to be solved. I would like to discuss it during the EVO meeting tomorrow, but here I want to introduce it shortly to simplify the following discussion.

At the moment PndEmcCluster object contains the vector of pointers to PndEmcDigi from which it is made (std::vector<PndEmcDigi*> fDigiList). Root persistency mechanism provides that these digis are stored for each cluster. So, when we perform digitization and then cluster reconstruction each digi is stored twice, first time during digitization and once again on the reconstruction.

What is assumed by pandaroot framework is that fDigiList should contain not pointers but indexes of PndEmcDigi in corresponding TClonesArray. And it would make sense if the PndEmcCluster would be only container class and would not need access to PndEmcDigis in its methods. But as it works now, many methods of PndEmcCluster (for example calculation of cluster position) require access to PndEmcDigis.

The problem comes from the fact that PndEmcCluster is not simply container class as it is suggested, but provides some functionality with its methods. I investigated if it is possible to move all the functionality from the PndEmcCluster to the corresponding Tasks, but I have found some difficulties, which I plan to discuss shortly tomorrow during the EVO meeting.
But in my opinion it should be easier to provide access to TClonesArray of PndEmcDigi in PndEmcCluster than to remove the functionality that requires this information from PndEmcCluster.

So the question is how to provide access to TClonesArray of PndEmcDigi within PndEmcCluster?
I would propose something like static pointer to this TClonesArray in PndEmcCluster which would be set with method PndEmcCluster::SetDigiArray(TClonesArray *digiArray) and as a result this method should be called in each tasks and analysis macro where PndEmcClusters will be used, which would results in some in inconvenience.

So the question is if it is an acceptable solution or there will be better ideas?
And as soon as some decision will be made on this point I plan to implement it.

Best regards,
Dima
Previous Topic: Separation of photon and electron
Next Topic: Question about GetEnergyCorrected()
Goto Forum:
  


Current Time: Sun Dec 08 16:01:55 CET 2024

Total time taken to generate the page: 0.00655 seconds