67c51f72d5f1810fcbc3f48022ae400c9b9cad99
[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., Double_t tpcdedx0=0.0, Double_t tpcdedx1=0.0, Double_t tpcdedx2=0.0, Double_t tpcdedx3=0.0, Double_t tpcdedx4=0.0, Int_t vzero=3, Int_t debuglevel=4){
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 checkconfig="ConfigHFE_FLOW_TOFTPC";
13   if (!gROOT->GetListOfGlobalFunctions()->FindObject(checkconfig.Data()))
14     gROOT->LoadMacro(configFile.Data());
15   
16   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
17   AliAnalysisDataContainer *cinput  = mgr->GetCommonInputContainer();
18   AliAnalysisTaskHFEFlow *task = ConfigHFE_FLOW_TOFTPC(kFALSE, tpcCls, tpcClsr, tpcClspid, tpcsharedfraction, itsCls, chi2peritscl, pixellayer, dcaxy, dcaz,tofsig,tpcdedx0,tpcdedx1,tpcdedx2,tpcdedx3,tpcdedx4,vzero,debuglevel);  
19   
20   task->SetNbBinsCentralityQCumulant(5);
21   //task->SetBinCentralityLess(0,0.0);
22   task->SetBinCentralityLess(0,0.0);
23   task->SetBinCentralityLess(1,10.0);
24   task->SetBinCentralityLess(2,20.0);
25   task->SetBinCentralityLess(3,40.0);
26   task->SetBinCentralityLess(4,50.0);
27   task->SetBinCentralityLess(5,60.0);
28   //task->SetBinCentralityLess(7,80.0);
29
30   TString appendixx(TString::Format("TPC%dTPCr%dTPCpid%dTPCShared%dITScl%dChi2perITS%dPixelLayer%dDCAr%dz%dTOFsig%dTPCmindedx0%dTPCmindedx1%dTPCmindedx2%dTPCmindedx3%dTPCmindedx4%dVZERO%dDebugLevel%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)tpcdedx0,(Int_t)tpcdedx1,(Int_t)tpcdedx2,(Int_t)tpcdedx3,(Int_t)tpcdedx4,vzero,debuglevel));
31   printf("appendixx %s\n", appendixx.Data());
32   
33   task->SetHFEVZEROEventPlane(0x0);
34   
35   mgr->AddTask(task);
36
37   TString containerName = mgr->GetCommonFileName();
38   containerName += ":";
39   containerName += appendixx.Data();
40
41   AliAnalysisDataContainer *cinput  = mgr->GetCommonInputContainer();
42   mgr->ConnectOutput(task,1, mgr->CreateContainer(Form("bailhach_HFEv2EP_%s", appendixx.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,containerName.Data()));
43   mgr->ConnectInput(task,0, cinput );    
44
45   return NULL;
46
47   
48 }