Updates from Chiara
authormploskon <mploskon@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 Aug 2013 18:34:38 +0000 (18:34 +0000)
committermploskon <mploskon@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 Aug 2013 18:34:38 +0000 (18:34 +0000)
PWGJE/FlavourJetTasks/AliAnalysisTaskFlavourJetCorrelations.cxx
PWGJE/FlavourJetTasks/AliAnalysisTaskFlavourJetCorrelations.h
PWGJE/FlavourJetTasks/AliAnalysisTaskSEDmesonsFilterCJ.cxx
PWGJE/FlavourJetTasks/AliAnalysisTaskSEDmesonsFilterCJ.h
PWGJE/FlavourJetTasks/macros/AddTaskFlavourJetCorrelations.C
PWGJE/FlavourJetTasks/macros/AddTaskSEDmesonsFilterCJ.C
PWGJE/FlavourJetTasks/macros/AddTasksFlavourJet.C
PWGJE/FlavourJetTasks/macros/AnalysisTrainCorrJetsLocal.C

index d003634..4fa23be 100644 (file)
@@ -1,4 +1,3 @@
-// $Id$
 /**************************************************************************
  * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
  *                                                                        *
 #include "AliRDHFCutsD0toKpi.h"
 #include "AliRDHFCutsDStartoKpipi.h"
 
-#include <vector>
-#include <iostream>
-using std::vector;
-using std::cout;
-using std::endl;
-
 ClassImp(AliAnalysisTaskFlavourJetCorrelations)
 
 //__________________________________________________________________________
 AliAnalysisTaskFlavourJetCorrelations::AliAnalysisTaskFlavourJetCorrelations() :
-  AliAnalysisTaskEmcalJet(),
+  AliAnalysisTaskEmcalJet("",kFALSE),
   fUseMCInfo(kTRUE), 
   fCandidateType(),
   fPDGmother(),
@@ -78,7 +71,7 @@ AliAnalysisTaskFlavourJetCorrelations::AliAnalysisTaskFlavourJetCorrelations() :
 }
 //___________________________________________________________________________
 AliAnalysisTaskFlavourJetCorrelations::AliAnalysisTaskFlavourJetCorrelations(const Char_t* name, AliRDHFCuts* cuts,ECandidateType candtype, TString jetArrName) :
-  AliAnalysisTaskEmcalJet(name),
+  AliAnalysisTaskEmcalJet(name,kFALSE),
   fUseMCInfo(kTRUE),
   fCandidateType(),
   fPDGmother(),
@@ -139,11 +132,10 @@ AliAnalysisTaskFlavourJetCorrelations::AliAnalysisTaskFlavourJetCorrelations(con
   if(fCandidateType==kDstartoKpipi) SetMassLimits(0.015, fPDGmother);
   fJetArrName=jetArrName;
   Printf("Jet read is %s",fJetArrName.Data());
-
-
-
+  
   DefineOutput(1,TList::Class()); // histos
   DefineOutput(2,AliRDHFCuts::Class()); // my cuts
 }
 //___________________________________________________________________________
 AliAnalysisTaskFlavourJetCorrelations::~AliAnalysisTaskFlavourJetCorrelations() {
@@ -163,6 +155,7 @@ void AliAnalysisTaskFlavourJetCorrelations::Init(){
   //
   // Initialization
   //
   if(fDebug > 1) printf("AnalysisTaskRecoJetCorrelations::Init() \n");
   switch(fCandidateType){
   case 0:
@@ -188,6 +181,21 @@ void AliAnalysisTaskFlavourJetCorrelations::Init(){
   return;
 }
 
+//___________________________________________________________________________
+
+void AliAnalysisTaskFlavourJetCorrelations::UserCreateOutputObjects() { 
+ // output 
+  Info("UserCreateOutputObjects","CreateOutputObjects of task %s\n", GetName());
+  fOutput = new TList();
+  fOutput->SetOwner();
+  fOutput->SetName("fOutputDjet");
+  // define histograms
+  DefineHistoForAnalysis();
+  PostData(1,fOutput);
+
+  return;
+}
+
 //_________________________________________________
 void AliAnalysisTaskFlavourJetCorrelations::UserExec(Option_t *)
 {
@@ -364,8 +372,10 @@ void AliAnalysisTaskFlavourJetCorrelations::UserExec(Option_t *)
   //loop over jets and consider only the leading jet in the event
   for (Int_t iJets = 0; iJets<njets; iJets++) {    
     AliEmcalJet* jet = (AliEmcalJet*)jetArr->At(iJets);
-    if(!AcceptJet(jet)) continue;
-
+    if(!AcceptJet(jet)) {
+       hstat->Fill(5);
+       continue;
+    }
     vector<int> DmesonInJetLabels(10);
     //Int_t iD=0;
     //jets variables
@@ -413,7 +423,6 @@ void AliAnalysisTaskFlavourJetCorrelations::UserExec(Option_t *)
   hNJetPerEv->Fill(cntjet);
 
   AliDebug(2, Form("Found %i Reco particles that are D*!!",icountReco));
-  
   PostData(1,fOutput);
 
 }
@@ -434,22 +443,7 @@ void AliAnalysisTaskFlavourJetCorrelations::Terminate(Option_t*)
     return;
   }
 }
-//___________________________________________________________________________
-
-void AliAnalysisTaskFlavourJetCorrelations::UserCreateOutputObjects() { 
- // output 
-  Info("UserCreateOutputObjects","CreateOutputObjects of task %s\n", GetName());
-  
-  //slot #1  
-  OpenFile(1);
-  fOutput = new TList();
-  fOutput->SetOwner();
-  // define histograms
-  DefineHistoForAnalysis();
 
-  PostData(1,fOutput);
-  return;
-}
 //_________________________________________________________________
 void  AliAnalysisTaskFlavourJetCorrelations::SetMassLimits(Double_t range, Int_t pdg){
   Float_t mass=0;
@@ -516,12 +510,13 @@ Double_t AliAnalysisTaskFlavourJetCorrelations::Z(AliVParticle* part,AliEmcalJet
 Bool_t  AliAnalysisTaskFlavourJetCorrelations::DefineHistoForAnalysis(){
  
   // Statistics 
-  TH1I* hstat=new TH1I("hstat","Statistics",5,-0.5,4.5);
+  TH1I* hstat=new TH1I("hstat","Statistics",6,-0.5,5.5);
   hstat->GetXaxis()->SetBinLabel(1,"N ev anal");
   hstat->GetXaxis()->SetBinLabel(2,"N ev sel");
   hstat->GetXaxis()->SetBinLabel(3,"N cand sel cuts");
   hstat->GetXaxis()->SetBinLabel(4,"N jets");
   hstat->GetXaxis()->SetBinLabel(5,"N cand in jet");
+  hstat->GetXaxis()->SetBinLabel(6,"N jet rej");
   // if(fUseMCInfo) {
   //   hstat->GetXaxis()->SetBinLabel(7,"N D");
   //   hstat->GetXaxis()->SetBinLabel(8,"N D in jet");
@@ -538,14 +533,14 @@ Bool_t  AliAnalysisTaskFlavourJetCorrelations::DefineHistoForAnalysis(){
     {
       // TH2F *hDiff = new TH2F("hDiff","M(kpipi)-M(kpi)",500,fMinMass,fMaxMass,100, 0.,30.);
       // hDiff->SetStats(kTRUE);
-      // hDiff->GetXaxis()->SetTitle("M(kpipi)-M(kpi) GeV/c^{2}");
-      // hDiff->GetYaxis()->SetTitle("p_{t}^{D} (GeV/c^{2})");
+      // hDiff->GetXaxis()->SetTitle("M(kpipi)-M(kpi) GeV");
+      // hDiff->GetYaxis()->SetTitle("p_{t}^{D} (GeV/c)");
       // fOutput->Add(hDiff);
   
       TH2F* hDiffSideBand = new TH2F("hDiffSideBand","M(kpipi)-M(kpi) Side Band Background",nbinsmass,fMinMass,fMaxMass,100, 0.,30.);
       hDiffSideBand->SetStats(kTRUE);
-      hDiffSideBand->GetXaxis()->SetTitle("M(kpipi)-M(Kpi) GeV/c^{2}");
-      hDiffSideBand->GetYaxis()->SetTitle("p_{t}^{D} (GeV/c^{2})");
+      hDiffSideBand->GetXaxis()->SetTitle("M(kpipi)-M(Kpi) GeV");
+      hDiffSideBand->GetYaxis()->SetTitle("p_{t}^{D} (GeV/c)");
       fOutput->Add(hDiffSideBand); 
  
       //correlation histograms
@@ -591,14 +586,15 @@ Bool_t  AliAnalysisTaskFlavourJetCorrelations::DefineHistoForAnalysis(){
   TH1F* hEjetTrks      = new TH1F("hEjetTrks",  "Jet tracks energy distribution;Energy (GeV)",500,0,200);
   TH1F* hPhiJetTrks    = new TH1F("hPhiJetTrks","Jet tracks #phi distribution; #phi (rad)",  200,0,6.30);
   TH1F* hEtaJetTrks    = new TH1F("hEtaJetTrks","Jet tracks #eta distribution; #eta",  100,-1.5,1.5);
-  TH1F* hPtJetTrks     = new TH1F("hPtJetTrks",  "Jet tracks Pt distribution; p_{T} (GeV/c^{2})",500,0,200);
+  TH1F* hPtJetTrks     = new TH1F("hPtJetTrks",  "Jet tracks Pt distribution; p_{T} (GeV/c)",500,0,200);
   
   TH1F* hEjet      = new TH1F("hEjet",  "Jet energy distribution;Energy (GeV)",500,0,200);
   TH1F* hPhiJet    = new TH1F("hPhiJet","Jet #phi distribution; #phi (rad)",  200,0,6.30);
   TH1F* hEtaJet    = new TH1F("hEtaJet","Jet #eta distribution; #eta",  100,-1.5,1.5);
-  TH1F* hPtJet      = new TH1F("hPtJet",  "Jet Pt distribution; p_{T} (GeV/c^{2})",500,0,200);
+  TH1F* hPtJet      = new TH1F("hPtJet",  "Jet Pt distribution; p_{T} (GeV/c)",500,0,200);
 
-  TH1F* hPtJetWithD=new TH1F("hPtJetWithD","D-Jet Pt distribution; p_{T} (GeV/c^{2})",500,0,200);
+  TH2F* hPtJetWithD=new TH2F("hPtJetWithD","D-Jet Pt distribution; p_{T} (GeV/c);inv mass (GeV)",500,0,200,nbinsmass,fMinMass,fMaxMass);
+  TH1F* hPtJetWithDsb=new TH1F("hPtJetWithDsb","D(background)-Jet Pt distribution; p_{T} (GeV/c)",500,0,200);
   TH1F* hdeltaRJetTracks=new TH1F("hdeltaRJetTracks","Delta R of tracks in the jets",200, 0.,10.);
 
   TH1F* hNtrArr= new TH1F("hNtrArr", "Number of tracks in the array of jets; number of tracks",500,0,1000);
@@ -613,6 +609,7 @@ Bool_t  AliAnalysisTaskFlavourJetCorrelations::DefineHistoForAnalysis(){
   fOutput->Add(hEtaJet);
   fOutput->Add(hPtJet);
   fOutput->Add(hPtJetWithD);
+  fOutput->Add(hPtJetWithDsb);
   fOutput->Add(hdeltaRJetTracks);
   fOutput->Add(hNtrArr);
   fOutput->Add(hNJetPerEv);
@@ -636,16 +633,16 @@ Bool_t  AliAnalysisTaskFlavourJetCorrelations::DefineHistoForAnalysis(){
   fOutput->Add(hDeltaRD);
 
   TH3F* hdeltaPhiDja=new TH3F("hdeltaPhiDja", "#Delta#phi D-jet (jet p_{T} > threshold)",nbinsmass,fMinMass,fMaxMass,100, 0.,30.,50,(-1)*TMath::Pi()/2.,3./2.*TMath::Pi());
-  hdeltaPhiDja->GetXaxis()->SetTitle("mass (GeV/c)");
+  hdeltaPhiDja->GetXaxis()->SetTitle("mass (GeV)");
   hdeltaPhiDja->GetYaxis()->SetTitle("p_{t}^{D} (GeV/c)");
   hdeltaPhiDja->GetYaxis()->SetTitle("#Delta#phi (rad)");
-  // TH3F* hdeltaPhiDjl=new TH3F("hdeltaPhiDjl", Form("#Delta#phi D-jet (jet p_{T} < %.0f (GeV/c^{2}))",fJetPtThr),500,fMinMass,fMaxMass,100, 0.,30.,50,(-1)*TMath::Pi()/2.,3./2.*TMath::Pi());
-  // hdeltaPhiDjl->GetXaxis()->SetTitle("mass (GeV/c)");
-  // hdeltaPhiDjl->GetYaxis()->SetTitle("p_{t}^{D} (GeV/c^{2})");
+  // TH3F* hdeltaPhiDjl=new TH3F("hdeltaPhiDjl", Form("#Delta#phi D-jet (jet p_{T} < %.0f (GeV/c))",fJetPtThr),500,fMinMass,fMaxMass,100, 0.,30.,50,(-1)*TMath::Pi()/2.,3./2.*TMath::Pi());
+  // hdeltaPhiDjl->GetXaxis()->SetTitle("mass (GeV)");
+  // hdeltaPhiDjl->GetYaxis()->SetTitle("p_{t}^{D} (GeV/c)");
   // hdeltaPhiDjl->GetYaxis()->SetTitle("#Delta#phi (rad)");
-  // TH3F* hdeltaPhiDjh=new TH3F("hdeltaPhiDjh", Form("#Delta#phi D-jet (jet p_{T} > %.0f (GeV/c^{2}))",fJetPtThr),500,fMinMass,fMaxMass,100, 0.,30.,50,(-1)*TMath::Pi()/2.,3./2.*TMath::Pi());
+  // TH3F* hdeltaPhiDjh=new TH3F("hdeltaPhiDjh", Form("#Delta#phi D-jet (jet p_{T} > %.0f (GeV/c))",fJetPtThr),500,fMinMass,fMaxMass,100, 0.,30.,50,(-1)*TMath::Pi()/2.,3./2.*TMath::Pi());
   // hdeltaPhiDjh->GetXaxis()->SetTitle("mass (GeV/c)");
-  // hdeltaPhiDjh->GetYaxis()->SetTitle("p_{t}^{D} (GeV/c^{2})");
+  // hdeltaPhiDjh->GetYaxis()->SetTitle("p_{t}^{D} (GeV/c)");
   // hdeltaPhiDjh->GetYaxis()->SetTitle("#Delta#phi (rad)");
   fOutput->Add(hdeltaPhiDja);
   // fOutput->Add(hdeltaPhiDjl);
@@ -654,42 +651,42 @@ Bool_t  AliAnalysisTaskFlavourJetCorrelations::DefineHistoForAnalysis(){
   //background (side bands for the Dstar and like sign for D0)
 
   TH3F* hdeltaPhiDjaB=new TH3F("hdeltaPhiDjaB", "#Delta#phi D-jet (all jet p_{T})",nbinsmass,fMinMass,fMaxMass,100, 0.,30.,50,(-1)*TMath::Pi()/2.,3./2.*TMath::Pi());
-  hdeltaPhiDjaB->GetXaxis()->SetTitle("mass (GeV/c)");
+  hdeltaPhiDjaB->GetXaxis()->SetTitle("mass (GeV)");
   hdeltaPhiDjaB->GetYaxis()->SetTitle("p_{t}^{D} (GeV/c)");
   hdeltaPhiDjaB->GetYaxis()->SetTitle("#Delta#phi (rad)");
-  // TH3F* hdeltaPhiDjlB=new TH3F("hdeltaPhiDjlB", Form("#Delta#phi D-jet (jet p_{T} < %.0f (GeV/c^{2}))",fJetPtThr),1500,fMinMass,fMaxMass,100, 0.,30.,50,(-1)*TMath::Pi()/2.,3./2.*TMath::Pi());
-  // hdeltaPhiDjlB->GetXaxis()->SetTitle("mass (GeV/c)");
-  // hdeltaPhiDjlB->GetYaxis()->SetTitle("p_{t}^{D} (GeV/c^{2})");
+  // TH3F* hdeltaPhiDjlB=new TH3F("hdeltaPhiDjlB", Form("#Delta#phi D-jet (jet p_{T} < %.0f (GeV/c))",fJetPtThr),1500,fMinMass,fMaxMass,100, 0.,30.,50,(-1)*TMath::Pi()/2.,3./2.*TMath::Pi());
+  // hdeltaPhiDjlB->GetXaxis()->SetTitle("mass (GeV)");
+  // hdeltaPhiDjlB->GetYaxis()->SetTitle("p_{t}^{D} (GeV/c)");
   // hdeltaPhiDjlB->GetYaxis()->SetTitle("#Delta#phi (rad)");
-  // TH3F* hdeltaPhiDjhB=new TH3F("hdeltaPhiDjhB", Form("#Delta#phi D-jet (jet p_{T} > %.0f (GeV/c^{2}))",fJetPtThr),1500,fMinMass,fMaxMass,100, 0.,30.,50,(-1)*TMath::Pi()/2.,3./2.*TMath::Pi());
-  // hdeltaPhiDjhB->GetXaxis()->SetTitle("mass (GeV/c)");
-  // hdeltaPhiDjhB->GetYaxis()->SetTitle("p_{t}^{D} (GeV/c^{2})");
+  // TH3F* hdeltaPhiDjhB=new TH3F("hdeltaPhiDjhB", Form("#Delta#phi D-jet (jet p_{T} > %.0f (GeV/c))",fJetPtThr),1500,fMinMass,fMaxMass,100, 0.,30.,50,(-1)*TMath::Pi()/2.,3./2.*TMath::Pi());
+  // hdeltaPhiDjhB->GetXaxis()->SetTitle("mass (GeV)");
+  // hdeltaPhiDjhB->GetYaxis()->SetTitle("p_{t}^{D} (GeV/c)");
   // hdeltaPhiDjhB->GetYaxis()->SetTitle("#Delta#phi (rad)");
   fOutput->Add(hdeltaPhiDjaB);
   // fOutput->Add(hdeltaPhiDjlB);
   // fOutput->Add(hdeltaPhiDjhB);
 
-  TH2F* hInvMassptD = new TH2F("hInvMassptD","D (Delta R < 0.4) invariant mass distribution p_{T}^{j} > threshold",nbinsmass,fMinMass,fMaxMass,100,0.,50.);
+  TH2F* hInvMassptD = new TH2F("hInvMassptD",Form("D (Delta R < %f) invariant mass distribution p_{T}^{j} > threshold",fJetRadius),nbinsmass,fMinMass,fMaxMass,100,0.,50.);
   hInvMassptD->SetStats(kTRUE);
-  hInvMassptD->GetXaxis()->SetTitle("mass (GeV/c)");
+  hInvMassptD->GetXaxis()->SetTitle("mass (GeV)");
   hInvMassptD->GetYaxis()->SetTitle("p_{t}^{D} (GeV/c)");
 
   fOutput->Add(hInvMassptD);
-  // fMasspjDeltaR=new TH3F("fMasspjDeltaR","Mass vs p^{jet} vs #Delta R;Mass (Gev/c);p^{jet}(Gev/c^{2});#Delta R",1500,fMinMass,fMaxMass,100,0.,50.,100,0.,1.);
+  // fMasspjDeltaR=new TH3F("fMasspjDeltaR","Mass vs p^{jet} vs #Delta R;Mass (Gev/c);p^{jet}(Gev);#Delta R",1500,fMinMass,fMaxMass,100,0.,50.,100,0.,1.);
   // fMasspjDeltaR->SetStats(kFALSE);
   // fOutput->Add(fMasspjDeltaR);
 
-  TH3F* hzptD=new TH3F("hzptD","Fragmentation function (DeltaR < 0.4)",100,0.,1.2,nbinsmass,fMinMass,fMaxMass,100,0,50);
+  TH3F* hzptD=new TH3F("hzptD",Form("Fragmentation function (DeltaR < %f)",fJetRadius),100,0.,1.2,nbinsmass,fMinMass,fMaxMass,100,0,50);
   hzptD->SetStats(kTRUE);
   hzptD->GetXaxis()->SetTitle("z=p_{D} #cdot p_{j}/|p_{j}|^{2}");
-  hzptD->GetYaxis()->SetTitle("mass (GeV/c)");
+  hzptD->GetYaxis()->SetTitle("mass (GeV)");
   hzptD->GetZaxis()->SetTitle("p_{t}^{D} (GeV/c)");
   fOutput->Add(hzptD);
 
-  TH3F* hzptDB=new TH3F("hzptDB","Fragmentation function (DeltaR < 0.4) - Side Bands",100,0.,1.2,nbinsmass,fMinMass,fMaxMass,100,0.,50.);
+  TH3F* hzptDB=new TH3F("hzptDB",Form("Fragmentation function (DeltaR < %f) - Side Bands",fJetRadius),100,0.,1.2,nbinsmass,fMinMass,fMaxMass,100,0.,50.);
   hzptDB->SetStats(kTRUE);
   hzptDB->GetXaxis()->SetTitle("z=p_{D} #cdot p_{j}/|p_{j}|^{2}");
-  hzptDB->GetYaxis()->SetTitle("mass (GeV/c)");
+  hzptDB->GetYaxis()->SetTitle("mass (GeV)");
   hzptDB->GetZaxis()->SetTitle("p_{t}^{D} (GeV/c)");
   fOutput->Add(hzptDB);
   //TH1F* hResZ      = new TH1F("hResZ","Fragmentation function ",50,0,1);
@@ -697,8 +694,8 @@ Bool_t  AliAnalysisTaskFlavourJetCorrelations::DefineHistoForAnalysis(){
 
   //fOutput->Add(hResZ);
   //fOutput->Add(hResZBkg);
-
-
+  PostData(1, fOutput);
+  
   return kTRUE; 
 }
 
@@ -716,24 +713,22 @@ void AliAnalysisTaskFlavourJetCorrelations::FillHistogramsRecoJetCorr(AliAODReco
   hDeltaRD->Fill(deltaR); 
   TH1I* hstat=(TH1I*)fOutput->FindObject("hstat");
   hstat->Fill(4);
-  TH1F* hPtJetWithD=(TH1F*)fOutput->FindObject("hPtJetWithD");
-  hPtJetWithD->Fill(ptjet);
 
   if(fCandidateType==kD0toKpi) {
 
-    FillHistogramsD0JetCorr(candidate,deltaphi,z,ptD,deltaR, AODEvent());
+    FillHistogramsD0JetCorr(candidate,deltaphi,z,ptD,ptjet,deltaR, AODEvent());
 
   }
 
   if(fCandidateType==kDstartoKpipi) {
     AliAODRecoCascadeHF* dstar = (AliAODRecoCascadeHF*)candidate;
-    FillHistogramsDstarJetCorr(dstar,deltaphi,z,ptD,deltaR);
+    FillHistogramsDstarJetCorr(dstar,deltaphi,z,ptD,ptjet,deltaR);
 
   }
 
 }
 
-void AliAnalysisTaskFlavourJetCorrelations::FillHistogramsD0JetCorr(AliAODRecoDecayHF* candidate, Double_t dPhi, Double_t z, Double_t ptD, Double_t deltaR, AliAODEvent* aodEvent){
+void AliAnalysisTaskFlavourJetCorrelations::FillHistogramsD0JetCorr(AliAODRecoDecayHF* candidate, Double_t dPhi, Double_t z, Double_t ptD, Double_t ptj,Double_t deltaR, AliAODEvent* aodEvent){
   Double_t masses[2]={0.,0.};
   Int_t pdgdaughtersD0[2]={211,321};//pi,K 
   Int_t pdgdaughtersD0bar[2]={321,211};//K,pi 
@@ -741,27 +736,35 @@ void AliAnalysisTaskFlavourJetCorrelations::FillHistogramsD0JetCorr(AliAODRecoDe
   masses[0]=candidate->InvMass(fNProngs,(UInt_t*)pdgdaughtersD0); //D0
   masses[1]=candidate->InvMass(fNProngs,(UInt_t*)pdgdaughtersD0bar); //D0bar
   
+  TH2F* hPtJetWithD=(TH2F*)fOutput->FindObject("hPtJetWithD");
+
   Int_t isselected=fCuts->IsSelected(candidate,AliRDHFCuts::kAll,aodEvent);
   if(isselected==1 || isselected==3) {
+     
+     if(deltaR<fJetRadius) hPtJetWithD->Fill(ptj,masses[0]);
 
-    FillHistogramsD(masses[0],dPhi,z, ptD, deltaR);
+     FillHistograms(masses[0],dPhi,z, ptD, deltaR);
   }
   if(isselected>=2) {
+     if(deltaR<fJetRadius) hPtJetWithD->Fill(ptj,masses[1]);
 
-    FillHistogramsD(masses[1],dPhi,z, ptD, deltaR);
+     FillHistograms(masses[1],dPhi,z, ptD, deltaR);
   }
 
 }
 
-void AliAnalysisTaskFlavourJetCorrelations::FillHistogramsDstarJetCorr(AliAODRecoCascadeHF* dstar, Double_t dPhi, Double_t z, Double_t ptD, Double_t deltaR){
+void AliAnalysisTaskFlavourJetCorrelations::FillHistogramsDstarJetCorr(AliAODRecoCascadeHF* dstar, Double_t dPhi, Double_t z, Double_t ptD, Double_t ptj, Double_t deltaR){
   AliAODTrack *softpi = (AliAODTrack*)dstar->GetBachelor();
   Double_t deltamass= dstar->DeltaInvMass(); 
   Double_t massD0= dstar->InvMassD0();
 
   TH1F* hPtPion=(TH1F*)fOutput->FindObject("hPtPion");
   hPtPion->Fill(softpi->Pt());
-  FillHistogramsD(deltamass,dPhi,z, ptD, deltaR);
+  
+  TH2F* hPtJetWithD=(TH2F*)fOutput->FindObject("hPtJetWithD");
+  if(deltaR<fJetRadius) hPtJetWithD->Fill(ptj,deltamass);
+  
+  FillHistograms(deltamass,dPhi,z, ptD, deltaR);
   // evaluate side band background
   TH2F* hDiffSideBand=(TH2F*)fOutput->FindObject("hDiffSideBand");
 
@@ -769,29 +772,32 @@ void AliAnalysisTaskFlavourJetCorrelations::FillHistogramsDstarJetCorr(AliAODRec
 
   TH3F* hzptDB=(TH3F*)fOutput->FindObject("hzptDB");
 
+  TH1F* hPtJetWithDsb=(TH1F*)fOutput->FindObject("hPtJetWithDsb");
+
   Double_t mPDGD0=TDatabasePDG::Instance()->GetParticle(421)->Mass();
 
   Int_t bin = fCuts->PtBin(ptD);
   Float_t fourSigmal= mPDGD0-3.5*fSigmaD0[bin] , sixSigmal= mPDGD0-5.*fSigmaD0[bin];
   Float_t fourSigmar= mPDGD0+3.5*fSigmaD0[bin] , sixSigmar= mPDGD0+5.*fSigmaD0[bin];
 
-  if((massD0>sixSigmal && massD0<fourSigmal) || (massD0>fourSigmar && massD0<=sixSigmar)){  
+  if((massD0>sixSigmal && massD0<=fourSigmal) || (massD0>fourSigmar && massD0<=sixSigmar)){  
     hDiffSideBand->Fill(deltamass,ptD); // M(Kpipi)-M(Kpi) side band background    
     hdeltaPhiDjaB->Fill(deltamass,ptD,dPhi);
 
-    if(deltaR<0.4){  // evaluate in the near side      
-      hzptDB->Fill(z,deltamass,ptD);   
+    if(deltaR<fJetRadius){  // evaluate in the near side       
+      hzptDB->Fill(z,deltamass,ptD);
+      hPtJetWithDsb->Fill(ptj);
     }
-
+    
   }  //  SideBandBackground(dstar, dPhi, z, ptD, deltaR);
  
 }
 
-void AliAnalysisTaskFlavourJetCorrelations::FillHistogramsD(Double_t mass,Double_t dphi, Double_t z,Double_t ptD, Double_t deltaR){
+void AliAnalysisTaskFlavourJetCorrelations::FillHistograms(Double_t mass,Double_t dphi, Double_t z,Double_t ptD, Double_t deltaR){
   TH3F* hdeltaPhiDja=((TH3F*)fOutput->FindObject("hdeltaPhiDja"));
   hdeltaPhiDja->Fill(mass,ptD,dphi);
 
-  if(deltaR<0.4) {
+  if(deltaR<fJetRadius) {
     TH3F* hzptD=(TH3F*)fOutput->FindObject("hzptD");
     hzptD->Fill(z,mass,ptD);
 
@@ -831,7 +837,7 @@ void AliAnalysisTaskFlavourJetCorrelations::FillHistogramsD(Double_t mass,Double
 //     hDiffSideBand->Fill(deltaM,ptD); // M(Kpipi)-M(Kpi) side band background    
 //     hdeltaPhiDjaB->Fill(deltaM,ptD,dPhi);
 
-//     if(deltaR<0.4){  // evaluate in the near side   
+//     if(deltaR<fJetRadius){  // evaluate in the near side    
 //       hzptDB->Fill(Z(candDstar,jet),deltaM,ptD);    
 //     }
 
@@ -976,9 +982,9 @@ Bool_t AliAnalysisTaskFlavourJetCorrelations::FillMCDJetInfo(AliPicoTrack *jetTr
       
       Double_t z=Z(momjetpart,jet);
       
-      if(deltaRD<0.4) {
+      if(deltaRD<fJetRadius) {
        hstat->Fill(7);
-       //comment if you prefer to ask for DeltaR of the daughters < 0.4 and uncomment below
+       //comment if you prefer to ask for DeltaR of the daughters < fJetRadius and uncomment below
        fptDinjet04vsptjMC->Fill(ptD,ptjet);
        fzptDptj->Fill(z,ptD,ptjet);
       }
index 0b985c4..50aa9de 100644 (file)
@@ -1,6 +1,5 @@
 #ifndef ALIANALYSISTASKFLAVOURJETCORRELATIONS_H
 #define ALIANALYSISTASKFLAVOURJETCORRELATIONS_H
-// $Id$
 /**************************************************************************
  * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
  *                                                                        *
@@ -80,12 +79,11 @@ class AliAnalysisTaskFlavourJetCorrelations : public AliAnalysisTaskEmcalJet
 
   //Bool_t   FillMCDJetInfo(AliPicoTrack *jetTrk,AliEmcalJet* jet, TClonesArray *mcArray,Double_t ptjet);
   void FillHistogramsRecoJetCorr(AliAODRecoDecayHF* candidate, AliEmcalJet *jet);
-  void FillHistogramsD0JetCorr(AliAODRecoDecayHF* candidate, Double_t dPhi, Double_t z, Double_t ptD, Double_t deltaR, AliAODEvent* aodEvent);
+  void FillHistogramsD0JetCorr(AliAODRecoDecayHF* candidate, Double_t dPhi, Double_t z, Double_t ptD, Double_t ptj, Double_t deltaR, AliAODEvent* aodEvent);
 
-  void FillHistogramsDstarJetCorr(AliAODRecoCascadeHF* dstar, Double_t dPhi, Double_t z, Double_t ptD, Double_t deltaR);
-
-  void FillHistogramsD(Double_t mass,Double_t dphi, Double_t z,Double_t ptD, Double_t deltaR);
+  void FillHistogramsDstarJetCorr(AliAODRecoCascadeHF* dstar, Double_t dPhi, Double_t z, Double_t ptD, Double_t ptj,Double_t deltaR);
 
+  void FillHistograms(Double_t mass,Double_t dphi, Double_t z,Double_t ptD, Double_t deltaR);
  private:
   
   AliAnalysisTaskFlavourJetCorrelations(const AliAnalysisTaskFlavourJetCorrelations &source);
@@ -107,10 +105,10 @@ class AliAnalysisTaskFlavourJetCorrelations : public AliAnalysisTaskEmcalJet
   Int_t  fPDGmother;             // PDG code of D meson
   Int_t  fNProngs;               // number of prong of the decay channel  
   Int_t  fPDGdaughters[4];       // PDG codes of daughters
-  Float_t fSigmaD0[30];            //
+  Float_t fSigmaD0[30];          //
   TString fBranchName;           // AOD branch name
-  TList *fOutput;                  //! user output
-  AliRDHFCuts *fCuts;  // Cuts 
+  TList *fOutput;                //! user output
+  AliRDHFCuts *fCuts;            // Cuts 
 
   Double_t fMinMass;             // mass lower limit histogram
   Double_t fMaxMass;             // mass upper limit histogram
index 5299798..69474e1 100644 (file)
@@ -1,4 +1,3 @@
-// $Id$
 /**************************************************************************
  * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
  *                                                                        *
@@ -471,13 +470,11 @@ Bool_t AliAnalysisTaskSEDmesonsFilterCJ::DefineHistoForAnalysis()
 //
 
   // Statistics 
-  TH1I* hstat = new TH1I("hstat","Statistics",6,-0.5,5.5);
+  TH1I* hstat = new TH1I("hstat","Statistics",4,-0.5,3.5);
   hstat->GetXaxis()->SetBinLabel(1, "N ev anal");
   hstat->GetXaxis()->SetBinLabel(2, "N ev sel");
   hstat->GetXaxis()->SetBinLabel(3, "N cand");
   hstat->GetXaxis()->SetBinLabel(4, "N cand sel cuts");
-  hstat->GetXaxis()->SetBinLabel(5, "N jets");
-  hstat->GetXaxis()->SetBinLabel(6, "N cand in jet");
 /*if(fUseMCInfo) {
     hstat->GetXaxis()->SetBinLabel(7,"N D");
     hstat->GetXaxis()->SetBinLabel(8,"N D in jet");
index 05aa3b1..eaae3cc 100644 (file)
@@ -1,6 +1,5 @@
 #ifndef ALIANALYSISTASKSEDMESONSFILTERCJ_H
 #define ALIANALYSISTASKSEDMESONSFILTERCJ_H
-// $Id$
 /**************************************************************************
  * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
  *                                                                        *
@@ -86,7 +85,7 @@ class AliAnalysisTaskSEDmesonsFilterCJ : public AliAnalysisTaskSE
   TList  *fOutput;                 //! user output
 //TList *fOutputCandidates;        //! output of array of candidates (kExchange)
 
-  AliRDHFCuts *fCuts;              //! Cuts 
+  AliRDHFCuts *fCuts;              // Cuts 
   Double_t fMinMass;               //  mass lower limit histogram
   Double_t fMaxMass;               //  mass upper limit histogram
 
index bf5b418..cba20c0 100644 (file)
@@ -1,7 +1,5 @@
-// $Id$
-
 AliAnalysisTaskFlavourJetCorrelations *AddTaskFlavourJetCorrelations(
-  AliAnalysisTaskRecoJetCorrelations::ECandidateType cand = AliAnalysisTaskRecoJetCorrelations::kDstartoKpipi,
+  AliAnalysisTaskFlavourJetCorrelations::ECandidateType cand = AliAnalysisTaskFlavourJetCorrelations::kDstartoKpipi,
   TString filename = "DStartoKpipiCuts.root",
   Bool_t theMCon = kFALSE,
   TString jetArrname = "",
@@ -59,6 +57,7 @@ AliAnalysisTaskFlavourJetCorrelations *AddTaskFlavourJetCorrelations(
   task->SetTriggerOnLeadingJet(triggerOnLeadingJet);
 
   //jet settings
   task->SetJetRadius(R);
   task->SetJetPtCut(jptcut);
 
@@ -71,11 +70,13 @@ AliAnalysisTaskFlavourJetCorrelations *AddTaskFlavourJetCorrelations(
 
   Float_t minPhi = 0.;
   Float_t maxPhi = 2.*TMath::Pi();
-//if (acceptance==2) { /*80-180 degree*/ }
+  if (acceptance==2) { /*80-180 degree*/ }
   if (acceptance) task->SetJetPhiLimits(minPhi, maxPhi);
 
   //Float_t area=0.6*TMath::Pi()*R*R;
   task->SetJetAreaCut(areaCut);
