From: srossegg Date: Thu, 26 Aug 2010 14:24:49 +0000 (+0000) Subject: Bugfix to use cylindrical coordinates consitently (in Marian creation of the residual... X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=287fbdfa8f91c9713815ccf30359b58b297b3015 Bugfix to use cylindrical coordinates consitently (in Marian creation of the residual maps) --- diff --git a/TPC/AliTPCCorrection.cxx b/TPC/AliTPCCorrection.cxx index 24e5ae3b72e..07b8b0fc67a 100644 --- a/TPC/AliTPCCorrection.cxx +++ b/TPC/AliTPCCorrection.cxx @@ -1927,7 +1927,7 @@ void AliTPCCorrection::AddVisualCorrection(AliTPCCorrection* corr, Int_t positio -Double_t AliTPCCorrection::GetCorrSector(Double_t sector, Double_t localX, Double_t kZ, Int_t axisType, Int_t corrType){ +Double_t AliTPCCorrection::GetCorrSector(Double_t sector, Double_t r, Double_t kZ, Int_t axisType, Int_t corrType){ // // calculate the correction at given position - check the geffCorr // @@ -1935,9 +1935,9 @@ Double_t AliTPCCorrection::GetCorrSector(Double_t sector, Double_t localX, Doubl AliTPCCorrection *corr = (AliTPCCorrection*)fgVisualCorrection->At(corrType); if (!corr) return 0; Double_t phi=sector*TMath::Pi()/9.; - Double_t gx = localX*TMath::Cos(phi); - Double_t gy = localX*TMath::Sin(phi); - Double_t gz = localX*kZ; + Double_t gx = r*TMath::Cos(phi); + Double_t gy = r*TMath::Sin(phi); + Double_t gz = r*kZ; Int_t nsector=(gz>0) ? 0:18; // // diff --git a/TPC/AliTPCCorrection.h b/TPC/AliTPCCorrection.h index b1fd7f3f82b..571ac5843a5 100644 --- a/TPC/AliTPCCorrection.h +++ b/TPC/AliTPCCorrection.h @@ -90,7 +90,7 @@ public: void FastSimDistortedVertex(Double_t orgVertex[3], Int_t nTracks, AliESDVertex &aV, AliESDVertex &avOrg, AliESDVertex &cV, AliESDVertex &cvOrg, TTreeSRedirector * const pcstream, Double_t etaCuts); static void AddVisualCorrection(AliTPCCorrection* corr, Int_t position); - static Double_t GetCorrSector(Double_t sector, Double_t localX, Double_t kZ, Int_t axisType, Int_t corrType=0); + static Double_t GetCorrSector(Double_t sector, Double_t r, Double_t kZ, Int_t axisType, Int_t corrType=0); static Double_t GetCorrXYZ(Double_t gx, Double_t gy, Double_t gz, Int_t axisType, Int_t corrType=0); protected: diff --git a/TPC/AliTPCcalibAlign.cxx b/TPC/AliTPCcalibAlign.cxx index a2c30064f83..27cd6fdaaec 100644 --- a/TPC/AliTPCcalibAlign.cxx +++ b/TPC/AliTPCcalibAlign.cxx @@ -1676,7 +1676,7 @@ void AliTPCcalibAlign::MakeResidualHistos(){ axisName[1]="sector"; axisTitle[1]="Sector Number"; binsTrack[1]=180; xminTrack[1]=0; xmaxTrack[1]=18; // - axisName[2]="localX"; axisTitle[2]="x (cm)"; + axisName[2]="R"; axisTitle[2]="r (cm)"; binsTrack[2]=53; xminTrack[2]=85.; xmaxTrack[2]=245.; // // @@ -2722,7 +2722,7 @@ void AliTPCcalibAlign::UpdateClusterDeltaField(const AliTPCseed * seed){ trackOut.GetXYZ(xyz); resVector[1]= 9.*TMath::ATan2(xyz[1],xyz[0])/TMath::Pi(); if (resVector[1]<0) resVector[1]+=18; - resVector[2]= cl->GetX(); + resVector[2]= TMath::Sqrt(cl->GetX()*cl->GetX()+cl->GetY()*cl->GetY()); resVector[3]= cl->GetZ()/cl->GetX(); // resVector[0]= cl->GetY()-trackOut.GetY(); @@ -2772,7 +2772,7 @@ void AliTPCcalibAlign::UpdateClusterDeltaField(const AliTPCseed * seed){ trackIn.GetXYZ(xyz); resVector[1]= 9.*TMath::ATan2(xyz[1],xyz[0])/TMath::Pi(); if (resVector[1]<0) resVector[1]+=18; - resVector[2]= cl->GetX(); + resVector[2]= TMath::Sqrt(cl->GetX()*cl->GetX()+cl->GetY()*cl->GetY()); resVector[3]= cl->GetZ()/cl->GetX(); // resVector[0]= cl->GetY()-trackIn.GetY(); @@ -2963,7 +2963,7 @@ void AliTPCcalibAlign::UpdateAlignSector(const AliTPCseed * track,Int_t isec){ if (fCurrentTrack->IsOn(0x4)&&TMath::Abs(vImpact[0])<1&&TMath::Abs(vImpact[1])<1){ Double_t resVector[5]; resVector[1]= 9.*gphi/TMath::Pi(); - resVector[2]= c->GetX(); + resVector[2]= TMath::Sqrt(c->GetX()*c->GetX()+c->GetY()*c->GetY()); resVector[3]= c->GetZ()/c->GetX(); // //