From 5478df1fab350a211554b30666d23c60ade903cd Mon Sep 17 00:00:00 2001 From: arcelli Date: Fri, 4 May 2007 15:10:53 +0000 Subject: [PATCH] Add auxiliary info for tof calibration to the ESD track, via TOFInfo --- TOF/AliTOFtracker.cxx | 46 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/TOF/AliTOFtracker.cxx b/TOF/AliTOFtracker.cxx index fc5054cfbd7..1cb2afada0f 100644 --- a/TOF/AliTOFtracker.cxx +++ b/TOF/AliTOFtracker.cxx @@ -241,10 +241,17 @@ Int_t AliTOFtracker::PropagateBack(AliESD* event) { AliESDtrack *t=event->GetTrack(i); AliESDtrack *seed =(AliESDtrack*)fSeeds->UncheckedAt(i); if(seed->GetTOFsignal()>0){ + Float_t info[10]; + seed->GetTOFInfo(info); t->SetTOFsignal(seed->GetTOFsignal()); t->SetTOFcluster(seed->GetTOFcluster()); t->SetTOFsignalToT(seed->GetTOFsignalToT()); t->SetTOFCalChannel(seed->GetTOFCalChannel()); + AliDebug(2,Form(" Setting TOF info: %f %f %f = ",info[0],info[1],info[2])); + t->SetTOFInfo(info); + + t->GetTOFInfo(info); + AliDebug(2,Form(" Getting again TOF info: %f %f %f = ",info[0],info[1],info[2])); Int_t tlab[3]; seed->GetTOFLabel(tlab); t->SetTOFLabel(tlab); AliTOFtrack *track = new AliTOFtrack(*seed); @@ -293,6 +300,9 @@ Int_t AliTOFtracker::PropagateBack(AliESD* event) { //_________________________________________________________________________ void AliTOFtracker::CollectESD() { //prepare the set of ESD tracks to be matched to clusters in TOF + + Int_t seedsTOF1=0; + Int_t seedsTOF2=0; fTracks= new TClonesArray("AliTOFtrack"); TClonesArray &aTOFTrack = *fTracks; @@ -301,7 +311,7 @@ void AliTOFtracker::CollectESD() { AliESDtrack *t =(AliESDtrack*)fSeeds->UncheckedAt(i); if ((t->GetStatus()&AliESDtrack::kTPCout)==0)continue; - // TRD good tracks, already propagated at 371 cm + // TRD 'good' tracks, already propagated at 371 cm AliTOFtrack *track = new AliTOFtrack(*t); // New Double_t x = track->GetX(); //New @@ -312,6 +322,7 @@ void AliTOFtracker::CollectESD() { t->UpdateTrackParams(track,AliESDtrack::kTOFout); new(aTOFTrack[fNseedsTOF]) AliTOFtrack(*track); fNseedsTOF++; + seedsTOF1++; delete track; } @@ -323,12 +334,15 @@ void AliTOFtracker::CollectESD() { t->UpdateTrackParams(track,AliESDtrack::kTOFout); new(aTOFTrack[fNseedsTOF]) AliTOFtrack(*track); fNseedsTOF++; + seedsTOF2++; } delete track; } } - AliInfo(Form("Number of TOF seedds %i",fNseedsTOF)); + AliInfo(Form("Number of TOF seeds %i",fNseedsTOF)); + AliInfo(Form("Number of TOF seeds Type 1 %i",seedsTOF1)); + AliInfo(Form("Number of TOF seeds Type 2 %i",seedsTOF2)); // Sort according uncertainties on track position fTracks->Sort(); @@ -612,6 +626,10 @@ void AliTOFtracker::MatchTracks( Bool_t mLastStep){ // Store quantities to be used in the TOF Calibration Float_t tToT=fGeom->ToTBinWidth()*c->GetToT()*1E-3; // in ns t->SetTOFsignalToT(tToT); + Float_t rawTime=fGeom->TdcBinWidth()*c->GetTDCRAW()+32; // RAW time,in ps + Float_t info[10]; + info[0]=rawTime; + info[1]=mindistZ; Int_t ind[5]; ind[0]=c->GetDetInd(0); ind[1]=c->GetDetInd(1); @@ -626,11 +644,24 @@ void AliTOFtracker::MatchTracks( Bool_t mLastStep){ tlab[0]=c->GetLabel(0); tlab[1]=c->GetLabel(1); tlab[2]=c->GetLabel(2); - + AliDebug(2,Form(" tdc time of the matched track %i = ",c->GetTDC())); Double_t tof=fGeom->TdcBinWidth()*c->GetTDC()+32; // in ps - if(timeWalkCorr)tof=CorrectTimeWalk(mindistZ,tof); - t->SetTOFsignal(tof); + AliDebug(2,Form(" tof time of the matched track: %f = ",tof)); + info[2]=tof; + AliDebug(2,Form(" Setting TOF info. raw time: %f z distance: %f time: %f = ",info[0],info[1],info[2])); + t->SetTOFInfo(info); + + Double_t tofcorr=tof; + if(timeWalkCorr)tofcorr=CorrectTimeWalk(mindistZ,tof); + AliDebug(2,Form(" tof time of the matched track, after TW corr: %f = ",tofcorr)); + //Set TOF time signal and pointer to the matched cluster + t->SetTOFsignal(tofcorr); t->SetTOFcluster(idclus); // pointing to the recPoints tree + + //Auxiliary info... + + + //Tracking info Double_t time[AliPID::kSPECIES]; t->GetIntegratedTimes(time); Double_t mom=t->GetP(); for(Int_t j=0;jSetIntegratedLength(recL); t->SetIntegratedTimes(time); t->SetTOFLabel(tlab); + + // Fill Reco-QA histos for Reconstruction fHRecNClus->Fill(nc); fHRecDist->Fill(mindist); @@ -655,10 +688,9 @@ void AliTOFtracker::MatchTracks( Bool_t mLastStep){ // Fill Tree for on-the-fly offline Calibration if ( !((t->GetStatus() & AliESDtrack::kTIME)==0 )){ - Float_t rawtime=fGeom->TdcBinWidth()*c->GetTDCRAW()+32; // RAW time,in ps fIch=calindex; fToT=tToT; - fTime=rawtime; + fTime=rawTime; fExpTimePi=time[2]; fExpTimeKa=time[3]; fExpTimePr=time[4]; -- 2.39.3