+  
   mgr->AddTask(task);
 
   // Create and connect containers for input/output
@@ -83,25 +84,29 @@ AliAnalysisTaskFlavourJetCorrelations *AddTaskFlavourJetCorrelations(
   outputfile += ":PWG3_D2H_DEmcalJet";
   outputfile += suffix;
 
-  TString nameContainer0="histogramsCorrelations";
-  TString nameContainer1="cuts";
+  TString candname="DStar"; 
+  if(cand==0)  candname="D0";
 
-  nameContainer0 += suffix;
-  nameContainer1 += suffix;
+  TString nameContainer1="hCor";
+  TString nameContainer2="cutsJ";
 
+  nameContainer1 += candname;
+  nameContainer2 += candname;
+  
+  nameContainer1 += suffix;
+  nameContainer2 += suffix;
   // ------ input data ------
   AliAnalysisDataContainer *cinput0  = mgr->GetCommonInputContainer();
 
   // ----- output data -----
-
-  // output TH1I for event counting
-  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(nameContainer0, TList::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data());
-  AliAnalysisDataContainer *coutput2 = mgr->CreateContainer(nameContainer1, AliRDHFCuts::Class(),AliAnalysisManager::kOutputContainer, outputfile.Data());
+  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(nameContainer1, TList::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data());
+  AliAnalysisDataContainer *coutput2 = mgr->CreateContainer(nameContainer2, AliRDHFCuts::Class(),AliAnalysisManager::kOutputContainer, outputfile.Data());
 
   mgr->ConnectInput(task,0,mgr->GetCommonInputContainer());
   mgr->ConnectOutput(task,1,coutput1);
   mgr->ConnectOutput(task,2,coutput2);
 
+
   Printf("Input and Output connected to the manager");
   return task ;
 }
