]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Updates: adding histograms and changing the PID options (Marcel, Jaime, Rossella)
authorzconesa <zaida.conesa.del.valle@cern.ch>
Tue, 10 Jun 2014 17:11:05 +0000 (19:11 +0200)
committerzconesa <zaida.conesa.del.valle@cern.ch>
Tue, 10 Jun 2014 17:11:21 +0000 (19:11 +0200)
PWGHF/vertexingHF/AliAnalysisTaskSELambdac.cxx
PWGHF/vertexingHF/AliAnalysisTaskSELambdac.h
PWGHF/vertexingHF/macros/AddTaskLambdac.C

index d867512912c4d9079ed875da0a4c0883f8a9f9ba..3a6a0f80a56ca7d68d5480d26e18c07706c73e36 100644 (file)
 #include "AliInputEventHandler.h"
 #include "AliPID.h"
 #include "AliNormalizationCounter.h"
-
+#include "AliVertexingHFUtils.h"
 ClassImp(AliAnalysisTaskSELambdac)
 
 
 //________________________________________________________________________
-  AliAnalysisTaskSELambdac::AliAnalysisTaskSELambdac():
-    AliAnalysisTaskSE(),
-    fOutput(0), 
-    fHistNEvents(0),
-    fhChi2(0),
-    fhMassPtGreater3(0),
-    fhMassPtGreater3TC(0),
-    fhMassPtGreater3Kp(0),
-    fhMassPtGreater3KpTC(0),
-    fhMassPtGreater3Lpi(0),
-    fhMassPtGreater3LpiTC(0),
-    fhMassPtGreater3Dk(0),
-    fhMassPtGreater3DkTC(0),
-    fhMassPtGreater33Pr(0),
-    fhMassPtGreater33PrTC(0),
-    fhMassPtGreater2(0),
-    fhMassPtGreater2TC(0),
-    fhMassPtGreater2Kp(0),
-    fhMassPtGreater2KpTC(0),
-    fhMassPtGreater2Lpi(0),
-    fhMassPtGreater2LpiTC(0),
-    fhMassPtGreater2Dk(0),
-    fhMassPtGreater2DkTC(0),
-    fhMassPtGreater23Pr(0),
-    fhMassPtGreater23PrTC(0),
-    fNtupleLambdac(0),
-    fUpmasslimit(2.486),
-    fLowmasslimit(2.086),
-    fNPtBins(0),
-    fRDCutsAnalysis(0),
-    fRDCutsProduction(0),
-    fListCuts(0),
+AliAnalysisTaskSELambdac::AliAnalysisTaskSELambdac():
+AliAnalysisTaskSE(),
+  fOutput(0), 
+  fHistNEvents(0),
+  fhChi2(0),
+  fhMassPtGreater3(0),
+  fhMassPtGreater3TC(0),
+  fhMassPtGreater3Kp(0),
+  fhMassPtGreater3KpTC(0),
+  fhMassPtGreater3Lpi(0),
+  fhMassPtGreater3LpiTC(0),
+  fhMassPtGreater3Dk(0),
+  fhMassPtGreater3DkTC(0),
+  fhMassPtGreater33Pr(0),
+  fhMassPtGreater33PrTC(0),
+  fhMassPtGreater2(0),
+  fhMassPtGreater2TC(0),
+  fhMassPtGreater2Kp(0),
+  fhMassPtGreater2KpTC(0),
+  fhMassPtGreater2Lpi(0),
+  fhMassPtGreater2LpiTC(0),
+  fhMassPtGreater2Dk(0),
+  fhMassPtGreater2DkTC(0),
+  fhMassPtGreater23Pr(0),
+  fhMassPtGreater23PrTC(0),
+  fhEta3Prong(0),
+  fhEta3ProngAcc(0),
+  fhEta3ProngProd(0),
+  fhEta3ProngAn(0),
+  fhRap3Prong(0),
+  fhRap3ProngAcc(0),
+  fhRap3ProngProd(0),
+  fhRap3ProngAn(0),
+  fhSelectBit(0),
+  fhProtonPtProngLcPt(),
+  fhBProtonPtProngLcPt(0),
+  fhProtond0ProngLcPt(0),
+  fhBProtond0ProngLcPt(0),
+  fhKaonPtProngLcPt(0),
+  fhBKaonPtProngLcPt(0),
+  fhKaond0ProngLcPt(0),
+  fhBKaond0ProngLcPt(0),
+  fhPionPtProngLcPt(0),
+  fhBPionPtProngLcPt(0),
+  fhPiond0ProngLcPt(0),
+  fhBPiond0ProngLcPt(0),
+  fhDist12PrimLcPt(0),
+  fhBDist12PrimLcPt(0),
+  fhSigmaVertLcPt(0),
+  fhBSigmaVertLcPt(0),
+  fhdcasLcPt(0),
+  fhBdcasLcPt(0),
+  fhCosPointingAngleLcPt(0),
+  fhBCosPointingAngleLcPt(0),
+  fhDecayLengthLcPt(0),
+  fhBDecayLengthLcPt(0),
+  fhSum2LcPt(0),
+  fhBSum2LcPt(0),
+  fhPtMaxLcPt(0),
+  fhBPtMaxLcPt(0),
+  fNtupleLambdac(0),
+  fUpmasslimit(2.486),
+  fLowmasslimit(2.086),
+  fNPtBins(0),
+  fRDCutsAnalysis(0),
+  fRDCutsProduction(0),
+  fListCuts(0),
     fFillNtuple(kFALSE),
