]>
Commit | Line | Data |
---|---|---|
7986e54e | 1 | AliAnalysisTaskHFE* ConfigHFEmbpPb(Bool_t useMC, Bool_t isAOD, UChar_t TPCcl=70, UChar_t TPCclPID = 80, UChar_t ITScl=3, |
2 | Double_t DCAxy=1000., Double_t DCAz=1000., | |
3 | Double_t TPCs=0., Double_t TPCu=3.09, Double_t TOFs=3., Int_t TOFmis=0, | |
4 | Double_t IpSig=3., Bool_t prodcut = kFALSE, | |
5 | Bool_t ipOpp = kTRUE, Bool_t mcstr = kFALSE, Int_t itshitpixel = 0, | |
6 | Bool_t withetacorrection = kTRUE, Int_t ptbin=0, Int_t TRDtrigger = 0){ | |
7 | // | |
8 | // HFE task configuration PID2 (TOF-TPC only!) | |
9 | // | |
10 | ||
e2861c1a | 11 | Bool_t kAnalyseTaggedTracks = kTRUE; |
7986e54e | 12 | |
13 | Int_t iDCAxy = (Int_t)(DCAxy*10.); | |
14 | Int_t iDCAz = (Int_t)(DCAz*10.); | |
15 | Int_t iTPCs = (Int_t)(TPCs*1000.); | |
16 | Int_t iTOFs = (Int_t)(TOFs*10.); | |
17 | Int_t iIpSig= (Int_t)(IpSig*10.); | |
18 | Int_t iIpOpp= 0; | |
19 | Int_t iProdCut = 1; | |
20 | Int_t iMCStr = 0; | |
21 | Int_t iPixelAny = itshitpixel; | |
22 | Int_t iEtaCorr = 0; | |
23 | if(ipOpp)iIpOpp = 1; | |
24 | if(prodcut) iProdCut = 0; | |
25 | if(mcstr) iMCStr = 1; | |
26 | if(withetacorrection) iEtaCorr = 1; | |
27 | ||
28 | printf("\n hfeCutsPID2t%di%dr%dz%ds%dt%db%dp%do%dt%dpa%detacorr%dptbin%d \n",TPCcl,ITScl,iDCAxy,iDCAz,iTPCs,iTOFs,TOFmis,iIpSig,iProdCut,iIpOpp,iMCStr,iPixelAny,iEtaCorr,ptbin); | |
29 | ||
30 | AliHFEcuts *hfecuts = new AliHFEcuts(Form("hfeCutsPID2tc%dtp%di%dr%dz%ds%dt%db%dp%do%dt%dpa%detacorr%dptbin%d",TPCcl,TPCclPID,ITScl,iDCAxy,iDCAz,iTPCs,iTOFs,TOFmis,iIpSig,iProdCut,iIpOpp,iMCStr,iPixelAny,iEtaCorr,ptbin),"HFE cuts TOF TPC"); | |
31 | //hfecuts->SetQAOn(); | |
32 | hfecuts->CreateStandardCuts(); | |
33 | hfecuts->SetMinNClustersTPC(TPCcl); | |
34 | hfecuts->SetMinNClustersTPCPID(TPCclPID); | |
35 | hfecuts->SetMinNClustersITS(ITScl); | |
36 | hfecuts->SetMinRatioTPCclusters(0.6); | |
37 | hfecuts->SetTPCmodes(AliHFEextraCuts::kFound, AliHFEextraCuts::kFoundOverFindable); | |
38 | hfecuts->SetCutITSpixel(itshitpixel); | |
39 | hfecuts->SetCheckITSLayerStatus(kFALSE); | |
40 | if(isAOD) hfecuts->SetAODFilterBit(4); | |
41 | Bool_t ipCharge = kFALSE; | |
42 | if(IpSig<0)ipCharge = kTRUE; | |
43 | ||
44 | hfecuts->SetIPcutParam(0,0,0,IpSig,kTRUE,ipCharge,ipOpp); | |
45 | if(TMath::Abs(IpSig)>100&&TMath::Abs(IpSig)<220){ | |
46 | hfecuts->SetIPcutParam(0.0064,0.078,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) | |
47 | } | |
48 | else if(TMath::Abs(IpSig)>220&&TMath::Abs(IpSig)<250){ | |
49 | hfecuts->SetIPcutParam(0.0064,0.072,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) | |
50 | } | |
51 | else if(TMath::Abs(IpSig)>250&&TMath::Abs(IpSig)<270){ | |
52 | hfecuts->SetIPcutParam(0.0064,0.083,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) | |
53 | } | |
54 | else if(TMath::Abs(IpSig)>270&&TMath::Abs(IpSig)<300){ | |
55 | hfecuts->SetIPcutParam(0.0064,0.088,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) | |
56 | } | |
57 | else if(TMath::Abs(IpSig)>300&&TMath::Abs(IpSig)<320){ | |
58 | hfecuts->SetIPcutParam(0.0064,0.098,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) | |
59 | } | |
60 | else if(TMath::Abs(IpSig)>320&&TMath::Abs(IpSig)<350){ | |
61 | hfecuts->SetIPcutParam(0.0064,0.108,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) | |
62 | } | |
63 | else if(TMath::Abs(IpSig)>350&&TMath::Abs(IpSig)<410){ | |
64 | hfecuts->SetIPcutParam(0.0064,0.058,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) | |
65 | } | |
66 | else if(TMath::Abs(IpSig)>410&&TMath::Abs(IpSig)<450){ | |
67 | hfecuts->SetIPcutParam(0.0064,0.053,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) | |
68 | } | |
69 | else if(TMath::Abs(IpSig)>450&&TMath::Abs(IpSig)<470){ | |
70 | hfecuts->SetIPcutParam(0.0064,0.068,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) | |
71 | } | |
72 | else if(TMath::Abs(IpSig)>470&&TMath::Abs(IpSig)<500){ | |
73 | hfecuts->SetIPcutParam(0.0064,0.048,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) | |
74 | } | |
75 | else if(TMath::Abs(IpSig)>500&&TMath::Abs(IpSig)<520){ | |
76 | hfecuts->SetIPcutParam(0.0044,0.078,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) | |
77 | } | |
78 | else if(TMath::Abs(IpSig)>520&&TMath::Abs(IpSig)<550){ | |
79 | hfecuts->SetIPcutParam(0.0054,0.078,-0.56,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) | |
80 | } | |
81 | else if(TMath::Abs(IpSig)>550&&TMath::Abs(IpSig)<600){ | |
82 | hfecuts->SetIPcutParam(0.011,0.077,-0.65,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) | |
83 | } | |
84 | else if(TMath::Abs(IpSig)>600&&TMath::Abs(IpSig)<700){ | |
85 | hfecuts->SetIPcutParam(0.012,0.077,-0.65,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) | |
86 | } | |
87 | else if(TMath::Abs(IpSig)>700&&TMath::Abs(IpSig)<900){ | |
88 | hfecuts->SetIPcutParam(0.013,0.077,-0.65,0,kFALSE,ipCharge,ipOpp); // used Carlo's old parameter (new: 0.011+0.077*exp(-0.65*pt)) | |
89 | } | |
90 | ||
91 | ||
92 | if(prodcut) hfecuts->SetProductionVertex(0,100,0,100); | |
93 | else { | |
94 | if((iPixelAny==AliHFEextraCuts::kAny) || (iPixelAny==AliHFEextraCuts::kSecond)) hfecuts->SetProductionVertex(0,7,0,7); | |
95 | } | |
96 | //if(trdsec) hfecuts->SetAdditionalStatusRequirement(AliVTrack::kTRDout); | |
97 | ||
98 | //hfecuts->SetSigmaToVertex(DCAsi); | |
99 | hfecuts->SetMaxImpactParam(DCAxy,DCAz); | |
100 | //hfecuts->SetQAOn(); | |
101 | hfecuts->SetUseMixedVertex(kTRUE); | |
102 | hfecuts->SetVertexRange(10.); | |
103 | // New pPb cuts (February 2013) | |
104 | hfecuts->SetUseCorrelationVertex(); | |
105 | hfecuts->SetSPDVtxResolutionCut(); | |
106 | ||
107 | // TOF settings: | |
108 | Int_t usetof=0; | |
109 | Bool_t kTOFmis=kFALSE; | |
110 | if (TOFs>0.){ | |
111 | usetof = 1; | |
112 | printf("CONFIGURATION FILE: TOF is used \n"); | |
113 | hfecuts->SetTOFPIDStep(kTRUE); | |
114 | printf("CONFIGURATION FILE: TOF PID step is requested !!!! \n"); | |
115 | if (TOFmis>0){ | |
116 | kTOFmis = kTRUE; | |
117 | printf("CONFIGURATION FILE: TOF mismatch rejection is set ON \n"); | |
118 | } | |
119 | } | |
120 | ||
121 | AliAnalysisTaskHFE *task = new AliAnalysisTaskHFE(Form("HFEanalysisPID2tc%dtp%di%dr%dz%ds%dt%db%dp%do%dt%dpa%detacorr%dptbin%dtrdtrg%d",TPCcl,TPCclPID,ITScl,iDCAxy,iDCAz,iTPCs,TOFs,iIpSig,iProdCut,iIpOpp,iMCStr,iPixelAny,iEtaCorr,ptbin,TRDtrigger)); | |
122 | printf("task %p\n", task); | |
123 | task->SetHFECuts(hfecuts); | |
124 | task->GetPIDQAManager()->SetHighResolutionHistos(); | |
125 | ||
126 | if(!isAOD) task->SetRemoveFirstEventInChunk(); // Remove first event in chunk in case of ESD analysis | |
127 | task->SetRemovePileUp(kFALSE); | |
128 | //task->SetApplypAVertexCut(); | |
129 | ||
130 | Bool_t activateTRDTrigger=kFALSE; | |
131 | if(TRDtrigger>0) activateTRDTrigger=kTRUE; | |
132 | task->SetTRDTrigger(activateTRDTrigger,TRDtrigger); | |
133 | ||
134 | // Define Variables | |
135 | if(ptbin==1){ | |
136 | Double_t ptbinning[19] = {0., 0.1, 0.3, 0.5, 0.7, 0.9, 1.1, 1.3, 1.5, 2., 2.5, 3., 4., 5., 6., 8., 12., 16., 20.}; | |
137 | } | |
138 | else{ | |
139 | // Double_t ptbinning[36] = {0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1., 1.1, 1.2, 1.3, 1.4, 1.5, 1.75, 2., 2.25, 2.5, 2.75, 3., 3.5, 4., 4.5, 5., 5.5, 6., 7., 8., 10., 12., 14., 16., 18., 20.}; | |
420bd2ea | 140 | Double_t ptbinning[41] = {0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1., 1.1, 1.2, 1.3, 1.4, 1.5, 1.75, 2., 2.25, 2.5, 2.75, 3., 3.5, 4., 4.5, 5., 5.5, 6., 7., 8., 10., 12., 14., 16., 18., 20., 22., 24., 26., 28., 30.}; |
7986e54e | 141 | } |
142 | //Double_t etabinning[33] = {-0.8, -0.75, -0.7, -0.65, -0.6, -0.55, -0.5, -0.45, -0.4, -0.35, -0.3, -0.25, -0.2, -0.15, -0.1, 0.05, 0., 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8}; | |
143 | //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}; | |
144 | Double_t etabinning[9] = {-0.8, -0.6, -0.4, -0.2, 0., 0.2, 0.4, 0.6, 0.8}; | |
145 | ||
146 | Int_t sizept=(sizeof(ptbinning)/sizeof(double))-1; | |
147 | Int_t sizeeta=(sizeof(etabinning)/sizeof(double))-1; | |
148 | ||
149 | AliHFEvarManager *vm = task->GetVarManager(); | |
150 | vm->AddVariable("pt", sizept, ptbinning); | |
151 | vm->AddVariable("eta", sizeeta, -0.8,0.8); | |
152 | vm->AddVariable("phi",21, -0, 2*TMath::Pi()); | |
153 | vm->AddVariable("charge"); | |
154 | vm->AddVariable("source"); | |
155 | //vm->AddVariable("centrality"); | |
156 | ||
157 | if(!useMC){ | |
158 | // New background model (LHC10d pass2) | |
159 | //TF1 *hBackground = new TF1("hadronicBackgroundFunction", "TMath::Exp(([0]/(x**1.5))+[1])", 0., 20.); | |
160 | TF1 *hBackground = new TF1("hadronicBackgroundFunction", "TMath::Exp([0]+TMath::Sqrt([1]*x))", 0., 20.); | |
161 | // These settings assume that the default is a cut on .ge.120 TPC clusters (Sep 27, 2011) | |
162 | hBackground->SetParameter(0, -15.86); | |
163 | hBackground->SetParameter(1, 33.63); | |
164 | if (TPCcl == 100){ | |
165 | hBackground->SetParameter(0, -14.36); | |
166 | hBackground->SetParameter(1, 27.16); | |
167 | } elseif (TPCcl == 110){ | |
168 | hBackground->SetParameter(0, -14.88); | |
169 | hBackground->SetParameter(1, 29.28); | |
170 | } | |
171 | ||
172 | task->SetBackGroundFactorsFunction(hBackground); | |
173 | } | |
174 | ||
175 | // Define PID | |
176 | AliHFEpid *pid = task->GetPID(); | |
177 | if(useMC) pid->SetHasMCData(kTRUE); | |
178 | ||
179 | if (usetof){ | |
180 | pid->AddDetector("TOF", 0); | |
181 | pid->AddDetector("TPC", 1); | |
182 | } else { | |
183 | pid->AddDetector("TPC", 0); | |
184 | } | |
185 | ||
186 | // HERE PUT THE STRAIGHT CUT | |
187 | Double_t params[4]; | |
188 | char *cutmodel; | |
189 | if(useMC){ | |
190 | // Monte-Carlo needs modelling of the falling mean with momentum at low momentum | |
191 | // for high momentum it is consistent with a flat -0.94 | |
192 | cutmodel = "expo(0)+pol1(2)";//[0]*TMath::Exp([1]*x) + [2] + [3]*x"; | |
193 | Double_t paramsMC[4] = {-1.00625e-01, -2.09446e+00, -4.71247e-01, 1.80301e-02}; | |
194 | for(int ipar = 0; ipar < 4; ipar++) params[ipar] = paramsMC[ipar]; | |
195 | } else { | |
196 | // Data is consistent with a flat constant: (Sep 27, 2011) | |
197 | // 100 clusters: mean = -0.076, width = 1.035 | |
198 | // 120 clusters: mean = -0.113, width = 1.03 | |
199 | // 140 clusters: mean = -0.093, width = 1.004 | |
200 | cutmodel = "pol0(0)"; | |
201 | params[0] = TPCs; | |
202 | } | |
203 | pid->ConfigureTPCdefaultCut(cutmodel, params, TPCu); | |
204 | ||
205 | if (usetof){ | |
206 | pid->ConfigureTOF(TOFs); | |
207 | AliHFEpidTOF *tofpid = pid->GetDetPID(AliHFEpid::kTOFpid); | |
208 | if (kTOFmis){ | |
209 | tofpid->SetRejectTOFmismatch(); | |
210 | } | |
211 | } | |
212 | ||
213 | ||
214 | // To make different upper TOF cut to see contamination effect | |
215 | // The below two lines should be removed after this check | |
216 | //AliHFEpidTOF *tofpid = pid->GetDetPID(AliHFEpid::kTOFpid); | |
217 | //if(TOFs<3.) tofpid->SetTOFnSigmaBand(-3,TOFs); //only to check the assymmetric tof cut | |
218 | ||
219 | if(kAnalyseTaggedTracks){ | |
220 | AliHFEcuts *v0trackCuts = new AliHFEcuts("V0trackCuts", "Track Cuts for tagged track Analysis"); | |
221 | v0trackCuts->CreateStandardCuts(); | |
222 | v0trackCuts->SetMinNClustersTPC(TPCcl); | |
223 | v0trackCuts->SetMinNClustersTPCPID(TPCclPID); | |
224 | v0trackCuts->SetMinRatioTPCclusters(0.6); | |
225 | v0trackCuts->SetTPCmodes(AliHFEextraCuts::kFound, AliHFEextraCuts::kFoundOverFindable); | |
226 | v0trackCuts->SetMinNClustersITS(1); | |
227 | v0trackCuts->SetCutITSpixel(AliHFEextraCuts::kFirst); | |
228 | v0trackCuts->SetCheckITSLayerStatus(kFALSE); | |
229 | v0trackCuts->UnsetVertexRequirement(); | |
230 | //hfecuts->SetSigmaToVertex(10); | |
231 | if(usetof) v0trackCuts->SetTOFPIDStep(kTRUE); | |
232 | v0trackCuts->SetQAOn(); | |
233 | ||
234 | task->SwitchOnPlugin(AliAnalysisTaskHFE::kTaggedTrackAnalysis); | |
235 | task->SetTaggedTrackCuts(v0trackCuts); | |
236 | task->SetCleanTaggedTrack(kTRUE); | |
237 | } | |
238 | ||
239 | // QA | |
240 | printf("task %p\n", task); | |
241 | task->SetQAOn(AliAnalysisTaskHFE::kPIDqa); | |
242 | task->SetQAOn(AliAnalysisTaskHFE::kMCqa); | |
243 | //task->SwitchOnPlugin(AliAnalysisTaskHFE::kIsElecBackGround); | |
244 | //task->SwitchOnPlugin(AliAnalysisTaskHFE::kSecVtx); | |
245 | task->SwitchOnPlugin(AliAnalysisTaskHFE::kDEstep); | |
246 | if(useMC && mcstr) task->SetDebugStreaming(); | |
247 | ||
248 | printf("*************************************\n"); | |
249 | printf("Configuring standard Task:\n"); | |
250 | task->PrintStatus(); | |
251 | pid->PrintStatus(); | |
252 | printf("*************************************\n"); | |
253 | return task; | |
254 | } |