]>
Commit | Line | Data |
---|---|---|
7eb0cc73 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
27de2dfb | 16 | /* $Id$ */ |
17 | ||
7eb0cc73 | 18 | ///////////////////////////////////////////////////////////// |
19 | // | |
4c7fd068 | 20 | // AliAnalysisTaskSE for the extraction of signal(e.g Lambdac) of heavy flavor |
7eb0cc73 | 21 | // decay candidates with the MC truth. |
4c7fd068 | 22 | // Authors: r.romita@gsi.de |
7eb0cc73 | 23 | ///////////////////////////////////////////////////////////// |
24 | ||
25 | #include <TClonesArray.h> | |
26 | #include <TNtuple.h> | |
27 | #include <TCanvas.h> | |
28 | #include <TList.h> | |
29 | #include <TString.h> | |
30 | #include <TH1F.h> | |
31 | #include <TH2F.h> | |
32 | #include <TDatabasePDG.h> | |
33 | ||
029ed93a | 34 | #include <AliAnalysisDataSlot.h> |
35 | #include <AliAnalysisDataContainer.h> | |
7eb0cc73 | 36 | #include "AliAnalysisManager.h" |
37 | #include "AliAODHandler.h" | |
38 | #include "AliAODEvent.h" | |
39 | #include "AliAODVertex.h" | |
40 | #include "AliAODTrack.h" | |
41 | #include "AliAODMCHeader.h" | |
42 | #include "AliAODMCParticle.h" | |
43 | #include "AliAODRecoDecayHF3Prong.h" | |
44 | #include "AliAnalysisVertexingHF.h" | |
45 | #include "AliAnalysisTaskSE.h" | |
46 | #include "AliAnalysisTaskSELambdac.h" | |
47 | #include "AliKFParticle.h" | |
48 | #include "AliAODPidHF.h" | |
49 | #include "AliRDHFCutsLctopKpi.h" | |
50 | #include "AliRDHFCuts.h" | |
7ad4b782 | 51 | #include "AliKFVertex.h" |
52 | #include "AliESDVertex.h" | |
60eac73d | 53 | //#include "AliAODpidUtil.h" |
029ed93a | 54 | #include "AliAODPid.h" |
55 | #include "AliInputEventHandler.h" | |
60eac73d | 56 | #include "AliPID.h" |
7eb0cc73 | 57 | |
58 | ClassImp(AliAnalysisTaskSELambdac) | |
59 | ||
60 | ||
61 | //________________________________________________________________________ | |
60eac73d | 62 | AliAnalysisTaskSELambdac::AliAnalysisTaskSELambdac(): |
63 | AliAnalysisTaskSE(), | |
64 | fOutput(0), | |
65 | fHistNEvents(0), | |
66 | fhChi2(0), | |
67 | fhMassPtGreater3(0), | |
68 | fhMassPtGreater3TC(0), | |
69 | fhMassPtGreater3Kp(0), | |
70 | fhMassPtGreater3KpTC(0), | |
71 | fhMassPtGreater3Lpi(0), | |
72 | fhMassPtGreater3LpiTC(0), | |
73 | fhMassPtGreater2(0), | |
74 | fhMassPtGreater2TC(0), | |
75 | fhMassPtGreater2Kp(0), | |
76 | fhMassPtGreater2KpTC(0), | |
77 | fhMassPtGreater2Lpi(0), | |
78 | fhMassPtGreater2LpiTC(0), | |
79 | fNtupleLambdac(0), | |
80 | fUpmasslimit(2.486), | |
81 | fLowmasslimit(2.086), | |
82 | fNPtBins(0), | |
83 | fRDCutsAnalysis(0), | |
84 | fRDCutsProduction(0), | |
85 | fListCuts(0), | |
86 | fFillNtuple(kFALSE), | |
87 | fReadMC(kFALSE), | |
88 | fMCPid(kFALSE), | |
89 | fRealPid(kFALSE), | |
90 | fResPid(kTRUE), | |
91 | fUseKF(kFALSE), | |
92 | fAnalysis(kFALSE), | |
93 | fVHF(0), | |
94 | fFillVarHists(kFALSE), | |
95 | fMultiplicityHists(kFALSE), | |
96 | fPriorsHists(kFALSE), | |
97 | fNentries(0), | |
98 | fOutputMC(0), | |
99 | fAPriori(0), | |
100 | fMultiplicity(0), | |
101 | //fUtilPid(0), | |
102 | fPIDResponse(0) | |
7eb0cc73 | 103 | { |
60eac73d | 104 | // Default constructor |
c0d01d9d | 105 | Float_t ptlims[7]={0.,2.,4.,6.,8.,12.,24.}; |
106 | SetPtBinLimit(7,ptlims); | |
dc818294 | 107 | for(Int_t icut=0; icut<10; icut++) fCutsKF[icut]=0.; |
108 | for(Int_t j=0; j<3*kMaxPtBins; j++){ | |
109 | fMassHist[j]=0x0; | |
110 | fMassHistTC[j]=0x0; | |
111 | fMassHistLpi[j]=0x0; | |
112 | fMassHistLpiTC[j]=0x0; | |
113 | fMassHistKp[j]=0x0; | |
114 | fMassHistKpTC[j]=0x0; | |
115 | } | |
7eb0cc73 | 116 | } |
117 | ||
118 | //________________________________________________________________________ | |
119 | AliAnalysisTaskSELambdac::AliAnalysisTaskSELambdac(const char *name,Bool_t fillNtuple,AliRDHFCutsLctopKpi *lccutsana,AliRDHFCutsLctopKpi *lccutsprod): | |
60eac73d | 120 | AliAnalysisTaskSE(name), |
121 | fOutput(0), | |
122 | fHistNEvents(0), | |
123 | fhChi2(0), | |
124 | fhMassPtGreater3(0), | |
125 | fhMassPtGreater3TC(0), | |
126 | fhMassPtGreater3Kp(0), | |
127 | fhMassPtGreater3KpTC(0), | |
128 | fhMassPtGreater3Lpi(0), | |
129 | fhMassPtGreater3LpiTC(0), | |
130 | fhMassPtGreater2(0), | |
131 | fhMassPtGreater2TC(0), | |
132 | fhMassPtGreater2Kp(0), | |
133 | fhMassPtGreater2KpTC(0), | |
134 | fhMassPtGreater2Lpi(0), | |
135 | fhMassPtGreater2LpiTC(0), | |
136 | fNtupleLambdac(0), | |
137 | fUpmasslimit(2.486), | |
138 | fLowmasslimit(2.086), | |
139 | fNPtBins(0), | |
140 | fRDCutsAnalysis(lccutsana), | |
141 | fRDCutsProduction(lccutsprod), | |
142 | fListCuts(0), | |
143 | fFillNtuple(fillNtuple), | |
144 | fReadMC(kFALSE), | |
145 | fMCPid(kFALSE), | |
146 | fRealPid(kTRUE), | |
147 | fResPid(kFALSE), | |
148 | fUseKF(kFALSE), | |
149 | fAnalysis(kFALSE), | |
150 | fVHF(0), | |
151 | fFillVarHists(kFALSE), | |
152 | fMultiplicityHists(kFALSE), | |
153 | fPriorsHists(kFALSE), | |
154 | fNentries(0), | |
155 | fOutputMC(0), | |
156 | fAPriori(0), | |
157 | fMultiplicity(0), | |
158 | //fUtilPid(0), | |
159 | fPIDResponse(0) | |
7eb0cc73 | 160 | { |
dc818294 | 161 | // Default constructor |
162 | ||
60eac73d | 163 | SetPtBinLimit(fRDCutsAnalysis->GetNPtBins()+1, |
164 | fRDCutsAnalysis->GetPtBinLimits()); | |
dc818294 | 165 | |
166 | for(Int_t icut=0; icut<10; icut++) fCutsKF[icut]=0.; | |
167 | for(Int_t j=0; j<3*kMaxPtBins; j++){ | |
168 | fMassHist[j]=0x0; | |
169 | fMassHistTC[j]=0x0; | |
170 | fMassHistLpi[j]=0x0; | |
171 | fMassHistLpiTC[j]=0x0; | |
172 | fMassHistKp[j]=0x0; | |
173 | fMassHistKpTC[j]=0x0; | |
174 | } | |
60eac73d | 175 | // Output slot #1 writes into a TList container |
7eb0cc73 | 176 | DefineOutput(1,TList::Class()); //My private output |
177 | DefineOutput(2,TList::Class()); | |
029ed93a | 178 | DefineOutput(3,TList::Class()); |
179 | DefineOutput(4,TH1F::Class()); | |
60eac73d | 180 | DefineOutput(5,TList::Class()); |
181 | DefineOutput(6,TList::Class()); | |
182 | if (fFillNtuple) { | |
7eb0cc73 | 183 | // Output slot #2 writes into a TNtuple container |
60eac73d | 184 | DefineOutput(7,TNtuple::Class()); //My private output |
7eb0cc73 | 185 | } |
60eac73d | 186 | |
7eb0cc73 | 187 | } |
188 | ||
189 | //________________________________________________________________________ | |
190 | AliAnalysisTaskSELambdac::~AliAnalysisTaskSELambdac() | |
191 | { | |
192 | // Destructor | |
193 | if (fOutput) { | |
194 | delete fOutput; | |
195 | fOutput = 0; | |
196 | } | |
029ed93a | 197 | if (fOutputMC) { |
198 | delete fOutputMC; | |
199 | fOutputMC = 0; | |
200 | } | |
60eac73d | 201 | if (fAPriori) { |
202 | delete fAPriori; | |
203 | fAPriori = 0; | |
204 | } | |
205 | if (fMultiplicity) { | |
206 | delete fMultiplicity; | |
207 | fMultiplicity = 0; | |
208 | } | |
029ed93a | 209 | |
7eb0cc73 | 210 | if (fVHF) { |
211 | delete fVHF; | |
212 | fVHF = 0; | |
213 | } | |
214 | ||
60eac73d | 215 | if(fRDCutsAnalysis){ |
7eb0cc73 | 216 | delete fRDCutsAnalysis; |
217 | fRDCutsAnalysis = 0; | |
60eac73d | 218 | } |
219 | if(fRDCutsProduction){ | |
7eb0cc73 | 220 | delete fRDCutsProduction; |
221 | fRDCutsProduction = 0; | |
60eac73d | 222 | } |
223 | ||
224 | if (fListCuts) { | |
225 | delete fListCuts; | |
226 | fListCuts = 0; | |
227 | } | |
228 | if (fNentries){ | |
229 | delete fNentries; | |
230 | fNentries = 0; | |
231 | } | |
232 | /* | |
233 | if (fUtilPid){ | |
234 | delete fUtilPid; | |
235 | fUtilPid = 0; | |
236 | } | |
237 | */ | |
238 | if (fPIDResponse) { | |
239 | delete fPIDResponse; | |
240 | } | |
241 | ||
7eb0cc73 | 242 | } |
243 | //_________________________________________________________________ | |
244 | void AliAnalysisTaskSELambdac::SetMassLimits(Float_t range){ | |
245 | fUpmasslimit = 2.286+range; | |
246 | fLowmasslimit = 2.286-range; | |
247 | } | |
248 | //_________________________________________________________________ | |
249 | void AliAnalysisTaskSELambdac::SetMassLimits(Float_t lowlimit, Float_t uplimit){ | |
250 | if(uplimit>lowlimit) | |
251 | { | |
252 | fUpmasslimit = lowlimit; | |
253 | fLowmasslimit = uplimit; | |
254 | } | |
255 | } | |
256 | ||
257 | ||
258 | //________________________________________________________________________ | |
259 | void AliAnalysisTaskSELambdac::SetPtBinLimit(Int_t n, Float_t* lim){ | |
260 | // define pt bins for analysis | |
261 | if(n>kMaxPtBins){ | |
262 | printf("Max. number of Pt bins = %d\n",kMaxPtBins); | |
263 | fNPtBins=kMaxPtBins; | |
264 | fArrayBinLimits[0]=0.; | |
265 | fArrayBinLimits[1]=2.; | |
266 | fArrayBinLimits[2]=3.; | |
7ad4b782 | 267 | fArrayBinLimits[3]=4.; |
7eb0cc73 | 268 | for(Int_t i=4; i<kMaxPtBins+1; i++) fArrayBinLimits[i]=99999999.; |
269 | }else{ | |
270 | fNPtBins=n-1; | |
271 | fArrayBinLimits[0]=lim[0]; | |
272 | for(Int_t i=1; i<fNPtBins+1; i++) | |
273 | if(lim[i]>fArrayBinLimits[i-1]){ | |
274 | fArrayBinLimits[i]=lim[i]; | |
275 | } | |
276 | else { | |
277 | fArrayBinLimits[i]=fArrayBinLimits[i-1]; | |
278 | } | |
279 | for(Int_t i=fNPtBins; i<kMaxPtBins+1; i++) fArrayBinLimits[i]=99999999.; | |
280 | } | |
281 | if(fDebug > 1){ | |
282 | printf("Number of Pt bins = %d\n",fNPtBins); | |
e11ae259 | 283 | for(Int_t i=0; i<fNPtBins; i++) printf(" Bin%d = %8.2f-%8.2f\n",i,fArrayBinLimits[i],fArrayBinLimits[i+1]); |
7eb0cc73 | 284 | } |
285 | } | |
286 | //_________________________________________________________________ | |
4c7fd068 | 287 | Double_t AliAnalysisTaskSELambdac::GetPtBinLimit(Int_t ibin) const{ |
7eb0cc73 | 288 | if(ibin>fNPtBins)return -1; |
289 | return fArrayBinLimits[ibin]; | |
290 | } | |
291 | ||
292 | //_________________________________________________________________ | |
293 | void AliAnalysisTaskSELambdac::Init() | |
294 | { | |
295 | // Initialization | |
296 | ||
60eac73d | 297 | if (fDebug > 1) printf("AnalysisTaskSELambdac::Init() \n"); |
7eb0cc73 | 298 | |
299 | fListCuts=new TList(); | |
029ed93a | 300 | fListCuts->SetOwner(); |
7eb0cc73 | 301 | |
dc222f77 | 302 | fListCuts->Add(new AliRDHFCutsLctopKpi(*fRDCutsAnalysis)); |
303 | fListCuts->Add(new AliRDHFCutsLctopKpi(*fRDCutsProduction)); | |
304 | PostData(2,fListCuts); | |
7eb0cc73 | 305 | return; |
306 | } | |
307 | ||
308 | //________________________________________________________________________ | |
309 | void AliAnalysisTaskSELambdac::UserCreateOutputObjects() | |
310 | { | |
311 | // Create the output container | |
312 | // | |
60eac73d | 313 | if (fDebug > 1) printf("AnalysisTaskSELambdac::UserCreateOutputObjects() \n"); |
7eb0cc73 | 314 | |
315 | // Several histograms are more conveniently managed in a TList | |
316 | fOutput = new TList(); | |
317 | fOutput->SetOwner(); | |
318 | fOutput->SetName("OutputHistos"); | |
319 | ||
320 | TString hisname; | |
321 | Int_t index=0; | |
322 | Int_t indexLS=0; | |
323 | for(Int_t i=0;i<fNPtBins;i++){ | |
324 | ||
325 | index=GetHistoIndex(i); | |
326 | indexLS=GetLSHistoIndex(i); | |
327 | ||
328 | hisname.Form("hMassPt%d",i); | |
329 | fMassHist[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit); | |
330 | fMassHist[index]->Sumw2(); | |
7eb0cc73 | 331 | hisname.Form("hMassPt%dTC",i); |
332 | fMassHistTC[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit); | |
333 | fMassHistTC[index]->Sumw2(); | |
334 | ||
029ed93a | 335 | hisname.Form("hMassPtLpi%d",i); |
336 | fMassHistLpi[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit); | |
337 | fMassHistLpi[index]->Sumw2(); | |
338 | hisname.Form("hMassPtLpi%dTC",i); | |
339 | fMassHistLpiTC[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit); | |
340 | fMassHistLpiTC[index]->Sumw2(); | |
341 | ||
342 | hisname.Form("hMassPtKp%d",i); | |
343 | fMassHistKp[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit); | |
344 | fMassHistKp[index]->Sumw2(); | |
345 | hisname.Form("hMassPtKp%dTC",i); | |
346 | fMassHistKpTC[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit); | |
347 | fMassHistKpTC[index]->Sumw2(); | |
60eac73d | 348 | //signal |
7eb0cc73 | 349 | index=GetSignalHistoIndex(i); |
7eb0cc73 | 350 | hisname.Form("hSigPt%d",i); |
351 | fMassHist[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit); | |
352 | fMassHist[index]->Sumw2(); | |
7eb0cc73 | 353 | hisname.Form("hSigPt%dTC",i); |
354 | fMassHistTC[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit); | |
355 | fMassHistTC[index]->Sumw2(); | |
029ed93a | 356 | hisname.Form("hSigPtLpi%d",i); |
357 | fMassHistLpi[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit); | |
358 | fMassHistLpi[index]->Sumw2(); | |
359 | hisname.Form("hSigPtLpi%dTC",i); | |
360 | fMassHistLpiTC[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit); | |
361 | fMassHistLpiTC[index]->Sumw2(); | |
362 | ||
363 | hisname.Form("hSigPtKp%d",i); | |
364 | fMassHistKp[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit); | |
365 | fMassHistKp[index]->Sumw2(); | |
366 | hisname.Form("hSigPtKp%dTC",i); | |
367 | fMassHistKpTC[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit); | |
368 | fMassHistKpTC[index]->Sumw2(); | |
7eb0cc73 | 369 | |
370 | index=GetBackgroundHistoIndex(i); | |
7eb0cc73 | 371 | hisname.Form("hBkgPt%d",i); |
372 | fMassHist[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit); | |
373 | fMassHist[index]->Sumw2(); | |
7eb0cc73 | 374 | hisname.Form("hBkgPt%dTC",i); |
375 | fMassHistTC[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit); | |
376 | fMassHistTC[index]->Sumw2(); | |
029ed93a | 377 | hisname.Form("hBkgPtLpi%d",i); |
378 | fMassHistLpi[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit); | |
379 | fMassHistLpi[index]->Sumw2(); | |
380 | hisname.Form("hBkgPtLpi%dTC",i); | |
381 | fMassHistLpiTC[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit); | |
382 | fMassHistLpiTC[index]->Sumw2(); | |
383 | ||
384 | hisname.Form("hBkgPtKp%d",i); | |
385 | fMassHistKp[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit); | |
386 | fMassHistKp[index]->Sumw2(); | |
387 | hisname.Form("hBkgPtKp%dTC",i); | |
388 | fMassHistKpTC[index]=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit); | |
389 | fMassHistKpTC[index]->Sumw2(); | |
60eac73d | 390 | } |
7eb0cc73 | 391 | |
392 | for(Int_t i=0; i<3*fNPtBins; i++){ | |
393 | fOutput->Add(fMassHist[i]); | |
394 | fOutput->Add(fMassHistTC[i]); | |
029ed93a | 395 | fOutput->Add(fMassHistLpi[i]); |
396 | fOutput->Add(fMassHistLpiTC[i]); | |
397 | fOutput->Add(fMassHistKp[i]); | |
398 | fOutput->Add(fMassHistKpTC[i]); | |
7eb0cc73 | 399 | } |
400 | ||
7eb0cc73 | 401 | fHistNEvents = new TH1F("fHistNEvents", "Number of processed events; ; Events",3,-1.5,1.5); |
402 | fHistNEvents->Sumw2(); | |
403 | fHistNEvents->SetMinimum(0); | |
404 | fOutput->Add(fHistNEvents); | |
7ad4b782 | 405 | |
406 | fhChi2 = new TH1F("fhChi2", "Chi2",100,0.,10.); | |
407 | fhChi2->Sumw2(); | |
408 | fOutput->Add(fhChi2); | |
409 | ||
410 | fhMassPtGreater3=new TH1F("fhMassPtGreater3","Pt > 3 GeV/c",100,fLowmasslimit,fUpmasslimit); | |
411 | fhMassPtGreater3->Sumw2(); | |
412 | fOutput->Add(fhMassPtGreater3); | |
413 | fhMassPtGreater3TC=new TH1F("fhMassPtGreater3TC","Pt > 3 GeV/c",100,fLowmasslimit,fUpmasslimit); | |
414 | fhMassPtGreater3TC->Sumw2(); | |
415 | fOutput->Add(fhMassPtGreater3TC); | |
029ed93a | 416 | fhMassPtGreater3Kp=new TH1F("fhMassPtGreater3Kp","Pt > 3 GeV/c",100,fLowmasslimit,fUpmasslimit); |
417 | fhMassPtGreater3Kp->Sumw2(); | |
418 | fOutput->Add(fhMassPtGreater3Kp); | |
419 | fhMassPtGreater3KpTC=new TH1F("fhMassPtGreater3KpTC","Pt > 3 GeV/c",100,fLowmasslimit,fUpmasslimit); | |
420 | fhMassPtGreater3KpTC->Sumw2(); | |
421 | fOutput->Add(fhMassPtGreater3KpTC); | |
422 | fhMassPtGreater3Lpi=new TH1F("fhMassPtGreater3Lpi","Pt > 3 GeV/c",100,fLowmasslimit,fUpmasslimit); | |
423 | fhMassPtGreater3Lpi->Sumw2(); | |
424 | fOutput->Add(fhMassPtGreater3Lpi); | |
425 | fhMassPtGreater3LpiTC=new TH1F("fhMassPtGreater3LpiTC","Pt > 3 GeV/c",100,fLowmasslimit,fUpmasslimit); | |
426 | fhMassPtGreater3LpiTC->Sumw2(); | |
427 | fOutput->Add(fhMassPtGreater3LpiTC); | |
428 | fhMassPtGreater2=new TH1F("fhMassPtGreater2","Pt > 2 GeV/c",100,fLowmasslimit,fUpmasslimit); | |
429 | fhMassPtGreater2->Sumw2(); | |
430 | fOutput->Add(fhMassPtGreater2); | |
431 | fhMassPtGreater2TC=new TH1F("fhMassPtGreater2TC","Pt > 2 GeV/c",100,fLowmasslimit,fUpmasslimit); | |
432 | fhMassPtGreater2TC->Sumw2(); | |
433 | fOutput->Add(fhMassPtGreater2TC); | |
434 | fhMassPtGreater2Kp=new TH1F("fhMassPtGreater2Kp","Pt > 2 GeV/c",100,fLowmasslimit,fUpmasslimit); | |
435 | fhMassPtGreater2Kp->Sumw2(); | |
436 | fOutput->Add(fhMassPtGreater2Kp); | |
437 | fhMassPtGreater2KpTC=new TH1F("fhMassPtGreater2KpTC","Pt > 2 GeV/c",100,fLowmasslimit,fUpmasslimit); | |
438 | fhMassPtGreater2KpTC->Sumw2(); | |
439 | fOutput->Add(fhMassPtGreater2KpTC); | |
440 | fhMassPtGreater2Lpi=new TH1F("fhMassPtGreater2Lpi","Pt > 2 GeV/c",100,fLowmasslimit,fUpmasslimit); | |
441 | fhMassPtGreater2Lpi->Sumw2(); | |
442 | fOutput->Add(fhMassPtGreater2Lpi); | |
443 | fhMassPtGreater2LpiTC=new TH1F("fhMassPtGreater2LpiTC","Pt > 2 GeV/c",100,fLowmasslimit,fUpmasslimit); | |
444 | fhMassPtGreater2LpiTC->Sumw2(); | |
445 | fOutput->Add(fhMassPtGreater2LpiTC); | |
446 | ||
447 | fOutputMC = new TList(); | |
448 | fOutputMC->SetOwner(); | |
449 | fOutputMC->SetName("QAMCHistos"); | |
450 | ||
60eac73d | 451 | // const char* nameoutput=GetOutputSlot(4)->GetContainer()->GetName(); |
029ed93a | 452 | |
453 | fNentries=new TH1F("fNentries", "Integral(1,2) = number of AODs *** Integral(2,3) = number of candidates selected with cuts *** Integral(3,4) = number of Lc selected with cuts *** Integral(4,5) = events with good vertex *** Integral(5,6) = pt out of bounds", 11,-0.5,10.5); | |
454 | ||
455 | //ROS: qui il bin assignment e' modellato su D0 ma sicuramente iv arie | |
456 | fNentries->GetXaxis()->SetBinLabel(1,"nEventsAnal"); | |
457 | fNentries->GetXaxis()->SetBinLabel(2,"nCandSel(Cuts)"); | |
458 | fNentries->GetXaxis()->SetBinLabel(3,"nLcSelected"); | |
459 | fNentries->GetXaxis()->SetBinLabel(4,"nEventsGoodVtxS"); | |
460 | fNentries->GetXaxis()->SetBinLabel(5,"ptbin = -1"); | |
461 | fNentries->GetXaxis()->SetBinLabel(6,"no daughter"); | |
462 | fNentries->GetXaxis()->SetBinLabel(7,"nCandSel(Tr)"); | |
463 | fNentries->GetXaxis()->SetBinLabel(8,"PID=0"); | |
464 | fNentries->GetXaxis()->SetBinLabel(9,"PID=1"); | |
465 | fNentries->GetXaxis()->SetBinLabel(10,"PID=2"); | |
466 | fNentries->GetXaxis()->SetBinLabel(11,"PID=3"); | |
467 | fNentries->GetXaxis()->SetNdivisions(1,kFALSE); | |
468 | ||
469 | hisname.Form("hMass"); | |
470 | TH1F *hMassInv=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit); | |
471 | fOutputMC->Add(hMassInv); | |
472 | hisname.Form("hbMass"); | |
473 | TH1F *hBMassInv=new TH1F(hisname.Data(),hisname.Data(),100,fLowmasslimit,fUpmasslimit); | |
474 | fOutputMC->Add(hBMassInv); | |
475 | ||
476 | // proton specific | |
477 | hisname.Form("hpTOFSignal"); | |
478 | TH1F *hProtonTOFSignal=new TH1F(hisname.Data(),hisname.Data(),100,12000.,50000.0); | |
479 | fOutputMC->Add(hProtonTOFSignal); | |
480 | hisname.Form("hbpTOFSignal"); | |
481 | TH1F *hBProtonTOFSignal=new TH1F(hisname.Data(),hisname.Data(),100,12000.,50000.0); | |
482 | fOutputMC->Add(hBProtonTOFSignal); | |
483 | ||
484 | hisname.Form("hpTPCSignal"); | |
485 | TH1F *hProtonTPCSignal=new TH1F(hisname.Data(),hisname.Data(),150,0.,150.0); | |
486 | fOutputMC->Add(hProtonTPCSignal); | |
487 | hisname.Form("hbpTPCSignal"); | |
488 | TH1F *hBProtonTPCSignal=new TH1F(hisname.Data(),hisname.Data(),150,0.,150.0); | |
489 | fOutputMC->Add(hBProtonTPCSignal); | |
7eb0cc73 | 490 | |
029ed93a | 491 | hisname.Form("hpptProng"); |
492 | TH1F *hProtonPtProng=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.0); | |
493 | fOutputMC->Add(hProtonPtProng); | |
494 | hisname.Form("hbpptProng"); | |
495 | TH1F *hBProtonPtProng=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.0); | |
496 | fOutputMC->Add(hBProtonPtProng); | |
497 | ||
498 | hisname.Form("hpRealTot"); | |
499 | TH1F *hProtonRealTot=new TH1F(hisname.Data(),hisname.Data(),100,0.,10.0); | |
500 | fOutputMC->Add(hProtonRealTot); | |
501 | hisname.Form("hbpRealTot"); | |
502 | TH1F *hBProtonRealTot=new TH1F(hisname.Data(),hisname.Data(),100,0.,10.0); | |
503 | fOutputMC->Add(hBProtonRealTot); | |
504 | hisname.Form("hpIDTot"); | |
505 | TH1F *hProtonIDTot=new TH1F(hisname.Data(),hisname.Data(),100,0.,10.0); | |
506 | fOutputMC->Add(hProtonIDTot); | |
507 | hisname.Form("hpIDGood"); | |
508 | TH1F *hProtonIDGood=new TH1F(hisname.Data(),hisname.Data(),100,0.,10.0); | |
509 | fOutputMC->Add(hProtonIDGood); | |
510 | hisname.Form("hbpIDGood"); | |
511 | TH1F *hBProtonIDGood=new TH1F(hisname.Data(),hisname.Data(),100,0.,10.0); | |
512 | fOutputMC->Add(hBProtonIDGood); | |
513 | hisname.Form("hbpIDTot"); | |
514 | TH1F *hBProtonIDTot=new TH1F(hisname.Data(),hisname.Data(),100,0.,10.0); | |
515 | fOutputMC->Add(hBProtonIDTot); | |
60eac73d | 516 | hisname.Form("hnopIDp"); |
517 | TH1F *hnoProtonIDpTot=new TH1F(hisname.Data(),hisname.Data(),100,0.,10.0); | |
518 | fOutputMC->Add(hnoProtonIDpTot); | |
519 | hisname.Form("hbnopIDp"); | |
520 | TH1F *hBnoProtonIDpTot=new TH1F(hisname.Data(),hisname.Data(),100,0.,10.0); | |
521 | fOutputMC->Add(hBnoProtonIDpTot); | |
029ed93a | 522 | |
523 | hisname.Form("hpd0Prong"); | |
524 | TH1F *hProtond0Prong=new TH1F(hisname.Data(),hisname.Data(),100,-0.1,0.1); | |
525 | fOutputMC->Add(hProtond0Prong); | |
526 | hisname.Form("hbpd0Prong"); | |
527 | TH1F *hBProtond0Prong=new TH1F(hisname.Data(),hisname.Data(),100,-0.1,0.1); | |
528 | fOutputMC->Add(hBProtond0Prong); | |
529 | hisname.Form("hbpSignalVspTOF"); | |
530 | TH2F *hBpSignalVspTOF=new TH2F(hisname.Data(),hisname.Data(),100,0.,5.0,100,12000.,50000.0); | |
531 | fOutputMC->Add(hBpSignalVspTOF); | |
532 | hisname.Form("hbpSignalVspTPC"); | |
533 | TH2F *hBpSignalVspTPC=new TH2F(hisname.Data(),hisname.Data(),100,0.,5.0,150,0.,150.0); | |
534 | fOutputMC->Add(hBpSignalVspTPC); | |
535 | hisname.Form("hpSignalVspTOF"); | |
536 | TH2F *hpSignalVspTOF=new TH2F(hisname.Data(),hisname.Data(),100,0.,5.0,100,12000.,50000.0); | |
537 | fOutputMC->Add(hpSignalVspTOF); | |
538 | hisname.Form("hpSignalVspTPC"); | |
539 | TH2F *hpSignalVspTPC=new TH2F(hisname.Data(),hisname.Data(),100,0.,5.0,150,0.,150.0); | |
540 | fOutputMC->Add(hpSignalVspTPC); | |
541 | ||
542 | hisname.Form("hpSigmaVspTOF"); | |
543 | TH2F *hpSigmaVspTOF=new TH2F(hisname.Data(),hisname.Data(),100,0.,5.0,100,-10.0,10.0); | |
544 | fOutputMC->Add(hpSigmaVspTOF); | |
545 | hisname.Form("hpSigmaVspTPC"); | |
546 | TH2F *hpSigmaVspTPC=new TH2F(hisname.Data(),hisname.Data(),100,0.,5.0,100,-10.0,10.0); | |
547 | fOutputMC->Add(hpSigmaVspTPC); | |
548 | hisname.Form("hbpSigmaVspTOF"); | |
549 | TH2F *hBpSigmaVspTOF=new TH2F(hisname.Data(),hisname.Data(),100,0.,5.0,100,-10.0,10.0); | |
550 | fOutputMC->Add(hBpSigmaVspTOF); | |
551 | hisname.Form("hbpSigmaVspTPC"); | |
552 | TH2F *hBpSigmaVspTPC=new TH2F(hisname.Data(),hisname.Data(),100,0.,5.0,100,-10.0,10.0); | |
553 | fOutputMC->Add(hBpSigmaVspTPC); | |
554 | ||
029ed93a | 555 | |
60eac73d | 556 | //kaon specific |
029ed93a | 557 | hisname.Form("hKTOFSignal"); |
558 | TH1F *hKaonTOFSignal=new TH1F(hisname.Data(),hisname.Data(),100,12000.,50000.0); | |
559 | fOutputMC->Add(hKaonTOFSignal); | |
560 | hisname.Form("hbKTOFSignal"); | |
561 | TH1F *hBKaonTOFSignal=new TH1F(hisname.Data(),hisname.Data(),100,12000.,50000.0); | |
562 | fOutputMC->Add(hBKaonTOFSignal); | |
029ed93a | 563 | hisname.Form("hKTPCSignal"); |
564 | TH1F *hKaonTPCSignal=new TH1F(hisname.Data(),hisname.Data(),150,0.,150.0); | |
565 | fOutputMC->Add(hKaonTPCSignal); | |
566 | hisname.Form("hbKTPCSignal"); | |
567 | TH1F *hBKaonTPCSignal=new TH1F(hisname.Data(),hisname.Data(),150,0.,150.0); | |
568 | fOutputMC->Add(hBKaonTPCSignal); | |
569 | ||
570 | hisname.Form("hKptProng"); | |
571 | TH1F *hKaonPtProng=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.0); | |
572 | fOutputMC->Add(hKaonPtProng); | |
573 | hisname.Form("hbKptProng"); | |
574 | TH1F *hBKaonPtProng=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.0); | |
575 | fOutputMC->Add(hBKaonPtProng); | |
029ed93a | 576 | hisname.Form("hKRealTot"); |
577 | TH1F *hKaonRealTot=new TH1F(hisname.Data(),hisname.Data(),100,0.,10.0); | |
578 | fOutputMC->Add(hKaonRealTot); | |
579 | hisname.Form("hbKRealTot"); | |
580 | TH1F *hBKaonRealTot=new TH1F(hisname.Data(),hisname.Data(),100,0.,10.0); | |
581 | fOutputMC->Add(hBKaonRealTot); | |
582 | hisname.Form("hKIDGood"); | |
583 | TH1F *hKaonIDGood=new TH1F(hisname.Data(),hisname.Data(),100,0.,10.0); | |
584 | fOutputMC->Add(hKaonIDGood); | |
585 | hisname.Form("hKIDTot"); | |
586 | TH1F *hKaonIDTot=new TH1F(hisname.Data(),hisname.Data(),100,0.,10.0); | |
587 | fOutputMC->Add(hKaonIDTot); | |
588 | hisname.Form("hbKIDGood"); | |
589 | TH1F *hBKaonIDGood=new TH1F(hisname.Data(),hisname.Data(),100,0.,10.0); | |
590 | fOutputMC->Add(hBKaonIDGood); | |
591 | hisname.Form("hbKIDTot"); | |
592 | TH1F *hBKaonIDTot=new TH1F(hisname.Data(),hisname.Data(),100,0.,10.0); | |
593 | fOutputMC->Add(hBKaonIDTot); | |
60eac73d | 594 | hisname.Form("hnokIDk"); |
595 | TH1F *hnoKaonIDkTot=new TH1F(hisname.Data(),hisname.Data(),100,0.,10.0); | |
596 | fOutputMC->Add(hnoKaonIDkTot); | |
597 | hisname.Form("hbnokIDk"); | |
598 | TH1F *hBnoKaonIDkTot=new TH1F(hisname.Data(),hisname.Data(),100,0.,10.0); | |
599 | fOutputMC->Add(hBnoKaonIDkTot); | |
029ed93a | 600 | |
601 | ||
602 | hisname.Form("hKd0Prong"); | |
603 | TH1F *hKaond0Prong=new TH1F(hisname.Data(),hisname.Data(),100,-0.1,0.1); | |
604 | fOutputMC->Add(hKaond0Prong); | |
605 | hisname.Form("hbKd0Prong"); | |
606 | TH1F *hBKaond0Prong=new TH1F(hisname.Data(),hisname.Data(),100,-0.1,0.1); | |
607 | fOutputMC->Add(hBKaond0Prong); | |
608 | hisname.Form("hbKSignalVspTOF"); | |
609 | TH2F *hbKSignalVspTOF=new TH2F(hisname.Data(),hisname.Data(),100,0.,5.0,100,12000.,50000.0); | |
610 | fOutputMC->Add(hbKSignalVspTOF); | |
611 | hisname.Form("hbKSignalVspTPC"); | |
612 | TH2F *hbKSignalVspTPC=new TH2F(hisname.Data(),hisname.Data(),100,0.,5.0,150,0.,150.0); | |
613 | fOutputMC->Add(hbKSignalVspTPC); | |
614 | hisname.Form("hKSignalVspTOF"); | |
615 | TH2F *hKSignalVspTOF=new TH2F(hisname.Data(),hisname.Data(),100,0.,5.0,100,12000.,50000.0); | |
616 | fOutputMC->Add(hKSignalVspTOF); | |
617 | hisname.Form("hKSignalVspTPC"); | |
618 | TH2F *hKSignalVspTPC=new TH2F(hisname.Data(),hisname.Data(),100,0.,5.0,150,0.,150.0); | |
619 | fOutputMC->Add(hKSignalVspTPC); | |
029ed93a | 620 | hisname.Form("hKSigmaVspTOF"); |
621 | TH2F *hKSigmaVspTOF=new TH2F(hisname.Data(),hisname.Data(),100,0.,5.0,100,-10.0,10.0); | |
622 | fOutputMC->Add(hKSigmaVspTOF); | |
029ed93a | 623 | hisname.Form("hKSigmaVspTPC"); |
624 | TH2F *hKSigmaVspTPC=new TH2F(hisname.Data(),hisname.Data(),100,0.,5.0,100,-10.0,10.0); | |
625 | fOutputMC->Add(hKSigmaVspTPC); | |
029ed93a | 626 | hisname.Form("hbKSigmaVspTOF"); |
627 | TH2F *hBKSigmaVspTOF=new TH2F(hisname.Data(),hisname.Data(),100,0.,5.0,100,-10.0,10.0); | |
628 | fOutputMC->Add(hBKSigmaVspTOF); | |
629 | hisname.Form("hbKSigmaVspTPC"); | |
630 | TH2F *hBKSigmaVspTPC=new TH2F(hisname.Data(),hisname.Data(),100,0.,5.0,100,-10.0,10.0); | |
631 | fOutputMC->Add(hBKSigmaVspTPC); | |
632 | ||
60eac73d | 633 | |
029ed93a | 634 | // pion specific |
635 | hisname.Form("hpiTOFSignal"); | |
636 | TH1F *hPionTOFSignal=new TH1F(hisname.Data(),hisname.Data(),100,12000.,50000.0); | |
637 | fOutputMC->Add(hPionTOFSignal); | |
638 | hisname.Form("hbpiTOFSignal"); | |
639 | TH1F *hBPionTOFSignal=new TH1F(hisname.Data(),hisname.Data(),100,12000.,50000.0); | |
640 | fOutputMC->Add(hBPionTOFSignal); | |
029ed93a | 641 | hisname.Form("hpiTPCSignal"); |
642 | TH1F *hPionTPCSignal=new TH1F(hisname.Data(),hisname.Data(),100,30.,100.0); | |
643 | fOutputMC->Add(hPionTPCSignal); | |
644 | hisname.Form("hbpiTPCSignal"); | |
645 | TH1F *hBPionTPCSignal=new TH1F(hisname.Data(),hisname.Data(),100,30.,100.0); | |
646 | fOutputMC->Add(hBPionTPCSignal); | |
7eb0cc73 | 647 | |
029ed93a | 648 | hisname.Form("hpiptProng"); |
649 | TH1F *hPionPtProng=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.0); | |
650 | fOutputMC->Add(hPionPtProng); | |
651 | hisname.Form("hbpiptProng"); | |
652 | TH1F *hBPionPtProng=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.0); | |
653 | fOutputMC->Add(hBPionPtProng); | |
654 | ||
655 | hisname.Form("hpiRealTot"); | |
656 | TH1F *hPionRealTot=new TH1F(hisname.Data(),hisname.Data(),100,0.,10.0); | |
657 | fOutputMC->Add(hPionRealTot); | |
658 | hisname.Form("hbpiRealTot"); | |
659 | TH1F *hBPionRealTot=new TH1F(hisname.Data(),hisname.Data(),100,0.,10.0); | |
660 | fOutputMC->Add(hBPionRealTot); | |
661 | hisname.Form("hpiIDGood"); | |
662 | TH1F *hPionIDGood=new TH1F(hisname.Data(),hisname.Data(),100,0.,10.0); | |
663 | fOutputMC->Add(hPionIDGood); | |
664 | hisname.Form("hpiIDTot"); | |
665 | TH1F *hPionIDTot=new TH1F(hisname.Data(),hisname.Data(),100,0.,10.0); | |
666 | fOutputMC->Add(hPionIDTot); | |
667 | hisname.Form("hbpiIDTot"); | |
668 | TH1F *hBPionIDTot=new TH1F(hisname.Data(),hisname.Data(),100,0.,10.0); | |
669 | fOutputMC->Add(hBPionIDTot); | |
670 | hisname.Form("hbpiIDGood"); | |
671 | TH1F *hBPionIDGood=new TH1F(hisname.Data(),hisname.Data(),100,0.,10.0); | |
672 | fOutputMC->Add(hBPionIDGood); | |
60eac73d | 673 | hisname.Form("hnopiIDpi"); |
674 | TH1F *hnoPionIDpiTot=new TH1F(hisname.Data(),hisname.Data(),100,0.,10.0); | |
675 | fOutputMC->Add(hnoPionIDpiTot); | |
676 | hisname.Form("hbnopiIDpi"); | |
677 | TH1F *hBnoPionIDpiTot=new TH1F(hisname.Data(),hisname.Data(),100,0.,10.0); | |
678 | fOutputMC->Add(hBnoPionIDpiTot); | |
029ed93a | 679 | |
680 | hisname.Form("hpid0Prong"); | |
681 | TH1F *hPiond0Prong=new TH1F(hisname.Data(),hisname.Data(),100,-0.1,-0.1); | |
682 | fOutputMC->Add(hPiond0Prong); | |
683 | hisname.Form("hbpid0Prong"); | |
684 | TH1F *hBPiond0Prong=new TH1F(hisname.Data(),hisname.Data(),100,-0.1,0.1); | |
685 | fOutputMC->Add(hBPiond0Prong); | |
029ed93a | 686 | |
687 | hisname.Form("hpiSignalVspTOF"); | |
688 | TH2F *hpiSignalVspTOF=new TH2F(hisname.Data(),hisname.Data(),100,0.,5.0,100,12000.,50000.0); | |
689 | fOutputMC->Add(hpiSignalVspTOF); | |
690 | hisname.Form("hpiSignalVspTPC"); | |
691 | TH2F *hpiSignalVspTPC=new TH2F(hisname.Data(),hisname.Data(),100,0.,5.0,150,0.,150.0); | |
692 | fOutputMC->Add(hpiSignalVspTPC); | |
60eac73d | 693 | hisname.Form("hbpiSignalVspTOF"); |
694 | TH2F *hbpiSignalVspTOF=new TH2F(hisname.Data(),hisname.Data(),100,0.,5.0,100,12000.,50000.0); | |
695 | fOutputMC->Add(hbpiSignalVspTOF); | |
696 | hisname.Form("hbpiSignalVspTPC"); | |
697 | TH2F *hbpiSignalVspTPC=new TH2F(hisname.Data(),hisname.Data(),100,0.,5.0,150,0.,150.0); | |
698 | fOutputMC->Add(hbpiSignalVspTPC); | |
029ed93a | 699 | hisname.Form("hpiSigmaVspTOF"); |
700 | TH2F *hpiSigmaVspTOF=new TH2F(hisname.Data(),hisname.Data(),100,0.,5.0,100,-10.0,10.0); | |
701 | fOutputMC->Add(hpiSigmaVspTOF); | |
029ed93a | 702 | hisname.Form("hpiSigmaVspTPC"); |
703 | TH2F *hpiSigmaVspTPC=new TH2F(hisname.Data(),hisname.Data(),100,0.,5.0,100,-10.0,10.0); | |
704 | fOutputMC->Add(hpiSigmaVspTPC); | |
60eac73d | 705 | hisname.Form("hbpiSigmaVspTOF"); |
706 | TH2F *hBpiSigmaVspTOF=new TH2F(hisname.Data(),hisname.Data(),100,0.,5.0,100,-10.0,10.0); | |
707 | fOutputMC->Add(hBpiSigmaVspTOF); | |
708 | hisname.Form("hbpiSigmaVspTPC"); | |
709 | TH2F *hBpiSigmaVspTPC=new TH2F(hisname.Data(),hisname.Data(),100,0.,5.0,100,-10.0,10.0); | |
710 | fOutputMC->Add(hBpiSigmaVspTPC); | |
029ed93a | 711 | |
712 | // other generic | |
713 | hisname.Form("hLcpt"); | |
714 | TH1F *hLcPt=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.0); | |
715 | fOutputMC->Add(hLcPt); | |
716 | hisname.Form("hbLcpt"); | |
717 | TH1F *hBLcPt=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.0); | |
718 | fOutputMC->Add(hBLcPt); | |
719 | hisname.Form("hDist12toPrim"); | |
720 | TH1F *hDist12Prim=new TH1F(hisname.Data(),hisname.Data(),100,0.,1.0); | |
721 | fOutputMC->Add(hDist12Prim); | |
722 | hisname.Form("hbDist12toPrim"); | |
723 | TH1F *hBDist12Prim=new TH1F(hisname.Data(),hisname.Data(),100,0.,1.0); | |
724 | fOutputMC->Add(hBDist12Prim); | |
725 | ||
726 | hisname.Form("hSigmaVert"); | |
727 | TH1F *hSigmaVert=new TH1F(hisname.Data(),hisname.Data(),60,0.,0.06); | |
728 | fOutputMC->Add(hSigmaVert); | |
729 | hisname.Form("hbSigmaVert"); | |
730 | TH1F *hBSigmaVert=new TH1F(hisname.Data(),hisname.Data(),60,0.,0.06); | |
731 | fOutputMC->Add(hBSigmaVert); | |
732 | ||
733 | hisname.Form("hDCAs"); | |
734 | TH1F *hdcas=new TH1F(hisname.Data(),hisname.Data(),200,0.,0.1); | |
735 | fOutputMC->Add(hdcas); | |
736 | hisname.Form("hbDCAs"); | |
737 | TH1F *hBdcas=new TH1F(hisname.Data(),hisname.Data(),200,0.,0.1); | |
738 | fOutputMC->Add(hBdcas); | |
739 | ||
740 | hisname.Form("hCosPointingAngle"); | |
741 | TH1F *hCosPointingAngle=new TH1F(hisname.Data(),hisname.Data(),40,0.,1.); | |
742 | fOutputMC->Add(hCosPointingAngle); | |
743 | hisname.Form("hbCosPointingAngle"); | |
744 | TH1F *hBCosPointingAngle=new TH1F(hisname.Data(),hisname.Data(),40,0.,1.); | |
745 | fOutputMC->Add(hBCosPointingAngle); | |
746 | ||
747 | hisname.Form("hDecayLength"); | |
748 | TH1F *hDecayLength=new TH1F(hisname.Data(),hisname.Data(),100,0.,0.1); | |
749 | fOutputMC->Add(hDecayLength); | |
750 | hisname.Form("hbDecayLength"); | |
751 | TH1F *hBDecayLength=new TH1F(hisname.Data(),hisname.Data(),100,0.,0.1); | |
752 | fOutputMC->Add(hBDecayLength); | |
753 | ||
754 | hisname.Form("hSum2"); | |
755 | TH1F *hSum2=new TH1F(hisname.Data(),hisname.Data(),100,0.,0.1); | |
756 | fOutputMC->Add(hSum2); | |
757 | hisname.Form("hbSum2"); | |
758 | TH1F *hBSum2=new TH1F(hisname.Data(),hisname.Data(),100,0.,0.1); | |
759 | fOutputMC->Add(hBSum2); | |
760 | ||
761 | hisname.Form("hptmax"); | |
762 | TH1F *hPtMax=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
763 | fOutputMC->Add(hPtMax); | |
764 | hisname.Form("hbptmax"); | |
765 | TH1F *hBPtMax=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
766 | fOutputMC->Add(hBPtMax); | |
767 | ||
768 | ||
769 | ||
60eac73d | 770 | fAPriori = new TList(); // AdC |
771 | fAPriori->SetOwner(); // AdC | |
772 | fAPriori->SetName("APrioriMCHistos"); // AdC | |
773 | ||
774 | hisname.Form("hElIn3Prong"); | |
775 | TH1F *hElIn3Prong=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
776 | fAPriori->Add(hElIn3Prong); | |
777 | hisname.Form("hMuIn3Prong"); | |
778 | TH1F *hMuIn3Prong=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
779 | fAPriori->Add(hMuIn3Prong); | |
780 | hisname.Form("hPiIn3Prong"); | |
781 | TH1F *hPiIn3Prong=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
782 | fAPriori->Add(hPiIn3Prong); | |
783 | hisname.Form("hKaIn3Prong"); | |
784 | TH1F *hKaIn3Prong=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
785 | fAPriori->Add(hKaIn3Prong); | |
786 | hisname.Form("hPrIn3Prong"); | |
787 | TH1F *hPrIn3Prong=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
788 | fAPriori->Add(hPrIn3Prong); | |
789 | ||
790 | hisname.Form("hElIn3Prong1"); | |
791 | TH1F *hElIn3Prong1=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
792 | fAPriori->Add(hElIn3Prong1); | |
793 | hisname.Form("hMuIn3Prong1"); | |
794 | TH1F *hMuIn3Prong1=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
795 | fAPriori->Add(hMuIn3Prong1); | |
796 | hisname.Form("hPiIn3Prong1"); | |
797 | TH1F *hPiIn3Prong1=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
798 | fAPriori->Add(hPiIn3Prong1); | |
799 | hisname.Form("hKaIn3Prong1"); | |
800 | TH1F *hKaIn3Prong1=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
801 | fAPriori->Add(hKaIn3Prong1); | |
802 | hisname.Form("hPrIn3Prong1"); | |
803 | TH1F *hPrIn3Prong1=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
804 | fAPriori->Add(hPrIn3Prong1); | |
805 | ||
806 | hisname.Form("hElIn3Prong2"); | |
807 | TH1F *hElIn3Prong2=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
808 | fAPriori->Add(hElIn3Prong2); | |
809 | hisname.Form("hMuIn3Prong2"); | |
810 | TH1F *hMuIn3Prong2=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
811 | fAPriori->Add(hMuIn3Prong2); | |
812 | hisname.Form("hPiIn3Prong2"); | |
813 | TH1F *hPiIn3Prong2=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
814 | fAPriori->Add(hPiIn3Prong2); | |
815 | hisname.Form("hKaIn3Prong2"); | |
816 | TH1F *hKaIn3Prong2=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
817 | fAPriori->Add(hKaIn3Prong2); | |
818 | hisname.Form("hPrIn3Prong2"); | |
819 | TH1F *hPrIn3Prong2=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
820 | fAPriori->Add(hPrIn3Prong2); | |
821 | ||
822 | hisname.Form("hElIn3Prong3"); | |
823 | TH1F *hElIn3Prong3=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
824 | fAPriori->Add(hElIn3Prong3); | |
825 | hisname.Form("hMuIn3Prong3"); | |
826 | TH1F *hMuIn3Prong3=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
827 | fAPriori->Add(hMuIn3Prong3); | |
828 | hisname.Form("hPiIn3Prong3"); | |
829 | TH1F *hPiIn3Prong3=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
830 | fAPriori->Add(hPiIn3Prong3); | |
831 | hisname.Form("hKaIn3Prong3"); | |
832 | TH1F *hKaIn3Prong3=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
833 | fAPriori->Add(hKaIn3Prong3); | |
834 | hisname.Form("hPrIn3Prong3"); | |
835 | TH1F *hPrIn3Prong3=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
836 | fAPriori->Add(hPrIn3Prong3); | |
837 | ||
838 | hisname.Form("hElIn3Prong4"); | |
839 | TH1F *hElIn3Prong4=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
840 | fAPriori->Add(hElIn3Prong4); | |
841 | hisname.Form("hMuIn3Prong4"); | |
842 | TH1F *hMuIn3Prong4=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
843 | fAPriori->Add(hMuIn3Prong4); | |
844 | hisname.Form("hPiIn3Prong4"); | |
845 | TH1F *hPiIn3Prong4=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
846 | fAPriori->Add(hPiIn3Prong4); | |
847 | hisname.Form("hKaIn3Prong4"); | |
848 | TH1F *hKaIn3Prong4=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
849 | fAPriori->Add(hKaIn3Prong4); | |
850 | hisname.Form("hPrIn3Prong4"); | |
851 | TH1F *hPrIn3Prong4=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
852 | fAPriori->Add(hPrIn3Prong4); | |
853 | ||
854 | hisname.Form("hElIn3Prong5"); | |
855 | TH1F *hElIn3Prong5=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
856 | fAPriori->Add(hElIn3Prong5); | |
857 | hisname.Form("hMuIn3Prong5"); | |
858 | TH1F *hMuIn3Prong5=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
859 | fAPriori->Add(hMuIn3Prong5); | |
860 | hisname.Form("hPiIn3Prong5"); | |
861 | TH1F *hPiIn3Prong5=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
862 | fAPriori->Add(hPiIn3Prong5); | |
863 | hisname.Form("hKaIn3Prong5"); | |
864 | TH1F *hKaIn3Prong5=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
865 | fAPriori->Add(hKaIn3Prong5); | |
866 | hisname.Form("hPrIn3Prong5"); | |
867 | TH1F *hPrIn3Prong5=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
868 | fAPriori->Add(hPrIn3Prong5); | |
869 | ||
870 | hisname.Form("hElIn3Prong6"); | |
871 | TH1F *hElIn3Prong6=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
872 | fAPriori->Add(hElIn3Prong6); | |
873 | hisname.Form("hMuIn3Prong6"); | |
874 | TH1F *hMuIn3Prong6=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
875 | fAPriori->Add(hMuIn3Prong6); | |
876 | hisname.Form("hPiIn3Prong6"); | |
877 | TH1F *hPiIn3Prong6=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
878 | fAPriori->Add(hPiIn3Prong6); | |
879 | hisname.Form("hKaIn3Prong6"); | |
880 | TH1F *hKaIn3Prong6=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
881 | fAPriori->Add(hKaIn3Prong6); | |
882 | hisname.Form("hPrIn3Prong6"); | |
883 | TH1F *hPrIn3Prong6=new TH1F(hisname.Data(),hisname.Data(),100,0.,5.); | |
884 | fAPriori->Add(hPrIn3Prong6); | |
885 | ||
886 | ||
887 | fMultiplicity = new TList(); // AdC | |
888 | fMultiplicity->SetOwner(); // AdC | |
889 | fMultiplicity->SetName("MultiplicityMCHistos"); // AdC | |
890 | ||
891 | hisname.Form("hLcinEvent"); | |
892 | TH1I*hLcinEvent=new TH1I(hisname.Data(),hisname.Data(),3,-1,2); | |
893 | fMultiplicity->Add(hLcinEvent); | |
894 | ||
895 | hisname.Form("hPrimariesvsAOD"); | |
896 | TH2I *hPrimariesvsAOD=new TH2I(hisname.Data(),hisname.Data(),300,0,300,300,0,300); | |
897 | fMultiplicity->Add(hPrimariesvsAOD); | |
898 | ||
899 | hisname.Form("hMultiplicityInLcEvent"); | |
900 | TH1I *hMultiplicityInLcEvent=new TH1I(hisname.Data(),hisname.Data(),300,0,300); | |
901 | fMultiplicity->Add(hMultiplicityInLcEvent); | |
902 | hisname.Form("h2MultiplicityInLcEvent"); | |
903 | TH1I *h2MultiplicityInLcEvent=new TH1I(hisname.Data(),hisname.Data(),300,0,300); | |
904 | fMultiplicity->Add(h2MultiplicityInLcEvent); | |
905 | hisname.Form("hAll2MultiplicityInEvent"); | |
906 | TH1I *hAll2MultiplicityInEvent=new TH1I(hisname.Data(),hisname.Data(),300,0,300); | |
907 | fMultiplicity->Add(hAll2MultiplicityInEvent); | |
908 | hisname.Form("hAllMultiplicityInEvent"); | |
909 | TH1I *hAllMultiplicityInEvent=new TH1I(hisname.Data(),hisname.Data(),300,0,300); | |
910 | fMultiplicity->Add(hAllMultiplicityInEvent); | |
911 | hisname.Form("hAllMultiplicityPrimaryInEvent"); | |
912 | TH1I *hAllMultiplicityPrimaryInEvent=new TH1I(hisname.Data(),hisname.Data(),300,0,300); | |
913 | fMultiplicity->Add(hAllMultiplicityPrimaryInEvent); | |
914 | hisname.Form("hAll2MultiplicityPrimaryInEvent"); | |
915 | TH1I *hAll2MultiplicityPrimaryInEvent=new TH1I(hisname.Data(),hisname.Data(),300,0,300); | |
916 | fMultiplicity->Add(hAll2MultiplicityPrimaryInEvent); | |
917 | hisname.Form("hMultiplicityInEvent"); | |
918 | TH1I *hMultiplicityInEvent=new TH1I(hisname.Data(),hisname.Data(),300,0.,300); | |
919 | fMultiplicity->Add(hMultiplicityInEvent); | |
920 | hisname.Form("hMultiplicityIn3ProngLC"); | |
921 | TH1I *hMultiplicityIn3ProngLC=new TH1I(hisname.Data(),hisname.Data(),300,0,300); | |
922 | fMultiplicity->Add(hMultiplicityIn3ProngLC); | |
923 | hisname.Form("hMultiplicityInLCpid"); | |
924 | TH1I *hMultiplicityInLCpid=new TH1I(hisname.Data(),hisname.Data(),300,0,300); | |
925 | fMultiplicity->Add(hMultiplicityInLCpid); | |
926 | hisname.Form("hMultiplicityInLCmc"); | |
927 | TH1I *hMultiplicityInLCmc=new TH1I(hisname.Data(),hisname.Data(),300,0,300); | |
928 | fMultiplicity->Add(hMultiplicityInLCmc); | |
929 | hisname.Form("hMultiplicityInLCNomc"); | |
930 | TH1I *hMultiplicityInLCNomc=new TH1I(hisname.Data(),hisname.Data(),300,0,300); | |
931 | fMultiplicity->Add(hMultiplicityInLCNomc); | |
932 | hisname.Form("hMultiplicityYesC"); | |
933 | TH1I *hMultiplicityYesC=new TH1I(hisname.Data(),hisname.Data(),300,0,300); | |
934 | fMultiplicity->Add(hMultiplicityYesC); | |
935 | hisname.Form("hMultiplicityYesB"); | |
936 | TH1I *hMultiplicityYesB=new TH1I(hisname.Data(),hisname.Data(),300,0,300); | |
937 | fMultiplicity->Add(hMultiplicityYesB); | |
938 | hisname.Form("hMultiplicityJPsi"); | |
939 | TH1I *hMultiplicityJPsi=new TH1I(hisname.Data(),hisname.Data(),300,0,300); | |
940 | fMultiplicity->Add(hMultiplicityJPsi); | |
941 | ||
942 | ||
943 | AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager(); | |
944 | AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler()); | |
945 | fPIDResponse = inputHandler->GetPIDResponse(); | |
946 | ||
029ed93a | 947 | if(fRDCutsProduction->GetIsUsePID()){ |
60eac73d | 948 | fRDCutsProduction->GetPidHF()->SetPidResponse(fPIDResponse); |
949 | fRDCutsProduction->GetPidpion()->SetPidResponse(fPIDResponse); | |
950 | fRDCutsProduction->GetPidprot()->SetPidResponse(fPIDResponse); | |
951 | //fUtilPid=new AliAODpidUtil(fPIDResponse); | |
952 | fRDCutsProduction->GetPidHF()->SetOldPid(kFALSE); | |
953 | fRDCutsProduction->GetPidpion()->SetOldPid(kFALSE); | |
954 | fRDCutsProduction->GetPidprot()->SetOldPid(kFALSE); | |
955 | } | |
029ed93a | 956 | if(fRDCutsAnalysis->GetIsUsePID()){ |
60eac73d | 957 | fRDCutsAnalysis->GetPidHF()->SetPidResponse(fPIDResponse); |
958 | fRDCutsAnalysis->GetPidpion()->SetPidResponse(fPIDResponse); | |
959 | fRDCutsAnalysis->GetPidprot()->SetPidResponse(fPIDResponse); | |
960 | fRDCutsAnalysis->GetPidHF()->SetOldPid(kFALSE); | |
961 | fRDCutsAnalysis->GetPidpion()->SetOldPid(kFALSE); | |
962 | fRDCutsAnalysis->GetPidprot()->SetOldPid(kFALSE); | |
029ed93a | 963 | } |
964 | ||
029ed93a | 965 | PostData(1,fOutput); |
60eac73d | 966 | if (fFillVarHists) PostData(3,fOutputMC); |
029ed93a | 967 | PostData(4,fNentries); |
60eac73d | 968 | if (fPriorsHists) PostData(5,fAPriori); |
969 | if (fMultiplicityHists) PostData(6,fMultiplicity); | |
970 | if (fFillNtuple) { | |
7eb0cc73 | 971 | //OpenFile(3); // 2 is the slot number of the ntuple |
60eac73d | 972 | fNtupleLambdac = new TNtuple("fNtupleLambdac","D +", |
973 | "pdg:Px:Py:Pz:PtTrue:VxTrue:VyTrue:VzTrue:Ptpi:PtK:Ptpi2:PtRec:PointingAngle:DecLeng:VxRec:VyRec:VzRec:InvMass:sigvert:d0Pi:d0K:d0Pi2:dca:d0square"); | |
974 | PostData(7,fNtupleLambdac); | |
7eb0cc73 | 975 | } |
60eac73d | 976 | |
7eb0cc73 | 977 | return; |
978 | } | |
979 | ||
980 | //________________________________________________________________________ | |
981 | void AliAnalysisTaskSELambdac::UserExec(Option_t */*option*/) | |
982 | { | |
983 | // Execute analysis for current event: | |
984 | // heavy flavor candidates association to MC truth | |
985 | ||
60eac73d | 986 | AliAODEvent *aod = dynamic_cast<AliAODEvent*> (InputEvent()); |
987 | //tmp | |
988 | fHistNEvents->Fill(0); // count event | |
7ad4b782 | 989 | // Post the data already here |
7eb0cc73 | 990 | |
991 | TClonesArray *array3Prong = 0; | |
992 | TClonesArray *arrayLikeSign =0; | |
993 | if(!aod && AODEvent() && IsStandardAOD()) { | |
994 | // In case there is an AOD handler writing a standard AOD, use the AOD | |
995 | // event in memory rather than the input (ESD) event. | |
996 | aod = dynamic_cast<AliAODEvent*> (AODEvent()); | |
997 | // in this case the braches in the deltaAOD (AliAOD.VertexingHF.root) | |
998 | // have to taken from the AOD event hold by the AliAODExtension | |
999 | AliAODHandler* aodHandler = (AliAODHandler*) | |
1000 | ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler()); | |
1001 | if(aodHandler->GetExtensions()) { | |
1002 | AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject("AliAOD.VertexingHF.root"); | |
1003 | AliAODEvent *aodFromExt = ext->GetAOD(); | |
1004 | array3Prong=(TClonesArray*)aodFromExt->GetList()->FindObject("Charm3Prong"); | |
1005 | arrayLikeSign=(TClonesArray*)aodFromExt->GetList()->FindObject("LikeSign3Prong"); | |
1006 | } | |
dc222f77 | 1007 | } else if(aod) { |
7eb0cc73 | 1008 | array3Prong=(TClonesArray*)aod->GetList()->FindObject("Charm3Prong"); |
1009 | arrayLikeSign=(TClonesArray*)aod->GetList()->FindObject("LikeSign3Prong"); | |
1010 | } | |
1011 | ||
60eac73d | 1012 | if(!aod) return; |
7eb0cc73 | 1013 | |
7eb0cc73 | 1014 | TClonesArray *arrayMC=0; |
1015 | AliAODMCHeader *mcHeader=0; | |
1016 | ||
7eb0cc73 | 1017 | // load MC particles |
1018 | if(fReadMC){ | |
1019 | ||
1020 | arrayMC = (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName()); | |
1021 | if(!arrayMC) { | |
1022 | printf("AliAnalysisTaskSELambdac::UserExec: MC particles branch not found!\n"); | |
1023 | return; | |
1024 | } | |
60eac73d | 1025 | |
1026 | ||
1027 | // load MC header | |
7eb0cc73 | 1028 | mcHeader = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName()); |
1029 | if(!mcHeader) { | |
60eac73d | 1030 | printf("AliAnalysisTaskSELambdac::UserExec: MC header branch not found!\n"); |
1031 | return; | |
7eb0cc73 | 1032 | } |
1033 | } | |
60eac73d | 1034 | |
1035 | TString fillthis=""; | |
1036 | Int_t numberOfPrimaries= NumberPrimaries(aod); | |
1037 | ||
1038 | if (fMultiplicityHists && fReadMC) { | |
1039 | fillthis="hPrimariesvsAOD"; | |
1040 | ((TH1I*)fMultiplicity->FindObject(fillthis))->Fill(aod->GetNTracks(),numberOfPrimaries); | |
1041 | ||
1042 | fillthis="hAll2MultiplicityInEvent"; | |
1043 | ((TH1I*)fMultiplicity->FindObject(fillthis))->Fill(aod->GetNTracks()); | |
1044 | ||
1045 | fillthis="hAll2MultiplicityPrimaryInEvent"; | |
1046 | ((TH1I*)fMultiplicity->FindObject(fillthis))->Fill(numberOfPrimaries); | |
1047 | ||
1048 | if (IsThereAGeneratedLc(arrayMC)) { | |
1049 | fillthis="h2MultiplicityInLcEvent"; | |
1050 | ((TH1I*)fMultiplicity->FindObject(fillthis))->Fill(numberOfPrimaries); | |
1051 | } | |
1052 | ||
1053 | } | |
1054 | ||
1055 | if(!array3Prong || !aod) { | |
1056 | printf("AliAnalysisTaskSELambdac::UserExec: Charm3Prong branch not found!\n"); | |
1057 | return; | |
1058 | } | |
1059 | if(!arrayLikeSign) { | |
1060 | printf("AliAnalysisTaskSELambdac::UserExec: LikeSign3Prong branch not found!\n"); | |
1061 | // return; | |
1062 | } | |
1063 | ||
1064 | fNentries->Fill(0); | |
1065 | TString trigclass=aod->GetFiredTriggerClasses(); | |
1066 | if(trigclass.Contains("C0SMH-B-NOPF-ALLNOTRD") || trigclass.Contains("C0SMH-B-NOPF-ALL")) fNentries->Fill(14); | |
1067 | if(!fRDCutsProduction->IsEventSelected(aod)) { | |
1068 | if(fRDCutsProduction->GetWhyRejection()==1) // rejected for pileup | |
1069 | fNentries->Fill(13); | |
1070 | return; | |
1071 | } | |
1072 | ||
1073 | // AOD primary vertex | |
1074 | AliAODVertex *vtx1 = (AliAODVertex*)aod->GetPrimaryVertex(); | |
1075 | if(!vtx1) return; | |
1076 | ||
1077 | Bool_t isThereA3prongWithGoodTracks = kFALSE; | |
1078 | Bool_t isThereA3ProngLcKine = kFALSE; | |
1079 | Bool_t isThereA3ProngLcKineANDpid = kFALSE; | |
1080 | Bool_t isThereA3ProngLcMC = kFALSE; | |
1081 | Bool_t isThereA3ProngCyes = kFALSE; | |
1082 | Bool_t isThereA3ProngByes = kFALSE; | |
1083 | Bool_t isThereA3ProngJPsi = kFALSE; | |
1084 | ||
7eb0cc73 | 1085 | Int_t n3Prong = array3Prong->GetEntriesFast(); |
7eb0cc73 | 1086 | for (Int_t i3Prong = 0; i3Prong < n3Prong; i3Prong++) { |
1087 | AliAODRecoDecayHF3Prong *d = (AliAODRecoDecayHF3Prong*)array3Prong->UncheckedAt(i3Prong); | |
60eac73d | 1088 | |
7eb0cc73 | 1089 | Bool_t unsetvtx=kFALSE; |
1090 | if(!d->GetOwnPrimaryVtx()){ | |
1091 | d->SetOwnPrimaryVtx(vtx1); | |
1092 | unsetvtx=kTRUE; | |
1093 | } | |
1094 | ||
60eac73d | 1095 | //if(d->GetSelectionMap()) {if(!d->HasSelectionBit(AliRDHFCuts::kLcCuts)) continue;} |
1096 | //if(d->GetSelectionMap()) {if(!d->HasSelectionBit(AliRDHFCuts::kLcPID)) continue;} | |
7eb0cc73 | 1097 | |
029ed93a | 1098 | Int_t isSelectedTracks = fRDCutsProduction->IsSelected(d,AliRDHFCuts::kTracks,aod); |
1099 | if(!isSelectedTracks) continue; | |
7ad4b782 | 1100 | |
60eac73d | 1101 | isThereA3prongWithGoodTracks=kTRUE; |
1102 | ||
029ed93a | 1103 | if (fRDCutsProduction->IsInFiducialAcceptance(d->Pt(),d->Y(4122))) fNentries->Fill(6); |
7ad4b782 | 1104 | |
029ed93a | 1105 | Int_t ptbin=fRDCutsProduction->PtBin(d->Pt()); |
1106 | if(ptbin==-1) {fNentries->Fill(4); continue;} //out of bounds | |
7eb0cc73 | 1107 | |
029ed93a | 1108 | FillMassHists(aod,d,arrayMC,fRDCutsProduction); |
60eac73d | 1109 | if(fFillVarHists) FillVarHists(d,arrayMC,fRDCutsProduction,/*fOutputMC,*/aod); |
1110 | ||
1111 | if (fPriorsHists && fReadMC) | |
1112 | FillAPrioriConcentrations(d, fRDCutsProduction, aod, arrayMC); | |
1113 | if (fMultiplicityHists && fReadMC) | |
1114 | MultiplicityStudies(d, fRDCutsProduction, aod, arrayMC, | |
1115 | isThereA3ProngLcKine,isThereA3ProngLcKineANDpid,isThereA3ProngLcMC, | |
1116 | isThereA3ProngCyes,isThereA3ProngByes,isThereA3ProngJPsi); | |
1117 | ||
1118 | /* | |
1119 | //start OS analysis | |
1120 | if(labDp<0)fHistOSbkg->Fill(d->InvMassDplus()); | |
1121 | fHistOS->Fill(d->InvMassDplus()); | |
1122 | */ | |
029ed93a | 1123 | |
7eb0cc73 | 1124 | if(unsetvtx) d->UnsetOwnPrimaryVtx(); |
1125 | } | |
029ed93a | 1126 | |
60eac73d | 1127 | if (fMultiplicityHists && fReadMC) { |
1128 | fillthis="hAllMultiplicityInEvent"; | |
1129 | ((TH1I*)fMultiplicity->FindObject(fillthis))->Fill(aod->GetNTracks()); | |
1130 | ||
1131 | fillthis="hAllMultiplicityPrimaryInEvent"; | |
1132 | ((TH1I*)fMultiplicity->FindObject(fillthis))->Fill(numberOfPrimaries); | |
1133 | ||
1134 | if (IsThereAGeneratedLc(arrayMC)) { | |
1135 | fillthis="hMultiplicityInLcEvent"; | |
1136 | ((TH1I*)fMultiplicity->FindObject(fillthis))->Fill(numberOfPrimaries); | |
1137 | } | |
1138 | ||
1139 | if (isThereA3prongWithGoodTracks) { | |
1140 | fillthis="hMultiplicityInEvent"; | |
1141 | ((TH1I*)fMultiplicity->FindObject(fillthis))->Fill(numberOfPrimaries); | |
1142 | } | |
1143 | if (isThereA3ProngLcKine) { | |
1144 | fillthis="hMultiplicityIn3ProngLC"; | |
1145 | ((TH1I*)fMultiplicity->FindObject(fillthis))->Fill(numberOfPrimaries); | |
1146 | } | |
1147 | if (isThereA3ProngLcKineANDpid) { | |
1148 | fillthis="hMultiplicityInLCpid"; | |
1149 | ((TH1I*)fMultiplicity->FindObject(fillthis))->Fill(numberOfPrimaries); | |
1150 | } | |
1151 | if (isThereA3ProngLcMC) { | |
1152 | fillthis="hMultiplicityInLCmc"; | |
1153 | ((TH1I*)fMultiplicity->FindObject(fillthis))->Fill(numberOfPrimaries); | |
1154 | } | |
1155 | if (isThereA3ProngLcKine && !isThereA3ProngLcMC) { | |
1156 | fillthis="hMultiplicityInLCNomc"; | |
1157 | ((TH1I*)fMultiplicity->FindObject(fillthis))->Fill(numberOfPrimaries); | |
1158 | } | |
1159 | ||
1160 | if (isThereA3ProngCyes) { | |
1161 | fillthis="hMultiplicityYesC"; | |
1162 | ((TH1I*)fMultiplicity->FindObject(fillthis))->Fill(numberOfPrimaries); | |
1163 | } | |
1164 | if (isThereA3ProngByes) { | |
1165 | fillthis="hMultiplicityYesB"; | |
1166 | ((TH1I*)fMultiplicity->FindObject(fillthis))->Fill(numberOfPrimaries); | |
1167 | } | |
1168 | if (isThereA3ProngJPsi) { | |
1169 | fillthis="hMultiplicityJPsi"; | |
1170 | ((TH1I*)fMultiplicity->FindObject(fillthis))->Fill(numberOfPrimaries); | |
1171 | } | |
1172 | ||
1173 | } | |
1174 | ||
029ed93a | 1175 | PostData(1,fOutput); |
60eac73d | 1176 | if (fFillVarHists) PostData(3,fOutputMC); |
1177 | if (fPriorsHists) PostData(5,fAPriori); | |
1178 | if (fMultiplicityHists) PostData(6,fMultiplicity); | |
1179 | ||
029ed93a | 1180 | PostData(4,fNentries); |
1181 | ||
7eb0cc73 | 1182 | return; |
1183 | } | |
1184 | ||
1185 | ||
1186 | ||
1187 | //________________________________________________________________________ | |
1188 | void AliAnalysisTaskSELambdac::Terminate(Option_t */*option*/) | |
1189 | { | |
1190 | // Terminate analysis | |
1191 | // | |
60eac73d | 1192 | if (fDebug > 1) printf("AnalysisTaskSELambdac: Terminate() \n"); |
7eb0cc73 | 1193 | |
1194 | fOutput = dynamic_cast<TList*> (GetOutputData(1)); | |
1195 | if (!fOutput) { | |
1196 | printf("ERROR: fOutput not available\n"); | |
1197 | return; | |
1198 | } | |
60eac73d | 1199 | //fHistNEvents = dynamic_cast<TH1F*>(fOutput->FindObject("fHistNEvents")); |
7eb0cc73 | 1200 | |
7eb0cc73 | 1201 | if(fFillNtuple){ |
1202 | fNtupleLambdac = dynamic_cast<TNtuple*>(GetOutputData(3)); | |
1203 | } | |
1204 | ||
7eb0cc73 | 1205 | |
60eac73d | 1206 | return; |
7eb0cc73 | 1207 | } |
1208 | ||
1209 | //________________________________________________________________________ | |
4c7fd068 | 1210 | Int_t AliAnalysisTaskSELambdac::MatchToMCLambdac(AliAODRecoDecayHF3Prong *d,TClonesArray *arrayMC) const{ |
1211 | // check if the candidate is a Lambdac decaying in pKpi or in the resonant channels | |
7eb0cc73 | 1212 | Int_t lambdacLab[3]={0,0,0}; |
1213 | Int_t pdgs[3]={0,0,0}; | |
1214 | for(Int_t i=0;i<3;i++){ | |
60eac73d | 1215 | AliAODTrack *daugh=(AliAODTrack*)d->GetDaughter(i); |
1216 | Int_t lab=daugh->GetLabel(); | |
1217 | if(lab<0) return 0; | |
1218 | AliAODMCParticle *part= (AliAODMCParticle*)arrayMC->At(lab); | |
1219 | if(!part) continue; | |
1220 | pdgs[i]=part->GetPdgCode(); | |
1221 | Int_t partPdgcode = TMath::Abs(part->GetPdgCode()); | |
1222 | if(partPdgcode==211 || partPdgcode==321 || partPdgcode==2212){ | |
1223 | Int_t motherLabel=part->GetMother(); | |
1224 | if(motherLabel<0) return 0; | |
1225 | AliAODMCParticle *motherPart = (AliAODMCParticle*)arrayMC->At(motherLabel); | |
1226 | if(!motherPart) continue; | |
1227 | Int_t motherPdg = TMath::Abs(motherPart->GetPdgCode()); | |
1228 | if(motherPdg==4122) { | |
7eb0cc73 | 1229 | if(GetLambdacDaugh(motherPart,arrayMC)){lambdacLab[i]=motherLabel;continue;} |
60eac73d | 1230 | } |
1231 | if(motherPdg==313 || motherPdg==2224 || motherPdg==3124){ | |
1232 | Int_t GmotherLabel=motherPart->GetMother(); | |
1233 | if(GmotherLabel<0) return 0; | |
1234 | AliAODMCParticle *GmotherPart = (AliAODMCParticle*)arrayMC->At(GmotherLabel); | |
1235 | if(!GmotherPart) continue; | |
1236 | Int_t GmotherPdg = TMath::Abs(GmotherPart->GetPdgCode()); | |
1237 | if(GmotherPdg==4122) { | |
1238 | if(GetLambdacDaugh(GmotherPart,arrayMC)) {lambdacLab[i]=GmotherLabel;continue;} | |
7eb0cc73 | 1239 | } |
60eac73d | 1240 | } |
1241 | } | |
7eb0cc73 | 1242 | } |
1243 | ||
60eac73d | 1244 | if(lambdacLab[0]==lambdacLab[1] && lambdacLab[1]==lambdacLab[2]) {return lambdacLab[0];} |
1245 | return 0; | |
7eb0cc73 | 1246 | |
1247 | } | |
1248 | //------------------------ | |
4c7fd068 | 1249 | Bool_t AliAnalysisTaskSELambdac::GetLambdacDaugh(AliAODMCParticle *part,TClonesArray *arrayMC) const{ |
60eac73d | 1250 | // check if the particle is a lambdac and if its decay mode is the correct one |
1251 | Int_t numberOfLambdac=0; | |
1252 | if(TMath::Abs(part->GetPdgCode())!=4122) return kFALSE; | |
1253 | Int_t daugh_tmp[2]; | |
1254 | daugh_tmp[0]=part->GetDaughter(0); | |
1255 | daugh_tmp[1]=part->GetDaughter(1); | |
1256 | Int_t nDaugh = (Int_t)part->GetNDaughters(); | |
1257 | if(nDaugh<2) return kFALSE; | |
1258 | if(nDaugh>3) return kFALSE; | |
1259 | AliAODMCParticle* pdaugh1 = (AliAODMCParticle*)arrayMC->At(part->GetDaughter(0)); | |
1260 | if(!pdaugh1) {return kFALSE;} | |
1261 | Int_t number1 = TMath::Abs(pdaugh1->GetPdgCode()); | |
1262 | AliAODMCParticle* pdaugh2 = (AliAODMCParticle*)arrayMC->At(part->GetDaughter(1)); | |
1263 | if(!pdaugh2) {return kFALSE;} | |
7eb0cc73 | 1264 | Int_t number2 = TMath::Abs(pdaugh2->GetPdgCode()); |
1265 | ||
1266 | if(nDaugh==3){ | |
60eac73d | 1267 | Int_t thirdDaugh=part->GetDaughter(1)-1; |
1268 | AliAODMCParticle* pdaugh3 = (AliAODMCParticle*)arrayMC->At(thirdDaugh); | |
1269 | Int_t number3 = TMath::Abs(pdaugh3->GetPdgCode()); | |
1270 | if((number1==321 && number2==211 && number3==2212) || | |
1271 | (number1==211 && number2==321 && number3==2212) || | |
1272 | (number1==211 && number2==2212 && number3==321) || | |
1273 | (number1==321 && number2==2212 && number3==211) || | |
1274 | (number1==2212 && number2==321 && number3==211) || | |
1275 | (number1==2212 && number2==211 && number3==321)) { | |
1276 | numberOfLambdac++; | |
1277 | } | |
7eb0cc73 | 1278 | } |
1279 | ||
60eac73d | 1280 | if(nDaugh==2){ |
7eb0cc73 | 1281 | |
60eac73d | 1282 | //Lambda resonant |
7eb0cc73 | 1283 | |
60eac73d | 1284 | //Lambda -> p K*0 |
1285 | // | |
1286 | Int_t nfiglieK=0; | |
1287 | ||
1288 | if((number1==2212 && number2==313)){ | |
1289 | nfiglieK=pdaugh2->GetNDaughters(); | |
1290 | if(nfiglieK!=2) return kFALSE; | |
1291 | AliAODMCParticle* pdaughK1 = (AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(0)); | |
1292 | AliAODMCParticle* pdaughK2 = (AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(1)); | |
1293 | if(!pdaughK1) return kFALSE; | |
1294 | if(!pdaughK2) return kFALSE; | |
1295 | if((TMath::Abs(pdaughK1->GetPdgCode())==211 && TMath::Abs(pdaughK2->GetPdgCode())==321) || (TMath::Abs(pdaughK1->GetPdgCode())==321 && TMath::Abs(pdaughK2->GetPdgCode())==211)) numberOfLambdac++; | |
1296 | } | |
1297 | ||
1298 | if((number1==313 && number2==2212)){ | |
1299 | nfiglieK=pdaugh1->GetNDaughters(); | |
1300 | if(nfiglieK!=2) return kFALSE; | |
1301 | AliAODMCParticle* pdaughK1 = (AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(0)); | |
1302 | AliAODMCParticle* pdaughK2 = (AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(1)); | |
1303 | if(!pdaughK1) return kFALSE; | |
1304 | if(!pdaughK2) return kFALSE; | |
1305 | if((TMath::Abs(pdaughK1->GetPdgCode())==211 && TMath::Abs(pdaughK2->GetPdgCode())==321) || (TMath::Abs(pdaughK1->GetPdgCode())==321 && TMath::Abs(pdaughK2->GetPdgCode())==211)) numberOfLambdac++; | |
7eb0cc73 | 1306 | } |
1307 | ||
60eac73d | 1308 | //Lambda -> Delta++ k |
1309 | Int_t nfiglieDelta=0; | |
1310 | if(number1==321 && number2==2224){ | |
1311 | nfiglieDelta=pdaugh2->GetNDaughters(); | |
1312 | if(nfiglieDelta!=2) return kFALSE; | |
1313 | AliAODMCParticle *pdaughD1=(AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(0)); | |
1314 | AliAODMCParticle *pdaughD2=(AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(1)); | |
1315 | if(!pdaughD1) return kFALSE; | |
1316 | if(!pdaughD2) return kFALSE; | |
1317 | if((TMath::Abs(pdaughD1->GetPdgCode())==211 && TMath::Abs(pdaughD2->GetPdgCode())==2212) || (TMath::Abs(pdaughD1->GetPdgCode())==2212 && TMath::Abs(pdaughD2->GetPdgCode())==211)) numberOfLambdac++; | |
1318 | } | |
1319 | if(number1==2224 && number2==321){ | |
1320 | nfiglieDelta=pdaugh1->GetNDaughters(); | |
1321 | if(nfiglieDelta!=2) return kFALSE; | |
1322 | AliAODMCParticle* pdaughD1 = (AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(0)); | |
1323 | AliAODMCParticle* pdaughD2 = (AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(1)); | |
1324 | if(!pdaughD1) return kFALSE; | |
1325 | if(!pdaughD2) return kFALSE; | |
1326 | if((TMath::Abs(pdaughD1->GetPdgCode())==211 && TMath::Abs(pdaughD2->GetPdgCode())==2212) || (TMath::Abs(pdaughD1->GetPdgCode())==2212 && TMath::Abs(pdaughD2->GetPdgCode())==211)) numberOfLambdac++; | |
1327 | } | |
7eb0cc73 | 1328 | |
1329 | ||
60eac73d | 1330 | //Lambdac -> Lambda(1520) pi |
1331 | Int_t nfiglieLa=0; | |
1332 | if(number1==3124 && number2==211){ | |
1333 | nfiglieLa=pdaugh1->GetNDaughters(); | |
1334 | if(nfiglieLa!=2) return kFALSE; | |
1335 | AliAODMCParticle *pdaughL1=(AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(0)); | |
1336 | AliAODMCParticle *pdaughL2=(AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(1)); | |
1337 | if(!pdaughL1) return kFALSE; | |
1338 | if(!pdaughL2) return kFALSE; | |
1339 | if((TMath::Abs(pdaughL1->GetPdgCode())==321 && TMath::Abs(pdaughL2->GetPdgCode())==2212) || (TMath::Abs(pdaughL1->GetPdgCode())==2212 && TMath::Abs(pdaughL2->GetPdgCode())==321)) numberOfLambdac++; | |
1340 | } | |
1341 | if(number1==211 && number2==3124){ | |
1342 | nfiglieLa=pdaugh2->GetNDaughters(); | |
1343 | if(nfiglieLa!=2) return kFALSE; | |
1344 | AliAODMCParticle *pdaughL1=(AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(0)); | |
1345 | AliAODMCParticle *pdaughL2=(AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(1)); | |
1346 | if(!pdaughL1) return kFALSE; | |
1347 | if(!pdaughL2) return kFALSE; | |
1348 | if((TMath::Abs(pdaughL1->GetPdgCode())==321 && TMath::Abs(pdaughL2->GetPdgCode())==2212) || (TMath::Abs(pdaughL1->GetPdgCode())==2212 && TMath::Abs(pdaughL2->GetPdgCode())==321)) numberOfLambdac++; | |
7eb0cc73 | 1349 | |
60eac73d | 1350 | } |
1351 | } | |
7eb0cc73 | 1352 | |
60eac73d | 1353 | if(numberOfLambdac>0) {return kTRUE;} |
1354 | return kFALSE; | |
7eb0cc73 | 1355 | } |
1356 | //----------------------------- | |
7ad4b782 | 1357 | Bool_t AliAnalysisTaskSELambdac::IspKpiMC(AliAODRecoDecayHF3Prong *d,TClonesArray *arrayMC) const{ |
4c7fd068 | 1358 | // Apply MC PID |
60eac73d | 1359 | Int_t lab[3]={0,0,0},pdgs[3]={0,0,0}; |
1360 | for(Int_t i=0;i<3;i++){ | |
7eb0cc73 | 1361 | AliAODTrack *daugh=(AliAODTrack*)d->GetDaughter(i); |
1362 | lab[i]=daugh->GetLabel(); | |
1363 | if(lab[i]<0) return kFALSE; | |
1364 | AliAODMCParticle *part= (AliAODMCParticle*)arrayMC->At(lab[i]); | |
1365 | if(!part) return kFALSE; | |
1366 | pdgs[i]=TMath::Abs(part->GetPdgCode()); | |
60eac73d | 1367 | } |
7eb0cc73 | 1368 | |
60eac73d | 1369 | if(pdgs[0]==2212 && pdgs[1]==321 && pdgs[2]==211) return kTRUE; |
7eb0cc73 | 1370 | |
60eac73d | 1371 | return kFALSE; |
7eb0cc73 | 1372 | } |
1373 | //----------------------------- | |
4c7fd068 | 1374 | Bool_t AliAnalysisTaskSELambdac::IspiKpMC(AliAODRecoDecayHF3Prong *d,TClonesArray *arrayMC) const{ |
7eb0cc73 | 1375 | |
4c7fd068 | 1376 | // Apply MC PID |
60eac73d | 1377 | Int_t lab[3]={0,0,0},pdgs[3]={0,0,0}; |
1378 | for(Int_t i=0;i<3;i++){ | |
7eb0cc73 | 1379 | AliAODTrack *daugh=(AliAODTrack*)d->GetDaughter(i); |
1380 | lab[i]=daugh->GetLabel(); | |
1381 | if(lab[i]<0) return kFALSE; | |
1382 | AliAODMCParticle *part= (AliAODMCParticle*)arrayMC->At(lab[i]); | |
1383 | if(!part) return kFALSE; | |
1384 | pdgs[i]=TMath::Abs(part->GetPdgCode()); | |
60eac73d | 1385 | } |
7eb0cc73 | 1386 | |
60eac73d | 1387 | if(pdgs[2]==2212 && pdgs[1]==321 && pdgs[0]==211) {return kTRUE;} |
7eb0cc73 | 1388 | |
60eac73d | 1389 | return kFALSE; |
7eb0cc73 | 1390 | } |
1391 | //-------------------------------------- | |
4c7fd068 | 1392 | Bool_t AliAnalysisTaskSELambdac::VertexingKF(AliAODRecoDecayHF3Prong *d,Int_t *pdgs,Double_t field) const{ |
60eac73d | 1393 | // apply vertexing KF |
1394 | Int_t iprongs[3]={0,1,2}; | |
1395 | Double_t mass[2]={0.,0.}; | |
1396 | //topological constr | |
1397 | AliKFParticle *lambdac=d->ApplyVertexingKF(iprongs,3,pdgs,kTRUE,field,mass); | |
1398 | if(!lambdac) return kFALSE; | |
1399 | // Double_t probTot=TMath::Prob(Lambdac->GetChi2(),Lambdac->GetNDF()); | |
1400 | // if(probTot<fCutsKF[0]) return kFALSE; | |
e11ae259 | 1401 | if(lambdac->GetChi2()>fCutsKF[0]) return kFALSE; |
60eac73d | 1402 | //mass constr for K* |
1403 | Int_t ipRes[2]; | |
1404 | Int_t pdgres[2]; | |
1405 | mass[0]=0.8961;mass[1]=0.03; | |
1406 | if(TMath::Abs(pdgs[0])==211){ | |
7eb0cc73 | 1407 | ipRes[0]=0;ipRes[1]=1; |
1408 | pdgres[0]=pdgs[0];pdgres[1]=321; | |
c0d01d9d | 1409 | }else if(TMath::Abs(pdgs[2])==211){ |
7eb0cc73 | 1410 | ipRes[0]=2;ipRes[1]=1; |
1411 | pdgres[0]=pdgs[2];pdgres[1]=321; | |
c0d01d9d | 1412 | }else{ |
1413 | return kFALSE; | |
60eac73d | 1414 | } |
1415 | AliKFParticle *kappaStar=d->ApplyVertexingKF(ipRes,2,pdgres,kFALSE,field,mass); | |
7eb0cc73 | 1416 | |
e11ae259 | 1417 | Double_t probKstar=TMath::Prob(kappaStar->GetChi2(),kappaStar->GetNDF()); |
7eb0cc73 | 1418 | if(probKstar>fCutsKF[1]) { |
1419 | AliAODTrack *esdProng1=(AliAODTrack*)d->GetDaughter(ipRes[0]); | |
1420 | AliAODTrack *esdProng2=(AliAODTrack*)d->GetDaughter(ipRes[1]); | |
1421 | AliKFParticle prong1(*esdProng1,pdgres[0]); | |
1422 | AliKFParticle prong2(*esdProng2,pdgres[1]); | |
e11ae259 | 1423 | if(kappaStar->GetPt()<fCutsKF[2] && prong1.GetAngle(prong2)>fCutsKF[3]) return kFALSE; |
7eb0cc73 | 1424 | } |
60eac73d | 1425 | //mass constr for Lambda |
1426 | mass[0]=1.520;mass[1]=0.005; | |
1427 | if(TMath::Abs(pdgs[0])==2212){ | |
7eb0cc73 | 1428 | ipRes[0]=0;ipRes[1]=1; |
1429 | pdgres[0]=pdgs[0];pdgres[1]=pdgs[1]; | |
60eac73d | 1430 | } |
1431 | if(TMath::Abs(pdgs[2])==2212){ | |
7eb0cc73 | 1432 | ipRes[0]=2;ipRes[1]=1; |
1433 | pdgres[0]=pdgs[2];pdgres[1]=pdgs[1]; | |
60eac73d | 1434 | } |
1435 | AliKFParticle *lambda1520=d->ApplyVertexingKF(ipRes,2,pdgres,kFALSE,field,mass); | |
e11ae259 | 1436 | Double_t probLa=TMath::Prob(lambda1520->GetChi2(),lambda1520->GetNDF()); |
7eb0cc73 | 1437 | if(probLa>fCutsKF[4]) { |
1438 | AliAODTrack *esdProng1=(AliAODTrack*)d->GetDaughter(ipRes[0]); | |
1439 | AliAODTrack *esdProng2=(AliAODTrack*)d->GetDaughter(ipRes[1]); | |
1440 | AliKFParticle prong1(*esdProng1,pdgres[0]); | |
1441 | AliKFParticle prong2(*esdProng2,pdgres[1]); | |
e11ae259 | 1442 | if(lambda1520->GetPt()<fCutsKF[5] && prong1.GetAngle(prong2)>fCutsKF[6]) return kFALSE; |
7eb0cc73 | 1443 | } |
60eac73d | 1444 | //mass constr for Delta |
1445 | mass[0]=1.2;mass[1]=0.15; | |
1446 | ipRes[0]=0;ipRes[1]=2; | |
1447 | pdgres[0]=pdgs[0];pdgres[1]=pdgs[2]; | |
1448 | AliKFParticle *delta=d->ApplyVertexingKF(ipRes,2,pdgres,kFALSE,field,mass); | |
e11ae259 | 1449 | Double_t probDelta=TMath::Prob(delta->GetChi2(),delta->GetNDF()); |
7eb0cc73 | 1450 | if(probDelta>fCutsKF[7]) { |
1451 | AliAODTrack *esdProng1=(AliAODTrack*)d->GetDaughter(ipRes[0]); | |
1452 | AliAODTrack *esdProng2=(AliAODTrack*)d->GetDaughter(ipRes[1]); | |
1453 | AliKFParticle prong1(*esdProng1,pdgres[0]); | |
1454 | AliKFParticle prong2(*esdProng2,pdgres[1]); | |
e11ae259 | 1455 | if(delta->GetPt()<fCutsKF[8] && prong1.GetAngle(prong2)>fCutsKF[9]) return kFALSE; |
7eb0cc73 | 1456 | } |
60eac73d | 1457 | return kTRUE; |
7eb0cc73 | 1458 | } |
1459 | //------------------------------------- | |
029ed93a | 1460 | Int_t AliAnalysisTaskSELambdac::IspiKpResonant(AliAODRecoDecayHF3Prong *d,Double_t field) const{ |
7eb0cc73 | 1461 | |
60eac73d | 1462 | // apply PID using the resonant channels |
1463 | //if lambda* -> pk | |
1464 | Double_t mass[2]={1.520,0.005}; | |
1465 | Int_t ipRes[2]={1,2}; | |
1466 | Int_t pdgres[2]={321,2212}; | |
1467 | AliKFParticle *lambda1520=d->ApplyVertexingKF(ipRes,2,pdgres,kFALSE,field,mass); | |
1468 | Double_t probLa=TMath::Prob(lambda1520->GetChi2(),lambda1520->GetNDF()); | |
1469 | if(probLa>0.1) return 1; | |
1470 | //K* -> kpi | |
1471 | mass[0]=0.8961;mass[1]=0.03; | |
1472 | ipRes[0]=0;ipRes[1]=1; | |
1473 | pdgres[0]=211;pdgres[1]=321; | |
1474 | AliKFParticle *kstar=d->ApplyVertexingKF(ipRes,2,pdgres,kFALSE,field,mass); | |
1475 | Double_t probKa=TMath::Prob(kstar->GetChi2(),kstar->GetNDF()); | |
1476 | if(probKa>0.1) return 2; | |
1477 | ||
1478 | return 0; | |
7eb0cc73 | 1479 | |
1480 | } | |
1481 | //------------------------------------- | |
029ed93a | 1482 | Int_t AliAnalysisTaskSELambdac::IspKpiResonant(AliAODRecoDecayHF3Prong *d,Double_t field) const{ |
4c7fd068 | 1483 | |
60eac73d | 1484 | // apply PID using the resonant channels |
1485 | //if lambda* -> pk | |
1486 | Double_t mass[2]={1.520,0.005}; | |
1487 | Int_t ipRes[2]={0,1}; | |
1488 | Int_t pdgres[2]={2212,321}; | |
1489 | AliKFParticle *lambda1520=d->ApplyVertexingKF(ipRes,2,pdgres,kFALSE,field,mass); | |
1490 | Double_t probLa=TMath::Prob(lambda1520->GetChi2(),lambda1520->GetNDF()); | |
1491 | if(probLa>0.1) return 1; | |
1492 | //K* -> kpi | |
1493 | mass[0]=0.8961;mass[1]=0.03; | |
1494 | ipRes[0]=1;ipRes[1]=2; | |
1495 | pdgres[1]=211;pdgres[0]=321; | |
1496 | AliKFParticle *kstar=d->ApplyVertexingKF(ipRes,2,pdgres,kFALSE,field,mass); | |
1497 | Double_t probKa=TMath::Prob(kstar->GetChi2(),kstar->GetNDF()); | |
1498 | if(probKa>0.1) return 2; | |
1499 | ||
1500 | return 0; | |
029ed93a | 1501 | |
1502 | } | |
1503 | //--------------------------- | |
60eac73d | 1504 | void AliAnalysisTaskSELambdac::FillMassHists(AliAODEvent *aod,AliAODRecoDecayHF3Prong *part, |
1505 | TClonesArray *arrayMC, AliRDHFCutsLctopKpi *cuts) | |
1506 | { | |
029ed93a | 1507 | |
60eac73d | 1508 | //if MC PID or no PID, unset PID |
1509 | if(!fRealPid) cuts->SetUsePID(kFALSE); | |
1510 | Int_t selection=cuts->IsSelected(part,AliRDHFCuts::kCandidate,aod); | |
1511 | if(selection>0){ | |
1512 | Int_t iPtBin = -1; | |
1513 | Double_t ptCand = part->Pt(); | |
1514 | Int_t index=0; | |
1515 | ||
1516 | for(Int_t ibin=0;ibin<fNPtBins&&iPtBin<0&&ptCand>fArrayBinLimits[0]&&ptCand<fArrayBinLimits[fNPtBins];ibin++){ | |
1517 | if(ptCand<fArrayBinLimits[ibin+1])iPtBin=ibin; | |
029ed93a | 1518 | } |
60eac73d | 1519 | |
1520 | Float_t pdgCode=-2; | |
1521 | Float_t pdgCode1=-1; | |
1522 | Float_t pdgCode2=-1; | |
1523 | Int_t labDp=-1; | |
1524 | Float_t deltaPx=0.; | |
1525 | Float_t deltaPy=0.; | |
1526 | Float_t deltaPz=0.; | |
1527 | Float_t truePt=0.; | |
1528 | Float_t xDecay=0.; | |
1529 | Float_t yDecay=0.; | |
1530 | Float_t zDecay=0.; | |
1531 | ||
1532 | if(fReadMC){ | |
1533 | labDp = MatchToMCLambdac(part,arrayMC); | |
1534 | if(labDp>0){ | |
1535 | AliAODMCParticle *partDp = (AliAODMCParticle*)arrayMC->At(labDp); | |
1536 | AliAODMCParticle *dg0 = (AliAODMCParticle*)arrayMC->At(partDp->GetDaughter(0)); | |
1537 | AliAODMCParticle *dg1 = (AliAODMCParticle*)arrayMC->At(partDp->GetDaughter(1)); | |
1538 | deltaPx=partDp->Px()-part->Px(); | |
1539 | deltaPy=partDp->Py()-part->Py(); | |
1540 | deltaPz=partDp->Pz()-part->Pz(); | |
1541 | truePt=partDp->Pt(); | |
1542 | xDecay=dg0->Xv(); | |
1543 | yDecay=dg0->Yv(); | |
1544 | zDecay=dg0->Zv(); | |
1545 | pdgCode=TMath::Abs(partDp->GetPdgCode()); | |
1546 | pdgCode1=TMath::Abs(dg0->GetPdgCode()); | |
1547 | pdgCode2=TMath::Abs(dg1->GetPdgCode()); | |
1548 | ||
1549 | }else{ | |
1550 | pdgCode=-1; | |
1551 | } | |
029ed93a | 1552 | } |
60eac73d | 1553 | |
1554 | Double_t invMasspKpi=-1.; | |
1555 | Double_t invMasspiKp=-1.; | |
1556 | Double_t invMasspKpiLpi=-1.; | |
1557 | Double_t invMasspiKpLpi=-1.; | |
1558 | Double_t invMasspKpiKp=-1.; | |
1559 | Double_t invMasspiKpKp=-1.; | |
1560 | Int_t pdgs[3]={0,0,0}; | |
1561 | Double_t field=aod->GetMagneticField(); | |
1562 | //apply MC PID | |
1563 | if(fReadMC && fMCPid){ | |
1564 | ||
1565 | if(IspKpiMC(part,arrayMC)) { | |
1566 | invMasspKpi=part->InvMassLcpKpi(); | |
1567 | if(fUseKF){ | |
1568 | pdgs[0]=2212;pdgs[1]=321;pdgs[2]=211; | |
1569 | if(!VertexingKF(part,pdgs,field)) invMasspKpi=-1.; | |
1570 | } | |
1571 | } | |
1572 | if(IspiKpMC(part,arrayMC)) { | |
1573 | invMasspiKp=part->InvMassLcpiKp(); | |
1574 | if(fUseKF){ | |
1575 | pdgs[0]=211;pdgs[1]=321;pdgs[2]=2212; | |
1576 | if(!VertexingKF(part,pdgs,field)) invMasspiKp=-1.; | |
1577 | } | |
1578 | } | |
029ed93a | 1579 | } |
60eac73d | 1580 | |
1581 | // apply realistic PID | |
1582 | if(fRealPid){ | |
1583 | if(selection==1 || selection==3) { | |
1584 | invMasspKpi=part->InvMassLcpKpi(); | |
1585 | pdgs[0]=2212;pdgs[1]=321;pdgs[2]=211; | |
1586 | if(fUseKF){ | |
1587 | pdgs[0]=2212;pdgs[1]=321;pdgs[2]=211; | |
1588 | if(!VertexingKF(part,pdgs,field)) invMasspKpi=-1.; | |
1589 | } | |
1590 | } | |
1591 | if(selection>=2) { | |
1592 | invMasspiKp=part->InvMassLcpiKp(); | |
1593 | pdgs[0]=211;pdgs[1]=321;pdgs[2]=2212; | |
1594 | if(fUseKF){ | |
1595 | pdgs[0]=211;pdgs[1]=321;pdgs[2]=2212; | |
1596 | if(!VertexingKF(part,pdgs,field)) invMasspiKp=-1.; | |
1597 | } | |
1598 | } | |
1599 | } | |
1600 | //apply PID using resonances | |
1601 | if (fResPid && fRealPid) { | |
1602 | if (selection==3 || selection==1) { | |
1603 | if (IspKpiResonant(part,field)==1) { | |
1604 | invMasspKpiLpi=part->InvMassLcpKpi(); | |
1605 | } | |
1606 | if(IspKpiResonant(part,field)==2){ | |
1607 | invMasspKpiKp=part->InvMassLcpKpi(); | |
1608 | } | |
1609 | } | |
1610 | if(selection>=2) { | |
1611 | if(IspiKpResonant(part,field)==1){ | |
1612 | invMasspiKpLpi=part->InvMassLcpiKp(); | |
1613 | } | |
1614 | if(IspiKpResonant(part,field)==2){ | |
1615 | invMasspiKpKp=part->InvMassLcpiKp(); | |
1616 | } | |
1617 | } | |
029ed93a | 1618 | } |
029ed93a | 1619 | |
60eac73d | 1620 | // no PID |
1621 | if(!fResPid && !fRealPid && !fMCPid){ | |
1622 | if(selection==2 || selection==3) { | |
1623 | invMasspiKp=part->InvMassLcpiKp(); | |
1624 | if(fUseKF){ | |
1625 | pdgs[0]=211;pdgs[1]=321;pdgs[2]=2212; | |
1626 | if(!VertexingKF(part,pdgs,field)) invMasspiKp=-1.; | |
1627 | } | |
1628 | } | |
1629 | if(selection==1 || selection==3){ | |
1630 | invMasspKpi=part->InvMassLcpKpi(); | |
1631 | if(fUseKF){ | |
1632 | pdgs[0]=2212;pdgs[1]=321;pdgs[2]=211; | |
1633 | if(!VertexingKF(part,pdgs,field)) invMasspKpi=-1.; | |
1634 | } | |
1635 | } | |
029ed93a | 1636 | } |
029ed93a | 1637 | |
60eac73d | 1638 | if(invMasspiKp<0. && invMasspKpi<0.) return; |
029ed93a | 1639 | |
60eac73d | 1640 | Int_t passTightCuts=0; |
1641 | if(fAnalysis) passTightCuts=fRDCutsAnalysis->IsSelected(part,AliRDHFCuts::kCandidate,aod); | |
1642 | ||
1643 | Float_t tmp[24]; | |
1644 | if (fFillNtuple) { | |
1645 | tmp[0]=pdgCode; | |
1646 | tmp[1]=deltaPx; | |
1647 | tmp[2]=deltaPy; | |
1648 | tmp[3]=deltaPz; | |
1649 | tmp[4]=truePt; | |
1650 | tmp[5]=xDecay; | |
1651 | tmp[6]=yDecay; | |
1652 | tmp[7]=zDecay; | |
1653 | if(pdgCode1==2212) {tmp[8]=part->PtProng(0);}else{tmp[8]=0.;} | |
1654 | if(pdgCode1==211) {tmp[10]=part->PtProng(0);}else{tmp[10]=0.;} | |
1655 | tmp[9]=part->PtProng(1); | |
1656 | if(pdgCode2==211) {tmp[10]=part->PtProng(2);}else{tmp[10]=0.;} | |
1657 | tmp[11]=part->Pt(); | |
1658 | tmp[12]=part->CosPointingAngle(); | |
1659 | tmp[13]=part->DecayLength(); | |
1660 | tmp[14]=part->Xv(); | |
1661 | tmp[15]=part->Yv(); | |
1662 | tmp[16]=part->Zv(); | |
1663 | if(invMasspiKp>0.) tmp[17]=invMasspiKp; | |
1664 | if(invMasspKpi>0.) tmp[17]=invMasspKpi; | |
1665 | tmp[18]=part->GetSigmaVert(); | |
1666 | tmp[19]=part->Getd0Prong(0); | |
1667 | tmp[20]=part->Getd0Prong(1); | |
1668 | tmp[21]=part->Getd0Prong(2); | |
1669 | tmp[22]=part->GetDCA(); | |
1670 | tmp[23]=part->Prodd0d0(); | |
1671 | fNtupleLambdac->Fill(tmp); | |
1672 | PostData(7,fNtupleLambdac); | |
1673 | } | |
029ed93a | 1674 | |
1675 | if(part->Pt()>3.){ | |
029ed93a | 1676 | if(invMasspiKp>0. && invMasspKpi>0.){ |
60eac73d | 1677 | if(invMasspiKp>0.) fhMassPtGreater3->Fill(invMasspiKp,0.5); |
1678 | if(invMasspKpi>0.) fhMassPtGreater3->Fill(invMasspKpi,0.5); | |
1679 | }else{ | |
1680 | if(invMasspiKp>0.) fhMassPtGreater3->Fill(invMasspiKp); | |
1681 | if(invMasspKpi>0.) fhMassPtGreater3->Fill(invMasspKpi); | |
1682 | } | |
1683 | if(invMasspiKpLpi>0. && invMasspKpiLpi>0.){ | |
1684 | if(invMasspiKpLpi>0.) fhMassPtGreater3Lpi->Fill(invMasspiKpLpi,0.5); | |
1685 | if(invMasspKpiLpi>0.) fhMassPtGreater3Lpi->Fill(invMasspKpiLpi,0.5); | |
1686 | }else{ | |
1687 | if(invMasspiKpLpi>0.) fhMassPtGreater3Lpi->Fill(invMasspiKpLpi); | |
1688 | if(invMasspKpiLpi>0.) fhMassPtGreater3Lpi->Fill(invMasspKpiLpi); | |
1689 | } | |
1690 | if(invMasspiKpKp>0. && invMasspKpiKp>0.){ | |
1691 | if(invMasspiKpKp>0.) fhMassPtGreater3Kp->Fill(invMasspiKpKp,0.5); | |
1692 | if(invMasspKpiKp>0.) fhMassPtGreater3Kp->Fill(invMasspKpiKp,0.5); | |
029ed93a | 1693 | }else{ |
60eac73d | 1694 | if(invMasspiKpKp>0.) fhMassPtGreater3Kp->Fill(invMasspiKpKp); |
1695 | if(invMasspKpiKp>0.) fhMassPtGreater3Kp->Fill(invMasspKpiKp); | |
1696 | } | |
1697 | if(passTightCuts>0){ | |
1698 | if(invMasspiKp>0. && invMasspKpi>0.){ | |
1699 | if(invMasspiKp>0.) fhMassPtGreater3TC->Fill(invMasspiKp,0.5); | |
1700 | if(invMasspKpi>0.) fhMassPtGreater3TC->Fill(invMasspKpi,0.5); | |
1701 | }else{ | |
1702 | if(invMasspiKp>0.) fhMassPtGreater3TC->Fill(invMasspiKp); | |
1703 | if(invMasspKpi>0.) fhMassPtGreater3TC->Fill(invMasspKpi); | |
1704 | } | |
1705 | if(invMasspiKpLpi>0. && invMasspKpiLpi>0.){ | |
1706 | if(invMasspiKpLpi>0.) fhMassPtGreater3LpiTC->Fill(invMasspiKpLpi,0.5); | |
1707 | if(invMasspKpiLpi>0.) fhMassPtGreater3LpiTC->Fill(invMasspKpiLpi,0.5); | |
1708 | }else{ | |
1709 | if(invMasspiKpLpi>0.) fhMassPtGreater3LpiTC->Fill(invMasspiKpLpi); | |
1710 | if(invMasspKpiLpi>0.) fhMassPtGreater3LpiTC->Fill(invMasspKpiLpi); | |
1711 | } | |
1712 | if(invMasspiKpKp>0. && invMasspKpiKp>0.){ | |
1713 | if(invMasspiKpKp>0.) fhMassPtGreater3KpTC->Fill(invMasspiKpKp,0.5); | |
1714 | if(invMasspKpiKp>0.) fhMassPtGreater3KpTC->Fill(invMasspKpiKp,0.5); | |
1715 | }else{ | |
1716 | if(invMasspiKpKp>0.) fhMassPtGreater3KpTC->Fill(invMasspiKpKp); | |
1717 | if(invMasspKpiKp>0.) fhMassPtGreater3KpTC->Fill(invMasspKpiKp); | |
1718 | } | |
029ed93a | 1719 | } |
029ed93a | 1720 | } |
60eac73d | 1721 | if(part->Pt()>2.){ |
029ed93a | 1722 | if(invMasspiKp>0. && invMasspKpi>0.){ |
60eac73d | 1723 | if(invMasspiKp>0.) fhMassPtGreater2->Fill(invMasspiKp,0.5); |
1724 | if(invMasspKpi>0.) fhMassPtGreater2->Fill(invMasspKpi,0.5); | |
1725 | }else{ | |
1726 | if(invMasspiKp>0.) fhMassPtGreater2->Fill(invMasspiKp); | |
1727 | if(invMasspKpi>0.) fhMassPtGreater2->Fill(invMasspKpi); | |
1728 | } | |
1729 | if(invMasspiKpLpi>0. && invMasspKpiLpi>0.){ | |
1730 | if(invMasspiKpLpi>0.) fhMassPtGreater2Lpi->Fill(invMasspiKpLpi,0.5); | |
1731 | if(invMasspKpiLpi>0.) fhMassPtGreater2Lpi->Fill(invMasspKpiLpi,0.5); | |
1732 | }else{ | |
1733 | if(invMasspiKpLpi>0.) fhMassPtGreater2Lpi->Fill(invMasspiKpLpi); | |
1734 | if(invMasspKpiLpi>0.) fhMassPtGreater2Lpi->Fill(invMasspKpiLpi); | |
1735 | } | |
1736 | if(invMasspiKpKp>0. && invMasspKpiKp>0.){ | |
1737 | if(invMasspiKpKp>0.) fhMassPtGreater2Kp->Fill(invMasspiKpKp,0.5); | |
1738 | if(invMasspKpiKp>0.) fhMassPtGreater2Kp->Fill(invMasspKpiKp,0.5); | |
029ed93a | 1739 | }else{ |
60eac73d | 1740 | if(invMasspiKpKp>0.) fhMassPtGreater2Kp->Fill(invMasspiKpKp); |
1741 | if(invMasspKpiKp>0.) fhMassPtGreater2Kp->Fill(invMasspKpiKp); | |
1742 | } | |
1743 | if(passTightCuts>0){ | |
1744 | if(invMasspiKp>0. && invMasspKpi>0.){ | |
1745 | if(invMasspiKp>0.) fhMassPtGreater2TC->Fill(invMasspiKp,0.5); | |
1746 | if(invMasspKpi>0.) fhMassPtGreater2TC->Fill(invMasspKpi,0.5); | |
1747 | }else{ | |
1748 | if(invMasspiKp>0.) fhMassPtGreater2TC->Fill(invMasspiKp); | |
1749 | if(invMasspKpi>0.) fhMassPtGreater2TC->Fill(invMasspKpi); | |
1750 | } | |
1751 | if(invMasspiKpLpi>0. && invMasspKpiLpi>0.){ | |
1752 | if(invMasspiKpLpi>0.) fhMassPtGreater2LpiTC->Fill(invMasspiKpLpi,0.5); | |
1753 | if(invMasspKpiLpi>0.) fhMassPtGreater2LpiTC->Fill(invMasspKpiLpi,0.5); | |
1754 | }else{ | |
1755 | if(invMasspiKpLpi>0.) fhMassPtGreater2LpiTC->Fill(invMasspiKpLpi); | |
1756 | if(invMasspKpiLpi>0.) fhMassPtGreater2LpiTC->Fill(invMasspKpiLpi); | |
1757 | } | |
1758 | if(invMasspiKpKp>0. && invMasspKpiKp>0.){ | |
1759 | if(invMasspiKpKp>0.) fhMassPtGreater2KpTC->Fill(invMasspiKpKp,0.5); | |
1760 | if(invMasspKpiKp>0.) fhMassPtGreater2KpTC->Fill(invMasspKpiKp,0.5); | |
1761 | }else{ | |
1762 | if(invMasspiKpKp>0.) fhMassPtGreater2KpTC->Fill(invMasspiKpKp); | |
1763 | if(invMasspKpiKp>0.) fhMassPtGreater2KpTC->Fill(invMasspKpiKp); | |
1764 | } | |
029ed93a | 1765 | } |
029ed93a | 1766 | } |
1767 | ||
60eac73d | 1768 | if(iPtBin>=0){ |
1769 | index=GetHistoIndex(iPtBin); | |
1770 | if(invMasspiKp>0. && invMasspKpi>0.){ | |
1771 | if(invMasspiKp>0.) fMassHist[index]->Fill(invMasspiKp,0.5); | |
1772 | if(invMasspKpi>0.) fMassHist[index]->Fill(invMasspKpi,0.5); | |
029ed93a | 1773 | }else{ |
60eac73d | 1774 | if(invMasspiKp>0.) fMassHist[index]->Fill(invMasspiKp); |
1775 | if(invMasspKpi>0.) fMassHist[index]->Fill(invMasspKpi); | |
029ed93a | 1776 | } |
60eac73d | 1777 | if(invMasspiKpLpi>0. && invMasspKpiLpi>0.){ |
1778 | if(invMasspiKpLpi>0.) fMassHistLpi[index]->Fill(invMasspiKpLpi,0.5); | |
1779 | if(invMasspKpiLpi>0.) fMassHistLpi[index]->Fill(invMasspKpiLpi,0.5); | |
1780 | }else{ | |
1781 | if(invMasspiKpLpi>0.) fMassHistLpi[index]->Fill(invMasspiKpLpi); | |
1782 | if(invMasspKpiLpi>0.) fMassHistLpi[index]->Fill(invMasspKpiLpi); | |
1783 | } | |
1784 | if(invMasspiKpKp>0. && invMasspKpiKp>0.){ | |
1785 | if(invMasspiKpKp>0.) fMassHistKp[index]->Fill(invMasspiKpKp,0.5); | |
1786 | if(invMasspKpiKp>0.) fMassHistKp[index]->Fill(invMasspKpiKp,0.5); | |
1787 | }else{ | |
1788 | if(invMasspiKpKp>0.) fMassHistKp[index]->Fill(invMasspiKpKp); | |
1789 | if(invMasspKpiKp>0.) fMassHistKp[index]->Fill(invMasspKpiKp); | |
1790 | } | |
1791 | if(passTightCuts>0){ | |
1792 | if(invMasspiKp>0. && invMasspKpi>0. && passTightCuts==3){ | |
1793 | if(invMasspiKp>0.) fMassHistTC[index]->Fill(invMasspiKp,0.5); | |
1794 | if(invMasspKpi>0.) fMassHistTC[index]->Fill(invMasspKpi,0.5); | |
1795 | }else{ | |
1796 | if(invMasspiKp>0. && passTightCuts==2) fMassHistTC[index]->Fill(invMasspiKp); | |
1797 | if(invMasspKpi>0. && passTightCuts==1) fMassHistTC[index]->Fill(invMasspKpi); | |
1798 | } | |
1799 | if(invMasspiKpLpi>0. && invMasspKpiLpi>0. && passTightCuts==3){ | |
1800 | if(invMasspiKpLpi>0.) fMassHistLpiTC[index]->Fill(invMasspiKpLpi,0.5); | |
1801 | if(invMasspKpiLpi>0.) fMassHistLpiTC[index]->Fill(invMasspKpiLpi,0.5); | |
1802 | }else{ | |
1803 | if(invMasspiKpLpi>0. && passTightCuts==2) fMassHistLpiTC[index]->Fill(invMasspiKpLpi); | |
1804 | if(invMasspKpiLpi>0.&& passTightCuts==1) fMassHistLpiTC[index]->Fill(invMasspKpiLpi); | |
1805 | } | |
1806 | if(invMasspiKpKp>0. && invMasspKpiKp>0. && passTightCuts==3){ | |
1807 | if(invMasspiKpKp>0.) fMassHistKpTC[index]->Fill(invMasspiKpKp,0.5); | |
1808 | if(invMasspKpiKp>0.) fMassHistKpTC[index]->Fill(invMasspKpiKp,0.5); | |
1809 | }else{ | |
1810 | if(invMasspiKpKp>0. && passTightCuts==2) fMassHistKpTC[index]->Fill(invMasspiKpKp); | |
1811 | if(invMasspKpiKp>0.&& passTightCuts==1) fMassHistKpTC[index]->Fill(invMasspKpiKp); | |
1812 | } | |
1813 | } | |
1814 | if(fReadMC){ | |
1815 | if(labDp>0) { | |
1816 | index=GetSignalHistoIndex(iPtBin); | |
1817 | if(invMasspiKp>0. && invMasspKpi>0.){ | |
1818 | if(invMasspiKp>0.) fMassHist[index]->Fill(invMasspiKp,0.5); | |
1819 | if(invMasspKpi>0.) fMassHist[index]->Fill(invMasspKpi,0.5); | |
1820 | }else{ | |
1821 | if(invMasspiKp>0.) fMassHist[index]->Fill(invMasspiKp); | |
1822 | if(invMasspKpi>0.) fMassHist[index]->Fill(invMasspKpi); | |
1823 | } | |
1824 | if(invMasspiKpLpi>0. && invMasspKpiLpi>0.){ | |
1825 | if(invMasspiKpLpi>0.) fMassHistLpi[index]->Fill(invMasspiKpLpi,0.5); | |
1826 | if(invMasspKpiLpi>0.) fMassHistLpi[index]->Fill(invMasspKpiLpi,0.5); | |
1827 | }else{ | |
1828 | if(invMasspiKpLpi>0.) fMassHistLpi[index]->Fill(invMasspiKpLpi); | |
1829 | if(invMasspKpiLpi>0.) fMassHistLpi[index]->Fill(invMasspKpiLpi); | |
1830 | } | |
1831 | if(invMasspiKpKp>0. && invMasspKpiKp>0.){ | |
1832 | if(invMasspiKpKp>0.) fMassHistKp[index]->Fill(invMasspiKpKp,0.5); | |
1833 | if(invMasspKpiKp>0.) fMassHistKp[index]->Fill(invMasspKpiKp,0.5); | |
1834 | }else{ | |
1835 | if(invMasspiKpKp>0.) fMassHistKp[index]->Fill(invMasspiKpKp); | |
1836 | if(invMasspKpiKp>0.) fMassHistKp[index]->Fill(invMasspKpiKp); | |
1837 | } | |
1838 | if(passTightCuts>0){ | |
1839 | if(invMasspiKp>0. && invMasspKpi>0. && passTightCuts==3){ | |
1840 | if(invMasspiKp>0.) fMassHistTC[index]->Fill(invMasspiKp,0.5); | |
1841 | if(invMasspKpi>0.) fMassHistTC[index]->Fill(invMasspKpi,0.5); | |
1842 | }else{ | |
1843 | if(invMasspiKp>0. && passTightCuts==2) fMassHistTC[index]->Fill(invMasspiKp); | |
1844 | if(invMasspKpi>0.&& passTightCuts==1) fMassHistTC[index]->Fill(invMasspKpi); | |
1845 | } | |
1846 | if(invMasspiKpLpi>0. && invMasspKpiLpi>0. && passTightCuts==3){ | |
1847 | if(invMasspiKpLpi>0.) fMassHistLpiTC[index]->Fill(invMasspiKpLpi,0.5); | |
1848 | if(invMasspKpiLpi>0.) fMassHistLpiTC[index]->Fill(invMasspKpiLpi,0.5); | |
1849 | }else{ | |
1850 | if(invMasspiKpLpi>0. && passTightCuts==2) fMassHistLpiTC[index]->Fill(invMasspiKpLpi); | |
1851 | if(invMasspKpiLpi>0.&& passTightCuts==1) fMassHistLpiTC[index]->Fill(invMasspKpiLpi); | |
1852 | } | |
1853 | if(invMasspiKpKp>0. && invMasspKpiKp>0. && passTightCuts==3){ | |
1854 | if(invMasspiKpKp>0.) fMassHistKpTC[index]->Fill(invMasspiKpKp,0.5); | |
1855 | if(invMasspKpiKp>0.) fMassHistKpTC[index]->Fill(invMasspKpiKp,0.5); | |
1856 | }else{ | |
1857 | if(invMasspiKpKp>0. && passTightCuts==2) fMassHistKpTC[index]->Fill(invMasspiKpKp); | |
1858 | if(invMasspKpiKp>0.&& passTightCuts==1) fMassHistKpTC[index]->Fill(invMasspKpiKp); | |
1859 | } | |
1860 | } | |
029ed93a | 1861 | |
60eac73d | 1862 | }else{ |
1863 | index=GetBackgroundHistoIndex(iPtBin); | |
1864 | if(invMasspiKp>0. && invMasspKpi>0.){ | |
1865 | fMassHist[index]->Fill(invMasspiKp,0.5); | |
1866 | fMassHist[index]->Fill(invMasspKpi,0.5); | |
1867 | }else{ | |
1868 | if(invMasspiKp>0.) fMassHist[index]->Fill(invMasspiKp); | |
1869 | if(invMasspKpi>0.) fMassHist[index]->Fill(invMasspKpi); | |
1870 | } | |
1871 | if(invMasspiKpLpi>0. && invMasspKpiLpi>0.){ | |
1872 | if(invMasspiKpLpi>0.) fMassHistLpi[index]->Fill(invMasspiKpLpi,0.5); | |
1873 | if(invMasspKpiLpi>0.) fMassHistLpi[index]->Fill(invMasspKpiLpi,0.5); | |
1874 | }else{ | |
1875 | if(invMasspiKpLpi>0.) fMassHistLpi[index]->Fill(invMasspiKpLpi); | |
1876 | if(invMasspKpiLpi>0.) fMassHistLpi[index]->Fill(invMasspKpiLpi); | |
1877 | } | |
1878 | if(invMasspiKpKp>0. && invMasspKpiKp>0.){ | |
1879 | if(invMasspiKpKp>0.) fMassHistKp[index]->Fill(invMasspiKpKp,0.5); | |
1880 | if(invMasspKpiKp>0.) fMassHistKp[index]->Fill(invMasspKpiKp,0.5); | |
1881 | }else{ | |
1882 | if(invMasspiKpKp>0.) fMassHistKp[index]->Fill(invMasspiKpKp); | |
1883 | if(invMasspKpiKp>0.) fMassHistKp[index]->Fill(invMasspKpiKp); | |
1884 | } | |
1885 | if(invMasspiKp>0. && invMasspKpi>0. && passTightCuts==3){ | |
1886 | fMassHistTC[index]->Fill(invMasspiKp,0.5); | |
1887 | fMassHistTC[index]->Fill(invMasspKpi,0.5); | |
1888 | }else{ | |
1889 | if(invMasspiKp>0. && passTightCuts==2) fMassHistTC[index]->Fill(invMasspiKp); | |
1890 | if(invMasspKpi>0. && passTightCuts==1) fMassHistTC[index]->Fill(invMasspKpi); | |
1891 | } | |
1892 | if(invMasspiKpLpi>0. && invMasspKpiLpi>0. && passTightCuts==3){ | |
1893 | if(invMasspiKpLpi>0.) fMassHistLpiTC[index]->Fill(invMasspiKpLpi,0.5); | |
1894 | if(invMasspKpiLpi>0.) fMassHistLpiTC[index]->Fill(invMasspKpiLpi,0.5); | |
1895 | }else{ | |
1896 | if(invMasspiKpLpi>0. && passTightCuts==2) fMassHistLpiTC[index]->Fill(invMasspiKpLpi); | |
1897 | if(invMasspKpiLpi>0.&& passTightCuts==1) fMassHistLpiTC[index]->Fill(invMasspKpiLpi); | |
1898 | } | |
1899 | if(invMasspiKpKp>0. && invMasspKpiKp>0. && passTightCuts==3){ | |
1900 | if(invMasspiKpKp>0.) fMassHistKpTC[index]->Fill(invMasspiKpKp,0.5); | |
1901 | if(invMasspKpiKp>0.) fMassHistKpTC[index]->Fill(invMasspKpiKp,0.5); | |
1902 | }else{ | |
1903 | if(invMasspiKpKp>0. && passTightCuts==2) fMassHistKpTC[index]->Fill(invMasspiKpKp); | |
1904 | if(invMasspKpiKp>0.&& passTightCuts==1) fMassHistKpTC[index]->Fill(invMasspKpiKp); | |
1905 | } | |
1906 | } | |
1907 | ||
1908 | } | |
029ed93a | 1909 | } |
029ed93a | 1910 | } |
60eac73d | 1911 | return; |
029ed93a | 1912 | } |
1913 | //----------------------- | |
60eac73d | 1914 | void AliAnalysisTaskSELambdac::FillVarHists(AliAODRecoDecayHF3Prong *part, |
1915 | TClonesArray *arrMC, | |
1916 | AliRDHFCutsLctopKpi *cuts, | |
1917 | /* TList *listout,*/ | |
1918 | AliAODEvent* aod) { | |
029ed93a | 1919 | // |
1920 | // function used in UserExec to fill variable histograms analysing MC | |
1921 | // | |
1922 | ||
60eac73d | 1923 | TString fillthis=""; |
1924 | ||
1925 | Double_t mPDG=TDatabasePDG::Instance()->GetParticle(4122)->Mass(); | |
1926 | Double_t invmasscut=0.05; | |
029ed93a | 1927 | |
1928 | Int_t pdgDgLctopKpi[3]={2212,321,211}; | |
1929 | Int_t lab=-9999; | |
60eac73d | 1930 | if(fReadMC) |
1931 | lab=part->MatchToMC(4122,arrMC,3,pdgDgLctopKpi); //return MC particle label if the array corresponds to a Lc, -1 if not (cf. AliAODRecoDecay.cxx) | |
1932 | ||
1933 | Int_t isSelectedPID=cuts->IsSelectedPID(part); // 0 rejected, 1 Lc -> p K- pi+ (K at center because different sign is there), | |
1934 | // 2 Lc -> pi+ K- p (K at center because different sign is there), | |
1935 | // 3 both (it should never happen...) | |
029ed93a | 1936 | |
1937 | if (isSelectedPID==0)fNentries->Fill(7); | |
1938 | if (isSelectedPID==1)fNentries->Fill(8); | |
1939 | if (isSelectedPID==2)fNentries->Fill(9); | |
1940 | if (isSelectedPID==3)fNentries->Fill(10); | |
1941 | ||
029ed93a | 1942 | AliAODTrack *prong0=(AliAODTrack*)part->GetDaughter(0); |
1943 | AliAODTrack *prong1=(AliAODTrack*)part->GetDaughter(1); | |
1944 | AliAODTrack *prong2=(AliAODTrack*)part->GetDaughter(2); | |
1945 | if (!prong0 || !prong1 || !prong2) { | |
1946 | fNentries->Fill(5); | |
1947 | return; | |
1948 | } | |
1949 | ||
60eac73d | 1950 | Double_t minvLcpKpi = part->InvMassLcpKpi(); |
1951 | Double_t minvLcpiKp = part->InvMassLcpiKp(); | |
1952 | ||
029ed93a | 1953 | //check pdg of the prongs |
60eac73d | 1954 | Int_t labprong[3]={-1,-1,-1}; |
029ed93a | 1955 | if(fReadMC){ |
1956 | labprong[0]=prong0->GetLabel(); | |
1957 | labprong[1]=prong1->GetLabel(); | |
1958 | labprong[2]=prong2->GetLabel(); | |
1959 | } | |
029ed93a | 1960 | |
60eac73d | 1961 | AliAODMCParticle *mcprong=0; |
1962 | Int_t pdgProngMC[3]={-1,-1,-1}; | |
1963 | if(fReadMC) { | |
1964 | for (Int_t iprong=0;iprong<3;iprong++){ | |
029ed93a | 1965 | if(labprong[iprong]<0) continue; |
60eac73d | 1966 | mcprong = (AliAODMCParticle*)arrMC->At(labprong[iprong]); |
1967 | pdgProngMC[iprong]=TMath::Abs(mcprong->GetPdgCode()); | |
1968 | } | |
1969 | } | |
1970 | ||
1971 | Int_t pdgProngPID[3]={-1,-1,-1}; | |
1972 | if(isSelectedPID>0){ | |
1973 | pdgProngPID[1]=321; | |
1974 | if(isSelectedPID==1) {pdgProngPID[0]=2212;pdgProngPID[2]=211;} | |
1975 | if(isSelectedPID==2) {pdgProngPID[0]=211;pdgProngPID[2]=2212;} | |
1976 | } | |
1977 | ||
1978 | //fill hRealTot ---> PID efficiency denominators | |
1979 | cuts->SetUsePID(kFALSE); //PAOLA | |
1980 | Int_t selectionCandidate=cuts->IsSelected(part,AliRDHFCuts::kCandidate,aod);//PAOLA | |
1981 | if(fReadMC && selectionCandidate>0) { // 3prongs candidate x Lc (no PID) | |
1982 | if(lab>0){ // Signal | |
1983 | for (Int_t iprong=0; iprong<3; iprong++) { | |
1984 | switch (pdgProngMC[iprong]) { | |
1985 | case 2212: | |
1986 | fillthis="hpRealTot"; | |
1987 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); | |
1988 | break; | |
1989 | case 321: | |
1990 | fillthis="hKRealTot"; | |
1991 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); | |
1992 | break; | |
1993 | case 211: | |
1994 | fillthis="hpiRealTot"; | |
1995 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); | |
1996 | break; | |
1997 | default: | |
1998 | break; | |
1999 | } | |
2000 | } | |
2001 | } else { // bkg | |
2002 | for (Int_t iprong=0; iprong<3; iprong++) { | |
2003 | switch (pdgProngMC[iprong]) { | |
2004 | case 2212: | |
2005 | fillthis="hbpRealTot"; | |
2006 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); | |
2007 | break; | |
2008 | case 321: | |
2009 | fillthis="hbKRealTot"; | |
2010 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); | |
2011 | break; | |
2012 | case 211: | |
2013 | fillthis="hbpiRealTot"; | |
2014 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); | |
2015 | break; | |
2016 | default: | |
2017 | break; | |
2018 | } | |
029ed93a | 2019 | } |
2020 | } | |
60eac73d | 2021 | } |
029ed93a | 2022 | |
029ed93a | 2023 | |
60eac73d | 2024 | cuts->SetUsePID(kTRUE); //PAOLA |
2025 | Int_t selection=cuts->IsSelected(part,AliRDHFCuts::kCandidate,aod); | |
029ed93a | 2026 | |
60eac73d | 2027 | if ( (lab>0 && fReadMC) || // signal X MC |
2028 | (isSelectedPID>0 && !fReadMC) ) { // signal+bkg X real data | |
029ed93a | 2029 | |
60eac73d | 2030 | fillthis="hMass"; |
2031 | if ( (fReadMC && ((AliAODMCParticle*)arrMC->At(lab))->GetPdgCode() == 4122) || | |
2032 | (!fReadMC && (isSelectedPID>0 && part->Charge()>0)) ) { // Lc | |
2033 | if ( (pdgProngPID[0]==2212) && (pdgProngPID[1]==321) && (pdgProngPID[2]==211) ) | |
2034 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(minvLcpKpi); // signal+bkg X MC and real data | |
2035 | else if ( (pdgProngPID[0]==211) && (pdgProngPID[1]==321) && (pdgProngPID[2]==2212) ) | |
2036 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(minvLcpiKp); // signal+bkg X MC and real data | |
029ed93a | 2037 | } |
60eac73d | 2038 | else if ( (fReadMC && ((AliAODMCParticle*)arrMC->At(lab))->GetPdgCode() == -4122) || |
2039 | (!fReadMC && (isSelectedPID>0 && part->Charge()<0)) ) { // anti-Lc | |
2040 | if ( (pdgProngPID[0]==2212) && (pdgProngPID[1]==321) && (pdgProngPID[2]==211) ) | |
2041 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(minvLcpKpi); // signal+bkg X MC and real data | |
2042 | else if ( (pdgProngPID[0]==211) && (pdgProngPID[1]==321) && (pdgProngPID[2]==2212) ) | |
2043 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(minvLcpiKp); // signal+bkg X MC and real data | |
029ed93a | 2044 | } |
7eb0cc73 | 2045 | |
60eac73d | 2046 | if (selection>0) { // 3prongs candidate x Lc (yes PID) |
029ed93a | 2047 | |
2048 | Double_t ptmax=0.; | |
60eac73d | 2049 | |
029ed93a | 2050 | for (Int_t iprong=0; iprong<3; iprong++) { |
60eac73d | 2051 | if (part->PtProng(iprong)>ptmax) ptmax=part->PtProng(iprong); |
2052 | ||
2053 | AliAODTrack *prong = (AliAODTrack*)part->GetDaughter(iprong); | |
2054 | AliAODPid *pidObjtrk = (AliAODPid*)prong->GetDetPid(); | |
2055 | AliAODPidHF *pidObj = (AliAODPidHF*)cuts->GetPidHF(); | |
029ed93a | 2056 | Bool_t hasTOF=pidObj->CheckStatus(prong,"TOF"); |
2057 | Bool_t hasTPC=pidObj->CheckStatus(prong,"TPC"); | |
029ed93a | 2058 | Double_t tofSignal=0.; |
2059 | Double_t dedxTPC=0.; | |
2060 | Double_t momTOF=0.; | |
2061 | Double_t momTPC=0.; | |
2062 | if(hasTOF) { | |
60eac73d | 2063 | momTOF = prong->P(); |
2064 | tofSignal=pidObjtrk->GetTOFsignal(); | |
029ed93a | 2065 | } |
2066 | if(hasTPC) { | |
60eac73d | 2067 | momTPC = pidObjtrk->GetTPCmomentum(); |
2068 | dedxTPC=pidObjtrk->GetTPCsignal(); | |
029ed93a | 2069 | } |
60eac73d | 2070 | switch (pdgProngPID[iprong]) { |
029ed93a | 2071 | case 2212: |
60eac73d | 2072 | fillthis="hpTOFSignal"; |
2073 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(tofSignal); | |
2074 | fillthis="hpTPCSignal"; | |
2075 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(dedxTPC); | |
2076 | fillthis="hpptProng"; | |
2077 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); | |
2078 | fillthis="hpd0Prong"; | |
2079 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Getd0Prong(iprong)); | |
2080 | fillthis="hpSignalVspTPC"; | |
2081 | ((TH2F*)fOutputMC->FindObject(fillthis))->Fill(momTPC,dedxTPC); | |
2082 | fillthis="hpSignalVspTOF"; | |
2083 | ((TH2F*)fOutputMC->FindObject(fillthis))->Fill(momTOF,tofSignal); | |
2084 | AliPID::EParticleType typep; | |
2085 | typep=AliPID::EParticleType(4); | |
2086 | if(hasTPC) { | |
2087 | //Double_t nsigmap = fUtilPid->NumberOfSigmasTPC(prong,typep); | |
2088 | Double_t nsigmap = fPIDResponse->NumberOfSigmasTPC(prong,typep); | |
2089 | fillthis="hpSigmaVspTPC"; | |
2090 | ((TH2F*)fOutputMC->FindObject(fillthis))->Fill(momTPC,nsigmap); | |
2091 | } | |
2092 | if(hasTOF){ | |
2093 | //Double_t nsigma=fUtilPid->NumberOfSigmasTOF(prong,typep); | |
2094 | Double_t nsigma=fPIDResponse->NumberOfSigmasTOF(prong,typep); | |
2095 | fillthis="hpSigmaVspTOF"; | |
2096 | ((TH2F*)fOutputMC->FindObject(fillthis))->Fill(momTOF,nsigma); | |
2097 | } | |
2098 | ||
2099 | if (fReadMC) { // fill hpIDTot ---> PID contamination denominator | |
2100 | // hIDGood, hnoID ---> PID numerators | |
2101 | fillthis="hpIDTot"; | |
2102 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); | |
2103 | if(pdgProngMC[iprong]==2212) { // id protons | |
2104 | fillthis="hpIDGood"; | |
2105 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); | |
029ed93a | 2106 | } |
60eac73d | 2107 | else { // misidentified electrons, muons, pions and kaons |
2108 | fillthis="hnopIDp"; | |
2109 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); | |
029ed93a | 2110 | } |
60eac73d | 2111 | } |
2112 | break; | |
029ed93a | 2113 | |
029ed93a | 2114 | case 321: |
60eac73d | 2115 | fillthis="hKTOFSignal"; |
2116 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(tofSignal); | |
2117 | fillthis="hKTPCSignal"; | |
2118 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(dedxTPC); | |
2119 | fillthis="hKptProng"; | |
2120 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); | |
2121 | fillthis="hKd0Prong"; | |
2122 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Getd0Prong(iprong)); | |
2123 | fillthis="hKSignalVspTPC"; | |
2124 | ((TH2F*)fOutputMC->FindObject(fillthis))->Fill(momTPC,dedxTPC); | |
2125 | fillthis="hKSignalVspTOF"; | |
2126 | ((TH2F*)fOutputMC->FindObject(fillthis))->Fill(momTOF,tofSignal); | |
2127 | AliPID::EParticleType typek; | |
2128 | typek=AliPID::EParticleType(3); | |
2129 | if(hasTPC) { | |
2130 | //Double_t nsigmap = fUtilPid->NumberOfSigmasTPC(prong,typek); | |
2131 | Double_t nsigmap = fPIDResponse->NumberOfSigmasTPC(prong,typek); | |
2132 | fillthis="hKSigmaVspTPC"; | |
2133 | ((TH2F*)fOutputMC->FindObject(fillthis))->Fill(momTPC,nsigmap); | |
2134 | } | |
2135 | if(hasTOF){ | |
2136 | //Double_t nsigma = fUtilPid->NumberOfSigmasTOF(prong,typek); | |
2137 | Double_t nsigma=fPIDResponse->NumberOfSigmasTOF(prong,typek); // protection against 'old' AODs... | |
2138 | fillthis="hKSigmaVspTOF"; | |
2139 | ((TH2F*)fOutputMC->FindObject(fillthis))->Fill(momTOF,nsigma); | |
2140 | } | |
2141 | ||
2142 | if (fReadMC) { // fill hKIDTot ---> PID contamination denominator | |
2143 | // hIDGood, hnoID ---> PID numerators | |
2144 | fillthis="hKIDTot"; | |
2145 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); | |
2146 | if(pdgProngMC[iprong]==321) { // id kaons | |
2147 | fillthis="hKIDGood"; | |
2148 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); | |
029ed93a | 2149 | } |
60eac73d | 2150 | else { // misidentified electrons, muons, pions and protons |
2151 | fillthis="hnokIDk"; | |
2152 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); | |
029ed93a | 2153 | } |
60eac73d | 2154 | } |
2155 | break; | |
029ed93a | 2156 | |
029ed93a | 2157 | case 211: |
60eac73d | 2158 | fillthis="hpiTOFSignal"; |
2159 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(tofSignal); | |
2160 | fillthis="hpiTPCSignal"; | |
2161 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(dedxTPC); | |
2162 | fillthis="hpiptProng"; | |
2163 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); | |
2164 | fillthis="hpid0Prong"; | |
2165 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Getd0Prong(iprong)); | |
2166 | fillthis="hpiSignalVspTPC"; | |
2167 | ((TH2F*)fOutputMC->FindObject(fillthis))->Fill(momTPC,dedxTPC); | |
2168 | fillthis="hpiSignalVspTOF"; | |
2169 | ((TH2F*)fOutputMC->FindObject(fillthis))->Fill(momTOF,tofSignal); | |
2170 | AliPID::EParticleType typepi; | |
2171 | typepi=AliPID::EParticleType(2); | |
2172 | if(hasTPC) { | |
2173 | //Double_t nsigmap = fUtilPid->NumberOfSigmasTPC(prong,typepi); | |
2174 | Double_t nsigmap = fPIDResponse->NumberOfSigmasTPC(prong,typepi); | |
029ed93a | 2175 | fillthis="hpiSigmaVspTPC"; |
60eac73d | 2176 | ((TH2F*)fOutputMC->FindObject(fillthis))->Fill(momTPC,nsigmap); |
2177 | } | |
2178 | if(hasTOF){ | |
2179 | //Double_t nsigma = fUtilPid->NumberOfSigmasTOF(prong,typepi); | |
2180 | Double_t nsigma=fPIDResponse->NumberOfSigmasTOF(prong,typepi); // protection against 'old' AODs... | |
2181 | fillthis="hpiSigmaVspTOF"; | |
2182 | ((TH2F*)fOutputMC->FindObject(fillthis))->Fill(momTOF,nsigma); | |
2183 | } | |
2184 | ||
2185 | if (fReadMC) { // fill hpiIDTot ---> PID contamination denominator | |
2186 | // hIDGood, hnoID ---> PID numerators | |
2187 | fillthis="hpiIDTot"; | |
2188 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); | |
2189 | if(pdgProngMC[iprong]==211) { // id pions | |
2190 | fillthis="hpiIDGood"; | |
2191 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); | |
029ed93a | 2192 | } |
60eac73d | 2193 | else { // misidentified electrons, muons, kaons and protons |
2194 | fillthis="hnopiIDpi"; | |
2195 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); | |
029ed93a | 2196 | } |
60eac73d | 2197 | } |
2198 | break; | |
029ed93a | 2199 | |
2200 | default: | |
2201 | break; | |
2202 | } | |
029ed93a | 2203 | |
2204 | } //end loop on prongs | |
60eac73d | 2205 | |
2206 | //now histograms where we don't need to check identity | |
029ed93a | 2207 | fillthis = "hDist12toPrim"; |
60eac73d | 2208 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->GetDist12toPrim()); |
2209 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->GetDist23toPrim()); | |
029ed93a | 2210 | fillthis = "hSigmaVert"; |
60eac73d | 2211 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->GetSigmaVert()); |
029ed93a | 2212 | fillthis = "hDCAs"; |
2213 | Double_t dcas[3]; | |
2214 | part->GetDCAs(dcas); | |
60eac73d | 2215 | for (Int_t idca=0;idca<3;idca++) ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(dcas[idca]); |
029ed93a | 2216 | fillthis = "hCosPointingAngle"; |
60eac73d | 2217 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->CosPointingAngle()); |
029ed93a | 2218 | fillthis = "hDecayLength"; |
60eac73d | 2219 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->DecayLength()); |
2220 | Double_t sum2=part->Getd0Prong(0)*part->Getd0Prong(0)+ | |
2221 | part->Getd0Prong(1)*part->Getd0Prong(1)+ | |
2222 | part->Getd0Prong(2)*part->Getd0Prong(2); | |
029ed93a | 2223 | fillthis = "hSum2"; |
60eac73d | 2224 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(sum2); |
029ed93a | 2225 | fillthis = "hptmax"; |
60eac73d | 2226 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(ptmax); |
029ed93a | 2227 | fillthis="hLcpt"; |
60eac73d | 2228 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt()); |
029ed93a | 2229 | |
60eac73d | 2230 | } // end if (selection) |
029ed93a | 2231 | |
60eac73d | 2232 | } else if( lab<=0 && fReadMC) { // bkg x MC |
029ed93a | 2233 | |
2234 | fillthis="hbMass"; | |
2235 | ||
60eac73d | 2236 | if (part->Charge()>0) { //Lc background |
2237 | if ( (pdgProngPID[0]==2212) && (pdgProngPID[1]==321) && (pdgProngPID[2]==211) ) | |
2238 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(minvLcpKpi); // bkg X MC | |
2239 | else if ( (pdgProngPID[0]==211) && (pdgProngPID[1]==321) && (pdgProngPID[2]==2212) ) | |
2240 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(minvLcpiKp); // bkg X MC | |
2241 | } | |
2242 | else if (part->Charge()<0){ //anti-Lc background | |
2243 | if ( (pdgProngPID[0]==2212) && (pdgProngPID[1]==321) && (pdgProngPID[2]==211) ) | |
2244 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(minvLcpKpi); // bkg X MC | |
2245 | else if ( (pdgProngPID[0]==211) && (pdgProngPID[1]==321) && (pdgProngPID[2]==2212) ) | |
2246 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(minvLcpiKp); // bkg X MC | |
029ed93a | 2247 | } |
2248 | ||
2249 | ||
2250 | //apply cut on invariant mass on the pair | |
60eac73d | 2251 | if (TMath::Abs(minvLcpKpi-mPDG)<invmasscut || TMath::Abs(minvLcpiKp-mPDG)<invmasscut) { |
2252 | ||
2253 | if (selection>0) { // 3prongs candidate x Lc (yes PID) | |
2254 | ||
2255 | Double_t ptmax=0.; | |
2256 | for (Int_t iprong=0; iprong<3; iprong++) { | |
2257 | if(part->PtProng(iprong)>ptmax)ptmax=part->PtProng(iprong); | |
2258 | ||
2259 | AliAODTrack *prong = (AliAODTrack*)part->GetDaughter(iprong); | |
2260 | AliAODPid *pidObjtrk = (AliAODPid*)prong->GetDetPid(); | |
2261 | AliAODPidHF *pidObj = (AliAODPidHF*)cuts->GetPidHF(); | |
2262 | Bool_t hasTOF=pidObj->CheckStatus(prong,"TOF"); | |
2263 | Bool_t hasTPC=pidObj->CheckStatus(prong,"TPC"); | |
2264 | Double_t tofSignal=0.; | |
2265 | Double_t dedxTPC=0.; | |
2266 | Double_t momTOF=0.; | |
2267 | Double_t momTPC=0.; | |
2268 | if(hasTOF) { | |
2269 | momTOF = prong->P(); | |
2270 | tofSignal=pidObjtrk->GetTOFsignal(); | |
2271 | } | |
2272 | if(hasTPC) { | |
2273 | momTPC = pidObjtrk->GetTPCmomentum(); | |
2274 | dedxTPC=pidObjtrk->GetTPCsignal(); | |
2275 | } | |
2276 | ||
2277 | switch (pdgProngPID[iprong]) { | |
2278 | case 2212: | |
029ed93a | 2279 | fillthis="hbpTOFSignal"; |
60eac73d | 2280 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(tofSignal); |
029ed93a | 2281 | fillthis="hbpTPCSignal"; |
60eac73d | 2282 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(dedxTPC); |
029ed93a | 2283 | fillthis="hbpptProng"; |
60eac73d | 2284 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); |
029ed93a | 2285 | fillthis="hbpd0Prong"; |
60eac73d | 2286 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Getd0Prong(iprong)); |
029ed93a | 2287 | fillthis="hbpSignalVspTPC"; |
60eac73d | 2288 | ((TH2F*)fOutputMC->FindObject(fillthis))->Fill(momTPC,dedxTPC); |
029ed93a | 2289 | fillthis="hbpSignalVspTOF"; |
60eac73d | 2290 | ((TH2F*)fOutputMC->FindObject(fillthis))->Fill(momTOF,tofSignal); |
029ed93a | 2291 | AliPID::EParticleType typep; |
2292 | typep=AliPID::EParticleType(4); | |
2293 | if(hasTPC) { | |
60eac73d | 2294 | //Double_t nsigmap = fUtilPid->NumberOfSigmasTPC(prong,typep); |
2295 | Double_t nsigmap = fPIDResponse->NumberOfSigmasTPC(prong,typep); | |
2296 | fillthis="hbpSigmaVspTPC"; | |
2297 | ((TH2F*)fOutputMC->FindObject(fillthis))->Fill(momTPC,nsigmap); | |
029ed93a | 2298 | } |
2299 | if(hasTOF){ | |
60eac73d | 2300 | //Double_t nsigma = fUtilPid->NumberOfSigmasTOF(prong,typep); |
2301 | Double_t nsigma=fPIDResponse->NumberOfSigmasTOF(prong,typep); // protection against 'old' AODs... | |
2302 | fillthis="hbpSigmaVspTOF"; | |
2303 | ((TH2F*)fOutputMC->FindObject(fillthis))->Fill(momTOF,nsigma); | |
029ed93a | 2304 | } |
60eac73d | 2305 | if(fReadMC){ // fill hbpIDTot ---> PID contamination denominator |
2306 | // hbIDGood, hbnoID ---> PID numerators | |
2307 | fillthis="hbpIDTot"; | |
2308 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); | |
2309 | if(pdgProngMC[iprong]==2212) { // id protons | |
2310 | fillthis="hbpIDGood"; | |
2311 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); | |
029ed93a | 2312 | } |
60eac73d | 2313 | else { // misidentified electrons, muons, pions and kaons |
2314 | fillthis="hbnopIDp"; | |
2315 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); | |
029ed93a | 2316 | } |
2317 | } | |
2318 | break; | |
60eac73d | 2319 | |
2320 | case 321: | |
029ed93a | 2321 | fillthis="hbKTOFSignal"; |
60eac73d | 2322 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(tofSignal); |
029ed93a | 2323 | fillthis="hbKTPCSignal"; |
60eac73d | 2324 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(dedxTPC); |
029ed93a | 2325 | fillthis="hbKptProng"; |
60eac73d | 2326 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); |
029ed93a | 2327 | fillthis="hbKd0Prong"; |
60eac73d | 2328 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Getd0Prong(iprong)); |
029ed93a | 2329 | fillthis="hbKSignalVspTPC"; |
60eac73d | 2330 | ((TH2F*)fOutputMC->FindObject(fillthis))->Fill(momTPC,dedxTPC); |
029ed93a | 2331 | fillthis="hbKSignalVspTOF"; |
60eac73d | 2332 | ((TH2F*)fOutputMC->FindObject(fillthis))->Fill(momTOF,tofSignal); |
029ed93a | 2333 | AliPID::EParticleType typek; |
2334 | typek=AliPID::EParticleType(3); | |
2335 | if(hasTPC) { | |
60eac73d | 2336 | //Double_t nsigmap = fUtilPid->NumberOfSigmasTPC(prong,typek); |
2337 | Double_t nsigmap = fPIDResponse->NumberOfSigmasTPC(prong,typek); | |
2338 | fillthis="hbKSigmaVspTPC"; | |
2339 | ((TH2F*)fOutputMC->FindObject(fillthis))->Fill(momTPC,nsigmap); | |
029ed93a | 2340 | } |
2341 | if(hasTOF){ | |
60eac73d | 2342 | //Double_t nsigma = fUtilPid->NumberOfSigmasTOF(prong,typek); |
2343 | Double_t nsigma=fPIDResponse->NumberOfSigmasTOF(prong,typek); // protection against 'old' AODs... | |
2344 | fillthis="hbKSigmaVspTOF"; | |
2345 | ((TH2F*)fOutputMC->FindObject(fillthis))->Fill(momTOF,nsigma); | |
029ed93a | 2346 | } |
60eac73d | 2347 | if (fReadMC) { // fill hbKIDTot ---> PID contamination denominator |
2348 | // hIDGood, hnoID ---> PID numerators | |
2349 | fillthis="hbKIDTot"; | |
2350 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); | |
2351 | if(pdgProngMC[iprong]==321) { // id kaons | |
2352 | fillthis="hbKIDGood"; | |
2353 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); | |
029ed93a | 2354 | } |
60eac73d | 2355 | else { // misidentified electrons, muons, pions and protons |
2356 | fillthis="hbnokIDk"; | |
2357 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); | |
029ed93a | 2358 | } |
2359 | } | |
2360 | break; | |
60eac73d | 2361 | |
2362 | case 211: | |
029ed93a | 2363 | fillthis="hbpiTOFSignal"; |
60eac73d | 2364 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(tofSignal); |
029ed93a | 2365 | fillthis="hbpiTPCSignal"; |
60eac73d | 2366 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(dedxTPC); |
029ed93a | 2367 | fillthis="hbpiptProng"; |
60eac73d | 2368 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); |
029ed93a | 2369 | fillthis="hbpid0Prong"; |
60eac73d | 2370 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Getd0Prong(iprong)); |
029ed93a | 2371 | fillthis="hbpiSignalVspTPC"; |
60eac73d | 2372 | ((TH2F*)fOutputMC->FindObject(fillthis))->Fill(momTPC,dedxTPC); |
029ed93a | 2373 | fillthis="hbpiSignalVspTOF"; |
60eac73d | 2374 | ((TH2F*)fOutputMC->FindObject(fillthis))->Fill(momTOF,tofSignal); |
029ed93a | 2375 | AliPID::EParticleType typepi; |
2376 | typepi=AliPID::EParticleType(2); | |
2377 | if(hasTPC) { | |
60eac73d | 2378 | //Double_t nsigmap = fUtilPid->NumberOfSigmasTPC(prong,typepi); |
2379 | Double_t nsigmap = fPIDResponse->NumberOfSigmasTPC(prong,typepi); | |
2380 | fillthis="hbpiSigmaVspTPC"; | |
2381 | ((TH2F*)fOutputMC->FindObject(fillthis))->Fill(momTPC,nsigmap); | |
029ed93a | 2382 | } |
2383 | if(hasTOF){ | |
60eac73d | 2384 | //Double_t nsigma = fUtilPid->NumberOfSigmasTOF(prong,typepi); |
2385 | Double_t nsigma=fPIDResponse->NumberOfSigmasTOF(prong,typepi); // protection against 'old' AODs... | |
2386 | fillthis="hbpiSigmaVspTOF"; | |
2387 | ((TH2F*)fOutputMC->FindObject(fillthis))->Fill(momTOF,nsigma); | |
029ed93a | 2388 | } |
60eac73d | 2389 | if (fReadMC) { // fill hbpiIDTot ---> PID contamination denominator |
2390 | // hIDGood, hnonIDTot ---> PID numerators | |
2391 | fillthis="hbpiIDTot"; | |
2392 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); | |
2393 | if(pdgProngMC[iprong]==211) { // id pions | |
2394 | fillthis="hbpiIDGood"; | |
2395 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); | |
029ed93a | 2396 | } |
60eac73d | 2397 | else { // misidentified electrons, muons, kaons and protons |
2398 | fillthis="hbnopiIDpi"; | |
2399 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->PtProng(iprong)); | |
029ed93a | 2400 | } |
2401 | } | |
2402 | break; | |
029ed93a | 2403 | |
60eac73d | 2404 | default: |
2405 | break; | |
2406 | } | |
2407 | ||
2408 | } //end loop on prongs | |
2409 | ||
029ed93a | 2410 | //now histograms where we don't need to check identity |
2411 | fillthis="hbLcpt"; | |
60eac73d | 2412 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->Pt()); |
2413 | ||
029ed93a | 2414 | fillthis = "hbDist12toPrim"; |
60eac73d | 2415 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->GetDist12toPrim()); |
2416 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->GetDist23toPrim()); | |
029ed93a | 2417 | fillthis = "hbSigmaVert"; |
60eac73d | 2418 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->GetSigmaVert()); |
029ed93a | 2419 | fillthis = "hbDCAs"; |
2420 | Double_t dcas[3]; | |
2421 | part->GetDCAs(dcas); | |
60eac73d | 2422 | for (Int_t idca=0;idca<3;idca++) |
2423 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(dcas[idca]); | |
029ed93a | 2424 | fillthis = "hbCosPointingAngle"; |
60eac73d | 2425 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->CosPointingAngle()); |
029ed93a | 2426 | fillthis = "hbDecayLength"; |
60eac73d | 2427 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(part->DecayLength()); |
2428 | Double_t sum2=part->Getd0Prong(0)*part->Getd0Prong(0)+ | |
2429 | part->Getd0Prong(1)*part->Getd0Prong(1)+ | |
2430 | part->Getd0Prong(2)*part->Getd0Prong(2); | |
2431 | fillthis = "hbSum2"; | |
2432 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(sum2); | |
2433 | fillthis = "hbptmax"; | |
2434 | ((TH1F*)fOutputMC->FindObject(fillthis))->Fill(ptmax); | |
029ed93a | 2435 | |
60eac73d | 2436 | } // end if (selection) |
029ed93a | 2437 | |
60eac73d | 2438 | } // end mass cut |
029ed93a | 2439 | |
2440 | } // end background case | |
60eac73d | 2441 | |
029ed93a | 2442 | return; |
60eac73d | 2443 | |
2444 | } | |
2445 | ||
2446 | //------------------------- | |
2447 | void AliAnalysisTaskSELambdac::FillAPrioriConcentrations(AliAODRecoDecayHF3Prong *part, | |
2448 | AliRDHFCutsLctopKpi *cuts, | |
2449 | AliAODEvent* aod, | |
2450 | TClonesArray *arrMC) | |
2451 | { | |
2452 | ||
2453 | cuts->SetUsePID(kFALSE); //Annalisa | |
2454 | Int_t isSelected3ProngByLc=cuts->IsSelected(part,AliRDHFCuts::kCandidate,aod); | |
2455 | ||
2456 | TString fillthis=""; | |
2457 | ||
2458 | if(isSelected3ProngByLc>0 && fReadMC) { | |
2459 | ||
2460 | for (Int_t ii=0; ii<3; ii++) { | |
2461 | AliAODTrack *prongTest=(AliAODTrack*)part->GetDaughter(ii); | |
2462 | if (!prongTest) continue; | |
2463 | Int_t labprongTest = prongTest->GetLabel(); | |
2464 | if(labprongTest<0) continue; | |
2465 | AliAODMCParticle *mcprongTest = (AliAODMCParticle*)arrMC->At(labprongTest); | |
2466 | ||
2467 | switch (TMath::Abs(mcprongTest->GetPdgCode())) { | |
2468 | case 11: | |
2469 | fillthis="hElIn3Prong"; | |
2470 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2471 | break; | |
2472 | case 13: | |
2473 | fillthis="hMuIn3Prong"; | |
2474 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2475 | break; | |
2476 | case 211: | |
2477 | fillthis="hPiIn3Prong"; | |
2478 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2479 | break; | |
2480 | case 321: | |
2481 | fillthis="hKaIn3Prong"; | |
2482 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2483 | break; | |
2484 | case 2212: | |
2485 | fillthis="hPrIn3Prong"; | |
2486 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2487 | break; | |
2488 | default: | |
2489 | break; | |
2490 | } | |
2491 | } | |
2492 | } | |
2493 | ||
2494 | cuts->SetUsePID(kTRUE); //Annalisa | |
2495 | ||
2496 | } | |
2497 | ||
2498 | //----------------------- | |
2499 | Bool_t AliAnalysisTaskSELambdac::Is3ProngFromPDG(AliAODRecoDecayHF3Prong *d, | |
2500 | TClonesArray *arrayMC, | |
2501 | Int_t pdgToBeCompared) | |
2502 | { | |
2503 | // | |
2504 | // Returs kTRUE if at least one of tracks in the current 3prong | |
2505 | // cames from particle with pdgCode=pdgToBeCompared | |
2506 | // | |
2507 | ||
2508 | Bool_t localFlag = kFALSE; | |
2509 | ||
2510 | for (Int_t ii=0;ii<3;ii++) { | |
2511 | AliAODTrack *daugh = (AliAODTrack*)d->GetDaughter(ii); | |
2512 | ||
2513 | Int_t lab = daugh->GetLabel(); | |
2514 | if(lab<0) continue; | |
2515 | AliAODMCParticle *part= (AliAODMCParticle*)arrayMC->At(lab); | |
2516 | //Int_t partPdg = part->GetPdgCode(); | |
2517 | //printf(" -------------------------------------- partLab=%d partPdg=%d ---\n", lab, partPdg); | |
2518 | ||
2519 | Int_t motherLabel = part->GetMother(); | |
2520 | if(motherLabel<0) continue; | |
2521 | ||
2522 | AliAODMCParticle *motherPart = 0; | |
2523 | Int_t motherPdg = 0; | |
2524 | while (!localFlag && motherLabel>=0) { | |
2525 | motherPart = (AliAODMCParticle*)arrayMC->At(motherLabel); | |
2526 | motherPdg = motherPart->GetPdgCode(); | |
2527 | //printf(" ------------- motherLab=%d motherPdg=%d ---\n", motherLabel, motherPdg); | |
2528 | if (TMath::Abs(motherPdg)==pdgToBeCompared) { | |
2529 | //printf("-------------------------- trovato quark c/cbar\n"); | |
2530 | localFlag = kTRUE; | |
2531 | } | |
2532 | else { | |
2533 | motherLabel = motherPart->GetMother(); | |
2534 | } | |
2535 | } | |
2536 | ||
2537 | } | |
2538 | ||
2539 | return localFlag; | |
2540 | ||
2541 | } | |
2542 | ||
2543 | //----------------------- | |
2544 | Bool_t AliAnalysisTaskSELambdac::IsTrackFromPDG(AliAODTrack *daugh, | |
2545 | TClonesArray *arrayMC, | |
2546 | Int_t pdgToBeCompared) | |
2547 | { | |
2548 | // | |
2549 | // Returs kTRUE if at the tracks comes | |
2550 | // from particle with pdgCode=pdgToBeCompared | |
2551 | // | |
2552 | ||
2553 | Bool_t localFlag = kFALSE; | |
2554 | ||
2555 | Int_t lab = daugh->GetLabel(); | |
2556 | if(lab<0) return localFlag; | |
2557 | AliAODMCParticle *part= (AliAODMCParticle*)arrayMC->At(lab); | |
2558 | //Int_t partPdg = part->GetPdgCode(); | |
2559 | //printf(" -------------------------------------- partLab=%d partPdg=%d ---\n", lab, partPdg); | |
2560 | ||
2561 | Int_t motherLabel = part->GetMother(); | |
2562 | if(motherLabel<0) return localFlag; | |
2563 | ||
2564 | AliAODMCParticle *motherPart = 0; | |
2565 | Int_t motherPdg = 0; | |
2566 | while (!localFlag && motherLabel>=0) { | |
2567 | motherPart = (AliAODMCParticle*)arrayMC->At(motherLabel); | |
2568 | motherPdg = motherPart->GetPdgCode(); | |
2569 | //printf(" ------------- motherLab=%d motherPdg=%d ---\n", motherLabel, motherPdg); | |
2570 | if (TMath::Abs(motherPdg)==pdgToBeCompared) { | |
2571 | //printf("-------------------------- trovato quark c/cbar\n"); | |
2572 | localFlag = kTRUE; | |
2573 | } | |
2574 | else { | |
2575 | motherLabel = motherPart->GetMother(); | |
2576 | } | |
2577 | } | |
2578 | ||
2579 | return localFlag; | |
2580 | ||
7eb0cc73 | 2581 | } |
7ad4b782 | 2582 | |
60eac73d | 2583 | |
2584 | ||
2585 | ||
2586 | //----------------------- | |
2587 | Bool_t AliAnalysisTaskSELambdac::IsThereAGeneratedLc(TClonesArray *arrayMC) | |
2588 | { | |
2589 | // | |
2590 | // Returs kTRUE if there is a lepton related to the LambdaC | |
2591 | // | |
2592 | ||
2593 | Bool_t localFlag = kFALSE; | |
2594 | ||
2595 | AliAODMCParticle *searchLc; | |
2596 | ||
2597 | for (Int_t iii=0; iii<arrayMC->GetEntries(); iii++) { | |
2598 | searchLc = (AliAODMCParticle*)arrayMC->At(iii); | |
2599 | Int_t searchLcpdg = searchLc->GetPdgCode(); | |
2600 | if (TMath::Abs(searchLcpdg) == 4122){ | |
2601 | localFlag = kTRUE; | |
2602 | break; | |
2603 | } | |
2604 | } | |
2605 | ||
2606 | ||
2607 | return localFlag; | |
2608 | ||
2609 | } | |
2610 | //_________________________________ | |
2611 | ///////////////estimate primaries | |
2612 | Int_t AliAnalysisTaskSELambdac::NumberPrimaries(AliAODEvent *aods) | |
2613 | { | |
2614 | Int_t counter=0; | |
2615 | ||
2616 | ||
2617 | TClonesArray *aodtracks=(TClonesArray *)aods->GetTracks(); | |
2618 | ||
2619 | // for(Int_t ji=0;ji<aods->GetNTracks();ji++) | |
2620 | for(Int_t ji=0;ji<aodtracks->GetEntriesFast();ji++) | |
2621 | { | |
2622 | AliAODTrack*aodTrack=(AliAODTrack*)aodtracks->UncheckedAt(ji); | |
2623 | if(aodTrack->IsPrimaryCandidate()) counter++; | |
2624 | } | |
2625 | return counter; | |
2626 | ||
2627 | } | |
2628 | //_________________________________ | |
2629 | ||
2630 | void AliAnalysisTaskSELambdac::MultiplicityStudies(AliAODRecoDecayHF3Prong *part, | |
2631 | AliRDHFCutsLctopKpi *cuts, | |
2632 | AliAODEvent* aod, | |
2633 | TClonesArray *arrMC, | |
2634 | Bool_t &flag1,Bool_t &flag2,Bool_t &flag3, | |
2635 | Bool_t &flag4, Bool_t &flag5, Bool_t &flag6) | |
2636 | { | |
2637 | ||
2638 | TString fillthis=""; | |
2639 | ||
2640 | Int_t pdgDgLctopKpi[3]={2212,321,211}; | |
2641 | Int_t lab=-9999; | |
2642 | if(fReadMC) | |
2643 | lab=part->MatchToMC(4122,arrMC,3,pdgDgLctopKpi); //return MC particle label if the array corresponds to a Lc, -1 if not (cf. AliAODRecoDecay.cxx) | |
2644 | ||
2645 | cuts->SetUsePID(kFALSE); //Annalisa | |
2646 | Int_t isSelected3ProngByLc=cuts->IsSelected(part,AliRDHFCuts::kCandidate,aod); | |
2647 | ||
2648 | if(isSelected3ProngByLc>0 && fReadMC) { | |
2649 | flag1 = kTRUE; | |
2650 | if (lab>0) { | |
2651 | flag3 = kTRUE; | |
2652 | } | |
2653 | ||
2654 | Bool_t is3ProngFromJPsi = Is3ProngFromPDG(part,arrMC,443); | |
2655 | if (is3ProngFromJPsi) flag6=is3ProngFromJPsi; | |
2656 | ||
2657 | Bool_t is3ProngFromC = Is3ProngFromPDG(part,arrMC,4); | |
2658 | if (is3ProngFromC) flag4=is3ProngFromC; | |
2659 | ||
2660 | Bool_t is3ProngFromB = Is3ProngFromPDG(part,arrMC,5); | |
2661 | if (is3ProngFromB) flag5=is3ProngFromB; | |
2662 | ||
2663 | for (Int_t ii=0; ii<3; ii++) { | |
2664 | AliAODTrack *prongTest=(AliAODTrack*)part->GetDaughter(ii); | |
2665 | if (!prongTest) continue; | |
2666 | Int_t labprongTest = prongTest->GetLabel(); | |
2667 | if(labprongTest<0) continue; | |
2668 | AliAODMCParticle *mcprongTest = (AliAODMCParticle*)arrMC->At(labprongTest); | |
2669 | ||
2670 | switch (TMath::Abs(mcprongTest->GetPdgCode())) { | |
2671 | case 11: | |
2672 | fillthis="hElIn3Prong"; | |
2673 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2674 | if (IsTrackFromPDG(prongTest,arrMC,443)) { | |
2675 | fillthis="hElIn3Prong6"; | |
2676 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2677 | } | |
2678 | break; | |
2679 | case 13: | |
2680 | fillthis="hMuIn3Prong"; | |
2681 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2682 | if (IsTrackFromPDG(prongTest,arrMC,443)) { | |
2683 | fillthis="hMuIn3Prong6"; | |
2684 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2685 | } | |
2686 | break; | |
2687 | case 211: | |
2688 | fillthis="hPiIn3Prong"; | |
2689 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2690 | if (IsTrackFromPDG(prongTest,arrMC,443)) { | |
2691 | fillthis="hPiIn3Prong6"; | |
2692 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2693 | } | |
2694 | break; | |
2695 | case 321: | |
2696 | fillthis="hKaIn3Prong"; | |
2697 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2698 | if (IsTrackFromPDG(prongTest,arrMC,443)) { | |
2699 | fillthis="hKaIn3Prong6"; | |
2700 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2701 | } | |
2702 | break; | |
2703 | case 2212: | |
2704 | fillthis="hPrIn3Prong"; | |
2705 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2706 | if (IsTrackFromPDG(prongTest,arrMC,443)) { | |
2707 | fillthis="hPrIn3Prong6"; | |
2708 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2709 | } | |
2710 | break; | |
2711 | default: | |
2712 | break; | |
2713 | } | |
2714 | ||
2715 | if (lab>0) { | |
2716 | switch (TMath::Abs(mcprongTest->GetPdgCode())) { | |
2717 | case 11: | |
2718 | fillthis="hElIn3Prong1"; | |
2719 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2720 | break; | |
2721 | case 13: | |
2722 | fillthis="hMuIn3Prong1"; | |
2723 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2724 | break; | |
2725 | case 211: | |
2726 | fillthis="hPiIn3Prong1"; | |
2727 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2728 | break; | |
2729 | case 321: | |
2730 | fillthis="hKaIn3Prong1"; | |
2731 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2732 | break; | |
2733 | case 2212: | |
2734 | fillthis="hPrIn3Prong1"; | |
2735 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2736 | break; | |
2737 | default: | |
2738 | break; | |
2739 | } | |
2740 | } else { | |
2741 | switch (TMath::Abs(mcprongTest->GetPdgCode())) { | |
2742 | case 11: | |
2743 | fillthis="hElIn3Prong2"; | |
2744 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2745 | if (IsTrackFromPDG(prongTest,arrMC,4)) { | |
2746 | fillthis="hElIn3Prong3"; | |
2747 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2748 | } | |
2749 | if (IsTrackFromPDG(prongTest,arrMC,5)) { | |
2750 | fillthis="hElIn3Prong4"; | |
2751 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2752 | } | |
2753 | if (!IsTrackFromPDG(prongTest,arrMC,4) && !IsTrackFromPDG(prongTest,arrMC,5)) { | |
2754 | fillthis="hElIn3Prong5"; | |
2755 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2756 | } | |
2757 | break; | |
2758 | case 13: | |
2759 | fillthis="hMuIn3Prong2"; | |
2760 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2761 | if (IsTrackFromPDG(prongTest,arrMC,4)) { | |
2762 | fillthis="hMuIn3Prong3"; | |
2763 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2764 | } | |
2765 | if (IsTrackFromPDG(prongTest,arrMC,5)) { | |
2766 | fillthis="hMuIn3Prong4"; | |
2767 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2768 | } | |
2769 | if (!IsTrackFromPDG(prongTest,arrMC,4) && !IsTrackFromPDG(prongTest,arrMC,5)) { | |
2770 | fillthis="hMuIn3Prong5"; | |
2771 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2772 | } | |
2773 | break; | |
2774 | case 211: | |
2775 | fillthis="hPiIn3Prong2"; | |
2776 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2777 | if (IsTrackFromPDG(prongTest,arrMC,4)) { | |
2778 | fillthis="hPiIn3Prong3"; | |
2779 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2780 | } | |
2781 | if (IsTrackFromPDG(prongTest,arrMC,5)) { | |
2782 | fillthis="hPiIn3Prong4"; | |
2783 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2784 | } | |
2785 | if (!IsTrackFromPDG(prongTest,arrMC,4) && !IsTrackFromPDG(prongTest,arrMC,5)) { | |
2786 | fillthis="hPiIn3Prong5"; | |
2787 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2788 | } | |
2789 | break; | |
2790 | case 321: | |
2791 | fillthis="hKaIn3Prong2"; | |
2792 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2793 | if (IsTrackFromPDG(prongTest,arrMC,4)) { | |
2794 | fillthis="hKaIn3Prong3"; | |
2795 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2796 | } | |
2797 | if (IsTrackFromPDG(prongTest,arrMC,5)) { | |
2798 | fillthis="hKaIn3Prong4"; | |
2799 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2800 | } | |
2801 | if (!IsTrackFromPDG(prongTest,arrMC,4) && !IsTrackFromPDG(prongTest,arrMC,5)) { | |
2802 | fillthis="hKaIn3Prong5"; | |
2803 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2804 | } | |
2805 | break; | |
2806 | case 2212: | |
2807 | fillthis="hPrIn3Prong2"; | |
2808 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2809 | if (IsTrackFromPDG(prongTest,arrMC,4)) { | |
2810 | fillthis="hPrIn3Prong3"; | |
2811 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2812 | } | |
2813 | if (IsTrackFromPDG(prongTest,arrMC,5)) { | |
2814 | fillthis="hPrIn3Prong4"; | |
2815 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2816 | } | |
2817 | if (!IsTrackFromPDG(prongTest,arrMC,4) && !IsTrackFromPDG(prongTest,arrMC,5)) { | |
2818 | fillthis="hPrIn3Prong5"; | |
2819 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2820 | } | |
2821 | break; | |
2822 | default: | |
2823 | break; | |
2824 | } | |
2825 | } | |
2826 | /* | |
2827 | if (is3ProngFromC) { | |
2828 | switch (TMath::Abs(mcprongTest->GetPdgCode())) { | |
2829 | case 11: | |
2830 | fillthis="hElIn3Prong3"; | |
2831 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2832 | break; | |
2833 | case 13: | |
2834 | fillthis="hMuIn3Prong3"; | |
2835 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2836 | break; | |
2837 | case 211: | |
2838 | fillthis="hPiIn3Prong3"; | |
2839 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2840 | break; | |
2841 | case 321: | |
2842 | fillthis="hKaIn3Prong3"; | |
2843 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2844 | break; | |
2845 | case 2212: | |
2846 | fillthis="hPrIn3Prong3"; | |
2847 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2848 | break; | |
2849 | default: | |
2850 | break; | |
2851 | } | |
2852 | } else { // !is3ProngFromC | |
2853 | if (is3ProngFromB) { | |
2854 | switch (TMath::Abs(mcprongTest->GetPdgCode())) { | |
2855 | case 11: | |
2856 | fillthis="hElIn3Prong4"; | |
2857 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2858 | break; | |
2859 | case 13: | |
2860 | fillthis="hMuIn3Prong4"; | |
2861 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2862 | break; | |
2863 | case 211: | |
2864 | fillthis="hPiIn3Prong4"; | |
2865 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2866 | break; | |
2867 | case 321: | |
2868 | fillthis="hKaIn3Prong4"; | |
2869 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2870 | break; | |
2871 | case 2212: | |
2872 | fillthis="hPrIn3Prong4"; | |
2873 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2874 | break; | |
2875 | default: | |
2876 | break; | |
2877 | } | |
2878 | } else {//!is3ProngFromB | |
2879 | switch (TMath::Abs(mcprongTest->GetPdgCode())) { | |
2880 | case 11: | |
2881 | fillthis="hElIn3Prong5"; | |
2882 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2883 | break; | |
2884 | case 13: | |
2885 | fillthis="hMuIn3Prong5"; | |
2886 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2887 | break; | |
2888 | case 211: | |
2889 | fillthis="hPiIn3Prong5"; | |
2890 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2891 | break; | |
2892 | case 321: | |
2893 | fillthis="hKaIn3Prong5"; | |
2894 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2895 | break; | |
2896 | case 2212: | |
2897 | fillthis="hPrIn3Prong5"; | |
2898 | ((TH1F*)fAPriori->FindObject(fillthis))->Fill(part->PtProng(ii)); | |
2899 | break; | |
2900 | default: | |
2901 | break; | |
2902 | } | |
2903 | } | |
2904 | } | |
2905 | */ | |
2906 | } | |
2907 | } | |
2908 | ||
2909 | Double_t mPDG=TDatabasePDG::Instance()->GetParticle(4122)->Mass(); | |
2910 | Double_t invmasscut=0.05; | |
2911 | ||
2912 | Double_t minvLcpKpi = part->InvMassLcpKpi(); | |
2913 | Double_t minvLcpiKp = part->InvMassLcpiKp(); | |
2914 | ||
2915 | cuts->SetUsePID(kTRUE); //Annalisa | |
2916 | Int_t isSelected3ProngByLcPID=cuts->IsSelected(part,AliRDHFCuts::kCandidate,aod); | |
2917 | if (isSelected3ProngByLcPID>0) { | |
2918 | if (TMath::Abs(minvLcpKpi-mPDG)<invmasscut || TMath::Abs(minvLcpiKp-mPDG)<invmasscut) { | |
2919 | flag2 = kTRUE; | |
2920 | } | |
2921 | } | |
2922 | ||
2923 | ||
2924 | } |