fClArr[i] = 0;
for (int j=0;j<2;j++) fUsedClusLay[i][j] = 0;
fDetectorIndexClustersLay[i] = 0;
+ fClusterCopyIndex[2] = 0;
fOverlapFlagClustersLay[i] = 0;
fNClustersLay[i] = 0;
fClustersLay[i] = 0;
for (int i=0;i<2;i++) {
delete[] fClustersLay[i];
delete[] fDetectorIndexClustersLay[i];
+ delete[] fClusterCopyIndex[2];
delete[] fOverlapFlagClustersLay[i];
delete fClArr[i];
for (int j=0;j<2;j++) delete fUsedClusLay[i][j];
branch = itsClusterTree->GetBranch("ITSRecPoints");
branch->SetAddress(&itsClusters);
if (!fClArr[il]) fClArr[il] = new TClonesArray("AliITSRecPoint",100);
+ delete[] fClusterCopyIndex[il];
}
//
// count clusters
Float_t* clustersLay = new Float_t[nclLayer*kClNPar];
Int_t* detectorIndexClustersLay = new Int_t[nclLayer];
Bool_t* overlapFlagClustersLay = new Bool_t[nclLayer];
+ if (fCreateClustersCopy) fClusterCopyIndex[il] = new Int_t[nclLayer];
//
for (int ic=0;ic<nclLayer;ic++) {
AliITSRecPoint* cluster = (AliITSRecPoint*)clArr[index[ic]];
detectorIndexClustersLay[ic] = cluster->GetDetectorIndex();
overlapFlagClustersLay[ic] = kFALSE;
for (Int_t i=3;i--;) clPar[kClMC0+i] = cluster->GetLabel(i);
+ if (fCreateClustersCopy) fClusterCopyIndex[il][ic] = index[ic];
}
clArr.Clear();
delete[] z;
pid[AliPID::kElectron]>fCutMinElectronProbESD;
//
}
+
+//____________________________________________________________________
+AliITSRecPoint* AliITSMultReconstructor::GetRecPoint(Int_t lr, Int_t n) const
+{
+ // return a cluster of lr corresponding to orderer cluster index n
+ if (fClArr[lr] && fClusterCopyIndex[lr] && n<fNClustersLay[lr])
+ return (AliITSRecPoint*) fClArr[lr]->At(fClusterCopyIndex[lr][n]);
+ else {
+ AliError("To access the clusters SetCreateClustersCopy should have been called");
+ return 0;
+ }
+}
class AliESDVertex;
class AliMultiplicity;
class AliRefArray;
+class AliITSRecPoint;
class AliITSMultReconstructor : public AliTrackleter
{
Int_t GetNSingleClusters() const {return fNSingleCluster;}
Short_t GetNFiredChips(Int_t layer) const {return fNFiredChips[layer];}
- Float_t* GetClusterLayer1(Int_t n) {return &fClustersLay[0][n*kClNPar];}
- Float_t* GetClusterLayer2(Int_t n) {return &fClustersLay[1][n*kClNPar];}
- Float_t* GetClusterOfLayer(Int_t lr,Int_t n) {return &fClustersLay[lr][n*kClNPar];}
+ Float_t* GetClusterLayer1(Int_t n) const {return &fClustersLay[0][n*kClNPar];}
+ Float_t* GetClusterLayer2(Int_t n) const {return &fClustersLay[1][n*kClNPar];}
+ Float_t* GetClusterOfLayer(Int_t lr,Int_t n) const {return &fClustersLay[lr][n*kClNPar];}
+ Int_t GetClusterCopyIndex(Int_t lr,Int_t n) const {return fClusterCopyIndex[lr] ? fClusterCopyIndex[lr][n] : -1;}
+ AliITSRecPoint* GetRecPoint(Int_t lr, Int_t n) const;
- Float_t* GetTracklet(Int_t n) {return fTracklets[n];}
- Float_t* GetCluster(Int_t n) {return fSClusters[n];}
+ Float_t* GetTracklet(Int_t n) const {return fTracklets[n];}
+ Float_t* GetCluster(Int_t n) const {return fSClusters[n];}
void SetScaleDThetaBySin2T(Bool_t v=kTRUE) {fScaleDTBySin2T = v;}
Bool_t GetScaleDThetaBySin2T() const {return fScaleDTBySin2T;}
//
Float_t* fClustersLay[2]; //! clusters in the SPD layers of ITS
Int_t* fDetectorIndexClustersLay[2]; //! module index for clusters in ITS layers
+ Int_t* fClusterCopyIndex[2]; //! when clusters copy is requested, store here the reference on the index
Bool_t* fOverlapFlagClustersLay[2]; //! flag for clusters in the overlap regions in ITS layers
Float_t** fTracklets; //! tracklets