X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=T0%2FAliT0Reconstructor.cxx;h=a091e0a9b514d00e5aefb55ae69c72842685eba4;hb=59e8caf183fb658b0230e0b7cb2eb3eda6ddfe93;hp=6b288d172e219c4988a1a1e3483ae92d3b8a699e;hpb=0518959c49ae3bb885842807e4455fa082eae057;p=u%2Fmrichter%2FAliRoot.git diff --git a/T0/AliT0Reconstructor.cxx b/T0/AliT0Reconstructor.cxx index 6b288d172e2..a091e0a9b51 100644 --- a/T0/AliT0Reconstructor.cxx +++ b/T0/AliT0Reconstructor.cxx @@ -144,7 +144,7 @@ void AliT0Reconstructor::Reconstruct(TTree*digitsTree, TTree*clustersTree) const Float_t c = 29.9792458; // cm/ns Float_t channelWidth = fParam->GetChannelWidth() ; - Double32_t vertex = 9999999, meanVertex = 9999999 ; + Double32_t vertex = 9999999, meanVertex = 0 ; Double32_t timeDiff=999999, meanTime=999999, timeclock=999999; @@ -193,16 +193,18 @@ void AliT0Reconstructor::Reconstruct(TTree*digitsTree, TTree*clustersTree) const Float_t time[24], adc[24], adcmip[24]; for (Int_t ipmt=0; ipmt<24; ipmt++) { if(timeCFD->At(ipmt)>0 ) { + Float_t timefull = 0.001*( timeCFD->At(ipmt) - 511 - timeDelayCFD[ipmt]) * channelWidth; + frecpoints.SetTimeFull(ipmt, 0 ,timefull) ; if(( chargeQT1->At(ipmt) - chargeQT0->At(ipmt))>0) adc[ipmt] = chargeQT1->At(ipmt) - chargeQT0->At(ipmt); else adc[ipmt] = 0; time[ipmt] = fCalib-> WalkCorrection(refAmp, ipmt, Int_t(adc[ipmt]), timeCFD->At(ipmt)) ; - + time[ipmt] = time[ipmt] - 511; Double_t sl = Double_t(timeLED->At(ipmt) - timeCFD->At(ipmt)); // time[ipmt] = fCalib-> WalkCorrection( refAmp,ipmt, Int_t(sl), timeCFD->At(ipmt) ) ; - AliDebug(5,Form(" ipmt %i QTC %i , time in chann %i (led-cfd) %i ", + AliDebug(5,Form(" ipmt %i QTC %i , time in chann %i (led-cfd) %i ", ipmt, Int_t(adc[ipmt]) ,Int_t(time[ipmt]),Int_t( sl))); Double_t ampMip = 0; @@ -219,7 +221,7 @@ void AliT0Reconstructor::Reconstruct(TTree*digitsTree, TTree*clustersTree) const } else { - time[ipmt] = 0; + time[ipmt] = -99999; adc[ipmt] = 0; adcmip[ipmt] = 0; @@ -247,14 +249,14 @@ void AliT0Reconstructor::Reconstruct(TTree*digitsTree, TTree*clustersTree) const } if( besttimeA < 999999 && besttimeA!=0) { - frecpoints.SetTimeBestA((besttimeA_best * channelWidth - fdZonA/c) - 12500.); - frecpoints.SetTime1stA((besttimeA * channelWidth - fdZonA/c) - 12500.); + frecpoints.SetTimeBestA((besttimeA_best * channelWidth - fdZonA/c) ); + frecpoints.SetTime1stA((besttimeA * channelWidth - fdZonA/c) ); tr[1]=true; } if( besttimeC < 999999 && besttimeC!=0) { - frecpoints.SetTimeBestC((besttimeC_best * channelWidth - fdZonC/c) - 12500.); - frecpoints.SetTime1stC((besttimeC * channelWidth - fdZonC/c) - 12500.); + frecpoints.SetTimeBestC((besttimeC_best * channelWidth - fdZonC/c) ); + frecpoints.SetTime1stC((besttimeC * channelWidth - fdZonC/c) ); tr[2]=true; } @@ -267,18 +269,18 @@ void AliT0Reconstructor::Reconstruct(TTree*digitsTree, TTree*clustersTree) const timeDiff = (besttimeA - besttimeC)*channelWidth; meanTime = channelWidth * (besttimeA_best + besttimeC_best)/2. ; timeclock = channelWidth * (besttimeA + besttimeC)/2. ; - vertex = meanVertex - c*(timeDiff)/2.;// + (fdZonA - fdZonC)/2; + vertex = meanVertex - 0.001* c*(timeDiff)/2.;// + (fdZonA - fdZonC)/2; tr[0]=true; } frecpoints.SetVertex(vertex); - frecpoints.SetMeanTime(meanTime - 12500.); - frecpoints.SetT0clock(timeclock - 12500.); + frecpoints.SetMeanTime(meanTime ); + frecpoints.SetT0clock(timeclock ); frecpoints.SetT0Trig(tr); - AliDebug(5,Form("fRecPoints::: 1stimeA %f , besttimeA %f 1sttimeC %f besttimeC %f shiftA %f shiftC %f ", + AliDebug(5,Form("fRecPoints::: 1stimeA %f , besttimeA %f 1sttimeC %f besttimeC %f vertex %f", frecpoints.Get1stTimeA(), frecpoints.GetBestTimeA(), frecpoints.Get1stTimeC(), frecpoints.GetBestTimeC(), - fTimeMeanShift[1],fTimeMeanShift[2] ) ); + vertex ) ); AliDebug(5,Form("T0 triggers %d %d %d %d %d",tr[0],tr[1],tr[2],tr[3],tr[4])); @@ -301,7 +303,7 @@ void AliT0Reconstructor::Reconstruct(AliRawReader* rawReader, TTree*recTree) con { // T0 raw -> // - + Float_t meanOrA = fTime0vertex[0] + 587; Float_t meanOrC = fTime0vertex[0] + 678; Float_t meanTVDC = fTime0vertex[0] + 2564; @@ -315,7 +317,7 @@ void AliT0Reconstructor::Reconstruct(AliRawReader* rawReader, TTree*recTree) con timeDelayCFD[i] = Int_t (fParam->GetTimeDelayCFD(i)); } Int_t equalize = GetRecoParam() -> GetEq(); - printf( "AliT0Reconstructor::Reconstruct::: RecoParam %i \n",equalize); + // printf( "AliT0Reconstructor::Reconstruct::: RecoParam %i \n",equalize); fCalib->SetEq(equalize); Int_t low[500], high[500]; Float_t timefull=-9999;; @@ -436,8 +438,8 @@ void AliT0Reconstructor::Reconstruct(AliRawReader* rawReader, TTree*recTree) con else adc[ipmt] = 0; // time[ipmt] = fCalib-> WalkCorrection(refAmp, ipmt, Int_t(adc[ipmt]), timeCFD[ipmt] ) ; - - time[ipmt] = fCalib-> WalkCorrection(Int_t (fTime0vertex[ipmt]), ipmt, Int_t(adc[ipmt]), timeCFD[ipmt] ) ; + Int_t refAmp = Int_t (fTime0vertex[ipmt]); + time[ipmt] = fCalib-> WalkCorrection( refAmp, ipmt, Int_t(adc[ipmt]), timeCFD[ipmt] ) ; Double_t sl = timeLED[ipmt] - timeCFD[ipmt]; // time[ipmt] = fCalib-> WalkCorrection( refAmp,ipmt, Int_t(sl), timeCFD[ipmt] ) ; AliDebug(5,Form(" ipmt %i QTC %i , time in chann %i (led-cfd) %i ", @@ -449,11 +451,14 @@ void AliT0Reconstructor::Reconstruct(AliRawReader* rawReader, TTree*recTree) con TGraph * qtGraph = (TGraph*)fQTC.At(ipmt); if (qtGraph) qtMip = qtGraph->Eval(adc[ipmt]); AliDebug(10,Form(" Amlitude in MIPS LED %f ; QTC %f; in channels %f\n ",ampMip,qtMip, adc[ipmt])); - if( equalize ==0 ) - frecpoints.SetTime(ipmt, Float_t(time[ipmt]) ); + if( qtMip>lowAmpThreshold && qtMip