track->SetTOFpid(p);
if (heavy) track->ResetStatus(AliESDtrack::kTOFpid);
- if (!CheckTOFMatching(track)) track->SetStatus(AliESDtrack::kTOFmismatch);
+ if (!CheckTOFMatching(track)) track->SetStatus(AliESDtrack::kTOFmismatch);
}
//_________________________________________________________________________
Double_t exptimes[5];
track->GetIntegratedTimes(exptimes);
- Float_t dedx = track->GetTPCsignal();
- Float_t time = track->GetTOFsignal();
-
Float_t p = track->P();
+ Float_t dedx = track->GetTPCsignal();
+ Float_t time = track->GetTOFsignal() - fTOFResponse.GetStartTime(p);
+
Double_t ptpc[3];
track->GetInnerPxPyPz(ptpc);
Float_t momtpc=TMath::Sqrt(ptpc[0]*ptpc[0] + ptpc[1]*ptpc[1] + ptpc[2]*ptpc[2]);
Float_t dedxExp = fTPCResponse.GetExpectedSignal(momtpc,type);
Float_t resolutionTPC = fTPCResponse.GetExpectedSigma(momtpc,track->GetTPCsignalN(),type);
- if(TMath::Abs(dedx - dedxExp) < fRange * resolutionTPC){
+ if(TMath::Abs(dedx - dedxExp) < fRangeTOFMismatch * resolutionTPC){
status = kTRUE;
}
}
Bool_t flagT0TOF=kFALSE;
Bool_t flagT0T0=kFALSE;
- Float_t startTime[fTOFResponse.GetNmomBins()];
- Float_t startTimeRes[fTOFResponse.GetNmomBins()];
+ Float_t *startTime = new Float_t[fTOFResponse.GetNmomBins()];
+ Float_t *startTimeRes = new Float_t[fTOFResponse.GetNmomBins()];
- Float_t estimatedT0event[fTOFResponse.GetNmomBins()];
- Float_t estimatedT0resolution[fTOFResponse.GetNmomBins()];
+ Float_t *estimatedT0event = new Float_t[fTOFResponse.GetNmomBins()];
+ Float_t *estimatedT0resolution = new Float_t[fTOFResponse.GetNmomBins()];
for(Int_t i=0;i<fTOFResponse.GetNmomBins();i++){
estimatedT0event[i]=0.0;
estimatedT0resolution[i]=0.0;
fTOFResponse.SetT0event(estimatedT0event);
fTOFResponse.SetT0resolution(estimatedT0resolution);
}
+ delete [] startTime;
+ delete [] startTimeRes;
+ delete [] estimatedT0event;
+ delete [] estimatedT0resolution;
}