move macros to macros/
authordainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 28 May 2010 12:02:16 +0000 (12:02 +0000)
committerdainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 28 May 2010 12:02:16 +0000 (12:02 +0000)
19 files changed:
PWG3/vertexingHF/AddTaskBkgLikeSignD0.C [deleted file]
PWG3/vertexingHF/AddTaskBkgLikeSignJPSI.C [deleted file]
PWG3/vertexingHF/AddTaskBtoJPSItoEle.C [deleted file]
PWG3/vertexingHF/AddTaskCFDStar.C [deleted file]
PWG3/vertexingHF/AddTaskCFMultiVarMultiStep.C [deleted file]
PWG3/vertexingHF/AddTaskCharmFraction.C [deleted file]
PWG3/vertexingHF/AddTaskCompareHF.C [deleted file]
PWG3/vertexingHF/AddTaskD0Mass.C [deleted file]
PWG3/vertexingHF/AddTaskDStarJets.C [deleted file]
PWG3/vertexingHF/AddTaskDStarSpectra.C [deleted file]
PWG3/vertexingHF/AddTaskDplus.C [deleted file]
PWG3/vertexingHF/AddTaskDs.C [deleted file]
PWG3/vertexingHF/AddTaskHFMixing.C [deleted file]
PWG3/vertexingHF/AddTaskJPSItoEle.C [deleted file]
PWG3/vertexingHF/AddTaskLambdac.C [deleted file]
PWG3/vertexingHF/AddTaskSelectHF.C [deleted file]
PWG3/vertexingHF/AddTaskVertexingHF.C [deleted file]
PWG3/vertexingHF/AliAODPidHF.h
PWG3/vertexingHF/ReadAODVertexingHF.C [deleted file]

