]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Moved the radius calculation from the NextV0 to the UpdateV0 function
authorkaamodt <kaamodt@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 Oct 2009 16:16:07 +0000 (16:16 +0000)
committerkaamodt <kaamodt@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 Oct 2009 16:16:07 +0000 (16:16 +0000)
PWG4/GammaConv/AliV0Reader.cxx

index 7aba652e0ba0884344f5c28a8b733efd99e2939a..224bac6cd69fc01e90e13ac47345b3e88df1c722 100644 (file)
@@ -293,7 +293,7 @@ Bool_t AliV0Reader::NextV0(){
       fCFManager->GetParticleContainer()->Fill(containerInput,kStepTPCPID);                    // for CF
     }
                
-               
+    /*         
     if(fUseOwnXYZCalculation == kFALSE){
       fCurrentV0->GetXYZ(fCurrentXValue,fCurrentYValue,fCurrentZValue);
     }
@@ -306,7 +306,7 @@ Bool_t AliV0Reader::NextV0(){
       fCurrentYValue = convpos[1];
       fCurrentZValue = GetConvPosZ(GetPositiveESDTrack(),GetNegativeESDTrack(),GetMagneticField());
     }
-               
+    */ 
     if(GetXYRadius()>fMaxR){ // cuts on distance from collision point
       if(fHistograms != NULL){
        fHistograms->FillHistogram("ESD_CutR_InvMass",GetMotherCandidateMass());
@@ -611,6 +611,20 @@ Bool_t AliV0Reader::HasSameMCMother(){
        }
     }
   }
+
+  if(fUseOwnXYZCalculation == kFALSE){
+    fCurrentV0->GetXYZ(fCurrentXValue,fCurrentYValue,fCurrentZValue);
+  }
+  else{
+    Double_t convpos[2];
+    convpos[0]=0;
+    convpos[1]=0;
+    GetConvPosXY(GetPositiveESDTrack(),GetNegativeESDTrack(),GetMagneticField(),convpos);
+    fCurrentXValue = convpos[0];
+    fCurrentYValue = convpos[1];
+    fCurrentZValue = GetConvPosZ(GetPositiveESDTrack(),GetNegativeESDTrack(),GetMagneticField());
+  }
+  
   return iResult;
 }