+//_________________________________________________________________
+Int_t AliAODEvent::GetPHOSClusters(TRefArray *clusters) const
+{
+ // fills the provided TRefArray with all found phos clusters
+
+ 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);
+ //printf("IsPHOS cluster %d, E %2.3f Size: %d \n",i,cl->E(),clusters->GetEntriesFast());
+ }
+ }
+ }
+ return clusters->GetEntriesFast();
+}
+
+//_________________________________________________________________
+Int_t AliAODEvent::GetEMCALClusters(TRefArray *clusters) const
+{
+ // 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);
+ //printf("IsEMCal cluster %d, E %2.3f Size: %d \n",i,cl->E(),clusters->GetEntriesFast());
+ }
+ }
+ }
+ return clusters->GetEntriesFast();
+}
+
+