X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=TOF%2FAliTOFSDigit.cxx;h=88f1faad9339d44f878d70e5848ef51da7d00f28;hp=a22a86572de0e4a42a779e5da0736ec5343a7096;hb=7d53ce61133fc240e439e7230f52510edb3463fd;hpb=5ab3605a5eedf36019d7b3899782edb806888c69 diff --git a/TOF/AliTOFSDigit.cxx b/TOF/AliTOFSDigit.cxx index a22a86572de..88f1faad933 100644 --- a/TOF/AliTOFSDigit.cxx +++ b/TOF/AliTOFSDigit.cxx @@ -31,10 +31,6 @@ // -- Authors: F. Pierella, A. Seganti, D. Vicinanza // //_________________________________________________________________________// -//#include "TArrayI.h" - -#include "AliLog.h" - #include "AliTOFGeometry.h" #include "AliTOFSDigit.h" @@ -194,22 +190,34 @@ void AliTOFSDigit::Update(Float_t tdcbin, Int_t tdc, Int_t adc, Int_t track) } } - if (sameTime >= 0) { + if (sameTime >= 0) { // another time measurement happens during the + // dead time of the hit pad => it corresponds + // to the same time measurement (*fAdc)[sameTime] += adc; - // update track - find the first -1 value and replace it by the - // track number - for (Int_t iTrack=0; iTrackSet(fNDigits); @@ -218,9 +226,9 @@ void AliTOFSDigit::Update(Float_t tdcbin, Int_t tdc, Int_t adc, Int_t track) (*fAdc)[fNDigits-1] = adc; fTracks->Set(fNDigits*kMAXDIGITS); (*fTracks)[(fNDigits-1)*kMAXDIGITS] = track; - for (Int_t i = 1; i GetNDigits(); + Float_t tdcbin = AliTOFGeometry::TdcBinWidth();// [ps] hardwired for the time being + Int_t track = -1; + Int_t adc = -1; + Int_t tdc = -1; + + // start loop on all sdig locations + Int_t nlocations = sdig->GetNDigits(); for (Int_t j = 0; j < nlocations; j++) { - Float_t tdcbin = AliTOFGeometry::TdcBinWidth();// [ps] hardwired for the time being - Int_t tdc=(Int_t)sdig->GetTdc(j); - Int_t adc=(Int_t)sdig->GetAdc(j); + tdc = (Int_t)sdig->GetTdc(j); + adc = (Int_t)sdig->GetAdc(j); + // getting here only the first track number - Int_t track=GetTrack(j,0); - - - Int_t sameTime = -1; - Float_t tdcwindow = AliTOFGeometry::DeadTime()/tdcbin; - for (Int_t i = 0; i < fNDigits; i++) { - if (TMath::Abs(tdc-fTdc->At(i)) < tdcwindow) { - sameTime = i; - break; - } - } - - if (sameTime >= 0) { - (*fAdc)[sameTime] += adc; - // update track - find the first -1 value and replace it by the - // track number - for (Int_t iTrack=0; iTrackSet(fNDigits); - (*fTdc)[fNDigits-1] = tdc; - fAdc->Set(fNDigits); - (*fAdc)[fNDigits-1] = adc; - fTracks->Set(fNDigits*kMAXDIGITS); - (*fTracks)[(fNDigits-1)*kMAXDIGITS] = track; - for (Int_t i = 1; i = 0) + //Int_t track = GetTrack(j,0); + + // getting here all the track numbers + for (Int_t iTrack = 0; iTrackGetTrack(j,iTrack); + Update(tdcbin, tdc, adc, track); + } // end loop on tracks + } // end loop on sdig locations + + } //////////////////////////////////////////////////////////////////////// @@ -304,8 +287,7 @@ Int_t AliTOFSDigit::GetTotPad() const // starting from the digits data. // - Int_t pad = 2*fPadx + fPadz; - //Int_t pad = fPadx+AliTOFGeometry::NpadX()*fPadz; + Int_t pad = AliTOFGeometry::NpadZ()*fPadx + fPadz; Int_t before=0; switch(fPlate){