-    fReadMC(kFALSE),
-    fMCPid(kFALSE),
-    fRealPid(kFALSE),
-    fResPid(kTRUE),
-    fUseKF(kFALSE),
-    fAnalysis(kFALSE),
-    fVHF(0),
-    fFillVarHists(kFALSE),
-    fMultiplicityHists(kFALSE),
-    fPriorsHists(kFALSE),
-    fNentries(0),
-    fOutputMC(0),
-    fAPriori(0),
-    fMultiplicity(0),
-    //fUtilPid(0),
-    fPIDResponse(0),
-    fCounter(0)
+  fReadMC(kFALSE),
+  fMCPid(kFALSE),
+  fRealPid(kFALSE),
+  fResPid(kTRUE),
+  fUseKF(kFALSE),
+  fAnalysis(kFALSE),
+  fVHF(0),
+  fFillVarHists(kFALSE),
+  fMultiplicityHists(kFALSE),
+  fPriorsHists(kFALSE),
+  fLcCut(kFALSE),
+  fLcPIDCut(kFALSE),    
+  fNentries(0),
+  fOutputMC(0),
+  fAPriori(0),
+  fMultiplicity(0),
+//fUtilPid(0),
+  fPIDResponse(0),
+  fCounter(0)
 {
   // Default constructor
   Float_t ptlims[7]={0.,2.,4.,6.,8.,12.,24.};
@@ -155,6 +192,41 @@ AliAnalysisTaskSELambdac::AliAnalysisTaskSELambdac(const char *name,Bool_t fillN
   fhMassPtGreater2DkTC(0),
   fhMassPtGreater23Pr(0),
   fhMassPtGreater23PrTC(0),
+  fhEta3Prong(0),
+  fhEta3ProngAcc(0),
+  fhEta3ProngProd(0),
+  fhEta3ProngAn(0),
+  fhRap3Prong(0),
+  fhRap3ProngAcc(0),
+  fhRap3ProngProd(0),
+  fhRap3ProngAn(0),
+  fhSelectBit(0),
+  fhProtonPtProngLcPt(),
+  fhBProtonPtProngLcPt(0),
+  fhProtond0ProngLcPt(0),
+  fhBProtond0ProngLcPt(0),
+  fhKaonPtProngLcPt(0),
+  fhBKaonPtProngLcPt(0),
+  fhKaond0ProngLcPt(0),
+  fhBKaond0ProngLcPt(0),
+  fhPionPtProngLcPt(0),
+  fhBPionPtProngLcPt(0),
+  fhPiond0ProngLcPt(0),
+  fhBPiond0ProngLcPt(0),
+  fhDist12PrimLcPt(0),
+  fhBDist12PrimLcPt(0),
+  fhSigmaVertLcPt(0),
+  fhBSigmaVertLcPt(0),
+  fhdcasLcPt(0),
+  fhBdcasLcPt(0),
+  fhCosPointingAngleLcPt(0),
+  fhBCosPointingAngleLcPt(0),
+  fhDecayLengthLcPt(0),
+  fhBDecayLengthLcPt(0),
+  fhSum2LcPt(0),
+  fhBSum2LcPt(0),
+  fhPtMaxLcPt(0),
+  fhBPtMaxLcPt(0),
   fNtupleLambdac(0),
   fUpmasslimit(2.486),
   fLowmasslimit(2.086),
@@ -173,6 +245,8 @@ AliAnalysisTaskSELambdac::AliAnalysisTaskSELambdac(const char *name,Bool_t fillN
   fFillVarHists(kFALSE),
   fMultiplicityHists(kFALSE),
   fPriorsHists(kFALSE),
+  fLcCut(kFALSE),
+  fLcPIDCut(kFALSE),
   fNentries(0),
   fOutputMC(0),
   fAPriori(0),
@@ -471,7 +545,31 @@ void AliAnalysisTaskSELambdac::UserCreateOutputObjects()
     fOutput->Add(fMassHist3Pr[i]);
     fOutput->Add(fMassHist3PrTC[i]);
   }
-
+  fhEta3Prong          = new TH2F("hEta3Prong","hEta3Prong;3-Prong p_{T} GeV/c;3-Prong #eta",75,0.,15.,50,-2.0,2.0);
+  fhEta3ProngAcc       = new TH2F("hEta3ProngAcc","hEta3ProngAcc;3-Prong p_{T} GeV/c;3-Prong #eta",75,0.,15.,50,-2.0,2.0);
+  fhEta3ProngProd      = new TH2F("hEta3ProngProd","hEta3ProngProd;3-Prong p_{T} GeV/c;3-Prong #eta",75,0.,15.,50,-2.0,2.0);
+  fhEta3ProngAn            = new TH2F("hEta3ProngAn","hEta3ProngAn;3-Prong p_{T} GeV/c;3-Prong #eta",75,0.,15.,50,-2.0,2.0);
+  fhRap3Prong          = new TH2F("hRap3Prong","hRap3Prong;3-Prong p_{T} GeV/c;3-Prong y",75,0.,15.,50,-2.0,2.0);
+  fhRap3ProngAcc       = new TH2F("hRap3ProngAcc","hRap3ProngAcc;3-Prong p_{T} GeV/c;3-Prong y",75,0.,15.,50,-2.0,2.0);
+  fhRap3ProngProd      = new TH2F("hRap3ProngProd","hRap3ProngProd;3-Prong p_{T} GeV/c;3-Prong y",75,0.,15.,50,-2.0,2.0);
+  fhRap3ProngAn            = new TH2F("hRap3ProngAn","hRap3ProngAn;3-Prong p_{T} GeV/c;3-Prong y",75,0.,15.,50,-2.0,2.0);
+    
+  fhSelectBit                  = new TH1F("hSelectBit","hSelectBit",5,-0.5,5.5);
+  fhSelectBit->GetXaxis()->SetBinLabel(2,"All");
+  fhSelectBit->GetXaxis()->SetBinLabel(3,"SelectionMap");
+  fhSelectBit->GetXaxis()->SetBinLabel(4,"!LcCut");
+  fhSelectBit->GetXaxis()->SetBinLabel(5,"!LcPID");
+
+  fOutput->Add(fhEta3Prong);
+  fOutput->Add(fhEta3ProngAcc);
+  fOutput->Add(fhEta3ProngProd);
+  fOutput->Add(fhEta3ProngAn);
+  fOutput->Add(fhRap3Prong);
+  fOutput->Add(fhRap3ProngAcc);
+  fOutput->Add(fhRap3ProngProd);
+  fOutput->Add(fhRap3ProngAn);
+  fOutput->Add(fhSelectBit);
+  
   fHistNEvents = new TH1F("fHistNEvents", "Number of processed events; ; Events",3,-1.5,1.5);
   fHistNEvents->Sumw2();
   fHistNEvents->SetMinimum(0);
@@ -810,6 +908,32 @@ void AliAnalysisTaskSELambdac::UserCreateOutputObjects()
   TH2F *hBpiSigmaVspTPC=new TH2F(hisname.Data(),hisname.Data(),100,0.,5.0,100,-10.0,10.0);
   fOutputMC->Add(hBpiSigmaVspTPC);
 
+  //Jaime Lc specific
+  hisname.Form("hLcRealTot");
+  TH1F *hLambdaRealTot=new TH1F(hisname.Data(),hisname.Data(),100,0.,15.0);
+  fOutputMC->Add(hLambdaRealTot);
+  hisname.Form("hbLcRealTot");
+  TH1F *hbLambdaRealTot=new TH1F(hisname.Data(),hisname.Data(),100,0.,15.0);
+  fOutputMC->Add(hbLambdaRealTot);
+  hisname.Form("hLcIDTot");
+  TH1F *hLambdaIDTot=new TH1F(hisname.Data(),hisname.Data(),100,0.,15.0);
+  fOutputMC->Add(hLambdaIDTot);
+  hisname.Form("hbLcIDTot");
+  TH1F *hbLambdaIDTot=new TH1F(hisname.Data(),hisname.Data(),100,0.,15.0);
+  fOutputMC->Add(hbLambdaIDTot);
+  hisname.Form("hLcIDGood");
+  TH1F *hLambdaIDGood=new TH1F(hisname.Data(),hisname.Data(),100,0.,15.0);
+  fOutputMC->Add(hLambdaIDGood);
+  hisname.Form("hbLcIDGood");
+  TH1F *hbLambdaIDGood=new TH1F(hisname.Data(),hisname.Data(),100,0.,15.0);
+  fOutputMC->Add(hbLambdaIDGood);
+  hisname.Form("hLcnoID");
+  TH1F *hLambdanoID=new TH1F(hisname.Data(),hisname.Data(),100,0.,15.0);
+  fOutputMC->Add(hLambdanoID);
+  hisname.Form("hbLcnoID");
+  TH1F *hbLambdanoID=new TH1F(hisname.Data(),hisname.Data(),100,0.,15.0);
+  fOutputMC->Add(hbLambdanoID);
+  
   // other generic 
   hisname.Form("hLcpt");
   TH1F *hLcPt=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.0);
@@ -866,7 +990,97 @@ void AliAnalysisTaskSELambdac::UserCreateOutputObjects()
   TH1F *hBPtMax=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.);
   fOutputMC->Add(hBPtMax);
 
