#include <TClonesArray.h>
#include "AliITSgeom.h"
#include "AliITSdigit.h"
+#include "AliMC.h"
ClassImp(AliITSclustererV2)
delete array;
TClonesArray** clusters = new TClonesArray*[fNModules];
+ for (Int_t iModule = 0; iModule < fNModules; iModule++) {
+ clusters[iModule] = NULL;
+ }
// one TClonesArray per module
rawReader->Reset();
// write all clusters to the tree
Int_t nClusters = 0;
for (Int_t iModule = 0; iModule < fNModules; iModule++) {
- TClonesArray* array = clusters[iModule];
+ array = clusters[iModule];
if (!array) {
Error("Digits2Clusters", "data for module %d missing!", iModule);
array = new TClonesArray("AliITSclusterV2");
}
itsLoader->WriteRecPoints("OVERWRITE");
+ delete[] clusters;
+
Info("Digits2Clusters", "total number of found clusters in ITS: %d\n",
nClusters);
}
//------------------------------------------------------------
Int_t label=lab[0];
if (label>=0) {
- TParticle *part=(TParticle*)gAlice->Particle(label);
+ TParticle *part=(TParticle*)gAlice->GetMCApp()->Particle(label);
label=-3;
while (part->P() < 0.005) {
Int_t m=part->GetFirstMother();
break;
}
label=m;
- part=(TParticle*)gAlice->Particle(label);
+ part=(TParticle*)gAlice->GetMCApp()->Particle(label);
}
if (lab[1]<0) lab[1]=label;
else if (lab[2]<0) lab[2]=label;
new (cl[n]) AliITSclusterV2(lab,lp); n++;
}
- delete bins;
+ delete [] bins;
}
void AliITSclustererV2::FindClustersSPD(AliITSRawStream* input,