Update
[u/mrichter/AliRoot.git] / PWGHF / hfe / macros / AddTaskHFEtpctofv2.C
CommitLineData
1723c7d8 1AliAnalysisTask *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 tpceff=50., Int_t vzero=3, Int_t debuglevel=0, Bool_t algorithmMA=kFALSE, Bool_t massconstraint=kFALSE){
15492d66 2
13a553c9 3 // libraries in case
4 gSystem->Load("libANALYSIS.so");
5 gSystem->Load("libANALYSISalice.so");
6 gSystem->Load("libPWGflowBase.so");
7 gSystem->Load("libPWGflowTasks.so");
1723c7d8 8
9 //
10 // Define TPC cut for 2011 data
11 //
12 Double_t tpcdedx[8] = {0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}; //0-5,5-10,10-20,20-30,30-40,40-50,50-60,60-100
13 // -0.2 0-5%
14 // -0.15 5-10%
15 // -0.1 10-20%
16 // -0.0 20-30%
17 // 0.156 30-40%
18 // 0.2 40-50%
19 // 0.2 50-60%
20 // 0.2 60-80%
21 tpcdedx[0]=-0.2;
22 tpcdedx[1]=-0.15;
23 tpcdedx[2]=-0.1;
24 tpcdedx[3]=0.0;
25 tpcdedx[4]=0.156;
26 tpcdedx[5]=0.2;
27 tpcdedx[6]=0.2;
28 tpcdedx[7]=0.2;
29 if(TMath::Abs(tpceff-55)<0.01) {
30 tpcdedx[0]=-0.365;
31 tpcdedx[1]=-0.314;
32 tpcdedx[2]=-0.267;
33 tpcdedx[3]=-0.17;
34 tpcdedx[4]=-0.022;
35 tpcdedx[5]=-0.018;
36 tpcdedx[6]=0.018;
37 tpcdedx[7]=0.018;
38 }
39 if(TMath::Abs(tpceff-45)<0.01) {
40 tpcdedx[0]=-0.062;
41 tpcdedx[1]=-0.015;
42 tpcdedx[2]=0.035;
43 tpcdedx[3]=0.13;
44 tpcdedx[4]=0.278;
45 tpcdedx[5]=0.32;
46 tpcdedx[6]=0.32;
47 tpcdedx[7]=0.32;
48 }
49 if(TMath::Abs(tpceff-60)<0.01) {
50 tpcdedx[0]=-0.518;
51 tpcdedx[1]=-0.47;
52 tpcdedx[2]=-0.42;
53 tpcdedx[3]=-0.325;
54 tpcdedx[4]=-0.178;
55 tpcdedx[5]=-0.135;
56 tpcdedx[6]=-0.135;
57 tpcdedx[7]=-0.135;
58 }
59 if(TMath::Abs(tpceff-40)<0.01) {
60 tpcdedx[0]=0.09;
61 tpcdedx[1]=0.14;
62 tpcdedx[2]=0.188;
63 tpcdedx[3]=0.282;
64 tpcdedx[4]=0.43;
65 tpcdedx[5]=0.473;
66 tpcdedx[6]=0.473;
67 tpcdedx[7]=0.473;
68 }
13a553c9 69
1723c7d8 70 // Name
71 TString appendixx(TString::Format("TPC%dr%dp%ds%dITS%dC%dPi%dDCAr%dz%dTOF%dTPCe%dV%dD%dec%dal%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)tpceff,vzero,debuglevel,(Int_t)algorithmMA,(Int_t)massconstraint));
72 printf("appendixx %s\n", appendixx.Data());
73
13a553c9 74
15492d66 75 //set config file name
76 TString configFile("$ALICE_ROOT/PWGHF/hfe/macros/configs/PbPb/ConfigHFE_FLOW_TOFTPC.C");
26c85092 77 //TString configFile("/d/alice12/bailhache/AliRootInstallations/07_06_2012/AliRoot/PWGHF/hfe/macros/configs/PbPb/ConfigHFE_FLOW_TOFTPC.C");
15492d66 78 TString checkconfig="ConfigHFE_FLOW_TOFTPC";
79 if (!gROOT->GetListOfGlobalFunctions()->FindObject(checkconfig.Data()))
80 gROOT->LoadMacro(configFile.Data());
81
82 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
83 AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
1723c7d8 84 AliAnalysisTaskHFEFlow *task = ConfigHFE_FLOW_TOFTPC(kFALSE,appendixx,tpcCls, tpcClsr, tpcClspid, tpcsharedfraction, itsCls, chi2peritscl, pixellayer, dcaxy, dcaz,tofsig,&tpcdedx[0],vzero,debuglevel,algorithmMA,massconstraint);
15492d66 85
86 task->SetNbBinsCentralityQCumulant(5);
87 //task->SetBinCentralityLess(0,0.0);
88 task->SetBinCentralityLess(0,0.0);
89 task->SetBinCentralityLess(1,10.0);
90 task->SetBinCentralityLess(2,20.0);
91 task->SetBinCentralityLess(3,40.0);
92 task->SetBinCentralityLess(4,50.0);
93 task->SetBinCentralityLess(5,60.0);
94 //task->SetBinCentralityLess(7,80.0);
95
15492d66 96 task->SetHFEVZEROEventPlane(0x0);
1723c7d8 97 task->SelectCollisionCandidates(AliVEvent::kSemiCentral);
15492d66 98
99 mgr->AddTask(task);
100
101 TString containerName = mgr->GetCommonFileName();
102 containerName += ":";
103 containerName += appendixx.Data();
104
105 AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
1723c7d8 106 mgr->ConnectOutput(task,1, mgr->CreateContainer((const char*)(appendixx.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,containerName.Data()));
15492d66 107 mgr->ConnectInput(task,0, cinput );
108
13a553c9 109 return NULL;
362a1d0c 110
15492d66 111
112}