-
+//2D Var x Lc Pt
+  hisname.Form("hpptProngLcPt");
+  fhProtonPtProngLcPt=new TH2F(hisname.Data(),hisname.Data(),75,0.,15.,100,0.,5.0);
+  fOutputMC->Add(fhProtonPtProngLcPt);
+  hisname.Form("hbpptProngLcPt");
+  fhBProtonPtProngLcPt=new TH2F(hisname.Data(),hisname.Data(),75,0.,15.,100,0.,5.0);
+  fOutputMC->Add(fhBProtonPtProngLcPt);
+  
+  hisname.Form("hpd0ProngLcPt");
+  fhProtond0ProngLcPt=new TH2F(hisname.Data(),hisname.Data(),75,0.,15.,100,-0.1,0.1);
+  fOutputMC->Add(fhProtond0ProngLcPt);
+  hisname.Form("hbpd0ProngLcPt");
+  fhBProtond0ProngLcPt=new TH2F(hisname.Data(),hisname.Data(),75,0.,15.,100,-0.1,0.1);
+  fOutputMC->Add(fhBProtond0ProngLcPt);
+  hisname.Form("hKptProngLcPt");
+  fhKaonPtProngLcPt=new TH2F(hisname.Data(),hisname.Data(),75,0.,15.,100,0.,5.0);
+  fOutputMC->Add(fhKaonPtProngLcPt);
+  hisname.Form("hbKptProngLcPt");
+  fhBKaonPtProngLcPt=new TH2F(hisname.Data(),hisname.Data(),75,0.,15.,100,0.,5.0);
+  fOutputMC->Add(fhBKaonPtProngLcPt);
+   
+  hisname.Form("hKd0ProngLcPt");
+  fhKaond0ProngLcPt=new TH2F(hisname.Data(),hisname.Data(),75,0.,15.,100,-0.1,0.1);
+  fOutputMC->Add(fhKaond0ProngLcPt);
+  hisname.Form("hbKd0ProngLcPt");
+  fhBKaond0ProngLcPt=new TH2F(hisname.Data(),hisname.Data(),75,0.,15.,100,-0.1,0.1);
+  fOutputMC->Add(fhBKaond0ProngLcPt);
+
+  hisname.Form("hpiptProngLcPt");
+  fhPionPtProngLcPt=new TH2F(hisname.Data(),hisname.Data(),75,0.,15.,100,0.,5.0);
+  fOutputMC->Add(fhPionPtProngLcPt);
+  hisname.Form("hbpiptProngLcPt");
+  fhBPionPtProngLcPt=new TH2F(hisname.Data(),hisname.Data(),75,0.,15.,100,0.,5.0);
+  fOutputMC->Add(fhBPionPtProngLcPt);
+
+  hisname.Form("hpid0ProngLcPt");
+  fhPiond0ProngLcPt=new TH2F(hisname.Data(),hisname.Data(),75,0.,15.,100,-0.1,-0.1);
+  fOutputMC->Add(fhPiond0ProngLcPt);
+  hisname.Form("hbpid0ProngLcPt");
+  fhBPiond0ProngLcPt=new TH2F(hisname.Data(),hisname.Data(),75,0.,15.,100,-0.1,0.1);
+  fOutputMC->Add(fhBPiond0ProngLcPt);
+  hisname.Form("hDist12toPrimLcPt");
+  fhDist12PrimLcPt = new TH2F(hisname.Data(),hisname.Data(),75,0.,15.,100,0.,1.0);
+  fOutputMC->Add(fhDist12PrimLcPt);
+  hisname.Form("hbDist12toPrimLcPt");
+  fhBDist12PrimLcPt = new TH2F(hisname.Data(),hisname.Data(),75,0.,15.,100,0.,1.0);
+  fOutputMC->Add(fhBDist12PrimLcPt);
+
+  hisname.Form("hSigmaVertLcPt");
+  fhSigmaVertLcPt=new TH2F(hisname.Data(),hisname.Data(),75,0.,15.,60,0.,0.06);
+  fOutputMC->Add(fhSigmaVertLcPt);
+  hisname.Form("hbSigmaVertLcPt");
+  fhBSigmaVertLcPt=new TH2F(hisname.Data(),hisname.Data(),75,0.,15.,60,0.,0.06);
+  fOutputMC->Add(fhBSigmaVertLcPt);
+
+  hisname.Form("hDCAsLcPt");
+  fhdcasLcPt=new TH2F(hisname.Data(),hisname.Data(),75,0.,15.,200,0.,0.1);
+  fOutputMC->Add(fhdcasLcPt);
+  hisname.Form("hbDCAsLcPt");
+  fhBdcasLcPt=new TH2F(hisname.Data(),hisname.Data(),75,0.,15.,200,0.,0.1);
+  fOutputMC->Add(fhBdcasLcPt);
+  
+  hisname.Form("hCosPointingAngleLcPt");
+  fhCosPointingAngleLcPt = new TH2F(hisname.Data(),hisname.Data(),75,0.,15.,40,0.,1.);
+  fOutputMC->Add(fhCosPointingAngleLcPt);
+  hisname.Form("hbCosPointingAngleLcPt");
+  fhBCosPointingAngleLcPt = new TH2F(hisname.Data(),hisname.Data(),75,0.,15.,40,0.,1.);
+  fOutputMC->Add(fhBCosPointingAngleLcPt);
+
+  hisname.Form("hDecayLengthLcPt");
+  fhDecayLengthLcPt    = new TH2F(hisname.Data(),hisname.Data(),75,0.,15.,100,0.,0.1);
+  fOutputMC->Add(fhDecayLengthLcPt);
+  hisname.Form("hbDecayLengthLcPt");
+  fhBDecayLengthLcPt=new TH2F(hisname.Data(),hisname.Data(),75,0.,15.,100,0.,0.1);
+  fOutputMC->Add(fhBDecayLengthLcPt);
+
+  hisname.Form("hSum2LcPt");
+  fhSum2LcPt=new TH2F(hisname.Data(),hisname.Data(),75,0.,15.,100,0.,0.1);
+  fOutputMC->Add(fhSum2LcPt);
+  hisname.Form("hbSum2LcPt");
+  fhBSum2LcPt=new TH2F(hisname.Data(),hisname.Data(),75,0.,15.,100,0.,0.1);
+  fOutputMC->Add(fhBSum2LcPt);
+
+  hisname.Form("hptmaxLcPt");
+  fhPtMaxLcPt=new TH2F(hisname.Data(),hisname.Data(),75,0.,15.,100,0.,5.);
+  fOutputMC->Add(fhPtMaxLcPt);
+  hisname.Form("hbptmaxLcPt");
+  fhBPtMaxLcPt=new TH2F(hisname.Data(),hisname.Data(),75,0.,15.,100,0.,5.);
+  fOutputMC->Add(fhBPtMaxLcPt); 
 
   fAPriori = new TList(); // AdC
   fAPriori->SetOwner(); // AdC
