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