From e81ea7b64ef4432dffec4312b0925c4b33a31ba7 Mon Sep 17 00:00:00 2001 From: decaro Date: Mon, 23 Nov 2009 01:42:43 +0000 Subject: [PATCH] Track parameters update during the TOF-track matching procedure: REMOVED --- TOF/AliTOFtracker.cxx | 86 ++++++++++++++++++++++++++++++++++++----- TOF/AliTOFtrackerMI.cxx | 27 ++++++++++--- TOF/AliTOFtrackerV1.cxx | 80 +++++++++++++++++++++++++++++++++++--- 3 files changed, 172 insertions(+), 21 deletions(-) diff --git a/TOF/AliTOFtracker.cxx b/TOF/AliTOFtracker.cxx index d9302a4aa9d..9e86a200c09 100644 --- a/TOF/AliTOFtracker.cxx +++ b/TOF/AliTOFtracker.cxx @@ -211,16 +211,84 @@ Int_t AliTOFtracker::PropagateBack(AliESDEvent* event) { Int_t tlab[3]; seed->GetTOFLabel(tlab); t->SetTOFLabel(tlab); - Float_t info[10]={0.,0.,0.,0.,0.,0.,0.,0.,0.,0.}; - seed->GetTOFInfo(info); + Double_t alphaA = dynamic_cast(t)->GetAlpha(); + Double_t xA = dynamic_cast(t)->GetX(); + Double_t yA = dynamic_cast(t)->GetY(); + Double_t zA = dynamic_cast(t)->GetZ(); + Double_t p1A = dynamic_cast(t)->GetSnp(); + Double_t p2A = dynamic_cast(t)->GetTgl(); + Double_t p3A = dynamic_cast(t)->GetSigned1Pt(); + const Double_t *covA = dynamic_cast(t)->GetCovariance(); + + // Make attention, please: + // AliESDtrack::fTOFInfo array does not be stored in the AliESDs.root file + // it is there only for a check during the reconstruction step. + Float_t info[10]; seed->GetTOFInfo(info); t->SetTOFInfo(info); - AliDebug(2,Form(" distance=%f; residual in the pad reference frame: dX=%f, dZ=%f", info[0],info[1],info[2])); - - AliTOFtrack *track = new AliTOFtrack(*seed); - t->UpdateTrackParams(track,AliESDtrack::kTOFout); // to be checked - AdC - delete track; - Double_t time[10]; t->GetIntegratedTimes(time); - AliDebug(2,Form(" %6d %f %f %f %f %f %6d %3d %f %f %f %f %f %f", + AliDebug(3,Form(" distance=%f; residual in the pad reference frame: dX=%f, dZ=%f", info[0],info[1],info[2])); + + // Check done: + // by calling the AliESDtrack::UpdateTrackParams, + // the current track parameters are changed + // and it could cause refit problems. + // We need to update only the following track parameters: + // the track length and expected times. + // Removed AliESDtrack::UpdateTrackParams call + // Called AliESDtrack::SetIntegratedTimes(...) and + // AliESDtrack::SetIntegratedLength() routines. + /* + AliTOFtrack *track = new AliTOFtrack(*seed); + t->UpdateTrackParams(track,AliESDtrack::kTOFout); // to be checked - AdC + delete track; + Double_t time[10]; t->GetIntegratedTimes(time); + */ + + Double_t time[10]; seed->GetIntegratedTimes(time); + t->SetIntegratedTimes(time); + + Double_t length = seed->GetIntegratedLength(); + t->SetIntegratedLength(length); + + Double_t alphaB = dynamic_cast(t)->GetAlpha(); + Double_t xB = dynamic_cast(t)->GetX(); + Double_t yB = dynamic_cast(t)->GetY(); + Double_t zB = dynamic_cast(t)->GetZ(); + Double_t p1B = dynamic_cast(t)->GetSnp(); + Double_t p2B = dynamic_cast(t)->GetTgl(); + Double_t p3B = dynamic_cast(t)->GetSigned1Pt(); + const Double_t *covB = dynamic_cast(t)->GetCovariance(); + AliDebug(2,"Track params -now(before)-:"); + AliDebug(2,Form(" X: %f(%f), Y: %f(%f), Z: %f(%f) --- alpha: %f(%f)", + xB,xA, + yB,yA, + zB,zA, + alphaB,alphaA)); + AliDebug(2,Form(" p1: %f(%f), p2: %f(%f), p3: %f(%f)", + p1B,p1A, + p2B,p2A, + p3B,p3A)); + AliDebug(2,Form(" cov1: %f(%f), cov2: %f(%f), cov3: %f(%f)" + " cov4: %f(%f), cov5: %f(%f), cov6: %f(%f)" + " cov7: %f(%f), cov8: %f(%f), cov9: %f(%f)" + " cov10: %f(%f), cov11: %f(%f), cov12: %f(%f)" + " cov13: %f(%f), cov14: %f(%f), cov15: %f(%f)", + covB[0],covA[0], + covB[1],covA[1], + covB[2],covA[2], + covB[3],covA[3], + covB[4],covA[4], + covB[5],covA[5], + covB[6],covA[6], + covB[7],covA[7], + covB[8],covA[8], + covB[9],covA[9], + covB[10],covA[10], + covB[11],covA[11], + covB[12],covA[12], + covB[13],covA[13], + covB[14],covA[14] + )); + AliDebug(3,Form(" TOF params: %6d %f %f %f %f %f %6d %3d %f %f %f %f %f %f", i, t->GetTOFsignalRaw(), t->GetTOFsignal(), diff --git a/TOF/AliTOFtrackerMI.cxx b/TOF/AliTOFtrackerMI.cxx index 91b627877a7..40d0463ecef 100644 --- a/TOF/AliTOFtrackerMI.cxx +++ b/TOF/AliTOFtrackerMI.cxx @@ -167,24 +167,39 @@ Int_t AliTOFtrackerMI::PropagateBack(AliESDEvent* event) { t->SetStatus(AliESDtrack::kTOFin); //if(seed->GetTOFsignal()>0){ if ( (seed->GetStatus()&AliESDtrack::kTOFout)!=0 ) { + t->SetStatus(AliESDtrack::kTOFout); t->SetTOFsignal(seed->GetTOFsignal()); t->SetTOFcluster(seed->GetTOFcluster()); - Int_t tlab[3]; - seed->GetTOFLabel(tlab); + Int_t tlab[3]; seed->GetTOFLabel(tlab); t->SetTOFLabel(tlab); + + // Check done: + // by calling the AliESDtrack::UpdateTrackParams, + // the current track parameters are changed + // and it could cause refit problems. + // We need to update only the following track parameters: + // the track length and expected times. + // Removed AliESDtrack::UpdateTrackParams call + // Called AliESDtrack::SetIntegratedTimes(...) and + // AliESDtrack::SetIntegratedLength() routines. + /* AliTOFtrack *track = new AliTOFtrack(*seed); - Double_t times[10]; - seed->GetIntegratedTimes(times); t->UpdateTrackParams(track,AliESDtrack::kTOFout); - t->SetIntegratedLength(seed->GetIntegratedLength()); + delete track; + */ + + Double_t times[10]; seed->GetIntegratedTimes(times); t->SetIntegratedTimes(times); + t->SetIntegratedLength(seed->GetIntegratedLength()); t->SetTOFsignalToT(seed->GetTOFsignalToT()); t->SetTOFCalChannel(seed->GetTOFCalChannel()); // + // Make attention, please: + // AliESDtrack::fTOFInfo array does not be stored in the AliESDs.root file + // it is there only for a check during the reconstruction step. Float_t info[10]; seed->GetTOFInfo(info); t->SetTOFInfo(info); - delete track; } } } diff --git a/TOF/AliTOFtrackerV1.cxx b/TOF/AliTOFtrackerV1.cxx index 0c7e75828ff..d90af2329bd 100644 --- a/TOF/AliTOFtrackerV1.cxx +++ b/TOF/AliTOFtrackerV1.cxx @@ -195,17 +195,85 @@ Int_t AliTOFtrackerV1::PropagateBack(AliESDEvent* event) { Int_t tlab[3]; seed->GetTOFLabel(tlab); t->SetTOFLabel(tlab); + Double_t alphaA = dynamic_cast(t)->GetAlpha(); + Double_t xA = dynamic_cast(t)->GetX(); + Double_t yA = dynamic_cast(t)->GetY(); + Double_t zA = dynamic_cast(t)->GetZ(); + Double_t p1A = dynamic_cast(t)->GetSnp(); + Double_t p2A = dynamic_cast(t)->GetTgl(); + Double_t p3A = dynamic_cast(t)->GetSigned1Pt(); + const Double_t *covA = dynamic_cast(t)->GetCovariance(); + + // Make attention, please: + // AliESDtrack::fTOFInfo array does not be stored in the AliESDs.root file + // it is there only for a check during the reconstruction step. Float_t info[10]={0.,0.,0.,0.,0.,0.,0.,0.,0.,0.}; seed->GetTOFInfo(info); t->SetTOFInfo(info); AliDebug(2,Form(" distance=%f; residual in the pad reference frame: dX=%f, dZ=%f", info[0],info[1],info[2])); - AliTOFtrack *track = new AliTOFtrack(*seed); - t->UpdateTrackParams(track,AliESDtrack::kTOFout); // to be checked - AdC - delete track; - - Double_t time[10]; t->GetIntegratedTimes(time); - AliDebug(2,Form(" %6d %f %f %f %f % %6d %3d %f %f %f %f %f %f", + // Check done: + // by calling the AliESDtrack::UpdateTrackParams, + // the current track parameters are changed + // and it could cause refit problems. + // We need to update only the following track parameters: + // the track length and expected times. + // Removed AliESDtrack::UpdateTrackParams call + // Called AliESDtrack::SetIntegratedTimes(...) and + // AliESDtrack::SetIntegratedLength() routines. + /* + AliTOFtrack *track = new AliTOFtrack(*seed); + t->UpdateTrackParams(track,AliESDtrack::kTOFout); // to be checked - AdC + delete track; + Double_t time[10]; t->GetIntegratedTimes(time); + */ + + Double_t time[10]; seed->GetIntegratedTimes(time); + t->SetIntegratedTimes(time); + + Double_t length = seed->GetIntegratedLength(); + t->SetIntegratedLength(length); + + Double_t alphaB = dynamic_cast(t)->GetAlpha(); + Double_t xB = dynamic_cast(t)->GetX(); + Double_t yB = dynamic_cast(t)->GetY(); + Double_t zB = dynamic_cast(t)->GetZ(); + Double_t p1B = dynamic_cast(t)->GetSnp(); + Double_t p2B = dynamic_cast(t)->GetTgl(); + Double_t p3B = dynamic_cast(t)->GetSigned1Pt(); + const Double_t *covB = dynamic_cast(t)->GetCovariance(); + AliDebug(2,"Track params -now(before)-:"); + AliDebug(2,Form(" X: %f(%f), Y: %f(%f), Z: %f(%f) --- alpha: %f(%f)", + xB,xA, + yB,yA, + zB,zA, + alphaB,alphaA)); + AliDebug(2,Form(" p1: %f(%f), p2: %f(%f), p3: %f(%f)", + p1B,p1A, + p2B,p2A, + p3B,p3A)); + AliDebug(2,Form(" cov1: %f(%f), cov2: %f(%f), cov3: %f(%f)" + " cov4: %f(%f), cov5: %f(%f), cov6: %f(%f)" + " cov7: %f(%f), cov8: %f(%f), cov9: %f(%f)" + " cov10: %f(%f), cov11: %f(%f), cov12: %f(%f)" + " cov13: %f(%f), cov14: %f(%f), cov15: %f(%f)", + covB[0],covA[0], + covB[1],covA[1], + covB[2],covA[2], + covB[3],covA[3], + covB[4],covA[4], + covB[5],covA[5], + covB[6],covA[6], + covB[7],covA[7], + covB[8],covA[8], + covB[9],covA[9], + covB[10],covA[10], + covB[11],covA[11], + covB[12],covA[12], + covB[13],covA[13], + covB[14],covA[14] + )); + AliDebug(3,Form(" %6d %f %f %f %f % %6d %3d %f %f %f %f %f %f", i, t->GetTOFsignalRaw(), t->GetTOFsignal(), -- 2.43.0