+//-*- Mode: C++ -*-
+// $Id$
/**************************************************************************
* This file is property of and copyright by the ALICE HLT Project *
AliHLTESDCaloClusterMaker::~AliHLTESDCaloClusterMaker()
{
//See header file for documentation
-
+ delete fClusterReaderPtr;
}
Int_t
AliESDCaloCluster esdCluster;
esdCluster.SetID(caloClusterStructPtr->fID);
+#ifndef HAVE_NOT_ALIVCLUSTER // backward compatibility for r42844
+ esdCluster.SetType(caloClusterStructPtr->fClusterType);
+#else
esdCluster.SetClusterType(caloClusterStructPtr->fClusterType);
+#endif
esdCluster.SetPosition((Float_t*)(caloClusterStructPtr->fGlobalPos));
esdCluster.SetE(caloClusterStructPtr->fEnergy);
esdCluster.SetTOF(caloClusterStructPtr->fTOF);
+#ifndef HAVE_NOT_ALIVCLUSTER // backward compatibility for r42844
+ esdCluster.SetDispersion(caloClusterStructPtr->fDispersion);
+ esdCluster.SetChi2(caloClusterStructPtr->fFitQuality);
+#else
esdCluster.SetClusterDisp(caloClusterStructPtr->fDispersion);
esdCluster.SetClusterChi2(caloClusterStructPtr->fFitQuality);
- esdCluster.SetPid((Float_t*)(caloClusterStructPtr->fPID));
+#endif
+ const Float_t *pid = caloClusterStructPtr->fPID;
+#ifndef HAVE_NOT_ALIVCLUSTER // backward compatibility for r42844
+ esdCluster.SetPID(pid);
+#else
+ esdCluster.SetPid(pid);
+#endif
esdCluster.SetM20(caloClusterStructPtr->fM20);
esdCluster.SetM02(caloClusterStructPtr->fM02);
esdCluster.SetNExMax(caloClusterStructPtr->fNExMax);
esdCluster.SetEmcCpvDistance(caloClusterStructPtr->fEmcCpvDistance);
esdCluster.SetDistanceToBadChannel(caloClusterStructPtr->fDistToBadChannel);
esdCluster.SetNCells(caloClusterStructPtr->fNCells);
+ //esdCluster.SetNCells(0);
+ if(caloClusterStructPtr->GetNTracksMatched())
+ {
+ TArrayI tracksMatched(caloClusterStructPtr->GetNTracksMatched(), caloClusterStructPtr->fTracksMatched);
+ esdCluster.AddTracksMatched(tracksMatched);
+ }
UShort_t *idArrayPtr = new UShort_t[caloClusterStructPtr->fNCells];
- Double32_t *ampFracArrayPtr = new Double32_t[caloClusterStructPtr->fNCells];
+ Double32_t *ampFracArrayPtr = new Double32_t[caloClusterStructPtr->fNCells];
+
for(UInt_t index = 0; index < caloClusterStructPtr->fNCells; index++)
{
- // fClusterReaderPtr->GetCell(caloClusterStructPtr, idArrayPtr[index], ampFracArrayPtr[index], index);
+ fClusterReaderPtr->GetCell(caloClusterStructPtr, idArrayPtr[index], ampFracArrayPtr[index], index);
+ //printf("EM: cellId: %d\n", idArrayPtr[index]);;
}
- // esdCluster.SetCellsAbsId(idArrayPtr);
- // esdCluster.SetCellsAmplitudeFraction(ampFracArrayPtr);
-
+ esdCluster.SetCellsAbsId(idArrayPtr);
+ esdCluster.SetCellsAmplitudeFraction(ampFracArrayPtr);
+#ifndef HAVE_NOT_ALIESDCALOCLUSTER_r38477
+ // this is to ensure compilation with the v4-18-Release branch for the moment
+ // until the changes of AliESDCaloCluster have been ported
+ esdCluster.SetTrackDistance(caloClusterStructPtr->fTrackDx, caloClusterStructPtr->fTrackDz);
+#endif //HAVE_NOT_ALIESDCALOCLUSTER_r38477
+
+ delete [] idArrayPtr;
+ delete [] ampFracArrayPtr;
+// idArrayPtr = 0;
+ //ampFracArrayPtr = 0;
+
esdPtr->AddCaloCluster(&esdCluster);
+ //printf("EM: Energy: %f\n", esdCluster.E());
nClusters++;
}
return nClusters;