diff --git a/PWG3/vertexingHF/AddTaskBkgLikeSignD0.C b/PWG3/vertexingHF/AddTaskBkgLikeSignD0.C
deleted file mode 100644 (file)
index 6df9bd0..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-AliAnalysisTaskSEBkgLikeSignD0 *AddTaskBkgLikeSignD0() 
-{
-  //
-  // Test macro for the AliAnalysisTaskSEBkgLikeSignD0 
-  // starting from AliAOD.root file with HF + Like Sign candidates.
-  // C.Di Giglio, carmelo.digiglio@ba.infn.it
-  //
-
-
-  // Get the pointer to the existing analysis manager via the static access method.
-  //==============================================================================
-  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-  if (!mgr) {
-    ::Error("AddTaskBkgLikeSignD0", "No analysis manager to connect to.");
-    return NULL;
-  }   
-
-  // Like-sign background analysis task    
-  AliAnalysisTaskSEBkgLikeSignD0 *lsD0Task = new AliAnalysisTaskSEBkgLikeSignD0("CmpLikeSignD0Analysis");
-  lsD0Task->SetDebugLevel(0);
-
-  mgr->AddTask(lsD0Task);
-
-  //
-  // Create containers for input/output
-  AliAnalysisDataContainer *cinputLSD0 = mgr->CreateContainer("cinputLikeSignD0",TChain::Class(), 
-                                                         AliAnalysisManager::kInputContainer);
-  TString outputfile = AliAnalysisManager::GetCommonFileName();
-  outputfile += ":PWG3_D2H_CmpLikeSignD0";
-  AliAnalysisDataContainer *coutput1LSD0 = mgr->CreateContainer("coutput1LikeSignD0",TList::Class(),
-                                                           AliAnalysisManager::kOutputContainer,
-                                                               outputfile.Data());
-  AliAnalysisDataContainer *coutput2LSD0 = mgr->CreateContainer("coutput2LikeSignD0",TH1F::Class(),
-                                                           AliAnalysisManager::kOutputContainer,
-                                                               outputfile.Data());
-
-  mgr->ConnectInput(lsD0Task,0,mgr->GetCommonInputContainer());
-  mgr->ConnectOutput(lsD0Task,1,coutput1LSD0);
-  mgr->ConnectOutput(lsD0Task,2,coutput2LSD0);
-
-  return lsD0Task;
-}
diff --git a/PWG3/vertexingHF/AddTaskBkgLikeSignJPSI.C b/PWG3/vertexingHF/AddTaskBkgLikeSignJPSI.C
deleted file mode 100644 (file)
index 4891eed..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-AliAnalysisTaskSEBkgLikeSignJPSI *AddTaskBkgLikeSignJPSI() 
-{
-  //
-  // Test macro for the AliAnalysisTaskSEBkgLikeSignJPSI
-  // starting from AliAOD.root file with HF + Like Sign candidates.
-  // C.Di Giglio, carmelo.digiglio@ba.infn.it
-  //
-
-
-  // Get the pointer to the existing analysis manager via the static access method.
-  //==============================================================================
-  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-  if (!mgr) {
-    ::Error("AddTaskBkgLikeSignJPSI", "No analysis manager to connect to.");
-    return NULL;
-  }   
-
-
-  // Like-sign background analysis task    
-  AliAnalysisTaskSEBkgLikeSignJPSI *lsTask = new AliAnalysisTaskSEBkgLikeSignJPSI("CmpLikeSignAnalysis");
-  lsTask->SetDebugLevel(0);
-
-  mgr->AddTask(lsTask);
-
-  //
-  // Create containers for input/output
-  AliAnalysisDataContainer *cinputLS = mgr->CreateContainer("cinputLikeSignJPSI",TChain::Class(), 
-                                                         AliAnalysisManager::kInputContainer);
-  TString outputfile = AliAnalysisManager::GetCommonFileName();
-  outputfile += ":PWG3_D2H_CmpLikesignJPSI";
-  AliAnalysisDataContainer *coutputLS = mgr->CreateContainer("coutputLikeSignJPSI",TList::Class(),
-                                                           AliAnalysisManager::kOutputContainer,
-                                                            outputfile.Data());
-
-  mgr->ConnectInput(lsTask,0,mgr->GetCommonInputContainer());
-  mgr->ConnectOutput(lsTask,1,coutputLS);
-
-
-  return lsTask;
-}
diff --git a/PWG3/vertexingHF/AddTaskBtoJPSItoEle.C b/PWG3/vertexingHF/AddTaskBtoJPSItoEle.C
deleted file mode 100644 (file)
index d475897..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-AliAnalysisTaskSEBtoJPSItoEle *AddTaskBtoJPSItoEle() 
-{
-  //
-  // Test macro for the AliAnalysisTaskSEBtoJPSItoEle 
-  // starting from AliAOD.root file with HF + Like Sign candidates.
-  // C.Di Giglio, carmelo.digiglio@ba.infn.it
-  //
-
-  // Get the pointer to the existing analysis manager via the static access method.
-  //==============================================================================
-  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-  if (!mgr) {
-    ::Error("AddTaskBtoJPSItoEle", "No analysis manager to connect to.");
-    return NULL;
-  }   
-
-  // Cdf unbinned log-likelihood fit analysis task    
-  AliAnalysisTaskSEBtoJPSItoEle *hfTask = new AliAnalysisTaskSEBtoJPSItoEle("CdfFitAnalysis");
-  hfTask->SetDebugLevel(0);
-
-  mgr->AddTask(hfTask);
-
-  //
-  // Create containers for input/output
-  mgr->ConnectInput(hfTask,0,mgr->GetCommonInputContainer());
-
-  AliAnalysisDataContainer *coutput = mgr->CreateContainer("coutputCdfFit",TList::Class(),
-                                                           AliAnalysisManager::kOutputContainer,       
-                                                          "CdfFit.root");
-  mgr->ConnectOutput(hfTask,1,coutput);
-
-  return hfTask;
-}
diff --git a/PWG3/vertexingHF/AddTaskCFDStar.C b/PWG3/vertexingHF/AddTaskCFDStar.C
deleted file mode 100644 (file)
index 4be370e..0000000
+++ /dev/null
@@ -1,382 +0,0 @@
-//DEFINITION OF A FEW CONSTANTS
-//
-// binning method from C.Zampolli
-//
-// general
-const Double_t ymin  = -2.1 ;
-const Double_t ymax  =  2.1 ;
-//soft pion
-const Double_t ptmin_0_1 =  0.0 ;
-const Double_t ptmax_0_1 =  1.0 ;
-const Double_t ptmin_1_2 =  1.0 ;
-const Double_t ptmax_1_2 =  2.0 ;
-const Double_t ptmin_2_10 =  2.0 ;
-const Double_t ptmax_2_10 =  15.0 ;
-//D0 and D0 prongs
-const Double_t ptmin_0_4 =  0.0 ;
-const Double_t ptmax_0_4 =  4.0 ;
-const Double_t ptmin_4_8 =  4.0 ;
-const Double_t ptmax_4_8 =  8.0 ;
-const Double_t ptmin_8_10 =  8.0 ;
-const Double_t ptmax_8_10 =  20.0 ;
-const Double_t cosmin = -1.05;
-const Double_t cosmax =  1.05;
-const Double_t cTmin = 0;  // micron
-const Double_t cTmax = 500;  // micron
-const Double_t dcamin = 0;  // micron
-const Double_t dcamax = 500;  // micron
-const Double_t d0min = -1000;  // micron
-const Double_t d0max = 1000;  // micron
-const Double_t d0xd0min = -100000;  // micron
-const Double_t d0xd0max = 100000;  // micron
-const Double_t phimin = 0.0;    
-const Int_t    mintrackrefsTPC = 2 ;
-const Int_t    mintrackrefsITS = 3 ;
-const Int_t    charge  = 1 ; 
-const Int_t    minclustersTPC = 50 ;
-// cuts
-const Double_t ptmin = 0.05;
-const Double_t ptmax = 9999.;
-const Double_t etamin = -0.9;
-const Double_t etamax = 0.9;
-const Double_t zmin = -15;
-const Double_t zmax = 15;
-const Int_t    minITSClusters = 3;
-const Int_t    minITSClustersSoft = 2;
-//----------------------------------------------------
-
-AliCFTaskForDStarAnalysis *AddTaskCFDStar()
-{
-
-       //CONTAINER DEFINITION
-       Info("AliCFTaskForDStarAnalysis","SETUP CONTAINER");
-       //the sensitive variables, their indices
-       UInt_t ipt = 0;
-       UInt_t iy  = 1;
-       UInt_t icosThetaStar  = 2;
-       UInt_t ipTpi  = 3;
-       UInt_t ipTD0  = 4;
-       UInt_t icT    = 5;
-       UInt_t idca   = 6;
-       UInt_t id0pi  = 7;
-       UInt_t id0K   = 8;
-       UInt_t id0xd0     = 9;
-       UInt_t ipointing  = 10;
-       UInt_t iphi  = 11;
-       UInt_t iz    = 12;
-        UInt_t ipTD0pi = 13;
-        UInt_t ipTD0K  = 14;
-
-       const Double_t phimax = 2*TMath::Pi();
-
-       //Setting up the container grid... 
-       UInt_t nstep = 8; //number of selection steps
-       const Int_t nvar   = 15 ; //number of variables on the grid:pt, y, cosThetaStar, pTpi, pTk, cT, dca, d0pi, d0K, d0xd0, cosPointingAngle, phi 
-       const Int_t nbin0_0_4   = 8 ; //bins in pt from 0 to 4 GeV
-       const Int_t nbin0_4_8   = 4 ; //bins in pt from 4 to 8 GeV
-       const Int_t nbin0_8_10  = 2 ; //bins in pt from 8 to 10 GeV
-       const Int_t nbin1  = 30 ; //bins in y
-       const Int_t nbin2  = 30 ; //bins in cosThetaStar 
-        // soft pion and D0 from D*
-       const Int_t nbin3_0_1  = 8 ; //bins in ptPi from 0 to 4 GeV
-       const Int_t nbin3_1_2  = 1 ; //bins in ptPi from 4 to 8 GeV
-       const Int_t nbin3_2_10 = 1 ; //bins in ptPi from 8 to 10 GeV
-       const Int_t nbin4_0_4  = 8 ; //bins in ptD0 from 0 to 4 GeV
-       const Int_t nbin4_4_8  = 3 ; //bins in ptD0 from 4 to 8 GeV
-       const Int_t nbin4_8_10 = 1 ; //bins in ptD0 from 8 to 10 GeV
-        // D0 prongs - cutting variables
-       const Int_t nbin5  = 20 ; //bins in cT
-       const Int_t nbin6  = 20 ; //bins in dca
-       const Int_t nbin7  = 100 ; //bins in d0pi
-       const Int_t nbin8  = 100 ; //bins in d0K
-       const Int_t nbin9  = 80 ; //bins in d0xd0
-       const Int_t nbin10  = 100 ; //bins in cosPointingAngle
-       const Int_t nbin11  = 15 ; //bins in Phi
-               const Int_t nbin12  = 60 ; //bins in z vertex
-        // D0 prongs pt and phi
-       const Int_t nbin5_0_4   = 8 ; //bins in ptPi from 0 to 4 GeV
-       const Int_t nbin5_4_8   = 4 ; //bins in ptPi from 4 to 8 GeV
-       const Int_t nbin5_8_10  = 8 ; //bins in ptPi from 8 to 10 GeV
-       const Int_t nbin6_0_4   = 8 ; //bins in ptk from 0 to 4 GeV
-       const Int_t nbin6_4_8   = 4 ; //bins in ptk from 4 to 8 GeV
-       const Int_t nbin6_8_10  = 8 ; //bins in ptk from 8 to 10 GeV
-        
-       //arrays for the number of bins in each dimension
-       Int_t iBin[nvar];
-
-       iBin[0]=nbin0_0_4+nbin0_4_8+nbin0_8_10;
-       iBin[1]=nbin1;
-       iBin[2]=nbin2;
-       iBin[3]=nbin3_0_1+nbin3_1_2+nbin3_2_10;
-       iBin[4]=nbin4_0_4+nbin4_4_8+nbin4_8_10;
-       iBin[5]=nbin5;
-       iBin[6]=nbin6;
-       iBin[7]=nbin7;
-       iBin[8]=nbin8;
-       iBin[9]=nbin9;
-       iBin[10]=nbin10;
-       iBin[11]=nbin11;
-       iBin[12]=nbin12;
-        iBin[13]=nbin5_0_4+nbin5_4_8+nbin5_8_10;
-       iBin[14]=nbin6_0_4+nbin6_4_8+nbin6_8_10;
-       
-       //arrays for lower bounds :
-       Double_t *binLim0 = new Double_t[iBin[0]+1];
-       Double_t *binLim1 = new Double_t[iBin[1]+1];
-       Double_t *binLim2 = new Double_t[iBin[2]+1];
-       Double_t *binLim3 = new Double_t[iBin[3]+1];
-       Double_t *binLim4 = new Double_t[iBin[4]+1];
-       Double_t *binLim5 = new Double_t[iBin[5]+1];
-       Double_t *binLim6 = new Double_t[iBin[6]+1];
-       Double_t *binLim7 = new Double_t[iBin[7]+1];
-       Double_t *binLim8 = new Double_t[iBin[8]+1];
-       Double_t *binLim9 = new Double_t[iBin[9]+1];
-       Double_t *binLim10 = new Double_t[iBin[10]+1];
-       Double_t *binLim11 = new Double_t[iBin[11]+1];
-       Double_t *binLim12 = new Double_t[iBin[12]+1];
-       Double_t *binLim13 = new Double_t[iBin[13]+1];
-       Double_t *binLim14 = new Double_t[iBin[14]+1];
-
-       // checking limits
-       if (ptmax_0_4 != ptmin_4_8) {
-               Error("AliCFTaskForDStarAnalysis","max lim 1st range != min lim 2nd range, please check!");
-       }
-       if (ptmax_4_8 != ptmin_8_10) {
-               Error("AliCFTaskForDStarAnalysis","max lim 2nd range != min lim 3rd range, please check!");
-       }
-
-       // values for bin lower bounds
-       // pt -----------------------------------------------------------------------------------------
-       for(Int_t i=0; i<=nbin0_0_4; i++) binLim0[i]=(Double_t)ptmin_0_4 + (ptmax_0_4-ptmin_0_4)/nbin0_0_4*(Double_t)i ; 
-       if (binLim0[nbin0_0_4] != ptmin_4_8)  {
-               Error("AliCFDStar","Calculated bin lim for pt - 1st range - differs from expected!\n");
-       }
-       for(Int_t i=0; i<=nbin0_4_8; i++) binLim0[i+nbin0_0_4]=(Double_t)ptmin_4_8 + (ptmax_4_8-ptmin_4_8)/nbin0_4_8*(Double_t)i ; 
-       if (binLim0[nbin0_0_4+nbin0_4_8] != ptmin_8_10)  {
-               Error("AliCFDStar","Calculated bin lim for pt - 2nd range - differs from expected!\n");
-       }
-       for(Int_t i=0; i<=nbin0_8_10; i++) binLim0[i+nbin0_0_4+nbin0_4_8]=(Double_t)ptmin_8_10 + (ptmax_8_10-ptmin_8_10)/nbin0_8_10*(Double_t)i ; 
-
-       // y -----------------------------------------------------------------------------------------
-       for(Int_t i=0; i<=nbin1; i++) binLim1[i]=(Double_t)ymin  + (ymax-ymin)  /nbin1*(Double_t)i ;
-
-       // cosThetaStar -----------------------------------------------------------------------------
-       for(Int_t i=0; i<=nbin2; i++) binLim2[i]=(Double_t)cosmin  + (cosmax-cosmin)  /nbin2*(Double_t)i ;
-
-       // Soft ptPi ---------------------------------------------------------------------------------
-       for(Int_t i=0; i<=nbin3_0_1; i++) binLim3[i]=(Double_t)ptmin_0_1 + (ptmax_0_1-ptmin_0_1)/nbin3_0_1*(Double_t)i ; 
-       if (binLim3[nbin3_0_1] != ptmin_1_2)  {
-               Error("AliCFDStar","Calculated bin lim for ptPi - 1st range - differs from expected!");
-       }
-       for(Int_t i=0; i<=nbin3_1_2; i++) binLim3[i+nbin3_0_1]=(Double_t)ptmin_1_2 + (ptmax_1_2-ptmin_1_2)/nbin3_1_2*(Double_t)i ; 
-       if (binLim3[nbin3_0_1+nbin3_1_2] != ptmin_2_10)  {
-               Error("AliCFDStar","Calculated bin lim for ptPi - 2nd range - differs from expected!\n");
-       }
-       for(Int_t i=0; i<=nbin3_2_10; i++) binLim3[i+nbin3_0_1+nbin3_1_2]=(Double_t)ptmin_2_10 + (ptmax_2_10-ptmin_2_10)/nbin3_2_10*(Double_t)i ; 
-
-       // ptD0 --------------------------------------------------------------------------------------
-       for(Int_t i=0; i<=nbin4_0_4; i++) binLim4[i]=(Double_t)ptmin_0_4 + (ptmax_0_4-ptmin_0_4)/nbin4_0_4*(Double_t)i ; 
-       if (binLim4[nbin4_0_4] != ptmin_4_8)  {
-               Error("AliCFDStar","Calculated bin lim for ptKa - 1st range - differs from expected!");
-       }
-       for(Int_t i=0; i<=nbin4_4_8; i++) binLim4[i+nbin4_0_4]=(Double_t)ptmin_4_8 + (ptmax_4_8-ptmin_4_8)/nbin4_4_8*(Double_t)i ; 
-       if (binLim4[nbin4_0_4+nbin4_4_8] != ptmin_8_10)  {
-               Error("AliCFDStar","Calculated bin lim for ptKa - 2nd range - differs from expected!\n");
-       }
-       for(Int_t i=0; i<=nbin4_8_10; i++) binLim4[i+nbin4_0_4+nbin4_4_8]=(Double_t)ptmin_8_10 + (ptmax_8_10-ptmin_8_10)/nbin4_8_10*(Double_t)i ; 
-        // D0 ptPi --------------------------------------------------------------------------------------------------------
-        for(Int_t i=0; i<=nbin5_0_4; i++) binLim13[i]=(Double_t)ptmin_0_4 + (ptmax_0_4-ptmin_0_4)/nbin5_0_4*(Double_t)i ; 
-        if (binLim13[nbin5_0_4] != ptmin_4_8)  {
-                Error("AliCFDStar","Calculated bin lim for ptPi - 1st range - differs from expected!");
-        }
-        for(Int_t i=0; i<=nbin5_4_8; i++) binLim13[i+nbin5_0_4]=(Double_t)ptmin_4_8 + (ptmax_4_8-ptmin_4_8)/nbin5_4_8*(Double_t)i ; 
-        if (binLim13[nbin5_0_4+nbin5_4_8] != ptmin_8_10)  {
-                Error("AliCFDStar","Calculated bin lim for ptPi - 2nd range - differs from expected!\n");
-        }
-        for(Int_t i=0; i<=nbin5_8_10; i++) binLim13[i+nbin5_0_4+nbin5_4_8]=(Double_t)ptmin_8_10 + (ptmax_8_10-ptmin_8_10)/nbin5_8_10*(Double_t)i ; 
-
-        // D0 ptK ----------------------------------------------------------------------------------------------------------
-        for(Int_t i=0; i<=nbin6_0_4; i++) binLim14[i]=(Double_t)ptmin_0_4 + (ptmax_0_4-ptmin_0_4)/nbin6_0_4*(Double_t)i ; 
-        if (binLim14[nbin6_0_4] != ptmin_4_8)  {
-                Error("AliCFDStar","Calculated bin lim for ptKa - 1st range - differs from expected!");
-        }
-        for(Int_t i=0; i<=nbin6_4_8; i++) binLim14[i+nbin6_0_4]=(Double_t)ptmin_4_8 + (ptmax_4_8-ptmin_4_8)/nbin6_4_8*(Double_t)i ; 
-        if (binLim14[nbin6_0_4+nbin6_4_8] != ptmin_8_10)  {
-                Error("AliCFDStar","Calculated bin lim for ptKa - 2nd range - differs from expected!\n");
-        }
-        for(Int_t i=0; i<=nbin6_8_10; i++) binLim14[i+nbin6_0_4+nbin6_4_8]=(Double_t)ptmin_8_10 + (ptmax_8_10-ptmin_8_10)/nbin6_8_10*(Double_t)i ; 
-
-       // cT ---------------------------------------------------------------------------------------------------------------
-       for(Int_t i=0; i<=nbin5; i++) binLim5[i]=(Double_t)cTmin  + (cTmax-cTmin)  /nbin5*(Double_t)i ;
-
-       // dca
-       for(Int_t i=0; i<=nbin6; i++) binLim6[i]=(Double_t)dcamin  + (dcamax-dcamin)  /nbin6*(Double_t)i ;
-
-       // d0pi
-       for(Int_t i=0; i<=nbin7; i++) binLim7[i]=(Double_t)d0min  + (d0max-d0min)  /nbin7*(Double_t)i ;
-
-       // d0K
-       for(Int_t i=0; i<=nbin8; i++) binLim8[i]=(Double_t)d0min  + (d0max-d0min)  /nbin8*(Double_t)i ;
-
-       // d0xd0
-       for(Int_t i=0; i<=nbin9; i++) binLim9[i]=(Double_t)d0xd0min  + (d0xd0max-d0xd0min)  /nbin9*(Double_t)i ;
-
-       // cosPointingAngle
-       for(Int_t i=0; i<=nbin10; i++) binLim10[i]=(Double_t)cosmin  + (cosmax-cosmin)  /nbin10*(Double_t)i ;
-
-       // Phi
-       for(Int_t i=0; i<=nbin11; i++) binLim11[i]=(Double_t)phimin  + (phimax-phimin)  /nbin11*(Double_t)i ;
-
-       // z Primary Vertex
-       for(Int_t i=0; i<=nbin12; i++) {
-               binLim12[i]=(Double_t)zmin  + (zmax-zmin)  /nbin12*(Double_t)i ;
-       }
-
-       //one "container" for MC
-       AliCFContainer* container = new AliCFContainer("container","container for tracks",nstep,nvar,iBin);
-       //setting the bin limits
-       container -> SetBinLimits(ipt,binLim0);
-       container -> SetBinLimits(iy,binLim1);
-       container -> SetBinLimits(icosThetaStar,binLim2);
-       container -> SetBinLimits(ipTpi,binLim3);
-       container -> SetBinLimits(ipTD0,binLim4);
-       container -> SetBinLimits(icT,binLim5);
-       container -> SetBinLimits(idca,binLim6);
-       container -> SetBinLimits(id0pi,binLim7);
-       container -> SetBinLimits(id0K,binLim8);
-       container -> SetBinLimits(id0xd0,binLim9);
-       container -> SetBinLimits(ipointing,binLim10);
-       container -> SetBinLimits(iphi,binLim11);
-       container -> SetBinLimits(iz,binLim12);
-       container -> SetBinLimits(ipTD0pi,binLim13);
-       container -> SetBinLimits(ipTD0K,binLim14);
-       
-       //CREATE THE  CUTS -----------------------------------------------
-       
-       // Gen-Level kinematic cuts
-       AliCFTrackKineCuts *mcKineCuts = new AliCFTrackKineCuts("mcKineCuts","MC-level kinematic cuts");
-       
-       //Particle-Level cuts:  
-       AliCFParticleGenCuts* mcGenCuts = new AliCFParticleGenCuts("mcGenCuts","MC particle generation cuts");
-       mcGenCuts->SetRequirePdgCode(413, kTRUE);  // kTRUE set in order to include D*_bar
-       mcGenCuts->SetAODMC(1); //special flag for reading MC in AOD tree (important)
-       
-       // Acceptance cuts:
-       AliCFAcceptanceCuts* accCuts = new AliCFAcceptanceCuts("accCuts", "Acceptance cuts");
-       AliCFTrackKineCuts *kineAccCuts = new AliCFTrackKineCuts("kineAccCuts","Kine-Acceptance cuts");
-       kineAccCuts->SetPtRange(ptmin,ptmax);
-       kineAccCuts->SetEtaRange(etamin,etamax);
-
-       // Rec-Level kinematic cuts
-       AliCFTrackKineCuts *recKineCuts = new AliCFTrackKineCuts("recKineCuts","rec-level kine cuts");
-       
-       AliCFTrackQualityCuts *recQualityCuts = new AliCFTrackQualityCuts("recQualityCuts","rec-level quality cuts");
-       
-       AliCFTrackIsPrimaryCuts *recIsPrimaryCuts = new AliCFTrackIsPrimaryCuts("recIsPrimaryCuts","rec-level isPrimary cuts");
-       
-       printf("CREATE MC KINE CUTS\n");
-       TObjArray* mcList = new TObjArray(0) ;
-       mcList->AddLast(mcKineCuts);
-       mcList->AddLast(mcGenCuts);
-       
-       printf("CREATE ACCEPTANCE CUTS\n");
-       TObjArray* accList = new TObjArray(0) ;
-       accList->AddLast(kineAccCuts);
-
-       printf("CREATE RECONSTRUCTION CUTS\n");
-       TObjArray* recList = new TObjArray(0) ;   // not used!! 
-       recList->AddLast(recKineCuts);
-       recList->AddLast(recQualityCuts);
-       recList->AddLast(recIsPrimaryCuts);
-       
-       TObjArray* emptyList = new TObjArray(0);
-
-       //CREATE THE INTERFACE TO CORRECTION FRAMEWORK USED IN THE TASK
-       printf("CREATE INTERFACE AND CUTS\n");
-       AliCFManager* man = new AliCFManager() ;
-
-       man->SetParticleContainer     (container);
-       man->SetParticleCutsList(0 , mcList); // MC
-       man->SetParticleCutsList(1 , accList); // Acceptance 
-       man->SetParticleCutsList(2 , emptyList); // Vertex 
-       man->SetParticleCutsList(3 , emptyList); // Refit 
-       man->SetParticleCutsList(4 , emptyList); // AOD
-       man->SetParticleCutsList(5 , emptyList); // AOD in Acceptance
-       man->SetParticleCutsList(6 , emptyList); // AOD with required n. of ITS clusters
-       man->SetParticleCutsList(7 , emptyList); // AOD Reco cuts
-       
-       // Get the pointer to the existing analysis manager via the static access method.
-       //==============================================================================
-       AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-       if (!mgr) {
-         ::Error("AddTaskCompareHF", "No analysis manager to connect to.");
-         return NULL;
-       }   
-       //CREATE THE TASK
-       printf("CREATE TASK\n");
-       // create the task
-       AliCFTaskForDStarAnalysis *task = new AliCFTaskForDStarAnalysis("AliCFTaskForDStarAnalysis");
-       task->SetMinITSClusters(minITSClusters);
-       task->SetMinITSClustersSoft(minITSClustersSoft);
-       task->SetCFManager(man); //here is set the CF manager
-       
-        Bool_t AcceptanceUnf = kTRUE; // unfold at acceptance level, otherwise D* cuts
-        Int_t thnDim[4];
-        
-        //first half  : reconstructed 
-        //second half : MC
-        thnDim[0] = iBin[0];
-        thnDim[2] = iBin[0];
-        thnDim[1] = iBin[1];
-        thnDim[3] = iBin[1];
-
-        THnSparseD* correlation = new THnSparseD("correlation","THnSparse with correlations",4,thnDim);
-        Double_t** binEdges = new Double_t[2];
-
-        // set bin limits
-
-        binEdges[0]= binLim0;
-        binEdges[1]= binLim1;
-
-        correlation->SetBinEdges(0,binEdges[0]);
-        correlation->SetBinEdges(2,binEdges[0]);
-
-        correlation->SetBinEdges(1,binEdges[1]);
-        correlation->SetBinEdges(3,binEdges[1]);
-
-        correlation->Sumw2();
-  
-        // correlation matrix ready
-        //------------------------------------------------//
-
-        task->SetCorrelationMatrix(correlation); // correlation matrix for unfolding
-       
-       // Create and connect containers for input/output
-       
-       // ------ input data ------
-       AliAnalysisDataContainer *cinput0  = mgr->GetCommonInputContainer();
-       
-       // ----- output data -----
-       
-       TString outputfile = AliAnalysisManager::GetCommonFileName();
-       outputfile += ":PWG3_D2H_CFtaskDStar";
-
-       //now comes user's output objects :
-       // output TH1I for event counting
-       AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("CFDSchist0", TH1I::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data());
-       // output Correction Framework Container (for acceptance & efficiency calculations)
-       AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("CFDSccontainer0", AliCFContainer::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data());
-       // Unfolding - correlation matrix
-        AliAnalysisDataContainer *coutput3 = mgr->CreateContainer("CFDScorr0", THnSparseD::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data());
-
-       mgr->AddTask(task);
-       
-       mgr->ConnectInput(task,0,mgr->GetCommonInputContainer());
-       mgr->ConnectOutput(task,1,coutput1);
-       mgr->ConnectOutput(task,2,coutput2);
-        mgr->ConnectOutput(task,3,coutput3);
-
-       return task;
-}
-
diff --git a/PWG3/vertexingHF/AddTaskCFMultiVarMultiStep.C b/PWG3/vertexingHF/AddTaskCFMultiVarMultiStep.C
deleted file mode 100644 (file)
index ad6f386..0000000
+++ /dev/null
@@ -1,428 +0,0 @@
-//DEFINITION OF A FEW CONSTANTS
-const Double_t ymin  = -2.1 ;
-const Double_t ymax  =  2.1 ;
-// const Double_t ptmin_0_4 =  0.0 ;
-// const Double_t ptmax_0_4 =  4.0 ;
-// const Double_t ptmin_4_8 =  4.0 ;
-// const Double_t ptmax_4_8 =  8.0 ;
-// const Double_t ptmin_8_10 =  8.0 ;
-// const Double_t ptmax_8_10 =  10.0 ;
-const Double_t cosmin = -1.05;
-const Double_t cosmax =  1.05;
-const Double_t cTmin = 0;  // micron
-const Double_t cTmax = 500;  // micron
-const Double_t dcamin = 0;  // micron
-const Double_t dcamax = 500;  // micron
-const Double_t d0min = -1000;  // micron
-const Double_t d0max = 1000;  // micron
-const Double_t d0xd0min = -100000;  // micron
-const Double_t d0xd0max = 100000;  // micron
-const Double_t phimin = 0.0;  
-//const Double_t phimax = 2Pi;  // defined in the macro!!!!!!!!!!!!!!  
-const Int_t    mintrackrefsTPC = 2 ;
-const Int_t    mintrackrefsITS = 3 ;
-const Int_t    charge  = 1 ;
-const Int_t    PDG = 421; 
-const Int_t    minclustersTPC = 50 ;
-// cuts
-const Double_t ptmin = 0.1;
-const Double_t ptmax = 9999.;
-const Double_t etamin = -0.9;
-const Double_t etamax = 0.9;
-const Double_t zmin = -15;
-const Double_t zmax = 15;
-const Int_t    minITSClusters = 5;
-
-//----------------------------------------------------
-
-AliCFHeavyFlavourTaskMultiVarMultiStep *AddTaskCFMultiVarMultiStep(Bool_t isKeepD0fromB=kFALSE)
-{
-
-  Double_t ptmin_0_4;
-  Double_t ptmax_0_4;
-  Double_t ptmin_4_8;
-  Double_t ptmax_4_8;
-  Double_t ptmin_8_10;
-  Double_t ptmax_8_10;
-
-  if(!isKeepD0fromB){
-    ptmin_0_4 =  0.0 ;
-    ptmax_0_4 =  4.0 ;
-    ptmin_4_8 =  4.0 ;
-    ptmax_4_8 =  8.0 ;
-    ptmin_8_10 =  8.0 ;
-    ptmax_8_10 =  10.0 ;
-  } else{
-    ptmin_0_4 =  0.0 ;
-    ptmax_0_4 =  3.0 ;
-    ptmin_4_8 =  3.0 ;
-    ptmax_4_8 =  5.0 ;
-    ptmin_8_10 =  5.0 ;
-    ptmax_8_10 =  10.0 ;
-  }
-
-
-
-       //CONTAINER DEFINITION
-       Info("AliCFHeavyFlavourTaskMultiVarMultiStep","SETUP CONTAINER");
-       //the sensitive variables, their indices
-       UInt_t ipt = 0;
-       UInt_t iy  = 1;
-       UInt_t icosThetaStar  = 2;
-       UInt_t ipTpi  = 3;
-       UInt_t ipTk  = 4;
-       UInt_t icT  = 5;
-       UInt_t idca  = 6;
-       UInt_t id0pi  = 7;
-       UInt_t id0K  = 8;
-       UInt_t id0xd0  = 9;
-       UInt_t ipointing  = 10;
-       UInt_t iphi  = 11;
-       UInt_t iz  = 12;
-
-       const Double_t phimax = 2*TMath::Pi();
-
-       //Setting up the container grid... 
-       UInt_t nstep = 8; //number of selection steps: MC, Acceptance, Vertex, Refit, Reco (no cuts), RecoAcceptance, RecoITSClusters (RecoAcceptance included), RecoPPR (RecoAcceptance+RecoITSCluster included) 
-       const Int_t nvar   = 13 ; //number of variables on the grid:pt, y, cosThetaStar, pTpi, pTk, cT, dca, d0pi, d0K, d0xd0, cosPointingAngle, phi 
-//     const Int_t nbin0_0_4  = 8 ; //bins in pt from 0 to 4 GeV
-//     const Int_t nbin0_4_8  = 4 ; //bins in pt from 4 to 8 GeV
-//     const Int_t nbin0_8_10  = 1 ; //bins in pt from 8 to 10 GeV
-
-       Int_t nbin0_0_4;
-       Int_t nbin0_4_8;
-       Int_t nbin0_8_10;
-       if (!isKeepD0fromB){
-         nbin0_0_4  = 8 ; //bins in pt from 0 to 4 GeV
-         nbin0_4_8  = 4 ; //bins in pt from 4 to 8 GeV
-         nbin0_8_10  = 1 ; //bins in pt from 8 to 10 GeV
-       }else{
-         nbin0_0_4  = 3 ; //bins in pt from 0 to 3 GeV
-         nbin0_4_8  = 1 ; //bins in pt from 3 to 5 GeV
-         nbin0_8_10  = 1 ; //bins in pt from 5 to 10 GeV
-       }
-
-       const Int_t nbin1  = 42 ; //bins in y
-       const Int_t nbin2  = 42 ; //bins in cosThetaStar 
-       const Int_t nbin3_0_4  = 8 ; //bins in ptPi from 0 to 4 GeV
-       const Int_t nbin3_4_8  = 4 ; //bins in ptPi from 4 to 8 GeV
-       const Int_t nbin3_8_10  = 1 ; //bins in ptPi from 8 to 10 GeV
-       const Int_t nbin4_0_4  = 8 ; //bins in ptKa from 0 to 4 GeV
-       const Int_t nbin4_4_8  = 4 ; //bins in ptKa from 4 to 8 GeV
-       const Int_t nbin4_8_10  = 1 ; //bins in ptKa from 8 to 10 GeV
-       const Int_t nbin5  = 24 ; //bins in cT
-       const Int_t nbin6  = 24 ; //bins in dca
-       const Int_t nbin7  = 100 ; //bins in d0pi
-       const Int_t nbin8  = 100 ; //bins in d0K
-       const Int_t nbin9  = 80 ; //bins in d0xd0
-       const Int_t nbin10  = 1050 ; //bins in cosPointingAngle
-       const Int_t nbin11  = 20 ; //bins in Phi
-       const Int_t nbin12  = 60 ; //bins in z vertex
-
-       //arrays for the number of bins in each dimension
-       Int_t iBin[nvar];
-       iBin[0]=nbin0_0_4+nbin0_4_8+nbin0_8_10;
-       iBin[1]=nbin1;
-       iBin[2]=nbin2;
-       iBin[3]=nbin3_0_4+nbin3_4_8+nbin3_8_10;
-       iBin[4]=nbin4_0_4+nbin4_4_8+nbin4_8_10;
-       iBin[5]=nbin5;
-       iBin[6]=nbin6;
-       iBin[7]=nbin7;
-       iBin[8]=nbin8;
-       iBin[9]=nbin9;
-       iBin[10]=nbin10;
-       iBin[11]=nbin11;
-       iBin[12]=nbin12;
-       
-       //arrays for lower bounds :
-       Double_t *binLim0=new Double_t[iBin[0]+1];
-       Double_t *binLim1=new Double_t[iBin[1]+1];
-       Double_t *binLim2=new Double_t[iBin[2]+1];
-       Double_t *binLim3=new Double_t[iBin[3]+1];
-       Double_t *binLim4=new Double_t[iBin[4]+1];
-       Double_t *binLim5=new Double_t[iBin[5]+1];
-       Double_t *binLim6=new Double_t[iBin[6]+1];
-       Double_t *binLim7=new Double_t[iBin[7]+1];
-       Double_t *binLim8=new Double_t[iBin[8]+1];
-       Double_t *binLim9=new Double_t[iBin[9]+1];
-       Double_t *binLim10=new Double_t[iBin[10]+1];
-       Double_t *binLim11=new Double_t[iBin[11]+1];
-       Double_t *binLim12=new Double_t[iBin[12]+1];
-
-       // checking limits
-       if (ptmax_0_4 != ptmin_4_8) {
-               Error("AliCFHeavyFlavourTaskMultiVarMultiStep","max lim 1st range != min lim 2nd range, please check!");
-       }
-       if (ptmax_4_8 != ptmin_8_10) {
-               Error("AliCFHeavyFlavourTaskMultiVarMultiStep","max lim 2nd range != min lim 3rd range, please check!");
-       }
-
-       // values for bin lower bounds
-       // pt
-       for(Int_t i=0; i<=nbin0_0_4; i++) binLim0[i]=(Double_t)ptmin_0_4 + (ptmax_0_4-ptmin_0_4)/nbin0_0_4*(Double_t)i ; 
-       if (binLim0[nbin0_0_4] != ptmin_4_8)  {
-               Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 1st range - differs from expected!\n");
-       }
-       for(Int_t i=0; i<=nbin0_4_8; i++) binLim0[i+nbin0_0_4]=(Double_t)ptmin_4_8 + (ptmax_4_8-ptmin_4_8)/nbin0_4_8*(Double_t)i ; 
-       if (binLim0[nbin0_0_4+nbin0_4_8] != ptmin_8_10)  {
-               Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 2nd range - differs from expected!\n");
-       }
-       for(Int_t i=0; i<=nbin0_8_10; i++) binLim0[i+nbin0_0_4+nbin0_4_8]=(Double_t)ptmin_8_10 + (ptmax_8_10-ptmin_8_10)/nbin0_8_10*(Double_t)i ; 
-
-       // y
-       for(Int_t i=0; i<=nbin1; i++) binLim1[i]=(Double_t)ymin  + (ymax-ymin)  /nbin1*(Double_t)i ;
-
-       // cosThetaStar
-       for(Int_t i=0; i<=nbin2; i++) binLim2[i]=(Double_t)cosmin  + (cosmax-cosmin)  /nbin2*(Double_t)i ;
-
-       // ptPi
-       for(Int_t i=0; i<=nbin3_0_4; i++) binLim3[i]=(Double_t)ptmin_0_4 + (ptmax_0_4-ptmin_0_4)/nbin3_0_4*(Double_t)i ; 
-       if (binLim3[nbin3_0_4] != ptmin_4_8)  {
-               Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for ptPi - 1st range - differs from expected!");
-       }
-       for(Int_t i=0; i<=nbin3_4_8; i++) binLim3[i+nbin3_0_4]=(Double_t)ptmin_4_8 + (ptmax_4_8-ptmin_4_8)/nbin3_4_8*(Double_t)i ; 
-       if (binLim3[nbin3_0_4+nbin3_4_8] != ptmin_8_10)  {
-               Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for ptPi - 2nd range - differs from expected!\n");
-       }
-       for(Int_t i=0; i<=nbin3_8_10; i++) binLim3[i+nbin3_0_4+nbin3_4_8]=(Double_t)ptmin_8_10 + (ptmax_8_10-ptmin_8_10)/nbin3_8_10*(Double_t)i ; 
-
-       // ptKa
-       for(Int_t i=0; i<=nbin4_0_4; i++) binLim4[i]=(Double_t)ptmin_0_4 + (ptmax_0_4-ptmin_0_4)/nbin4_0_4*(Double_t)i ; 
-       if (binLim4[nbin4_0_4] != ptmin_4_8)  {
-               Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for ptKa - 1st range - differs from expected!");
-       }
-       for(Int_t i=0; i<=nbin4_4_8; i++) binLim4[i+nbin4_0_4]=(Double_t)ptmin_4_8 + (ptmax_4_8-ptmin_4_8)/nbin4_4_8*(Double_t)i ; 
-       if (binLim4[nbin4_0_4+nbin4_4_8] != ptmin_8_10)  {
-               Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for ptKa - 2nd range - differs from expected!\n");
-       }
-       for(Int_t i=0; i<=nbin4_8_10; i++) binLim4[i+nbin4_0_4+nbin4_4_8]=(Double_t)ptmin_8_10 + (ptmax_8_10-ptmin_8_10)/nbin4_8_10*(Double_t)i ; 
-
-       // cT
-       for(Int_t i=0; i<=nbin5; i++) binLim5[i]=(Double_t)cTmin  + (cTmax-cTmin)  /nbin5*(Double_t)i ;
-
-       // dca
-       for(Int_t i=0; i<=nbin6; i++) binLim6[i]=(Double_t)dcamin  + (dcamax-dcamin)  /nbin6*(Double_t)i ;
-
-       // d0pi
-       for(Int_t i=0; i<=nbin7; i++) binLim7[i]=(Double_t)d0min  + (d0max-d0min)  /nbin7*(Double_t)i ;
-
-       // d0K
-       for(Int_t i=0; i<=nbin8; i++) binLim8[i]=(Double_t)d0min  + (d0max-d0min)  /nbin8*(Double_t)i ;
-
-       // d0xd0
-       for(Int_t i=0; i<=nbin9; i++) binLim9[i]=(Double_t)d0xd0min  + (d0xd0max-d0xd0min)  /nbin9*(Double_t)i ;
-
-       // cosPointingAngle
-       for(Int_t i=0; i<=nbin10; i++) binLim10[i]=(Double_t)cosmin  + (cosmax-cosmin)  /nbin10*(Double_t)i ;
-
-       // Phi
-       for(Int_t i=0; i<=nbin11; i++) binLim11[i]=(Double_t)phimin  + (phimax-phimin)  /nbin11*(Double_t)i ;
-
-       // z Primary Vertex
-       for(Int_t i=0; i<=nbin12; i++) {
-               binLim12[i]=(Double_t)zmin  + (zmax-zmin)  /nbin12*(Double_t)i ;
-               //              Info("AliCFHeavyFlavourTaskMultiVarMultiStep",Form("i-th bin, lower limit = %f", binLim12[i]));
-       }
-
-       // debugging printings
-       //Info("AliCFHeavyFlavourTaskMultiVarMultiStep","Printing lower limits for bins in pt");
-       //for (Int_t i =0; i<= iBin[0]; i++){
-       //      Info("AliCFHeavyFlavourTaskMultiVarMultiStep",Form("i-th bin, lower limit = %f", binLim0[i]));
-       //}
-       //Info("Printing lower limits for bins in ptPi");
-       //for (Int_t i =0; i<= iBin[3]; i++){
-       //      Info("AliCFHeavyFlavourTaskMultiVarMultiStep",Form("i-th bin, lower limit = %f", binLim3[i]));
-       //}
-       //Info("Printing lower limits for bins in ptKa");
-       //for (Int_t i =0; i<= iBin[4]; i++){
-       //      Info("AliCFHeavyFlavourTaskMultiVarMultiStep",Form("i-th bin, lower limit = %f", binLim4[i]));
-       //      }
-
-       //one "container" for MC
-       AliCFContainer* container = new AliCFContainer("container","container for tracks",nstep,nvar,iBin);
-       //setting the bin limits
-       container -> SetBinLimits(ipt,binLim0);
-       container -> SetBinLimits(iy,binLim1);
-       container -> SetBinLimits(icosThetaStar,binLim2);
-       container -> SetBinLimits(ipTpi,binLim3);
-       container -> SetBinLimits(ipTk,binLim4);
-       container -> SetBinLimits(icT,binLim5);
-       container -> SetBinLimits(idca,binLim6);
-       container -> SetBinLimits(id0pi,binLim7);
-       container -> SetBinLimits(id0K,binLim8);
-       container -> SetBinLimits(id0xd0,binLim9);
-       container -> SetBinLimits(ipointing,binLim10);
-       container -> SetBinLimits(iphi,binLim11);
-       container -> SetBinLimits(iz,binLim12);
-       
-       container -> SetStepTitle(0, "MC");
-        container -> SetStepTitle(1, "MCAcc");
-        container -> SetStepTitle(2, "RecoVertex");
-        container -> SetStepTitle(3, "RecoRefit");
-        container -> SetStepTitle(4, "Reco");
-        container -> SetStepTitle(5, "RecoAcc");
-       container -> SetStepTitle(6, "RecoITSCluster");
-       container -> SetStepTitle(7, "RecoCuts");
-
-        container -> SetVarTitle(ipt,"pt");
-       container -> SetVarTitle(iy,"y");
-        container -> SetVarTitle(icosThetaStar, "cosThetaStar");
-        container -> SetVarTitle(ipTpi, "ptpi");
-       container -> SetVarTitle(ipTk, "ptK");
-        container -> SetVarTitle(icT, "ct");
-        container -> SetVarTitle(idca, "dca");
-        container -> SetVarTitle(id0pi, "d0pi");
-        container -> SetVarTitle(id0K, "d0K");
-       container -> SetVarTitle(id0xd0, "d0xd0");
-       container -> SetVarTitle(ipointing, "piointing");
-       container -> SetVarTitle(iphi, "phi");
-       container -> SetVarTitle(iz, "z");
-
-
-       //CREATE THE  CUTS -----------------------------------------------
-       
-       // Gen-Level kinematic cuts
-       AliCFTrackKineCuts *mcKineCuts = new AliCFTrackKineCuts("mcKineCuts","MC-level kinematic cuts");
-       
-       //Particle-Level cuts:  
-       AliCFParticleGenCuts* mcGenCuts = new AliCFParticleGenCuts("mcGenCuts","MC particle generation cuts");
-       mcGenCuts->SetRequirePdgCode(PDG, kTRUE);  // kTRUE set in order to include D0_bar
-       mcGenCuts->SetAODMC(1); //special flag for reading MC in AOD tree (important)
-       
-       // Acceptance cuts:
-       AliCFAcceptanceCuts* accCuts = new AliCFAcceptanceCuts("accCuts", "Acceptance cuts");
-       AliCFTrackKineCuts *kineAccCuts = new AliCFTrackKineCuts("kineAccCuts","Kine-Acceptance cuts");
-       kineAccCuts->SetPtRange(ptmin,ptmax);
-       kineAccCuts->SetEtaRange(etamin,etamax);
-
-       // Rec-Level kinematic cuts
-       AliCFTrackKineCuts *recKineCuts = new AliCFTrackKineCuts("recKineCuts","rec-level kine cuts");
-       
-       AliCFTrackQualityCuts *recQualityCuts = new AliCFTrackQualityCuts("recQualityCuts","rec-level quality cuts");
-       
-       AliCFTrackIsPrimaryCuts *recIsPrimaryCuts = new AliCFTrackIsPrimaryCuts("recIsPrimaryCuts","rec-level isPrimary cuts");
-       
-       printf("CREATE MC KINE CUTS\n");
-       TObjArray* mcList = new TObjArray(0) ;
-       mcList->AddLast(mcKineCuts);
-       mcList->AddLast(mcGenCuts);
-       
-       printf("CREATE ACCEPTANCE CUTS\n");
-       TObjArray* accList = new TObjArray(0) ;
-       accList->AddLast(kineAccCuts);
-
-       printf("CREATE RECONSTRUCTION CUTS\n");
-       TObjArray* recList = new TObjArray(0) ;   // not used!! 
-       recList->AddLast(recKineCuts);
-       recList->AddLast(recQualityCuts);
-       recList->AddLast(recIsPrimaryCuts);
-       
-       TObjArray* emptyList = new TObjArray(0);
-
-       //CREATE THE INTERFACE TO CORRECTION FRAMEWORK USED IN THE TASK
-       printf("CREATE INTERFACE AND CUTS\n");
-       AliCFManager* man = new AliCFManager() ;
-       man->SetParticleContainer     (container);
-       man->SetParticleCutsList(0 , mcList); // MC
-       man->SetParticleCutsList(1 , accList); // Acceptance 
-       man->SetParticleCutsList(2 , emptyList); // Vertex 
-       man->SetParticleCutsList(3 , emptyList); // Refit 
-       man->SetParticleCutsList(4 , emptyList); // AOD
-       man->SetParticleCutsList(5 , emptyList); // AOD in Acceptance
-       man->SetParticleCutsList(6 , emptyList); // AOD with required n. of ITS clusters
-       man->SetParticleCutsList(7 , emptyList); // AOD Reco (PPR cuts implemented in Task)
-       
-       // Get the pointer to the existing analysis manager via the static access method.
-       //==============================================================================
-       AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-       if (!mgr) {
-         ::Error("AddTaskCompareHF", "No analysis manager to connect to.");
-         return NULL;
-       }   
-       //CREATE THE TASK
-       printf("CREATE TASK\n");
-       // create the task
-       AliCFHeavyFlavourTaskMultiVarMultiStep *task = new AliCFHeavyFlavourTaskMultiVarMultiStep("AliCFHeavyFlavourTaskMultiVarMultiStep");
-       task->SetFillFromGenerated(kFALSE);
-       task->SetMinITSClusters(minITSClusters);
-       task->SetCFManager(man); //here is set the CF manager
-       task->SetKeepD0fromB(isKeepD0fromB);
-       
-        //-----------------------------------------------------------//
-        //   create correlation matrix for unfolding - only eta-pt   //
-        //-----------------------------------------------------------//
-
-        Bool_t AcceptanceUnf = kTRUE; // unfold at acceptance level, otherwise PPR
-
-        Int_t thnDim[4];
-        
-        //first half  : reconstructed 
-        //second half : MC
-
-        thnDim[0] = iBin[0];
-        thnDim[2] = iBin[0];
-        thnDim[1] = iBin[1];
-        thnDim[3] = iBin[1];
-
-        THnSparseD* correlation = new THnSparseD("correlation","THnSparse with correlations",4,thnDim);
-        Double_t** binEdges = new Double_t[2];
-
-        // set bin limits
-
-        binEdges[0]= binLim0;
-        binEdges[1]= binLim1;
-
-        correlation->SetBinEdges(0,binEdges[0]);
-        correlation->SetBinEdges(2,binEdges[0]);
-
-        correlation->SetBinEdges(1,binEdges[1]);
-        correlation->SetBinEdges(3,binEdges[1]);
-
-        correlation->Sumw2();
-  
-        // correlation matrix ready
-        //------------------------------------------------//
-
-        task->SetCorrelationMatrix(correlation); // correlation matrix for unfolding
-       
-       // Create and connect containers for input/output
-       
-       // ------ input data ------
-       AliAnalysisDataContainer *cinput0  = mgr->GetCommonInputContainer();
-       
-       // ----- output data -----
-       
-       TString outputfile = AliAnalysisManager::GetCommonFileName();
-       TString output1name="", output2name="", output3name="";
-       if(!isKeepD0fromB) {
-         outputfile += ":PWG3_D2H_CFtaskD0toKpi";
-         output1name="CFHFchist0";
-         output2name="CFHFccontainer0";
-         output3name="CFHFcorr0";
-       }
-       else  {
-         outputfile += ":PWG3_D2H_CFtaskD0toKpiKeepD0fromB";
-         output1name="CFHFchist0allD0";
-         output2name="CFHFccontainer0allD0";
-         output3name="CFHFcorr0allD0";
-
-       }
-
-       //now comes user's output objects :
-       // output TH1I for event counting
-       AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(output1name, TH1I::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data());
-       // output Correction Framework Container (for acceptance & efficiency calculations)
-       AliAnalysisDataContainer *coutput2 = mgr->CreateContainer(output2name, AliCFContainer::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data());
-       // Unfolding - correlation matrix
-        AliAnalysisDataContainer *coutput3 = mgr->CreateContainer(output3name, THnSparseD::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data());
-
-       mgr->AddTask(task);
-       
-       mgr->ConnectInput(task,0,mgr->GetCommonInputContainer());
-       mgr->ConnectOutput(task,1,coutput1);
-       mgr->ConnectOutput(task,2,coutput2);
-        mgr->ConnectOutput(task,3,coutput3);
-       return task;
-}
-
diff --git a/PWG3/vertexingHF/AddTaskCharmFraction.C b/PWG3/vertexingHF/AddTaskCharmFraction.C
deleted file mode 100644 (file)
index f06ee0d..0000000
+++ /dev/null
@@ -1,233 +0,0 @@
-AliAnalysisTaskSECharmFraction* AddTaskCharmFraction(TString fileout="d0D0",Int_t switchMC[5],Bool_t readMC=kTRUE)
-{  
-  //
-  // Configuration macro for the task to analyze the fraction of prompt charm
-  // using the D0 impact parameter
-  // andrea.rossi@ts.infn.it
-  //
-  //==========================================================================
-
-  //######## !!! THE SWITCH FOR MC ANALYSIS IS NOT IMPLEMENTED YET!!! ##########à
-  switchMC[0]=1;
-  switchMC[1]=1;
-  switchMC[2]=1;
-  switchMC[3]=1;
-  switchMC[4]=1;
-  Int_t last=0;
-
-  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-  if (!mgr) {
-    ::Error("AddTaskCharmFraction", "No analysis manager to connect to.");
-    return NULL;
-  }   
-
-  TString str=fileout,containername;
-  str.ReplaceAll(".root","");
-  str.Prepend("_");
-
-  TString outfile=AliAnalysisManager::GetCommonFileName();
-  outfile += ":PWG3_D2H";
-  outfile += str.Data();
-
-  AliAnalysisTaskSECharmFraction *hfTask;
-  hfTask = new AliAnalysisTaskSECharmFraction("AliAnalysisTaskSECharmFraction");
-  hfTask->SetReadMC(readMC);    
-
-  /*  ############### HERE THE POSSIBILITY TO SWITCH ON/OFF THE TLISTS AND MC SELECTION WILL BE SET #########à
-
-  hfTask->SetUseCuts(setD0usecuts);
-  hfTask->SetCheckMC(setcheckMC);
-  hfTask->SetCheckMC_D0(setcheckMC_D0);
-  hfTask->SetCheckMC_2prongs(setcheckMC_2prongs);
-  hfTask->SetCheckMC_prompt(setcheckMC_prompt);
-  hfTask->SetCheckMC_fromB(setcheckMC_fromB);
-  hfTask->SetCheckMC_fromDstar(setSkipD0star);
-  hfTask->SetStudyPureBackground(setStudyPureBack);*/
-  //  hfTask->SetSideBands(0);
-  //  hfTask->SetDebugLevel(2);
-  mgr->AddTask(hfTask);
-  
-  // Create containers for input/output
-  AliAnalysisDataContainer *cinput =   mgr->GetCommonInputContainer();
-  //mgr->CreateContainer("cinput",TChain::Class(),AliAnalysisManager::kInputContainer);
-  mgr->ConnectInput(hfTask,0,cinput);
-  
-
-  //Now container for general properties histograms
-  containername="coutputNentries";
-  containername.Append(str.Data());
-  AliAnalysisDataContainer *coutputNentries = mgr->CreateContainer(containername.Data(),TH1F::Class(),
-                                                          AliAnalysisManager::kOutputContainer, 
-                                                          outfile.Data());
-  
-  mgr->ConnectOutput(hfTask,1,coutputNentries);
-
-  containername="coutputSignalType";
-  containername.Append(str.Data());
-  AliAnalysisDataContainer *coutputSignalType = mgr->CreateContainer(containername.Data(),TH1F::Class(),
-                                                          AliAnalysisManager::kOutputContainer, 
-                                                          outfile.Data());
-  
-  mgr->ConnectOutput(hfTask,2,coutputSignalType);
-
-
-  containername="coutputSignalType_LsCuts";
-  containername.Append(str.Data());
-  AliAnalysisDataContainer *coutputSignalType_LsCuts = mgr->CreateContainer(containername.Data(),TH1F::Class(),
-                                                          AliAnalysisManager::kOutputContainer, 
-                                                          outfile.Data());
-  
-  mgr->ConnectOutput(hfTask,3,coutputSignalType_LsCuts);
-
-
- containername="coutputSignalType_TghCuts";
-  containername.Append(str.Data());
-  AliAnalysisDataContainer *coutputSignalType_TghCuts = mgr->CreateContainer(containername.Data(),TH1F::Class(),
-                                                          AliAnalysisManager::kOutputContainer, 
-                                                          outfile.Data());
-  
-  mgr->ConnectOutput(hfTask,4,coutputSignalType_TghCuts);
-
-  // Now container for TLists 
-  last=5;
-  //##########  NO CUTS TLISTS CONTAINER ##############à
-  containername="clistNCsign";
-  containername.Append(str.Data());
-  AliAnalysisDataContainer *clistNCsign = mgr->CreateContainer(containername.Data(),TList::Class(),
-                                                          AliAnalysisManager::kOutputContainer, 
-                                                          outfile.Data());
-  mgr->ConnectOutput(hfTask,last,clistNCsign);
-  last++;
-
-
-  containername="clistNCback";
-  containername.Append(str.Data());
-  AliAnalysisDataContainer *clistNCback = mgr->CreateContainer(containername.Data(),TList::Class(),
-                                                          AliAnalysisManager::kOutputContainer, 
-                                                          outfile.Data());
-  mgr->ConnectOutput(hfTask,last,clistNCback);
-  last++;
-
-  containername="clistNCfromB";
-  containername.Append(str.Data());
-  AliAnalysisDataContainer *clistNCfromB = mgr->CreateContainer(containername.Data(),TList::Class(),
-                                                          AliAnalysisManager::kOutputContainer, 
-                                                          outfile.Data());
-  mgr->ConnectOutput(hfTask,last,clistNCfromB);
-  last++;
-
-
-  containername="clistNCfromDstar";
-  containername.Append(str.Data());
-  AliAnalysisDataContainer *clistNCfromDstar = mgr->CreateContainer(containername.Data(),TList::Class(),
-                                                          AliAnalysisManager::kOutputContainer, 
-                                                          outfile.Data());
-  mgr->ConnectOutput(hfTask,last,clistNCfromDstar);
-  last++;
-
-
-  containername="clistNCother";
-  containername.Append(str.Data());
-  AliAnalysisDataContainer *clistNCother = mgr->CreateContainer(containername.Data(),TList::Class(),
-                                                          AliAnalysisManager::kOutputContainer, 
-                                                          outfile.Data());
-  mgr->ConnectOutput(hfTask,last,clistNCother);
-  last++;
-
-
-  //######### LOOSE CUTS TLISTS CONTAINER #############
-  containername="clistLSCsign";
-  containername.Append(str.Data());
-  AliAnalysisDataContainer *clistLSCsign = mgr->CreateContainer(containername.Data(),TList::Class(),
-                                                          AliAnalysisManager::kOutputContainer, 
-                                                          outfile.Data());
-  mgr->ConnectOutput(hfTask,last,clistLSCsign);
-  last++;
-
-
-  containername="clistLSCback";
-  containername.Append(str.Data());
-  AliAnalysisDataContainer *clistLSCback = mgr->CreateContainer(containername.Data(),TList::Class(),
-                                                          AliAnalysisManager::kOutputContainer, 
-                                                          outfile.Data());
-  mgr->ConnectOutput(hfTask,last,clistLSCback);
-  last++;
-
-  containername="clistLSCfromB";
-  containername.Append(str.Data());
-  AliAnalysisDataContainer *clistLSCfromB = mgr->CreateContainer(containername.Data(),TList::Class(),
-                                                          AliAnalysisManager::kOutputContainer, 
-                                                          outfile.Data());
-  mgr->ConnectOutput(hfTask,last,clistLSCfromB);
-  last++;
-
-
-  containername="clistLSCfromDstar";
-  containername.Append(str.Data());
-  AliAnalysisDataContainer *clistLSCfromDstar = mgr->CreateContainer(containername.Data(),TList::Class(),
-                                                          AliAnalysisManager::kOutputContainer, 
-                                                          outfile.Data());
-  mgr->ConnectOutput(hfTask,last,clistLSCfromDstar);
-  last++;
-
-
-  containername="clistLSCother";
-  containername.Append(str.Data());
-  AliAnalysisDataContainer *clistLSCother = mgr->CreateContainer(containername.Data(),TList::Class(),
-                                                          AliAnalysisManager::kOutputContainer, 
-                                                          outfile.Data());
-  mgr->ConnectOutput(hfTask,last,clistLSCother);
-  last++;
-
-
-
-  //######### TIGHT CUTS TLISTS CONTAINER #############
-    containername="clistTGHCsign";
-  containername.Append(str.Data());
-  AliAnalysisDataContainer *clistTGHCsign = mgr->CreateContainer(containername.Data(),TList::Class(),
-                                                          AliAnalysisManager::kOutputContainer, 
-                                                          outfile.Data());
-  mgr->ConnectOutput(hfTask,last,clistTGHCsign);
-  last++;
-
-
-  containername="clistTGHCback";
-  containername.Append(str.Data());
-  AliAnalysisDataContainer *clistTGHCback = mgr->CreateContainer(containername.Data(),TList::Class(),
-                                                          AliAnalysisManager::kOutputContainer, 
-                                                          outfile.Data());
-  mgr->ConnectOutput(hfTask,last,clistTGHCback);
-  last++;
-
-  containername="clistTGHCfromB";
-  containername.Append(str.Data());
-  AliAnalysisDataContainer *clistTGHCfromB = mgr->CreateContainer(containername.Data(),TList::Class(),
-                                                          AliAnalysisManager::kOutputContainer, 
-                                                          outfile.Data());
-  mgr->ConnectOutput(hfTask,last,clistTGHCfromB);
-  last++;
-
-
-  containername="clistTGHCfromDstar";
-  containername.Append(str.Data());
-  AliAnalysisDataContainer *clistTGHCfromDstar = mgr->CreateContainer(containername.Data(),TList::Class(),
-                                                          AliAnalysisManager::kOutputContainer, 
-                                                          outfile.Data());
-  mgr->ConnectOutput(hfTask,last,clistTGHCfromDstar);
-  last++;
-
-
-  containername="clistTGHCother";
-  containername.Append(str.Data());
-  AliAnalysisDataContainer *clistTGHCother = mgr->CreateContainer(containername.Data(),TList::Class(),
-                                                          AliAnalysisManager::kOutputContainer, 
-                                                          outfile.Data());
-  mgr->ConnectOutput(hfTask,last,clistTGHCother);
-  
-
-
-  return hfTask;
-}
diff --git a/PWG3/vertexingHF/AddTaskCompareHF.C b/PWG3/vertexingHF/AddTaskCompareHF.C
deleted file mode 100644 (file)
index c38aa67..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-AliAnalysisTaskSECompareHF *AddTaskCompareHF()\r
-{\r
-  //\r
-  // Test macro for the AliAnalysisTaskSE for heavy-flavour candidates\r
-  // association with MC truth (using MC info in AOD)\r
-  // A.Dainese, andrea.dainese@lnl.infn.it\r
-  //\r
-\r
-\r
-  // Get the pointer to the existing analysis manager via the static access method.\r
-  //==============================================================================\r
-  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();\r
-  if (!mgr) {\r
-    ::Error("AddTaskCompareHF", "No analysis manager to connect to.");\r
-    return NULL;\r
-  }   \r
-\r
-  \r
-  // Aanalysis task    \r
-  AliAnalysisTaskSECompareHF *hfTask = new AliAnalysisTaskSECompareHF("CompareHFAnalysis");\r
-  hfTask->SetDebugLevel(0);\r
-  mgr->AddTask(hfTask);\r
-  \r
-  //\r
-  // Create containers for input/output\r
-  AliAnalysisDataContainer *cinputCmp = mgr->CreateContainer("cinput",TChain::Class(), \r
-                                                         AliAnalysisManager::kInputContainer);\r
-  AliAnalysisDataContainer *coutputCmp1 = mgr->CreateContainer("coutputCmp1",TList::Class(),\r
-                                                          AliAnalysisManager::kOutputContainer, \r
-                                                          "CmpHF.root");\r
-  AliAnalysisDataContainer *coutputCmp2 = mgr->CreateContainer("coutputCmp2",TNtuple::Class(),\r
-                                                          AliAnalysisManager::kOutputContainer, \r
-                                                          "CmpHFnt.root");\r
-  coutputCmp2->SetSpecialOutput();\r
-\r
-  mgr->ConnectInput(hfTask,0,mgr->GetCommonInputContainer());\r
-\r
-  mgr->ConnectOutput(hfTask,1,coutputCmp1);\r
-  mgr->ConnectOutput(hfTask,2,coutputCmp2);\r
-\r
-  return hfTask;\r
-}\r
diff --git a/PWG3/vertexingHF/AddTaskD0Mass.C b/PWG3/vertexingHF/AddTaskD0Mass.C
deleted file mode 100644 (file)
index f62e8aa..0000000
+++ /dev/null
@@ -1,244 +0,0 @@
-AliAnalysisTaskSED0Mass *AddTaskD0Mass(Int_t flag=0/*0 = D0,1 = LS*/,Bool_t readMC=kFALSE,Bool_t cutOnDistr=kFALSE)
-{
-  //
-  // AddTask for the AliAnalysisTaskSE for D0 candidates
-  // invariant mass histogram and association with MC truth 
-  // (using MC info in AOD) and cut variables distributions
-  // C.Bianchin  chiara.bianchin@pd.infn.it
-  //
-
-
-  // Get the pointer to the existing analysis manager via the static access method.
-  //==============================================================================
-  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-  if (!mgr) {
-    ::Error("AddTaskD0Distr", "No analysis manager to connect to.");
-    return NULL;
-  }   
-
-  TString filename="",out1name="",out2name="",out3name="",out4name="",out5name="",inname="";
-  filename = AliAnalysisManager::GetCommonFileName();
-  filename += ":PWG3_D2H_";
-  if(flag==0){
-    filename+="D0InvMass";
-    if(cutOnDistr) filename+="C"; 
-    //list mass
-    out1name="coutputmassD0Mass";
-    if(cutOnDistr) out1name+="C"; 
-    //list distr
-    out2name="coutputmassD0distr";
-    if(cutOnDistr) out2name+="C"; 
-    //hist entries
-    out3name="nEntriesD0";
-    if(cutOnDistr) out3name+="C"; 
-    //list checks
-    out4name="checksD0";
-    if(cutOnDistr) out4name+="C"; 
-    //cuts object
-    out5name="cutsD0";
-    if(cutOnDistr) out5name+="C"; 
-
-    inname="cinputmassD0_0";
-    if(cutOnDistr) inname+="C"; 
-
-  } else {
-    filename+="D0InvMassLikeSign";
-    if(cutOnDistr) filename+="C"; 
-    //list mass
-    out1name="coutputmassLSMass";
-    if(cutOnDistr) out1name+="C"; 
-    //list distr
-    out2name="coutputmassLSdistr";
-    if(cutOnDistr) out2name+="C"; 
-    //hist entries
-    out3name="nEntriesLS";
-    if(cutOnDistr) out3name+="C"; 
-    //list checks
-    out4name="checksLS";
-    if(cutOnDistr) out4name+="C"; 
-    //cuts object
-    out5name="cutsLS";
-    if(cutOnDistr) out5name+="C"; 
-
-    inname="cinputmassD0_1";
-    if(cutOnDistr) inname+="C"; 
-  }
-  TString cutobjname="mycuts";
-  cutobjname+=flag;
-
-  AliESDtrackCuts* esdTrackCuts=new AliESDtrackCuts();
-  esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
-  //default
-  esdTrackCuts->SetRequireTPCRefit(kTRUE);
-  esdTrackCuts->SetRequireITSRefit(kTRUE);
-  esdTrackCuts->SetMinNClustersITS(4); // default is 5
-  esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,
-                                        AliESDtrackCuts::kAny); 
- // default is kBoth, otherwise kAny
-  esdTrackCuts->SetMinDCAToVertexXY(0.);
-  esdTrackCuts->SetPtRange(0.3,1.e10);
-
-  AliRDHFCutsD0toKpi* RDHFD0toKpi=new AliRDHFCutsD0toKpi();
-  RDHFD0toKpi->AddTrackCuts(esdTrackCuts);
-
-  //cout<<"nvars = "<<RDHFD0toKpi->GetNVars()<<endl;
-  const Int_t nvars=9;
-  //nvars=RDHFD0toKpi->GetNVars();  
-  //cout<<"Nvars = "<<nvars<<"\t"<<RDHFD0toKpi->GetNVars()<<endl;
-  RDHFD0toKpi->SetName(cutobjname);
-  RDHFD0toKpi->SetTitle(cutobjname);
-
-  const Int_t nptbins=5;
-  Float_t* ptbins;
-  ptbins=new Float_t[nptbins+1];
-  ptbins[0]=0.;
-  ptbins[1]=1.;
-  ptbins[2]=2.;
-  ptbins[3]=3.;
-  ptbins[4]=5.;
-  ptbins[5]=10.;
-  
-  RDHFD0toKpi->SetPtBins(nptbins+1,ptbins);
-  
-
-  Float_t** rdcutsvalmine;
-  rdcutsvalmine=new Float_t*[nvars];
-  for(Int_t iv=0;iv<nvars;iv++){
-    rdcutsvalmine[iv]=new Float_t[nptbins];
-  }
-  //cout<<"\tnptbins = "<<nptbins<<endl;
-  /*
-  //setting PPR cut values
-  rdcutsvalPPR[0][0]=0.7;
-  rdcutsvalPPR[1][0]=0.04;
-  rdcutsvalPPR[2][0]=0.8;
-  rdcutsvalPPR[3][0]=0.5;
-  rdcutsvalPPR[4][0]=0.5;
-  rdcutsvalPPR[5][0]=0.05;
-  rdcutsvalPPR[6][0]=0.05;
-  rdcutsvalPPR[7][0]=-0.0002;
-  rdcutsvalPPR[8][0]=0.5;
-
-  rdcutsvalPPR[0][1]=rdcutsvalPPR[0][2]=0.7;
-  rdcutsvalPPR[1][1]=rdcutsvalPPR[1][2]=0.02;
-  rdcutsvalPPR[2][1]=rdcutsvalPPR[2][2]=0.8;
-  rdcutsvalPPR[3][1]=rdcutsvalPPR[3][2]=0.7;
-  rdcutsvalPPR[4][1]=rdcutsvalPPR[4][2]=0.7;
-  rdcutsvalPPR[5][1]=rdcutsvalPPR[5][2]=0.05;
-  rdcutsvalPPR[6][1]=rdcutsvalPPR[6][2]=0.05;
-  rdcutsvalPPR[7][1]=rdcutsvalPPR[7][2]=-0.0002;
-  rdcutsvalPPR[8][1]=rdcutsvalPPR[8][2]=0.6;
-
-  rdcutsvalPPR[0][3]=0.7;
-  rdcutsvalPPR[1][3]=0.02;
-  rdcutsvalPPR[2][3]=0.8;
-  rdcutsvalPPR[3][3]=0.7;
-  rdcutsvalPPR[4][3]=0.7;
-  rdcutsvalPPR[5][3]=0.05;
-  rdcutsvalPPR[6][3]=0.05;
-  rdcutsvalPPR[7][3]=-0.0001;
-  rdcutsvalPPR[8][3]=0.8;
-
-  rdcutsvalPPR[0][4]=0.7;
-  rdcutsvalPPR[1][4]=0.02;
-  rdcutsvalPPR[2][4]=0.8;
-  rdcutsvalPPR[3][4]=0.7;
-  rdcutsvalPPR[4][4]=0.7;
-  rdcutsvalPPR[5][4]=0.05;
-  rdcutsvalPPR[6][4]=0.05;
-  rdcutsvalPPR[7][4]=-0.00005;
-  rdcutsvalPPR[8][4]=0.8;
-  */
-  //setting my cut values
-
-  rdcutsvalmine[0][0]=0.7;
-  rdcutsvalmine[1][0]=0.04;
-  rdcutsvalmine[2][0]=0.8;
-  rdcutsvalmine[3][0]=0.5;
-  rdcutsvalmine[4][0]=0.5;
-  rdcutsvalmine[5][0]=0.05;
-  rdcutsvalmine[6][0]=0.05;
-  rdcutsvalmine[7][0]=-0.00025;
-  rdcutsvalmine[8][0]=0.7;
-
-  rdcutsvalmine[0][1]=rdcutsvalmine[0][2]=0.7;
-  rdcutsvalmine[1][1]=rdcutsvalmine[1][2]=0.02;
-  rdcutsvalmine[2][1]=rdcutsvalmine[2][2]=0.8;
-  rdcutsvalmine[3][1]=rdcutsvalmine[3][2]=0.7;
-  rdcutsvalmine[4][1]=rdcutsvalmine[4][2]=0.7;
-  rdcutsvalmine[5][1]=rdcutsvalmine[5][2]=1.;
-  rdcutsvalmine[6][1]=rdcutsvalmine[6][2]=1.;
-  rdcutsvalmine[7][1]=rdcutsvalmine[7][2]=-0.00025;
-  rdcutsvalmine[8][1]=rdcutsvalmine[8][2]=0.8;
-
-  rdcutsvalmine[0][3]=0.7;
-  rdcutsvalmine[1][3]=0.02;
-  rdcutsvalmine[2][3]=0.8;
-  rdcutsvalmine[3][3]=0.7;
-  rdcutsvalmine[4][3]=0.7;
-  rdcutsvalmine[5][3]=0.05;
-  rdcutsvalmine[6][3]=0.05;
-  rdcutsvalmine[7][3]=-0.00015;
-  rdcutsvalmine[8][3]=0.8;
-
-  rdcutsvalmine[0][4]=0.7;
-  rdcutsvalmine[1][4]=0.02;
-  rdcutsvalmine[2][4]=0.8;
-  rdcutsvalmine[3][4]=0.7;
-  rdcutsvalmine[4][4]=0.7;
-  rdcutsvalmine[5][4]=0.05;
-  rdcutsvalmine[6][4]=0.05;
-  rdcutsvalmine[7][4]=-0.00015;
-  rdcutsvalmine[8][4]=0.9;
-
-  cout<<"Filled array ("<<nvars<<","<<nptbins<<")"<<endl;
-  /*
-  for(Int_t j=0;j<nvars;j++){
-    for(Int_t k=0;k<nptbins;k++){
-      cout<<rdcutsvalmine[j][k]<<"\t";
-    }
-    cout<<endl;
-  }
-  */
-
-  //cout<<"\tbefore SetCuts : npt = "<<RDHFD0toKpi->GetNPtBins()<<endl;
-  RDHFD0toKpi->SetCuts(nvars,nptbins,rdcutsvalmine);
-  //  RDHFD0toKpi->PrintAll();
-
-  // Aanalysis task    
-  TString taskname="MassAndDistrAnalysis";
-  if (flag==0)taskname.Prepend("D0");
-  else taskname.Prepend("LS");
-  AliAnalysisTaskSED0Mass *massD0Task = new AliAnalysisTaskSED0Mass(taskname.Data(),RDHFD0toKpi);
-  massD0Task->SetDebugLevel(0);
-  massD0Task->SetArray(flag);
-  massD0Task->SetReadMC(readMC);
-  massD0Task->SetCutOnDistr(cutOnDistr);
-  mgr->AddTask(massD0Task);
-  
-  //
-  // Create containers for input/output
-  AliAnalysisDataContainer *cinputmassD0 = mgr->CreateContainer(inname,TChain::Class(), 
-                                                         AliAnalysisManager::kInputContainer);
-
-  AliAnalysisDataContainer *coutputmassD01 = mgr->CreateContainer(out1name,TList::Class(),AliAnalysisManager::kOutputContainer, filename.Data()); //mass
-  AliAnalysisDataContainer *coutputmassD02 = mgr->CreateContainer(out2name,TList::Class(),AliAnalysisManager::kOutputContainer, filename.Data()); //distr
-  AliAnalysisDataContainer *coutputmassD03 = mgr->CreateContainer(out3name,TH1F::Class(),AliAnalysisManager::kOutputContainer, filename.Data()); //nev
-  AliAnalysisDataContainer *coutputmassD04 = mgr->CreateContainer(out4name,TList::Class(),AliAnalysisManager::kOutputContainer, filename.Data()); //check
-  //AliAnalysisDataContainer *coutputmassD05 = mgr->CreateContainer(out5name,AliRDHFCutsD0toKpi::Class(),AliAnalysisManager::kParamContainer, filename.Data()); //cuts
-AliAnalysisDataContainer *coutputmassD05 = mgr->CreateContainer(out5name,AliRDHFCutsD0toKpi::Class(),AliAnalysisManager::kOutputContainer, filename.Data()); //cuts
-  //AliAnalysisDataContainer *coutputmassD05 = mgr->CreateContainer(out5name,TList::Class(),AliAnalysisManager::kParamContainer, filename.Data()); //cuts
-  //AliAnalysisDataContainer *coutputmassD05 = mgr->CreateContainer(out5name,TList::Class(),AliAnalysisManager::kOutputContainer, filename.Data()); //cuts
-   
-
-  mgr->ConnectInput(massD0Task,0,mgr->GetCommonInputContainer());
-
-  mgr->ConnectOutput(massD0Task,1,coutputmassD01);
-  mgr->ConnectOutput(massD0Task,2,coutputmassD02);
-  mgr->ConnectOutput(massD0Task,3,coutputmassD03);
-  mgr->ConnectOutput(massD0Task,4,coutputmassD04);
-  mgr->ConnectOutput(massD0Task,5,coutputmassD05);
-
-
-  return massD0Task;
-}
diff --git a/PWG3/vertexingHF/AddTaskDStarJets.C b/PWG3/vertexingHF/AddTaskDStarJets.C
deleted file mode 100644 (file)
index b2fde3e..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-//DEFINITION OF A FEW CONSTANTS
-const Int_t    mintrackrefsTPC = 0 ;
-const Int_t    mintrackrefsITS = 3 ;
-const Int_t    PDG = 421; 
-const Int_t    minclustersTPC = 0 ;
-const Int_t    minITSClusters = 4;
-// ANALYSIS TYPE D*+ or D*-
-const Bool_t computeD0 = kFALSE;
-const Bool_t topologicalCut = kFALSE;
-//----------------------------------------------------
-
-AliAnalysisTaskSEDStarJets *AddTaskDStarJets(Bool_t theMCon=kTRUE)
-{
-
-  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-  if (!mgr) {
-    ::Error("AddTaskDStarJets", "No analysis manager to connect to.");
-    return NULL;
-  }  
-  
-  //CREATE THE TASK
-  printf("CREATE TASK\n");
-  // create the task
-  AliAnalysisTaskSEDStarJets *task = new AliAnalysisTaskSEDStarJets("AliAnalysisTaskSEDStarJets");
-  task->SetMinITSClusters(minITSClusters);
-  task->SetAnalType(computeD0);
-  task->SetMC(theMCon);
-  task->SetCutType(topologicalCut);
-  // Create and connect containers for input/output
-  
-  TString outputfile = AliAnalysisManager::GetCommonFileName();
-  outputfile += ":PWG3_D2H_DStarJet";
-
-  // ------ input data ------
-  AliAnalysisDataContainer *cinput0  = mgr->GetCommonInputContainer();
-  
-  // ----- output data -----
-  
-  // output TH1I for event counting
-  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("chist0", TList::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data());
-  
-  mgr->AddTask(task);
-  
-  mgr->ConnectInput(task,0,mgr->GetCommonInputContainer());
-  mgr->ConnectOutput(task,1,coutput1);
-  
-  return task ;
-}
-
diff --git a/PWG3/vertexingHF/AddTaskDStarSpectra.C b/PWG3/vertexingHF/AddTaskDStarSpectra.C
deleted file mode 100644 (file)
index 50b4abe..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-//DEFINITION OF A FEW CONSTANTS
-const Int_t    minITSClusters     = 5;
-const Int_t    minITSClustersSoft = 4;
-const Int_t    numberOfSigmasPID  = 3;
-// ANALYSIS TYPE 
-const Bool_t anaType   = 0;//0 HD; 1 UU;
-const Bool_t usePID = kFALSE;
-const Bool_t theMCon=kFALSE;
-//----------------------------------------------------
-
-AliAnalysisTaskSEDStarSpectra *AddTaskDStarSpectra()
-{
-
-  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-  if (!mgr) {
-    ::Error("AddTaskDStarSpectra", "No analysis manager to connect to.");
-    return NULL;
-  }  
-  
-  //CREATE THE TASK
-  printf("CREATE TASK\n");
-  // create the task
-  AliAnalysisTaskSEDStarSpectra *task = new AliAnalysisTaskSEDStarSpectra("AliAnalysisTaskSEDStarSpectra");
-  task->SetAnalysisType(anaType);
-  task->SetMinITSClusters(minITSClusters);
-  task->SetMinITSClustersSoft(minITSClustersSoft);
-  task->SetNSigmasPID(numberOfSigmasPID);
-  task->SetMC(theMCon);
-  task->SetPID(usePID);
-  task->SetDebugLevel(0);
-
-  mgr->AddTask(task);
-
-  // Create and connect containers for input/output
-  
-  TString outputfile = AliAnalysisManager::GetCommonFileName();
-  if (anaType == 0) outputfile += ":PWG3_D2H_DStarSpectraHD";
-  if (anaType == 1) outputfile += ":PWG3_D2H_DStarSpectraUU";
-
-  // ------ input data ------
-  AliAnalysisDataContainer *cinput0  = mgr->GetCommonInputContainer();
-  
-  // ----- output data -----
-  
-  // output TH1I for event counting
-  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("chist0", TList::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data());
-  AliAnalysisDataContainer *coutputDStar1 = mgr->CreateContainer("DStarSpectrum",TList::Class(),
-                                                           AliAnalysisManager::kOutputContainer,
-                                                           outputfile.Data());
-  AliAnalysisDataContainer *coutputDStar2 = mgr->CreateContainer("DStarAll",TList::Class(),
-                                                           AliAnalysisManager::kOutputContainer,
-                                                           outputfile.Data());
-  AliAnalysisDataContainer *coutputDStar3 = mgr->CreateContainer("DStarPID3",TList::Class(),
-                                                           AliAnalysisManager::kOutputContainer,
-                                                           outputfile.Data());
-  AliAnalysisDataContainer *coutputDStar4 = mgr->CreateContainer("DStarPID2",TList::Class(),
-                                                           AliAnalysisManager::kOutputContainer,
-                                                           outputfile.Data());
-  AliAnalysisDataContainer *coutputDStar5 = mgr->CreateContainer("DStarPID1",TList::Class(),
-                                                           AliAnalysisManager::kOutputContainer,
-                                                           outputfile.Data());
-
-  mgr->ConnectInput(task,0,mgr->GetCommonInputContainer());
-  mgr->ConnectOutput(task,1,coutput1);
-  mgr->ConnectOutput(task,2,coutputDStar1);
-  mgr->ConnectOutput(task,3,coutputDStar2);
-  mgr->ConnectOutput(task,4,coutputDStar3);
-  mgr->ConnectOutput(task,5,coutputDStar4);
-  mgr->ConnectOutput(task,6,coutputDStar5);
-
-  
-  return task ;
-}
-
diff --git a/PWG3/vertexingHF/AddTaskDplus.C b/PWG3/vertexingHF/AddTaskDplus.C
deleted file mode 100644 (file)
index 1a4b0c3..0000000
+++ /dev/null
@@ -1,165 +0,0 @@
-AliAnalysisTaskSEDplus *AddTaskDplus(Bool_t storeNtuple=kTRUE,
-                                    Bool_t readMC=kTRUE)
-{
-  //                                                                                                                                    
-  // Test macro for the AliAnalysisTaskSE for D+ candidates 
-
-  //Invariant mass histogram and                                                 
-  // association with MC truth (using MC info in AOD)                                                                                   
-  //  R. Bala, bala@to.infn.it                                                                                                                                  
-  // Get the pointer to the existing analysis manager via the static access method.                                                     
-  //==============================================================================                                                      
-  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-  if (!mgr) {
-    ::Error("AddTaskDplus", "No analysis manager to connect to.");
-    return NULL;
-  }
-
-  //ptbins
-  const Int_t nptbins=4;
-  Float_t* ptbins;
-  ptbins=new Float_t[nptbins+1];
-  ptbins[0]=0.;
-  ptbins[1]=2.;
-  ptbins[2]=3.;
-  ptbins[3]=5.;
-  ptbins[4]=99999.;
-  const Int_t nvars=12;
-
-  
-
-
-  Float_t** prodcutsval;
-  prodcutsval=new Float_t*[nvars];
-  for(Int_t ic=0;ic<nvars;ic++){prodcutsval[ic]=new Float_t[nptbins];}  
-  for(Int_t ipt=0;ipt<nptbins;ipt++){
-    prodcutsval[0][ipt]=0.2;
-    prodcutsval[1][ipt]=0.4;
-    prodcutsval[2][ipt]=0.4;
-    prodcutsval[3][ipt]=0.;
-    prodcutsval[4][ipt]=0.;
-    prodcutsval[5][ipt]=0.01;
-    prodcutsval[6][ipt]=0.06;
-    prodcutsval[7][ipt]=0.02;
-    prodcutsval[8][ipt]=0.;
-    prodcutsval[9][ipt]=0.85;
-    prodcutsval[10][ipt]=0.;
-    prodcutsval[11][ipt]=10000000.0;
-    
-  }
-
-
-
- Float_t** anacutsval;
-  anacutsval=new Float_t*[nvars];
-  for(Int_t ic=0;ic<nvars;ic++){anacutsval[ic]=new Float_t[nptbins];}
- //Double_t cutsDplus[12]={0.2,0.4,0.4,0.,0.,0.01,0.06,0.02,0.,0.85,0.,10000000000.};
-   Int_t ic=0;
-   for(Int_t ipt=0;ipt<nptbins;ipt++){
-     anacutsval[ic][ipt]=0.2;
-   }
-   Int_t ic=1;
-   for(Int_t ipt=0;ipt<nptbins;ipt++){
-     anacutsval[ic][ipt]=0.4;
-   }
-   Int_t ic=2;
-   for(Int_t ipt=0;ipt<nptbins;ipt++){
-     anacutsval[ic][ipt]=0.4;
-   }
-   Int_t ic=3;
-   for(Int_t ipt=0;ipt<nptbins;ipt++){
-     anacutsval[ic][ipt]=0.;
-   }
-   Int_t ic=4;
-   for(Int_t ipt=0;ipt<nptbins;ipt++){
-     anacutsval[ic][ipt]=0.;
-   }
-   Int_t ic=5;
-   for(Int_t ipt=0;ipt<nptbins;ipt++){
-     anacutsval[ic][ipt]=0.01;
-   }
-   Int_t ic=11;
-   for(Int_t ipt=0;ipt<nptbins;ipt++){
-     anacutsval[ic][ipt]=10000000000.;
-   }
-   anacutsval[6][0]=0.022100;
-   anacutsval[6][1]=0.034;
-   anacutsval[6][2]=0.020667;
-   anacutsval[6][3]=0.023333;
-
-   anacutsval[7][0]=0.08;
-   anacutsval[7][1]=0.09;
-   anacutsval[7][2]=0.095;
-   anacutsval[7][3]=0.115;
-
-   anacutsval[8][0]=0.5;
-   anacutsval[8][1]=1.0;
-   anacutsval[8][2]=0.5;
-   anacutsval[8][3]=0.5;
-
-   anacutsval[9][0]=0.979;
-   anacutsval[9][1]=0.9975;
-   anacutsval[9][2]=0.995;
-   anacutsval[9][3]=0.9975;
-
-   anacutsval[10][0]=0.0055;
-   anacutsval[10][1]=0.0028;
-   anacutsval[10][2]=0.000883;
-   anacutsval[10][3]=0.000883;
-
-
-
-//Production cuts
-
-  AliRDHFCutsDplustoKpipi *prodcuts = new AliRDHFCutsDplustoKpipi();
-  prodcuts->SetPtBins(nptbins+1,ptbins);
-  prodcuts->SetCuts(nvars,nptbins,prodcutsval);
-
-  //Analysis cuts
-  AliRDHFCutsDplustoKpipi *analysiscuts = new AliRDHFCutsDplustoKpipi();
-  analysiscuts->SetPtBins(nptbins+1,ptbins);
-  analysiscuts->SetCuts(nvars,nptbins,anacutsval);
-
-
-  // Aanalysis task
-  AliAnalysisTaskSEDplus *dplusTask = new AliAnalysisTaskSEDplus("DplusAnalysis",analysiscuts,prodcuts,storeNtuple);
-  dplusTask->SetReadMC(readMC);
-  dplusTask->SetDoLikeSign(kTRUE);
-  dplusTask->SetDebugLevel(0);
-
-  mgr->AddTask(dplusTask);
-
- // Create containers for input/output 
-
-  AliAnalysisDataContainer *cinputDplus = mgr->CreateContainer("cinputDplus",TChain::Class(),
-                                                          AliAnalysisManager::kInputContainer);
-  TString outputfile = AliAnalysisManager::GetCommonFileName();
-  outputfile += ":PWG3_D2H_InvMassDplus";
-
- AliAnalysisDataContainer *coutputDplusCuts = mgr->CreateContainer("coutputDplusCuts",TList::Class(),
-                                                            AliAnalysisManager::kOutputContainer,
-                                                               outputfile.Data());
-  AliAnalysisDataContainer *coutputDplus = mgr->CreateContainer("coutputDplus",TList::Class(),
-                                                           AliAnalysisManager::kOutputContainer,
-                                                               outputfile.Data());
-
-  if(storeNtuple){
-    AliAnalysisDataContainer *coutputDplus2 = mgr->CreateContainer("coutputDplus2",TNtuple::Class(),
-                                                           AliAnalysisManager::kOutputContainer,
-                                                                "InvMassDplus_nt1.root");
-
-    coutputDplus2->SetSpecialOutput();
-  }
-  mgr->ConnectInput(dplusTask,0,mgr->GetCommonInputContainer());
-
-  mgr->ConnectOutput(dplusTask,1,coutputDplus);
-
-  mgr->ConnectOutput(dplusTask,2,coutputDplusCuts);
-  
-  if(storeNtuple){
-    mgr->ConnectOutput(dplusTask,3,coutputDplus2);
-  }
-  return dplusTask;
-}
diff --git a/PWG3/vertexingHF/AddTaskDs.C b/PWG3/vertexingHF/AddTaskDs.C
deleted file mode 100644 (file)
index 67fdcf9..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-AliAnalysisTaskSEDs *AddTaskDs(Bool_t readMC=kTRUE)
-{
-  //                                                                           
-  // Test macro for the AliAnalysisTaskSE for Ds candidates 
-
-
-  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-  if (!mgr) {
-    ::Error("AddTaskDs", "No analysis manager to connect to.");
-    return NULL;
-  }
-
-
-
-  //ptbins
-  const Int_t nptbins=4;
-  Float_t ptbins[nptbins+1]={0.,2.,3.,5.,99999.};
-
-  //setting cut values
-  Int_t nvars=14;
-  Float_t** ancutsval;
-  ancutsval=new Float_t*[nvars];
-  for(Int_t ic=0;ic<nvars;ic++){ancutsval[ic]=new Float_t[nptbins];}  
-  for(Int_t ipt=0;ipt<nptbins;ipt++){
-    ancutsval[0][ipt]=0.2;
-    ancutsval[1][ipt]=0.4;
-    ancutsval[2][ipt]=0.4;
-    ancutsval[3][ipt]=0.;
-    ancutsval[4][ipt]=0.;
-    ancutsval[5][ipt]=0.005;
-    ancutsval[6][ipt]=0.038;
-    ancutsval[7][ipt]=0.;
-    ancutsval[8][ipt]=0.;
-    ancutsval[9][ipt]=0.95;
-    ancutsval[10][ipt]=0.;
-    ancutsval[11][ipt]=0.1;
-    ancutsval[12][ipt]=0.004;
-    ancutsval[13][ipt]=0.035;
-  }
-  Float_t** prcutsval;
-  prcutsval=new Float_t*[nvars];
-  for(Int_t ic=0;ic<nvars;ic++){prcutsval[ic]=new Float_t[nptbins];}  
-  for(Int_t ipt=0;ipt<nptbins;ipt++){
-    prcutsval[0][ipt]=0.2;
-    prcutsval[1][ipt]=0.4;
-    prcutsval[2][ipt]=0.4;
-    prcutsval[3][ipt]=0.;
-    prcutsval[4][ipt]=0.;
-    prcutsval[5][ipt]=0.005;
-    prcutsval[6][ipt]=0.06;
-    prcutsval[7][ipt]=0.;
-    prcutsval[8][ipt]=0.;
-    prcutsval[9][ipt]=0.85;
-    prcutsval[10][ipt]=0.;
-    prcutsval[11][ipt]=0.1;
-    prcutsval[12][ipt]=0.1;
-    prcutsval[13][ipt]=0.1;
-  }
-
-  //Analysis cuts
-  AliRDHFCutsDstoKKpi *analysiscuts = new AliRDHFCutsDstoKKpi();
-  analysiscuts->SetPtBins(nptbins+1,ptbins);
-  analysiscuts->SetCuts(nvars,nptbins,ancutsval);
-  AliRDHFCutsDstoKKpi *prodcuts = new AliRDHFCutsDstoKKpi();
-  prodcuts->SetPtBins(nptbins+1,ptbins);
-  prodcuts->SetCuts(nvars,nptbins,prcutsval);
-
-  // Analysis task                                                                                                                     
-  AliAnalysisTaskSEDs *dsTask = new AliAnalysisTaskSEDs("DsAnalysis",prodcuts,analysiscuts);
-  dsTask->SetReadMC(readMC);
-  dsTask->SetDebugLevel(0);
-  mgr->AddTask(dsTask);
-
-  //                                                                                                                                    
-  // Create containers for input/output                                                                                                 
-  AliAnalysisDataContainer *cinputDs = mgr->CreateContainer("cinputDs",TChain::Class(),
-                                                           AliAnalysisManager::kInputContainer);
-
- TString outputfile = AliAnalysisManager::GetCommonFileName(); 
- outputfile += ":PWG3_D2H_InvMassDs";
- AliAnalysisDataContainer *coutputDsCuts = mgr->CreateContainer("coutputDsCuts",TList::Class(),
-                                                            AliAnalysisManager::kOutputContainer,
-                                                               outputfile.Data());
-
-  AliAnalysisDataContainer *coutputDs = mgr->CreateContainer("coutputDs",TList::Class(),
-                                                            AliAnalysisManager::kOutputContainer,
-                                                            outputfile.Data());
-
-
-  mgr->ConnectInput(dsTask,0,mgr->GetCommonInputContainer());
-
-  mgr->ConnectOutput(dsTask,1,coutputDs);
-
-  mgr->ConnectOutput(dsTask,2,coutputDsCuts);
-  return dsTask;
-}
diff --git a/PWG3/vertexingHF/AddTaskHFMixing.C b/PWG3/vertexingHF/AddTaskHFMixing.C
deleted file mode 100644 (file)
index 0184707..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-AliAnalysisTaskMEVertexingHF *AddTaskHFMixing() {
-  //
-  // Creates a task for event mixing and adds it to the analysis manager.
-  // r.romita@gsi.de
-  //
-
-  // Get the pointer to the existing analysis manager via the static access method.
-  //==============================================================================
-  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-  if (!mgr) {
-    ::Error("AddTaskHFMixing", "No analysis manager to connect to.");
-    return NULL;
-  }   
-   
-  // This task requires  AOD input handler and an AOD output handler.
-  // Check this using the analysis manager.
-  //===============================================================================
-
-  // Check if AOD output handler exist.
-  AliAODHandler *aodh = (AliAODHandler*)mgr->GetOutputEventHandler();
-  if (!aodh) {
-    ::Error("AddTaskMixing", "HF vertexing task needs the manager to have an AOD output handler.");
-    return NULL;
-  }   
-  
-  // Create the task, add it to the manager and configure it.
-  //===========================================================================
-  AliAnalysisTaskMEVertexingHF *hfTask = new AliAnalysisTaskMEVertexingHF("mixing vertexing HF");
-  mgr->AddTask(hfTask);
-
-  //
-  // Create containers for input/output
-  AliAnalysisDataContainer *cinput1 = mgr->CreateContainer("cchain",TChain::Class(), AliAnalysisManager::kInputContainer);
-  mgr->ConnectInput(hfTask,0,mgr->GetCommonInputContainer());
-  mgr->ConnectOutput(hfTask,0,mgr->GetCommonOutputContainer());
-
-  return hfTask;
-}
diff --git a/PWG3/vertexingHF/AddTaskJPSItoEle.C b/PWG3/vertexingHF/AddTaskJPSItoEle.C
deleted file mode 100644 (file)
index 0205cd3..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-AliAnalysisTaskSEJPSItoEle *AddTaskJPSItoEle(char* fileout = "AliAOD.Jpsitoele.root") 
-{
-  //***********************************************************************************************
-  // Test macro for the AliAnalysisTaskSEJPSItoEle 
-  // Starting from AliAOD.root + AliAOD.VertexingHF.root with HF + like sign candidates,
-  // it produces a specific AliAODjpsi.root file with a replica of J/psi->e+e- candidates only 
-  // (and references to the corresponding decay tracks) + several histograms for
-  // both unlike sign and like sign candidates.
-  // 
-  // C.Di Giglio, carmelo.digiglio@ba.infn.it
-  //***********************************************************************************************
-
-  // Get the pointer to the existing analysis manager via the static access method.
-  //==============================================================================
-  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-  if (!mgr) {
-    ::Error("AddTaskBtoJPSItoEle", "No analysis manager to connect to.");
-    return NULL;
-  }   
-
-  AliAODHandler* aodHandler = new AliAODHandler();
-  aodHandler->SetOutputFileName(fileout);
-
-  mgr->SetOutputEventHandler(aodHandler);
-  mgr-> SetDebugLevel(10);
-
-  AliAnalysisTaskSEJPSItoEle *hJPSItoEleTask = new AliAnalysisTaskSEJPSItoEle("AOD_JPSItoEle_filter");
-  hJPSItoEleTask->SetDebugLevel(2);
-
-  Double_t ptCuts[2] = {0.,500.}; // the cut is on the J/psi pT (--> change this)  
-  hJPSItoEleTask->SetPtCuts(ptCuts);
-  hJPSItoEleTask->SetAODMCInfo(kFALSE); // only for sim 
-
-  mgr->AddTask(hJPSItoEleTask);
-
-  mgr->ConnectInput(hJPSItoEleTask,0,mgr->GetCommonInputContainer());
-
-  AliAnalysisDataContainer *coutput0 = mgr->CreateContainer("tree",TTree::Class(),
-                                                           AliAnalysisManager::kOutputContainer,
-                                                           "default");
-  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("histos",TList::Class(),
-                                                           AliAnalysisManager::kOutputContainer,       
-                                                          "JPSItoEleHistos.root");
-  mgr->ConnectOutput(hJPSItoEleTask,0,coutput0);
-  mgr->ConnectOutput(hJPSItoEleTask,1,coutput1);
-  return hJPSItoEleTask;
-}
diff --git a/PWG3/vertexingHF/AddTaskLambdac.C b/PWG3/vertexingHF/AddTaskLambdac.C
deleted file mode 100644 (file)
index 30150d3..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-AliAnalysisTaskSELambdac *AddTaskLambdac(const char *name,Bool_t storeNtuple,Bool_t readMC,Bool_t MCPid,Bool_t realPid,Bool_t resPid,Bool_t useKF)
-{
-  //==============================================================================                                                      
-  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-  if (!mgr) {
-    ::Error("AddTaskLambdac", "No analysis manager to connect to.");
-    return NULL;
-  }
-
-  //pt bins
-  const Int_t nptbins=4;
-    Float_t* ptbins;
-    ptbins=new Float_t[nptbins+1];
-    ptbins[0]=0.;
-    ptbins[1]=2.;
-    ptbins[2]=3.;
-    ptbins[3]=5.;
-    ptbins[4]=99999.;
-    const Int_t nvars=12;
-
-  Float_t** prodcutsval;
-  prodcutsval=new Float_t*[nvars];
-  for(Int_t ic=0;ic<nvars;ic++){prodcutsval[ic]=new Float_t[nptbins];}
-  for(Int_t ipt=0;ipt<nptbins;ipt++){
-   prodcutsval[0][ipt]=0.2;
-   prodcutsval[1][ipt]=0.4;
-   prodcutsval[2][ipt]=0.4;
-   prodcutsval[3][ipt]=0.;
-   prodcutsval[4][ipt]=0.;
-   prodcutsval[5][ipt]=0.01;
-   prodcutsval[6][ipt]=0.06;
-   prodcutsval[7][ipt]=0.02;
-   prodcutsval[8][ipt]=0.;
-   prodcutsval[9][ipt]=0.85;
-   prodcutsval[10][ipt]=0.;
-   prodcutsval[11][ipt]=0.1;
-  }
-
-  Float_t** anacutsval;
-  anacutsval=new Float_t*[nvars];
-  for(Int_t ic=0;ic<nvars;ic++){anacutsval[ic]=new Float_t[nptbins];}
-  Int_t ic=0;
-  for(Int_t ipt=0;ipt<nptbins;ipt++){
-       anacutsval[ic][ipt]=0.2;
-          }
-  Int_t ic=1;
-     for(Int_t ipt=0;ipt<nptbins;ipt++){
-          anacutsval[ic][ipt]=0.8;
-            }
-  Int_t ic=2;
-     for(Int_t ipt=0;ipt<nptbins;ipt++){
-          anacutsval[ic][ipt]=0.4;
-            }
-  Int_t ic=3;
-     for(Int_t ipt=0;ipt<nptbins;ipt++){
-          anacutsval[ic][ipt]=0.;
-            }
-  Int_t ic=4;
-     for(Int_t ipt=0;ipt<nptbins;ipt++){
-          anacutsval[ic][ipt]=0.;
-            }
-  Int_t ic=5;
-     for(Int_t ipt=0;ipt<nptbins;ipt++){
-          anacutsval[ic][ipt]=0.;
-            }
-  Int_t ic=6;
-     for(Int_t ipt=0;ipt<nptbins;ipt++){
-          anacutsval[ic][ipt]=0.1;
-            }
-  Int_t ic=7;
-     for(Int_t ipt=0;ipt<nptbins;ipt++){
-          anacutsval[ic][ipt]=0.;
-            }
-  Int_t ic=8;
-     for(Int_t ipt=0;ipt<nptbins;ipt++){
-          anacutsval[ic][ipt]=0.;
-            }
-  Int_t ic=9;
-     for(Int_t ipt=0;ipt<nptbins;ipt++){
-          anacutsval[ic][ipt]=0.;
-            }
-  Int_t ic=10;
-     for(Int_t ipt=0;ipt<nptbins;ipt++){
-          anacutsval[ic][ipt]=0.;
-            }
-  Int_t ic=11;
-     for(Int_t ipt=0;ipt<nptbins;ipt++){
-          anacutsval[ic][ipt]=0.1;
-            }
-
-  anacutsval[1][0]=0.6;
-
-  anacutsval[2][2]=0.5;
-  anacutsval[2][3]=0.5;
-
-  anacutsval[9][2]=0.9;
-  anacutsval[9][3]=0.9;
-
-
-  AliRDHFCutsLctopKpi *prodcuts = new AliRDHFCutsLctopKpi();
-    prodcuts->SetPtBins(nptbins+1,ptbins);
-      prodcuts->SetCuts(nvars,nptbins,prodcutsval);
-  //Analysis cuts
-  AliRDHFCutsLctopKpi *analysiscuts = new AliRDHFCutsLctopKpi();
-  ((AliRDHFCuts*)analysiscuts)->SetPtBins(nptbins+1,ptbins);
-  ((AliRDHFCuts*)analysiscuts)->SetCuts(nvars,nptbins,anacutsval);
-  // Aanalysis task                                                                                                                     
-  AliAnalysisTaskSELambdac *lambdacTask = new AliAnalysisTaskSELambdac("LambdacAnalysis",storeNtuple,analysiscuts,prodcuts);
-  lambdacTask->SetReadMC(readMC);
-  if(MCPid) lambdacTask->SetMCPid();
-  if(resPid) lambdacTask->SetResonantPid();
-  if(realPid) lambdacTask->SetRealPid();
-  lambdacTask->SetDebugLevel(0);
-  if(useKF) {
-    lambdacTask->SetUseKF();
-     Float_t cuts[10]={0.1,0.1,1.5,0.5,0.1,1.5,0.5,0.1,1.5,0.5};
-      lambdacTask->SetCutsKF(cuts);
-       }
-  mgr->AddTask(lambdacTask);
-
-  //                                                                                                                                    
-  // Create containers for input/output                                                                                                 
-  TString outputfile = AliAnalysisManager::GetCommonFileName();
-  outputfile += ":PWG3_D2H_InvMassLambdac";
-  AliAnalysisDataContainer *cinputLambdac = mgr->CreateContainer("cinputLambdac",TChain::Class(),
-                                                          AliAnalysisManager::kInputContainer);
-  AliAnalysisDataContainer *coutputLambdacCuts = mgr->CreateContainer("coutputLambdacCuts",TList::Class(),
-                                                           AliAnalysisManager::kOutputContainer,
-                                                               outputfile.Data());
-  AliAnalysisDataContainer *coutputLambdac = mgr->CreateContainer("coutputLambdac",TList::Class(),
-                                                           AliAnalysisManager::kOutputContainer,
-                                                               outputfile.Data());
-  if(storeNtuple){
-    AliAnalysisDataContainer *coutputLambdac2 = mgr->CreateContainer("coutputLambdac2",TNtuple::Class(),
-                                                           AliAnalysisManager::kOutputContainer,
-                                                                "InvMassLambdac_nt1.root");
-
-    coutputLambdac2->SetSpecialOutput();
-  }
-
-  mgr->ConnectInput(lambdacTask,0,mgr->GetCommonInputContainer());
-
-  mgr->ConnectOutput(lambdacTask,1,coutputLambdac);
-  mgr->ConnectOutput(lambdacTask,2,coutputLambdacCuts);
-  
-  if(storeNtuple){
-    mgr->ConnectOutput(lambdacTask,3,coutputLambdac2);
-  }
-  return lambdacTask;
-}
diff --git a/PWG3/vertexingHF/AddTaskSelectHF.C b/PWG3/vertexingHF/AddTaskSelectHF.C
deleted file mode 100644 (file)
index 0a01d8f..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-AliAnalysisTaskSESelectHF *AddTaskSelectHF()\r
-{\r
-  //\r
-  // Test macro for the AliAnalysisTaskSE for heavy-flavour selection\r
-  // and creation of a stand-alone AOD\r
-  // A.Dainese, andrea.dainese@lnl.infn.it\r
-  //\r
-\r
-  // Get the pointer to the existing analysis manager via the static access method.\r
-  //==============================================================================\r
-  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();\r
-  if (!mgr) {\r
-    ::Error("AddTaskSelectHF", "No analysis manager to connect to.");\r
-    return NULL;\r
-  }   \r
-\r
-\r
-  // Output \r
-  AliAODHandler *aodHandler   = new AliAODHandler();\r
-  aodHandler->SetOutputFileName("AliAOD.VertexingHF.sa.root");\r
-  aodHandler->SetCreateNonStandardAOD();\r
-  mgr->SetOutputEventHandler(aodHandler);\r
-\r
-  \r
-  // Aanalysis task    \r
-  AliAnalysisTaskSESelectHF *hfTask = new AliAnalysisTaskSESelectHF("SelectHFAnalysis");\r
-  hfTask->SetDebugLevel(2);\r
-  mgr->AddTask(hfTask);\r
-  \r
-  //\r
-  // Create containers for input/output\r
-  mgr->ConnectInput(hfTask,0,mgr->GetCommonInputContainer());\r
-  mgr->ConnectOutput(hfTask,0,mgr->GetCommonOutputContainer());\r
-\r
-  return hfTask;\r
-}\r
diff --git a/PWG3/vertexingHF/AddTaskVertexingHF.C b/PWG3/vertexingHF/AddTaskVertexingHF.C
deleted file mode 100644 (file)
index 4ea51b6..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-AliAnalysisTaskSEVertexingHF *AddTaskVertexingHF(const char* fname="AliAOD.VertexingHF.root") {
-  //
-  // Creates a task for heavy flavour vertexing and adds it to the analysis manager.
-  // andrea.dainese@lnl.infn.it
-  //
-
-  // Get the pointer to the existing analysis manager via the static access method.
-  //==============================================================================
-  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-  if (!mgr) {
-    ::Error("AddTaskVertexingHF", "No analysis manager to connect to.");
-    return NULL;
-  }   
-   
-  // This task requires an ESD or AOD input handler and an AOD output handler.
-  // Check this using the analysis manager.
-  //===============================================================================
-  TString type = mgr->GetInputEventHandler()->GetDataType();
-  if (!type.Contains("ESD") && !type.Contains("AOD")) {
-    ::Error("AddTaskVertexingHF", "HF vertexing task needs the manager to have an ESD or AOD input handler.");
-    return NULL;
-  }   
-  // Check if AOD output handler exist.
-  AliAODHandler *aodh = (AliAODHandler*)mgr->GetOutputEventHandler();
-  if (!aodh) {
-    ::Error("AddTaskVertexingHF", "HF vertexing task needs the manager to have an AOD output handler.");
-    return NULL;
-  }   
-  
-  // Create the task, add it to the manager and configure it.
-  //===========================================================================
-  AliAnalysisTaskSEVertexingHF *hfTask = new AliAnalysisTaskSEVertexingHF("vertexing HF");
-  hfTask->SetDeltaAODFileName(fname);
-  mgr->AddTask(hfTask);
-
-  //
-  // Create containers for input/output
-  AliAnalysisDataContainer *coutputListOfCuts = mgr->CreateContainer("ListOfCuts",TList::Class(),AliAnalysisManager::kOutputContainer,hfTask->GetDeltaAODFileName()); //cuts
-
-  mgr->ConnectInput(hfTask,0,mgr->GetCommonInputContainer());
-  mgr->ConnectOutput(hfTask,0,mgr->GetCommonOutputContainer());
-  mgr->ConnectOutput(hfTask,1,coutputListOfCuts);
-
-  return hfTask;
-}
index 8779d877e1089829ee75f6c0a9647d2a0582ec2d..4df9c91645c8d4fb8e199d5c5759dfe8368a6bd6 100644 (file)
@@ -13,7 +13,7 @@
 #include "AliAODPid.h"
 #include "AliAODTrack.h"
 
