-add pdg exclusion range for all open charm,beauty meson and baryons
authorjbook <jbook@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 7 Nov 2013 15:46:25 +0000 (15:46 +0000)
committerjbook <jbook@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 7 Nov 2013 15:46:25 +0000 (15:46 +0000)
PWGDQ/dielectron/AliDielectronMC.cxx
PWGDQ/dielectron/AliDielectronSignalMC.h

index 0fc9c34..4e2d0f3 100644 (file)
@@ -44,6 +44,7 @@
 #include "AliDielectronSignalMC.h"
 #include "AliDielectronMC.h"
 
+
 ClassImp(AliDielectronMC)
 
 AliDielectronMC* AliDielectronMC::fgInstance=0x0;
@@ -869,6 +870,23 @@ Bool_t AliDielectronMC::ComparePDG(Int_t particlePDG, Int_t requiredPDG, Bool_t
       if(requiredPDG<0) result = particlePDG>=-5499 && particlePDG<=-5000;
     }
     break;
+  case 902:      // // open charm,beauty  mesons and baryons together
+    if(checkBothCharges)
+      result = (TMath::Abs(particlePDG)>=400 && TMath::Abs(particlePDG)<=439) ||
+       (TMath::Abs(particlePDG)>=4000 && TMath::Abs(particlePDG)<=4399) ||
+       (TMath::Abs(particlePDG)>=500 && TMath::Abs(particlePDG)<=549) ||
+       (TMath::Abs(particlePDG)>=5000 && TMath::Abs(particlePDG)<=5499);
+    else {
+      if(requiredPDG>0) result = (particlePDG>=400 && particlePDG<=439) ||
+                         (particlePDG>=4000 && particlePDG<=4399)      ||
+                         (particlePDG>=500 && particlePDG<=549)        ||
+                         (particlePDG>=5000 && particlePDG<=5499);
+      if(requiredPDG<0) result = (particlePDG>=-439 && particlePDG<=-400) ||
+                         (particlePDG>=-4399 && particlePDG<=-4000)      ||
+                         (particlePDG>=-549 && particlePDG<=-500)        ||
+                         (particlePDG>=-5499 && particlePDG<=-5000);
+    }
+    break;
   default:          // all specific cases
     if(checkBothCharges)
       result = (absRequiredPDG==TMath::Abs(particlePDG));
@@ -880,7 +898,6 @@ Bool_t AliDielectronMC::ComparePDG(Int_t particlePDG, Int_t requiredPDG, Bool_t
   return result;
 }
 
-
 //________________________________________________________________________________
 Bool_t AliDielectronMC::IsPhysicalPrimary(Int_t label) const {
   //
@@ -1035,7 +1052,7 @@ Bool_t AliDielectronMC::IsMCTruth(Int_t label, AliDielectronSignalMC* signalMC,
       mcMother = GetMCTrackFromMCEvent(mLabel);
     }
     if(!mcMother && !signalMC->GetMotherPDGexclude(branch)) return kFALSE;
-
+    
     if(!ComparePDG((mcMother ? mcMother->PdgCode() : 0),signalMC->GetMotherPDG(branch),signalMC->GetMotherPDGexclude(branch),signalMC->GetCheckBothChargesMothers(branch))) return kFALSE;
     if(!CheckParticleSource(mLabel, signalMC->GetMotherSource(branch))) return kFALSE;
 
index 0f64d5e..de0160d 100644 (file)
@@ -31,6 +31,7 @@
     501 - open beauty mesons                         500-549
     502 - open beauty mesons and baryons             500-549, 5000-5499
     503 - all beauty hadrons                         500-599, 5000-5999
+    902 - all open charm open beauty mesons+baryons  400-439, 500-549, 4000-4399, 5000-5499
    1000 - light unflavoured baryons in the code range 1000-1999
    2000 -        --"--                                2000-2999
    3000 - strange baryons in the code range           3000-3999