Configuration
[u/mrichter/AliRoot.git] / PWGHF / hfe / macros / AddTaskHFEtpctofv2.C
1 AliAnalysisTask *AddTaskHFEtpctofv2(Int_t tpcCls=110, Double_t tpcClsr=50, Int_t tpcClspid=60, Double_t tpcsharedfraction=10, Int_t itsCls=4, Double_t chi2peritscl=36, Int_t pixellayer=2, Double_t dcaxy=100,Double_t dcaz=200, Double_t tofsig=30., Int_t vzero=3, Int_t debuglevel=4, Bool_t algorithmMA=kFALSE, Bool_t massconstraint=kFALSE, Double_t tpcdedx0=-200.0, Double_t tpcdedx1=-150.0, Double_t tpcdedx2=-100.0, Double_t tpcdedx3=-50.0, Double_t tpcdedx4=50.0,Double_t tpcdedx5=100.0, Double_t tpcdedx6=180.0, Double_t tpcdedx7=200.0){
2
3   // libraries in case
4   gSystem->Load("libANALYSIS.so");
5   gSystem->Load("libANALYSISalice.so");
6   gSystem->Load("libPWGflowBase.so");
7   gSystem->Load("libPWGflowTasks.so");
8
9
10   //set config file name
11   TString configFile("$ALICE_ROOT/PWGHF/hfe/macros/configs/PbPb/ConfigHFE_FLOW_TOFTPC.C");
12   //TString configFile("/d/alice12/bailhache/AliRootInstallations/07_06_2012/AliRoot/PWGHF/hfe/macros/configs/PbPb/ConfigHFE_FLOW_TOFTPC.C");
13   TString checkconfig="ConfigHFE_FLOW_TOFTPC";
14   if (!gROOT->GetListOfGlobalFunctions()->FindObject(checkconfig.Data()))
15     gROOT->LoadMacro(configFile.Data());
16   
17   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
18   AliAnalysisDataContainer *cinput  = mgr->GetCommonInputContainer();
19   AliAnalysisTaskHFEFlow *task = ConfigHFE_FLOW_TOFTPC(kFALSE, tpcCls, tpcClsr, tpcClspid, tpcsharedfraction, itsCls, chi2peritscl, pixellayer, dcaxy, dcaz,tofsig,tpcdedx0,tpcdedx1,tpcdedx2,tpcdedx3,tpcdedx4,tpcdedx5,tpcdedx6,tpcdedx7,vzero,debuglevel,algorithmMA,massconstraint);  
20   
21   task->SetNbBinsCentralityQCumulant(5);
22   //task->SetBinCentralityLess(0,0.0);
23   task->SetBinCentralityLess(0,0.0);
24   task->SetBinCentralityLess(1,10.0);
25   task->SetBinCentralityLess(2,20.0);
26   task->SetBinCentralityLess(3,40.0);
27   task->SetBinCentralityLess(4,50.0);
28   task->SetBinCentralityLess(5,60.0);
29   //task->SetBinCentralityLess(7,80.0);
30
31   Int_t nameTPCcut = 50; // 50% at the moment
32   // can be adjusting looking at the value of the cut
33
34   TString appendixx(TString::Format("TPC%dTPCr%dTPCpid%dTPCShared%dITScl%dChi2perITS%dPixelLayer%dDCAr%dz%dTOFsig%dTPCeff%dVZERO%dDebugLevel%dalgo%dm%d",tpcCls,(Int_t)tpcClsr,tpcClspid,(Int_t) tpcsharedfraction,itsCls,(Int_t) chi2peritscl,(Int_t) pixellayer,(Int_t) dcaxy,(Int_t)dcaz,(Int_t) tofsig,(Int_t)nameTPCcut,vzero,debuglevel,(Int_t)algorithmMA,(Int_t)massconstraint));
35   printf("appendixx %s\n", appendixx.Data());
36   
37   task->SetHFEVZEROEventPlane(0x0);
38   
39   mgr->AddTask(task);
40
41   TString containerName = mgr->GetCommonFileName();
42   containerName += ":";
43   containerName += appendixx.Data();
44
45   AliAnalysisDataContainer *cinput  = mgr->GetCommonInputContainer();
46   mgr->ConnectOutput(task,1, mgr->CreateContainer(Form("bailhach_HFEv2EP_%s", appendixx.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,containerName.Data()));
47   mgr->ConnectInput(task,0, cinput );    
48
49   return NULL;
50
51   
52 }