]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Added cut on fiducial volume + fix cosine pointing angle for AODv0
authorfbellini <fbellini@cern.ch>
Thu, 1 May 2014 07:24:23 +0000 (09:24 +0200)
committerfbellini <fbellini@cern.ch>
Thu, 1 May 2014 07:24:23 +0000 (09:24 +0200)
PWGLF/RESONANCES/AliRsnCutV0.cxx

index 557315e9fccfa56fc7b0b179630442eb230d520a..49821c3f8306081ca3841d02f1de97fc3ac34b2b 100644 (file)
@@ -211,7 +211,7 @@ Bool_t AliRsnCutV0::CheckESD(AliESDv0 *v0)
       AliDebugClass(2, "Failed check on DCA to primary vertes");
       return kFALSE;
    }
-   if (TMath::Abs(v0->GetV0CosineOfPointingAngle()) < fMinCosPointAngle) {
+      if (TMath::Abs(v0->GetV0CosineOfPointingAngle()) < fMinCosPointAngle) {
       AliDebugClass(2, "Failed check on cosine of pointing angle");
       return kFALSE;
    }
@@ -224,7 +224,14 @@ Bool_t AliRsnCutV0::CheckESD(AliESDv0 *v0)
       return kFALSE;
    }
 
-
+   Double_t v0Position[3]; // from $ALICE_ROOT/ANALYSIS/AliESDV0Cuts.cxx
+  v0->GetXYZ(v0Position[0],v0Position[1],v0Position[2]);
+  Double_t radius = TMath::Sqrt(TMath::Power(v0Position[0],2) + TMath::Power(v0Position[1],2));
+  if ( ( radius < 0.8 ) || ( radius > 100 ) ) {
+    AliDebugClass(2, "Failed fiducial volume");
+    return kFALSE;   
+  }
+    
    // check PID on proton or antiproton from V0
 
    // check initialization of PID object
@@ -399,21 +406,31 @@ Bool_t AliRsnCutV0::CheckAOD(AliAODv0 *v0)
       return kFALSE;
    }
 
-   // next cut is effective (should it be in AODV0?)
-   if (TMath::Abs( TMath::Cos(v0->OpenAngleV0()) ) < fMinCosPointAngle) {
-      AliDebugClass(2, "Failed check on cosine of pointing angle");
-      return kFALSE;
+   // next cut is effective (should it be in AODV0?)     
+   AliAODVertex *vertex = lAODEvent->GetPrimaryVertex();
+   Double_t cospointangle = v0->CosPointingAngle(vertex);
+   if (TMath::Abs( cospointangle )  < fMinCosPointAngle) {
+     AliDebugClass(2, "Failed check on cosine of pointing angle");
+     return kFALSE;
    }
-   // next cut is effective (should it be in AODV0?)
+  // next cut is effective (should it be in AODV0?)
    if (TMath::Abs(v0->DcaV0Daughters()) > fMaxDaughtersDCA) {
       AliDebugClass(2, "Failed check on DCA between daughters");
       return kFALSE;
    }
+
    if (TMath::Abs(v0->RapLambda()) > fMaxRapidity) {
       AliDebugClass(2, "Failed check on V0 rapidity");
       return kFALSE;
    }
 
+   Double_t radius = v0->RadiusV0();
+   if ( ( radius < 0.8 ) || ( radius > 100 ) ) {
+     AliDebugClass(2, "Failed fiducial volume");
+     return kFALSE;   
+   }
+
    //-----------------------------------------------------------
    // check initialization of PID object
    AliPIDResponse *pid = fEvent->GetPIDResponse();