using refmult
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 19 Sep 2011 23:52:28 +0000 (23:52 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 19 Sep 2011 23:52:28 +0000 (23:52 +0000)
PWG2/FLOW/macros/AddTaskFlow.C
PWG2/FLOW/macros/AddTaskFlowCentrality.C
PWG2/FLOW/macros/runFlowTask.C

index 444df54..91766fc 100644 (file)
@@ -43,7 +43,7 @@ void AddTaskFlow(Float_t centrMin=-1,
   Bool_t  UsePhysicsSelection = kTRUE;
 
   // charge of poi
-  const Int_t    chargePOI = 1; 
+  const Int_t  chargePOI = 1; 
 
   // QA
   Bool_t runQAtask=kFALSE;
@@ -58,11 +58,11 @@ void AddTaskFlow(Float_t centrMin=-1,
   Bool_t QC       = kTRUE;  // cumulants using Q vectors
   Bool_t FQD      = kTRUE;  // fit of the distribution of the Q vector (only integrated v)
   Bool_t LYZ1SUM  = kTRUE;  // Lee Yang Zeroes using sum generating function (integrated v)
-  Bool_t LYZ1PROD = kFALSE;  // Lee Yang Zeroes using product generating function (integrated v)
+  Bool_t LYZ1PROD = kTRUE;  // Lee Yang Zeroes using product generating function (integrated v)
   Bool_t LYZ2SUM  = kFALSE; // Lee Yang Zeroes using sum generating function (second pass differential v)
   Bool_t LYZ2PROD = kFALSE; // Lee Yang Zeroes using product generating function (second pass differential v)
   Bool_t LYZEP    = kFALSE; // Lee Yang Zeroes Event plane using sum generating function (gives eventplane + weight)
-  Bool_t MH       = kTRUE;  // azimuthal correlators in mixed harmonics  
+  Bool_t MH       = kFALSE;  // azimuthal correlators in mixed harmonics  
   Bool_t NL       = kFALSE;  // nested loops (for instance distribution of phi1-phi2 for all distinct pairs)
 
   Bool_t METHODS[] = {SP,LYZ1SUM,LYZ1PROD,LYZ2SUM,LYZ2PROD,LYZEP,GFC,QC,FQD,MCEP,MH,NL};
@@ -74,8 +74,8 @@ void AddTaskFlow(Float_t centrMin=-1,
 
   //---------Data selection----------
   //kMC, kGlobal, kTPCstandalone, kSPDtracklet, kPMD
-  AliFlowTrackCuts::trackParameterType rptype = AliFlowTrackCuts::kGlobal;
-  AliFlowTrackCuts::trackParameterType poitype = AliFlowTrackCuts::kGlobal;
+  AliFlowTrackCuts::trackParameterType rptype = AliFlowTrackCuts::kTPCstandalone;
+  AliFlowTrackCuts::trackParameterType poitype = AliFlowTrackCuts::kTPCstandalone;
 
   //---------Parameter mixing--------
   //kPure - no mixing, kTrackWithMCkine, kTrackWithMCPID, kTrackWithMCpt
@@ -105,16 +105,20 @@ void AddTaskFlow(Float_t centrMin=-1,
   if((centrMin > 0)||(centrMax > 0)) {
     cutsEvent->SetCentralityPercentileRange(centrMin,centrMax);
     cutsEvent->SetCentralityPercentileMethod(AliFlowEventCuts::kV0);
-    cutsEvent->SetRefMultMethod(AliFlowEventCuts::kV0);
     //cutsEvent->SetCentralityPercentileMethod(AliFlowEventCuts::kSPD1tracklets);
-    cutsEvent->SetNContributorsRange(2);
-    cutsEvent->SetPrimaryVertexZrange(-10.,10.);
-    cutsEvent->SetCutSPDvertexerAnomaly(); //"Francesco's cut"
-    cutsEvent->SetCutZDCtiming();
   }
+  cutsEvent->SetNContributorsRange(2);
+  cutsEvent->SetPrimaryVertexZrange(-10.,10.);
+  //cutsEvent->SetCutSPDvertexerAnomaly(); //"Francesco's cut"
+  //cutsEvent->SetCutZDCtiming();
+
+  // Reference multiplicity:
+  cutsEvent->SetRefMultMethod(AliESDtrackCuts::kTrackletsITSTPC); // Tracklets + Global tracks (default)
+  //cutsEvent->SetRefMultMethod(AliESDtrackCuts::kTrackletsITSSA); // Tracklets + ITS SA tracks 
+  //cutsEvent->SetRefMultMethod(AliESDtrackCuts::kTracklets); // Tracklets
   
   // RP TRACK CUTS:
-  AliFlowTrackCuts* cutsRP = new AliFlowTrackCuts("rp cuts");
+  AliFlowTrackCuts* cutsRP = new AliFlowTrackCuts("kTPCstandaloneRP");
   cutsRP->SetParamType(rptype);
   cutsRP->SetParamMix(rpmix);
   cutsRP->SetPtRange(0.2,5.);
@@ -122,67 +126,52 @@ void AddTaskFlow(Float_t centrMin=-1,
   //cutsRP->SetRequireCharge(kTRUE);
   //cutsRP->SetCharge(chargeRP);
   //cutsRP->SetPID(PdgRP);
-  if(rptype != AliFlowTrackCuts::kMC) {
-    cutsRP->SetMinNClustersTPC(70);
-    cutsRP->SetMinChi2PerClusterTPC(0.1);
-    cutsRP->SetMaxChi2PerClusterTPC(4.0);
-    cutsRP->SetMinNClustersITS(2);
-    cutsRP->SetRequireITSRefit(kTRUE);
-    cutsRP->SetRequireTPCRefit(kTRUE);
-    //cutsRP->SetMaxChi2PerClusterITS(1.e+09);
-    cutsRP->SetMaxDCAToVertexXY(0.3);
-    cutsRP->SetMaxDCAToVertexZ(0.3);
-    //cutsRP->SetDCAToVertex2D(kTRUE);
-    //cutsRP->SetMaxNsigmaToVertex(1.e+10);
-    //cutsRP->SetRequireSigmaToVertex(kFALSE);
-    cutsRP->SetAcceptKinkDaughters(kFALSE);
-  }
-  if(rptype == AliFlowTrackCuts::kPMD) {
-    cutsRP->SetEtaRange(2.3,3.9);
-    cutsRP->SetPmdDetPlane(0);
-    cutsRP->SetPmdAdc(270);
-    cutsRP->SetPmdNcell(1);
-  }
-
+  cutsRP->SetMinNClustersTPC(70);
+  cutsRP->SetMinChi2PerClusterTPC(0.1);
+  cutsRP->SetMaxChi2PerClusterTPC(4.0);
+  //cutsRP->SetMinNClustersITS(2);
+  //cutsRP->SetRequireITSRefit(kTRUE);
+  //cutsRP->SetRequireTPCRefit(kTRUE);
+  //cutsRP->SetMaxChi2PerClusterITS(1.e+09);
+  cutsRP->SetMaxDCAToVertexXY(3.);
+  cutsRP->SetMaxDCAToVertexZ(3.);
+  //cutsRP->SetDCAToVertex2D(kTRUE);
+  //cutsRP->SetMaxNsigmaToVertex(1.e+10);
+  //cutsRP->SetRequireSigmaToVertex(kFALSE);
+  cutsRP->SetAcceptKinkDaughters(kFALSE);
+  //cutsRP->SetMinimalTPCdedx(10.);
 
   // POI TRACK CUTS:
-  AliFlowTrackCuts* cutsPOI = new AliFlowTrackCuts("poi cuts");
+  AliFlowTrackCuts* cutsPOI = new AliFlowTrackCuts("kTPCstandalonePOI");
   cutsPOI->SetParamType(poitype);
   cutsPOI->SetParamMix(poimix);
   cutsPOI->SetPtRange(0.0,10.);
   cutsPOI->SetEtaRange(-1.2,1.2);
-  if(chargePOI != 0)
-    cutsPOI->SetCharge(chargePOI);
   //cutsPOI->SetRequireCharge(kTRUE);
+  //cutsPOI->SetCharge(chargeRP);
   //cutsPOI->SetPID(PdgRP);
-  if(rptype != AliFlowTrackCuts::kMC) {
-    cutsPOI->SetMinNClustersTPC(80);
-    cutsPOI->SetMinChi2PerClusterTPC(0.1);
-    cutsPOI->SetMaxChi2PerClusterTPC(4.0);
-    cutsPOI->SetRequireITSRefit(kTRUE);
-    cutsPOI->SetRequireTPCRefit(kTRUE);
-    cutsPOI->SetMinNClustersITS(2);
-    //cutsPOI->SetMaxChi2PerClusterITS(1.e+09);
-    cutsPOI->SetMaxDCAToVertexXY(0.3);
-    cutsPOI->SetMaxDCAToVertexZ(0.3);
-    //cutsPOI->SetDCAToVertex2D(kTRUE);
-    //cutsPOI->SetMaxNsigmaToVertex(1.e+10);
-    //cutsPOI->SetRequireSigmaToVertex(kFALSE);
-    cutsPOI->SetAcceptKinkDaughters(kFALSE);
-    //cutsPOI->SetPID(AliPID::kProton, AliFlowTrackCuts::kTOFpid);
-    //cutsPOI->SetPID(AliPID::kPion, AliFlowTrackCuts::kTPCpid);
-    //cutsPOI->SetPID(AliPID::kProton, AliFlowTrackCuts::kTPCTOFpid);
-    //cutsPOI->SetTPCTOFpidCrossOverPt(0.4);
-    //francesco's TPC Bethe Bloch for data:
-    //cutsPOI->GetESDpid().GetTPCResponse().SetBetheBlochParameters(4.36414e-02,1.75977e+01,1.14385e-08,2.27907e+00,3.36699e+00);
-    //cutsPOI->GetESDpid().GetTPCResponse().SetMip(49);
-  }
-  if(poitype == AliFlowTrackCuts::kPMD) {
-    cutsPOI->SetEtaRange(2.3,3.9);
-    cutsPOI->SetPmdDetPlane(0);
-    cutsPOI->SetPmdAdc(270);
-    cutsPOI->SetPmdNcell(1);
-  }
+  cutsPOI->SetMinNClustersTPC(80);
+  cutsPOI->SetMinChi2PerClusterTPC(0.1);
+  cutsPOI->SetMaxChi2PerClusterTPC(4.0);
+  //cutsPOI->SetRequireITSRefit(kTRUE);
+  //cutsPOI->SetRequireTPCRefit(kTRUE);
+  //cutsPOI->SetMinNClustersITS(2);
+  //cutsPOI->SetMaxChi2PerClusterITS(1.e+09);
+  cutsPOI->SetMaxDCAToVertexXY(3.);
+  cutsPOI->SetMaxDCAToVertexZ(3.);
+  //cutsPOI->SetDCAToVertex2D(kTRUE);
+  //cutsPOI->SetMaxNsigmaToVertex(1.e+10);
+  //cutsPOI->SetRequireSigmaToVertex(kFALSE);
+  cutsPOI->SetAcceptKinkDaughters(kFALSE);
+  //cutsPOI->SetMinimalTPCdedx(10.);
+  //cutsPOI->SetPID(AliPID::kProton, AliFlowTrackCuts::kTOFpid);
+  //cutsPOI->SetPID(AliPID::kPion, AliFlowTrackCuts::kTPCpid);
+  //cutsPOI->SetPID(AliPID::kProton, AliFlowTrackCuts::kTPCdedx);
+  //cutsPOI->SetPID(AliPID::kProton, AliFlowTrackCuts::kTOFbeta);
+  //cutsPOI->SetAllowTOFmismatch(kFALSE);
+  //iexample: francesco's tunig TPC Bethe Bloch for data:
+  //cutsPOI->GetESDpid().GetTPCResponse().SetBetheBlochParameters(4.36414e-02,1.75977e+01,1.14385e-08,2.27907e+00,3.36699e+00);
+  //cutsPOI->GetESDpid().GetTPCResponse().SetMip(49);
 
 
   Bool_t useWeights  = WEIGHTS[0] || WEIGHTS[1] || WEIGHTS[2];
@@ -403,8 +392,10 @@ void AddTaskFlow(Float_t centrMin=-1,
     taskQC->SetUseEtaWeights(WEIGHTS[2]); 
     taskQC->SetnBinsMult(10000);
     taskQC->SetMinMult(0.);
-    taskQC->SetMaxMult(10000.);
-    taskQC->SetApplyCorrectionForNUA(kTRUE);
+    taskQC->SetMaxMult(10000.);    
+    taskQC->SetCalculateCumulantsVsM(kTRUE);
+    taskQC->SetCalculateDiffFlow(kFALSE);
+    taskQC->SetApplyCorrectionForNUA(kFALSE);
     mgr->AddTask(taskQC);
   }
   if (FQD){
index dd7036b..e6fd53a 100644 (file)
@@ -86,14 +86,18 @@ void AddTaskFlowCentrality( Float_t centrMin=0.,
   AliFlowEventCuts* cutsEvent = new AliFlowEventCuts("event cuts");
   cutsEvent->SetCentralityPercentileRange(centrMin,centrMax);
   cutsEvent->SetCentralityPercentileMethod(AliFlowEventCuts::kV0);
-  cutsEvent->SetRefMultMethod(AliFlowEventCuts::kV0);
   //cutsEvent->SetCentralityPercentileMethod(AliFlowEventCuts::kSPD1tracklets);
   cutsEvent->SetNContributorsRange(2);
   cutsEvent->SetPrimaryVertexZrange(-7.,7.);
-  cutsEvent->SetCutSPDvertexerAnomaly(); //"Francesco's cut"
-  cutsEvent->SetCutZDCtiming();
+  //cutsEvent->SetCutSPDvertexerAnomaly(); //"Francesco's cut"
+  //cutsEvent->SetCutZDCtiming();
   //cutsEvent->SetCutTPCmultiplicityOutliers();
   //cutsEvent->SetUseCentralityUnchecked();
+
+  // Reference multiplicity:
+  cutsEvent->SetRefMultMethod(AliESDtrackCuts::kTrackletsITSTPC); // Tracklets + Global tracks (default)
+  //cutsEvent->SetRefMultMethod(AliESDtrackCuts::kTrackletsITSSA); // Tracklets + ITS SA tracks 
+  //cutsEvent->SetRefMultMethod(AliESDtrackCuts::kTracklets); // Tracklets
   
   // RP TRACK CUTS:
   AliFlowTrackCuts* cutsRP = new AliFlowTrackCuts("GlobalRP");
index bd55eb6..db82aeb 100644 (file)
@@ -4,8 +4,8 @@ enum anaModes {mLocal,mLocalPAR,mPROOF,mGrid,mGridPAR};
 //mPROOF: Analyze CAF files with PROOF
 //mGrid: Analyze files on Grid via AliEn plug-in and using precompiled FLOW libraries
 //       (Remark: When using this mode set also Bool_t bUseParFiles = kFALSE; in CreateAlienHandler.C)
-//mGridPAR: Analyze files on Grid via AliEn plug-in and using par files for FLOW package
-//          (Remark: when using this mode set also Bool_t bUseParFiles = kTRUE; in CreateAlienHandler.C)
+//mGrid + par files: Analyze files on Grid via AliEn plug-in and using par files for FLOW package.
+//                   Simply set Int_t mode = mGrid and Bool_t useFlowParFiles = kTRUE as arguments.
  
 // CENTRALITY DEFINITION
 Bool_t kUseCentrality = kFALSE;
@@ -15,7 +15,7 @@ const Int_t numberOfCentralityBins = 9;
 Float_t centralityArray[numberOfCentralityBins+1] = {0.,5.,10.,20.,30.,40.,50.,60.,70.,80.}; // in centrality percentile
 //Int_t centralityArray[numberOfCentralityBins+1] = {41,80,146,245,384,576,835,1203,1471,10000}; // in terms of TPC only reference multiplicity
 
-TString commonOutputFileName = "outputCentrality"; // e.g.: result for centrality bin 0 will be in the file "outputCentrality0.root", etc
+TString commonOutputFileName = "AnalysisResults"; // e.g.: result for centrality bin 0 will be in the file "outputCentrality0.root", etc
 
 
 //void runFlowTask(Int_t mode=mLocal, Int_t nRuns = 10, 
@@ -23,9 +23,13 @@ TString commonOutputFileName = "outputCentrality"; // e.g.: result for centralit
 
 //void runFlowTask(Int_t mode = mGridPAR, Int_t nRuns = 50000000, 
 //              Bool_t DATA = kTRUE, const Char_t* dataDir="/alice/data/LHC10h_000137161_p1_plusplusplus", Int_t offset=0) 
-void runFlowTask(Int_t mode = mLocal, Int_t nRuns = 50000000, 
-                Bool_t DATA = kTRUE, const Char_t* dataDir="./data/", Int_t offset=0) 
+//void runFlowTask(Int_t mode = mLocal, Int_t nRuns = 50000000, 
+//              Bool_t DATA = kTRUE, const Char_t* dataDir="./data/", Int_t offset=0) 
 //void runFlowTask(Int_t mode = mGridPAR, Bool_t DATA = kTRUE)
+void runFlowTask(Int_t mode = mGrid,
+                 Bool_t useFlowParFiles = kFALSE,
+                 Bool_t DATA = kTRUE,
+                 Bool_t useTender = kFALSE)
 {
   // Time:
   TStopwatch timer;
@@ -33,19 +37,19 @@ void runFlowTask(Int_t mode = mLocal, Int_t nRuns = 50000000,
   // Cross-check user settings before starting:
   //  CrossCheckUserSettings(DATA);
   // Load needed libraries:
-  LoadLibraries(mode);
+  LoadLibraries(mode,useFlowParFiles);
   // Create and configure the AliEn plug-in:
   if(mode == mGrid || mode == mGridPAR) 
     {    
       gROOT->LoadMacro("CreateAlienHandler.C");
-      AliAnalysisGrid *alienHandler = CreateAlienHandler();  
+      AliAnalysisGrid *alienHandler = CreateAlienHandler(useFlowParFiles);  
       if(!alienHandler) return;
     }
   // Chains: 
   if(mode == mLocal || mode == mLocalPAR) {
     TChain *chain = new TChain("esdTree");
-    chain->Add("/home/pchrist/ALICE/HeavyIons/Data/137161/Set1/AliESDs.root");
-    //TChain* chain = CreateESDChain(dataDir, nRuns, offset);
+    //chain->Add("/home/pchrist/ALICE/HeavyIons/Data/137161/Set1/AliESDs.root");
+    TChain* chain = CreateESDChain(dataDir, nRuns, offset);
     //TChain* chain = CreateAODChain(dataDir, nRuns, offset);
   }
   
@@ -89,7 +93,7 @@ void runFlowTask(Int_t mode = mLocal, Int_t nRuns = 50000000,
   }
   AddTaskFlow(kLowCentralityBin,
              kHighCentralityBin,
-             commonOutputFileName );
+             commonOutputFileName);
 
   // Enable debug printouts:
   mgr->SetDebugLevel(2);
@@ -123,13 +127,13 @@ void CrossCheckUserSettings(Bool_t bData)
 */
 //===============================================================================================
 
-void LoadLibraries(const anaModes mode) 
+void LoadLibraries(const anaModes mode, Bool_t useFlowParFiles )
 {
   //--------------------------------------
   // Load the needed libraries most of them already loaded by aliroot
   //--------------------------------------
 
-  gSystem->Load("libCore");  
+  gSystem->Load("libCore");
   gSystem->Load("libTree");
   gSystem->Load("libGeom");
   gSystem->Load("libVMC");
@@ -138,8 +142,8 @@ void LoadLibraries(const anaModes mode)
   gSystem->Load("libXMLParser");
   gSystem->Load("libProof");
   gSystem->Load("libMinuit");
-  
-  if (mode==mLocal || mode==mGrid || mode == mGridPAR || mode == mLocalPAR )
+
+  if (mode==mLocal || mode==mGrid)
   {
     gSystem->Load("libSTEERBase");
     gSystem->Load("libCDB");
@@ -149,85 +153,64 @@ void LoadLibraries(const anaModes mode)
     gSystem->Load("libAOD");
     gSystem->Load("libSTEER");
     gSystem->Load("libANALYSIS");
-    gSystem->Load("libANALYSISalice");   
-    gSystem->Load("libTOFbase"); 
-    gSystem->Load("libTOFrec"); 
+    gSystem->Load("libANALYSISalice");
+    gSystem->Load("libTPCbase");
+    gSystem->Load("libTOFbase");
+    gSystem->Load("libTOFrec");
+    gSystem->Load("libTRDbase");
+    gSystem->Load("libVZERObase");
+    gSystem->Load("libVZEROrec");
+    gSystem->Load("libT0base");
+    gSystem->Load("libT0rec");
     gSystem->Load("libTENDER");
+    gSystem->Load("libTENDERSupplies");
 
-    if (mode == mLocal || mode == mGrid)
+    if (useFlowParFiles)
     {
-      gSystem->Load("libTENDERSupplies");
-      gSystem->Load("libPWG2flowCommon"); 
-      gSystem->Load("libPWG2flowTasks"); 
-    }
-    if (mode == mLocalPAR || mode == mGridPAR )
-    {
-      AliAnalysisAlien::SetupPar("TENDERSupplies");
       AliAnalysisAlien::SetupPar("PWG2flowCommon");
       AliAnalysisAlien::SetupPar("PWG2flowTasks");
     }
+    else
+    {
+      gSystem->Load("libPWG2flowCommon");
+      gSystem->Load("libPWG2flowTasks");
+    }
   }
-  
-  //---------------------------------------------------------
-  // <<<<<<<<<< PROOF mode >>>>>>>>>>>>
-  //---------------------------------------------------------
-  else if (mode==mPROOF) {
-    //  set to debug root versus if needed
-    //TProof::Mgr("alicecaf")->SetROOTVersion("v5-24-00a_dbg");
-    //TProof::Mgr("alicecaf")->SetROOTVersion("v5-24-00a");
-    //TProof::Reset("proof://snelling@alicecaf.cern.ch");     
+  else if (mode==mPROOF)
+  {
+    TList* list = new TList();
+    list->Add(new TNamed("ALIROOT_MODE", "ALIROOT"));
+    if (useFlowParFiles)
+      list->Add(new TNamed("ALIROOT_EXTRA_LIBS", "ANALYSIS:ANALYSISalice:TENDER:TENDERSupplies"));
+    else
+      list->Add(new TNamed("ALIROOT_EXTRA_LIBS", "ANALYSIS:ANALYSISalice:TENDER:TENDERSupplies:PWG2flowCommon:PWG2flowTasks"));
+
+    //list->Add(new TNamed("ALIROOT_EXTRA_INCLUDES","PWG2/FLOW/AliFlowCommon:PWG2/FLOW/AliFlowTasks"));
+
     // Connect to proof
     printf("*** Connect to PROOF ***\n");
     gEnv->SetValue("XSec.GSI.DelegProxy","2");
-    TProof::Open("mkrzewic@alice-caf.cern.ch");
-    //TProof::Open("mkrzewic@skaf.saske.sk");
-     // list the data available
-    //gProof->ShowDataSets("/*/*"); 
+    //TProof* proof = TProof::Open("alice-caf.cern.ch");
+    TProof* proof = TProof::Open("skaf.saske.sk");
+
+    // list the data available
+    //gProof->ShowDataSets("/*/*");
     //gProof->ShowDataSets("/alice/sim/"); //for MC Data
-    //gProof->ShowDataSets("/alice/data/"); //for REAL Data 
-    // Clear the Packages
-    /*    
-    gProof->ClearPackage("STEERBase.par");
-    gProof->ClearPackage("ESD.par");
-    gProof->ClearPackage("AOD.par");
-    */
-    //gProof->ClearPackage("ANALYSIS.par");
-    //gProof->ClearPackage("ANALYSISalice.par");
-    //gProof->ClearPackage("CORRFW.par");
-    
-    gProof->ClearPackage("PWG2flowCommon");
-    gProof->ClearPackage("PWG2flowTasks");
-    
-    // Upload the Packages
-    //gProof->UploadPackage("STEERBase.par");
-    //gProof->UploadPackage("ESD.par");    
-    //gProof->UploadPackage("AOD.par");
-       
-    //gProof->UploadPackage("ANALYSIS.par"); 
-    //gProof->UploadPackage("ANALYSISalice.par");
-    gProof->UploadPackage("CORRFW.par");
-    gProof->UploadPackage("PWG2flowCommon.par");
-    gProof->UploadPackage("PWG2flowTasks.par");
-    gProof->UploadPackage("ALIRECO.par");
+    //gProof->ShowDataSets("/alice/data/"); //for REAL Data
 
-    // Enable the Packages 
-    // The global package
-    TList* list = new TList();
-    list->Add(new TNamed("ALIROOT_EXTRA_INCLUDES","RAW:OCDB:STEER:TOF"));
-    gProof->EnablePackage("VO_ALICE@AliRoot::v4-21-07-AN",list);
-    gProof->EnablePackage("ALIRECO");
-    //gProof->EnablePackage("ANALYSIS");
-    //gProof->EnablePackage("ANALYSISalice");
-    //gProof->EnablePackage("CORRFW");
-    gProof->EnablePackage("PWG2flowCommon");
-    gProof->EnablePackage("PWG2flowTasks");
+    proof->ClearPackages();
+    proof->EnablePackage("VO_ALICE@AliRoot::v4-21-14-AN",list);
+
+    if (useFlowParFiles)
+    {
+      gProof->UploadPackage("PWG2flowCommon.par");
+      gProof->UploadPackage("PWG2flowTasks.par");
+    }
 
     // Show enables Packages
     gProof->ShowEnabledPackages();
-  }  
-  
-} // end of void LoadLibraries(const anaModes mode) 
+  }
+} // end of void LoadLibraries(const anaModes mode)
 
 // Helper macros for creating chains
 // from: CreateESDChain.C,v 1.10 jgrosseo Exp