@@ -1207,16 +1421,27 @@ void AliAnalysisTaskSELambdac::UserExec(Option_t */*option*/)
       unsetvtx=kTRUE;
     }
 
-    //if(d->GetSelectionMap()) {if(!d->HasSelectionBit(AliRDHFCuts::kLcCuts)) continue;}
-    //if(d->GetSelectionMap()) {if(!d->HasSelectionBit(AliRDHFCuts::kLcPID)) continue;}
+    //Filter bit selection and QA:
+    fhSelectBit->Fill(1);
+    if(d->GetSelectionMap()){
+      fhSelectBit->Fill(2);
+      if(!d->HasSelectionBit(AliRDHFCuts::kLcCuts))  fhSelectBit->Fill(3);
+      if(!d->HasSelectionBit(AliRDHFCuts::kLcPID))   fhSelectBit->Fill(4);
+      if(fLcCut&&!d->HasSelectionBit(AliRDHFCuts::kLcCuts))            continue;
+      if(fLcPIDCut&&!d->HasSelectionBit(AliRDHFCuts::kLcPID))          continue;
+    }
 
     Int_t isSelectedTracks = fRDCutsProduction->IsSelected(d,AliRDHFCuts::kTracks,aod);
     if(!isSelectedTracks) continue;
-
+    fhEta3Prong->Fill(d->Pt(),d->Eta());
+    fhRap3Prong->Fill(d->Pt(),d->Y(4122));
+    
     isThereA3prongWithGoodTracks=kTRUE;
 
     if (fRDCutsProduction->IsInFiducialAcceptance(d->Pt(),d->Y(4122))) {fNentries->Fill(6);}else{continue;}
-
+    fhEta3ProngAcc->Fill(d->Pt(),d->Eta());
+    fhRap3ProngAcc->Fill(d->Pt(),d->Y(4122));
+    
     Int_t ptbin=fRDCutsProduction->PtBin(d->Pt());
     if(ptbin==-1) {fNentries->Fill(4); continue;} //out of bounds
 
