// //
///////////////////////////////////////////////////////////////////////////
-#include "AliRun.h"
#include "AliITSClusterFinderV2SPD.h"
-#include "AliITSclusterV2.h"
+#include "AliITSRecPoint.h"
+#include "AliITSDetTypeRec.h"
#include "AliRawReader.h"
#include "AliITSRawStreamSPD.h"
-
#include <TClonesArray.h>
-#include "AliITS.h"
-#include "AliITSgeom.h"
#include "AliITSdigitSPD.h"
ClassImp(AliITSClusterFinderV2SPD)
extern AliRun *gAlice;
-AliITSClusterFinderV2SPD::AliITSClusterFinderV2SPD():AliITSClusterFinderV2(){
+AliITSClusterFinderV2SPD::AliITSClusterFinderV2SPD(AliITSDetTypeRec* dettyp):AliITSClusterFinderV2(dettyp){
//Default constructor
- AliITSgeom *geom=(AliITSgeom*)fITS->GetITSgeom();
+ fLastSPD1=fDetTypeRec->GetITSgeom()->GetModuleIndex(2,1,1)-1;
- fLastSPD1=geom->GetModuleIndex(2,1,1)-1;
fNySPD=256; fNzSPD=160;
fYpitchSPD=0.0050;
fZ1pitchSPD=0.0425; fZ2pitchSPD=0.0625;
hit[1] = -z+fZshift[iModule];
hit[2] = fYpitchSPD*fYpitchSPD/12.;
hit[3] = fZ1pitchSPD*fZ1pitchSPD/12.;
- hit[4] = (zmax-zmin+1)*100 + (ymax-ymin+1);
+ hit[4] = 1.;
if(!rawdata) milab[3]=fNdet[iModule];
Int_t info[3] = {ymax-ymin+1,zmax-zmin+1,fNlayer[iModule]};
if(!rawdata){
- AliITSclusterV2 cl(milab,hit,info);
- fITS->AddClusterV2(cl);
+ AliITSRecPoint cl(iModule,fDetTypeRec->GetITSgeom(),milab,hit,info);
+ fDetTypeRec->AddRecPoint(cl);
}
else{
Int_t label[4]={milab[0],milab[1],milab[2],milab[3]};
new (clusters->AddrAt(nclu))
- AliITSclusterV2(label, hit,info);
+ AliITSRecPoint(iModule,fDetTypeRec->GetITSgeom(),label, hit,info);
}
nclu++;
}// for iiy
Int_t kNzBins = fNzSPD + 2;
Int_t kNyBins = fNySPD + 2;
Int_t kMaxBin = kNzBins * kNyBins;
+ AliBin *binsSPD = new AliBin[kMaxBin];
+ AliBin *binsSPDInit = new AliBin[kMaxBin];
AliBin* bins = NULL;
// read raw data input stream
// when all data from a module was read, search for clusters
if (bins) {
- clusters[iModule] = new TClonesArray("AliITSclusterV2");
+ clusters[iModule] = new TClonesArray("AliITSRecPoint");
Int_t nClusters = ClustersSPD(bins,0,clusters[iModule],kMaxBin,kNzBins,iModule,kTRUE);
nClustersSPD += nClusters;
- delete bins;
+ bins = NULL;
}
if (!next) break;
- bins = new AliBin[kMaxBin];
+ bins = binsSPD;
+ memcpy(binsSPD,binsSPDInit,sizeof(AliBin)*kMaxBin);
}
// fill the current digit into the bins array
bins[index].SetQ(1);
}
+ delete [] binsSPDInit;
+ delete [] binsSPD;
+
Info("FindClustersSPD", "found clusters in ITS SPD: %d", nClustersSPD);
}