index b5f4e49..e1efec5 100644 (file)
@@ -1,7 +1,5 @@
-// $Id$
-
 AliAnalysisTaskSEDmesonsFilterCJ *AddTaskSEDmesonsFilterCJ(
-  AliAnalysisTaskSEDmesonsForJetCorrelations::ECandidateType cand = AliAnalysisTaskSEDmesonsForJetCorrelations::kDstartoKpipi,
+  AliAnalysisTaskSEDmesonsFilterCJ::ECandidateType cand = AliAnalysisTaskSEDmesonsFilterCJ::kDstartoKpipi,
   TString filename = "DStartoKpipiCuts.root",
   Bool_t theMCon = kFALSE,
   TString suffix = "")
@@ -50,6 +48,9 @@ AliAnalysisTaskSEDmesonsFilterCJ *AddTaskSEDmesonsFilterCJ(
   task->SetMC(theMCon); //D meson settings
   mgr->AddTask(task);
 
+  TString candname="DStar"; 
+  if(cand==0)  candname="D0";
+  
   // Create and connect containers for input/output
   TString outputfile = AliAnalysisManager::GetCommonFileName();
   outputfile += ":PWG3_D2H_DmesonsForJetCorrelations";
@@ -57,8 +58,11 @@ AliAnalysisTaskSEDmesonsFilterCJ *AddTaskSEDmesonsFilterCJ(
 
   TString nameContainer0="histograms";
   TString nameContainer1="cuts";
-//TString nameContainer2="DcandidatesSel";
+  //TString nameContainer2="DcandidatesSel";
 
+  nameContainer0 += candname;
+  nameContainer1 += candname;
+  
   nameContainer0 += suffix;
   nameContainer1 += suffix;
 //nameContainer2 += suffix;
@@ -68,7 +72,6 @@ AliAnalysisTaskSEDmesonsFilterCJ *AddTaskSEDmesonsFilterCJ(
   
   // ----- output data -----
   
-  // output TH1I for event counting
   AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(nameContainer0, TList::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data());
   AliAnalysisDataContainer *coutput2 = mgr->CreateContainer(nameContainer1, AliRDHFCuts::Class(),AliAnalysisManager::kOutputContainer, outputfile.Data());
 //AliAnalysisDataContainer *coutput3 = mgr->CreateContainer(nameContainer2, TList::Class(),AliAnalysisManager::kExchangeContainer, outputfile.Data());
index 664a775..5f84f74 100644 (file)
@@ -1,5 +1,3 @@
-// $Id$
-
 void AddTasksFlavourJet(const Int_t iCandType = 1 /*0 = D0, 1=Dstar...*/,
                        const TString sCutFile = "cutsHF/D0toKpiCutsppRecVtxNoPileupRejNoEMCAL.root",
                         const Double_t dJetPtCut   = 1.,
@@ -18,10 +16,15 @@ void AddTasksFlavourJet(const Int_t iCandType = 1 /*0 = D0, 1=Dstar...*/,
 
   const Int_t iJetAlgo = 1;
   const Int_t iJetType = 1;
-
+  /*
   const Int_t    nRadius = 3;
   const Double_t aRadius[] = {  0.2,   0.4,   0.6  };
   const TString  sRadius[] = { "R02", "R04", "R06" };
+  */
+  const Int_t    nRadius = 1;
+  const Double_t aRadius[] = {  0.4  };
+  const TString  sRadius[] = { "R04" };
+
 //=============================================================================
 
   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
@@ -51,9 +54,9 @@ void AddTasksFlavourJet(const Int_t iCandType = 1 /*0 = D0, 1=Dstar...*/,
   AliAnalysisTaskSE *taskRespPID = AddTaskPIDResponse(bIsMC);
 
   // -- D meson selection
-  gROOT->LoadMacro("AliAnalysisTaskSEDmesonsForJetCorrelations.cxx++g");
-  gROOT->LoadMacro("AddTaskDmesonsForJetCorrelations.C");
-  AliAnalysisTaskSEDmesonsForJetCorrelations *taskDmesonsFilter = AddTaskDmesonsForJetCorrelations(iCandType,sCutFile,bIsMC,sText);
+  gROOT->LoadMacro("AliAnalysisTaskSEDmesonsFilterCJ.cxx++g");
+  gROOT->LoadMacro("AddTaskSEDmesonsFilterCJ.C");
+  AliAnalysisTaskSEDmesonsFilterCJ *taskDmesonsFilter = AddTaskSEDmesonsFilterCJ(iCandType,sCutFile,bIsMC,sText);
 
   // EMCal framework
   // -- Physics selection task
@@ -72,17 +75,17 @@ void AddTasksFlavourJet(const Int_t iCandType = 1 /*0 = D0, 1=Dstar...*/,
   taskSetupEMCal->SelectCollisionCandidates(uTriggerMask);
 
   // Jet preparation
-  gROOT->LoadMacro("/data/Work/jets/testEMCalJetFramework/code/v4/AddTaskJetPreparation.C");
+  gROOT->LoadMacro("$ALICE_ROOT/PWGJE/EMCALJetTasks/macros/AddTaskJetPreparation.C");
   AddTaskJetPreparation(type,bIsMC,sRunPeriod);
 
-/*gROOT->LoadMacro("$ALICE_ROOT/PWG/EMCAL/macros/AddTaskEmcalPicoTrackMaker.C");
+  gROOT->LoadMacro("$ALICE_ROOT/PWG/EMCAL/macros/AddTaskEmcalPicoTrackMaker.C");
   AliEmcalPicoTrackMaker *taskPicoTrack = AddTaskEmcalPicoTrackMaker(sUsedTrks.Data(),sInputTrk.Data(),sRunPeriod.Data());
-  taskPicoTrack->SelectCollisionCandidates(uTriggerMask);*/
+  taskPicoTrack->SelectCollisionCandidates(uTriggerMask);
 
   gROOT->LoadMacro("$ALICE_ROOT/PWGJE/EMCALJetTasks/macros/AddTaskEmcalJet.C");
   gROOT->LoadMacro("$ALICE_ROOT/PWGJE/EMCALJetTasks/macros/AddTaskEmcalJetSample.C");
-  gROOT->LoadMacro("AliAnalysisTaskRecoJetCorrelations.cxx++g");
-  gROOT->LoadMacro("AddTaskRecoJetCorrelations.C");
+  gROOT->LoadMacro("AliAnalysisTaskFlavourJetCorrelations.cxx++g");
+  gROOT->LoadMacro("AddTaskFlavourJetCorrelations.C");
 
   for (Int_t i=0; i<nRadius; i++) {
     AliEmcalJetTask *taskFJ = AddTaskEmcalJet(sUsedTrks.Data(),sUsedClus.Data(),iJetAlgo,aRadius[i],iJetType);
@@ -100,9 +103,10 @@ void AddTasksFlavourJet(const Int_t iCandType = 1 /*0 = D0, 1=Dstar...*/,
                                                                                         dJetAreaCut);
 
     taskDmesonCJ->SetName(Form("AliAnalysisTaskSEEmcalJetDmesonsCJ_%s",sRadius[i].Data()));
-    taskDmesonCJ->SetForceBeamType(uBeamType);
+   taskDmesonCJ->SetForceBeamType(uBeamType);
     taskDmesonCJ->SetAnaType(uAnaType);
     taskDmesonCJ->SetLeadingHadronType(iLeading);
+
 //  taskDmesonCJ->SelectCollisionCandidates(uTriggerMask);
   }
 
index 9854028..944d34f 100644 (file)
@@ -1,5 +1,3 @@
-// $Id$
-
 // runEMCalJetAnalysis.C
 // =====================
 // This macro can be used to run a jet analysis within the EMCal Jet Framework.
@@ -34,7 +32,7 @@ void AnalysisTrainCorrJetsLocal (
          Bool_t         useGrid             = kTRUE,                      // local or grid
         TString localfilename = "file_aodlhc10d.txt",
          const char*    gridMode            = "test",                      // set the grid run mode (can be "full", "test", "offline", "submit" or "terminate")
-         const char*    pattern             = "*ESDs/pass2/AOD099/*AliAOD.root", //"*/*/AliAOD.root" "*ESDs/pass1/AOD106/*AliAOD.root",    // file pattern (here one can specify subdirs like passX etc.) (used on grid)
+         const char*    pattern             = "*ESDs/pass2/AOD135/*AliAOD.root", //"*/*/AliAOD.root" "*ESDs/pass1/AOD106/*AliAOD.root",    // file pattern (here one can specify subdirs like passX etc.) (used on grid)
          const char*    gridDir             = "/alice/data/2010/LHC10d",   // /alice/data/2011/LHC11d /alice/sim/2012/LHC12f2b   dir on alien, where the files live (used on grid)
          const char*    runNumbers          = /*126437*/" 126432 126425 126424 126422 126409 126408 126407 126406 126405 126404 126403 126359 126352 126351 126350 126285 126284 126283 126168 126167 126160 126158 126097 126090 126088 126082 126081 126078 126073 126008 126007 126004 125855 125851 125850 125849 125848 125847 125844 125843 125842 125633 125632 125630 125296 125134 125101 125100 125097 125085 125023 124751 122375 122374",             // considered run numbers (used on grid) /*LHC12g 188359 188362, LHC11a 146860 146859*/ /*LHC12f2b 158285 159582 */
         const Int_t nrunspermaster= 100,
@@ -46,8 +44,8 @@ void AnalysisTrainCorrJetsLocal (
          Bool_t         isMC                = kFALSE,                      // trigger, if MC handler should be used
 
          // Here you have to specify additional code files you want to use but that are not in aliroot
-         const char*    addCXXs             = "AliAnalysisTaskRecoJetCorrelations.cxx AliAnalysisTaskSEDmesonsForJetCorrelations.cxx",
-         const char*    addHs               = "AliAnalysisTaskRecoJetCorrelations.h AliAnalysisTaskSEDmesonsForJetCorrelations.h",
+         const char*    addCXXs             = "AliAnalysisTaskSEDmesonsFilterCJ.cxx AliAnalysisTaskFlavourJetCorrelations.cxx",
+         const char*    addHs               = "AliAnalysisTaskSEDmesonsFilterCJ.h AliAnalysisTaskFlavourJetCorrelations.h",
 
          // These two settings depend on the dataset and your quotas on the AliEN services
          Int_t          maxFilesPerWorker   = 20,
@@ -113,7 +111,7 @@ void AnalysisTrainCorrJetsLocal (
   if(!useGrid)
     cout << "Using " << localFiles.Data() << " as input file list.\n";
 
-  gROOT->LoadMacro("AddTasksCorrJets.C");
+  gROOT->LoadMacro("AddTasksFlavourJet.C");
   //List of arguments:
 
 // const Int_t iCandtype=1 /*0 = D0, 1=Dstar...*/,
@@ -127,7 +125,7 @@ void AnalysisTrainCorrJetsLocal (
 // const Bool_t bIsMC=kFALSE,
 // TString sText=""/*completes the name of the candidate task lists*/
 
-     AddTasksCorrJets(1,"/data/Work/jets/testEMCalJetFramework/CutFilesMB/DStartoKpipiCuts_new.root",10.,0.,1,runPeriod,0,pSel,isMC,"");
+  AddTasksFlavourJet(1,"/data/Work/jets/testEMCalJetFramework/CutFilesMB/DStartoKpipiCuts_new.root",10.,0.,1,runPeriod,0,pSel,isMC,"");
 
   // Set the physics selection for all given tasks
   TObjArray *toptasks = mgr->GetTasks();
@@ -259,7 +257,7 @@ void LoadLibs()
 
   // include paths
   gSystem->AddIncludePath("-Wno-deprecated");
-  gSystem->AddIncludePath("-I$ALICE_ROOT -I$ALICE_ROOT/include -I$ALICE_ROOT/EMCAL");
+  gSystem->AddIncludePath("-I$ALICE_ROOT -I$ALICE_ROOT/include -I$ALICE_ROOT/EMCAL -I$ALICE_ROOT/PWG/EMCAL -I$ALICE_ROOT/PWGJE/EMCALJetTasks");
   gSystem->AddIncludePath("-I$ALICE_ROOT/PWGDQ/dielectron -I$ALICE_ROOT/PWGHF/hfe");
   gSystem->AddIncludePath("-I$ALICE_ROOT/JETAN -I$ALICE_ROOT/JETAN/fastjet");
 }