@@ -1586,7 +1811,7 @@ void AliAnalysisTaskSELambdac::FillMassHists(AliAODEvent *aod,AliAODRecoDecayHF3
 {
 
   //if MC PID or no PID, unset PID
-  if(!fRealPid) cuts->SetUsePID(kFALSE);
+  //if(!fRealPid) cuts->SetUsePID(kFALSE);
   Int_t selection=cuts->IsSelected(part,AliRDHFCuts::kCandidate,aod);
   if(selection>0){
     nSelectedloose[0]=nSelectedloose[0]+1;
@@ -1609,10 +1834,18 @@ void AliAnalysisTaskSELambdac::FillMassHists(AliAODEvent *aod,AliAODRecoDecayHF3
     Float_t xDecay=0.;
     Float_t yDecay=0.;
     Float_t zDecay=0.;
+    Bool_t IsInjected   = -1; 
+    Bool_t IsLc                = -1;
+    Bool_t IsLcfromLb  = 0;
 
     if(fReadMC){
+      AliAODMCHeader *mcHeader2 = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
+      AliVertexingHFUtils *util = new AliVertexingHFUtils();
+      IsInjected = util->IsCandidateInjected(part,mcHeader2,arrayMC)?1:0;
+      delete util;
       labDp = MatchToMCLambdac(part,arrayMC);
       if(labDp>0){
+       IsLc = 1;
        AliAODMCParticle *partDp = (AliAODMCParticle*)arrayMC->At(labDp);
        AliAODMCParticle *dg0 = (AliAODMCParticle*)arrayMC->At(partDp->GetDaughter(0));
        AliAODMCParticle *dg1 = (AliAODMCParticle*)arrayMC->At(partDp->GetDaughter(1));
@@ -1626,7 +1859,12 @@ void AliAnalysisTaskSELambdac::FillMassHists(AliAODEvent *aod,AliAODRecoDecayHF3
        pdgCode=TMath::Abs(partDp->GetPdgCode());
        pdgCode1=TMath::Abs(dg0->GetPdgCode());
        pdgCode2=TMath::Abs(dg1->GetPdgCode());
-
+       Int_t imother = partDp->GetMother();
+       if(imother>0){
+         AliAODMCParticle *partMom = (AliAODMCParticle*)arrayMC->At(imother);
+         if(TMath::Abs(partMom->GetPdgCode())==5122) IsLcfromLb =1;
+         else IsLcfromLb=-1;
+       }
       }else{
        pdgCode=-1;
       }
@@ -1696,33 +1934,39 @@ void AliAnalysisTaskSELambdac::FillMassHists(AliAODEvent *aod,AliAODRecoDecayHF3
    
     Int_t passTightCuts=0;
     if(fAnalysis) {
-     passTightCuts=fRDCutsAnalysis->IsSelected(part,AliRDHFCuts::kCandidate,aod);
-     if(fUseKF){
-      Int_t pdgs[3]={0,0,0};
-      if(invMasspKpi>0.){
-       pdgs[0]=2212;pdgs[1]=321;pdgs[2]=211;
-       if(!VertexingKF(part,pdgs,field)) {
-        invMasspKpi=-1.;
-       invMasspKpi3Pr=-1.;
-       invMasspKpiDk=-1.;
-       invMasspKpiLpi=-1.;
-       invMasspKpiKp=-1.;
-       }
+      passTightCuts=fRDCutsAnalysis->IsSelected(part,AliRDHFCuts::kCandidate,aod);
+      if(fUseKF){
+       Int_t pdgs[3]={0,0,0};
+       if(invMasspKpi>0.){
+         pdgs[0]=2212;pdgs[1]=321;pdgs[2]=211;
+         if(!VertexingKF(part,pdgs,field)) {
+           invMasspKpi=-1.;
+           invMasspKpi3Pr=-1.;
+           invMasspKpiDk=-1.;
+           invMasspKpiLpi=-1.;
+           invMasspKpiKp=-1.;
+         }
+       }
+       if(invMasspiKp>0.){
+         pdgs[0]=211;pdgs[1]=321;pdgs[2]=2212;
+         if(!VertexingKF(part,pdgs,field)) {
+           invMasspiKp=-1.;
+           invMasspiKp3Pr=-1.;
+           invMasspiKpDk=-1.;
+           invMasspiKpLpi=-1.;
+           invMasspiKpKp=-1.;
+         }
+       }
       }
-      if(invMasspiKp>0.){
-       pdgs[0]=211;pdgs[1]=321;pdgs[2]=2212;
-       if(!VertexingKF(part,pdgs,field)) {
-         invMasspiKp=-1.;
-         invMasspiKp3Pr=-1.;
-         invMasspiKpDk=-1.;
-         invMasspiKpLpi=-1.;
-         invMasspiKpKp=-1.;
-       }
-     }
-   }
-    if(passTightCuts>0) nSelectedtight[0]=nSelectedtight[0]+1;
-  }
-
+      if(passTightCuts>0) nSelectedtight[0]=nSelectedtight[0]+1;
+    }
+    // Eta and y plots:
+    fhEta3ProngProd->Fill(part->Pt(),part->Eta());
+    fhRap3ProngProd->Fill(part->Pt(),part->Y(4122));
+    if(passTightCuts>0){
+      fhEta3ProngAn->Fill(part->Pt(),part->Eta());
+      fhRap3ProngAn->Fill(part->Pt(),part->Y(4122));
+    }
     Float_t tmp[24];
     if (fFillNtuple) {
       tmp[0]=pdgCode;
@@ -2162,7 +2406,10 @@ void AliAnalysisTaskSELambdac::FillVarHists(AliAODRecoDecayHF3Prong *part,
   if(fReadMC)
     lab=part->MatchToMC(4122,arrMC,3,pdgDgLctopKpi); //return MC particle label if the array corresponds to a Lc, -1 if not (cf. AliAODRecoDecay.cxx)
 
-  Int_t isSelectedPID=cuts->IsSelectedPID(part); // 0 rejected, 1 Lc -> p K- pi+ (K at center because different sign is there),
+ // Int_t isSelectedPID=cuts->IsSelectedPID(part); // 0 rejected, 1 Lc -> p K- pi+ (K at center because different sign is there),
+                                                 // 2 Lc -> pi+ K- p (K at center because different sign is there),
+                                                 // 3 both (it should never happen...)
+  Int_t isSelectedPID=cuts->IsSelected(part,AliRDHFCuts::kPID,aod); // 0 rejected, 1 Lc -> p K- pi+ (K at center because different sign is there),
                                                  // 2 Lc -> pi+ K- p (K at center because different sign is there),
                                                  // 3 both (it should never happen...)
 
@@ -2208,52 +2455,73 @@ void AliAnalysisTaskSELambdac::FillVarHists(AliAODRecoDecayHF3Prong *part,
   }
 
   //fill hRealTot ---> PID efficiency denominators
-  cuts->SetUsePID(kFALSE); //PAOLA
-  Int_t selectionCandidate=cuts->IsSelected(part,AliRDHFCuts::kCandidate,aod);//PAOLA
-  if(fReadMC && selectionCandidate>0) { // 3prongs candidate x Lc (no PID)
+  //cuts->SetUsePID(kFALSE); //PAOLA
+  Int_t selectionTrack = cuts->IsSelected(part,AliRDHFCuts::kTracks,aod);
+  
+  //IsInjected check    
+  Bool_t IsInjected = 0;
+  if(fReadMC){
+    AliAODMCHeader *mcHeader2 = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
+    AliVertexingHFUtils *util = new AliVertexingHFUtils();
+    IsInjected = util->IsCandidateInjected(part,mcHeader2,arrMC)?1:0;
+    delete util;
+  }
+  if(fReadMC && selectionTrack>0) { // 3prongs candidate x Lc (only track selection) Jaime
+    Int_t isReal=0;
     if(lab>0){ // Signal
       for (Int_t iprong=0; iprong<3; iprong++) {
        switch (pdgProngMC[iprong]) {
        case 2212:
          fillthis="hpRealTot";
          ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong));
+         isReal++;
          break;
        case 321:
          fillthis="hKRealTot";
          ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong));
+         isReal++;
          break;
        case 211:
          fillthis="hpiRealTot";
          ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong));
+         isReal++;
          break;
        default:
          break;
        }
       }
-    } else { // bkg
+       fillthis="hLcRealTot";
+       if(isReal==3) ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt());
+    //Marcel: Should we zero isReal
+    } else if(!IsInjected) { // bkg  // bkg
       for (Int_t iprong=0; iprong<3; iprong++) {
        switch (pdgProngMC[iprong]) {
        case 2212:
          fillthis="hbpRealTot";
          ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong));
+         isReal++;
          break;
        case 321:
          fillthis="hbKRealTot";
          ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong));
+         isReal++;
          break;
        case 211:
          fillthis="hbpiRealTot";
          ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong));
+         isReal++;
          break;
        default:
          break;
        }
       }
