Updates: finer mass bin, default cuts per system (Rossella, Marcel, Norman)
authorzconesa <zaida.conesa.del.valle@cern.ch>
Mon, 10 Mar 2014 14:18:24 +0000 (23:18 +0900)
committermkrzewic <mikolaj.krzewicki@cern.ch>
Tue, 11 Mar 2014 20:32:33 +0000 (21:32 +0100)
PWGHF/vertexingHF/AliAnalysisTaskSELambdac.cxx
PWGHF/vertexingHF/AliRDHFCutsLctopKpi.cxx
PWGHF/vertexingHF/AliRDHFCutsLctopKpi.h
PWGHF/vertexingHF/macros/AddTaskLambdac.C

index ebd1569..d867512 100644 (file)
@@ -355,107 +355,107 @@ void AliAnalysisTaskSELambdac::UserCreateOutputObjects()
     indexLS=GetLSHistoIndex(i);
 
     hisname.Form("hMassPt%d",i);
-    fMassHist[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHist[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHist[index]->Sumw2();
     hisname.Form("hMassPt%dTC",i);
-    fMassHistTC[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHistTC[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHistTC[index]->Sumw2();
 
     hisname.Form("hMassPtLpi%d",i);
-    fMassHistLpi[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHistLpi[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHistLpi[index]->Sumw2();
     hisname.Form("hMassPtLpi%dTC",i);
-    fMassHistLpiTC[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHistLpiTC[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHistLpiTC[index]->Sumw2();
 
     hisname.Form("hMassPtKp%d",i);
-    fMassHistKp[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHistKp[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHistKp[index]->Sumw2();
     hisname.Form("hMassPtKp%dTC",i);
-    fMassHistKpTC[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHistKpTC[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHistKpTC[index]->Sumw2();
     hisname.Form("hMassPtDk%d",i);
-    fMassHistDk[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHistDk[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHistDk[index]->Sumw2();
     hisname.Form("hMassPtDk%dTC",i);
-    fMassHistDkTC[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHistDkTC[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHistDkTC[index]->Sumw2();
 
     hisname.Form("hMassPt3Pr%d",i);
-    fMassHist3Pr[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHist3Pr[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHist3Pr[index]->Sumw2();
     hisname.Form("hMassPt3Pr%dTC",i);
-    fMassHist3PrTC[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHist3PrTC[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHist3PrTC[index]->Sumw2();
    //signal
     index=GetSignalHistoIndex(i);    
     hisname.Form("hSigPt%d",i);
-    fMassHist[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHist[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHist[index]->Sumw2();
     hisname.Form("hSigPt%dTC",i);
-    fMassHistTC[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHistTC[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHistTC[index]->Sumw2();
     hisname.Form("hSigPtLpi%d",i);
-    fMassHistLpi[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHistLpi[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHistLpi[index]->Sumw2();
     hisname.Form("hSigPtLpi%dTC",i);
-    fMassHistLpiTC[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHistLpiTC[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHistLpiTC[index]->Sumw2();
 
     hisname.Form("hSigPtKp%d",i);
-    fMassHistKp[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHistKp[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHistKp[index]->Sumw2();
     hisname.Form("hSigPtKp%dTC",i);
-    fMassHistKpTC[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHistKpTC[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHistKpTC[index]->Sumw2();
 
     hisname.Form("hSigPtDk%d",i);
-    fMassHistDk[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHistDk[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHistDk[index]->Sumw2();
     hisname.Form("hSigPtDk%dTC",i);
-    fMassHistDkTC[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHistDkTC[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHistDkTC[index]->Sumw2();
 
     hisname.Form("hSigPt3Pr%d",i);
-    fMassHist3Pr[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHist3Pr[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHist3Pr[index]->Sumw2();
     hisname.Form("hSigPt3Pr%dTC",i);
-    fMassHist3PrTC[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHist3PrTC[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHist3PrTC[index]->Sumw2();
 
     index=GetBackgroundHistoIndex(i); 
     hisname.Form("hBkgPt%d",i);
-    fMassHist[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHist[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHist[index]->Sumw2();
     hisname.Form("hBkgPt%dTC",i);
-    fMassHistTC[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHistTC[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHistTC[index]->Sumw2();
     hisname.Form("hBkgPtLpi%d",i);
-    fMassHistLpi[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHistLpi[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHistLpi[index]->Sumw2();
     hisname.Form("hBkgPtLpi%dTC",i);
-    fMassHistLpiTC[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHistLpiTC[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHistLpiTC[index]->Sumw2();
 
     hisname.Form("hBkgPtKp%d",i);
-    fMassHistKp[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHistKp[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHistKp[index]->Sumw2();
     hisname.Form("hBkgPtKp%dTC",i);
-    fMassHistKpTC[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHistKpTC[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHistKpTC[index]->Sumw2();
 
     hisname.Form("hBkgPtDk%d",i);
-    fMassHistDk[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHistDk[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHistDk[index]->Sumw2();
     hisname.Form("hBkgPtDk%dTC",i);
-    fMassHistDkTC[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHistDkTC[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHistDkTC[index]->Sumw2();
 
     hisname.Form("hBkgPt3Pr%d",i);
-    fMassHist3Pr[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHist3Pr[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHist3Pr[index]->Sumw2();
     hisname.Form("hBkgPt3Pr%dTC",i);
-    fMassHist3PrTC[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+    fMassHist3PrTC[index]=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
     fMassHist3PrTC[index]->Sumw2();
   }
   
@@ -481,67 +481,67 @@ void AliAnalysisTaskSELambdac::UserCreateOutputObjects()
   fhChi2->Sumw2();
   fOutput->Add(fhChi2);
 
-  fhMassPtGreater3=new TH1F("fhMassPtGreater3","Pt > 3 GeV/c",100,fLowmasslimit,fUpmasslimit);
+  fhMassPtGreater3=new TH1F("fhMassPtGreater3","Pt > 3 GeV/c",200,fLowmasslimit,fUpmasslimit);
   fhMassPtGreater3->Sumw2();
   fOutput->Add(fhMassPtGreater3);
-  fhMassPtGreater3TC=new TH1F("fhMassPtGreater3TC","Pt > 3 GeV/c",100,fLowmasslimit,fUpmasslimit);
+  fhMassPtGreater3TC=new TH1F("fhMassPtGreater3TC","Pt > 3 GeV/c",200,fLowmasslimit,fUpmasslimit);
   fhMassPtGreater3TC->Sumw2();
   fOutput->Add(fhMassPtGreater3TC);
-  fhMassPtGreater3Kp=new TH1F("fhMassPtGreater3Kp","Pt > 3 GeV/c",100,fLowmasslimit,fUpmasslimit);
+  fhMassPtGreater3Kp=new TH1F("fhMassPtGreater3Kp","Pt > 3 GeV/c",200,fLowmasslimit,fUpmasslimit);
   fhMassPtGreater3Kp->Sumw2();
   fOutput->Add(fhMassPtGreater3Kp);
-  fhMassPtGreater3KpTC=new TH1F("fhMassPtGreater3KpTC","Pt > 3 GeV/c",100,fLowmasslimit,fUpmasslimit);
+  fhMassPtGreater3KpTC=new TH1F("fhMassPtGreater3KpTC","Pt > 3 GeV/c",200,fLowmasslimit,fUpmasslimit);
   fhMassPtGreater3KpTC->Sumw2();
   fOutput->Add(fhMassPtGreater3KpTC);
-  fhMassPtGreater3Lpi=new TH1F("fhMassPtGreater3Lpi","Pt > 3 GeV/c",100,fLowmasslimit,fUpmasslimit);
+  fhMassPtGreater3Lpi=new TH1F("fhMassPtGreater3Lpi","Pt > 3 GeV/c",200,fLowmasslimit,fUpmasslimit);
   fhMassPtGreater3Lpi->Sumw2();
   fOutput->Add(fhMassPtGreater3Lpi);
-  fhMassPtGreater3LpiTC=new TH1F("fhMassPtGreater3LpiTC","Pt > 3 GeV/c",100,fLowmasslimit,fUpmasslimit);
+  fhMassPtGreater3LpiTC=new TH1F("fhMassPtGreater3LpiTC","Pt > 3 GeV/c",200,fLowmasslimit,fUpmasslimit);
   fhMassPtGreater3LpiTC->Sumw2();
   fOutput->Add(fhMassPtGreater3LpiTC);
-  fhMassPtGreater3Dk=new TH1F("fhMassPtGreater3Dk","Pt > 3 GeV/c",100,fLowmasslimit,fUpmasslimit);
+  fhMassPtGreater3Dk=new TH1F("fhMassPtGreater3Dk","Pt > 3 GeV/c",200,fLowmasslimit,fUpmasslimit);
   fhMassPtGreater3Dk->Sumw2();
   fOutput->Add(fhMassPtGreater3Dk);
-  fhMassPtGreater3DkTC=new TH1F("fhMassPtGreater3DkTC","Pt > 3 GeV/c",100,fLowmasslimit,fUpmasslimit);
+  fhMassPtGreater3DkTC=new TH1F("fhMassPtGreater3DkTC","Pt > 3 GeV/c",200,fLowmasslimit,fUpmasslimit);
   fhMassPtGreater3DkTC->Sumw2();
   fOutput->Add(fhMassPtGreater3DkTC);
 
-  fhMassPtGreater33Pr=new TH1F("fhMassPtGreater33Pr","Pt > 3 GeV/c",100,fLowmasslimit,fUpmasslimit);
+  fhMassPtGreater33Pr=new TH1F("fhMassPtGreater33Pr","Pt > 3 GeV/c",200,fLowmasslimit,fUpmasslimit);
   fhMassPtGreater33Pr->Sumw2();
   fOutput->Add(fhMassPtGreater33Pr);
-  fhMassPtGreater33PrTC=new TH1F("fhMassPtGreater33PrTC","Pt > 3 GeV/c",100,fLowmasslimit,fUpmasslimit);
+  fhMassPtGreater33PrTC=new TH1F("fhMassPtGreater33PrTC","Pt > 3 GeV/c",200,fLowmasslimit,fUpmasslimit);
   fhMassPtGreater33PrTC->Sumw2();
   fOutput->Add(fhMassPtGreater33PrTC);
 
 
-  fhMassPtGreater2=new TH1F("fhMassPtGreater2","Pt > 2 GeV/c",100,fLowmasslimit,fUpmasslimit);
+  fhMassPtGreater2=new TH1F("fhMassPtGreater2","Pt > 2 GeV/c",200,fLowmasslimit,fUpmasslimit);
   fhMassPtGreater2->Sumw2();
   fOutput->Add(fhMassPtGreater2);
-  fhMassPtGreater2TC=new TH1F("fhMassPtGreater2TC","Pt > 2 GeV/c",100,fLowmasslimit,fUpmasslimit);
+  fhMassPtGreater2TC=new TH1F("fhMassPtGreater2TC","Pt > 2 GeV/c",200,fLowmasslimit,fUpmasslimit);
   fhMassPtGreater2TC->Sumw2();
   fOutput->Add(fhMassPtGreater2TC);
-  fhMassPtGreater2Kp=new TH1F("fhMassPtGreater2Kp","Pt > 2 GeV/c",100,fLowmasslimit,fUpmasslimit);
+  fhMassPtGreater2Kp=new TH1F("fhMassPtGreater2Kp","Pt > 2 GeV/c",200,fLowmasslimit,fUpmasslimit);
   fhMassPtGreater2Kp->Sumw2();
   fOutput->Add(fhMassPtGreater2Kp);
-  fhMassPtGreater2KpTC=new TH1F("fhMassPtGreater2KpTC","Pt > 2 GeV/c",100,fLowmasslimit,fUpmasslimit);
+  fhMassPtGreater2KpTC=new TH1F("fhMassPtGreater2KpTC","Pt > 2 GeV/c",200,fLowmasslimit,fUpmasslimit);
   fhMassPtGreater2KpTC->Sumw2();
   fOutput->Add(fhMassPtGreater2KpTC);
-  fhMassPtGreater2Lpi=new TH1F("fhMassPtGreater2Lpi","Pt > 2 GeV/c",100,fLowmasslimit,fUpmasslimit);
+  fhMassPtGreater2Lpi=new TH1F("fhMassPtGreater2Lpi","Pt > 2 GeV/c",200,fLowmasslimit,fUpmasslimit);
   fhMassPtGreater2Lpi->Sumw2();
   fOutput->Add(fhMassPtGreater2Lpi);
-  fhMassPtGreater2LpiTC=new TH1F("fhMassPtGreater2LpiTC","Pt > 2 GeV/c",100,fLowmasslimit,fUpmasslimit);
+  fhMassPtGreater2LpiTC=new TH1F("fhMassPtGreater2LpiTC","Pt > 2 GeV/c",200,fLowmasslimit,fUpmasslimit);
   fhMassPtGreater2LpiTC->Sumw2();
   fOutput->Add(fhMassPtGreater2LpiTC);
-  fhMassPtGreater2Dk=new TH1F("fhMassPtGreater2Dk","Pt > 2 GeV/c",100,fLowmasslimit,fUpmasslimit);
+  fhMassPtGreater2Dk=new TH1F("fhMassPtGreater2Dk","Pt > 2 GeV/c",200,fLowmasslimit,fUpmasslimit);
   fhMassPtGreater2Dk->Sumw2();
   fOutput->Add(fhMassPtGreater2Dk);
-  fhMassPtGreater2DkTC=new TH1F("fhMassPtGreater2DkTC","Pt > 2 GeV/c",100,fLowmasslimit,fUpmasslimit);
+  fhMassPtGreater2DkTC=new TH1F("fhMassPtGreater2DkTC","Pt > 2 GeV/c",200,fLowmasslimit,fUpmasslimit);
   fhMassPtGreater2DkTC->Sumw2();
   fOutput->Add(fhMassPtGreater2DkTC);
-  fhMassPtGreater23Pr=new TH1F("fhMassPtGreater23Pr","Pt > 2 GeV/c",100,fLowmasslimit,fUpmasslimit);
+  fhMassPtGreater23Pr=new TH1F("fhMassPtGreater23Pr","Pt > 2 GeV/c",200,fLowmasslimit,fUpmasslimit);
   fhMassPtGreater23Pr->Sumw2();
   fOutput->Add(fhMassPtGreater23Pr);
-  fhMassPtGreater23PrTC=new TH1F("fhMassPtGreater23PrTC","Pt > 2 GeV/c",100,fLowmasslimit,fUpmasslimit);
+  fhMassPtGreater23PrTC=new TH1F("fhMassPtGreater23PrTC","Pt > 2 GeV/c",200,fLowmasslimit,fUpmasslimit);
   fhMassPtGreater23PrTC->Sumw2();
   fOutput->Add(fhMassPtGreater23PrTC);
   
@@ -568,10 +568,10 @@ void AliAnalysisTaskSELambdac::UserCreateOutputObjects()
   fNentries->GetXaxis()->SetNdivisions(1,kFALSE);
 
   hisname.Form("hMass");
-  TH1F *hMassInv=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+  TH1F *hMassInv=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
   fOutputMC->Add(hMassInv);
   hisname.Form("hbMass");
-  TH1F *hBMassInv=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit);
+  TH1F *hBMassInv=new TH1F(hisname.Data(),hisname.Data(),200,fLowmasslimit,fUpmasslimit);
   fOutputMC->Add(hBMassInv);
 
   // proton specific
@@ -1068,7 +1068,10 @@ void AliAnalysisTaskSELambdac::UserCreateOutputObjects()
   PostData(4,fNentries);
   if (fPriorsHists) PostData(5,fAPriori);
   if (fMultiplicityHists) PostData(6,fMultiplicity);
-  fCounter = new AliNormalizationCounter("NormalizationCounter");
+   TString normName="NormalizationCounter";
+   AliAnalysisDataContainer *cont = GetOutputSlot(7)->GetContainer();
+  if(cont)normName=(TString)cont->GetName(); 
+  fCounter = new AliNormalizationCounter(normName.Data());
    fCounter->Init();
     PostData(7,fCounter);
   if (fFillNtuple) {
@@ -1212,7 +1215,7 @@ void AliAnalysisTaskSELambdac::UserExec(Option_t */*option*/)
 
     isThereA3prongWithGoodTracks=kTRUE;
 
-    if (fRDCutsProduction->IsInFiducialAcceptance(d->Pt(),d->Y(4122))) fNentries->Fill(6);
+    if (fRDCutsProduction->IsInFiducialAcceptance(d->Pt(),d->Y(4122))) {fNentries->Fill(6);}else{continue;}
 
     Int_t ptbin=fRDCutsProduction->PtBin(d->Pt());
     if(ptbin==-1) {fNentries->Fill(4); continue;} //out of bounds
index 5f770e7..bf6daa3 100644 (file)
@@ -296,6 +296,9 @@ Int_t AliRDHFCutsLctopKpi::IsSelected(TObject* obj,Int_t selectionLevel,AliAODEv
     case kNSigma:
       returnvaluePID = IsSelectedPID(d);
       break;
+     case kNSigmaPbPb:
+      returnvaluePID = IsSelectedNSigmaPbPb(d);
+      break;
     case kCombined:
       returnvaluePID = IsSelectedCombinedPID(d);
       break;
@@ -512,6 +515,89 @@ Int_t AliRDHFCutsLctopKpi::IsSelectedPID(AliAODRecoDecayHF* obj) {
 
  return returnvalue;
 }
+
+//--------------------------------------------------------------------------
+
+Int_t AliRDHFCutsLctopKpi::IsSelectedNSigmaPbPb(AliAODRecoDecayHF* obj) {
+
+
+  if(!fUsePID || !obj) return 3;
+  Int_t okLcpKpi=0,okLcpiKp=0;
+  Int_t returnvalue=0;
+  Bool_t isPeriodd=fPidHF->GetOnePad();
+  Bool_t isMC=fPidHF->GetMC();
+  Bool_t ispion0=kTRUE,ispion2=kTRUE;
+  Bool_t isproton0=kFALSE,isproton2=kFALSE;
+  Bool_t iskaon1=kFALSE;
+  if(isPeriodd) {
+    fPidObjprot->SetOnePad(kTRUE);
+    fPidObjpion->SetOnePad(kTRUE);
+  }
+  if(isMC) {
+    fPidObjprot->SetMC(kTRUE);
+    fPidObjpion->SetMC(kTRUE);
+  }
+
+  if(fPidObjprot->GetPidResponse()==0x0){
+    AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
+    AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler();
+    AliPIDResponse *pidResp=inputHandler->GetPIDResponse();
+    fPidObjprot->SetPidResponse(pidResp);
+  }
+  if(fPidObjpion->GetPidResponse()==0x0){
+    AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
+    AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler();
+    AliPIDResponse *pidResp=inputHandler->GetPIDResponse();
+    fPidObjpion->SetPidResponse(pidResp);
+  }
+  if(fPidHF->GetPidResponse()==0x0){
+    AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
+    AliInputEventHandler *inputHandler=(AliInputEventHandler*)mgr->GetInputEventHandler();
+    AliPIDResponse *pidResp=inputHandler->GetPIDResponse();
+    fPidHF->SetPidResponse(pidResp);
+  }
+
+  for(Int_t i=0;i<3;i++){
+    AliAODTrack *track=(AliAODTrack*)obj->GetDaughter(i);
+    if(!track) return 0;
+
+    if(i==1) {
+      //kaon
+      Int_t isKaon=fPidHF->MakeRawPid(track,3); 
+      if(isKaon>=1) iskaon1=kTRUE;
+      if(!iskaon1) return 0;
+    }
+
+    else {
+      //pion or proton
+      Int_t isProton=fPidObjprot->MakeRawPid(track,4);
+      Int_t isPion=fPidObjpion->MakeRawPid(track,2);
+
+      if(i==0) {
+       if(isPion<0) ispion0=kFALSE;
+       if(isProton>=1) isproton0=kTRUE;
+      }
+      if(!ispion0 && !isproton0) return 0;
+
+      if(i==2) {
+       if(isPion<0) ispion2=kFALSE;
+       if(isProton>=1) isproton2=kTRUE;
+      }
+    }
+  }
+
+  if(ispion2 && isproton0 && iskaon1) okLcpKpi=1;
+  if(ispion0 && isproton2 && iskaon1) okLcpiKp=1;
+  if(okLcpKpi) returnvalue=1; //cuts passed as Lc->pKpi
+  if(okLcpiKp) returnvalue=2; //cuts passed as Lc->piKp
+  if(okLcpKpi && okLcpiKp) returnvalue=3; //cuts passed as both pKpi and piKp
+
+  return returnvalue;
+}
+
+
+
+
 //---------------------------------------------------------------------------
 Int_t AliRDHFCutsLctopKpi::IsSelectedCombinedPID(AliAODRecoDecayHF* obj) {
     
@@ -612,16 +698,20 @@ void AliRDHFCutsLctopKpi::SetStandardCutsPP2010() {
  esdTrackCuts->SetPtRange(0.3,1.e10);
  AddTrackCuts(esdTrackCuts);
 
- const Int_t nptbins=4;
+ const Int_t nptbins=8;
  const Int_t nvars=13;
  Float_t* ptbins;
  ptbins=new Float_t[nptbins+1];
  
- ptbins[0]=0.;
+ ptbins[0]=1.;
  ptbins[1]=2.;
  ptbins[2]=3.;
  ptbins[3]=4.;
- ptbins[4]=9999.;
+ ptbins[4]=5.;
+ ptbins[5]=6.;
+ ptbins[6]=8.;
+ ptbins[7]=10.;
+ ptbins[8]=20.;
 
  SetGlobalIndex(nvars,nptbins);
  SetPtBins(nptbins+1,ptbins);
@@ -633,12 +723,12 @@ void AliRDHFCutsLctopKpi::SetStandardCutsPP2010() {
  }
 
  for(Int_t ipt=0;ipt<nptbins;ipt++){
-  prodcutsval[0][ipt]=0.18;
+  prodcutsval[0][ipt]=0.13;
   prodcutsval[1][ipt]=0.4;
-  prodcutsval[2][ipt]=0.5;
+  prodcutsval[2][ipt]=0.4;
   prodcutsval[3][ipt]=0.;
   prodcutsval[4][ipt]=0.;
-  prodcutsval[5][ipt]=0.01;
+  prodcutsval[5][ipt]=0.;
   prodcutsval[6][ipt]=0.06;
   prodcutsval[7][ipt]=0.005;
   prodcutsval[8][ipt]=0.;
@@ -685,7 +775,8 @@ void AliRDHFCutsLctopKpi::SetStandardCutsPP2010() {
  SetPidprot(pidObjp);
 
  SetUsePID(kTRUE);
-
+ SetOptPileup(kTRUE);
  PrintAll();
 
  for(Int_t iiv=0;iiv<nvars;iiv++){
@@ -726,16 +817,21 @@ void AliRDHFCutsLctopKpi::SetStandardCutsPbPb2010() {
  esdTrackCuts->SetPtRange(0.49,1.e10);
  AddTrackCuts(esdTrackCuts);
 
- const Int_t nptbins=4;
+ const Int_t nptbins=8;
  const Int_t nvars=13;
  Float_t* ptbins;
  ptbins=new Float_t[nptbins+1];
  
- ptbins[0]=0.;
+ ptbins[0]=1.;
  ptbins[1]=2.;
  ptbins[2]=3.;
  ptbins[3]=4.;
- ptbins[4]=9999.;
+ ptbins[4]=5.;
+ ptbins[5]=6.;
+ ptbins[6]=8.;
+ ptbins[7]=10.;
+ ptbins[8]=99999.;
+
 
  SetGlobalIndex(nvars,nptbins);
  SetPtBins(nptbins+1,ptbins);
@@ -763,40 +859,25 @@ void AliRDHFCutsLctopKpi::SetStandardCutsPbPb2010() {
  }
  SetCuts(nvars,nptbins,prodcutsval);
 
- AliAODPidHF* pidObjK=new AliAODPidHF();
- Double_t sigmasK[5]={3.,1.,1.,3.,2.};
- pidObjK->SetSigma(sigmasK);
- pidObjK->SetAsym(kTRUE);
- pidObjK->SetMatch(1);
- pidObjK->SetTPC(kTRUE);
- pidObjK->SetTOF(kTRUE);
- pidObjK->SetITS(kTRUE);
- Double_t plimK[2]={0.5,0.8};
- pidObjK->SetPLimit(plimK,2);
-
- SetPidHF(pidObjK);
-
- AliAODPidHF* pidObjpi=new AliAODPidHF();
- pidObjpi->SetTPC(kTRUE);
- Double_t sigmaspi[5]={3.,0.,0.,0.,0.};
- pidObjpi->SetSigma(sigmaspi);
- SetPidpion(pidObjpi);
-
- AliAODPidHF* pidObjp=new AliAODPidHF();
- Double_t sigmasp[5]={3.,1.,1.,3.,2.};
- pidObjp->SetSigma(sigmasp);
- pidObjp->SetAsym(kTRUE);
- pidObjp->SetMatch(1);
- pidObjp->SetTPC(kTRUE);
- pidObjp->SetTOF(kTRUE);
- pidObjp->SetITS(kTRUE);
- Double_t plimp[2]={1.,2.};
- pidObjp->SetPLimit(plimp,2);
+ AliAODPidHF* pidObj=new AliAODPidHF();
+ pidObj->SetTPC(kTRUE);
+ pidObj->SetTOF(kTRUE);
+ SetPidHF(pidObj);
+ SetPidpion(pidObj);
+ SetPidprot(pidObj);
 
- SetPidprot(pidObjp);
 
+ // bayesian pid
+ GetPidHF()->SetUseCombined(kTRUE);
+ GetPidHF()->SetUseDefaultPriors(kTRUE);
+ GetPidHF()->SetCombDetectors(AliAODPidHF::kTPCTOF);
+ for (Int_t ispecies=0;ispecies<AliPID::kSPECIES;++ispecies){
+   SetPIDThreshold(static_cast<AliPID::EParticleType>(ispecies),0);
+ }
+ SetPIDStrategy(AliRDHFCutsLctopKpi::kCombinedpPb);
  SetUsePID(kTRUE);
 
+
  PrintAll();
 
  for(Int_t iiv=0;iiv<nvars;iiv++){
@@ -807,12 +888,8 @@ void AliRDHFCutsLctopKpi::SetStandardCutsPbPb2010() {
  delete [] ptbins;
  ptbins=NULL;
 
- delete pidObjK;
- pidObjK=NULL;
- delete pidObjpi;
- pidObjpi=NULL;
- delete pidObjp;
- pidObjp=NULL;
+ delete pidObj;
+ pidObj=NULL;
 
  return;
 }
@@ -1204,4 +1281,117 @@ Int_t AliRDHFCutsLctopKpi::IsSelectedCombinedPIDpPb2(AliAODRecoDecayHF* obj) {
   return returnvalue;
 
 }
+//------------------------------------------------------
+void AliRDHFCutsLctopKpi::SetStandardCutsPPb2013() {
+
+ SetName("LctopKpiProdCuts");
+ SetTitle("Production cuts for Lc analysis");
+
+ AliESDtrackCuts *esdTrackCuts = new AliESDtrackCuts("AliESDtrackCuts","default");
+ esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
+ esdTrackCuts->SetRequireTPCRefit(kTRUE);
+ esdTrackCuts->SetMinNClustersTPC(70);
+ esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,
+                                          AliESDtrackCuts::kAny);
+ esdTrackCuts->SetRequireITSRefit(kTRUE);
+ esdTrackCuts->SetMinNClustersITS(4);
+ esdTrackCuts->SetMinDCAToVertexXY(0.);
+ esdTrackCuts->SetEtaRange(-0.8,0.8);
+ esdTrackCuts->SetPtRange(0.3,1.e10);
+ AddTrackCuts(esdTrackCuts);
+ const Int_t nvars=13;
+ const Int_t nptbins=9;
+ Float_t* ptbins;
+ ptbins=new Float_t[nptbins+1];
+ ptbins[0]=0.;
+ ptbins[1]=1.;
+ ptbins[2]=2.;
+ ptbins[3]=3.;
+ ptbins[4]=4.;
+ ptbins[5]=5.;
+ ptbins[6]=6.;
+ ptbins[7]=8.;
+ ptbins[8]=10.;  
+ ptbins[9]=99999.;
+
+ SetGlobalIndex(nvars,nptbins);
+ SetPtBins(nptbins+1,ptbins);
+
+ Float_t** prodcutsval;
+ prodcutsval=new Float_t*[nvars];
+ for(Int_t iv=0;iv<nvars;iv++){
+  prodcutsval[iv]=new Float_t[nptbins];
+ }
+
+ for(Int_t ipt=0;ipt<nptbins;ipt++){
+    prodcutsval[0][ipt]=0.13;
+    prodcutsval[1][ipt]=0.4;
+    prodcutsval[2][ipt]=0.4;
+    prodcutsval[3][ipt]=0.;
+    prodcutsval[4][ipt]=0.;
+    prodcutsval[5][ipt]=0.;
+    prodcutsval[6][ipt]=0.06;
+    prodcutsval[7][ipt]=0.;
+    prodcutsval[8][ipt]=0.;
+    prodcutsval[9][ipt]=0.;
+    prodcutsval[10][ipt]=0.;
+    prodcutsval[11][ipt]=0.05;
+    prodcutsval[12][ipt]=0.4;
+ }
+ SetCuts(nvars,nptbins,prodcutsval);
+
+ AliAODPidHF* pidObjK=new AliAODPidHF();
+ Double_t sigmasK[5]={3.,1.,1.,3.,2.};
+ pidObjK->SetSigma(sigmasK);
+ pidObjK->SetAsym(kTRUE);
+ pidObjK->SetMatch(1);
+ pidObjK->SetTPC(kTRUE);
+ pidObjK->SetTOF(kTRUE);
+ pidObjK->SetITS(kTRUE);
+ Double_t plimK[2]={0.5,0.8};
+ pidObjK->SetPLimit(plimK,2);
+ pidObjK->SetTOFdecide(kTRUE);
+ SetPidHF(pidObjK);
+
+ AliAODPidHF* pidObjpi=new AliAODPidHF();
+ pidObjpi->SetTPC(kTRUE);
+ Double_t sigmaspi[5]={3.,0.,0.,0.,0.};
+ pidObjpi->SetSigma(sigmaspi);
+ pidObjpi->SetTOFdecide(kTRUE);
+ SetPidpion(pidObjpi);
+
+ AliAODPidHF* pidObjp=new AliAODPidHF();
+ Double_t sigmasp[5]={3.,1.,1.,3.,2.};
+ pidObjp->SetSigma(sigmasp);
+ pidObjp->SetAsym(kTRUE);
+ pidObjp->SetMatch(1);
+ pidObjp->SetTPC(kTRUE);
+ pidObjp->SetTOF(kTRUE);
+ pidObjp->SetITS(kTRUE);
+ Double_t plimp[2]={1.,2.};
+ pidObjp->SetPLimit(plimp,2);
+ pidObjp->SetTOFdecide(kTRUE);
+
+ SetUsePID(kTRUE);
+
+ PrintAll();
+
+ for(Int_t iiv=0;iiv<nvars;iiv++){
+  delete [] prodcutsval[iiv];
+ }
+ delete [] prodcutsval;
+ prodcutsval=NULL;
+ delete [] ptbins;
+ ptbins=NULL;
+
+ delete pidObjK;
+ pidObjK=NULL;
+ delete pidObjpi;
+ pidObjpi=NULL;
+ delete pidObjp;
+ pidObjp=NULL;
+
+ return;
+}
 
index b8ba30c..b619078 100644 (file)
@@ -21,6 +21,7 @@ class AliRDHFCutsLctopKpi : public AliRDHFCuts
 
  enum EPIDStrategy {
   kNSigma,
+  kNSigmaPbPb,
   kCombined,
   kCombinedSoft,
   kNSigmaStrong,
@@ -58,6 +59,7 @@ class AliRDHFCutsLctopKpi : public AliRDHFCuts
   virtual void SetStandardCutsPP2010();
   virtual void SetStandardCutsPbPb2010();
   virtual void SetStandardCutsPbPb2011();
+  virtual void SetStandardCutsPPb2013(); 
 
 
   AliAODPidHF* GetPidpion() const {return fPidObjpion;}
@@ -94,6 +96,7 @@ class AliRDHFCutsLctopKpi : public AliRDHFCuts
   Int_t IsSelectedCombinedPIDpPb(AliAODRecoDecayHF* obj);
   Int_t IsSelectedCombinedPIDpPb2(AliAODRecoDecayHF* obj);
   Int_t IsSelectedPIDStrong(AliAODRecoDecayHF* obj);
+  Int_t IsSelectedNSigmaPbPb(AliAODRecoDecayHF* obj);
   Int_t CombinePIDCuts (Int_t returnvalue, Int_t returnvaluePID) const;
 
   virtual Bool_t IsInFiducialAcceptance(Double_t pt,Double_t y) const;
@@ -120,7 +123,7 @@ private:
   ECutsStrategy fCutsStrategy;              // cut strategy (standard or KF)
   Bool_t fUseSpecialCut;
 
-  ClassDef(AliRDHFCutsLctopKpi,7);  // class for cuts on AOD reconstructed Lc->pKpi
+  ClassDef(AliRDHFCutsLctopKpi,8);  // class for cuts on AOD reconstructed Lc->pKpi
 };
 
 #endif
index 3119de9..f461261 100644 (file)
@@ -1,5 +1,5 @@
 AliAnalysisTaskSE *AddTaskLambdac(TString finname,Bool_t storeNtuple,Bool_t readMC,Bool_t MCPid,Bool_t realPid,Bool_t resPid,Bool_t useKF,
-                                 Bool_t fillVarHists=kFALSE, Bool_t priorsHists=kFALSE, Bool_t multiplicityHists=kFALSE, TString postname="")
+                                 Bool_t fillVarHists=kFALSE, Bool_t priorsHists=kFALSE, Bool_t multiplicityHists=kFALSE, Int_t syst=0, TString postname="")
 {
   //==============================================================================                                                      
   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
@@ -20,14 +20,23 @@ AliAnalysisTaskSE *AddTaskLambdac(TString finname,Bool_t storeNtuple,Bool_t read
       }
   }
   AliRDHFCutsLctopKpi* prodcuts=new AliRDHFCutsLctopKpi();
-  if(stdcuts) prodcuts->SetStandardCutsPP2010();
+  // syst = 0 : pp, syst = 1: PbPb, syst = 2 : pPb
+  if(stdcuts) {
+    if(syst==0) prodcuts->SetStandardCutsPP2010();
+    if(syst==1) prodcuts->SetStandardCutsPbPb2011();
+    if(syst==2) prodcuts->SetStandardCutsPPb2013();
+  }
   else   prodcuts = (AliRDHFCutsLctopKpi*)filecuts->Get("LctopKpiProdCuts");
   prodcuts->SetName("LctopKpiProdCuts");
   prodcuts->SetMinPtCandidate(-1.);
   prodcuts->SetMaxPtCandidate(10000.);
 
   AliRDHFCutsLctopKpi *analysiscuts = new AliRDHFCutsLctopKpi();
-  if(stdcuts) analysiscuts->SetStandardCutsPP2010();
+  if(stdcuts) {
+   if(syst==0) analysiscuts->SetStandardCutsPP2010();
+   if(syst==1) analysiscuts->SetStandardCutsPbPb2011();
+   if(syst==2) analysiscuts->SetStandardCutsPPb2013();
+  }
   else analysiscuts = (AliRDHFCutsLctopKpi*)filecuts->Get("LctopKpiAnalysisCuts");
   analysiscuts->SetName("LctopKpiAnalysisCuts");
   analysiscuts->SetMinPtCandidate(-1.);