#include <TFriendElement.h>
#include <TProcessID.h>
#include <TCollection.h>
-
+#include "Riostream.h"
#include "AliAODEvent.h"
#include "AliAODHeader.h"
#include "AliAODTrack.h"
clusters->Clear();
AliAODCaloCluster *cl = 0;
+ Bool_t first = kTRUE;
for (Int_t i = 0; i < GetNCaloClusters() ; i++) {
-
if ( (cl = GetCaloCluster(i)) ) {
if (cl->IsPHOSCluster()){
+ if(first) {
+ new (clusters) TRefArray(TProcessID::GetProcessWithUID(cl));
+ first=kFALSE;
+ }
clusters->Add(cl);
- //AliDebug(1,Form("IsPHOS cluster %d Size: %d \n",i,clusters->GetEntriesFast()));
+ //printf("IsPHOS cluster %d, E %2.3f Size: %d \n",i,cl->E(),clusters->GetEntriesFast());
}
}
}
// fills the provided TRefArray with all found emcal clusters
clusters->Clear();
-
+ cout<<"AOD event 1: nclus "<<GetNCaloClusters()<<endl;
AliAODCaloCluster *cl = 0;
+ Bool_t first = kTRUE;
for (Int_t i = 0; i < GetNCaloClusters(); i++) {
-
if ( (cl = GetCaloCluster(i)) ) {
if (cl->IsEMCALCluster()){
+ if(first) {
+ new (clusters) TRefArray(TProcessID::GetProcessWithUID(cl));
+ first=kFALSE;
+ }
clusters->Add(cl);
- //AliDebug(1,Form("IsEMCAL cluster %d Size: %d \n",i,clusters->GetEntriesFast()));
+ //printf("IsEMCal cluster %d, E %2.3f Size: %d \n",i,cl->E(),clusters->GetEntriesFast());
}
}
}