+    fillthis="hbLcRealTot";
+       if(isReal==3) ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt()); 
     }
   }
 
 
-  cuts->SetUsePID(kTRUE); //PAOLA
+  //cuts->SetUsePID(kTRUE); //PAOLA
   Int_t selection=cuts->IsSelected(part,AliRDHFCuts::kCandidate,aod);
 
   if ( (lab>0 && fReadMC) ||             // signal X MC
@@ -2278,7 +2546,8 @@ void AliAnalysisTaskSELambdac::FillVarHists(AliAODRecoDecayHF3Prong *part,
     if (selection>0) { // 3prongs candidate x Lc (yes PID)
 
       Double_t ptmax=0.;
-
+      Int_t isID=0;
+      Int_t isCorrect=0;
       for (Int_t iprong=0; iprong<3; iprong++) {
        if (part->PtProng(iprong)>ptmax) ptmax=part->PtProng(iprong);
 
@@ -2332,9 +2601,11 @@ void AliAnalysisTaskSELambdac::FillVarHists(AliAODRecoDecayHF3Prong *part,
                         //      hIDGood, hnoID ---> PID numerators
            fillthis="hpIDTot";
            ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong));
+           isID++;
            if(pdgProngMC[iprong]==2212) { // id protons
              fillthis="hpIDGood";
              ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong));
+             isCorrect++;  
            }
            else { // misidentified electrons, muons, pions and kaons
              fillthis="hnopIDp";
@@ -2375,9 +2646,11 @@ void AliAnalysisTaskSELambdac::FillVarHists(AliAODRecoDecayHF3Prong *part,
                         //      hIDGood, hnoID ---> PID numerators
            fillthis="hKIDTot";
            ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong));
+           isID++;
            if(pdgProngMC[iprong]==321) { // id kaons
              fillthis="hKIDGood";
              ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong));
+             isCorrect++;
            }
            else { // misidentified electrons, muons, pions and protons
              fillthis="hnokIDk";
@@ -2418,9 +2691,11 @@ void AliAnalysisTaskSELambdac::FillVarHists(AliAODRecoDecayHF3Prong *part,
                         //      hIDGood, hnoID ---> PID numerators
            fillthis="hpiIDTot";
            ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong));
+           isID++;
            if(pdgProngMC[iprong]==211) { // id pions
              fillthis="hpiIDGood";
              ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong));
+             isCorrect++;
            }
            else { // misidentified electrons, muons, kaons and protons
              fillthis="hnopiIDpi";
@@ -2435,33 +2710,57 @@ void AliAnalysisTaskSELambdac::FillVarHists(AliAODRecoDecayHF3Prong *part,
 
       } //end loop on prongs
 
+      //Jaime Lc checks
+      fillthis="hLcIDTot";
+      if(isID==3) ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt());
+      fillthis="hLcIDGood";
+      if(isCorrect==3) ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt());
+      fillthis="hLcnoID";
+      if(isCorrect<3) ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt());
+
       //now histograms where we don't need to check identity
+      fillthis="hLcpt";
+      ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt());
       fillthis = "hDist12toPrim";
       ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->GetDist12toPrim());
       ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->GetDist23toPrim());
+      fillthis = "hDist12toPrimLcPt";
+      ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt(),part->GetDist12toPrim());
+      ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt(),part->GetDist23toPrim());
       fillthis = "hSigmaVert";
       ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->GetSigmaVert());
+      fillthis = "hSigmaVertLcPt";
+      ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt(),part->GetSigmaVert());
       fillthis = "hDCAs";
       Double_t dcas[3];
       part->GetDCAs(dcas);
       for (Int_t idca=0;idca<3;idca++) ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(dcas[idca]);
+      fillthis = "hDCAsLcPt";
+      for (Int_t idca=0;idca<3;idca++) ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt(),dcas[idca]);
       fillthis = "hCosPointingAngle";
       ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->CosPointingAngle());
+      fillthis = "hCosPointingAngleLcPt";
+      ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt(),part->CosPointingAngle());
       fillthis = "hDecayLength";
       ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->DecayLength());
+      fillthis = "hDecayLengthLcPt";
+      ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt(),part->DecayLength());
       Double_t sum2=part->Getd0Prong(0)*part->Getd0Prong(0)+
        part->Getd0Prong(1)*part->Getd0Prong(1)+
        part->Getd0Prong(2)*part->Getd0Prong(2);
       fillthis = "hSum2";
       ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(sum2);
+      fillthis = "hSum2LcPt";
+      ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt(),sum2);
       fillthis = "hptmax";
       ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(ptmax);
-      fillthis="hLcpt";
-      ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt());
+      fillthis = "hptmaxLcPt";
+      ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt(),ptmax);
+
 
     } // end if (selection)
 
-  } else if( lab<=0 && fReadMC) { // bkg x MC
+  }else if( lab<=0 && fReadMC && !IsInjected ) { // bkg x MC
 
     fillthis="hbMass";
 
@@ -2485,6 +2784,8 @@ void AliAnalysisTaskSELambdac::FillVarHists(AliAODRecoDecayHF3Prong *part,
       if (selection>0) { // 3prongs candidate x Lc (yes PID)
 
        Double_t ptmax=0.;
+       Int_t isID=0;
+       Int_t isCorrect=0;
        for (Int_t iprong=0; iprong<3; iprong++) {
          if(part->PtProng(iprong)>ptmax)ptmax=part->PtProng(iprong);
 
@@ -2538,9 +2839,11 @@ void AliAnalysisTaskSELambdac::FillVarHists(AliAODRecoDecayHF3Prong *part,
                         //      hbIDGood, hbnoID ---> PID numerators
              fillthis="hbpIDTot";
              ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong));
+             isID++;
              if(pdgProngMC[iprong]==2212) { // id protons
                fillthis="hbpIDGood";
                ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong));
+               isCorrect++;
              }
              else { // misidentified electrons, muons, pions and kaons
                fillthis="hbnopIDp";
@@ -2580,9 +2883,11 @@ void AliAnalysisTaskSELambdac::FillVarHists(AliAODRecoDecayHF3Prong *part,
                           //      hIDGood, hnoID ---> PID numerators
              fillthis="hbKIDTot";
              ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong));
+             isID++;
              if(pdgProngMC[iprong]==321) { // id kaons
                fillthis="hbKIDGood";
                ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong));
