GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » EMC » Access to clusters properties
Re: Access to clusters properties [message #11759 is a reply to message #11757] Tue, 10 May 2011 11:22 Go to previous messageGo to previous message
Dima Melnychuk is currently offline  Dima Melnychuk
Messages: 213
Registered: April 2004
Location: National Centre for Nucle...
first-grade participant
From: *
Hi Ronald,

My suggestions would be the following:

1) I assume that loop over crystals in individual cluster is loop over PndEmcDigi, which given cluster contain.

So instead

Int_t ncrystals= crystal_array->GetEntriesFast();
           for (Int_t nx = 0; nx < ncrystals; nx++) {


it would be

std::vector<Int_t>::const_iterator digi_iter;

const std::vector<Int_t> digiList = cl->DigiList();

for (digi_iter=digiList.begin();digi_iter!=digiList.end(); ++digi_iter)
    PndEmcDigi *digi = (PndEmcDigi *) DigiArray()->At(*digi_iter); 

// Whatever operation with digi

2) To access other cluster properties available in /emc/EmcData/PndEmcXClMoments.h you should create object of this class and then access its methods.

In macro/emc/dedicated/reco_analys.C it is shown for PndEmcClusterEnergySums class and for PndEmcXClMoments everything is similar.

At least you should add file containing PndEmcDigi TClonesArray

lhe->AddFriend("cbmsim", "digi_emc.root");
TClonesArray* digi_array=new TClonesArray("PndEmcDigi");

PndEmcXClMoments xclmoments(*cl, digiArray);

// Whatever Zernike moment you need
xclmoments.AbsZernikeMoment(1, 1);

Read Message
Read Message
Read Message
Previous Topic: Uniform particle generation in solid angle
Next Topic: New FwEndCap geometry implemented
Goto Forum:

Current Time: Fri Aug 07 19:53:43 CEST 2020

Total time taken to generate the page: 0.02629 seconds