-class AliAODPidHF : public AliAODPid{
+class AliAODPidHF : public AliAODPid {
 
  public:
 
diff --git a/PWG3/vertexingHF/ReadAODVertexingHF.C b/PWG3/vertexingHF/ReadAODVertexingHF.C
deleted file mode 100644 (file)
index 0bc4ba6..0000000
+++ /dev/null
@@ -1,364 +0,0 @@
-void ReadAODVertexingHF(const char *aodFileName="AliAOD.root",
-                       const char *aodHFFileName="AliAOD.VertexingHF.root") 
-{
-  //
-  // Example macro to read D0->Kpi candidates from AOD (having the
-  // standard AOD + a friend heavy-flavour AOD) and apply cuts
-  // Origin: A.Dainese
-  //
-
-  Bool_t useParFiles=kFALSE;
-  gROOT->LoadMacro("$ALICE_ROOT/PWG3/vertexingHF/LoadLibraries.C");
-  LoadLibraries(useParFiles);
-
-  // create a test histogram
-  TH2F *hCPtaVSd0d0 = new TH2F("hCPtaVSd0d0","D^{0} correlation plot",1000,-50000,50000,1000,-1,1);
-  hCPtaVSd0d0->SetXTitle("Product of impact parameters [#mu m^{2}]");
-  hCPtaVSd0d0->SetYTitle("Cosine of pointing angle");
-  TH1F *hMass = new TH1F("hMass","D^{0} mass plot",100,1.7,2);
-  hMass->SetXTitle("Invariant mass [GeV]");
-  hMass->SetYTitle("Entries");
-  TH1F *hSecVtxZ = new TH1F("hSecVtxZ","D^{0} decay vertex z",1000,-10,10);
-  hSecVtxZ->SetXTitle("z of decay vertex [cm]");
-  hSecVtxZ->SetYTitle("Entries");
-  TH1F *hDeltaMassDstar = new TH1F("hDeltaMassDstar","D* delta mass plot",100,0,0.3);
-  hDeltaMassDstar->SetXTitle("M(Kpipi)-M(Kpi) [GeV]");
-  hDeltaMassDstar->SetYTitle("Entries");
-
-
-  // open input file and get the TTree
-  TFile inFile(aodFileName,"READ");
-  if (!inFile.IsOpen()) return;
-
-  TTree *aodTree = (TTree*)inFile.Get("aodTree");
-  aodTree->AddFriend("aodTree",aodHFFileName);
-
-  AliAODEvent *aod = new AliAODEvent();
-
-  aod->ReadFromTree(aodTree);
-
-  // load heavy flavour vertices
-  TClonesArray *arrayVerticesHF = 
-    (TClonesArray*)aod->GetList()->FindObject("VerticesHF"); 
-  
-  // load D0->Kpi candidates
-  TClonesArray *arrayD0toKpi = 
-    (TClonesArray*)aod->GetList()->FindObject("D0toKpi"); 
-     
-  // load 3prong candidates
-  TClonesArray *array3Prong = 
-    (TClonesArray*)aod->GetList()->FindObject("Charm3Prong"); 
-    
-  // load D* candidates
-  TClonesArray *arrayDstar = 
-    (TClonesArray*)aod->GetList()->FindObject("Dstar"); 
-    
-  // load cascade (V0+track) candidates
-  TClonesArray *arrayCascades = 
-    (TClonesArray*)aod->GetList()->FindObject("CascadesHF"); 
-    
-
-  Double_t cutsD0[9]=
-  // cutsD0[0] = inv. mass half width [GeV]
-  // cutsD0[1] = dca [cm]
-  // cutsD0[2] = cosThetaStar
-  // cutsD0[3] = pTK [GeV/c]
-  // cutsD0[4] = pTPi [GeV/c]
-  // cutsD0[5] = d0K [cm]   upper limit!
-  // cutsD0[6] = d0Pi [cm]  upper limit!
-  // cutsD0[7] = d0d0 [cm^2]
-  // cutsD0[8] = cosThetaPoint
-                     {1000.,
-                     100000.,
-                     1.1,
-                     0.,
-                     0.,
-                     100000.,
-                     100000.,
-                     100000000.,
-                     -1.1}; 
-  Double_t cutsDstar[5]=
-    // (to be passed to AliAODRecoCascadeHF::SelectDstar())
-    // 0 = inv. mass half width of D* [GeV]
-    // 1 = half width of (M_Kpipi-M_Kpi) [GeV]
-    // 2 = PtMin of pi_s [GeV/c]
-    // 3 = PtMax of pi_s [GeV/c]
-    // 4 = theta, angle between the trace of pi_s and D0 decay plane [rad]
-                     {999999.,
-                     999999.,
-                     0.1, 
-                     1.0, 
-                     0.5};
-
-  Double_t cutsLctoV0[9]=// cuts on Lambdac candidates to V0+bachelor
-                        // (to be passed to AliAODRecoDecayHF3Prong::SelectLctoV0())
-                        // 0 = inv. mass half width in K0s hypothesis [GeV]   
-                        // 1 = inv. mass half width in Lambda hypothesis [GeV]   
-                        // 2 = inv. mass V0 in K0s hypothesis half width [GeV]   
-                        // 3 = inv. mass V0 in Lambda hypothesis half width [GeV]   
-                        // 4 = pT min Bachelor track [GeV/c]
-                        // 5 = pT min V0-Positive track [GeV/c]
-                        // 6 = pT min V0-Negative track [GeV/c]
-                        // 7 = dca cut on the V0 (cm)
-                        // 8 = dca cut on the cascade (cm)
-    {2.0,2.0,1.0,1.0,0.0,0.0,0.0,1000.,1000.};
-
-  Int_t nTotHF=0,nTotD0toKpi=0,nTotDstar=0,nTot3Prong=0,nTotCasc=0;
-  AliAODVertex *vtx1=0;
-
-  // loop over events
-  Int_t nEvents = aodTree->GetEntries();
-  for (Int_t nEv = 0; nEv < nEvents; nEv++) {
-    cout<<"\n------------ Event: "<<nEv<<" ------------------"<<endl;
-
-    // read event
-    aodTree->GetEvent(nEv);
-    //aodTree->BranchRef();
-
-    //print event info
-    aod->GetHeader()->Print();
-
-    // primary vertex
-    vtx1 = (AliAODVertex*)aod->GetPrimaryVertex();
-    vtx1->Print();
-
-    // make trkIDtoEntry register (temporary)
-    Int_t trkIDtoEntry[100000];
-    for(Int_t it=0;it<aod->GetNumberOfTracks();it++) {
-      AliAODTrack *track = aod->GetTrack(it);
-      trkIDtoEntry[track->GetID()]=it;
-    }
-    
-
-    // loop over D0->Kpi candidates
-    Int_t nD0toKpi = arrayD0toKpi->GetEntriesFast();
-    nTotD0toKpi += nD0toKpi;
-    cout<<"Number of D0->Kpi: "<<nD0toKpi<<endl;
-    
-    for (Int_t iD0toKpi = 0; iD0toKpi < nD0toKpi; iD0toKpi++) {
-      AliAODRecoDecayHF2Prong *d = (AliAODRecoDecayHF2Prong*)arrayD0toKpi->UncheckedAt(iD0toKpi);
-
-      Bool_t unsetvtx=kFALSE;
-      if(!d->GetOwnPrimaryVtx()) {
-       d->SetOwnPrimaryVtx(vtx1); // needed to compute all variables
-       unsetvtx=kTRUE;
-      }
-      Int_t okD0=0,okD0bar=0; 
-      if(d->SelectD0(cutsD0,okD0,okD0bar)) {
-       //cout<<1e8*d->Prodd0d0()<<endl;
-       hMass->Fill(d->InvMassD0(),0.5);
-       hMass->Fill(d->InvMassD0bar(),0.5);
-       hCPtaVSd0d0->Fill(1e8*d->Prodd0d0(),d->CosPointingAngle());
-       hSecVtxZ->Fill(d->GetSecVtxZ());
-       //cout<<d->GetSecVtxX() <<endl;
-
-       // get daughter AOD tracks
-       AliAODTrack *trk0 = (AliAODTrack*)d->GetDaughter(0);
-       AliAODTrack *trk1 = (AliAODTrack*)d->GetDaughter(1);
-       if(!trk0 || !trk1) {
-         trk0=aod->GetTrack(trkIDtoEntry[d->GetProngID(0)]);
-         trk1=aod->GetTrack(trkIDtoEntry[d->GetProngID(1)]);
-         cout<<"references to standard AOD not available"<<endl;
-       }
-       cout<<"pt of positive track: "<<trk0->Pt()<<endl;
-
-       // make a AliNeutralTrackParam from the D0 
-       // and calculate impact parameters to primary vertex
-       AliNeutralTrackParam trackD0(d);
-       cout<<"pt of D0: "<<d->Pt()<<" (AliAODRecoDecay); "<<trackD0.Pt()<<" (track)"<<endl;
-       //trackD0.Print();
-       Double_t dz[2],covdz[3];
-       trackD0.PropagateToDCA(vtx1,aod->GetMagneticField(),1000.,dz,covdz);
-       cout<<"D0 impact parameter rphi: "<<dz[0]<<" +- "<<TMath::Sqrt(covdz[0])<<endl;
-      }
-      if(unsetvtx) d->UnsetOwnPrimaryVtx();
-    }
-
-
-    // loop over D* candidates
-    Int_t nDstar = arrayDstar->GetEntriesFast();
-    nTotDstar += nDstar;
-    cout<<"Number of D*->D0pi: "<<nDstar<<endl;
-    
-    for (Int_t iDstar = 0; iDstar < nDstar; iDstar++) {
-      AliAODRecoCascadeHF *c = (AliAODRecoCascadeHF*)arrayDstar->UncheckedAt(iDstar);
-      Bool_t unsetvtx=kFALSE;
-      if(!c->GetOwnPrimaryVtx()) {
-       c->SetOwnPrimaryVtx(vtx1); // needed to compute all variables
-       c->Get2Prong()->SetOwnPrimaryVtx(vtx1);
-       unsetvtx=kTRUE;
-      }
-      if(c->SelectDstar(cutsDstar,cutsD0)) {
-       hDeltaMassDstar->Fill(c->DeltaInvMass());
-       // get daughters
-       AliAODTrack *trk = (AliAODTrack*)c->GetBachelor();
-       AliAODRecoDecayHF2Prong *d = (AliAODRecoDecayHF2Prong*)c->Get2Prong();
-       cout<<"pt of soft pi: "<<trk->Pt()<<endl;
-       cout<<"pt of D0: "<<d->Pt()<<endl;
-      }
-
-      if(unsetvtx) {
-       c->UnsetOwnPrimaryVtx();
-       c->Get2Prong()->UnsetOwnPrimaryVtx();
-      }
-    }
-
-    
-    // count 3prong candidates
-    Int_t n3Prong = array3Prong->GetEntriesFast();
-    nTot3Prong += n3Prong;
-    cout<<"Number of Charm->3Prong: "<<n3Prong<<endl;
-    
-    // loop over HF vertices
-    Int_t nVtxsHF = arrayVerticesHF->GetEntriesFast();
-    nTotHF += nVtxsHF;
-    cout<<"Number of heavy-flavour vertices: "<<nVtxsHF<<endl;
-    for (Int_t iVtx = 0; iVtx < nVtxsHF; iVtx++) {
-      AliAODVertex *vtxHF = (AliAODVertex*)arrayVerticesHF->UncheckedAt(iVtx);
-      // print info
-      //cout << iVtx << ": vertex z position: " << vtxHF->GetZ() << endl;
-    }
-
-
-    // count cascade candidates
-    if (arrayCascades){
-      Int_t nCasc = arrayCascades->GetEntriesFast();
-      nTotCasc+=nCasc;
-      cout << "Number of Cascades: "<<nCasc<<endl;
-    }
-    
-  }
-  
-  printf("\n Total HF vertices: %d\n",nTotHF);
-  printf("\n Total D0->Kpi: %d\n",nTotD0toKpi);
-  printf("\n Total D*->D0pi: %d\n",nTotDstar);
-  printf("\n Total Charm->3Prong: %d\n",nTot3Prong);
-  if (arrayCascades) printf("\n Total Cascades: %d\n",nTotCasc);
-
-  TCanvas *c1 = new TCanvas("c1","c1",0,0,800,700);
-  c1->Divide(2,2);
-  c1->cd(1);
-  hCPtaVSd0d0->Draw("colz");
-  c1->cd(2);
-  hMass->SetFillColor(4);
-  hMass->Draw();
-  c1->cd(3);
-  hSecVtxZ->SetFillColor(2);
-  hSecVtxZ->Draw();
-  c1->cd(4);
-  hDeltaMassDstar->SetFillColor(3);
-  hDeltaMassDstar->Draw();
-
-  return;
-}
-//------------------------------------------------------------------------
-void ReadAODVertexingHFsa(const char *aodHFFileName="AliAOD.VertexingHF.sa.root") 
-{
-  //
-  // Example macro to read D0->Kpi candidates from a stand-alone
-  // heavy-flavour AOD (i.e. without standard AOD) and apply cuts
-  // Origin: A.Dainese
-  //
-  Bool_t useParFiles=kFALSE;
-  gROOT->LoadMacro("$ALICE_ROOT/PWG3/vertexingHF/LoadLibraries.C");
-  LoadLibraries(useParFiles);
-
-  // create a test histogram
-  TH2F *hCPtaVSd0d0 = new TH2F("hCPtaVSd0d0","D^{0} correlation plot",1000,-50000,50000,1000,-1,1);
-  hCPtaVSd0d0->SetXTitle("Product of impact parameters [#mu m^{2}]");
-  hCPtaVSd0d0->SetYTitle("Cosine of pointing angle");
-  TH1F *hMass = new TH1F("hMass","D^{0} mass plot",100,1.7,2);
-  hMass->SetXTitle("Invariant mass [GeV]");
-  hMass->SetYTitle("Entries");
-  TH1F *hSecVtxZ = new TH1F("hSecVtxZ","D^{0} decay vertex z",1000,-10,10);
-  hSecVtxZ->SetXTitle("z of decay vertex [cm]");
-  hSecVtxZ->SetYTitle("Entries");
-
-  // open input file and get the TTree
-  TFile inFile(aodHFFileName,"READ");
-  if (!inFile.IsOpen()) return;
-
-  TTree *aodTree = (TTree*)inFile.Get("aodTree");
-
-  AliAODEvent *aod = new AliAODEvent();
-
-  aod->ReadFromTree(aodTree);
-
-  // load heavy flavour vertices
-  TClonesArray *arrayVerticesHF = 
-    (TClonesArray*)aod->GetList()->FindObject("VerticesHF"); 
-  
-  // load D0->Kpi candidates
-  TClonesArray *arrayD0toKpi = 
-    (TClonesArray*)aod->GetList()->FindObject("D0toKpi"); 
-     
-
-  Double_t cutsD0[9]=
-  // cutsD0[0] = inv. mass half width [GeV]
-  // cutsD0[1] = dca [cm]
-  // cutsD0[2] = cosThetaStar
-  // cutsD0[3] = pTK [GeV/c]
-  // cutsD0[4] = pTPi [GeV/c]
-  // cutsD0[5] = d0K [cm]   upper limit!
-  // cutsD0[6] = d0Pi [cm]  upper limit!
-  // cutsD0[7] = d0d0 [cm^2]
-  // cutsD0[8] = cosThetaPoint
-                     {1000.,
-                     100000.,
-                     1.1,
-                     0.,
-                     0.,
-                     100000.,
-                     100000.,
-                     100000000.,
-                     -1.1}; 
-
-  Int_t nTotHF=0,nTotD0toKpi=0;
-  AliAODVertex *vtx1=0;
-
-  // loop over events
-  Int_t nEvents = aodTree->GetEntries();
-  for (Int_t nEv = 0; nEv < nEvents; nEv++) {
-    cout<<"\n------------ Event: "<<nEv<<" ------------------"<<endl;
-
-    // read event
-    aodTree->GetEvent(nEv);
-    //aodTree->BranchRef();
-
-    
-    // loop over D0->Kpi candidates
-    Int_t nD0toKpi = arrayD0toKpi->GetEntriesFast();
-    nTotD0toKpi += nD0toKpi;
-    cout<<"Number of D0->Kpi: "<<nD0toKpi<<endl;
-    
-    for (Int_t iD0toKpi = 0; iD0toKpi < nD0toKpi; iD0toKpi++) {
-      AliAODRecoDecayHF2Prong *d = (AliAODRecoDecayHF2Prong*)arrayD0toKpi->UncheckedAt(iD0toKpi);
-      Int_t okD0=0,okD0bar=0; 
-      if(d->SelectD0(cutsD0,okD0,okD0bar)) {
-       //cout<<1e8*d->Prodd0d0()<<endl;
-       hMass->Fill(d->InvMassD0(),0.5);
-       hMass->Fill(d->InvMassD0bar(),0.5);
-       hCPtaVSd0d0->Fill(1e8*d->Prodd0d0(),d->CosPointingAngle());
-       hSecVtxZ->Fill(d->GetSecVtxZ());
-       //cout<<d->GetSecVtxZ() <<endl;
-
-      }
-    }
-    
-  }
-  
-  printf("\n Total D0->Kpi: %d\n",nTotD0toKpi);
-
-  TCanvas *c = new TCanvas("c","c",0,0,1000,1000);
-  c->Divide(2,2);
-  c->cd(1);
-  hCPtaVSd0d0->Draw("colz");
-  c->cd(2);
-  hMass->SetFillColor(4);
-  hMass->Draw();
-  c->cd(3);
-  hSecVtxZ->SetFillColor(2);
-  hSecVtxZ->Draw();
-
-  return;
-}