Changed phi definition from track direction to track position
authorshahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 25 Jun 2012 15:46:16 +0000 (15:46 +0000)
committershahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 25 Jun 2012 15:46:16 +0000 (15:46 +0000)
ANALYSIS/TenderSupplies/AliTrackFixTenderSupply.cxx

index 101727b..8ebc4cb 100644 (file)
@@ -92,6 +92,7 @@ void AliTrackFixTenderSupply::ProcessEvent()
   //  
   AliExternalTrackParam* extPar = 0;
   double xOrig = 0;
+  double xyzTPCInner[3] = {0,0,0};
   for (int itr=0;itr<nTracks;itr++) {
     //
     AliESDtrack* trc = event->GetTrack(itr);
@@ -107,7 +108,8 @@ void AliTrackFixTenderSupply::ProcessEvent()
       AliError("Failed to extract inner param");
       continue;
     }
-    double phi = parInner->Phi();
+    parInner->GetXYZ(xyzTPCInner);
+    double phi = TMath::ATan2(xyzTPCInner[1],xyzTPCInner[0]) + TMath::Pi();
     //
     if (fDebug>1) {
       AliInfo(Form("Tr:%4d kITSin:%d Phi=%+5.2f at X=%+7.2f | SideA fraction: %.3f",itr,trc->IsOn(AliESDtrack::kITSin),phi,parInner->GetX(),sideAfraction));