]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ANALYSIS/TenderSupplies/AliEMCALTenderSupply.cxx
Adding of the MC information in the emcal
[u/mrichter/AliRoot.git] / ANALYSIS / TenderSupplies / AliEMCALTenderSupply.cxx
index 57a74b4424164b5d57c9ef467ec13d83fb4ec1c9..c6c53fa05b7fb13a6012e598bdb77b4e3501c700 100644 (file)
@@ -1580,6 +1580,23 @@ void AliEMCALTenderSupply::RecPoints2Clusters(TClonesArray *clus)
     c->SetM20(elipAxis[1]*elipAxis[1]) ;
     c->SetCellsAbsId(absIds);
     c->SetCellsAmplitudeFraction(ratios);
+
+    //MC
+    AliESDCaloCluster *esdClus = dynamic_cast<AliESDCaloCluster*>(c);
+    if (esdClus) {
+      Int_t  parentMult = 0;
+      Int_t *parentList = recpoint->GetParents(parentMult);
+      if (parentMult > 0) {
+       TArrayI parents(parentMult, parentList);
+       esdClus->AddLabels(parents); 
+      }
+    }
+    else {
+      AliAODCaloCluster *aodClus = dynamic_cast<AliAODCaloCluster*>(c);
+      Int_t  parentMult = 0;
+      Int_t *parentList = recpoint->GetParents(parentMult);
+      aodClus->SetLabel(parentList, parentMult); 
+    }
   }
 }