X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ITS%2FAliITSClusterFinderV2SPD.cxx;h=135e11574fcfbccea40911d2bfea591c887a2558;hb=13c9b3a4ac7dbb031cd41bef49a3ad8fcad748ee;hp=293c42ccb1c50ccfad2ba4163154088430345bf7;hpb=045be90ce005792b57369e0d0b724ac0f4a76b4c;p=u%2Fmrichter%2FAliRoot.git diff --git a/ITS/AliITSClusterFinderV2SPD.cxx b/ITS/AliITSClusterFinderV2SPD.cxx index 293c42ccb1c..135e11574fc 100644 --- a/ITS/AliITSClusterFinderV2SPD.cxx +++ b/ITS/AliITSClusterFinderV2SPD.cxx @@ -82,6 +82,7 @@ void AliITSClusterFinderV2SPD::RawdataToClusters(AliRawReader* rawReader){ // This function creates ITS clusters from raw data //------------------------------------------------------------ rawReader->Reset(); + fNClusters = 0; //RS AliITSRawStreamSPD inputSPD(rawReader); FindClustersSPD(&inputSPD); @@ -147,6 +148,15 @@ Int_t AliITSClusterFinderV2SPD::ClustersSPD(AliBin* bins, TClonesArray* digits,T bins[index].SetQ(0); bins[index].SetMask(0xFFFFFFFE); } + AliITSCalibrationSPD *calSparse = (AliITSCalibrationSPD*) fDetTypeRec->GetSPDSparseDeadModel(iModule); + for(Int_t ipix = 0; ipixGetNrBad(); ipix++){ + Int_t row, col; + calSparse->GetBadPixel(ipix,row,col); + Int_t index = (row+1) * nzbins + (col+1); + bins[index].SetQ(0); + bins[index].SetMask(0xFFFFFFFE); + } + } Int_t nclu=0; @@ -223,7 +233,7 @@ Int_t AliITSClusterFinderV2SPD::ClustersSPD(AliBin* bins, TClonesArray* digits,T idy=ymax-ymin+1; idz=zmax-zmin+1; } - + // for(Int_t iiz=zmin; iiz<=zmax;iiz+=idz){ for(Int_t iiy=ymin;iiy<=ymax;iiy+=idy){ @@ -247,7 +257,14 @@ Int_t AliITSClusterFinderV2SPD::ClustersSPD(AliBin* bins, TClonesArray* digits,T } ndigits++; Float_t qBin=0.; - if(rawdata) qBin = bins[idxBins[idx]].GetQ(); + if(rawdata) { + qBin = bins[idxBins[idx]].GetQ(); + if (fRawID2ClusID) { // RS: Register cluster id in raw words list + int rwid = bins[idxBins[idx]].GetRawID(); + if (fRawID2ClusID->GetSize()<=rwid) fRawID2ClusID->Set( (rwid+10)<<1 ); + (*fRawID2ClusID)[rwid] = milab[0] = fNClusters+1; // RS: store clID+1 as a reference to the cluster + } + } if(!rawdata){ AliITSdigitSPD* dig = (AliITSdigitSPD*)digits->UncheckedAt(idxBins[idx]); qBin = (Float_t)dig->GetSignal(); @@ -267,7 +284,7 @@ Int_t AliITSClusterFinderV2SPD::ClustersSPD(AliBin* bins, TClonesArray* digits,T y -= tanLorentzAngle*thick; // - Float_t hit[5]; //y,z,sigma(y)^2, sigma(z)^2, charge + Float_t hit[6]; //y,z,sigma(y)^2, sigma(z)^2, charge { Double_t loc[3]={y,0.,z},trk[3]={0.,0.,0.}; mT2L->MasterToLocal(loc,trk); @@ -277,6 +294,7 @@ Int_t AliITSClusterFinderV2SPD::ClustersSPD(AliBin* bins, TClonesArray* digits,T hit[2] = fYpitchSPD*fYpitchSPD/12.; hit[3] = fZ1pitchSPD*fZ1pitchSPD/12.; hit[4] = 1.; + hit[5] = 0.; if(!rawdata) milab[3]=fNdet[iModule]; Int_t info[3] = {ymax-ymin+1,zmax-zmin+1,fNlayer[iModule]}; @@ -293,6 +311,7 @@ Int_t AliITSClusterFinderV2SPD::ClustersSPD(AliBin* bins, TClonesArray* digits,T AliITSRecPoint(cl); } nclu++; + fNClusters++; }// for iiy }// for iiz }//end for iBin @@ -317,6 +336,9 @@ void AliITSClusterFinderV2SPD::FindClustersSPD(AliITSRawStreamSPD* input) AliBin* bins = NULL; // read raw data input stream + int countRW = 0; //RS + if (fRawID2ClusID) fRawID2ClusID->Reset(); //RS if array was provided, we shall store the rawID -> ClusterID + // while (kTRUE) { Bool_t next = input->Next(); if (!next || input->IsNewModule()) { @@ -335,13 +357,15 @@ void AliITSClusterFinderV2SPD::FindClustersSPD(AliITSRawStreamSPD* input) memcpy(binsSPD,binsSPDInit,sizeof(AliBin)*kMaxBin); } - if (next && bins) { + if (next && bins) { // fill the current digit into the bins array Int_t index = (input->GetCoord2()+1) * kNzBins + (input->GetCoord1()+1); bins[index].SetIndex(index); bins[index].SetQ(1); bins[index].SetMask(1); + bins[index].SetRawID(countRW); //RS register raw id } + countRW++; //RS } delete [] binsSPDInit;