]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Updated treatment of Ds resonant channels in efficiency calculation
authorprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 5 Mar 2012 23:09:54 +0000 (23:09 +0000)
committerprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 5 Mar 2012 23:09:54 +0000 (23:09 +0000)
PWGHF/vertexingHF/AliCFTaskVertexingHF.h
PWGHF/vertexingHF/AliCFVertexingHF3Prong.cxx
PWGHF/vertexingHF/AliCFVertexingHF3Prong.h

index e94a6c429f8e06054246191e4b62e4711c6a6ad2..1f4c39ddd4bc88a23b6e12e869a7b6be2a073235 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "AliAnalysisTaskSE.h"
 #include "AliCFVertexingHF2Prong.h"
+#include "AliCFVertexingHF3Prong.h"
 #include "AliCFVertexingHF.h"
 
 class TH1I;
@@ -118,9 +119,11 @@ public:
        void SetKeepDsViaPhi(){fDsOption=1;}
        void SetKeepDsViaK0star(){fDsOption=2;}
        void SetKeepAllDs(){fDsOption=3;}
-       void SetCountDsViaPhi(){fGenDsOption=1;}
-       void SetCountDsViaK0star(){fGenDsOption=2;}
-       void SetCountAllDs(){fGenDsOption=3;}
+       void SetCountAllDs(){fGenDsOption=AliCFVertexingHF3Prong::kCountAllDsKKpi;}
+       void SetCountDsViaPhi(){fGenDsOption=AliCFVertexingHF3Prong::kCountPhipi;}
+       void SetCountDsViaK0star(){fGenDsOption=AliCFVertexingHF3Prong::kCountK0stK;}
+       void SetCountResonantDs(){fGenDsOption=AliCFVertexingHF3Prong::kCountResonant;}
+       void SetCountNonResonantDs(){fGenDsOption=AliCFVertexingHF3Prong::kCountNonResonant;}
 
        Bool_t ProcessDs(Int_t returnCodeDs) const;
 
index acc673ce0942bf8b3238d5b61d5fc036670d4240..47e969befe12d02e8564d2f3b38e15ecef5af8ca 100644 (file)
@@ -43,7 +43,7 @@ ClassImp(AliCFVertexingHF3Prong)
 AliCFVertexingHF3Prong::AliCFVertexingHF3Prong(Int_t decay):
 AliCFVertexingHF(),
   fDecay(decay),
-  fGenDsOption(3)
+  fGenDsOption(kCountResonant)
  {
   // 
   SetNProngs(3);
@@ -60,7 +60,7 @@ AliCFVertexingHF(),
 AliCFVertexingHF3Prong::AliCFVertexingHF3Prong(TClonesArray *mcArray, UShort_t originDselection, Int_t decay):
   AliCFVertexingHF(mcArray, originDselection),
   fDecay(decay),
-  fGenDsOption(3)
+  fGenDsOption(kCountResonant)
 {
   //
   SetNProngs(3);
@@ -138,7 +138,7 @@ Bool_t AliCFVertexingHF3Prong::SetRecoCandidateParam(AliAODRecoDecayHF *recoCand
     return bSignAssoc;
   }
 
-  if(fDecay==kDstoKKpi && fGenDsOption!=3){
+  if(fDecay==kDstoKKpi && fGenDsOption!=kCountAllDsKKpi){
     if(!CheckMCChannelDecay()){
       AliDebug(3,"Ds not from the selected resonant channel");
       return bSignAssoc;
@@ -489,6 +489,10 @@ Bool_t AliCFVertexingHF3Prong::CheckMCChannelDecay() const
   Int_t nDau=fmcPartCandidate->GetNDaughters();
   Int_t labelFirstDau = fmcPartCandidate->GetDaughter(0); 
   if(nDau==3){
+    if(fDecay==kDstoKKpi && !(fGenDsOption==kCountAllDsKKpi || fGenDsOption==kCountNonResonant)){
+      AliDebug(3,"Decay channel in direct KKpi, should be skipped");
+      return checkCD;
+    }
     for(Int_t iDau=0; iDau<3; iDau++){
       Int_t ind = labelFirstDau+iDau;
       AliAODMCParticle* part = dynamic_cast<AliAODMCParticle*>(fmcArray->At(ind));
@@ -499,6 +503,7 @@ Bool_t AliCFVertexingHF3Prong::CheckMCChannelDecay() const
       daughter[iDau]=TMath::Abs(part->GetPdgCode());
     }
   }else if(nDau==2){
+    if(fDecay==kDstoKKpi && fGenDsOption==kCountNonResonant) return checkCD;
     Int_t nDauFound=0;
     for(Int_t iDau=0; iDau<2; iDau++){
       Int_t ind = labelFirstDau+iDau;
@@ -515,8 +520,8 @@ Bool_t AliCFVertexingHF3Prong::CheckMCChannelDecay() const
       }else{
        if(fDecay==kDstoKKpi && fGenDsOption!=3){
          Int_t pdgCodeRes=TMath::Abs(part->GetPdgCode());
-         if(fGenDsOption==1 && pdgCodeRes!=333) return checkCD;
-         else if(fGenDsOption==2 && pdgCodeRes!=313) return checkCD;
+         if(fGenDsOption==kCountPhipi && pdgCodeRes!=333) return checkCD;
+         else if(fGenDsOption==kCountK0stK && pdgCodeRes!=313) return checkCD;
        }
        Int_t nDauRes=part->GetNDaughters();
        if(nDauRes!=2) return checkCD;
index 9cd76df9332c00ff884b6d452179d7bb7410a6aa..aa060b29d15c9663fd8f711f364fe30b28ce0901 100644 (file)
@@ -44,7 +44,9 @@ class AliCFVertexingHF3Prong : public AliCFVertexingHF{
  \r
   void SetGeneratedDsOption(Int_t opt) {fGenDsOption=opt;}\r
   Int_t GetGeneratedDsOption() const {return fGenDsOption;}\r
-  \r
+\r
+  enum EDsSel {kCountAllDsKKpi=0, kCountPhipi=1, kCountK0stK=2, kCountResonant=3, kCountNonResonant=4};\r
+\r
  protected:\r
   \r
   \r
@@ -54,7 +56,7 @@ class AliCFVertexingHF3Prong : public AliCFVertexingHF{
   AliCFVertexingHF3Prong& operator= (const AliCFVertexingHF3Prong& other);\r
   \r
   Int_t fDecay;   // decay mode id\r
-  Int_t fGenDsOption;  // 0(default) --> count all Ds->KKpi, 1 --> count Ds->phipi 2--> count Ds->K0*K\r
+  Int_t fGenDsOption;  // option for selection Ds (see enum)\r
 \r
   ClassDef(AliCFVertexingHF3Prong, 2);\r
   \r