Added check on PDG code of daughters for MC
authordainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 24 Jun 2009 01:10:49 +0000 (01:10 +0000)
committerdainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 24 Jun 2009 01:10:49 +0000 (01:10 +0000)
PWG3/vertexingHF/AliCFHeavyFlavourTask.cxx
PWG3/vertexingHF/AliCFHeavyFlavourTaskMultiVar.cxx
PWG3/vertexingHF/AliCFHeavyFlavourTaskMultiVarMultiStep.cxx

index 629dd40..6e01206 100644 (file)
@@ -165,6 +165,13 @@ void AliCFHeavyFlavourTask::UserExec(Option_t *)
                        AliWarning("At least one Daughter Particle not found in tree, skipping"); 
                        continue;  
                }
+               if (!(TMath::Abs(mcPartDaughter0->GetPdgCode())==321 &&
+                     TMath::Abs(mcPartDaughter1->GetPdgCode())==211) && 
+                   !(TMath::Abs(mcPartDaughter0->GetPdgCode())==211 &&
+                     TMath::Abs(mcPartDaughter1->GetPdgCode())==321)) {
+                 AliDebug(2, "The D0 MC doesn't come from a Kpi decay, skipping!!");
+                 continue;  
+               }
 
                // fill the container for Gen-level selection
                containerInput[0] = mcPart->Pt();
index 0cc35d9..8ede588 100644 (file)
@@ -600,7 +600,14 @@ Bool_t AliCFHeavyFlavourTaskMultiVar::GetGeneratedValuesFromMCParticle(AliAODMCP
                AliWarning("At least one Daughter Particle not found in tree, skipping"); 
                return isOk;  
        }
-       
+       if (!(TMath::Abs(mcPartDaughter0->GetPdgCode())==321 &&
+             TMath::Abs(mcPartDaughter1->GetPdgCode())==211) && 
+           !(TMath::Abs(mcPartDaughter0->GetPdgCode())==211 &&
+             TMath::Abs(mcPartDaughter1->GetPdgCode())==321)) {
+         AliDebug(2, "The D0 MC doesn't come from a Kpi decay, skipping!!");
+         return isOk;  
+       }
+
        Double_t vtx1[3] = {0,0,0};   // primary vertex         
        Double_t vtx2daughter0[3] = {0,0,0};   // secondary vertex from daughter 0
        Double_t vtx2daughter1[3] = {0,0,0};   // secondary vertex from daughter 1
index 1e81a7c..afcc7da 100644 (file)
@@ -1053,7 +1053,14 @@ Bool_t AliCFHeavyFlavourTaskMultiVarMultiStep::GetGeneratedValuesFromMCParticle(
                AliWarning("At least one Daughter Particle not found in tree, skipping"); 
                return isOk;  
        }
-       
+       if (!(TMath::Abs(mcPartDaughter0->GetPdgCode())==321 &&
+             TMath::Abs(mcPartDaughter1->GetPdgCode())==211) && 
+           !(TMath::Abs(mcPartDaughter0->GetPdgCode())==211 &&
+             TMath::Abs(mcPartDaughter1->GetPdgCode())==321)) {
+         AliDebug(2, "The D0 MC doesn't come from a Kpi decay, skipping!!");
+         return isOk;  
+       }
+
        Double_t vtx1[3] = {0,0,0};   // primary vertex         
        Double_t vtx2daughter0[3] = {0,0,0};   // secondary vertex from daughter 0
        Double_t vtx2daughter1[3] = {0,0,0};   // secondary vertex from daughter 1