+               isCorrect++;
              }
              else { // misidentified electrons, muons, pions and protons
                fillthis="hbnokIDk";
@@ -2598,6 +2903,8 @@ void AliAnalysisTaskSELambdac::FillVarHists(AliAODRecoDecayHF3Prong *part,
            ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(dedxTPC);
            fillthis="hbpiptProng";
            ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong));
+           fillthis="hbpiptProngLcPt";
+           ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong));
            fillthis="hbpid0Prong";
            ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Getd0Prong(iprong));
            fillthis="hbpiSignalVspTPC";
@@ -2622,9 +2929,11 @@ void AliAnalysisTaskSELambdac::FillVarHists(AliAODRecoDecayHF3Prong *part,
                           //      hIDGood, hnonIDTot ---> PID numerators
              fillthis="hbpiIDTot";
              ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong));
+             isID++;
              if(pdgProngMC[iprong]==211) { // id pions
                fillthis="hbpiIDGood";
                ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong));
+               isCorrect++;
              }
              else { // misidentified electrons, muons, kaons and protons
                fillthis="hbnopiIDpi";
@@ -2638,32 +2947,53 @@ void AliAnalysisTaskSELambdac::FillVarHists(AliAODRecoDecayHF3Prong *part,
          }
 
        } //end loop on prongs
+       
+       fillthis="hbLcIDTot";
+       if(isID==3) ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt()); 
+       fillthis="hbLcIDGood";
+       if(isCorrect==3) ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt());
+       fillthis="hbLcnoID";
+       if(isCorrect<3) ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt());
 
        //now histograms where we don't need to check identity
        fillthis="hbLcpt";
        ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt());
-
+       
        fillthis = "hbDist12toPrim";
        ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->GetDist12toPrim());
        ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->GetDist23toPrim());
+       fillthis = "hbDist12toPrimLcPt";
+       ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt(),part->GetDist12toPrim());
+       ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt(),part->GetDist23toPrim());
        fillthis = "hbSigmaVert";
        ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->GetSigmaVert());
+       fillthis = "hbSigmaVertLcPt";
+       ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt(),part->GetSigmaVert());
        fillthis = "hbDCAs";
        Double_t dcas[3];
        part->GetDCAs(dcas);
-       for (Int_t idca=0;idca<3;idca++)
-         ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(dcas[idca]);
+       for (Int_t idca=0;idca<3;idca++) ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(dcas[idca]);
+       fillthis = "hbDCAsLcPt";
+       for (Int_t idca=0;idca<3;idca++) ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt(),dcas[idca]);
        fillthis = "hbCosPointingAngle";
        ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->CosPointingAngle());
+       fillthis = "hbCosPointingAngleLcPt";
+       ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt(),part->CosPointingAngle());
        fillthis = "hbDecayLength";
        ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->DecayLength());
+       fillthis = "hbDecayLengthLcPt";
+       ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt(),part->DecayLength());
        Double_t sum2=part->Getd0Prong(0)*part->Getd0Prong(0)+
-         part->Getd0Prong(1)*part->Getd0Prong(1)+
-         part->Getd0Prong(2)*part->Getd0Prong(2);
+       part->Getd0Prong(1)*part->Getd0Prong(1)+
+       part->Getd0Prong(2)*part->Getd0Prong(2);
        fillthis = "hbSum2";
        ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(sum2);
+       fillthis = "hbSum2LcPt";
+       ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt(),sum2);
        fillthis = "hbptmax";
        ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(ptmax);
+       fillthis = "hbptmaxLcPt";
+       ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt(),ptmax);
 
       } // end if (selection)
 
@@ -2683,7 +3013,7 @@ void AliAnalysisTaskSELambdac::FillAPrioriConcentrations(AliAODRecoDecayHF3Prong
 {
 
   // FillAPrioriConcentrations
-  cuts->SetUsePID(kFALSE); //Annalisa
+  //cuts->SetUsePID(kFALSE); //Annalisa
   Int_t isSelected3ProngByLc=cuts->IsSelected(part,AliRDHFCuts::kCandidate,aod);
 
   TString fillthis="";
@@ -2724,7 +3054,7 @@ void AliAnalysisTaskSELambdac::FillAPrioriConcentrations(AliAODRecoDecayHF3Prong
     }
   }
 
-  cuts->SetUsePID(kTRUE); //Annalisa
+  //cuts->SetUsePID(kTRUE); //Annalisa
 
 }
 
