modified
[u/mrichter/AliRoot.git] / PWGHF / hfe / macros / configs / PbPb / ConfigHFECalstandard_PbPb.C
CommitLineData
ae88a21b 1AliAnalysisTaskHFE* ConfigHFECalstandard_PbPb(Bool_t useMC, int TPCclust){
d84c68e9 2 //
3 // HFE standard task configuration
4 //
5
ae88a21b 6 cout << "==== TPC cluster cut" << TPCclust << endl;
7
d84c68e9 8 AliHFEcuts *hfecuts = new AliHFEcuts("hfeCuts","HFE Standard Cuts for EMCal");
9 hfecuts->CreateStandardCuts();
ae88a21b 10 //hfecuts->SetMinNClustersTPC(120);
11 hfecuts->SetMinNClustersTPC(TPCclust);
d84c68e9 12 hfecuts->SetMinRatioTPCclusters(0.6);
13 hfecuts->SetTPCmodes(AliHFEextraCuts::kFound, AliHFEextraCuts::kFoundOverFindable);
14
15 //hfecuts->SetMinNClustersITS(4);
16 hfecuts->SetMinNClustersITS(3);
17 hfecuts->SetCutITSpixel(AliHFEextraCuts::kAny);
18 hfecuts->SetCheckITSLayerStatus(kFALSE);
19
20 //hfecuts->UnsetVertexRequirement();
21 hfecuts->SetMaxImpactParam(3.,3.);
5b694e3d 22 //hfecuts->SetPtRange(2.0,60.0);
66c9f443 23 hfecuts->SetPtRange(2.0,60.0);
d84c68e9 24
25 hfecuts->SetVertexRange(10.);
26 //hfecuts->SetMaxChi2perClusterITS(36);
27 //hfecuts->SetSigmaToVertex(10);
28 //hfecuts->SetTOFPIDStep(kTRUE);
29 //hfecuts->SetTOFMISMATCHStep(kTRUE);
30 //hfecuts->SetTPCPIDCleanUpStep(kTRUE);
31 hfecuts->SetQAOn();
32 //hfecuts->SetMinNTrackletsTRD(5);
33
34 AliAnalysisTaskHFE *task = new AliAnalysisTaskHFE("HFEanalysisStandardEMCal");
35 task->SetHFECuts(hfecuts);
36 task->SetPbPbAnalysis(kTRUE);
37 //task->SetRemovePileUp(kTRUE);
38 task->GetPIDQAManager()->SetHighResolutionHistos();
39
40 // Define Variables
41 AliHFEvarManager *vm = task->GetVarManager();
42 //vm->AddVariable("pt");
43 //vm->AddVariable("eta");
44
45 const Double_t ptbinning[50] = {1., 1.1, 1.2, 1.3, 1.4,
46 1.5, 1.75, 2., 2.25, 2.5,
47 2.75, 3., 3.5, 4., 4.5,
48 5., 5.5, 6., 7., 8.,
49 9., 10., 11., 12., 13.,
50 14., 15., 16., 17., 18.,
51 20., 22., 24., 26., 28.,
52 30., 32., 34., 36., 38.,
53 40., 45., 50., 55., 60.,
54 65., 70., 80., 90., 100};
55
56 const Double_t etabinning[17] = {-0.8,-0.7,-0.6,-0.5,-0.4,-0.3,-0.2,-0.1,0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8};
57
58 vm->AddVariable("pt", 49, ptbinning);
59 vm->AddVariable("eta", 16, etabinning);
60 vm->AddVariable("phi");
61 vm->AddVariable("charge");
62 vm->AddVariable("source");
63 vm->AddVariable("centrality");
64 /*
65 if(!useMC){
66
67 for(Int_t a=0;a<12;a++)
68 {
69 TF1 *hBackground = new TF1("hadronicBackgroundFunction","TMath::Exp([0]/x + [1])", 0., 20.);
70 hBackground->SetParameter(0, -43.87);
71 hBackground->SetParameter(1, 2.85);
72 task->SetBackGroundFactorsFunction(hBackground,a);
73 }
74
75
76 }
77 */
78 // Define PID
79 AliHFEpid *pid = task->GetPID();
80 if(useMC) pid->SetHasMCData(kTRUE);
81 pid->AddDetector("EMCAL", 1);
82 pid->AddDetector("TPC", 0);
83// pid->ConfigureTPCrejection();
84
85 if(!useMC){
86
87 Double_t params_centr_0_5[1];
88 Double_t params_centr_5_10[1];
89 Double_t params_centr_10_20[1];
90 Double_t params_centr_20_30[1];
91 Double_t params_centr_per[1];
92 //params_centr_0_5[0]=0.16; // cut tuned for 0-10%
93 //params_centr_5_10[0]=0.16; // cut tuned for 0-10%
94 //params_centr_10_20[0]=0.29;
95 //params_centr_20_30[0]=0.38;
96 //params_centr_per[0]=0.44;
97 params_centr_0_5[0]=-1.5; // cut tuned for 0-10%
98 params_centr_5_10[0]=-1.5; // cut tuned for 0-10%
99 params_centr_10_20[0]=-1.5;
100 params_centr_20_30[0]=-1.5;
101 params_centr_per[0]=-1.5;
102 char *cutmodel;
103 cutmodel="pol0";
104
105
106 for(Int_t a=0;a<11;a++)
107 {
108 if(a>3) pid->ConfigureTPCcentralityCut(a,cutmodel,params_centr_per,3.0);
109 if(a==0) pid->ConfigureTPCcentralityCut(a,cutmodel,params_centr_0_5,3.0); // 0-5%
110 if(a==1) pid->ConfigureTPCcentralityCut(a,cutmodel,params_centr_5_10,3.0); // 5-10%
111 if(a==2) pid->ConfigureTPCcentralityCut(a,cutmodel,params_centr_10_20,3.0); // 10-20%
112 if(a==3) pid->ConfigureTPCcentralityCut(a,cutmodel,params_centr_20_30,3.0); // 20-30%
113 }
114
115
116 }
117
118
119 // V0 tagged tracks
120 AliHFEcuts *v0trackCuts = new AliHFEcuts("V0trackCuts", "Track Cuts for tagged track Analysis");
121 v0trackCuts->CreateStandardCuts();
ae88a21b 122 //v0trackCuts->SetMinNClustersTPC(120);
123 v0trackCuts->SetMinNClustersTPC(TPCclust);
d84c68e9 124 v0trackCuts->SetMinRatioTPCclusters(0.6);
125 v0trackCuts->SetTPCmodes(AliHFEextraCuts::kFound, AliHFEextraCuts::kFoundOverFindable);
126 v0trackCuts->SetMinNClustersITS(1);
127 v0trackCuts->SetCutITSpixel(AliHFEextraCuts::kAny);
128 v0trackCuts->SetCheckITSLayerStatus(kFALSE);
129 v0trackCuts->UnsetVertexRequirement();
130 //v0trackCuts->SetMaxChi2perClusterITS(36);
131 //hfecuts->SetSigmaToVertex(10);
132 v0trackCuts->SetTOFPIDStep(kTRUE);
133// v0trackCuts->SetTOFMISMATCHStep(kTRUE);
134 //v0trackCuts->SetTPCPIDCleanUpStep(kTRUE);
135 v0trackCuts->SetQAOn();
136
137 task->SwitchOnPlugin(AliAnalysisTaskHFE::kTaggedTrackAnalysis);
138 task->SetTaggedTrackCuts(v0trackCuts);
139 task->SetCleanTaggedTrack(kFALSE);
140
141 // change E/p cuts
142 AliHFEpidEMCAL *emcpid = pid->AliHFEpid::GetDetPID(AliHFEpid::kEMCALpid);
143 emcpid->SetEoPMax(1.2);
5b694e3d 144 emcpid->SetEoPMim(0.9);
d84c68e9 145
146 // QA
147 task->SetQAOn(AliAnalysisTaskHFE::kPIDqa);
148// task->SetFillSignalOnly(kFALSE); // for DE pluging for MC
149 task->SetQAOn(AliAnalysisTaskHFE::kMCqa);
150 //task->SwitchOnPlugin(AliAnalysisTaskHFE::kIsElecBackGround);
151 //task->SwitchOnPlugin(AliAnalysisTaskHFE::kSecVtx);
152 task->SwitchOnPlugin(AliAnalysisTaskHFE::kDEstep);
153
154
155
156 printf("*************************************\n");
157 printf("Configuring standard Task:\n");
158 task->Print();
159 pid->PrintStatus();
160 printf("*************************************\n");
161 return task;
162}