]>
Commit | Line | Data |
---|---|---|
992ba7d8 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-2009, 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 | * appeuear 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 | ||
16 | /* $Id$ */ | |
17 | ||
18 | // | |
19 | // | |
20 | // Base class for Lc2V0 Analysis | |
21 | // | |
22 | // | |
23 | // The Lc spectra study is done 2D histograms: | |
24 | // cascade_invariantMass VS cascade_pT | |
25 | // | |
26 | // Cuts have been centralized in AliRDHFCutsLctoV0 class | |
27 | // | |
28 | //------------------------------------------------------------------------- | |
29 | // | |
30 | // Authors: A.De Caro(a,b), P. Pagano(b) | |
e7af8919 | 31 | // (a) Centro 'E.Fermi' - Roma |
32 | // (b) INFN and University of Salerno | |
992ba7d8 | 33 | // |
e7af8919 | 34 | // Contatcs: decaro@sa.infn.it |
35 | // paola.pagano@sa.infn.it | |
992ba7d8 | 36 | //------------------------------------------------------------------------- |
37 | ||
38 | #include <TSystem.h> | |
39 | #include <TParticle.h> | |
40 | #include <TParticlePDG.h> | |
41 | #include <TH1F.h> | |
42 | #include <TH2F.h> | |
43 | #include "TROOT.h" | |
44 | #include <TDatabasePDG.h> | |
45 | #include <AliAnalysisDataSlot.h> | |
46 | #include <AliAnalysisDataContainer.h> | |
47 | #include "AliStack.h" | |
48 | #include "AliMCEvent.h" | |
49 | #include "AliAnalysisManager.h" | |
50 | #include "AliAODMCHeader.h" | |
51 | #include "AliAODHandler.h" | |
52 | #include "AliLog.h" | |
53 | #include "AliAODVertex.h" | |
54 | #include "AliAODRecoDecay.h" | |
55 | #include "AliAODRecoDecayHF.h" | |
56 | #include "AliAODRecoCascadeHF.h" | |
57 | #include "AliAnalysisVertexingHF.h" | |
58 | #include "AliESDtrack.h" | |
59 | #include "AliAODTrack.h" | |
60 | #include "AliAODv0.h" | |
61 | #include "AliAODMCParticle.h" | |
62 | #include "AliAnalysisTaskSE.h" | |
63 | #include "AliAnalysisTaskSELc2V0bachelor.h" | |
64 | #include "AliNormalizationCounter.h" | |
65 | #include "AliAODPidHF.h" | |
66 | #include "AliPIDResponse.h" | |
67 | #include "AliTOFPIDResponse.h" | |
68 | #include "AliInputEventHandler.h" | |
69 | ||
c64cb1f6 | 70 | using std::cout; |
71 | using std::endl; | |
72 | ||
992ba7d8 | 73 | ClassImp(AliAnalysisTaskSELc2V0bachelor) |
74 | ||
75 | //__________________________________________________________________________ | |
76 | AliAnalysisTaskSELc2V0bachelor::AliAnalysisTaskSELc2V0bachelor(): | |
77 | AliAnalysisTaskSE(), | |
78 | fUseMCInfo(kFALSE), | |
79 | fOutput(0), | |
80 | fOutputAll(0), | |
81 | fOutputPIDBach(0), | |
82 | fCEvents(0), | |
83 | fPIDResponse(0), | |
84 | fIsK0sAnalysis(kFALSE), | |
85 | fCounter(0), | |
86 | fProdCuts(0), | |
87 | fAnalCuts(0), | |
0dbd1d4f | 88 | fListCuts(0), |
89 | fUseOnTheFlyV0(kFALSE), | |
90 | fIsEventSelected(kFALSE) | |
992ba7d8 | 91 | { |
92 | // | |
93 | // Default ctor | |
94 | // | |
95 | } | |
96 | //___________________________________________________________________________ | |
0dbd1d4f | 97 | AliAnalysisTaskSELc2V0bachelor::AliAnalysisTaskSELc2V0bachelor(const Char_t* name, AliRDHFCutsLctoV0* prodCuts, |
98 | AliRDHFCutsLctoV0* analCuts, Bool_t useOnTheFly) : | |
992ba7d8 | 99 | AliAnalysisTaskSE(name), |
100 | fUseMCInfo(kFALSE), | |
101 | fOutput(0), | |
102 | fOutputAll(0), | |
103 | fOutputPIDBach(0), | |
104 | fCEvents(0), | |
105 | fPIDResponse(0), | |
106 | fIsK0sAnalysis(kFALSE), | |
107 | fCounter(0), | |
108 | fProdCuts(prodCuts), | |
109 | fAnalCuts(analCuts), | |
0dbd1d4f | 110 | fListCuts(0), |
111 | fUseOnTheFlyV0(useOnTheFly), | |
112 | fIsEventSelected(kFALSE) | |
992ba7d8 | 113 | { |
114 | // | |
115 | // Constructor. Initialization of Inputs and Outputs | |
116 | // | |
117 | Info("AliAnalysisTaskSELc2V0bachelor","Calling Constructor"); | |
118 | ||
119 | DefineOutput(1,TList::Class()); //conters | |
120 | DefineOutput(2,TList::Class()); //All Entries output | |
121 | DefineOutput(3,TList::Class()); //3sigma PID output | |
122 | DefineOutput(4,AliNormalizationCounter::Class()); | |
123 | DefineOutput(5,TList::Class()); | |
124 | ||
125 | } | |
126 | ||
127 | //___________________________________________________________________________ | |
128 | AliAnalysisTaskSELc2V0bachelor::~AliAnalysisTaskSELc2V0bachelor() { | |
129 | // | |
130 | // destructor | |
131 | // | |
132 | Info("~AliAnalysisTaskSELc2V0bachelor","Calling Destructor"); | |
133 | ||
134 | if (fOutput) { | |
135 | delete fOutput; | |
136 | fOutput = 0; | |
137 | } | |
138 | ||
139 | if (fOutputAll) { | |
140 | delete fOutputAll; | |
141 | fOutputAll = 0; | |
142 | } | |
143 | ||
144 | if (fOutputPIDBach) { | |
145 | delete fOutputPIDBach; | |
146 | fOutputPIDBach = 0; | |
147 | } | |
148 | ||
149 | if (fPIDResponse) { | |
150 | delete fPIDResponse; | |
151 | } | |
152 | ||
153 | if (fCounter) { | |
154 | delete fCounter; | |
155 | fCounter = 0; | |
156 | } | |
157 | ||
158 | if (fProdCuts) { | |
159 | delete fProdCuts; | |
160 | fProdCuts = 0; | |
161 | } | |
162 | ||
163 | if (fAnalCuts) { | |
164 | delete fAnalCuts; | |
165 | fAnalCuts = 0; | |
166 | } | |
167 | ||
168 | if (fListCuts) { | |
169 | delete fListCuts; | |
170 | fListCuts = 0; | |
171 | } | |
172 | ||
173 | } | |
174 | //_________________________________________________ | |
175 | void AliAnalysisTaskSELc2V0bachelor::Init() { | |
176 | // | |
177 | // Initialization | |
178 | // | |
179 | ||
0dbd1d4f | 180 | fIsEventSelected=kFALSE; |
181 | ||
992ba7d8 | 182 | if (fDebug > 1) AliInfo("Init"); |
183 | ||
184 | fListCuts = new TList(); | |
185 | fListCuts->SetOwner(); | |
186 | fListCuts->Add(new AliRDHFCutsLctoV0(*fProdCuts)); | |
187 | fListCuts->Add(new AliRDHFCutsLctoV0(*fAnalCuts)); | |
188 | PostData(5,fListCuts); | |
189 | ||
190 | return; | |
191 | } | |
192 | ||
193 | //_________________________________________________ | |
194 | void AliAnalysisTaskSELc2V0bachelor::UserExec(Option_t *) | |
195 | { | |
196 | // user exec | |
197 | if (!fInputEvent) { | |
198 | AliError("NO EVENT FOUND!"); | |
199 | return; | |
200 | } | |
201 | ||
202 | AliAODEvent* aodEvent = dynamic_cast<AliAODEvent*>(fInputEvent); | |
203 | TClonesArray *arrayLctopKos=0; | |
204 | ||
205 | if (!aodEvent && AODEvent() && IsStandardAOD()) { | |
206 | // In case there is an AOD handler writing a standard AOD, use the AOD | |
207 | // event in memory rather than the input (ESD) event. | |
208 | aodEvent = dynamic_cast<AliAODEvent*> (AODEvent()); | |
209 | // in this case the braches in the deltaAOD (AliAOD.VertexingHF.root) | |
210 | // have to taken from the AOD event hold by the AliAODExtension | |
211 | AliAODHandler* aodHandler = (AliAODHandler*) | |
212 | ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler()); | |
213 | ||
214 | if (aodHandler->GetExtensions()) { | |
215 | AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject("AliAOD.VertexingHF.root"); | |
216 | AliAODEvent *aodFromExt = ext->GetAOD(); | |
217 | arrayLctopKos=(TClonesArray*)aodFromExt->GetList()->FindObject("CascadesHF"); | |
218 | } | |
219 | } else { | |
220 | arrayLctopKos=(TClonesArray*)aodEvent->GetList()->FindObject("CascadesHF"); | |
221 | } | |
222 | ||
223 | fCEvents->Fill(1); | |
224 | fCounter->StoreEvent(aodEvent,fAnalCuts,fUseMCInfo); | |
225 | ||
0dbd1d4f | 226 | // AOD primary vertex |
227 | AliAODVertex *vtx1 = (AliAODVertex*)aodEvent->GetPrimaryVertex(); | |
228 | if (!vtx1) return; | |
229 | ||
992ba7d8 | 230 | // fix for temporary bug in ESDfilter |
0dbd1d4f | 231 | if (TMath::Abs(aodEvent->GetMagneticField())<0.001) return; |
992ba7d8 | 232 | fCEvents->Fill(2); |
233 | ||
0dbd1d4f | 234 | Float_t zVertex = vtx1->GetZ(); |
235 | ((TH1F*)(fOutput->FindObject("hZ2")))->Fill(zVertex); | |
992ba7d8 | 236 | |
992ba7d8 | 237 | if (vtx1->GetNContributors()<1) return; |
238 | fCEvents->Fill(3); | |
239 | ||
0dbd1d4f | 240 | ((TH1F*)(fOutput->FindObject("hZ3")))->Fill(zVertex); |
241 | ||
992ba7d8 | 242 | if (!arrayLctopKos) { |
243 | AliInfo("Could not find array of HF cascades, skipping the event"); | |
244 | return; | |
245 | } else { | |
0dbd1d4f | 246 | if (arrayLctopKos->GetEntriesFast()) { |
992ba7d8 | 247 | AliInfo(Form("Found %d cascades",arrayLctopKos->GetEntriesFast())); |
248 | } | |
249 | } | |
992ba7d8 | 250 | fCEvents->Fill(4); |
0dbd1d4f | 251 | ((TH1F*)(fOutput->FindObject("hZ4")))->Fill(zVertex); |
252 | ||
253 | // trigger class for PbPb C0SMH-B-NOPF-ALLNOTRD | |
254 | /* | |
255 | TString trigclass = aodEvent->GetFiredTriggerClasses(); | |
256 | if (trigclass.Contains("C0SMH-B-NOPF-ALLNOTRD")||trigclass.Contains("C0SMH-B-NOPF-ALL")) | |
257 | fCEvents->Fill(5); // in case of RealData events | |
258 | */ | |
259 | ||
260 | /////////////////////// | |
261 | Bool_t check1 = kFALSE; | |
262 | TString firedTriggerClasses = aodEvent->GetFiredTriggerClasses(); // trigger class | |
263 | if ( !fUseMCInfo && // don't do for MC... | |
264 | (aodEvent->GetRunNumber()<136851 || aodEvent->GetRunNumber()>139517) ) { // ...and for PbPb 2010 data | |
265 | if ( !(firedTriggerClasses.Contains("CINT1")) ) { | |
266 | AliInfo(Form(" ======================== firedTriggerClasses.Data() = %s",firedTriggerClasses.Data())); | |
267 | fCEvents->Fill(8); | |
268 | ((TH1F*)(fOutput->FindObject("hZ8")))->Fill(zVertex); | |
269 | check1 = kTRUE; | |
270 | } | |
271 | } | |
272 | ||
273 | ULong64_t fTriggerMask=AliVEvent::kAnyINT; | |
274 | Bool_t isSelectedAAA = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & fTriggerMask); | |
275 | if (!isSelectedAAA) { | |
276 | fCEvents->Fill(9); | |
277 | ((TH1F*)(fOutput->FindObject("hZ9")))->Fill(zVertex); | |
278 | } | |
279 | ||
280 | if (!isSelectedAAA || check1) { | |
281 | fCEvents->Fill(16); | |
282 | ((TH1F*)(fOutput->FindObject("hZ16")))->Fill(zVertex); | |
283 | } | |
284 | ||
285 | fTriggerMask=AliVEvent::kAny; | |
286 | Bool_t isSelectedBBB = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & fTriggerMask); | |
287 | if (!isSelectedBBB) { | |
288 | fCEvents->Fill(10); | |
289 | ((TH1F*)(fOutput->FindObject("hZ10")))->Fill(zVertex); | |
290 | } | |
291 | ||
292 | TString title=vtx1->GetTitle(); | |
293 | if (title.Contains("Z")) { | |
294 | fCEvents->Fill(11); | |
295 | ((TH1F*)(fOutput->FindObject("hZ11")))->Fill(zVertex); | |
296 | } | |
297 | else if (title.Contains("3D")) { | |
298 | fCEvents->Fill(12); | |
299 | ((TH1F*)(fOutput->FindObject("hZ12")))->Fill(zVertex); | |
300 | } else { | |
301 | fCEvents->Fill(13); | |
302 | ((TH1F*)(fOutput->FindObject("hZ13")))->Fill(zVertex); | |
303 | } | |
304 | ||
305 | if (TMath::Abs(zVertex)<=fAnalCuts->GetMaxVtxZ()) { | |
306 | fCEvents->Fill(14); | |
307 | ((TH1F*)(fOutput->FindObject("hZ14")))->Fill(zVertex); | |
308 | } | |
309 | ||
310 | fIsEventSelected = fAnalCuts->IsEventSelected(aodEvent); | |
311 | if ( fIsEventSelected ) { | |
312 | fCEvents->Fill(7); | |
313 | ((TH1F*)(fOutput->FindObject("hZ7")))->Fill(zVertex); | |
314 | } else { | |
315 | fCEvents->Fill(15); | |
316 | ((TH1F*)(fOutput->FindObject("hZ15")))->Fill(zVertex); | |
317 | return; | |
318 | } | |
319 | /////////////////////// | |
320 | ||
992ba7d8 | 321 | |
992ba7d8 | 322 | |
323 | // mc analysis | |
324 | TClonesArray *mcArray = 0; | |
325 | AliAODMCHeader *mcHeader=0; | |
326 | ||
327 | if (fUseMCInfo) { | |
328 | // MC array need for maching | |
329 | mcArray = dynamic_cast<TClonesArray*>(aodEvent->FindListObject(AliAODMCParticle::StdBranchName())); | |
330 | if (!mcArray) { | |
331 | AliError("Could not find Monte-Carlo in AOD"); | |
332 | return; | |
333 | } | |
334 | fCEvents->Fill(5); // in case of MC events | |
0dbd1d4f | 335 | ((TH1F*)(fOutput->FindObject("hZ5")))->Fill(zVertex); |
992ba7d8 | 336 | |
337 | // load MC header | |
338 | mcHeader = (AliAODMCHeader*)aodEvent->GetList()->FindObject(AliAODMCHeader::StdBranchName()); | |
339 | if (!mcHeader) { | |
340 | AliError("AliAnalysisTaskSELc2V0bachelor::UserExec: MC header branch not found!\n"); | |
341 | return; | |
342 | } | |
343 | fCEvents->Fill(6); | |
0dbd1d4f | 344 | ((TH1F*)(fOutput->FindObject("hZ6")))->Fill(zVertex); |
992ba7d8 | 345 | |
346 | //AliInfo("~~~~~~~~~~Sono dentro fUseMCInfo 2"); | |
347 | ||
348 | // check on MC Lc Daughter | |
349 | SearchLcDaughter(mcArray); | |
350 | ||
351 | } | |
352 | ||
353 | //AliInfo("~~~~~~~~~~Sono prima di isEvSelA"); | |
354 | Int_t nSelectedProd = 0; | |
355 | Int_t nSelectedAnal = 0; | |
0dbd1d4f | 356 | if (fIsK0sAnalysis) { |
357 | MakeAnalysisForLc2prK0S(vtx1,arrayLctopKos,mcArray, | |
358 | nSelectedProd, fProdCuts, nSelectedAnal, fAnalCuts); | |
359 | ||
360 | if (nSelectedAnal) { | |
361 | ||
362 | ((TH1I*)(fOutput->FindObject("hEventsWithCandidates")))->Fill(4); | |
363 | ((TH1F*)(fOutput->FindObject("hZ4a")))->Fill(zVertex); | |
364 | ||
365 | //TString firedTriggerClasses = aodEvent->GetFiredTriggerClasses(); // trigger class | |
366 | Bool_t check1a = kFALSE; | |
367 | if ( !fUseMCInfo && // don't do for MC... | |
368 | (aodEvent->GetRunNumber()<136851 || aodEvent->GetRunNumber()>139517) ) { // ...and for PbPb 2010 data | |
369 | if ( !(firedTriggerClasses.Contains("CINT1")) ) { | |
370 | AliInfo(Form(" ======================== firedTriggerClasses.Data() = %s",firedTriggerClasses.Data())); | |
371 | ((TH1I*)(fOutput->FindObject("hEventsWithCandidates")))->Fill(8); | |
372 | ((TH1F*)(fOutput->FindObject("hZ8a")))->Fill(zVertex); | |
373 | check1a = kTRUE; | |
374 | } | |
375 | } | |
376 | ||
377 | //ULong64_t fTriggerMask=AliVEvent::kAnyINT; | |
378 | fTriggerMask=AliVEvent::kAnyINT; | |
379 | Bool_t isSelectedAAAa = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & fTriggerMask); | |
380 | if (!isSelectedAAAa) { | |
381 | ((TH1I*)(fOutput->FindObject("hEventsWithCandidates")))->Fill(9); | |
382 | ((TH1F*)(fOutput->FindObject("hZ9a")))->Fill(zVertex); | |
383 | } | |
384 | ||
385 | if (!isSelectedAAAa || check1a) { | |
386 | ((TH1I*)(fOutput->FindObject("hEventsWithCandidates")))->Fill(16); | |
387 | ((TH1F*)(fOutput->FindObject("hZ16a")))->Fill(zVertex); | |
388 | } | |
389 | ||
390 | fTriggerMask=AliVEvent::kAny; | |
391 | Bool_t isSelectedBBBa = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & fTriggerMask); | |
392 | if (!isSelectedBBBa) { | |
393 | ((TH1I*)(fOutput->FindObject("hEventsWithCandidates")))->Fill(10); | |
394 | ((TH1F*)(fOutput->FindObject("hZ10a")))->Fill(zVertex); | |
395 | } | |
396 | ||
397 | //TString title=vtx1->GetTitle(); | |
398 | if (title.Contains("Z")) { | |
399 | ((TH1I*)(fOutput->FindObject("hEventsWithCandidates")))->Fill(11); | |
400 | ((TH1F*)(fOutput->FindObject("hZ11a")))->Fill(zVertex); | |
401 | } | |
402 | else if (title.Contains("3D")) { | |
403 | ((TH1I*)(fOutput->FindObject("hEventsWithCandidates")))->Fill(12); | |
404 | ((TH1F*)(fOutput->FindObject("hZ12a")))->Fill(zVertex); | |
405 | } else { | |
406 | ((TH1I*)(fOutput->FindObject("hEventsWithCandidates")))->Fill(13); | |
407 | ((TH1F*)(fOutput->FindObject("hZ13a")))->Fill(zVertex); | |
408 | } | |
409 | ||
410 | if (TMath::Abs(zVertex)<=fAnalCuts->GetMaxVtxZ()) { | |
411 | ((TH1I*)(fOutput->FindObject("hEventsWithCandidates")))->Fill(14); | |
412 | ((TH1F*)(fOutput->FindObject("hZ14a")))->Fill(zVertex); | |
413 | } | |
414 | ||
415 | //Bool_t eventSelected = fAnalCuts->IsEventSelected(aodEvent); | |
416 | if ( fIsEventSelected ) { | |
417 | ((TH1I*)(fOutput->FindObject("hEventsWithCandidates")))->Fill(7); | |
418 | ((TH1F*)(fOutput->FindObject("hZ7a")))->Fill(zVertex); | |
419 | } else { | |
420 | ((TH1I*)(fOutput->FindObject("hEventsWithCandidates")))->Fill(15); | |
421 | ((TH1F*)(fOutput->FindObject("hZ15a")))->Fill(zVertex); | |
422 | } | |
423 | } | |
424 | ||
425 | } | |
426 | ||
992ba7d8 | 427 | |
428 | fCounter->StoreCandidates(aodEvent,nSelectedProd,kTRUE); | |
429 | fCounter->StoreCandidates(aodEvent,nSelectedAnal,kFALSE); | |
430 | ||
431 | PostData(1,fOutput); | |
432 | PostData(2,fOutputAll); | |
433 | PostData(3,fOutputPIDBach); | |
434 | PostData(4,fCounter); | |
435 | ||
436 | } | |
437 | //________________________________________ terminate ___________________________ | |
438 | void AliAnalysisTaskSELc2V0bachelor::Terminate(Option_t*) | |
439 | { | |
440 | // The Terminate() function is the last function to be called during | |
441 | // a query. It always runs on the client, it can be used to present | |
442 | // the results graphically or save the results to file. | |
443 | ||
444 | //AliInfo("Terminate",""); | |
445 | AliAnalysisTaskSE::Terminate(); | |
446 | ||
447 | fOutput = dynamic_cast<TList*> (GetOutputData(1)); | |
448 | if (!fOutput) { | |
449 | AliError("fOutput not available"); | |
450 | return; | |
451 | } | |
452 | ||
0dbd1d4f | 453 | //fCEvents = dynamic_cast<TH1I*>(fOutput->FindObject("fCEvents")); |
992ba7d8 | 454 | |
455 | fOutputAll = dynamic_cast<TList*> (GetOutputData(2)); | |
456 | if (!fOutputAll) { | |
457 | AliError("fOutputAll not available"); | |
458 | return; | |
459 | } | |
460 | ||
461 | fOutputPIDBach = dynamic_cast<TList*> (GetOutputData(3)); | |
462 | if (!fOutputPIDBach) { | |
463 | AliError("fOutputPIDBach not available"); | |
464 | return; | |
465 | } | |
466 | ||
467 | return; | |
468 | } | |
469 | //___________________________________________________________________________ | |
470 | void AliAnalysisTaskSELc2V0bachelor::UserCreateOutputObjects() { | |
471 | // output | |
472 | AliInfo(Form("CreateOutputObjects of task %s\n", GetName())); | |
473 | ||
474 | //slot #1 | |
475 | //OpenFile(1); | |
476 | fOutput = new TList(); | |
477 | fOutput->SetOwner(); | |
478 | fOutput->SetName("chist0"); | |
479 | ||
480 | fOutputAll = new TList(); | |
481 | fOutputAll->SetOwner(); | |
482 | fOutputAll->SetName("listAll"); | |
483 | ||
484 | fOutputPIDBach = new TList(); | |
485 | fOutputPIDBach->SetOwner(); | |
486 | fOutputPIDBach->SetName("listPIDBach"); | |
487 | ||
488 | // define histograms | |
489 | DefineHistograms(); | |
490 | ||
491 | AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager(); | |
492 | AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler()); | |
493 | fPIDResponse = inputHandler->GetPIDResponse(); | |
494 | ||
495 | if (fProdCuts->GetIsUsePID()){ | |
496 | fProdCuts->GetPidHF()->SetPidResponse(fPIDResponse); | |
497 | fProdCuts->GetPidV0pos()->SetPidResponse(fPIDResponse); | |
498 | fProdCuts->GetPidV0neg()->SetPidResponse(fPIDResponse); | |
499 | fProdCuts->GetPidHF()->SetOldPid(kFALSE); | |
500 | fProdCuts->GetPidV0pos()->SetOldPid(kFALSE); | |
501 | fProdCuts->GetPidV0neg()->SetOldPid(kFALSE); | |
502 | } | |
503 | if (fAnalCuts->GetIsUsePID()){ | |
504 | fAnalCuts->GetPidHF()->SetPidResponse(fPIDResponse); | |
505 | fAnalCuts->GetPidV0pos()->SetPidResponse(fPIDResponse); | |
506 | fAnalCuts->GetPidV0neg()->SetPidResponse(fPIDResponse); | |
507 | fAnalCuts->GetPidHF()->SetOldPid(kFALSE); | |
508 | fAnalCuts->GetPidV0pos()->SetOldPid(kFALSE); | |
509 | fAnalCuts->GetPidV0neg()->SetOldPid(kFALSE); | |
510 | } | |
511 | ||
512 | PostData(1,fOutput); | |
513 | PostData(2,fOutputAll); | |
514 | PostData(3,fOutputPIDBach); | |
515 | ||
516 | fCounter = new AliNormalizationCounter("NormalizationCounter"); | |
517 | fCounter->Init(); | |
518 | PostData(4,fCounter); | |
519 | ||
520 | return; | |
521 | } | |
522 | //___________________________________ hiostograms _______________________________________ | |
523 | void AliAnalysisTaskSELc2V0bachelor::DefineHistograms() { | |
524 | ||
0dbd1d4f | 525 | fCEvents = new TH1I("fCEvents","conter",17,0,17); |
992ba7d8 | 526 | fCEvents->SetStats(kTRUE); |
0dbd1d4f | 527 | fCEvents->GetXaxis()->SetBinLabel(2,"Analyzed events"); |
528 | fCEvents->GetXaxis()->SetBinLabel(3,"AliAODVertex exists"); | |
529 | fCEvents->GetXaxis()->SetBinLabel(4,"GetNContributors()>0"); | |
530 | fCEvents->GetXaxis()->SetBinLabel(5,"CascadesHF exists"); | |
531 | fCEvents->GetXaxis()->SetBinLabel(9,"triggerClass!=CINT1"); | |
532 | fCEvents->GetXaxis()->SetBinLabel(10,"triggerMask!=kAnyINT"); | |
533 | fCEvents->GetXaxis()->SetBinLabel(11,"triggerMask!=kAny"); | |
534 | fCEvents->GetXaxis()->SetBinLabel(12,"vtxTitle.Contains(Z)"); | |
535 | fCEvents->GetXaxis()->SetBinLabel(13,"vtxTitle.Contains(3D)"); | |
536 | fCEvents->GetXaxis()->SetBinLabel(14,"vtxTitle.Doesn'tContain(Z-3D)"); | |
537 | fCEvents->GetXaxis()->SetBinLabel(15,"zVtx<=10cm"); | |
538 | fCEvents->GetXaxis()->SetBinLabel(16,"!IsEventSelected"); | |
539 | fCEvents->GetXaxis()->SetBinLabel(17,"triggerMask!=kAnyINT || triggerClass!=CINT1"); | |
540 | fCEvents->GetXaxis()->SetBinLabel(8,"IsEventSelected"); | |
541 | //fCEvents->GetXaxis()->SetTitle(""); | |
992ba7d8 | 542 | fCEvents->GetYaxis()->SetTitle("counts"); |
543 | ||
544 | fOutput->Add(fCEvents); | |
545 | TString fillthis=""; | |
546 | ||
547 | if (fUseMCInfo) { | |
548 | fillthis="histMcStatLc"; | |
549 | TH1F* mcStatisticLc = new TH1F(fillthis.Data(),"#Lambda_{C} generated and their decays",19,-9.5,9.5); | |
550 | fOutput->Add(mcStatisticLc); | |
551 | } | |
552 | ||
553 | fillthis="histopionV0SigmaVspTOF"; | |
554 | TH2F *hpionV0SigmaVspTOF=new TH2F(fillthis.Data(),fillthis.Data(),100,0.,5.0,100,-10.0,10.0); | |
555 | fillthis="histoprotonBachSigmaVspTOF"; | |
556 | TH2F *hprotonBachSigmaVspTOF=new TH2F(fillthis.Data(),fillthis.Data(),100,0.,5.0,100,-10.0,10.0); | |
557 | ||
558 | fOutput->Add(hpionV0SigmaVspTOF); | |
559 | fOutput->Add(hprotonBachSigmaVspTOF); | |
560 | ||
561 | fillthis="histopionV0SigmaVspTPC"; | |
562 | TH2F *hpionV0SigmaVspTPC=new TH2F(fillthis.Data(),fillthis.Data(),100,0.,5.0,100,-10.0,10.0); | |
563 | fillthis="histoprotonBachSigmaVspTPC"; | |
564 | TH2F *hprotonBachSigmaVspTPC=new TH2F(fillthis.Data(),fillthis.Data(),100,0.,5.0,100,-10.0,10.0); | |
565 | ||
566 | fOutput->Add(hpionV0SigmaVspTPC); | |
567 | fOutput->Add(hprotonBachSigmaVspTPC); | |
568 | ||
0dbd1d4f | 569 | TH1F *hZ2 = new TH1F("hZ2","",100,-50.,50.); |
570 | fOutput->Add(hZ2); | |
571 | TH1F *hZ3 = new TH1F("hZ3","",100,-50.,50.); | |
572 | fOutput->Add(hZ3); | |
573 | TH1F *hZ4 = new TH1F("hZ4","",100,-50.,50.); | |
574 | fOutput->Add(hZ4); | |
575 | TH1F *hZ5 = new TH1F("hZ5","",100,-50.,50.); | |
576 | fOutput->Add(hZ5); | |
577 | TH1F *hZ6 = new TH1F("hZ6","",100,-50.,50.); | |
578 | fOutput->Add(hZ6); | |
579 | TH1F *hZ7 = new TH1F("hZ7","",100,-50.,50.); | |
580 | fOutput->Add(hZ7); | |
581 | TH1F *hZ8 = new TH1F("hZ8","",100,-50.,50.); | |
582 | fOutput->Add(hZ8); | |
583 | TH1F *hZ9 = new TH1F("hZ9","",100,-50.,50.); | |
584 | fOutput->Add(hZ9); | |
585 | TH1F *hZ10 = new TH1F("hZ10","",100,-50.,50.); | |
586 | fOutput->Add(hZ10); | |
587 | TH1F *hZ11 = new TH1F("hZ11","",100,-50.,50.); | |
588 | fOutput->Add(hZ11); | |
589 | TH1F *hZ12 = new TH1F("hZ12","",100,-50.,50.); | |
590 | fOutput->Add(hZ12); | |
591 | TH1F *hZ13 = new TH1F("hZ13","",100,-50.,50.); | |
592 | fOutput->Add(hZ13); | |
593 | TH1F *hZ14 = new TH1F("hZ14","",100,-50.,50.); | |
594 | fOutput->Add(hZ14); | |
595 | TH1F *hZ15 = new TH1F("hZ15","",100,-50.,50.); | |
596 | fOutput->Add(hZ15); | |
597 | TH1F *hZ16 = new TH1F("hZ16","",100,-50.,50.); | |
598 | fOutput->Add(hZ16); | |
599 | ||
600 | TH1I *hCandidateSelection = new TH1I("hCandidateSelection","",12,0,12); | |
601 | hCandidateSelection->GetXaxis()->SetBinLabel(1,"IsEventSelected"); | |
602 | hCandidateSelection->GetXaxis()->SetBinLabel(2,"IsSecondaryVtx"); | |
603 | hCandidateSelection->GetXaxis()->SetBinLabel(3,"V0toPosNeg"); | |
604 | hCandidateSelection->GetXaxis()->SetBinLabel(4,"prodCuts::kTracks"); | |
605 | hCandidateSelection->GetXaxis()->SetBinLabel(5,"prodCuts::kCandidate"); | |
606 | hCandidateSelection->GetXaxis()->SetBinLabel(6,"prodCuts::kPID"); | |
607 | hCandidateSelection->GetXaxis()->SetBinLabel(7,"prodCuts::kAll"); | |
608 | hCandidateSelection->GetXaxis()->SetBinLabel(8,"analCuts::kTracks"); | |
609 | hCandidateSelection->GetXaxis()->SetBinLabel(9,"analCuts::kCandidate"); | |
610 | hCandidateSelection->GetXaxis()->SetBinLabel(10,"analCuts::kPID"); | |
611 | hCandidateSelection->GetXaxis()->SetBinLabel(11,"analCuts::kAll"); | |
612 | fOutput->Add(hCandidateSelection); | |
613 | ||
614 | TH1I *hEventsWithCandidates = new TH1I("hEventsWithCandidates","conter",17,0,17); | |
615 | fOutput->Add(hEventsWithCandidates); | |
616 | ||
617 | TH1F *hZ2a = new TH1F("hZ2a","",100,-50.,50.); | |
618 | fOutput->Add(hZ2a); | |
619 | TH1F *hZ3a = new TH1F("hZ3a","",100,-50.,50.); | |
620 | fOutput->Add(hZ3a); | |
621 | TH1F *hZ4a = new TH1F("hZ4a","",100,-50.,50.); | |
622 | fOutput->Add(hZ4a); | |
623 | TH1F *hZ5a = new TH1F("hZ5a","",100,-50.,50.); | |
624 | fOutput->Add(hZ5a); | |
625 | TH1F *hZ6a = new TH1F("hZ6a","",100,-50.,50.); | |
626 | fOutput->Add(hZ6a); | |
627 | TH1F *hZ7a = new TH1F("hZ7a","",100,-50.,50.); | |
628 | fOutput->Add(hZ7a); | |
629 | TH1F *hZ8a = new TH1F("hZ8a","",100,-50.,50.); | |
630 | fOutput->Add(hZ8a); | |
631 | TH1F *hZ9a = new TH1F("hZ9a","",100,-50.,50.); | |
632 | fOutput->Add(hZ9a); | |
633 | TH1F *hZ10a = new TH1F("hZ10a","",100,-50.,50.); | |
634 | fOutput->Add(hZ10a); | |
635 | TH1F *hZ11a = new TH1F("hZ11a","",100,-50.,50.); | |
636 | fOutput->Add(hZ11a); | |
637 | TH1F *hZ12a = new TH1F("hZ12a","",100,-50.,50.); | |
638 | fOutput->Add(hZ12a); | |
639 | TH1F *hZ13a = new TH1F("hZ13a","",100,-50.,50.); | |
640 | fOutput->Add(hZ13a); | |
641 | TH1F *hZ14a = new TH1F("hZ14a","",100,-50.,50.); | |
642 | fOutput->Add(hZ14a); | |
643 | TH1F *hZ15a = new TH1F("hZ15a","",100,-50.,50.); | |
644 | fOutput->Add(hZ15a); | |
645 | TH1F *hZ16a = new TH1F("hZ16a","",100,-50.,50.); | |
646 | fOutput->Add(hZ16a); | |
647 | ||
648 | TH1I *hSwitchOnCandidates0 = new TH1I("hSwitchOnCandidates0","",8,0,8); | |
649 | fOutput->Add(hSwitchOnCandidates0); | |
650 | TH1I *hSwitchOnCandidates1 = new TH1I("hSwitchOnCandidates1","",8,0,8); | |
651 | fOutput->Add(hSwitchOnCandidates1); | |
652 | TH1I *hSwitchOnCandidates2 = new TH1I("hSwitchOnCandidates2","",8,0,8); | |
653 | fOutput->Add(hSwitchOnCandidates2); | |
654 | TH1I *hSwitchOnCandidates3 = new TH1I("hSwitchOnCandidates3","",8,0,8); | |
655 | fOutput->Add(hSwitchOnCandidates3); | |
656 | TH1I *hSwitchOnCandidates4 = new TH1I("hSwitchOnCandidates4","",8,0,8); | |
657 | fOutput->Add(hSwitchOnCandidates4); | |
658 | ||
992ba7d8 | 659 | if (fIsK0sAnalysis) DefineK0SHistos();// hK0S histos declarations |
660 | ||
661 | return; | |
662 | } | |
663 | //________________________________________________________________________ | |
664 | void AliAnalysisTaskSELc2V0bachelor::FillLc2pK0Sspectrum(AliAODRecoCascadeHF *part, | |
665 | Int_t isLc, | |
666 | Int_t &nSelectedProd, | |
667 | AliRDHFCutsLctoV0 *cutsProd, | |
668 | Int_t &nSelectedAnal, | |
669 | AliRDHFCutsLctoV0 *cutsAnal) | |
670 | { | |
671 | // | |
672 | // Fill histos for Lc -> K0S+proton | |
673 | // | |
674 | ||
0dbd1d4f | 675 | if ( ( ( (cutsProd->IsSelected(part,AliRDHFCuts::kCandidate))&(AliRDHFCutsLctoV0::kLcToK0Spr)) == (AliRDHFCutsLctoV0::kLcToK0Spr) ) ) |
676 | ((TH1I*)(fOutput->FindObject("hCandidateSelection")))->Fill(4); | |
677 | if ( ( ( (cutsProd->IsSelected(part,AliRDHFCuts::kPID))&(AliRDHFCutsLctoV0::kLcToK0Spr)) == (AliRDHFCutsLctoV0::kLcToK0Spr) ) ) | |
678 | ((TH1I*)(fOutput->FindObject("hCandidateSelection")))->Fill(5); | |
679 | if ( ( ( (cutsProd->IsSelected(part,AliRDHFCuts::kAll))&(AliRDHFCutsLctoV0::kLcToK0Spr)) == (AliRDHFCutsLctoV0::kLcToK0Spr) ) ) { | |
680 | nSelectedProd++; | |
681 | ((TH1I*)(fOutput->FindObject("hCandidateSelection")))->Fill(6); | |
682 | } | |
683 | /* | |
684 | if ( ( (cutsProd->IsSelectedPID(part))&(AliRDHFCutsLctoV0::kLcToK0Spr))==(AliRDHFCutsLctoV0::kLcToK0Spr) && // to be used since fUsePID is kFALSE for cutsProd | |
685 | ( ( (cutsProd->IsSelectedSingleCut(part,AliRDHFCuts::kCandidate,2))&(AliRDHFCutsLctoV0::kLcToK0Spr)) == (AliRDHFCutsLctoV0::kLcToK0Spr) ) ) nSelectedProd++; | |
686 | */ | |
687 | ||
688 | ||
689 | if ( (((cutsAnal->IsSelected(part,AliRDHFCuts::kTracks))&(AliRDHFCutsLctoV0::kLcToK0Spr))==(AliRDHFCutsLctoV0::kLcToK0Spr)) ) | |
690 | ((TH1I*)(fOutput->FindObject("hCandidateSelection")))->Fill(7); | |
691 | ||
692 | //Bool_t usePID = cutsAnal->GetIsUsePID(); | |
693 | //cutsAnal->SetUsePID(kFALSE); | |
694 | if ( (((cutsAnal->IsSelected(part,AliRDHFCuts::kCandidate))&(AliRDHFCutsLctoV0::kLcToK0Spr))==(AliRDHFCutsLctoV0::kLcToK0Spr)) ) | |
695 | ((TH1I*)(fOutput->FindObject("hCandidateSelection")))->Fill(8); | |
696 | //cutsAnal->SetUsePID(usePID); | |
697 | if ( (((cutsAnal->IsSelected(part,AliRDHFCuts::kPID))&(AliRDHFCutsLctoV0::kLcToK0Spr))==(AliRDHFCutsLctoV0::kLcToK0Spr)) ) | |
698 | ((TH1I*)(fOutput->FindObject("hCandidateSelection")))->Fill(9); | |
992ba7d8 | 699 | |
700 | TString fillthis=""; | |
701 | ||
702 | Double_t invmassLc = part->InvMassLctoK0sP(); | |
703 | Double_t lambdacpt=part->Pt(); | |
704 | Double_t cosOAK0Sp = part->PxProng(0)*part->PxProng(1)+ | |
705 | part->PyProng(0)*part->PyProng(1)+ | |
706 | part->PzProng(0)*part->PzProng(1); | |
707 | cosOAK0Sp /= (part->PProng(0)*part->PProng(1)); | |
708 | ||
709 | AliAODv0 * v0part = (AliAODv0*)part->Getv0(); | |
710 | Bool_t onFlyV0 = v0part->GetOnFlyStatus(); // on-the-flight V0s | |
711 | Double_t momK0s = TMath::Sqrt(v0part->Ptot2V0()); | |
712 | Double_t ptK0s = TMath::Sqrt(v0part->Pt2V0()); | |
713 | Double_t dcaV0 = v0part->DcaV0ToPrimVertex(); | |
714 | Double_t invmassK0s = v0part->MassK0Short(); | |
0dbd1d4f | 715 | Bool_t isInV0window = (((cutsAnal->IsSelectedSingleCut(part,AliRDHFCuts::kCandidate,2))&(AliRDHFCutsLctoV0::kLcToK0Spr))==(AliRDHFCutsLctoV0::kLcToK0Spr)); // cut on V0 invMass |
992ba7d8 | 716 | |
717 | AliAODTrack *bachelor = (AliAODTrack*)part->GetBachelor(); | |
718 | Double_t momBach = bachelor->P(); | |
0dbd1d4f | 719 | Bool_t isBachelorID = (((cutsAnal->IsSelected(part,AliRDHFCuts::kPID))&(AliRDHFCutsLctoV0::kLcToK0Spr))==(AliRDHFCutsLctoV0::kLcToK0Spr)); // ID x bachelor |
720 | ||
721 | //if (isBachelorID && isInV0window) nSelectedAnal++; | |
722 | if ( (((cutsAnal->IsSelected(part,AliRDHFCuts::kAll))&(AliRDHFCutsLctoV0::kLcToK0Spr))==(AliRDHFCutsLctoV0::kLcToK0Spr)) ) { | |
723 | ((TH1I*)(fOutput->FindObject("hCandidateSelection")))->Fill(10); | |
724 | if (!onFlyV0) { | |
725 | nSelectedAnal++; | |
726 | ((TH1I*)(fOutput->FindObject("hCandidateSelection")))->Fill(11); | |
727 | } | |
728 | } | |
992ba7d8 | 729 | |
0dbd1d4f | 730 | if ( !onFlyV0 ) { |
992ba7d8 | 731 | |
0dbd1d4f | 732 | ((TH1I*)(fOutput->FindObject("hSwitchOnCandidates0")))->Fill( cutsAnal->IsSelected(part,AliRDHFCuts::kCandidate) ); |
992ba7d8 | 733 | |
0dbd1d4f | 734 | if ( (((cutsAnal->IsSelected(part,AliRDHFCuts::kTracks))&(AliRDHFCutsLctoV0::kLcToK0Spr))==(AliRDHFCutsLctoV0::kLcToK0Spr)) ) |
735 | ((TH1I*)(fOutput->FindObject("hSwitchOnCandidates1")))->Fill( cutsAnal->IsSelected(part,AliRDHFCuts::kCandidate) ); | |
992ba7d8 | 736 | |
0dbd1d4f | 737 | if ( (((cutsAnal->IsSelected(part,AliRDHFCuts::kCandidate))&(AliRDHFCutsLctoV0::kLcToK0Spr))==(AliRDHFCutsLctoV0::kLcToK0Spr)) ) |
738 | ((TH1I*)(fOutput->FindObject("hSwitchOnCandidates2")))->Fill( cutsAnal->IsSelected(part,AliRDHFCuts::kCandidate) ); | |
992ba7d8 | 739 | |
0dbd1d4f | 740 | if ( (((cutsAnal->IsSelected(part,AliRDHFCuts::kPID))&(AliRDHFCutsLctoV0::kLcToK0Spr))==(AliRDHFCutsLctoV0::kLcToK0Spr)) ) |
741 | ((TH1I*)(fOutput->FindObject("hSwitchOnCandidates3")))->Fill( cutsAnal->IsSelected(part,AliRDHFCuts::kPID) ); | |
742 | ||
743 | if ( (((cutsAnal->IsSelected(part,AliRDHFCuts::kAll))&(AliRDHFCutsLctoV0::kLcToK0Spr))==(AliRDHFCutsLctoV0::kLcToK0Spr)) ) | |
744 | ((TH1I*)(fOutput->FindObject("hSwitchOnCandidates4")))->Fill( cutsAnal->IsSelected(part,AliRDHFCuts::kAll) ); | |
745 | ||
746 | } | |
747 | ||
748 | if (onFlyV0 && fUseOnTheFlyV0) { | |
992ba7d8 | 749 | |
750 | fillthis="histK0SMass"; | |
751 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(invmassK0s,ptK0s); | |
752 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(invmassK0s,ptK0s); | |
753 | ||
754 | if (isInV0window) { | |
0dbd1d4f | 755 | |
756 | fillthis="histpK0Svsp"; | |
757 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(momBach,momK0s); | |
758 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(momBach,momK0s); | |
759 | ||
760 | fillthis="histcosOAK0Spvsp"; | |
761 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(cosOAK0Sp,lambdacpt); | |
762 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(cosOAK0Sp,lambdacpt); | |
763 | ||
764 | fillthis="histoDCAtoPVvsinvmassK0s"; | |
765 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(invmassK0s,dcaV0); | |
766 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(invmassK0s,dcaV0); | |
767 | ||
768 | fillthis="histArmPodK0s"; | |
769 | FillArmPodDistribution(v0part,fillthis,fOutputAll); | |
770 | if (isBachelorID) FillArmPodDistribution(v0part,fillthis,fOutputPIDBach); | |
771 | ||
992ba7d8 | 772 | fillthis="histLcMassByK0S"; |
773 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(invmassLc,lambdacpt); | |
774 | if (isBachelorID)((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(invmassLc,lambdacpt); | |
775 | ||
0dbd1d4f | 776 | } |
992ba7d8 | 777 | } |
0dbd1d4f | 778 | else if (!onFlyV0) { |
992ba7d8 | 779 | |
780 | fillthis="histK0SMassOffline"; | |
781 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(invmassK0s,ptK0s); | |
782 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(invmassK0s,ptK0s); | |
783 | ||
784 | if (isInV0window) { | |
0dbd1d4f | 785 | |
786 | fillthis="histpK0SvspOffline"; | |
787 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(momBach,momK0s); | |
788 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(momBach,momK0s); | |
789 | ||
790 | fillthis="histcosOAK0SpvspOffline"; | |
791 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(cosOAK0Sp,lambdacpt); | |
792 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(cosOAK0Sp,lambdacpt); | |
793 | ||
794 | fillthis="histoDCAtoPVvsinvmassK0sOffline"; | |
795 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(invmassK0s,dcaV0); | |
796 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(invmassK0s,dcaV0); | |
797 | ||
798 | fillthis="histOfflineArmPodK0s"; | |
799 | FillArmPodDistribution(v0part,fillthis,fOutputAll); | |
800 | if (isBachelorID) FillArmPodDistribution(v0part,fillthis,fOutputPIDBach); | |
801 | ||
992ba7d8 | 802 | fillthis="histLcMassOfflineByK0S"; |
803 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(invmassLc,lambdacpt); | |
804 | if (isBachelorID)((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(invmassLc,lambdacpt); | |
0dbd1d4f | 805 | |
806 | if (fIsEventSelected) { | |
807 | fillthis="hist1LcMassOfflineByK0S"; | |
808 | if (isBachelorID) ((TH2F*)(fOutput->FindObject(fillthis)))->Fill(invmassLc,lambdacpt); | |
809 | } else { | |
810 | fillthis="hist0LcMassOfflineByK0S"; | |
811 | if (isBachelorID) ((TH2F*)(fOutput->FindObject(fillthis)))->Fill(invmassLc,lambdacpt); | |
812 | } | |
992ba7d8 | 813 | |
992ba7d8 | 814 | } |
815 | } | |
816 | ||
817 | ||
818 | if (fUseMCInfo) { | |
819 | if (isLc==1) { | |
0dbd1d4f | 820 | if (onFlyV0 && fUseOnTheFlyV0) { |
992ba7d8 | 821 | |
822 | fillthis="histK0SMassSgn"; | |
823 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(invmassK0s,ptK0s); | |
824 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(invmassK0s,ptK0s); | |
825 | ||
826 | if (isInV0window) { | |
0dbd1d4f | 827 | |
828 | fillthis="histpK0SvspSgn"; | |
829 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(momBach,momK0s); | |
830 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(momBach,momK0s); | |
831 | ||
832 | fillthis="histcosOAK0SpSgnvsp"; | |
833 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(cosOAK0Sp,lambdacpt); | |
834 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(cosOAK0Sp,lambdacpt); | |
835 | ||
836 | fillthis="histoDCAtoPVvsinvmassK0sSgn"; | |
837 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(invmassK0s,dcaV0); | |
838 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(invmassK0s,dcaV0); | |
992ba7d8 | 839 | |
840 | fillthis="histArmPodK0sSgn"; | |
841 | FillArmPodDistribution(v0part,fillthis,fOutputAll); | |
842 | if (isBachelorID) FillArmPodDistribution(v0part,fillthis,fOutputPIDBach); | |
0dbd1d4f | 843 | |
844 | fillthis="histLcMassByK0SSgn"; | |
845 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(invmassLc,lambdacpt); | |
846 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(invmassLc,lambdacpt); | |
847 | ||
992ba7d8 | 848 | } |
849 | ||
850 | } | |
0dbd1d4f | 851 | else if (!onFlyV0) { |
992ba7d8 | 852 | |
992ba7d8 | 853 | fillthis="histK0SMassOfflineSgn"; |
854 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(invmassK0s,ptK0s); | |
855 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(invmassK0s,ptK0s); | |
856 | ||
0dbd1d4f | 857 | if (isInV0window) { |
858 | ||
859 | fillthis="histpK0SvspOfflineSgn"; | |
860 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(momBach,momK0s); | |
861 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(momBach,momK0s); | |
862 | ||
863 | fillthis="histcosOAK0SpSgnvspOffline"; | |
864 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(cosOAK0Sp,lambdacpt); | |
865 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(cosOAK0Sp,lambdacpt); | |
866 | ||
867 | fillthis="histoDCAtoPVvsinvmassK0sOfflineSgn"; | |
868 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(invmassK0s,dcaV0); | |
869 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(invmassK0s,dcaV0); | |
870 | ||
871 | fillthis="histOfflineArmPodK0sSgn"; | |
872 | FillArmPodDistribution(v0part,fillthis,fOutputAll); | |
873 | if (isBachelorID) FillArmPodDistribution(v0part,fillthis,fOutputPIDBach); | |
992ba7d8 | 874 | |
992ba7d8 | 875 | fillthis="histLcMassOfflineByK0SSgn"; |
876 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(invmassLc,lambdacpt); | |
877 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(invmassLc,lambdacpt); | |
878 | ||
992ba7d8 | 879 | } |
880 | ||
881 | } | |
882 | ||
883 | }// sgn | |
884 | else { // bkg | |
0dbd1d4f | 885 | if (onFlyV0 && fUseOnTheFlyV0) { |
992ba7d8 | 886 | |
887 | fillthis="histK0SMassBkg"; | |
888 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(invmassK0s,ptK0s); | |
889 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(invmassK0s,ptK0s); | |
890 | ||
891 | if (isInV0window) { | |
0dbd1d4f | 892 | |
893 | fillthis="histpK0SvspBkg"; | |
894 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(momBach,momK0s); | |
895 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(momBach,momK0s); | |
896 | ||
897 | fillthis="histcosOAK0SpBkgvsp"; | |
898 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(cosOAK0Sp,lambdacpt); | |
899 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(cosOAK0Sp,lambdacpt); | |
900 | ||
901 | fillthis="histoDCAtoPVvsinvmassK0sBkg"; | |
902 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(invmassK0s,dcaV0); | |
903 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(invmassK0s,dcaV0); | |
904 | ||
905 | fillthis="histArmPodK0sBkg"; | |
906 | FillArmPodDistribution(v0part,fillthis,fOutputAll); | |
907 | if (isBachelorID) FillArmPodDistribution(v0part,fillthis,fOutputPIDBach); | |
908 | ||
992ba7d8 | 909 | fillthis="histLcMassByK0SBkg"; |
910 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(invmassLc,lambdacpt); | |
911 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(invmassLc,lambdacpt); | |
912 | ||
992ba7d8 | 913 | } |
914 | ||
915 | } | |
0dbd1d4f | 916 | else if (!onFlyV0) { |
992ba7d8 | 917 | |
918 | fillthis="histK0SMassOfflineBkg"; | |
919 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(invmassK0s,ptK0s); | |
920 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(invmassK0s,ptK0s); | |
921 | ||
922 | if (isInV0window) { | |
0dbd1d4f | 923 | |
924 | fillthis="histpK0SvspOfflineBkg"; | |
925 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(momBach,momK0s); | |
926 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(momBach,momK0s); | |
927 | ||
928 | fillthis="histcosOAK0SpBkgvspOffline"; | |
929 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(cosOAK0Sp,lambdacpt); | |
930 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(cosOAK0Sp,lambdacpt); | |
931 | ||
932 | fillthis="histoDCAtoPVvsinvmassK0sOfflineBkg"; | |
933 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(invmassK0s,dcaV0); | |
934 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(invmassK0s,dcaV0); | |
935 | ||
936 | fillthis="histOfflineArmPodK0sBkg"; | |
937 | FillArmPodDistribution(v0part,fillthis,fOutputAll); | |
938 | if (isBachelorID) FillArmPodDistribution(v0part,fillthis,fOutputPIDBach); | |
939 | ||
992ba7d8 | 940 | fillthis="histLcMassOfflineByK0SBkg"; |
941 | ((TH2F*)(fOutputAll->FindObject(fillthis)))->Fill(invmassLc,lambdacpt); | |
942 | if (isBachelorID) ((TH2F*)(fOutputPIDBach->FindObject(fillthis)))->Fill(invmassLc,lambdacpt); | |
943 | ||
992ba7d8 | 944 | } |
0dbd1d4f | 945 | |
946 | } | |
947 | ||
992ba7d8 | 948 | } |
949 | } // if fUseMCInfo | |
950 | ||
951 | return; | |
952 | } | |
953 | //------------------------------------------------------------------------------- | |
954 | Int_t AliAnalysisTaskSELc2V0bachelor::CheckOrigin(TClonesArray* arrayMC, AliAODMCParticle *mcPartCandidate) const { | |
955 | // | |
956 | // checking whether the mother of the particles come from a charm or a bottom quark | |
957 | // | |
958 | ||
959 | Int_t pdgGranma = 0; | |
960 | Int_t abspdgGranma =0; | |
961 | Bool_t isFromB=kFALSE; | |
962 | Bool_t isQuarkFound=kFALSE; | |
963 | Int_t mother = mcPartCandidate->GetMother(); | |
964 | Int_t istep = 0; | |
965 | while (mother>0) { | |
966 | istep++; | |
967 | AliAODMCParticle* mcGranma = dynamic_cast<AliAODMCParticle*>(arrayMC->At(mother)); | |
968 | if (mcGranma) { | |
969 | pdgGranma = mcGranma->GetPdgCode(); | |
970 | abspdgGranma = TMath::Abs(pdgGranma); | |
971 | if ( (abspdgGranma > 500 && abspdgGranma < 600 ) || | |
972 | (abspdgGranma > 5000 && abspdgGranma < 6000) ) isFromB=kTRUE; | |
973 | else if (abspdgGranma==4 || abspdgGranma==5) isQuarkFound=kTRUE; | |
974 | mother = mcGranma->GetMother(); | |
975 | } else { | |
976 | AliError("Failed casting the mother particle!"); | |
977 | break; | |
978 | } | |
979 | } | |
980 | ||
981 | if (isFromB) return 5; | |
982 | else return 4; | |
983 | ||
984 | } | |
985 | ||
986 | //------------------------------------------------------------------------------- | |
987 | void AliAnalysisTaskSELc2V0bachelor::MakeAnalysisForLc2prK0S(AliAODVertex */*vtx1*/, | |
988 | TClonesArray *arrayLctopKos, | |
989 | TClonesArray *mcArray, | |
990 | Int_t &nSelectedProd, | |
991 | AliRDHFCutsLctoV0 *cutsProd, | |
992 | Int_t &nSelectedAnal, | |
993 | AliRDHFCutsLctoV0 *cutsAnal) | |
994 | { | |
995 | ||
996 | // counters for efficiencies | |
997 | Int_t icountReco = 0; | |
998 | ||
999 | //Lc prong needed to MatchToMC method | |
1000 | ||
e7af8919 | 1001 | Int_t pdgCand = 4122; |
1002 | Int_t pdgDgLctoV0bachelorOld[2]={2212,310}; | |
1003 | Int_t pdgDgLctoV0bachelor[2]={310,2212}; | |
1004 | Int_t pdgDgV0toDaughters[2]={211,211}; | |
992ba7d8 | 1005 | |
1006 | // loop over cascades to search for candidates Lc->p+K0S | |
1007 | Int_t nCascades= arrayLctopKos->GetEntriesFast(); | |
0dbd1d4f | 1008 | if (nCascades==0) { |
1009 | AliInfo("Could not find cascades, skipping the event"); | |
1010 | return; | |
1011 | } | |
992ba7d8 | 1012 | for (Int_t iLctopK0s = 0; iLctopK0s<nCascades; iLctopK0s++) { |
1013 | ||
0dbd1d4f | 1014 | ((TH1I*)(fOutput->FindObject("hCandidateSelection")))->Fill(0); |
1015 | ||
992ba7d8 | 1016 | // Lc candidates and K0s from Lc |
1017 | AliAODRecoCascadeHF* lcK0spr = (AliAODRecoCascadeHF*)arrayLctopKos->At(iLctopK0s); | |
1018 | if (!lcK0spr->GetSecondaryVtx()) { | |
1019 | AliInfo("No secondary vertex"); | |
1020 | continue; | |
1021 | } | |
1022 | ||
0dbd1d4f | 1023 | ((TH1I*)(fOutput->FindObject("hCandidateSelection")))->Fill(1); |
1024 | ||
992ba7d8 | 1025 | AliAODTrack * v0Pos = lcK0spr->Getv0PositiveTrack(); |
1026 | AliAODTrack * v0Neg = lcK0spr->Getv0NegativeTrack(); | |
1027 | if (v0Pos->Charge() == v0Neg->Charge()) continue; | |
1028 | ||
0dbd1d4f | 1029 | ((TH1I*)(fOutput->FindObject("hCandidateSelection")))->Fill(2); |
1030 | ||
992ba7d8 | 1031 | Int_t isLc = 0; |
1032 | ||
1033 | if (fUseMCInfo) { | |
1034 | ||
1035 | Bool_t isPrimary=kTRUE; | |
1036 | ||
1037 | Int_t pdgCode=-2; | |
1038 | ||
1039 | // find associated MC particle for Lc -> p+K0 and K0S->pi+pi | |
e7af8919 | 1040 | Int_t mcLabelOld = MatchToMC(lcK0spr,pdgDgLctoV0bachelorOld,pdgDgV0toDaughters,mcArray); |
1041 | Int_t mcLabel = lcK0spr->MatchToMC(pdgCand,pdgDgLctoV0bachelor[0],pdgDgLctoV0bachelor,pdgDgV0toDaughters,mcArray,kTRUE); | |
1042 | if (mcLabelOld!=mcLabel) AliInfo(Form(" Changed MC label: oldONE=%d wrt rightONE=%d",mcLabelOld,mcLabel)); | |
992ba7d8 | 1043 | if (mcLabel>=0) { |
1044 | AliInfo(Form(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~cascade numero %d di %d", iLctopK0s,nCascades)); | |
1045 | ||
1046 | AliAODMCParticle *partLc = (AliAODMCParticle*)mcArray->At(mcLabel); | |
1047 | Int_t checkOrigin = CheckOrigin(mcArray,partLc); | |
1048 | if (checkOrigin==5) isPrimary=kFALSE; | |
1049 | ||
1050 | pdgCode = partLc->GetPdgCode(); | |
1051 | if (pdgCode<0) AliInfo(Form(" ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ %d ~~~~~~~~~~ %d", mcLabel, pdgCode)); | |
1052 | pdgCode = TMath::Abs(pdgCode); | |
1053 | isLc = 1; | |
1054 | } else { | |
1055 | pdgCode=-1; | |
1056 | } | |
1057 | } | |
1058 | ||
0dbd1d4f | 1059 | if ( !( ( (cutsProd->IsSelected(lcK0spr,AliRDHFCuts::kTracks))&(AliRDHFCutsLctoV0::kLcToK0Spr)) == (AliRDHFCutsLctoV0::kLcToK0Spr) ) ) continue; |
1060 | ((TH1I*)(fOutput->FindObject("hCandidateSelection")))->Fill(3); | |
992ba7d8 | 1061 | |
1062 | FillLc2pK0Sspectrum(lcK0spr, isLc, | |
1063 | nSelectedProd, cutsProd, | |
1064 | nSelectedAnal, cutsAnal); | |
1065 | ||
1066 | } | |
1067 | ||
1068 | AliDebug(2, Form("Found %d Reco particles that are Lc!!", icountReco)); | |
1069 | ||
1070 | } | |
1071 | //------------------------------------------------------------------------------- | |
1072 | Int_t AliAnalysisTaskSELc2V0bachelor::MatchToMC(AliAODRecoCascadeHF *lc2bacV0, | |
1073 | Int_t *pdgDgLc2bacV0, Int_t *pdgDgV0, | |
1074 | TClonesArray *mcArray) | |
1075 | { | |
1076 | ||
1077 | // bachelor | |
1078 | AliAODTrack *bachelor = (AliAODTrack*)lc2bacV0->GetBachelor(); | |
1079 | Int_t labBachelor = bachelor->GetLabel(); | |
1080 | if (labBachelor<0) return -1; | |
1081 | AliAODMCParticle *partBachelor = (AliAODMCParticle*)mcArray->At(labBachelor); | |
1082 | if (TMath::Abs(partBachelor->GetPdgCode())!=pdgDgLc2bacV0[0]) return -1; | |
1083 | ||
1084 | Int_t labBacMother = partBachelor->GetMother(); | |
1085 | if (labBacMother<0) return -1; | |
1086 | AliAODMCParticle *partBacMother = (AliAODMCParticle*)mcArray->At(labBacMother); | |
1087 | if (TMath::Abs(partBacMother->GetPdgCode())!=4122) return -1; | |
1088 | ||
1089 | // V0 | |
1090 | AliAODTrack *posV0Daugh = (AliAODTrack*)lc2bacV0->Getv0PositiveTrack(); | |
1091 | AliAODTrack *negV0Daugh = (AliAODTrack*)lc2bacV0->Getv0NegativeTrack(); | |
1092 | Int_t labV0pos = posV0Daugh->GetLabel(); | |
1093 | Int_t labV0neg = negV0Daugh->GetLabel(); | |
1094 | ||
1095 | if (labV0pos<0 || labV0neg<0) return -1; | |
1096 | AliAODMCParticle *partV0pos = (AliAODMCParticle*)mcArray->At(labV0neg); | |
1097 | AliAODMCParticle *partV0neg = (AliAODMCParticle*)mcArray->At(labV0pos); | |
1098 | ||
1099 | if ( ! ( (TMath::Abs(partV0pos->GetPdgCode())==pdgDgV0[0] && | |
1100 | TMath::Abs(partV0neg->GetPdgCode())==pdgDgV0[1]) || | |
1101 | (TMath::Abs(partV0pos->GetPdgCode())==pdgDgV0[1] && | |
1102 | TMath::Abs(partV0neg->GetPdgCode())==pdgDgV0[0]) ) ) return -1; | |
1103 | Int_t labV0posMother = partV0pos->GetMother(); | |
1104 | Int_t labV0negMother = partV0neg->GetMother(); | |
1105 | ||
1106 | if (labV0posMother<0 || labV0negMother<0) return -1; | |
1107 | if (labV0posMother!=labV0negMother) return -1; | |
1108 | ||
1109 | AliAODMCParticle *motherV0 = (AliAODMCParticle*)mcArray->At(labV0posMother); | |
1110 | ||
1111 | if (TMath::Abs(motherV0->GetPdgCode())!=pdgDgLc2bacV0[1]) return -1; | |
1112 | Int_t labV0mother = motherV0->GetMother(); | |
1113 | if (labV0mother<0) return -1; | |
1114 | AliAODMCParticle *gMotherV0 = (AliAODMCParticle*)mcArray->At(labV0mother); | |
1115 | ||
1116 | if ( !(pdgDgLc2bacV0[1]==310 && TMath::Abs(gMotherV0->GetPdgCode())==311) && | |
1117 | !(pdgDgLc2bacV0[1]==3122 && TMath::Abs(motherV0->GetPdgCode())==3122) ) return -1; | |
1118 | ||
1119 | if ( (pdgDgLc2bacV0[1]==310 && TMath::Abs(gMotherV0->GetPdgCode())==311) ) { | |
1120 | Int_t labV0GMother = gMotherV0->GetMother(); | |
1121 | if (labV0GMother<0) return -1; | |
1122 | AliAODMCParticle *ggMotherV0 = (AliAODMCParticle*)mcArray->At(labV0GMother); | |
1123 | ||
1124 | if (TMath::Abs(ggMotherV0->GetPdgCode())!=4122) return -1; | |
1125 | gMotherV0 = (AliAODMCParticle*)ggMotherV0; | |
1126 | labV0mother=labV0GMother; | |
1127 | } | |
1128 | else if (pdgDgLc2bacV0[1]==3122 && TMath::Abs(motherV0->GetPdgCode())==3122) { | |
1129 | if (TMath::Abs(gMotherV0->GetPdgCode())!=4122) return -1; | |
1130 | } | |
1131 | ||
1132 | if (labBacMother!=labV0mother) { | |
1133 | AliInfo(Form("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++A - %d %d", | |
1134 | labBacMother, labV0mother)); | |
1135 | return -1; | |
1136 | } | |
1137 | ||
1138 | AliInfo(Form(" V0: %d (%d) -> %d (%d) + %d (%d) --- GM %d (PDG=%d)", | |
1139 | motherV0->GetPdgCode(), labV0posMother, | |
1140 | partV0pos->GetPdgCode(), labV0pos, | |
1141 | partV0neg->GetPdgCode(), labV0neg, | |
1142 | labV0mother, gMotherV0->GetPdgCode())); | |
1143 | ||
1144 | AliInfo(Form(" Bachelor: %d (%d) --- M %d (%d)", | |
1145 | partBachelor->GetPdgCode(), labBachelor, | |
1146 | labBacMother, partBacMother->GetPdgCode())); | |
1147 | return labBacMother;//labV0mother;// | |
1148 | ||
1149 | } | |
1150 | ||
1151 | //----------------------- | |
1152 | void AliAnalysisTaskSELc2V0bachelor::SearchLcDaughter(TClonesArray *arrayMC) | |
1153 | { | |
1154 | ||
e7af8919 | 1155 | AliAODMCParticle *searchLc=0; |
1156 | AliAODMCParticle *daugh=0; | |
1157 | AliAODMCParticle *daugh1=0; | |
1158 | AliAODMCParticle *daugh2=0; | |
1159 | AliAODMCParticle *daughK0=0; | |
1160 | AliAODMCParticle *daughK0s1=0; | |
1161 | AliAODMCParticle *daughK0s2=0; | |
1162 | AliAODMCParticle *daughL1=0; | |
1163 | AliAODMCParticle *daughL2=0; | |
992ba7d8 | 1164 | |
e7af8919 | 1165 | Int_t nDaughLc=0; |
992ba7d8 | 1166 | Int_t nDaughK0=0; |
1167 | Int_t nDaughK0s=0; | |
1168 | Int_t searchLcpdg=0; | |
1169 | Int_t daughPdg1=0; | |
1170 | Int_t daughPdg2=0; | |
1171 | Int_t daughK0Pdg=0; | |
1172 | Int_t nDaughL=0; | |
1173 | Int_t daughK0s1pdg; | |
1174 | Int_t daughK0s2pdg; | |
1175 | Int_t daughL1pdg=0; | |
1176 | Int_t daughL2pdg=0; | |
1177 | ||
1178 | TString fillthis=""; | |
1179 | fillthis="histMcStatLc"; | |
1180 | ||
1181 | for (Int_t iii=0; iii<arrayMC->GetEntries(); iii++) { | |
1182 | searchLc = (AliAODMCParticle*)arrayMC->At(iii); | |
1183 | searchLcpdg = searchLc->GetPdgCode(); | |
1184 | if (TMath::Abs(searchLcpdg) == 4122) { | |
1185 | ((TH1F*)(fOutput->FindObject(fillthis)))->Fill(0); | |
1186 | nDaughLc= searchLc->GetNDaughters(); | |
1187 | ||
1188 | if (searchLcpdg == 4122) { // It is Lc+ | |
1189 | ((TH1F*)(fOutput->FindObject(fillthis)))->Fill(1); | |
1190 | if (nDaughLc!=2) continue; | |
1191 | daugh1 = (AliAODMCParticle*)arrayMC->At(searchLc->GetDaughter(0)); | |
1192 | daughPdg1=daugh1->GetPdgCode(); | |
1193 | daugh2 = (AliAODMCParticle*)arrayMC->At(searchLc->GetDaughter(1)); | |
1194 | daughPdg2=daugh2->GetPdgCode(); | |
1195 | if ( (daughPdg1==2212 && daughPdg2==-311) || | |
1196 | (daughPdg2==2212 && daughPdg1==-311) ) { // Lc+ -> p K0bar | |
e7af8919 | 1197 | AliInfo(Form(" Ecco %d(%d) -> %d(%d) %d(%d)", |
1198 | iii,searchLcpdg, | |
1199 | searchLc->GetDaughter(0),daughPdg1, | |
1200 | searchLc->GetDaughter(1),daughPdg2)); | |
992ba7d8 | 1201 | ((TH1F*)(fOutput->FindObject(fillthis)))->Fill(2); |
1202 | if (daughPdg1==-311) { | |
992ba7d8 | 1203 | nDaughK0=daugh1->GetNDaughters(); |
e7af8919 | 1204 | if (nDaughK0!=1) { |
1205 | ((TH1F*)(fOutput->FindObject(fillthis)))->Fill(4); | |
1206 | continue; | |
1207 | } else { | |
1208 | daughK0 = (AliAODMCParticle*)arrayMC->At(daugh1->GetDaughter(0)); // K0S | |
1209 | } | |
1210 | } else { | |
1211 | nDaughK0=daugh2->GetNDaughters(); | |
1212 | if (nDaughK0!=1) { | |
1213 | ((TH1F*)(fOutput->FindObject(fillthis)))->Fill(4); | |
1214 | continue; | |
1215 | } else { | |
1216 | daughK0 = (AliAODMCParticle*)arrayMC->At(daugh2->GetDaughter(0)); // K0S | |
1217 | } | |
992ba7d8 | 1218 | } |
e7af8919 | 1219 | if (!daughK0) { |
1220 | //((TH1F*)(fOutput->FindObject(fillthis)))->Fill(4); | |
1221 | continue; | |
992ba7d8 | 1222 | } |
e7af8919 | 1223 | //cout << " positive daughK0 = " << daughK0 << endl; |
1224 | AliInfo(" Found positive daughK0 "); | |
1225 | daughK0Pdg=daughK0->GetPdgCode(); | |
1226 | if (daughK0Pdg!=310) { | |
1227 | ((TH1F*)(fOutput->FindObject(fillthis)))->Fill(4); | |
1228 | continue; | |
1229 | } else { | |
1230 | ((TH1F*)(fOutput->FindObject(fillthis)))->Fill(3); | |
1231 | nDaughK0s=daughK0->GetNDaughters(); | |
1232 | if (nDaughK0s!=2) { | |
1233 | ((TH1F*)(fOutput->FindObject(fillthis)))->Fill(6); | |
1234 | continue; | |
1235 | } | |
1236 | daughK0s1= (AliAODMCParticle*)arrayMC->At(daughK0->GetDaughter(0)); | |
1237 | daughK0s2= (AliAODMCParticle*)arrayMC->At(daughK0->GetDaughter(1)); | |
1238 | daughK0s1pdg=daughK0s1->GetPdgCode(); | |
1239 | daughK0s2pdg=daughK0s2->GetPdgCode(); | |
1240 | ||
1241 | if ( ((daughK0s1pdg==211) && (daughK0s2pdg==-211)) || | |
1242 | ((daughK0s2pdg==211) && (daughK0s1pdg==-211)) ) ((TH1F*)(fOutput->FindObject(fillthis)))->Fill(5); | |
1243 | else ((TH1F*)(fOutput->FindObject(fillthis)))->Fill(6); | |
1244 | } // else if (daughK0Pdg==310) | |
1245 | }//if ((daughPdg1==2212 && daughPdg2==-311)||(daughPdg2==2212 && daughPdg1==-311)) | |
992ba7d8 | 1246 | |
1247 | else if ( (daughPdg1==3122 && daughPdg2==211) || | |
1248 | (daughPdg2==3122 && daughPdg1==211) ) { // Lc+ -> pi+ Lambda | |
e7af8919 | 1249 | AliInfo(Form(" Ecco %d(%d) -> %d(%d) %d(%d)", |
1250 | iii,searchLcpdg, | |
1251 | searchLc->GetDaughter(0),daughPdg1, | |
1252 | searchLc->GetDaughter(1),daughPdg2)); | |
992ba7d8 | 1253 | ((TH1F*)(fOutput->FindObject(fillthis)))->Fill(7); |
e7af8919 | 1254 | if (daughPdg1==3122) |
1255 | daugh = (AliAODMCParticle*)arrayMC->At(searchLc->GetDaughter(0)); // Lambda | |
1256 | else | |
1257 | daugh = (AliAODMCParticle*)arrayMC->At(searchLc->GetDaughter(1)); // Lambda | |
1258 | if (!daugh) continue; | |
1259 | //cout << " positive daughL = " << daugh << endl; | |
1260 | AliInfo(" Found positive daughL "); | |
992ba7d8 | 1261 | nDaughL=daugh->GetNDaughters(); |
1262 | if (nDaughL==2) { | |
1263 | daughL1= (AliAODMCParticle*)arrayMC->At(daugh->GetDaughter(0)); | |
1264 | daughL2= (AliAODMCParticle*)arrayMC->At(daugh->GetDaughter(1)); | |
1265 | daughL1pdg=daughL1->GetPdgCode(); | |
1266 | daughL2pdg=daughL2->GetPdgCode(); | |
1267 | if ( ((daughL1pdg==-211) && (daughL2pdg==2212)) || | |
e7af8919 | 1268 | ((daughL2pdg==-211) && (daughL1pdg==2212)) ) ((TH1F*)(fOutput->FindObject(fillthis)))->Fill(8); |
992ba7d8 | 1269 | else ((TH1F*)(fOutput->FindObject(fillthis)))->Fill(9); |
1270 | }//if (nDaughL==2) | |
1271 | else ((TH1F*)(fOutput->FindObject(fillthis)))->Fill(9); | |
1272 | }//else if ((daughPdg1==3122 && daughPdg2==211)||(daughPdg2==3122 && daughPdg1==211)) | |
1273 | ||
1274 | ||
1275 | ||
1276 | }//if (searchLcpdg == 4122) | |
1277 | ||
1278 | if (searchLcpdg == -4122) { // It is Lc+ | |
1279 | ((TH1F*)(fOutput->FindObject(fillthis)))->Fill(-1); | |
992ba7d8 | 1280 | if (nDaughLc!=2) continue; |
1281 | daugh1 = (AliAODMCParticle*)arrayMC->At(searchLc->GetDaughter(0)); | |
1282 | daughPdg1=daugh1->GetPdgCode(); | |
1283 | daugh2 = (AliAODMCParticle*)arrayMC->At(searchLc->GetDaughter(1)); | |
1284 | daughPdg2=daugh2->GetPdgCode(); | |
1285 | if ( (daughPdg1==-2212 && daughPdg2==311) || | |
1286 | (daughPdg2==-2212 && daughPdg1==311) ) { // Lc- -> pbar K0 | |
1287 | ((TH1F*)(fOutput->FindObject(fillthis)))->Fill(-2); | |
e7af8919 | 1288 | AliInfo(Form(" Ecco %d(%d) -> %d(%d) %d(%d)", |
1289 | iii,searchLcpdg, | |
1290 | searchLc->GetDaughter(0),daughPdg1, | |
1291 | searchLc->GetDaughter(1),daughPdg2)); | |
992ba7d8 | 1292 | if (daughPdg1==311) { |
992ba7d8 | 1293 | nDaughK0=daugh1->GetNDaughters(); |
e7af8919 | 1294 | if (nDaughK0!=1) { |
1295 | ((TH1F*)(fOutput->FindObject(fillthis)))->Fill(-4); | |
1296 | continue; | |
1297 | } else { | |
1298 | daughK0 = (AliAODMCParticle*)arrayMC->At(daugh1->GetDaughter(0)); | |
1299 | } | |
1300 | } else { | |
1301 | nDaughK0=daugh2->GetNDaughters(); | |
1302 | if (nDaughK0!=1) { | |
1303 | ((TH1F*)(fOutput->FindObject(fillthis)))->Fill(-4); | |
1304 | continue; | |
1305 | } else { | |
1306 | daughK0 = (AliAODMCParticle*)arrayMC->At(daugh2->GetDaughter(0)); | |
1307 | } | |
1308 | } | |
1309 | if (!daughK0) { | |
1310 | //((TH1F*)(fOutput->FindObject(fillthis)))->Fill(4); | |
1311 | continue; | |
992ba7d8 | 1312 | } |
e7af8919 | 1313 | //cout << " negative daughK0 = " << daughK0 << endl; |
1314 | AliInfo(" Found negative daughK0 "); | |
1315 | daughK0Pdg=daughK0->GetPdgCode(); | |
1316 | if (daughK0Pdg!=310) { | |
1317 | ((TH1F*)(fOutput->FindObject(fillthis)))->Fill(-4); | |
1318 | continue; | |
1319 | } else { | |
1320 | ((TH1F*)(fOutput->FindObject(fillthis)))->Fill(-3); | |
1321 | nDaughK0s=daughK0->GetNDaughters(); | |
1322 | if (nDaughK0s!=2) { | |
1323 | ((TH1F*)(fOutput->FindObject(fillthis)))->Fill(-6); | |
1324 | continue; | |
1325 | } | |
1326 | daughK0s1= (AliAODMCParticle*)arrayMC->At(daughK0->GetDaughter(0)); | |
1327 | daughK0s2= (AliAODMCParticle*)arrayMC->At(daughK0->GetDaughter(1)); | |
1328 | daughK0s1pdg=daughK0s1->GetPdgCode(); | |
1329 | daughK0s2pdg=daughK0s2->GetPdgCode(); | |
1330 | if ( ((daughK0s1pdg==211) && (daughK0s2pdg==-211)) || | |
1331 | ((daughK0s2pdg==211) && (daughK0s1pdg==-211)) ) ((TH1F*)(fOutput->FindObject(fillthis)))->Fill(-5); | |
1332 | else ((TH1F*)(fOutput->FindObject(fillthis)))->Fill(-6); | |
1333 | } // else if (daughK0Pdg==310) | |
992ba7d8 | 1334 | }//if ((daughPdg1==-2212 && daughPdg2==-311)||(daughPdg2==-2212 && daughPdg1==-311)) |
1335 | ||
e7af8919 | 1336 | else if ( (daughPdg1==-3122 && daughPdg2==-211) || |
1337 | (daughPdg2==-3122 && daughPdg1==-211) ) { | |
1338 | AliInfo(Form(" Ecco %d(%d) -> %d(%d) %d(%d)", | |
1339 | iii,searchLcpdg, | |
1340 | searchLc->GetDaughter(0),daughPdg1, | |
1341 | searchLc->GetDaughter(1),daughPdg2)); | |
992ba7d8 | 1342 | ((TH1F*)(fOutput->FindObject(fillthis)))->Fill(-7); |
e7af8919 | 1343 | if (daughPdg1==-3122) |
1344 | daugh = (AliAODMCParticle*)arrayMC->At(searchLc->GetDaughter(0)); | |
1345 | else | |
1346 | daugh = (AliAODMCParticle*)arrayMC->At(searchLc->GetDaughter(1)); | |
1347 | if (!daugh) continue; | |
1348 | //cout << " negative daughL = " << daugh << endl; | |
1349 | AliInfo(" Found negative daughL "); | |
992ba7d8 | 1350 | nDaughL=daugh->GetNDaughters(); |
1351 | if (nDaughL==2) { | |
1352 | daughL1 = (AliAODMCParticle*)arrayMC->At(daugh->GetDaughter(0)); | |
1353 | daughL2 = (AliAODMCParticle*)arrayMC->At(daugh->GetDaughter(1)); | |
1354 | daughL1pdg=daughL1->GetPdgCode(); | |
1355 | daughL2pdg= daughL2->GetPdgCode(); | |
e7af8919 | 1356 | if ( ((daughL1pdg==211) && (daughL2pdg==-2212)) || |
1357 | ((daughL2pdg==211) && (daughL1pdg==-2212)) ) ((TH1F*)(fOutput->FindObject(fillthis)))->Fill(-8); | |
992ba7d8 | 1358 | else ((TH1F*)(fOutput->FindObject(fillthis)))->Fill(-9); |
1359 | }//if (nDaughL==2) | |
1360 | else ((TH1F*)(fOutput->FindObject(fillthis)))->Fill(-9); | |
1361 | }//else if ((daughPdg1==-3122 && daughPdg2==-211)||(daughPdg2==-3122 && daughPdg1==-211)) | |
1362 | ||
1363 | ||
1364 | } | |
1365 | }// if (TMath::Abs(searchLcpdg) == 4122) | |
1366 | }// for (Int_t iii=0; iii<arrayMC->GetEntries(); iii++) | |
1367 | ||
1368 | } | |
1369 | //---------------------------------------------------- | |
1370 | ||
1371 | void AliAnalysisTaskSELc2V0bachelor::FillArmPodDistribution(AliAODv0 *vZero, | |
1372 | TString histoTitle, | |
1373 | TList *histoList) { | |
1374 | ||
1375 | Double_t alpha = vZero->AlphaV0(); | |
1376 | Double_t qT = vZero->PtArmV0(); | |
1377 | ||
1378 | ((TH2F*)(histoList->FindObject(histoTitle)))->Fill(alpha,qT); | |
1379 | ||
1380 | } | |
1381 | //---------------------------------------------------- | |
1382 | ||
1383 | void AliAnalysisTaskSELc2V0bachelor::DefineK0SHistos() | |
1384 | { | |
1385 | ||
1386 | TString nameMass=" ", nameSgn=" ", nameBkg=" "; | |
1387 | ||
1388 | ///---------------- START K0S HISTOS DECLARATIONS -------------------/// | |
1389 | ||
0dbd1d4f | 1390 | if (fUseOnTheFlyV0) { |
1391 | ||
1392 | // V0 invariant masses (on-the-fly) | |
1393 | nameMass="histK0SMass"; | |
1394 | TH2F* spectrumK0SMass = new TH2F(nameMass.Data(),"K^{0}_{S} invariant mass VS p_{T}; M(K^{0}_{S}) [GeV/c^{2}]; p_{T}(K^{0}_{S}) [GeV/c]; Entries", | |
1395 | 520,0.43,0.56,200,0.,20.); | |
1396 | spectrumK0SMass->Sumw2(); | |
1397 | spectrumK0SMass->SetLineColor(6); | |
1398 | spectrumK0SMass->SetMarkerStyle(20); | |
1399 | spectrumK0SMass->SetMarkerSize(0.6); | |
1400 | spectrumK0SMass->SetMarkerColor(6); | |
1401 | ||
1402 | // Lc invariant masses (x K0S on-the-fly) | |
1403 | nameMass="histLcMassByK0S"; | |
1404 | TH2F* spectrumLcMassByK0S = new TH2F(nameMass.Data(),"#Lambda_{C} invariant mass (by K^{0}_{S}) vs p_{T} ; M(#Lambda_{C}) [GeV/c^{2}]; p_{T}", | |
1405 | 1000,2.,2.5,200,0.,20.); | |
1406 | spectrumLcMassByK0S->Sumw2(); | |
1407 | spectrumLcMassByK0S->SetLineColor(6); | |
1408 | spectrumLcMassByK0S->SetMarkerStyle(20); | |
1409 | spectrumLcMassByK0S->SetMarkerSize(0.6); | |
1410 | spectrumLcMassByK0S->SetMarkerColor(6); | |
1411 | ||
1412 | nameMass="histcosOAK0Spvsp"; | |
1413 | TH2F* cosOpeningAngleK0Spvsp = new TH2F(nameMass.Data(),"#Lambda_{C} : K^{0}_{S} - p Opening Angle vs p; Cos(Opening Angle) ; p ", | |
1414 | 200,-1.,1.,200,0.,20.); | |
1415 | ||
1416 | nameMass="histpK0Svsp"; | |
1417 | TH2F* momentumDistributionK0Svsp = new TH2F(nameMass.Data(),"#Lambda_{C} : K^{0}_{S} vs p Total Momentum Distribution; p_{p}; p_{K^{0}_{S}} ", | |
1418 | 200,0.,20.,200,0.,20.); | |
1419 | ||
1420 | nameMass="histArmPodK0s"; | |
1421 | TH2F* armenterosPodK0s = new TH2F(nameMass.Data(),"K^{0}_{S} Armenteros-Podolanski distribution; #frac{p_{L}^{+}-p_{L}^{-}}{p_{L}^{+}+p_{L}^{-}}; p_{T}^{+} [GeV/c]", | |
1422 | 200,-1.,1.,300,0.,0.3); | |
1423 | ||
1424 | nameMass="histoDCAtoPVvsinvmassK0s"; | |
1425 | TH2F *dcatoPVvspK0s = new TH2F(nameMass.Data(),"K^{0}_{S}: DCA to Primary Vertex vs K^{0}_{S} invariant mass ; M(K^{0}_{S}) [GeV/c^{2}]; DCA to Primary Vertex []; Entries", | |
1426 | 520,0.43,0.56,100,0.,10.0); | |
1427 | ||
1428 | TH2F* allspectrumK0SMass = (TH2F*)spectrumK0SMass->Clone(); | |
1429 | TH2F* allspectrumLcMassByK0S = (TH2F*)spectrumLcMassByK0S->Clone(); | |
1430 | TH2F* allcosOpeningAngleK0Spvsp= (TH2F*)cosOpeningAngleK0Spvsp->Clone(); | |
1431 | TH2F* allmomentumDistributionK0Svsp= (TH2F*)momentumDistributionK0Svsp->Clone(); | |
1432 | TH2F* alldcatoPVvspK0s=(TH2F*)dcatoPVvspK0s->Clone(); | |
1433 | ||
1434 | TH2F* pidBachspectrumK0SMass = (TH2F*)spectrumK0SMass->Clone(); | |
1435 | TH2F* pidBachspectrumLcMassByK0S = (TH2F*)spectrumLcMassByK0S->Clone(); | |
1436 | TH2F* pidBachcosOpeningAngleK0Spvsp= (TH2F*)cosOpeningAngleK0Spvsp->Clone(); | |
1437 | TH2F* pidBachmomentumDistributionK0Svsp= (TH2F*)momentumDistributionK0Svsp->Clone(); | |
1438 | TH2F* pidBachdcatoPVvspK0s=(TH2F*)dcatoPVvspK0s->Clone(); | |
1439 | ||
1440 | TH2F* allArmenterosPodK0s = (TH2F*)armenterosPodK0s->Clone(); | |
1441 | TH2F* pidBachArmenterosPodK0s = (TH2F*)armenterosPodK0s->Clone(); | |
1442 | ||
1443 | fOutputAll->Add(allspectrumK0SMass); | |
1444 | fOutputAll->Add(allspectrumLcMassByK0S); | |
1445 | fOutputAll->Add(allcosOpeningAngleK0Spvsp); | |
1446 | fOutputAll->Add(allmomentumDistributionK0Svsp); | |
1447 | fOutputAll->Add(allArmenterosPodK0s); | |
1448 | fOutputAll->Add(alldcatoPVvspK0s); | |
1449 | ||
1450 | fOutputPIDBach->Add(pidBachspectrumK0SMass); | |
1451 | fOutputPIDBach->Add(pidBachspectrumLcMassByK0S); | |
1452 | fOutputPIDBach->Add(pidBachcosOpeningAngleK0Spvsp); | |
1453 | fOutputPIDBach->Add(pidBachmomentumDistributionK0Svsp); | |
1454 | fOutputPIDBach->Add(pidBachArmenterosPodK0s); | |
1455 | fOutputPIDBach->Add(pidBachdcatoPVvspK0s); | |
1456 | ||
1457 | } | |
992ba7d8 | 1458 | |
1459 | // V0 invariant masses (offline) | |
1460 | nameMass="histK0SMassOffline"; | |
1461 | TH2F* spectrumK0SMassOffline = new TH2F(nameMass.Data(),"K^{0}_{S} invariant mass VS p_{T}; M(K^{0}_{S}) [GeV/c^{2}]; p_{T}(K^{0}_{S}) [GeV/c]; Entries", | |
1462 | 520,0.43,0.56,200,0.,20.); | |
1463 | spectrumK0SMassOffline->Sumw2(); | |
1464 | spectrumK0SMassOffline->SetLineColor(6); | |
1465 | spectrumK0SMassOffline->SetMarkerStyle(20); | |
1466 | spectrumK0SMassOffline->SetMarkerSize(0.6); | |
1467 | spectrumK0SMassOffline->SetMarkerColor(6); | |
1468 | ||
1469 | ||
992ba7d8 | 1470 | // Lc invariant masses (x K0S offline) |
1471 | nameMass="histLcMassOfflineByK0S"; | |
0dbd1d4f | 1472 | TH2F* spectrumLcMassOfflineByK0S = new TH2F(nameMass.Data(),"#Lambda_{C} invariant mass (by K^{0}_{S}) vs p_{T}; M(#Lambda_{C}) [GeV/c^{2}]; p_{T}", |
1473 | 1000,2.,2.5,200,0.,20.); | |
992ba7d8 | 1474 | spectrumLcMassOfflineByK0S->Sumw2(); |
1475 | spectrumLcMassOfflineByK0S->SetLineColor(6); | |
1476 | spectrumLcMassOfflineByK0S->SetMarkerStyle(20); | |
1477 | spectrumLcMassOfflineByK0S->SetMarkerSize(0.6); | |
1478 | spectrumLcMassOfflineByK0S->SetMarkerColor(6); | |
1479 | ||
1480 | ||
992ba7d8 | 1481 | nameMass="histcosOAK0SpvspOffline"; |
0dbd1d4f | 1482 | TH2F* cosOpeningAngleK0SpvspOffline = new TH2F(nameMass.Data(),"#Lambda_{C} : K^{0}_{S} - p Opening Angle vs p - Offline ; Cos(Opening Angle) ; p ", |
992ba7d8 | 1483 | 200,-1.,1.,200,0.,20.); |
0dbd1d4f | 1484 | |
992ba7d8 | 1485 | nameMass="histpK0SvspOffline"; |
0dbd1d4f | 1486 | TH2F* momentumDistributionK0SvspOffline = new TH2F(nameMass.Data(),"#Lambda_{C} : K^{0}_{S} vs p Total Momentum Distribution - Offline ; p_{p}; p_{K^{0}_{S}} ", |
992ba7d8 | 1487 | 200,0.,20.,200,0.,20.); |
0dbd1d4f | 1488 | |
992ba7d8 | 1489 | nameMass="histOfflineArmPodK0s"; |
0dbd1d4f | 1490 | TH2F* armenterosPodK0sOff = new TH2F(nameMass.Data(),"K^{0}_{S} Armenteros-Podolanski distribution -offline-; #frac{p_{L}^{+}-p_{L}^{-}}{p_{L}^{+}+p_{L}^{-}}; p_{T}^{+} [GeV/c]", |
1491 | 200,-1.,1.,300,0.,0.3); | |
992ba7d8 | 1492 | |
992ba7d8 | 1493 | nameMass="histoDCAtoPVvsinvmassK0sOffline"; |
0dbd1d4f | 1494 | TH2F *dcatoPVvspK0sOffline = new TH2F(nameMass.Data(),"K^{0}_{S}: DCA to Primary Vertex vs K^{0}_{S} invariant mass -offline -; M(K^{0}_{S}) [GeV/c^{2}]; DCA to Primary Vertex []; Entries", |
1495 | 520,0.43,0.56,100,0.,10.0); | |
992ba7d8 | 1496 | |
1497 | ||
1498 | ||
992ba7d8 | 1499 | TH2F* allspectrumK0SMassOffline = (TH2F*)spectrumK0SMassOffline->Clone(); |
992ba7d8 | 1500 | TH2F* allspectrumLcMassOfflineByK0S = (TH2F*)spectrumLcMassOfflineByK0S->Clone(); |
992ba7d8 | 1501 | TH2F* allcosOpeningAngleK0SpvspOffline= (TH2F*)cosOpeningAngleK0SpvspOffline->Clone(); |
992ba7d8 | 1502 | TH2F* allmomentumDistributionK0SvspOffline= (TH2F*)momentumDistributionK0SvspOffline->Clone(); |
992ba7d8 | 1503 | TH2F* alldcatoPVvspK0sOffline=(TH2F*)dcatoPVvspK0sOffline->Clone(); |
1504 | ||
992ba7d8 | 1505 | TH2F* pidBachspectrumK0SMassOffline = (TH2F*)spectrumK0SMassOffline->Clone(); |
992ba7d8 | 1506 | TH2F* pidBachspectrumLcMassOfflineByK0S = (TH2F*)spectrumLcMassOfflineByK0S->Clone(); |
992ba7d8 | 1507 | TH2F* pidBachcosOpeningAngleK0SpvspOffline= (TH2F*)cosOpeningAngleK0SpvspOffline->Clone(); |
992ba7d8 | 1508 | TH2F* pidBachmomentumDistributionK0SvspOffline= (TH2F*)momentumDistributionK0SvspOffline->Clone(); |
992ba7d8 | 1509 | TH2F* pidBachdcatoPVvspK0sOffline=(TH2F*)dcatoPVvspK0sOffline->Clone(); |
1510 | ||
992ba7d8 | 1511 | TH2F* allArmenterosPodK0sOff = (TH2F*)armenterosPodK0sOff->Clone(); |
992ba7d8 | 1512 | TH2F* pidBachArmenterosPodK0sOff = (TH2F*)armenterosPodK0sOff->Clone(); |
1513 | ||
1514 | ||
992ba7d8 | 1515 | fOutputAll->Add(allspectrumK0SMassOffline); |
992ba7d8 | 1516 | fOutputAll->Add(allspectrumLcMassOfflineByK0S); |
992ba7d8 | 1517 | fOutputAll->Add(allcosOpeningAngleK0SpvspOffline); |
992ba7d8 | 1518 | fOutputAll->Add(allmomentumDistributionK0SvspOffline); |
992ba7d8 | 1519 | fOutputAll->Add(allArmenterosPodK0sOff); |
992ba7d8 | 1520 | fOutputAll->Add(alldcatoPVvspK0sOffline); |
1521 | ||
992ba7d8 | 1522 | fOutputPIDBach->Add(pidBachspectrumK0SMassOffline); |
992ba7d8 | 1523 | fOutputPIDBach->Add(pidBachspectrumLcMassOfflineByK0S); |
1524 | fOutputPIDBach->Add(pidBachcosOpeningAngleK0SpvspOffline); | |
992ba7d8 | 1525 | fOutputPIDBach->Add(pidBachmomentumDistributionK0SvspOffline); |
992ba7d8 | 1526 | fOutputPIDBach->Add(pidBachArmenterosPodK0sOff); |
992ba7d8 | 1527 | fOutputPIDBach->Add(pidBachdcatoPVvspK0sOffline); |
1528 | ||
1529 | ||
0dbd1d4f | 1530 | nameMass="hist1LcMassOfflineByK0S"; |
1531 | TH2D* h1 = new TH2D(nameMass.Data(),"IsEventSelected; M(#Lambda_{C}) [GeV/c^{2}]; p_{T}",1000,2.,2.5,200,0.,20.); | |
1532 | fOutput->Add(h1); | |
1533 | nameMass="hist0LcMassOfflineByK0S"; | |
1534 | TH2D* h0 = new TH2D(nameMass.Data(),"!IsEventSelected; M(#Lambda_{C}) [GeV/c^{2}]; p_{T}",1000,2.,2.5,200,0.,20.); | |
1535 | fOutput->Add(h0); | |
992ba7d8 | 1536 | |
1537 | if (fUseMCInfo) { | |
1538 | ||
0dbd1d4f | 1539 | if (fUseOnTheFlyV0) { |
1540 | ||
1541 | nameSgn="histK0SMassSgn"; | |
1542 | nameBkg="histK0SMassBkg"; | |
1543 | TH2F* spectrumK0SMassSgn = new TH2F(nameSgn.Data(), "K^{0}_{S} Signal invariant mass VS p_{T} - MC; M(K^{0}_{S}) [GeV/c^{2}]; p_{T}(K^{0}_{S}) [GeV/c]; Entries", 520,0.43,0.56,200,0.,20.); | |
1544 | TH2F* spectrumK0SMassBkg = new TH2F(nameBkg.Data(), "K^{0}_{S} Background invariant mass VS p_{T} - MC; M(K^{0}_{S}) [GeV/c^{2}]; p_{T}(K^{0}_{S}) [GeV/c]; Entries", 520,0.43,0.56,200,0.,20.); | |
1545 | spectrumK0SMassSgn->Sumw2(); | |
1546 | spectrumK0SMassBkg->Sumw2(); | |
1547 | spectrumK0SMassSgn->SetLineColor(2); | |
1548 | spectrumK0SMassBkg->SetLineColor(4); | |
1549 | spectrumK0SMassSgn->SetMarkerStyle(20); | |
1550 | spectrumK0SMassBkg->SetMarkerStyle(20); | |
1551 | spectrumK0SMassSgn->SetMarkerSize(0.6); | |
1552 | spectrumK0SMassBkg->SetMarkerSize(0.6); | |
1553 | spectrumK0SMassSgn->SetMarkerColor(2); | |
1554 | spectrumK0SMassBkg->SetMarkerColor(4); | |
1555 | ||
1556 | TH2F* allspectrumK0SMassSgn = (TH2F*)spectrumK0SMassSgn->Clone(); | |
1557 | TH2F* allspectrumK0SMassBkg = (TH2F*) spectrumK0SMassBkg->Clone(); | |
1558 | TH2F* pidBachspectrumK0SMassSgn = (TH2F*)spectrumK0SMassSgn->Clone(); | |
1559 | TH2F* pidBachspectrumK0SMassBkg = (TH2F*) spectrumK0SMassBkg->Clone(); | |
992ba7d8 | 1560 | |
1561 | ||
0dbd1d4f | 1562 | fOutputAll->Add(allspectrumK0SMassSgn); |
1563 | fOutputAll->Add(allspectrumK0SMassBkg); | |
1564 | fOutputPIDBach->Add(pidBachspectrumK0SMassSgn); | |
1565 | fOutputPIDBach->Add(pidBachspectrumK0SMassBkg); | |
1566 | ||
1567 | ||
1568 | nameSgn="histLcMassByK0SSgn"; | |
1569 | nameBkg="histLcMassByK0SBkg"; | |
1570 | TH2F* spectrumLcMassByK0SSgn = new TH2F(nameSgn.Data(), "#Lambda_{C} Signal invariant mass (by K^{0}_{S}) vs p_{T} - MC; M(#Lambda_{C}) [GeV/c^{2}]; p_{T}", | |
1571 | 1000,2.,2.5,200,0.,20.); | |
1572 | TH2F* spectrumLcMassByK0SBkg = new TH2F(nameBkg.Data(), "#Lambda_{C} Background invariant mass (by K^{0}_{S}) vs p_{T} - MC; M(#Lambda_{C}) [GeV/c^{2}]; p_{T}", | |
1573 | 1000,2.,2.5,200,0.,20.); | |
1574 | spectrumLcMassByK0SSgn->Sumw2(); | |
1575 | spectrumLcMassByK0SBkg->Sumw2(); | |
1576 | spectrumLcMassByK0SSgn->SetLineColor(2); | |
1577 | spectrumLcMassByK0SBkg->SetLineColor(4); | |
1578 | spectrumLcMassByK0SSgn->SetMarkerStyle(20); | |
1579 | spectrumLcMassByK0SBkg->SetMarkerStyle(20); | |
1580 | spectrumLcMassByK0SSgn->SetMarkerSize(0.6); | |
1581 | spectrumLcMassByK0SBkg->SetMarkerSize(0.6); | |
1582 | spectrumLcMassByK0SSgn->SetMarkerColor(2); | |
1583 | spectrumLcMassByK0SBkg->SetMarkerColor(4); | |
1584 | ||
1585 | TH2F* allspectrumLcMassByK0SSgn = (TH2F*)spectrumLcMassByK0SSgn->Clone(); | |
1586 | TH2F* allspectrumLcMassByK0SBkg = (TH2F*) spectrumLcMassByK0SBkg->Clone(); | |
1587 | TH2F* pidBachspectrumLcMassByK0SSgn = (TH2F*)spectrumLcMassByK0SSgn->Clone(); | |
1588 | TH2F* pidBachspectrumLcMassByK0SBkg = (TH2F*) spectrumLcMassByK0SBkg->Clone(); | |
1589 | fOutputAll->Add(allspectrumLcMassByK0SSgn); | |
1590 | fOutputAll->Add(allspectrumLcMassByK0SBkg); | |
1591 | fOutputPIDBach->Add(pidBachspectrumLcMassByK0SSgn); | |
1592 | fOutputPIDBach->Add(pidBachspectrumLcMassByK0SBkg); | |
1593 | ||
1594 | ||
1595 | nameSgn="histcosOAK0SpSgnvsp"; | |
1596 | nameBkg="histcosOAK0SpBkgvsp"; | |
1597 | TH2F* cosOpeningAngleK0SpSgnvsp= new TH2F(nameSgn.Data(),"#Lambda_{C} SGN : K^{0}_{S} - p Opening Angle vs p - MC ; Cos(Opening Angle); p ", | |
1598 | 200,-1.,1.,200,0.,20.); | |
1599 | TH2F* cosOpeningAngleK0SpBkgvsp= new TH2F(nameBkg.Data(),"#Lambda_{C} BKG : K^{0}_{S} - p Opening Angle vs p - MC; Cos(Opening Angle); p ", | |
1600 | 200,-1.,1.,200,0.,20.); | |
1601 | ||
1602 | TH2F* allcosOpeningAngleK0SpSgnvsp= (TH2F*)cosOpeningAngleK0SpSgnvsp->Clone(); | |
1603 | TH2F* allcosOpeningAngleK0SpBkgvsp= (TH2F*)cosOpeningAngleK0SpBkgvsp->Clone(); | |
1604 | TH2F* pidBachcosOpeningAngleK0SpSgnvsp= (TH2F*)cosOpeningAngleK0SpSgnvsp->Clone(); | |
1605 | TH2F* pidBachcosOpeningAngleK0SpBkgvsp= (TH2F*)cosOpeningAngleK0SpBkgvsp->Clone(); | |
1606 | fOutputAll->Add(allcosOpeningAngleK0SpSgnvsp); | |
1607 | fOutputAll->Add(allcosOpeningAngleK0SpBkgvsp); | |
1608 | fOutputPIDBach->Add(pidBachcosOpeningAngleK0SpSgnvsp); | |
1609 | fOutputPIDBach->Add(pidBachcosOpeningAngleK0SpBkgvsp); | |
1610 | ||
1611 | nameSgn="histpK0SvspSgn"; | |
1612 | nameBkg="histpK0SvspBkg"; | |
1613 | TH2F* momentumDistributionK0SvspSgn= new TH2F(nameSgn.Data(),"#Lambda_{C} SGN : K^{0}_{S} vs p Total Momentum Distribution - MC; p_{p}; p_{K^{0}_{S}}", | |
1614 | 200,0.,20.,200,0.,20.); | |
1615 | TH2F* momentumDistributionK0SvspBkg= new TH2F(nameBkg.Data(),"#Lambda_{C} BKG : K^{0}_{S} vs p Total Momentum Distribution - MC; p_{p}; p_{K^{0}_{S}}", | |
1616 | 200,0.,20.,200,0.,20.); | |
1617 | ||
1618 | TH2F* allmomentumDistributionK0SvspSgn= (TH2F*)momentumDistributionK0SvspSgn->Clone(); | |
1619 | TH2F* allmomentumDistributionK0SvspBkg= (TH2F*)momentumDistributionK0SvspBkg->Clone(); | |
1620 | TH2F* pidBachmomentumDistributionK0SvspSgn= (TH2F*)momentumDistributionK0SvspSgn->Clone(); | |
1621 | TH2F* pidBachmomentumDistributionK0SvspBkg= (TH2F*)momentumDistributionK0SvspBkg->Clone(); | |
1622 | fOutputAll->Add(allmomentumDistributionK0SvspSgn); | |
1623 | fOutputAll->Add(allmomentumDistributionK0SvspBkg); | |
1624 | fOutputPIDBach->Add(pidBachmomentumDistributionK0SvspSgn); | |
1625 | fOutputPIDBach->Add(pidBachmomentumDistributionK0SvspBkg); | |
1626 | ||
1627 | ||
1628 | // armenteros-podolanski plots K0S | |
1629 | nameSgn="histArmPodK0sSgn"; | |
1630 | nameBkg="histArmPodK0sBkg"; | |
1631 | TH2F* armenterosPodK0sSgn = new TH2F(nameSgn.Data(),"K^{0}_{S} Armenteros-Podolanski distribution (sgn); #frac{p_{L}^{+}-p_{L}^{-}}{p_{L}^{+}+p_{L}^{-}}; p_{T}^{+} [GeV/c]", | |
1632 | 200,-1.,1.,300,0.,0.3); | |
1633 | TH2F* armenterosPodK0sBkg = new TH2F(nameBkg.Data(),"K^{0}_{S} Armenteros-Podolanski distribution (bkg); #frac{p_{L}^{+}-p_{L}^{-}}{p_{L}^{+}+p_{L}^{-}}; p_{T}^{+} [GeV/c]", | |
1634 | 200,-1.,1.,300,0.,0.3); | |
1635 | ||
1636 | TH2F* allArmenterosPodK0sSgn = (TH2F*)armenterosPodK0sSgn->Clone(); | |
1637 | TH2F* allArmenterosPodK0sBkg = (TH2F*)armenterosPodK0sBkg->Clone(); | |
1638 | TH2F* pidBachArmenterosPodK0sSgn = (TH2F*)armenterosPodK0sSgn->Clone(); | |
1639 | TH2F* pidBachArmenterosPodK0sBkg = (TH2F*)armenterosPodK0sBkg->Clone(); | |
1640 | ||
1641 | fOutputAll->Add(allArmenterosPodK0sSgn); | |
1642 | fOutputAll->Add(allArmenterosPodK0sBkg); | |
1643 | ||
1644 | fOutputPIDBach->Add(pidBachArmenterosPodK0sSgn); | |
1645 | fOutputPIDBach->Add(pidBachArmenterosPodK0sBkg); | |
1646 | ||
1647 | ||
1648 | nameSgn="histoDCAtoPVvsinvmassK0sSgn"; | |
1649 | nameBkg="histoDCAtoPVvsinvmassK0sBkg"; | |
1650 | TH2F *dcatoPVvspK0sSgn=new TH2F(nameSgn.Data(),"K^{0}_{S}: DCA to Primary Vertex vs K^{0}_{S} invariant mass (sgn); M(K^{0}_{S}) [GeV/c^{2}]; DCA to Primary Vertex []; Entries",520,0.43,0.56,100,0.,10.0); | |
1651 | TH2F *dcatoPVvspK0sBkg=new TH2F(nameBkg.Data(),"K^{0}_{S}: DCA to Primary Vertex vs K^{0}_{S} invariant mass (bkg); M(K^{0}_{S}) [GeV/c^{2}]; DCA to Primary Vertex []; Entries",520,0.43,0.56,100,0.,10.0); | |
1652 | ||
1653 | TH2F* alldcatoPVvspK0sSgn= (TH2F*)dcatoPVvspK0sSgn->Clone(); | |
1654 | TH2F* alldcatoPVvspK0sBkg= (TH2F*)dcatoPVvspK0sBkg->Clone(); | |
1655 | TH2F* pidBachdcatoPVvspK0sSgn= (TH2F*)dcatoPVvspK0sSgn->Clone(); | |
1656 | TH2F* pidBachdcatoPVvspK0sBkg= (TH2F*)dcatoPVvspK0sBkg->Clone(); | |
1657 | ||
1658 | fOutputAll->Add(alldcatoPVvspK0sSgn); | |
1659 | fOutputPIDBach->Add(pidBachdcatoPVvspK0sSgn); | |
1660 | fOutputAll->Add(alldcatoPVvspK0sBkg); | |
1661 | fOutputPIDBach->Add(pidBachdcatoPVvspK0sBkg); | |
1662 | ||
1663 | } | |
992ba7d8 | 1664 | |
1665 | ||
1666 | nameSgn="histK0SMassOfflineSgn"; | |
1667 | nameBkg="histK0SMassOfflineBkg"; | |
1668 | TH2F* spectrumK0SMassOfflineSgn = new TH2F(nameSgn.Data(), "K^{0}_{S} Signal invariant mass VS p_{T} - MC; M(K^{0}_{S}) [GeV/c^{2}]; p_{T}(K^{0}_{S}) [GeV/c]; Entries", | |
1669 | 520,0.43,0.56,200,0.,20.); | |
1670 | TH2F* spectrumK0SMassOfflineBkg = new TH2F(nameBkg.Data(), "K^{0}_{S} Background invariant mass VS p_{T} - MC; M(K^{0}_{S}) [GeV/c^{2}]; p_{T}(K^{0}_{S}) [GeV/c]; Entries", | |
1671 | 520,0.43,0.56,200,0.,20.); | |
1672 | spectrumK0SMassOfflineSgn->Sumw2(); | |
1673 | spectrumK0SMassOfflineBkg->Sumw2(); | |
1674 | spectrumK0SMassOfflineSgn->SetLineColor(2); | |
1675 | spectrumK0SMassOfflineBkg->SetLineColor(4); | |
1676 | spectrumK0SMassOfflineSgn->SetMarkerStyle(20); | |
1677 | spectrumK0SMassOfflineBkg->SetMarkerStyle(20); | |
1678 | spectrumK0SMassOfflineSgn->SetMarkerSize(0.6); | |
1679 | spectrumK0SMassOfflineBkg->SetMarkerSize(0.6); | |
1680 | spectrumK0SMassOfflineSgn->SetMarkerColor(2); | |
1681 | spectrumK0SMassOfflineBkg->SetMarkerColor(4); | |
1682 | ||
992ba7d8 | 1683 | TH2F* allspectrumK0SMassOfflineSgn = (TH2F*)spectrumK0SMassOfflineSgn->Clone(); |
1684 | TH2F* allspectrumK0SMassOfflineBkg = (TH2F*) spectrumK0SMassOfflineBkg->Clone(); | |
992ba7d8 | 1685 | fOutputAll->Add(allspectrumK0SMassOfflineSgn); |
1686 | fOutputAll->Add(allspectrumK0SMassOfflineBkg); | |
992ba7d8 | 1687 | |
1688 | ||
992ba7d8 | 1689 | |
0dbd1d4f | 1690 | TH2F* pidBachspectrumK0SMassOfflineSgn = (TH2F*)spectrumK0SMassOfflineSgn->Clone(); |
1691 | TH2F* pidBachspectrumK0SMassOfflineBkg = (TH2F*) spectrumK0SMassOfflineBkg->Clone(); | |
1692 | fOutputPIDBach->Add(pidBachspectrumK0SMassOfflineSgn); | |
1693 | fOutputPIDBach->Add(pidBachspectrumK0SMassOfflineBkg); | |
992ba7d8 | 1694 | |
1695 | ||
1696 | nameSgn="histLcMassOfflineByK0SSgn"; | |
1697 | nameBkg="histLcMassOfflineByK0SBkg"; | |
1698 | TH2F* spectrumLcMassOfflineByK0SSgn = new TH2F(nameSgn.Data(), "#Lambda_{C} Signal invariant mass (by K^{0}_{S}) vs p_{T} - MC; M(#Lambda_{C}) [GeV/c^{2}]; p_{T}", | |
1699 | 1000,2.,2.5,200,0.,20.); | |
1700 | TH2F* spectrumLcMassOfflineByK0SBkg = new TH2F(nameBkg.Data(), "#Lambda_{C} Background invariant mass (by K^{0}_{S}) vs p_{T} - MC; M(#Lambda_{C}) [GeV/c^{2}]; p_{T}", | |
1701 | 1000,2.,2.5,200,0.,20.); | |
1702 | spectrumLcMassOfflineByK0SSgn->Sumw2(); | |
1703 | spectrumLcMassOfflineByK0SBkg->Sumw2(); | |
1704 | spectrumLcMassOfflineByK0SSgn->SetLineColor(2); | |
1705 | spectrumLcMassOfflineByK0SBkg->SetLineColor(4); | |
1706 | spectrumLcMassOfflineByK0SSgn->SetMarkerStyle(20); | |
1707 | spectrumLcMassOfflineByK0SBkg->SetMarkerStyle(20); | |
1708 | spectrumLcMassOfflineByK0SSgn->SetMarkerSize(0.6); | |
1709 | spectrumLcMassOfflineByK0SBkg->SetMarkerSize(0.6); | |
1710 | spectrumLcMassOfflineByK0SSgn->SetMarkerColor(2); | |
1711 | spectrumLcMassOfflineByK0SBkg->SetMarkerColor(4); | |
1712 | ||
1713 | ||
1714 | TH2F* allspectrumLcMassOfflineByK0SSgn = (TH2F*)spectrumLcMassOfflineByK0SSgn->Clone(); | |
1715 | TH2F* allspectrumLcMassOfflineByK0SBkg = (TH2F*) spectrumLcMassOfflineByK0SBkg->Clone(); | |
1716 | TH2F* pidBachspectrumLcMassOfflineByK0SSgn = (TH2F*)spectrumLcMassOfflineByK0SSgn->Clone(); | |
1717 | TH2F* pidBachspectrumLcMassOfflineByK0SBkg = (TH2F*) spectrumLcMassOfflineByK0SBkg->Clone(); | |
1718 | fOutputAll->Add(allspectrumLcMassOfflineByK0SSgn); | |
1719 | fOutputAll->Add(allspectrumLcMassOfflineByK0SBkg); | |
1720 | fOutputPIDBach->Add(pidBachspectrumLcMassOfflineByK0SSgn); | |
1721 | fOutputPIDBach->Add(pidBachspectrumLcMassOfflineByK0SBkg); | |
1722 | ||
992ba7d8 | 1723 | |
1724 | ||
1725 | ||
1726 | nameSgn="histcosOAK0SpSgnvspOffline"; | |
1727 | nameBkg="histcosOAK0SpBkgvspOffline"; | |
e7af8919 | 1728 | TH2F* cosOpeningAngleK0SpSgnvspOffline= new TH2F(nameSgn.Data(),"#Lambda_{C} SGN : K^{0}_{S} - p Opening Angle vs p - Offline - MC ; Cos(Opening Angle); p ", |
992ba7d8 | 1729 | 200,-1.,1.,200,0.,20.); |
e7af8919 | 1730 | TH2F* cosOpeningAngleK0SpBkgvspOffline= new TH2F(nameBkg.Data(),"#Lambda_{C} BKG : K^{0}_{S} - p Opening Angle vs p - Offline - MC; Cos(Opening Angle); p ", |
992ba7d8 | 1731 | 200,-1.,1.,200,0.,20.); |
1732 | ||
1733 | ||
1734 | TH2F* allcosOpeningAngleK0SpSgnvspOffline= (TH2F*)cosOpeningAngleK0SpSgnvspOffline->Clone(); | |
1735 | TH2F* allcosOpeningAngleK0SpBkgvspOffline= (TH2F*)cosOpeningAngleK0SpBkgvspOffline->Clone(); | |
1736 | TH2F* pidBachcosOpeningAngleK0SpSgnvspOffline= (TH2F*)cosOpeningAngleK0SpSgnvspOffline->Clone(); | |
1737 | TH2F* pidBachcosOpeningAngleK0SpBkgvspOffline= (TH2F*)cosOpeningAngleK0SpBkgvspOffline->Clone(); | |
1738 | fOutputAll->Add(allcosOpeningAngleK0SpSgnvspOffline); | |
1739 | fOutputAll->Add(allcosOpeningAngleK0SpBkgvspOffline); | |
1740 | fOutputPIDBach->Add(pidBachcosOpeningAngleK0SpSgnvspOffline); | |
1741 | fOutputPIDBach->Add(pidBachcosOpeningAngleK0SpBkgvspOffline); | |
1742 | ||
1743 | ||
1744 | ||
1745 | ||
992ba7d8 | 1746 | nameSgn="histpK0SvspOfflineSgn"; |
1747 | nameBkg="histpK0SvspOfflineBkg"; | |
e7af8919 | 1748 | TH2F* momentumDistributionK0SvspOfflineSgn= new TH2F(nameSgn.Data(),"#Lambda_{C} SGN : K^{0}_{S} vs p Total Momentum Distribution - Offline - MC; p_{p}; p_{K^{0}_{S}}", |
992ba7d8 | 1749 | 200,0.,20.,200,0.,20.); |
e7af8919 | 1750 | TH2F* momentumDistributionK0SvspOfflineBkg= new TH2F(nameBkg.Data(),"#Lambda_{C} BKG : K^{0}_{S} vs p Total Momentum Distribution - Offline - MC; p_{p}; p_{K^{0}_{S}}", |
992ba7d8 | 1751 | 200,0.,20.,200,0.,20.); |
1752 | ||
1753 | ||
1754 | TH2F* allmomentumDistributionK0SvspOfflineSgn= (TH2F*)momentumDistributionK0SvspOfflineSgn->Clone(); | |
1755 | TH2F* allmomentumDistributionK0SvspOfflineBkg= (TH2F*)momentumDistributionK0SvspOfflineBkg->Clone(); | |
1756 | TH2F* pidBachmomentumDistributionK0SvspOfflineSgn= (TH2F*)momentumDistributionK0SvspOfflineSgn->Clone(); | |
1757 | TH2F* pidBachmomentumDistributionK0SvspOfflineBkg= (TH2F*)momentumDistributionK0SvspOfflineBkg->Clone(); | |
1758 | fOutputAll->Add(allmomentumDistributionK0SvspOfflineSgn); | |
1759 | fOutputAll->Add(allmomentumDistributionK0SvspOfflineBkg); | |
1760 | fOutputPIDBach->Add(pidBachmomentumDistributionK0SvspOfflineSgn); | |
1761 | fOutputPIDBach->Add(pidBachmomentumDistributionK0SvspOfflineBkg); | |
1762 | ||
1763 | ||
1764 | ||
1765 | ||
1766 | ||
992ba7d8 | 1767 | // armenteros-podolanski plots K0S (offline) |
1768 | nameSgn="histOfflineArmPodK0sSgn"; | |
1769 | nameBkg="histOfflineArmPodK0sBkg"; | |
1770 | TH2F* armenterosPodK0sOffSgn = new TH2F(nameSgn.Data(),"K^{0}_{S} Armenteros-Podolanski distribution (sgn) -offline-; #frac{p_{L}^{+}-p_{L}^{-}}{p_{L}^{+}+p_{L}^{-}}; p_{T}^{+} [GeV/c]",200,-1.,1.,300,0.,0.3); | |
1771 | TH2F* armenterosPodK0sOffBkg = new TH2F(nameBkg.Data(),"K^{0}_{S} Armenteros-Podolanski distribution (bkg) -offline-; #frac{p_{L}^{+}-p_{L}^{-}}{p_{L}^{+}+p_{L}^{-}}; p_{T}^{+} [GeV/c]",200,-1.,1.,300,0.,0.3); | |
1772 | ||
1773 | ||
992ba7d8 | 1774 | TH2F* allArmenterosPodK0sOffSgn = (TH2F*)armenterosPodK0sOffSgn->Clone(); |
1775 | TH2F* allArmenterosPodK0sOffBkg = (TH2F*)armenterosPodK0sOffBkg->Clone(); | |
992ba7d8 | 1776 | TH2F* pidBachArmenterosPodK0sOffSgn = (TH2F*)armenterosPodK0sOffSgn->Clone(); |
1777 | TH2F* pidBachArmenterosPodK0sOffBkg = (TH2F*)armenterosPodK0sOffBkg->Clone(); | |
1778 | ||
0dbd1d4f | 1779 | |
992ba7d8 | 1780 | fOutputAll->Add(allArmenterosPodK0sOffSgn); |
1781 | fOutputAll->Add(allArmenterosPodK0sOffBkg); | |
992ba7d8 | 1782 | fOutputPIDBach->Add(pidBachArmenterosPodK0sOffSgn); |
1783 | fOutputPIDBach->Add(pidBachArmenterosPodK0sOffBkg); | |
1784 | ||
1785 | ||
992ba7d8 | 1786 | nameSgn="histoDCAtoPVvsinvmassK0sOfflineSgn"; |
1787 | nameBkg="histoDCAtoPVvsinvmassK0sOfflineBkg"; | |
e7af8919 | 1788 | TH2F *dcatoPVvspK0sOfflineSgn=new TH2F(nameSgn.Data(),"K^{0}_{S}: DCA to Primary Vertex vs K^{0}_{S} invariant mass -offline - (sgn); M(K^{0}_{S}) [GeV/c^{2}]; DCA to Primary Vertex []; Entries",520,0.43,0.56,100,0.,10.0); |
992ba7d8 | 1789 | TH2F *dcatoPVvspK0sOfflineBkg=new TH2F(nameBkg.Data(),"K^{0}_{S}: DCA to Primary Vertex vs K^{0}_{S} invariant mass -offline - (bkg); M(K^{0}_{S}) [GeV/c^{2}]; DCA to Primary Vertex []; Entries",520,0.43,0.56,100,0.,10.0); |
1790 | ||
1791 | ||
992ba7d8 | 1792 | TH2F* alldcatoPVvspK0sOfflineSgn= (TH2F*)dcatoPVvspK0sOfflineSgn->Clone(); |
1793 | TH2F* pidBachdcatoPVvspK0sOfflineSgn= (TH2F*)dcatoPVvspK0sOfflineSgn->Clone(); | |
1794 | TH2F* alldcatoPVvspK0sOfflineBkg= (TH2F*)dcatoPVvspK0sOfflineBkg->Clone(); | |
1795 | TH2F* pidBachdcatoPVvspK0sOfflineBkg= (TH2F*)dcatoPVvspK0sOfflineBkg->Clone(); | |
1796 | ||
1797 | ||
1798 | ||
992ba7d8 | 1799 | fOutputAll->Add(alldcatoPVvspK0sOfflineSgn); |
1800 | fOutputPIDBach->Add(pidBachdcatoPVvspK0sOfflineSgn); | |
1801 | fOutputAll->Add(alldcatoPVvspK0sOfflineBkg); | |
1802 | fOutputPIDBach->Add(pidBachdcatoPVvspK0sOfflineBkg); | |
1803 | ||
1804 | } | |
1805 | ||
1806 | ||
1807 | ///---------------- END K0S HISTOS DECLARATIONS -------------------/// | |
1808 | } |