]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGHF/hfe/macros/configs/PbPb/ConfigHFE_FLOW_TOFTPC.C
Update
[u/mrichter/AliRoot.git] / PWGHF / hfe / macros / configs / PbPb / ConfigHFE_FLOW_TOFTPC.C
CommitLineData
c216e461 1AliAnalysisTaskHFEFlow* ConfigHFE_FLOW_TOFTPC(Bool_t useMC, Int_t tpcCls, Double_t tpcClsr,Int_t tpcClspid, Double_t tpcsharedfraction, Int_t itsCls, Double_t chi2peritscl, Int_t pixellayer, Double_t dcaxy, Double_t dcaz, Double_t tofsig, Double_t tpcdedx0, Double_t tpcdedx1, Double_t tpcdedx2, Double_t tpcdedx3, Double_t tpcdedx4, Int_t vzero, Int_t debuglevel)
d84c68e9 2{
3 //
4 // HFE flow task
5 //
6 printf("Summary settings flow task\n");
7 printf("TPC number of tracking clusters %d\n",tpcCls);
c216e461 8 printf("TPC ratio clusters %f\n",tpcClsr*0.01);
d84c68e9 9 printf("TPC number of pid clusters %d\n",tpcClspid);
c216e461 10 printf("Maximal fraction of TPC shared cluster %f\n",tpcsharedfraction*0.01);
d84c68e9 11 printf("ITS number of clusters %d\n",itsCls);
c216e461 12 printf("Maximal chi2 per ITS cluster %f\n",chi2peritscl);
13 printf("Requirement on the pixel layer %d\n",pixellayer);
14 printf("dcaxy %f\n",dcaxy*0.01);
15 printf("dcaz %f\n",dcaz*0.01);
d84c68e9 16 printf("TOF sigma %f\n",tofsig*0.1);
0e30407a 17 printf("TPC min sigma cut 0: %f\n",tpcdedx0*0.001);
18 printf("TPC min sigma cut 1: %f\n",tpcdedx1*0.001);
19 printf("TPC min sigma cut 2: %f\n",tpcdedx2*0.001);
20 printf("TPC min sigma cut 3: %f\n",tpcdedx3*0.001);
21 printf("TPC min sigma cut 4: %f\n",tpcdedx4*0.001);
d84c68e9 22 printf("VZERO event plane %d\n",vzero);
c216e461 23 printf("Debug level %d\n",debuglevel);
24
d84c68e9 25 // Cut HFE
26 AliHFEcuts *hfecuts = new AliHFEcuts("hfeCuts","HFE Standard Cuts");
27 hfecuts->CreateStandardCuts();
28 hfecuts->SetMinNClustersTPC(tpcCls);
29 hfecuts->SetMinNClustersTPCPID(tpcClspid);
c216e461 30 hfecuts->SetMinRatioTPCclusters(tpcClsr*0.01);
d84c68e9 31 hfecuts->SetTPCmodes(AliHFEextraCuts::kFound, AliHFEextraCuts::kFoundOverFindable);
c216e461 32 hfecuts->SetFractionOfSharedTPCClusters(tpcsharedfraction*0.01);
d84c68e9 33
34 hfecuts->SetMinNClustersITS(itsCls);
c216e461 35 hfecuts->SetCutITSpixel(pixellayer);
d84c68e9 36 hfecuts->SetCheckITSLayerStatus(kFALSE);
37
c216e461 38 hfecuts->SetMaxImpactParam(dcaxy*0.01,dcaz*0.01);
d84c68e9 39
40 //hfecuts->UnsetVertexRequirement();
41 hfecuts->SetVertexRange(10.);
42
43 hfecuts->SetTOFPIDStep(kTRUE);
44
0e30407a 45 // Cut HFE background
46 AliESDtrackCuts *hfeBackgroundCuts = new AliESDtrackCuts();
47 hfeBackgroundCuts->SetName("backgroundcuts");
48 hfeBackgroundCuts->SetAcceptKinkDaughters(kFALSE);
49 hfeBackgroundCuts->SetRequireTPCRefit(kTRUE);
50 hfeBackgroundCuts->SetEtaRange(-0.9,0.9);
51 hfeBackgroundCuts->SetRequireSigmaToVertex(kTRUE);
52 hfeBackgroundCuts->SetMaxChi2PerClusterTPC(4.0);
53 hfeBackgroundCuts->SetMinNClustersTPC(50);
54 hfeBackgroundCuts->SetPtRange(0.3,1e10);
55
d84c68e9 56 // Name
02af217c 57 TString appendix(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));
d84c68e9 58 printf("appendix %s\n", appendix.Data());
59
60 // The task
61 AliAnalysisTaskHFEFlow *task = new AliAnalysisTaskHFEFlow(Form("HFEFlowtask_%s", appendix.Data()));
62 task->SelectCollisionCandidates(AliVEvent::kMB | AliVEvent::kCentral | AliVEvent::kSemiCentral);
63 task->SetDebugLevel(1);
64 task->GetPIDQAManager()->SetHighResolutionHistos();
65 task->SetHFECuts(hfecuts);
0e30407a 66 task->SetHFEBackgroundCuts(hfeBackgroundCuts);
d84c68e9 67 if(useMC) {
68 task->SetMCPID(kTRUE);
0e30407a 69 task->SetUseMCReactionPlane(kTRUE);
d84c68e9 70 task->SetAfterBurnerOn(kTRUE);
71 task->SetV1V2V3V4V5(0.0,0.2,0.0,0.0,0.0);
72 }
73 if(vzero>=1) task->SetVZEROEventPlane(kTRUE);
74 if(vzero==2) task->SetVZEROEventPlaneA(kTRUE);
75 if(vzero==3) task->SetVZEROEventPlaneC(kTRUE);
c216e461 76 task->SetDebugLevel(debuglevel);
d84c68e9 77
78 // Define PID
79 AliHFEpid *pid = task->GetPID();
80 if(useMC) pid->SetHasMCData(kTRUE);
81 pid->AddDetector("TOF", 0);
82 pid->AddDetector("TPC", 1);
d84c68e9 83
d84c68e9 84 TString datatype=gSystem->Getenv("CONFIG_FILE");
85
86 if(!useMC) {
87
88 Double_t params_centr_0_5[1];
89 Double_t params_centr_5_10[1];
90 Double_t params_centr_10_20[1];
91 Double_t params_centr_20_30[1];
92 Double_t params_centr_per[1];
0e30407a 93 params_centr_0_5[0]=tpcdedx0*0.001; // cut tuned for 0-10%
94 params_centr_5_10[0]=tpcdedx1*0.001; // cut tuned for 0-10%
95 params_centr_10_20[0]=tpcdedx2*0.001;
96 params_centr_20_30[0]=tpcdedx3*0.001;
97 params_centr_per[0]=tpcdedx4*0.001;
d84c68e9 98
99 char *cutmodel;
100 cutmodel="pol0";
101
102 for(Int_t a=0;a<11;a++)
103 {
104 if(a>3) pid->ConfigureTPCcentralityCut(a,cutmodel,params_centr_per,3.0);
105 if(a==0) pid->ConfigureTPCcentralityCut(a,cutmodel,params_centr_0_5,3.0); // 0-5%
106 if(a==1) pid->ConfigureTPCcentralityCut(a,cutmodel,params_centr_5_10,3.0); // 5-10%
107 if(a==2) pid->ConfigureTPCcentralityCut(a,cutmodel,params_centr_10_20,3.0); // 10-20%
108 if(a==3) pid->ConfigureTPCcentralityCut(a,cutmodel,params_centr_20_30,3.0); // 20-30%
109 }
110
111 }
112
113 pid->ConfigureTOF(tofsig*0.1);
0e30407a 114
115 // Define PID background
116 AliHFEpid *pidbackground = task->GetPIDBackground();
117 if(useMC) pidbackground->SetHasMCData(kTRUE);
118 pidbackground->AddDetector("TOF", 0);
119 pidbackground->AddDetector("TPC", 1);
120 pidbackground->ConfigureTOF(3.0);
121 pidbackground->ConfigureTPCasymmetric(0.1,20.,-2.0,5.0);
122 task->SetMaxopeningtheta(9999.0);
123 task->SetMaxopeningphi(9999.0);
124 task->SetMaxopening3D(0.5);
d84c68e9 125
126 printf("*************************************\n");
127 printf("Configuring standard Task:\n");
128 task->Print();
129 pid->PrintStatus();
130 printf("*************************************\n");
131 return task;
132
133}