@@ -2878,7 +3208,7 @@ void AliAnalysisTaskSELambdac::MultiplicityStudies(AliAODRecoDecayHF3Prong *part
   if(fReadMC)
     lab=part->MatchToMC(4122,arrMC,3,pdgDgLctopKpi); //return MC particle label if the array corresponds to a Lc, -1 if not (cf. AliAODRecoDecay.cxx)
 
-  cuts->SetUsePID(kFALSE); //Annalisa
+  //cuts->SetUsePID(kFALSE); //Annalisa
   Int_t isSelected3ProngByLc=cuts->IsSelected(part,AliRDHFCuts::kCandidate,aod);
 
   if(isSelected3ProngByLc>0 && fReadMC) {
@@ -3148,7 +3478,7 @@ void AliAnalysisTaskSELambdac::MultiplicityStudies(AliAODRecoDecayHF3Prong *part
   Double_t minvLcpKpi = part->InvMassLcpKpi();
   Double_t minvLcpiKp = part->InvMassLcpiKp();
 
-  cuts->SetUsePID(kTRUE); //Annalisa
+  //cuts->SetUsePID(kTRUE); //Annalisa
   Int_t isSelected3ProngByLcPID=cuts->IsSelected(part,AliRDHFCuts::kCandidate,aod);
   if (isSelected3ProngByLcPID>0) {
     if (TMath::Abs(minvLcpKpi-mPDG)<invmasscut || TMath::Abs(minvLcpiKp-mPDG)<invmasscut) {
index e6175dd39f849e74b56f3e27f233923053f80c09..52a21e49d0fe571e3b03838ecc07cf608b928f00 100644 (file)
@@ -52,7 +52,9 @@ class AliAnalysisTaskSELambdac : public AliAnalysisTaskSE
   void SetFillVarHists(Bool_t setter) {fFillVarHists=setter;return;}
   void SetMultiplicityHists(Bool_t setter) {fMultiplicityHists=setter;return;}
   void SetPriorsHists(Bool_t setter) {fPriorsHists=setter;return;}
-  
+  void SetUseFilterBitCut(Bool_t setter)   { fLcCut = setter;   return; }  
+  void SetUseFilterBitPID(Bool_t setter)   { fLcPIDCut = setter; return; }
+
   Float_t GetUpperMassLimit() const {return fUpmasslimit;}
   Float_t GetLowerMassLimit() const {return fLowmasslimit;}
   Int_t GetNBinsPt() const {return fNPtBins;}
@@ -129,6 +131,41 @@ class AliAnalysisTaskSELambdac : public AliAnalysisTaskSE
   TH1F *fMassHistDkTC[3*kMaxPtBins]; //!hist. for inv mass (TC)
   TH1F *fMassHist3Pr[3*kMaxPtBins]; //!hist. for inv mass (LC)
   TH1F *fMassHist3PrTC[3*kMaxPtBins]; //!hist. for inv mass (TC)
+  TH2F *fhEta3Prong;    //!hist. for 3-prong Eta
+  TH2F *fhEta3ProngAcc; //!hist. for 3-prong Eta fiducial acc
+  TH2F *fhEta3ProngProd; //!hist. for 3-prong Eta fiducial  Prod Cuts
+  TH2F *fhEta3ProngAn; //!hist. for 3-prong Eta fiducial An Cuts
+  TH2F *fhRap3Prong;    //!hist. for 3-prong y 
+  TH2F *fhRap3ProngAcc; //!hist. for 3-prong Eta fiducial acc
+  TH2F *fhRap3ProngProd; //!hist. for 3-prong Eta fiducial Prod cuts
+  TH2F *fhRap3ProngAn; //!hist. for 3-prong Eta fiducial An cuts
+  TH1F *fhSelectBit; //! hist for Filter Bit   
+  TH2F *fhProtonPtProngLcPt; //!hist for var_LcPt
+  TH2F *fhBProtonPtProngLcPt;//!hist for var_LcPt
+  TH2F *fhProtond0ProngLcPt;//!hist for var_LcPt
+  TH2F *fhBProtond0ProngLcPt;//!hist for var_LcPt
+  TH2F *fhKaonPtProngLcPt;//!hist for var_LcPt
+  TH2F *fhBKaonPtProngLcPt;//!hist for var_LcPt
+  TH2F *fhKaond0ProngLcPt;//!hist for var_LcPt
+  TH2F *fhBKaond0ProngLcPt;//!hist for var_LcPt
+  TH2F *fhPionPtProngLcPt;//!hist for var_LcPt
+  TH2F *fhBPionPtProngLcPt;//!hist for var_LcPt
+  TH2F *fhPiond0ProngLcPt;//!hist for var_LcPt
+  TH2F *fhBPiond0ProngLcPt;//!hist for var_LcPt
+  TH2F *fhDist12PrimLcPt;//!hist for var_LcPt
+  TH2F *fhBDist12PrimLcPt;//!hist for var_LcPt
+  TH2F *fhSigmaVertLcPt;//!hist for var_LcPt
+  TH2F *fhBSigmaVertLcPt;//!hist for var_LcPt
+  TH2F *fhdcasLcPt;//!hist for var_LcPt
+  TH2F *fhBdcasLcPt;//!hist for var_LcPt
+  TH2F *fhCosPointingAngleLcPt;//!hist for var_LcPt
+  TH2F *fhBCosPointingAngleLcPt;//!hist for var_LcPt
+  TH2F *fhDecayLengthLcPt;//!hist for var_LcPt
+  TH2F *fhBDecayLengthLcPt;//!hist for var_LcPt
+  TH2F *fhSum2LcPt;//!hist for var_LcPt
+  TH2F *fhBSum2LcPt;//!hist for var_LcPt
+  TH2F *fhPtMaxLcPt;//!hist for var_LcPt
+  TH2F *fhBPtMaxLcPt;//!hist for var_LcPt
   TNtuple *fNtupleLambdac; //! output ntuple
   Float_t fUpmasslimit;  //upper inv mass limit for histos
   Float_t fLowmasslimit; //lower inv mass limit for histos
@@ -149,6 +186,8 @@ class AliAnalysisTaskSELambdac : public AliAnalysisTaskSE
   Bool_t fFillVarHists;  // flag for creation and fill of histograms with vars
   Bool_t fMultiplicityHists;  // flag for activation of multiplcity histos
   Bool_t fPriorsHists;  // flag for histos with priors
+  Bool_t fLcCut;  // flag for Lc filter bit cut
+  Bool_t fLcPIDCut;  // flag for Lc filter bit PID
   TH1F *fNentries;      // histo with number of entries
   TList *fOutputMC;     // output1
   TList *fAPriori;      // output2
@@ -157,7 +196,7 @@ class AliAnalysisTaskSELambdac : public AliAnalysisTaskSE
   AliPIDResponse *fPIDResponse;     //! PID response object
   AliNormalizationCounter *fCounter;//!AliNormalizationCounter on output slot 7
 
-  ClassDef(AliAnalysisTaskSELambdac,6); // AliAnalysisTaskSE for the invariant mass analysis of heavy-flavour decay candidates (Lambdac)
+  ClassDef(AliAnalysisTaskSELambdac,7); // AliAnalysisTaskSE for the invariant mass analysis of heavy-flavour decay candidates (Lambdac)
 };
 
 #endif
index f461261df400bd465b8e60b83ddead956b155c5f..101a760e22315a50c6ced9bfa40a001aa64baa6f 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, Int_t syst=0, TString postname="")
+                                 Bool_t fillVarHists=kFALSE, Bool_t priorsHists=kFALSE, Bool_t multiplicityHists=kFALSE, Int_t syst=0, Int_t bit=0,  TString postname="")
 {
   //==============================================================================                                                      
   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
@@ -53,6 +53,10 @@ AliAnalysisTaskSE *AddTaskLambdac(TString finname,Bool_t storeNtuple,Bool_t read
   lambdacTask->SetMultiplicityHists(multiplicityHists);
   lambdacTask->SetAnalysis(kTRUE);
 
+  //bit:0 nocut, 1:LcCut, 2:LcPID, 3: Both
+  lambdacTask->SetUseFilterBitCut(bit==1||bit==3?1:0);
+  lambdacTask->SetUseFilterBitPID(bit>1?1:0);
+
   lambdacTask->SetDebugLevel(0);
   if(useKF) {
     lambdacTask->SetUseKF();