X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TPC%2FAliTPCclustererMI.cxx;h=dbc0425e1534b94bcee3a6b8810d2be963542949;hb=f3a5d03b97904f682ae294430d5c4bcd3a1cb2f1;hp=7a1b13775c17bfa33cd81f4c91e8c06e6bc89335;hpb=3ad5a1ce1c127f1ab9000bf26d55da1ec56a3605;p=u%2Fmrichter%2FAliRoot.git diff --git a/TPC/AliTPCclustererMI.cxx b/TPC/AliTPCclustererMI.cxx index 7a1b13775c1..dbc0425e153 100644 --- a/TPC/AliTPCclustererMI.cxx +++ b/TPC/AliTPCclustererMI.cxx @@ -321,7 +321,7 @@ AliTPCclusterMI &c) //set cluster parameters c.SetQ(sumw); c.SetPad(meani-2.5); - c.SetTimeBin(meanj-2.5); + c.SetTimeBin(meanj-3); c.SetSigmaY2(mi2); c.SetSigmaZ2(mj2); c.SetType(0); @@ -612,7 +612,7 @@ void AliTPCclustererMI::Digits2Clusters() fInput->GetBranch("Segment")->SetAddress(&dummy); Stat_t nentries = fInput->GetEntries(); - fMaxTime=fParam->GetMaxTBin()+6; // add 3 virtual time bins before and 3 after + fMaxTime=fRecoParam->GetLastBin()+6; // add 3 virtual time bins before and 3 after Int_t nclusters = 0; @@ -712,7 +712,7 @@ void AliTPCclustererMI::Digits2Clusters(AliRawReader* rawReader) Int_t nclusters = 0; - fMaxTime = fParam->GetMaxTBin() + 6; // add 3 virtual time bins before and 3 after + fMaxTime = fRecoParam->GetLastBin() + 6; // add 3 virtual time bins before and 3 after const Int_t kNIS = fParam->GetNInnerSector(); const Int_t kNOS = fParam->GetNOuterSector(); const Int_t kNS = kNIS + kNOS; @@ -745,7 +745,11 @@ void AliTPCclustererMI::Digits2Clusters(AliRawReader* rawReader) AliTPCCalROC * gainROC = gainTPC->GetCalROC(fSector); // pad gains per given sector AliTPCCalROC * pedestalROC = pedestalTPC->GetCalROC(fSector); // pedestal per given sector AliTPCCalROC * noiseROC = noiseTPC->GetCalROC(fSector); // noise per given sector - + //check the presence of the calibration + if (!noiseROC ||!pedestalROC ) { + AliError(Form("Missing calibration per sector\t%d\n",fSector)); + continue; + } Int_t nRows = 0; Int_t nDDLs = 0, indexDDL = 0; if (fSector < kNIS) { @@ -783,20 +787,23 @@ void AliTPCclustererMI::Digits2Clusters(AliRawReader* rawReader) Float_t gain =1; Int_t lastPad=-1; while (input.Next()) { - digCounter++; if (input.GetSector() != fSector) AliFatal(Form("Sector index mismatch ! Expected (%d), but got (%d) !",fSector,input.GetSector())); Int_t iRow = input.GetRow(); - if (iRow < 0 || iRow >= nRows) - AliFatal(Form("Pad-row index (%d) outside the range (%d -> %d) !", + if (iRow < 0 || iRow >= nRows){ + AliError(Form("Pad-row index (%d) outside the range (%d -> %d) !", iRow, 0, nRows -1)); + continue; + } //pad Int_t iPad = input.GetPad(); - if (iPad < 0 || iPad >= nPadsMax) - AliFatal(Form("Pad index (%d) outside the range (%d -> %d) !", + if (iPad < 0 || iPad >= nPadsMax) { + AliError(Form("Pad index (%d) outside the range (%d -> %d) !", iPad, 0, nPadsMax-1)); + continue; + } if (iPad!=lastPad){ gain = gainROC->GetValue(iRow,iPad); lastPad = iPad; @@ -804,10 +811,13 @@ void AliTPCclustererMI::Digits2Clusters(AliRawReader* rawReader) iPad+=3; //time Int_t iTimeBin = input.GetTime(); - if ( iTimeBin < 0 || iTimeBin >= fParam->GetMaxTBin()) + if ( iTimeBin < fRecoParam->GetFirstBin() || iTimeBin >= fRecoParam->GetLastBin()){ + continue; AliFatal(Form("Timebin index (%d) outside the range (%d -> %d) !", iTimeBin, 0, iTimeBin -1)); + } iTimeBin+=3; + //signal Float_t signal = input.GetSignal(); if (!calcPedestal && signal <= zeroSup) continue; @@ -818,14 +828,19 @@ void AliTPCclustererMI::Digits2Clusters(AliRawReader* rawReader) }else{ allBins[iRow][iPad*fMaxTime+iTimeBin] = signal; } - allBins[iRow][iPad*fMaxTime+0]=1.; // pad with signal + allBins[iRow][iPad*fMaxTime+0]+=1.; // pad with signal + + // Temporary + digCounter++; } // End of the loop over altro data // // + // + // // Now loop over rows and perform pedestal subtraction if (digCounter==0) continue; - // if (fPedSubtraction) { - if (calcPedestal) { + // if (calcPedestal) { + if (kTRUE) { for (Int_t iRow = 0; iRow < nRows; iRow++) { Int_t maxPad; if (fSector < kNIS) @@ -834,6 +849,15 @@ void AliTPCclustererMI::Digits2Clusters(AliRawReader* rawReader) maxPad = fParam->GetNPadsUp(iRow); for (Int_t iPad = 3; iPad < maxPad + 3; iPad++) { + // + // Temporary fix for data production - !!!! MARIAN + // The noise calibration should take mean and RMS - currently the Gaussian fit used + // In case of double peak - the pad should be rejected + // + // Line mean - if more than given digits over threshold - make a noise calculation + // and pedestal substration + if (!calcPedestal && allBins[iRow][iPad*fMaxTime+0]<50) continue; + // if (allBins[iRow][iPad*fMaxTime+0] <1 ) continue; // no data Float_t *p = &allBins[iRow][iPad*fMaxTime+3]; //Float_t pedestal = TMath::Median(fMaxTime, p); @@ -901,7 +925,9 @@ void AliTPCclustererMI::Digits2Clusters(AliRawReader* rawReader) delete [] allSigBins; delete [] allNSigBins; - Info("Digits2Clusters", "File %s Event\t%d\tNumber of found clusters : %d\n", fOutput->GetName(),*(rawReader->GetEventId()), nclusters); + if (rawReader->GetEventId() && fOutput ){ + Info("Digits2Clusters", "File %s Event\t%d\tNumber of found clusters : %d\n", fOutput->GetName(),*(rawReader->GetEventId()), nclusters); + } } @@ -931,14 +957,15 @@ void AliTPCclustererMI::FindClusters(AliTPCCalROC * noiseROC) if (b[0]GetValue(fRow, i/fMaxTime); + if (noise>fRecoParam->GetMaxNoise()) continue; // sigma cuts if (b[0]