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++) {
...etc...
}
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");
lhe->SetBranchAddress("EmcDigi",&digi_array);
PndEmcXClMoments xclmoments(*cl, digiArray);
// Whatever Zernike moment you need
xclmoments.AbsZernikeMoment(1, 1);
Dima