]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
remove obsolate TPC macros
authorjotwinow <jotwinow@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 29 Nov 2009 19:59:17 +0000 (19:59 +0000)
committerjotwinow <jotwinow@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 29 Nov 2009 19:59:17 +0000 (19:59 +0000)
PWG1/macros/AddPerformanceTask.C [deleted file]
PWG1/macros/AddPerformanceTask.h [deleted file]
PWG1/macros/LoadMyLibs.C [deleted file]
PWG1/macros/MergeOutput.C [deleted file]
PWG1/macros/ProofEnableAliRoot.C [deleted file]
PWG1/macros/RunPerformanceTask.C [deleted file]
PWG1/macros/RunPerformanceTaskMC.C [deleted file]

diff --git a/PWG1/macros/AddPerformanceTask.C b/PWG1/macros/AddPerformanceTask.C
deleted file mode 100644 (file)
index 32b9e92..0000000
+++ /dev/null
@@ -1,183 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Macro to setup AliPerformanceTask for 
-// TPC performance to be run on QA train
-//
-// By default 6 performance components are added to 
-// the output: 
-// 1. AliPerformanceRes (TPC track resolution at DCA)
-// 2. AliPerformanceResTPCInner (TPC track resolution at inner TPC wall)
-// 3. AliPerformanceEff (TPC track reconstruction efficieny)
-// 4. AliPerformanceDEdxTPCInner (TPC dEdx response - track parameters at TPC inner wall)
-// 5. AliPerformanceDCA (TPC impact parameter resolution at DCA)
-// 6. AliPerformanceTPC (TPC cluster and track information)
-//
-//
-// To use these components one needs to have access to ESD and MC events 
-// and track references.
-//
-// Usage on the analysis train:
-// #include "AddPerformanceTask.h"
-// #include "PWG1/macros/AddPerformanceTask.C"
-//
-// gSystem->Load("libPWG1.so");
-//
-// AliAnalysisManager *mgr = new AliAnalysisManager("Post Reconstruction QA");
-// gROOT->LoadMacro("$ALICE_ROOT/PWG1/macros/AddPerformanceTask.C")
-// AddPerformanceTask(mgr,"ALL");
-// 
-// 
-// Output:
-// TPC.PerformanceTask.root file with performance components is created.
-//
-// Each of the components contains THnSparse generic histograms which 
-// have to be analysed by using Analyse() function. Each component contains such function.
-//
-//24.04.2009 -  J.Otwinowski@gsi.de
-///////////////////////////////////////////////////////////////////////////////
-
-#if ! defined (__CINT__) || defined (__MAKECINT__)
-#include <Riostream.h>
-
-#include "TROOT.h"
-#include "TClass.h"
-#include "TError.h"
-
-#include "AliLog.h"
-#include "AliAnalysisManager.h"
-#include "PWG1/AliPerformanceTask.h"
-#include "PWG1/AliPerformanceObject.h"
-#include "PWG1/AliPerformanceEff.h"
-#include "PWG1/AliPerformanceDEdx.h"
-#include "PWG1/AliPerformanceTPC.h"
-#include "PWG1/AliPerformanceDCA.h"
-#include "PWG1/AliPerformanceRes.h"
-#include "PWG1/AliMCInfoCuts.h"
-#include "PWG1/AliRecInfoCuts.h"
-#include "PWG1/macros/AddPerformanceTask.h"
-#endif
-
-Int_t ParseTPC(Char_t *tpc);
-
-//____________________________________________
-void AddPerformanceTask(AliAnalysisManager *mgr=0, Char_t *tpc="ALL")
-{
-  if(!mgr) { 
-    Error("AddPerformanceTask","AliAnalysisManager not set!");
-    return;
-  }
-  // parse options
-  Int_t fSteerTPC = ParseTPC(tpc);
-
-  // Add task
-  AliPerformanceTask *task = new AliPerformanceTask("Performance","TPC Performance");
-  if (!task) return;
-  if ( mgr->GetMCtruthEventHandler() ) task->SetUseMCInfo(kTRUE);
-  mgr->AddTask(task);
-
-  // Create TPC-ESD track reconstruction cuts
-  AliRecInfoCuts *pRecInfoCuts = new AliRecInfoCuts(); 
-  if(pRecInfoCuts) {
-    pRecInfoCuts->SetMaxDCAToVertexXY(3.0);
-    pRecInfoCuts->SetMaxDCAToVertexZ(3.0);
-    pRecInfoCuts->SetMinNClustersTPC(50);
-    pRecInfoCuts->SetMinNClustersITS(2);
-    pRecInfoCuts->SetHistogramsOn(kFALSE); 
-  }
-  // Create TPC-MC track reconstruction cuts
-  AliMCInfoCuts  *pMCInfoCuts = new AliMCInfoCuts();
-  if(pMCInfoCuts) {
-    pMCInfoCuts->SetMinTrackLength(50);
-  }
-
-  //
-  // Create performance objects for TPC and set cuts 
-  //
-
-  // TPC at DCA
-  TClass ctask; AliPerformanceObject *perf = 0x0;
-  for(Int_t icomp=0; icomp<NTPCTASKS; icomp++) {
-    if(!(TSTTPCBIT(fSteerTPC, icomp))) continue;
-    TString  s(fgkTPCtaskClassName[icomp]);
-    if(s.CompareTo("AliPerformanceEff") == 0) {
-      task->AddPerformanceObject((perf = new AliPerformanceEff(fgkTPCtaskClassName[icomp],fgkTPCtaskClassName[icomp],kTPCMode,fHpt)));
-    } else if (s.CompareTo("AliPerformanceRes") == 0) {
-      task->AddPerformanceObject((perf = new AliPerformanceRes(fgkTPCtaskClassName[icomp],fgkTPCtaskClassName[icomp],kTPCMode,fHpt)));
-    } else if (s.CompareTo("AliPerformanceTPC") == 0) {
-      task->AddPerformanceObject((perf = new AliPerformanceTPC(fgkTPCtaskClassName[icomp],fgkTPCtaskClassName[icomp],kTPCMode,fHpt)));
-    } else if (s.CompareTo("AliPerformanceDCA") == 0) {
-      task->AddPerformanceObject((perf = new AliPerformanceDCA(fgkTPCtaskClassName[icomp],fgkTPCtaskClassName[icomp],kTPCMode,fHpt)));
-    } else {
-      Warning("No TPC at DCA mode for ",fgkTPCtaskClassName[icomp]);
-    }
-    perf->SetAliMCInfoCuts(pMCInfoCuts);
-    perf->SetAliRecInfoCuts(pRecInfoCuts);
-  }
-
-  // TPC at inner wall
-  for(Int_t icomp=0; icomp<NTPCTASKS; icomp++) {
-    if(!(TSTTPCBIT(fSteerTPC, icomp))) continue;
-    TString  s(fgkTPCtaskClassName[icomp]);
-    if(s.CompareTo("AliPerformanceRes") == 0) {
-      task->AddPerformanceObject((perf = new AliPerformanceRes("AliPerformanceResTPCInner","AliPerformanceResTPCInner",kTPCInnerMode,fHpt)));
-    } else if (s.CompareTo("AliPerformanceDEdx") == 0) {
-      task->AddPerformanceObject((perf = new AliPerformanceDEdx("AliPerformanceDEdxTPCInner","AliPerformanceDEdxTPCInner",kTPCInnerMode,fHpt)));
-    } else {
-      Warning("No TPC at inner wall mode for ",fgkTPCtaskClassName[icomp]);
-    } 
-    perf->SetAliMCInfoCuts(pMCInfoCuts);
-    perf->SetAliRecInfoCuts(pRecInfoCuts);
-  }
-
-  // Create containers for input
-  AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
-  mgr->ConnectInput(task, 0, cinput);
-
-  // Create containers for output
-  AliAnalysisDataContainer *coutput = mgr->CreateContainer("coutput", TList::Class(), AliAnalysisManager::kOutputContainer, Form("TPC.%s.root", task->GetName()));
-  mgr->ConnectOutput(task, 0, coutput);
-
-  // Enable debug printouts
-  mgr->SetDebugLevel(0);
-}
-
-//____________________________________________
-Int_t ParseTPC(Char_t *tpc)
-{
-  Printf("---------------------------------------");
-  Printf("TPC Performance Task Configuration Options:");
-  Printf("---------------------------------------");
-  for(int i=0; i<NTPCTASKS+1; i++) {
-    Printf("%s",fgkTPCtaskOpt[i]);
-  } 
-  Printf("%s","HPT");
-  Printf("---------------------------------------");
-  Printf("Used Options:");
-  Printf("---------------------------------------");
-
-  Int_t fSteerTask = 0;
-  TObjArray *tasksArray = TString(tpc).Tokenize(" ");
-  for(Int_t isel = 0; isel < tasksArray->GetEntriesFast(); isel++){
-    TString s = (dynamic_cast<TObjString *>(tasksArray->UncheckedAt(isel)))->String();
-    if(s.CompareTo("ALL") == 0) {
-      Printf("%s","ALL");
-      for(Int_t itask = 0; itask < NTPCPERFORMANCE; itask++) SETTPCBIT(fSteerTask, itask);
-      continue;
-    }
-    else if(s.CompareTo("HPT") == 0) {
-      fHpt = kTRUE;
-      Printf("%s","HPT");
-    } else { 
-      Bool_t foundOpt = kFALSE;  
-      for(Int_t itask = 0; itask < NTPCTASKS; itask++) {
-        if(s.CompareTo(fgkTPCtaskOpt[itask]) != 0) continue;
-        SETTPCBIT(fSteerTask, itask); //SETTPCBIT(fSteerTask, 0);
-        foundOpt = kTRUE;
-        Printf("%s", fgkTPCtaskOpt[itask]);
-        break;
-      }
-      if(!foundOpt) Info("run.C", Form("TPC task %s not implemented (yet).", s.Data()));
-    }
-  }
-  Printf("---------------------------------------");
-  return fSteerTask;
-}
diff --git a/PWG1/macros/AddPerformanceTask.h b/PWG1/macros/AddPerformanceTask.h
deleted file mode 100644 (file)
index bc770be..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef ADDPERFORMANCETASK_H
-#define ADDPERFORMANCETASK_H
-
-#define TPCBIT(n)      (1 << (n))
-#define SETTPCBIT(n,i) ((n) |= TPCBIT(i))
-#define TSTTPCBIT(n,i) ((Bool_t)(((n) & TPCBIT(i)) != 0))
-#define CLRTPCBIT(n,i) ((n) &= ~TPCBIT(i))
-
-#define NTPCPERFORMANCE 5
-#define NTPCCALIBRATION 0
-const Int_t NTPCTASKS = NTPCPERFORMANCE+NTPCCALIBRATION;
-
-Char_t *fgkTPCtaskClassName[NTPCTASKS] = {
-"AliPerformanceEff"
-,"AliPerformanceRes"
-,"AliPerformanceTPC"
-,"AliPerformanceDEdx"
-,"AliPerformanceDCA"
-};
-
-const Char_t *fgkTPCtaskOpt[NTPCTASKS+1] = {
-"EFF"
-,"RES"
-,"TPC"
-,"DEDX"
-,"DCA"
-,"ALL"
-};
-
-Bool_t fHpt = kFALSE;  // activated with option "HPT"
-
-enum TPCAnalysisMode {
-  kTPCMode = 0,
-  kTPCITSMode = 1,
-  kTPCConstrMode = 2,
-  kTPCInnerMode = 3
-};
-
-
-#endif
diff --git a/PWG1/macros/LoadMyLibs.C b/PWG1/macros/LoadMyLibs.C
deleted file mode 100644 (file)
index dd01d4b..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-void LoadMyLibs() {
-
-  // Load some ROOT libraries
-  CheckLoadLibrary("libEG");
-  CheckLoadLibrary("libGeom");
-  CheckLoadLibrary("libVMC");
-  CheckLoadLibrary("libTree");
-  CheckLoadLibrary("libGui");
-  CheckLoadLibrary("libMinuit");
-  
-  // Load AliRoot libraries
-  
-  
-  CheckLoadLibrary("libSTEERBase");
-  CheckLoadLibrary("libESD");
-  CheckLoadLibrary("libCDB");
-  CheckLoadLibrary("libRAWDatabase");
-  CheckLoadLibrary("libRAWDatarec");
-  CheckLoadLibrary("libSTEER");
-  CheckLoadLibrary("libRAWDatasim");
-
-  CheckLoadLibrary("libTPCbase");
-  CheckLoadLibrary("libTPCrec");
-  CheckLoadLibrary("libTPCsim");
-  CheckLoadLibrary("libITSbase");
-  CheckLoadLibrary("libITSsim");
-  CheckLoadLibrary("libITSrec");
-  CheckLoadLibrary("libTRDbase");
-  CheckLoadLibrary("libTRDsim");
-  CheckLoadLibrary("libTRDrec");
-  CheckLoadLibrary("libTOFbase");
-  CheckLoadLibrary("libTOFrec");
-  CheckLoadLibrary("libTOFsim");
-
-  CheckLoadLibrary("libANALYSIS");
-  CheckLoadLibrary("libAOD");
-  CheckLoadLibrary("libANALYSISalice");
-  CheckLoadLibrary("libTPCcalib");
-  CheckLoadLibrary("libPWG1");
-}
-
-Int_t CheckLoadLibrary(const char* library) {
-  // checks if a library is already loaded, if not loads the library
-  if (strlen(gSystem->GetLibraries(Form("%s.so", library), "", kFALSE)) > 0)
-    return 1;
-  return gSystem->Load(library);
-}
diff --git a/PWG1/macros/MergeOutput.C b/PWG1/macros/MergeOutput.C
deleted file mode 100644 (file)
index 2c5fb64..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-// Macro to merge TPC performance train output.
-// One can merge all performance objects stored in the 
-// output files or one of them:
-// 
-// RES 
-// EFF
-// DEDX
-// DCA
-// TPC
-//
-// It is recommeneded to merge particular components 
-// for a big statistcs due to too big size of the output. For small
-// dedicated productions (e.g. flat-p) all components can be merged at once.
-//
-
-void MergeOutput(const char* filename = "list.txt", const char* comp = "ALL", Int_t max=2)
-{
-  // Performance object 
-  TString str(comp);
-
-  // Create new collections
-  TList *collTPC = new TList;
-  TList *collRes = new TList;
-  TList *collResTPCInner = new TList;
-  TList *collEff = new TList;
-  TList *colldEdxTPCInner = new TList;
-  TList *collDCA = new TList;
-
-  // Open the input stream
-  ifstream in;
-  in.open(filename);
-
-  // Read the input list of files and add them to the chain
-  TString perfile;
-  Int_t counter=0;
-  while(!in.eof()) {
-    in >> perfile;
-    if (!perfile.Contains("root")) continue; // protection
-    counter++;
-    if(counter>max) break;
-    printf("%s \n",perfile.Data());
-    TFile::Open(perfile.Data());
-    gFile->cd();
-    TList *coutput = gFile->Get("coutput"); 
-
-    if(str.CompareTo("ALL")==0) {
-      collTPC->Add(coutput->FindObject("AliPerformanceTPC"));
-      collRes->Add(coutput->FindObject("AliPerformanceRes"));
-      collResTPCInner->Add(coutput->FindObject("AliPerformanceResTPCInner"));
-      collEff->Add(coutput->FindObject("AliPerformanceEff"));
-      colldEdxTPCInner->Add(coutput->FindObject("AliPerformanceDEdxTPCInner"));
-      collDCA->Add(coutput->FindObject("AliPerformanceDCA"));
-    } 
-    else if(str.CompareTo("TPC")==0) {
-      collTPC->Add(coutput->FindObject("AliPerformanceTPC"));
-    }
-    else if(str.CompareTo("RES")==0) {
-      collRes->Add(coutput->FindObject("AliPerformanceRes"));
-      collResTPCInner->Add(coutput->FindObject("AliPerformanceResTPCInner"));
-    }
-    else if(str.CompareTo("EFF")==0) {
-      collEff->Add(coutput->FindObject("AliPerformanceEff"));
-    }
-    else if(str.CompareTo("DEDX")==0) {
-      colldEdxTPCInner->Add(coutput->FindObject("AliPerformanceDEdxTPCInner"));
-    }
-    else if(str.CompareTo("DCA")==0) {
-      collDCA->Add(coutput->FindObject("AliPerformanceDCA"));
-    }
-    else {
-     continue;
-    }
-  }
-  in.close();
-
-  //
-  AliPerformanceTPC *tpc = new AliPerformanceTPC("AliPerformanceTPC","AliPerformanceTPC",0,kFALSE);
-  AliPerformanceRes *res = new AliPerformanceRes("AliPerformanceRes","res",0,kFALSE);
-  AliPerformanceRes *resTPCInner = new AliPerformanceRes("AliPerformanceResTPCInner","AliPerformanceResTPCInner",3,kFALSE);
-  AliPerformanceEff *eff = new AliPerformanceEff("AliPerformanceEff","AliPerformanceEff",0,kFALSE);
-  AliPerformanceDEdx *dedx = new AliPerformanceDEdx("AliPerformanceDEdxTPCInner","AliPerformanceDEdxTPCInner",3,kFALSE);
-  AliPerformanceDCA *dca = new AliPerformanceDCA("AliPerformanceDCA","AliPerformanceDCA",0,kFALSE);
-
-  // Create output list
-  TFolder *outList = new TFolder();
-  outList->SetOwner();
-  outList->SetName("coutput");
-
-  // merge objects and add to the list
-  if(!str.CompareTo("ALL")) {
-    tpc->Merge(collTPC); 
-    outList->Add(tpc);
-    res->Merge(collRes);
-    outList->Add(res);
-    resTPCInner->Merge(collResTPCInner);
-    outList->Add(resTPCInner);
-    eff->Merge(collEff);
-    outList->Add(eff);
-    dedx->Merge(colldEdxTPCInner);
-    outList->Add(dedx);
-    dca->Merge(collDCA);
-    outList->Add(dca);
-  }
-  else if(!str.CompareTo("TPC")) {
-    tpc->Merge(collTPC); 
-    outList->Add(tpc);
-  }
-  else if(!str.CompareTo("RES")) {
-    res->Merge(collRes);
-    outList->Add(res);
-    resTPCInner->Merge(collResTPCInner);
-    outList->Add(resTPCInner);
-  }
-  else if(!str.CompareTo("EFF")) {
-    eff->Merge(collEff);
-    outList->Add(eff);
-  }
-  else if(!str.CompareTo("DEDX")) {
-    dedx->Merge(colldEdxTPCInner);
-    outList->Add(dedx);
-  }
-  else if(!str.CompareTo("DCA")) {
-    dca->Merge(collDCA);
-    outList->Add(dca);
-  }
-
-  //
-  TFile *outFile = new TFile("TPC.Performance.Merged.root","recreate");
-  outFile->cd();
-  outList->Write();
-  outFile->Close();
-}
diff --git a/PWG1/macros/ProofEnableAliRoot.C b/PWG1/macros/ProofEnableAliRoot.C
deleted file mode 100644 (file)
index 638ab01..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-
-void ProofEnableAliRoot(const char* location = "/usr/local/grid/AliRoot/v4-05-Release")
-{
-  // enables a locally deployed AliRoot in a PROOF cluster
-  gProof->Exec(Form("TString str(gSystem->ExpandPathName(\"%s\")); gSystem->Setenv(\"ALICE_ROOT\", str);", location), kTRUE);
-
-  gProof->AddIncludePath(Form("%s/include", location));
-  gProof->AddIncludePath(Form("%s/TPC", location));
-  gProof->AddIncludePath(Form("%s/PWG1", location));
-  gProof->AddIncludePath(Form("%s/ANALYSIS", location));
-
-  gProof->AddDynamicPath(Form("%s/lib/tgt_linuxx8664gcc", location));
-
-  // load all libraries
-  gProof->Exec("gROOT->Macro(\"$ALICE_ROOT/PWG1/macros/LoadMyLibs.C\")",kTRUE);
-  //gProof->Exec("gROOT->Macro(\"$ALICE_ROOT/macros/loadlibsrec.C\")",kTRUE);
-}
-
diff --git a/PWG1/macros/RunPerformanceTask.C b/PWG1/macros/RunPerformanceTask.C
deleted file mode 100644 (file)
index 1672b55..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-// Macro to run TPC performance task (locally, proof).
-//
-// By default 7 performance components are added to 
-// the task: 
-// 1. AliPerformanceRes (TPC track resolution w.r.t MC at DCA)
-// 2. AliPerformanceResTPCInner (TPC track resolution w.r.t MC at inner TPC wall)
-// 3. AliPerformanceResTPCOuter (TPC track resolution w.r.t MC at outer TPC wall)
-// 4. AliPerformanceEff (TPC track reconstruction efficiency, MC primaries)
-// 5. AliPerformanceDEdxTPCInner (TPC dEdx response - track parameters at TPC inner wall)
-// 6. AliPerformanceDCA (TPC impact parameters resolution at DCA)
-// 7. AliPerformanceTPC (TPC cluster and track information)
-//
-
-/*
-  //1. Run locally e.g.
-
-  gROOT->LoadMacro("$ALICE_ROOT/PWG1/macros/LoadMyLibs.C");
-
-  gROOT->LoadMacro("$ALICE_ROOT/PWG0/CreateESDChain.C");
-  TChain* chain = CreateESDChain("list_flatP_JB.txt",10, 0);
-  chain->Lookup();
-
-  gROOT->LoadMacro("$ALICE_ROOT/PWG1/macros/RunPerformanceTask.C");
-  RunPerformanceTask(chain, kTRUE, kTRUE, kFALSE);
-
-  //2. Run on PROOF Lite e.g.
-
-  TProof::Open(""); 
-
-  gROOT->LoadMacro("$ALICE_ROOT/PWG1/macros/ProofEnableAliRoot.C");
-  ProofEnableAliRoot("/d/alice11/jacek/alice/x86_64/AliRoot/trunkJB/");
-
-  gROOT->LoadMacro("$ALICE_ROOT/PWG0/CreateESDChain.C");
-  TChain* chain = CreateESDChain("list_flatP_JB.txt",20, 0);
-  chain->Lookup();
-
-  gROOT->LoadMacro("$ALICE_ROOT/PWG1/macros/RunPerformanceTask.C");
-  RunPerformanceTask(chain, kTRUE, kTRUE, kTRUE);
-
-
-  //3. Run only on static PROOF at GSI e.g.
-
-  TProof::Reset("jacek@lxgrid5.gsi.de");
-  TProofMgr * proofmgr = TProof::Mgr("jacek@lxgrid5.gsi.de");
-  //proofmgr->SetROOTVersion("523-04");
-  TProof * proof = proofmgr->CreateSession();
-  proof->SetParameter("PROOF_MaxSlavesPerNode", (Long_t)10000);
-
-  gROOT->LoadMacro("$ALICE_ROOT/PWG1/macros/ProofEnableAliRoot.C");
-  ProofEnableAliRoot("/u/jacek/alice/AliRoot/HEAD/");
-
-  gROOT->LoadMacro("$ALICE_ROOT/PWG0/CreateESDChain.C");
-  TChain* chain = CreateESDChain("esd_v4-16-Rev-08-grid.txt", 200, 0);
-  chain->Lookup();
-
-  gROOT->LoadMacro("$ALICE_ROOT/PWG1/macros/RunPerformanceTask.C");
-  RunPerformanceTask(chain, kTRUE, kTRUE, kTRUE); 
-
-  //4. Make final spectra and store them in the
-  // output folder and generate control pictures e.g.
-
-  TFile f("TPC.Performance.root");
-  AliPerformanceRes * compObjRes = (AliPerformanceRes*)coutput->FindObject("AliPerformanceResTPCOuter");
-  compObjRes->Analyse();
-  compObjRes->GetAnalysisFolder()->ls("*");
-  // create pictures
-  compObjRes->PrintHisto(kTRUE,"PerformanceResTPCOuterQA.ps");
-  // store output QA histograms in file
-  TFile fout("PerformanceResTPCOuterQAHisto.root","recreate");
-  compObjRes->GetAnalysisFolder()->Write();
-  fout.Close();
-  f.Close();
-
-*/
-
-//_____________________________________________________________________________
-void RunPerformanceTask(TChain *chain, Bool_t bUseMCInfo=kTRUE, Bool_t bUseESDfriend=kTRUE,  Bool_t bProof=kTRUE)
-{
-  if(!chain) 
-  {
-    AliDebug(AliLog::kError, "ERROR: No input chain available");
-    return;
-  }
-  //
-  // Swtich off all AliInfo (too much output!)
-  //
-  AliLog::SetGlobalLogLevel(AliLog::kError);
-
-  //
-  // Create analysis manager
-  //
-  AliAnalysisManager *mgr = new AliAnalysisManager;
-  if(!mgr) { 
-    Error("runTPCQA","AliAnalysisManager not set!");
-    return;
-  }
-
-  //
-  // Set ESD input handler
-  //
-  AliESDInputHandler* esdH = new AliESDInputHandler;
-  if(!esdH) { 
-    Error("runTPCQA","AliESDInputHandler not created!");
-    return;
-  }
-  if(bUseESDfriend) esdH->SetActiveBranches("ESDfriend");
-  mgr->SetInputEventHandler(esdH);
-
-  //
-  // Set MC input handler
-  //
-  if(bUseMCInfo) {
-    AliMCEventHandler* mcH = new AliMCEventHandler;
-    if(!esdH) { 
-      Error("runTPCQA","AliMCEventHandler not created!");
-      return;
-    }
-    mcH->SetReadTR(kTRUE);
-    mgr->SetMCtruthEventHandler(mcH);
-  }
-  //
-  // Add task to AliAnalysisManager
-  //
-  gROOT->LoadMacro("$ALICE_ROOT/PWG1/macros/AddTaskPerformanceTPC.C");
-  AliPerformanceTask *tpcQA = AddTaskPerformanceTPC(bUseMCInfo,bUseESDfriend);
-  if(!tpcQA) { 
-      Error("runTPCQA","TaskPerformanceTPC not created!");
-      return;
-  }
-
-  // Enable debug printouts
-  mgr->SetDebugLevel(0);
-
-  if (!mgr->InitAnalysis())
-    return;
-
-  mgr->PrintStatus();
-
-  if(bProof) mgr->StartAnalysis("proof",chain);
-  else mgr->StartAnalysis("local",chain);
-}
-
diff --git a/PWG1/macros/RunPerformanceTaskMC.C b/PWG1/macros/RunPerformanceTaskMC.C
deleted file mode 100644 (file)
index eebb2fb..0000000
+++ /dev/null
@@ -1,213 +0,0 @@
-// Macro to run TPC MC performance
-//
-// The basic tracking functionality is tested 
-// by using MC track references (exact points). 
-// 
-// Track references are propagate in B-field and
-// material by using:
-//   
-// AliTracker::PropagateTrackToBxByBz()
-// AliExternalTrackParam::PropagateToBxByBz()
-//
-// 
-// Available test components:
-//
-// AliPerformanceRes (propagation TPCin(ref) -> DCA(particle) by using AliTracker::PropagateTrackToBxByBz() and comparison at DCA)
-// AliPerformanceResTCPInner (propagation TPCout(ref) -> TPCin(ref) and comparison at TPCin)
-// AliPerformanceResTPCOuter (propagation TPCin(ref) -> TPCout(ref) by using AliExternalTrackParam::PropagateToBxByBz() and comparison at TPCout) 
-//
-
-/*
-  //1. Run locally e.g.
-
-  gROOT->LoadMacro("$ALICE_ROOT/PWG1/macros/LoadMyLibs.C");
-
-  gROOT->LoadMacro("$ALICE_ROOT/PWG0/CreateESDChain.C");
-  TChain* chain = CreateESDChain("list_flatP_JB.txt", 500, 0);
-  chain->Lookup();
-
-  // Geometry (need for the track propagation through material)
-  //AliGeomManager::LoadGeometry("/lustre/alice/jacek/sim/HEADJB/flatPt_uniB/0/geometry.root");
-
-  // set magnetic field
-  TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 1., 1., AliMagF::k5kG));
-
-  gROOT->LoadMacro("$ALICE_ROOT/PWG1/macros/RunPerformanceTaskMC.C");
-  RunPerformanceTaskMC(chain, kTRUE, kFALSE, kFALSE, 0);
-
-  //2. Run on PROOF Lite e.g.
-
-  TProof::Open(""); 
-
-  gROOT->LoadMacro("$ALICE_ROOT/PWG1/macros/ProofEnableAliRoot.C");
-  ProofEnableAliRoot("/d/alice11/jacek/alice/x86_64/AliRoot/trunkJB");
-
-  gROOT->LoadMacro("$ALICE_ROOT/PWG0/CreateESDChain.C");
-  TChain* chain = CreateESDChain("list_flatP_JB.txt", 400, 0);
-  chain->Lookup();
-
-  // set magnetic field
-  // the best is to create macro MagField.C with the line: 
-  // TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 1., 1., AliMagF::k5kG));
-  gProof->Exec("gROOT->Macro(\"MagField.C\")");
-
-  gROOT->LoadMacro("$ALICE_ROOT/PWG1/macros/RunPerformanceTaskMC.C");
-  RunPerformanceTaskMC(chain, kTRUE, kTRUE, kTRUE,0);
-
-  //3. Run only on static PROOF at GSI e.g.
-
-  TProof::Reset("jacek@lxgrid5.gsi.de");
-  TProofMgr * proofmgr = TProof::Mgr("jacek@lxgrid5.gsi.de");
-  //proofmgr->SetROOTVersion("523-04");
-  TProof * proof = proofmgr->CreateSession();
-  proof->SetParameter("PROOF_MaxSlavesPerNode", (Long_t)10000);
-
-  gROOT->LoadMacro("$ALICE_ROOT/PWG1/macros/ProofEnableAliRoot.C");
-  ProofEnableAliRoot("/u/jacek/alice/AliRoot/HEADJB/");
-
-  gROOT->LoadMacro("$ALICE_ROOT/PWG0/CreateESDChain.C");
-  TChain* chain = CreateESDChain("flat_JB.txt", 50, 0);
-  chain->Lookup();
-
-  // Geometry (need for the track propagation through material)
-  //AliGeomManager::LoadGeometry("/lustre/alice/local/TRDdata/SIM/P-Flat/TRUNK/test/RUN0/geometry.root");
-
-  // set magnetic field
-  gProof->Exec("gROOT->ProcessLine(\"TGeoGlobalMagField::Instance()->SetField(new AliMagF(\"Maps\",\"Maps\", 1., 1., AliMagF::k5kG))\")");
-
-  gROOT->LoadMacro("$ALICE_ROOT/PWG1/macros/RunPerformanceTaskMC.C");
-  RunPerformanceTaskMC(chain, kTRUE, kTRUE, kTRUE);
-
-  //4. Make final spectra and store them in the
-  // output folder and generate control pictures e.g.
-
-  TFile f("TPC.Performance.root");
-  AliPerformanceRes * compObjRes = (AliPerformanceRes*)coutput->FindObject("AliPerformanceResTPCInner");
-  compObjRes->Analyse();
-  compObjRes->GetAnalysisFolder()->ls("*");
-  compObjRes->PrintHisto(kTRUE,"PerformanceResTPCInnerQA.ps");
-  TFile fout("AnalysedResTPCInner.root","recreate");
-  compObjRes->GetAnalysisFolder()->Write();
-  fout.Close();
-  f.Close();
-
-
-*/
-
-//_____________________________________________________________________________
-void RunPerformanceTaskMC(TChain *chain, Bool_t bUseMCInfo=kTRUE, Bool_t bUseESDfriend=kTRUE,  Bool_t bProof=kTRUE, Int_t debugStreamLevel=0)
-{
-  if(!chain) 
-  {
-    AliDebug(AliLog::kError, "ERROR: No input chain available");
-    return;
-  }
-
-  //
-  // Create global cuts objects 
-  //
-
-  // Create ESD track reconstruction cuts
-  AliRecInfoCuts *pRecInfoCuts = new AliRecInfoCuts(); 
-  if(pRecInfoCuts) {
-    pRecInfoCuts->SetMaxDCAToVertexXY(3.0);
-    pRecInfoCuts->SetMaxDCAToVertexZ(3.0);
-    pRecInfoCuts->SetMinNClustersTPC(50);
-    pRecInfoCuts->SetMinNClustersITS(2);
-    pRecInfoCuts->SetPtRange(0.15,1.e10);
-    pRecInfoCuts->SetHistogramsOn(kFALSE); 
-  } else {
-    AliDebug(AliLog::kError, "ERROR: Cannot create AliRecInfoCuts object");
-  }
-
-  // Create MC track reconstruction cuts
-  AliMCInfoCuts  *pMCInfoCuts = new AliMCInfoCuts();
-  if(pMCInfoCuts) {
-    pMCInfoCuts->SetMinTrackLength(70);
-  } else {
-    AliDebug(AliLog::kError, "ERROR: Cannot AliMCInfoCuts object");
-  }
-
-  //
-  // Create performance objects and set cuts 
-  //
-  const Int_t kTPC = 0; const Int_t kTPCITS = 1; const Int_t kConstrained = 2; const Int_t kTPCInner = 3; const Int_t kTPCOuter = 4;
-
-  //
-  // MC 
-  //
-  AliPerformanceMC *pCompMC0 = new AliPerformanceMC("AliPerformanceMC","AliPerformanceMC",kTPC,kFALSE); 
-  if(!pCompMC0) {
-    AliDebug(AliLog::kError, "ERROR: Cannot create AliPerformanceMC object");
-  }
-  pCompMC0->SetAliRecInfoCuts(pRecInfoCuts);
-  pCompMC0->SetAliMCInfoCuts(pMCInfoCuts);
-  //pCompMC0->SetStreamLevel(debugStreamLevel);
-
-  AliPerformanceMC *pCompMC3 = new AliPerformanceMC("AliPerformanceMCTPCInner","AliPerformanceMCTPCInner",kTPCInner,kFALSE); 
-  if(!pCompMC3) {
-    AliDebug(AliLog::kError, "ERROR: Cannot create AliPerformanceMCInnerTPC object");
-  }
-  pCompMC3->SetAliRecInfoCuts(pRecInfoCuts);
-  pCompMC3->SetAliMCInfoCuts(pMCInfoCuts);
-  //pCompMC3->SetStreamLevel(debugStreamLevel);
-
-  AliPerformanceMC *pCompMC4 = new AliPerformanceMC("AliPerformanceMCTPCOuter","AliPerformanceMCTPCOuter",kTPCOuter,kFALSE); 
-  if(!pCompMC4) {
-    AliDebug(AliLog::kError, "ERROR: Cannot create AliPerformanceMCTPCOuter object");
-  }
-  pCompMC4->SetAliRecInfoCuts(pRecInfoCuts);
-  pCompMC4->SetAliMCInfoCuts(pMCInfoCuts);
-  //pCompMC4->SetStreamLevel(debugStreamLevel);
-
-
-  // Swtich off all AliInfo (too much output!!!)
-  AliLog::SetGlobalLogLevel(AliLog::kError);
-
-  // Create the analysis manager
-  AliAnalysisManager *mgr = new AliAnalysisManager;
-
-  // Create task
-  AliPerformanceTask *task = new AliPerformanceTask("PerformanceMC","TPC Performance");
-  task->SetUseMCInfo(bUseMCInfo);
-  task->SetUseESDfriend(bUseESDfriend);
-  task->AddPerformanceObject( pCompMC0 );
-  task->AddPerformanceObject( pCompMC3 );
-  task->AddPerformanceObject( pCompMC4 );
-
-  // Add task
-  mgr->AddTask(task);
-
-  // Add ESD handler
-  AliESDInputHandler* esdH = new AliESDInputHandler;
-  if(bUseESDfriend) esdH->SetActiveBranches("ESDfriend");
-  mgr->SetInputEventHandler(esdH);
-
-  if(bUseMCInfo) {
-  // Enable MC event handler
-    AliMCEventHandler* handler = new AliMCEventHandler;
-    handler->SetReadTR(kTRUE);
-    mgr->SetMCtruthEventHandler(handler);
-  }
-
-  // Create containers for input
-  //AliAnalysisDataContainer *cinput = mgr->CreateContainer("cchain", TChain::Class(), AliAnalysisManager::kInputContainer);
-  AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
-  mgr->ConnectInput(task, 0, cinput);
-
-  // Create containers for output
-  AliAnalysisDataContainer *coutput = mgr->CreateContainer("coutput", TList::Class(), AliAnalysisManager::kOutputContainer, Form("TPC.%s.root", task->GetName()));
-  mgr->ConnectOutput(task, 0, coutput);
-
-  // Enable debug printouts
-  mgr->SetDebugLevel(0);
-
-  if (!mgr->InitAnalysis())
-    return;
-
-  mgr->PrintStatus();
-
-  if(bProof) mgr->StartAnalysis("proof",chain);
-  else mgr->StartAnalysis("local",chain);
-}
-