#include <TGeoMatrix.h>
#include "AliLog.h"
-#include "AliESD.h"
+#include "AliESDEvent.h"
#include "AliESDtrack.h"
-#include "AliKalmanTrack.h"
+#include "AliESDCaloCluster.h"
#include "AliEMCALRecPoint.h"
#include "AliRunLoader.h"
#include "AliEMCALTrack.h"
return 1;
}
- TClonesArray dummy("AliEMCALRecPoint", 10000);
- TClonesArray *clusters = &dummy;
+ TClonesArray *clusters = new TClonesArray("AliEMCALRecPoint", 1000);
branch->SetAddress(&clusters);
- Int_t nClusters = (Int_t)clusters->GetEntries();
cTree->GetEvent(0);
+ Int_t nClusters = (Int_t)clusters->GetEntries();
fClusters = new TObjArray(0);
for (Int_t i = 0; i < nClusters; i++) {
AliEMCALRecPoint *cluster = (AliEMCALRecPoint*)clusters->At(i);
return 1;
}
+ branch->SetAddress(0);
+ clusters->Delete();
+ delete clusters;
+
AliInfo(Form("Collected %d clusters", fClusters->GetEntries()));
return 0;
//
//------------------------------------------------------------------------------
//
-Int_t AliEMCALTracker::LoadClusters(AliESD *esd)
+Int_t AliEMCALTracker::LoadClusters(AliESDEvent *esd)
{
//
// Load EMCAL clusters in the form of AliESDCaloClusters,
//
//------------------------------------------------------------------------------
//
-Int_t AliEMCALTracker::LoadTracks(AliESD *esd)
+Int_t AliEMCALTracker::LoadTracks(AliESDEvent *esd)
{
//
// Load ESD tracks.
//
//------------------------------------------------------------------------------
//
-Int_t AliEMCALTracker::PropagateBack(AliESD* esd)
+Int_t AliEMCALTracker::PropagateBack(AliESDEvent* esd)
{
//
// Main operation method.
pos2[0] = cl->X();
pos2[1] = cl->Y();
pos2[2] = cl->Z();
- AliKalmanTrack::MeanMaterialBudget(pos1, pos2, param);
- rho = param[0];
+ MeanMaterialBudget(pos1, pos2, param);
+ rho = param[0]*param[4];
x0 = param[1];
}
else if (fTrackCorrMode == kTrackCorrFixed) {
pos2[0] = cl->X();
pos2[1] = cl->Y();
pos2[2] = cl->Z();
- AliKalmanTrack::MeanMaterialBudget(pos1, pos2, param);
- rho = param[0];
+ MeanMaterialBudget(pos1, pos2, param);
+ rho = param[0]*param[4];
x0 = param[1];
}
else if (fTrackCorrMode == kTrackCorrFixed) {
tr->GetXYZ(x1);
bz = tr->GetBz();
if (!tr->GetXYZAt(xtemp, bz, x2)) return kFALSE;
- AliKalmanTrack::MeanMaterialBudget(x1, x2, param);
- d = param[4];
- rho = param[0];
+ MeanMaterialBudget(x1, x2, param);
+ rho = param[0]*param[4];
x0 = param[1];
- if (!tr->PropagateTo(xtemp, d*rho/x0, x0)) return kFALSE;
+ if (!tr->PropagateTo(xtemp, rho, x0)) return kFALSE;
}
return kTRUE;
//
AliEMCALTracker::AliEMCALMatchCluster::AliEMCALMatchCluster(Int_t index, AliESDCaloCluster *caloCluster)
: fIndex(index),
- fLabel(caloCluster->GetPrimaryIndex()),
+ fLabel(caloCluster->GetLabel()),
fX(0.),
fY(0.),
fZ(0.)
// Index of passed cluster in its native array must be specified.
//
Float_t clpos[3];
- caloCluster->GetGlobalPosition(clpos);
+ caloCluster->GetPosition(clpos);
fX = (Double_t)clpos[0];
fY = (Double_t)clpos[1];