]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG2/RESONANCES/AliRsnCutStd.cxx
remove option C for Clear for trigger array for the moment, causes malloc error
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnCutStd.cxx
index 65384eed1beea2b13a28bb0fb08b593a2857fce3..3c5fbb5e829cf1e423fc8096269097a3a9b837a8 100644 (file)
@@ -19,6 +19,8 @@
 #include <TMath.h>
 #include <TLorentzVector.h>
 
+#include "AliStack.h"
+#include "AliMCEvent.h"
 #include "AliRsnDaughter.h"
 #include "AliRsnMother.h"
 #include "AliRsnEvent.h"
@@ -66,6 +68,7 @@ AliRsnCutStd::AliRsnCutStd
     case kPtLeading:
     case kEta:
     case kY:
+    case kDipAngle:
     case kThetaDeg:
       if (fVarType != kDouble) 
       {
@@ -113,6 +116,7 @@ AliRsnCutStd::AliRsnCutStd
     case kPtLeading:
     case kEta:
     case kY:
+    case kDipAngle:
     case kThetaDeg:
       break;
     // other cuts are not based on a value, so no problem
@@ -140,6 +144,7 @@ AliRsnCut::EVarType AliRsnCutStd::CheckType()
     case kPtLeading:
     case kEta:
     case kY:
+    case kDipAngle:
     case kThetaDeg:
       return kDouble;
     // other cuts are not based on a value, so no problem
@@ -199,6 +204,12 @@ Bool_t AliRsnCutStd::IsDaughterSelected(AliRsnDaughter *daughter)
     case kCharge:
       fCutValueI = (Int_t)ref->Charge();
       return OkValue();
+    case kPhysPrimary:
+      if (!fEvent->GetRefMC()) return kFALSE;
+      else
+      {
+        return fEvent->GetRefMCESD()->Stack()->IsPhysicalPrimary(TMath::Abs(((AliVTrack*)ref)->GetLabel()));
+      }
     default:
       AliWarning(Form("Value %d is not included in available cuts for DAUGHTER. Cut skipped.", fType));
       return kTRUE;
@@ -231,6 +242,10 @@ Bool_t AliRsnCutStd::IsMotherSelected(AliRsnMother * const mother)
     case kY:
       fCutValueD = ref.Rapidity();
       return OkRange();
+    case kDipAngle:
+      fCutValueD = mother->GetDaughter(0)->Prec().Angle(mother->GetDaughter(1)->Prec().Vect());
+      fCutValueD = TMath::Abs(TMath::ACos(fCutValueD));
+      return OkRangeD();
     case kSameLabel:
       return mother->IsLabelEqual();
     default:
@@ -267,4 +282,4 @@ Bool_t AliRsnCutStd::IsEventSelected(AliRsnEvent * const event)
       AliWarning(Form("Value %d is not included in available cuts for EVENT. Cut skipped.", fType));
       return kTRUE;
   }
-}
\ No newline at end of file
+}