]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG2/RESONANCES/AliRsnAnalysisManager.cxx
Added new possible values and removed non physical primaries from MC analysis
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnAnalysisManager.cxx
index 9b4b7be2ad3948ced93b6e31f648df0345e98149..9b461f890c440fb8686c538c24f7dac40ce0cec9 100644 (file)
@@ -20,6 +20,7 @@
 #include <TROOT.h>
 
 #include "AliLog.h"
+#include "AliStack.h"
 #include "AliVEvent.h"
 #include "AliMCEvent.h"
 #include "AliRsnEvent.h"
@@ -207,6 +208,9 @@ void AliRsnAnalysisManager::ProcessAllPairsMC(AliRsnEvent *ev0, AliRsnEvent *ev1
   
   for (i0 = 0; i0 < nTracks[0]; i0++)
   {
+    // skip not physical primaries
+    if (!ev0->GetRefMC()->Stack()->IsPhysicalPrimary(i0)) continue;
+    
     // assign first track
     ev0->SetDaughterMC(daughter0, i0);
         
@@ -216,6 +220,9 @@ void AliRsnAnalysisManager::ProcessAllPairsMC(AliRsnEvent *ev0, AliRsnEvent *ev1
       // if looking same event, skip the case when the two indexes are equal
       if (ev0 == ev1 && i0 == i1) continue;
       
+      // skip not physical primaries
+      if (!ev1->GetRefMC()->Stack()->IsPhysicalPrimary(i1)) continue;
+      
       // assign second track
       ev1->SetDaughterMC(daughter1, i1);