]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - PWGHF/hfe/macros/AddTaskHFEFlowTPCTOFEPSP.C
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGHF / hfe / macros / AddTaskHFEFlowTPCTOFEPSP.C
... / ...
CommitLineData
1AliAnalysisTask *AddTaskHFEFlowTPCTOFEPSP(Int_t trigger=0,Int_t aodfilter=16,Bool_t scalarProduct=kFALSE,Bool_t cutPileup=kFALSE,Int_t variableM = 1,Int_t tpcCls=110, Double_t tpcClsr=60, Int_t tpcClspid=80, Int_t itsCls=4, Int_t pixellayer=2, Double_t dcaxy=100,Double_t dcaz=200, Double_t tofsig=30., Double_t tpceff=50., Int_t vzero=1, Int_t debuglevel=2, Double_t etarange=80, Bool_t withetacorrection=kFALSE, Bool_t withmultcorrection=kFALSE, Double_t ITSclustersback=0, Double_t minTPCback=-2.0, Double_t maxTPCback=5.0){
2
3 //
4 // Define TPC cut for 2011 data
5 //
6 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
7 // -0.2 0-5%
8 // -0.15 5-10%
9 // -0.1 10-20%
10 // -0.0 20-30%, sigma=1.17
11 // 0.156 30-40%, sigma=1.2
12 // 0.19 40-50%, sigma=1.2
13 // 0.2 50-60%
14 // 0.2 60-80% list_t65536f16TPC110r60p80s11km0ITS4C36Pi2DCAr100z200TOF30TPCe50V1D0er8i0t-20t50
15
16 /*
17 tpcdedx[0]=-0.2;
18 tpcdedx[1]=-0.15;
19 tpcdedx[2]=-0.1;
20 tpcdedx[3]=0.0;
21 tpcdedx[4]=0.156;
22 tpcdedx[5]=0.19;
23 tpcdedx[6]=0.2;
24 tpcdedx[7]=0.2;
25 if(TMath::Abs(tpceff-55)<0.01) {
26 tpcdedx[0]=-0.365;
27 tpcdedx[1]=-0.314;
28 tpcdedx[2]=-0.267;
29 tpcdedx[3]=-0.165;
30 tpcdedx[4]=-0.022;
31 tpcdedx[5]= 0.01;
32 tpcdedx[6]= 0.018;
33 tpcdedx[7]= 0.018;
34 }
35 if(TMath::Abs(tpceff-45)<0.01) {
36 tpcdedx[0]=-0.062;
37 tpcdedx[1]=-0.015;
38 tpcdedx[2]=0.035;
39 tpcdedx[3]=0.131;
40 tpcdedx[4]=0.278;
41 tpcdedx[5]=0.32;
42 tpcdedx[6]=0.32;
43 tpcdedx[7]=0.32;
44 }
45 if(TMath::Abs(tpceff-60)<0.01) {
46 tpcdedx[0]=-0.518;
47 tpcdedx[1]=-0.47;
48 tpcdedx[2]=-0.42;
49 tpcdedx[3]=-0.315;
50 tpcdedx[4]=-0.178;
51 tpcdedx[5]=-0.145;
52 tpcdedx[6]=-0.135;
53 tpcdedx[7]=-0.135;
54 }
55 if(TMath::Abs(tpceff-40)<0.01) {
56 tpcdedx[0]=0.09;
57 tpcdedx[1]=0.14;
58 tpcdedx[2]=0.188;
59 tpcdedx[3]=0.28;
60 tpcdedx[4]=0.43;
61 tpcdedx[5]=0.462;
62 tpcdedx[6]=0.473;
63 tpcdedx[7]=0.473;
64 }
65 */
66
67 // Name
68 TString appendixx(TString::Format("t%df%ds%dp%dM%dTPC%dr%dp%dITS%dPi%dDCAr%dz%dTOF%dTPCe%dV%dD%der%dbin%di%dt%dt%d",(Int_t)trigger,aodfilter,(Int_t)scalarProduct,(Int_t)cutPileup,(Int_t)variableM,tpcCls,(Int_t)tpcClsr,tpcClspid,itsCls,(Int_t) pixellayer,(Int_t) dcaxy,(Int_t)dcaz,(Int_t) tofsig,(Int_t)tpceff,vzero,debuglevel,(Int_t)(etarange*0.1),(Int_t)withetacorrection,(Int_t)withmultcorrection,(Int_t)ITSclustersback,(Int_t)(minTPCback*10.0),(Int_t)(maxTPCback*10.0)));
69 //TString appendixx("tpctofv2");
70
71
72 //set config file name
73 TString configFile("$ALICE_ROOT/PWGHF/hfe/macros/configs/PbPb/ConfigHFE_FLOW_TOFTPC.C");
74 //TString configFile("/hera/alice/bailhach/AliRootInstallations/30_09_2013/AliRoot/PWGHF/hfe/macros/configs/PbPb/ConfigHFE_FLOW_TOFTPC.C");
75 TString checkconfig="ConfigHFE_FLOW_TOFTPC";
76 if (!gROOT->GetListOfGlobalFunctions()->FindObject(checkconfig.Data()))
77 gROOT->LoadMacro(configFile.Data());
78
79 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
80 AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
81 AliAnalysisTaskFlowTPCTOFEPSP *task = ConfigHFE_FLOW_TOFTPC(kFALSE,appendixx,trigger,aodfilter,scalarProduct,cutPileup,variableM,tpcCls, tpcClsr, tpcClspid, itsCls, pixellayer, dcaxy, dcaz,tofsig,&tpcdedx[0],vzero,debuglevel,etarange,withetacorrection,withmultcorrection,ITSclustersback,minTPCback,maxTPCback);
82
83 task->SetNbBinsCentralityQCumulant(4);
84 //task->SetBinCentralityLess(0,0.0);
85 task->SetBinCentralityLess(0,0.0);
86 task->SetBinCentralityLess(1,10.0);
87 task->SetBinCentralityLess(2,20.0);
88 task->SetBinCentralityLess(3,40.0);
89 task->SetBinCentralityLess(4,50.0);
90 //task->SetBinCentralityLess(5,60.0);
91 //task->SetBinCentralityLess(7,80.0);
92
93 if(debuglevel==6) {
94
95 //***************************************//
96 // test Configure NPE plugin //
97 //***************************************//
98
99 AliHFENonPhotonicElectron *backe = new AliHFENonPhotonicElectron(Form("HFEBackGroundSubtractionPID2%s",appendixx.Data()),"Background subtraction"); //appendix
100 //Setting the Cuts for the Associated electron-pool
101 AliHFEcuts *hfeBackgroundCuts = new AliHFEcuts(Form("HFEBackSub%s",appendixx.Data()),"Background sub Cuts");
102 //hfeBackgroundCuts->SetEtaRange(assETA);
103 hfeBackgroundCuts->SetEtaRange(-0.8,0.8);
104 hfeBackgroundCuts->SetPtRange(0.1,1e10);
105 hfeBackgroundCuts->SetMaxChi2perClusterTPC(4);
106 hfeBackgroundCuts->SetMinNClustersITS(ITSclustersback);
107 hfeBackgroundCuts->SetMinNClustersTPC(100);
108 hfeBackgroundCuts->SetMinNClustersTPCPID(80);
109 hfeBackgroundCuts->SetMaxImpactParam(1.,2.);
110 hfeBackgroundCuts->SetAODFilterBit(0);
111 //hfeBackgroundCuts->SetQAOn(); // QA break
112
113 AliHFEpid *pidbackground = backe->GetPIDBackground();
114 pidbackground->AddDetector("TPC", 0);
115 pidbackground->ConfigureTPCasymmetric(0.0,9999.,minTPCback,maxTPCback);
116 backe->GetPIDBackgroundQAManager()->SetHighResolutionHistos();
117 backe->SetHFEBackgroundCuts(hfeBackgroundCuts);
118
119 // Selection of associated tracks for the pool
120 backe->SelectCategory1Tracks(kTRUE);
121 /*
122 if(useCat2Tracks){
123 backe->SelectCategory2Tracks(kTRUE);
124 backe-> SetITSMeanShift(-0.5);
125 }
126 */
127
128 // apply opening angle cut to reduce file size
129 backe->SetMaxInvMass(0.3);
130
131 task->SetHFEBackgroundSubtraction(backe);
132 //AliLog::SetClassDebugLevel("AliAnalysisTaskHFEFlowTPCTOFEPSP",3);
133 /////////////////////////////////////////////
134 /////////////////////////////////////////////
135
136 }
137
138 task->SetHFEVZEROEventPlane(0x0);
139 //AliLog::SetClassDebugLevel("AliAnalysisTaskHFEFlow",3);
140
141 mgr->AddTask(task);
142
143 TString containerName = mgr->GetCommonFileName();
144 containerName += ":";
145 containerName += appendixx.Data();
146
147 AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
148 mgr->ConnectOutput(task,1, mgr->CreateContainer(Form("list_%s",appendixx.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,containerName.Data()));
149 mgr->ConnectInput(task,0, cinput );
150
151 return NULL;
152
153
154}