Possibility to select a specific resonant channel for counting the generated Ds in...
authorprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 21 Jan 2012 23:34:39 +0000 (23:34 +0000)
committerprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 21 Jan 2012 23:34:39 +0000 (23:34 +0000)
PWG3/vertexingHF/AliCFTaskVertexingHF.cxx
PWG3/vertexingHF/AliCFTaskVertexingHF.h
PWG3/vertexingHF/AliCFVertexingHF.h
PWG3/vertexingHF/AliCFVertexingHF3Prong.cxx
PWG3/vertexingHF/AliCFVertexingHF3Prong.h

index 7c26a8c..a4e2870 100644 (file)
@@ -105,6 +105,7 @@ AliCFTaskVertexingHF::AliCFTaskVertexingHF() :
        fRejectIfNoQuark(kTRUE),        
        fUseMCVertex(kFALSE),
        fDsOption(1),
+       fGenDsOption(3),
        fConfiguration(kCheetah), // by default, setting the fast configuration
        fFuncWeight(0x0)
 {
@@ -144,6 +145,7 @@ AliCFTaskVertexingHF::AliCFTaskVertexingHF(const Char_t* name, AliRDHFCuts* cuts
        fRejectIfNoQuark(kTRUE),
        fUseMCVertex(kFALSE),
        fDsOption(1),
+       fGenDsOption(3),
        fConfiguration(kCheetah),  // by default, setting the fast configuration
        fFuncWeight(func)
 {
@@ -210,6 +212,7 @@ AliCFTaskVertexingHF::AliCFTaskVertexingHF(const AliCFTaskVertexingHF& c) :
        fRejectIfNoQuark(c.fRejectIfNoQuark),
        fUseMCVertex(c.fUseMCVertex),
        fDsOption(c.fDsOption),
+       fGenDsOption(c.fGenDsOption),
        fConfiguration(c.fConfiguration),
        fFuncWeight(c.fFuncWeight)
 {
@@ -491,6 +494,9 @@ void AliCFTaskVertexingHF::UserExec(Option_t *)
        case 32:
        case 33:{
          cfVtxHF = new AliCFVertexingHF3Prong(mcArray, fOriginDselection, fDecayChannel); 
+         if(fDecayChannel==33){
+           cfVtxHF->SetGeneratedDsOption(fGenDsOption);
+         }
                break;
        }
        case 4:{
index c97cb42..e94a6c4 100644 (file)
@@ -118,6 +118,9 @@ 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;}
 
        Bool_t ProcessDs(Int_t returnCodeDs) const;
 
@@ -156,11 +159,12 @@ protected:
        Int_t  fFakeSelection;  //selection flag for fakes tracks 
        Bool_t fRejectIfNoQuark;  // flag to remove events not geenrated with PYTHIA
        Bool_t fUseMCVertex;  // flag to use MC vertex (useful when runnign in pp)
-       Int_t  fDsOption;     // Ds decay option
+       Int_t  fDsOption;     // Ds decay option (selection level)
+       Int_t  fGenDsOption;     // Ds decay option (generation level)
        Int_t fConfiguration; // configuration (slow / fast) of the CF --> different variables will be allocated (all / reduced number)
        TF1* fFuncWeight;     // user-defined function to be used to calculate weights
 
-       ClassDef(AliCFTaskVertexingHF,9); // class for HF corrections as a function of many variables
+       ClassDef(AliCFTaskVertexingHF,10); // class for HF corrections as a function of many variables
 };
 
 #endif
index 0464d35..1f8b5dd 100644 (file)
@@ -105,6 +105,9 @@ class AliCFVertexingHF : public TObject {
        virtual void SetEtaAccCut(Float_t* etaAccCut);
        virtual void SetAccCut(Float_t* ptAccCut, Float_t* etaAccCut);
        virtual void SetAccCut();
+       virtual void SetGeneratedDsOption(Int_t /*opt*/){
+         AliError("Method implemented in derived class");
+       }
 
        void SetFakeSelection(Int_t fakeSel){fFakeSelection = fakeSel;}
        Int_t GetFakeSelection(){return fFakeSelection;}
index 18f5a4c..acc673c 100644 (file)
@@ -42,7 +42,8 @@ ClassImp(AliCFVertexingHF3Prong)
 //_________________________________________
 AliCFVertexingHF3Prong::AliCFVertexingHF3Prong(Int_t decay):
 AliCFVertexingHF(),
-  fDecay(decay)
+  fDecay(decay),
+  fGenDsOption(3)
  {
   // 
   SetNProngs(3);
@@ -58,8 +59,8 @@ AliCFVertexingHF(),
 //_________________________________________
 AliCFVertexingHF3Prong::AliCFVertexingHF3Prong(TClonesArray *mcArray, UShort_t originDselection, Int_t decay):
   AliCFVertexingHF(mcArray, originDselection),
-  fDecay(decay)
+  fDecay(decay),
+  fGenDsOption(3)
 {
   //
   SetNProngs(3);
@@ -137,6 +138,13 @@ Bool_t AliCFVertexingHF3Prong::SetRecoCandidateParam(AliAODRecoDecayHF *recoCand
     return bSignAssoc;
   }
 
+  if(fDecay==kDstoKKpi && fGenDsOption!=3){
+    if(!CheckMCChannelDecay()){
+      AliDebug(3,"Ds not from the selected resonant channel");
+      return bSignAssoc;
+    }
+  }
+
   bSignAssoc = kTRUE;
   return bSignAssoc;
 }
@@ -505,6 +513,11 @@ Bool_t AliCFVertexingHF3Prong::CheckMCChannelDecay() const
        daughter[nDauFound]=pdgCode;
        nDauFound++;
       }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;
+       }
        Int_t nDauRes=part->GetNDaughters();
        if(nDauRes!=2) return checkCD;
        Int_t labelFirstDauRes = part->GetDaughter(0);  
index 973abc1..9cd76df 100644 (file)
@@ -42,6 +42,8 @@ class AliCFVertexingHF3Prong : public AliCFVertexingHF{
   Bool_t SetRecoCandidateParam(AliAODRecoDecayHF *recoCand);\r
   virtual void SetDecay3Prong(Int_t decay){fDecay=decay;}\r
  \r
+  void SetGeneratedDsOption(Int_t opt) {fGenDsOption=opt;}\r
+  Int_t GetGeneratedDsOption() const {return fGenDsOption;}\r
   \r
  protected:\r
   \r
@@ -52,8 +54,9 @@ 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
 \r
-  ClassDef(AliCFVertexingHF3Prong, 1);\r
+  ClassDef(AliCFVertexingHF3Prong, 2);\r
   \r
 };\r
 \r