]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/SPECTRA/Kinks/AliAnalysisPionKinksMCESD.cxx
Merge branch 'TPCdev' of https://git.cern.ch/reps/AliRoot into TPCdev
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / Kinks / AliAnalysisPionKinksMCESD.cxx
CommitLineData
30687e36 1/**************************************************************************
2 * Authors: Eftychios Cheiladakis, for his Master Thesis *
3 * at the Physics Department of Athens University *
4 * under the supervision of Prof. Martha Spyropoulou-Stassinaki *
5 * *
6 * Permission to use, copy, modify and distribute this software and its *
7 * documentation strictly for non-commercial purposes is hereby granted *
8 * without fee, provided that the above copyright notice appears in all *
9 * copies and that both the copyright notice and this permission notice *
10 * appear in the supporting documentation. The authors make no claims *
11 * about the suitability of this software for any purpose. It is *
12 * provided "as is" without express or implied warranty. *
13 **************************************************************************/
14
15//-----------------------------------------------------------------
16// AliAnalysisPionKinksESDMC class
17// Example of an analysis task for kink topology study
18// pions from kink topology are 'identified' in this code
19//-----------------------------------------------------------------
20
bd4be5f8 21#include "TCanvas.h"
22#include "TVector3.h"
23#include "TLorentzVector.h"
24#include "TMath.h"
25#include "TF1.h"
26#include "TH1.h"
27#include "TH2.h"
28#include "TH3.h"
29#include "TList.h"
30#include "TParticle.h"
31
32#include "AliMCEvent.h"
33#include "AliVParticle.h"
34#include "AliMCParticle.h"
35#include "AliESDEvent.h"
36#include "AliESDkink.h"
37#include "AliESDpid.h"
38#include "AliPID.h"
39#include "AliStack.h"
40
41#include "AliAnalysisTask.h"
42#include "AliInputEventHandler.h"
43#include "AliESDInputHandler.h"
44#include "AliPIDResponse.h"
45#include "AliAnalysisManager.h"
46#include "AliMCEventHandler.h"
47#include "AliESDtrackCuts.h"
48
49#include "AliAnalysisPionKinksMCESD.h"
50
51ClassImp(AliAnalysisPionKinksMCESD)
52
53//________________________________________________________________________
54AliAnalysisPionKinksMCESD::AliAnalysisPionKinksMCESD(const char *name)
55:AliAnalysisTaskSE(name),
56fMaxKinkAngKmu(0),
57fMaxKinkAngPimu(0), //functions
58hMCMult(0),
59hMCMultPrim(0),
60hMCPtAll(0),
61hMCEtaAll(0),
62hMCPtPrim(0),
63hMCEtaPrim(0),
64hMCPt(0),
65hMCEta(0),
66hMCPdg(0),
67hMCMultPiPlus(0),
68hMCPtPiPlus(0),
69hMCEtaPiPlus(0),
70hMCRapidityPiPlus(0),
71hMCNDaughtersPlus(0),
72hMCRadPiDauPlus(0),
73hMCKinkPosZPlus(0),
74hMCUIDPiDauPlus(0),
75hMCPdgPiNonDecayedPlus(0),
76hMCPdgPiDauPlus(0),
77hMCQtPlus(0),
78hMCKinkAnglePlus(0),
79hMCPKinkAngPlus(0),
80hMCPdgCodemdPlus(0),
81hMCPtmdPlus(0),
82hMCPtPimuonPlus(0),
83hMCEtaPimuonPlus(0),
84hMCRapidityPimuonPlus(0),
85hMCQtPimuonPlus(0),
86hMCPKinkAngPimuonPlus(0),
87hMCPtPiotherPlus(0),
88hMCEtaPiotherPlus(0),
89hMCRapidityPiotherPlus(0),
90hMCQtPiotherPlus(0),
91hMCPKinkAngPiotherPlus(0),
92hMCMultPiMinus(0),
93hMCPtPiMinus(0),
94hMCEtaPiMinus(0),
95hMCRapidityPiMinus(0),
96hMCNDaughtersMinus(0),
97hMCRadPiDauMinus(0),
98hMCKinkPosZMinus(0),
99hMCUIDPiDauMinus(0),
100hMCPdgPiNonDecayedMinus(0),
101hMCPdgPiDauMinus(0),
102hMCQtMinus(0),
103hMCKinkAngleMinus(0),
104hMCPKinkAngMinus(0),
105hMCPdgCodemdMinus(0),
106hMCPtmdMinus(0),
107hMCPtPimuonMinus(0),
108hMCEtaPimuonMinus(0),
109hMCRapidityPimuonMinus(0),
110hMCQtPimuonMinus(0),
111hMCPKinkAngPimuonMinus(0),
112hMCPtPiotherMinus(0),
113hMCEtaPiotherMinus(0),
114hMCRapidityPiotherMinus(0),
115hMCQtPiotherMinus(0),
116hMCPKinkAngPiotherMinus(0),//MC histograms
117hMult(0),
118hAcceptedMult(0),
119hMultPS(0),
120hvtx(0),
121hvtxy(0),
122hvtyz(0),
123hvtxz(0),
124hMultPSV(0),
125hPtAll(0),
126hEtaAll(0),
127hTrackPos(0),
128hTrackPosxy(0),
129hTrackPosyz(0),
130hTrackPosxz(0),
131//hTPCchi2clusters(0),
132//hdcaToVertexXY(0),
133//hdcaToVertexZ(0),
134hMultPrim(0),
135hPtPrim(0),
136hEtaPrim(0),
137hPrimTrackPos(0),
138hPrimTrackPosxy(0),
139hPrimTrackPosyz(0),
140hPrimTrackPosxz(0),
141hPt(0),
142hEta(0),
143//hRapidity(0),
144hPtKink(0),
145hEtaKink(0),
146hRapidityKink(0),
147hPmP(0),
148hKinkPosRTPCclusters1(0),
149hKinkPosRTPCclusters2(0),
150hQt(0),
151hKinkAngle(0),
152hDCAkink(0),
153hPmKinkAng(0),
154hKinkPosXY(0),
155hKinkPosZY(0),
156hKinkPosZR(0),
157hKinkPosR(0),
158hKinkPosZ(0),
159hKinkPosZMCKinkPosZ(0),
160hPdgCodemd(0),
161hPmd(0),
162hMinvPimu(0),
163hUIDKinkDau(0),
164hdEdx(0),
165hPtKinkFake(0),
166hEtaKinkFake(0),
167hRapidityKinkFake(0),
168hPmPFake(0),
169hKinkPosRTPCclusters1Fake(0),
170hKinkPosRTPCclusters2Fake(0),
171hQtFake(0),
172hKinkAngleFake(0),
173hDCAkinkFake(0),
174hPmKinkAngFake(0),
175hKinkPosXYFake(0),
176hKinkPosZYFake(0),
177hKinkPosZRFake(0),
178hKinkPosRFake(0),
179hKinkPosZFake(0),
180hKinkPosZMCKinkPosZFake(0),
181hPdgCodemdFake(0),
182hPmdFake(0),
183hMinvPimuFake(0),
184hUIDKinkDauFake(0),
185hdEdxFake(0),
186hPtPosRSelected(0),
187hPdgCodemdZRejected(0),
188hPtZSelected(0),
189hPdgCodemdAngRejected(0),
190hPtAngSelected(0),
191hPdgCodemdPmRejected(0),
192hPtPmSelected(0),
193hPdgCodemdQtLowRejected(0),
194hPtGoodKink(0),
195hEtaGoodKink(0),
196hRapidityGoodKink(0),
197hQtGoodKink(0),
198hPmGoodKinkAng(0),
199hPdgCodemdGoodKink(0),
200hPmdGoodKink(0),
201hUIDGoodKinkDau(0),
202hdEdxGoodKink(0),
203hUIDPiDauPlus(0),
204hMultPiPlus(0),
205hPtPiPlus(0),
206hEtaPiPlus(0),
207hRapidityPiPlus(0),
208hQtPiPlus(0),
209hKinkAnglePiPlus(0),
210hPmKinkAngPiPlus(0),
211hKinkPosXYPiPlus(0),
212hKinkPosZRPiPlus(0),
213hKinkPosRPiPlus(0),
214hDCAkinkPiPlus(0),
215hPdgCodemdPiPlus(0),
216hPmdPiPlus(0),
217hdEdxPiPlus(0),
218hQtPimuPlus(0),
219hPmKinkAngPimuPlus(0),
220hQtPiotherPlus(0),
221hPmKinkAngPiotherPlus(0),
222hPdgCodemdPiotherPlus(0),
223hUIDPiDauMinus(0),
224hMultPiMinus(0),
225hPtPiMinus(0),
226hEtaPiMinus(0),
227hRapidityPiMinus(0),
228hQtPiMinus(0),
229hKinkAnglePiMinus(0),
230hPmKinkAngPiMinus(0),
231hKinkPosXYPiMinus(0),
232hKinkPosZRPiMinus(0),
233hKinkPosRPiMinus(0),
234hDCAkinkPiMinus(0),
235hPdgCodemdPiMinus(0),
236hPmdPiMinus(0),
237hdEdxPiMinus(0),
238hQtPimuMinus(0),
239hPmKinkAngPimuMinus(0),
240hQtPiotherMinus(0),
241hPmKinkAngPiotherMinus(0),
242hPdgCodemdPiotherMinus(0),
243hPdgCodemdQtRejected(0),
244hPtQtSelected(0),
245hPdgCodemdMaxAngRejected(0),
246hPtMaxAngSelected(0),
247hPdgCodemdRTPCclustersRejected(0),
248hPtRTPCclustersSelected(0),
249hRTPCclustersRTPCclustersSelected(0),
250hPdgCodemdMinvRejected(0),
251hPtSelected(0),
252hEtaSelected(0),
253hRapiditySelected(0),
254hQtSelected(0),
255hKinkAngleSelected(0),
256hDCAkinkSelected(0),
257hPmKinkAngSelected(0),
258hKinkPosXYSelected(0),
259hKinkPosZRSelected(0),
260hKinkPosRSelected(0),
261hPdgCodemdSelected(0),
262hPmdSelected(0),
263hMinvPimuSelected(0),
264hUIDKinkDauSelected(0),
265hdEdxSelected(0),
266hPtSelectedFake(0),
267hEtaSelectedFake(0),
268hRapiditySelectedFake(0),
269hQtSelectedFake(0),
270hKinkAngleSelectedFake(0),
271hDCAkinkSelectedFake(0),
272hPmKinkAngSelectedFake(0),
273hKinkPosXYSelectedFake(0),
274hKinkPosZRSelectedFake(0),
275hKinkPosRSelectedFake(0),
276hPmdSelectedFake(0),
277hMinvPimuSelectedFake(0),
278hdEdxSelectedFake(0),
279hPdgCodemddEdxRejected(0),
280hPtPiSelected(0),
281hEtaPiSelected(0),
282hRapidityPiSelected(0),
283hQtPiSelected(0),
284hKinkAnglePiSelected(0),
285hDCAkinkPiSelected(0),
286hPmKinkAngPiSelected(0),
287hKinkPosRTPCclusters1PiSelected(0),
288hKinkPosRTPCclusters2PiSelected(0),
289hKinkPosXYPiSelected(0),
290hKinkPosZRPiSelected(0),
291hKinkPosRPiSelected(0),
292hKinkPosZPiSelected(0),
293hPmPPiSelected(0),
294hPdgCodemdPiSelected(0),
295hPmdPiSelected(0),
296hMinvPimuPiSelected(0),
297hUIDKinkDauPiSelected(0),
298hdEdxPiSelected(0),
299hPtPiSelectedPlus(0),
300hEtaPiSelectedPlus(0),
301hRapidityPiSelectedPlus(0),
302hQtPiSelectedPlus(0),
303hKinkAnglePiSelectedPlus(0),
304hDCAkinkPiSelectedPlus(0),
305hPmKinkAngPiSelectedPlus(0),
306hKinkPosXYPiSelectedPlus(0),
307hKinkPosZRPiSelectedPlus(0),
308hPdgCodemdPiSelectedPlus(0),
309hPmdPiSelectedPlus(0),
310hMinvPimuPiSelectedPlus(0),
311hUIDPiDaumuSelectedPlus(0),
312hdEdxPiSelectedPlus(0),
313hPtPrimPiKinksPlus(0),
314hEtaPrimPiKinksPlus(0),
315hRapidityPrimPiKinksPlus(0),
316hPtSecondPiKinksPlus(0),
317hEtaSecondPiKinksPlus(0),
318hRapiditySecondPiKinksPlus(0),
319hPtNonPiKinksPlus(0),
320hEtaNonPiKinksPlus(0),
321hRapidityNonPiKinksPlus(0),
322hPdgCodemdNonPiKinksPlus(0),
323hPtPiSelectedMinus(0),
324hEtaPiSelectedMinus(0),
325hRapidityPiSelectedMinus(0),
326hQtPiSelectedMinus(0),
327hKinkAnglePiSelectedMinus(0),
328hDCAkinkPiSelectedMinus(0),
329hPmKinkAngPiSelectedMinus(0),
330hKinkPosXYPiSelectedMinus(0),
331hKinkPosZRPiSelectedMinus(0),
332hPdgCodemdPiSelectedMinus(0),
333hPmdPiSelectedMinus(0),
334hMinvPimuPiSelectedMinus(0),
335hUIDPiDaumuSelectedMinus(0),
336hdEdxPiSelectedMinus(0),
337hPtPrimPiKinksMinus(0),
338hEtaPrimPiKinksMinus(0),
339hRapidityPrimPiKinksMinus(0),
340hPtSecondPiKinksMinus(0),
341hEtaSecondPiKinksMinus(0),
342hRapiditySecondPiKinksMinus(0),
343hPtNonPiKinksMinus(0),
344hEtaNonPiKinksMinus(0),
345hRapidityNonPiKinksMinus(0),
346hPdgCodemdNonPiKinksMinus(0),// reconstruction histograms
347fListOfHistos(0),
348fLowMulcut(-1), fUpMulcut(-1),
349cLowPt(0), cRapidityLim(0),
350cLowR(0), cUpR(0),
351cLowZ(0), cUpZ(0),
352cLowKinkAngle(0),
353cLowQt(0), cUpQt(0),
354cLowInvMass(0), cUpInvMass(0),
355cSigmaCut(0),
356cPdgKaon(321), cPdgPion(211), cPdgMuon(13), cPdgElectron(11),
357cKaonMass(0), cPionMass(0), cMuonMass(0), cElectronMass(0),
358nBinsMult(0), hLowMult(0), hUpMult(0),
359nBinsPt(0), hLowPt(0), hUpPt(0),
360nBinsEta(0), hLowEta(0), hUpEta(0),
361nBinsQt(0), hLowQt(0), hUpQt(0),
362nBinsPdg(0), hLowPdg(0), hUpPdg(0),
363nBinsPdg2(0), hLowPdg2(0), hUpPdg2(0),
364nBinsUID(0), hLowUID(0), hUpUID(0),
365nBinsR(0), hLowR(0), hUpR(0),
366nBinsZ(0), hLowZ(0), hUpZ(0),
367nBinsXY(0), hLowXY(0), hUpXY(0),
368nBinsAngle(0), hLowAngle(0), hUpAngle(0),
369nBinsZV(0), hLowZV(0), hUpZV(0),
370nBinsXYV(0), hLowXYV(0), hUpXYV(0),
371nBinsInvMass(0), hLowInvMass(0), hUpInvMass(0),
372nBinsdEdx(0), hLowdEdx(0), hUpdEdx(0), fPIDResponse(0),
373fMaxDCAtoVtxCut(0), fTrackCuts(0)
374
375{
376//Multiplicity bins
377fMaxDCAtoVtxCut=new AliESDtrackCuts("fMaxDCAtoVtxCut","fMaxDCAtoVtxCut");
378fMaxDCAtoVtxCut->SetMaxDCAToVertexXYPtDep("0.0182+0.0350/pt^1.01");
379fMaxDCAtoVtxCut->SetMaxChi2TPCConstrainedGlobal(36);
380
381fTrackCuts = new AliESDtrackCuts("Multiplicity bins","Multiplicity bins");
382fTrackCuts->SetMinNClustersTPC(70);
383fTrackCuts->SetMaxChi2PerClusterTPC(4);
384fTrackCuts->SetAcceptKinkDaughters(kFALSE);
385fTrackCuts->SetRequireTPCRefit(kTRUE);
386fTrackCuts->SetRequireITSRefit(kTRUE);
387fTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kAny);
388fTrackCuts->SetMaxDCAToVertexXYPtDep("0.0182+0.0350/pt^1.01");
389fTrackCuts->SetMaxDCAToVertexZ(2);
390fTrackCuts->SetDCAToVertex2D(kFALSE);
391fTrackCuts->SetRequireSigmaToVertex(kFALSE);
392fTrackCuts->SetEtaRange(-0.8,+0.8);
393fTrackCuts->SetPtRange(0.15, 1e10);
394
395//DefineOutput(0, TList::Class());
396DefineOutput(1, TList::Class());
397}
398
399//________________________________________________________________________
400void AliAnalysisPionKinksMCESD::UserCreateOutputObjects() {
401fListOfHistos=new TList();
402
403//maximum kink angle for kaons to muons
404fMaxKinkAngKmu=new TF1("fMaxKinkAngKmu","((atan([0]*[1]*(1.0/(sqrt((x^2)*(1.0-([1]^2))-([0]^2)*([1]^2))))))*180.)/[2]",1.1,10.0);
405fMaxKinkAngKmu->SetParameter(0,cKaonMass);
406fMaxKinkAngKmu->SetParameter(1,0.9127037);
407fMaxKinkAngKmu->SetParameter(2,TMath::Pi());
408
409//maximum kink angle for pions to muons
410fMaxKinkAngPimu=new TF1("fMaxKinkAngPimu","((atan([0]*[1]*(1.0/(sqrt((x^2)*(1.0-([1]^2))-([0]^2)*([1]^2))))))*180.)/[2]",0.1,10.0);
411fMaxKinkAngPimu->SetParameter(0,cPionMass);
412fMaxKinkAngPimu->SetParameter(1,0.2731374);
413fMaxKinkAngPimu->SetParameter(2,TMath::Pi());
414
415//Create histograms
416TH1::SetDefaultSumw2();
417TH2::SetDefaultSumw2();
418
419//MC histograms
420hMCMult = new TH1F("hMCMult", "MC multiplicity; Number of tracks; Number of events", 100, 0.0, 2000);
421hMCMultPrim = new TH1F("hMCMultPrim", "MC primary tracks multiplicity; Number of tracks; Number of events", nBinsMult, hLowMult, hUpMult);
422hMCPtAll = new TH1F("hMCPtAll", "Transverse momentum of all MC tracks; p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
423hMCEtaAll = new TH1F("hMCEtaAll", "Pseudorapidity of all MC tracks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
424hMCPtPrim = new TH1F("hMCPtPrim", "Transverse momentum of primary MC tracks; p_{T} (GeV/c); dN/dp_{T}",nBinsPt, hLowPt, hUpPt);
425hMCEtaPrim = new TH1F("hMCEtaPrim", "Pseudorapidity of primary MC tracks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
426hMCPt = new TH1F("hMCPt", "Transverse momentum of selected MC tracks; p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
427hMCEta = new TH1F("hMCEta", "Pseudorapidity of selected MC tracks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
428hMCPdg = new TH1F("hMCPdg", "Pdg code of selected MC tracks; Pdg code; Number of particles", nBinsPdg, hLowPdg, hUpPdg);
429hMCMultPiPlus = new TH1F("hMCMultPiPlus", "MC pion multiplicity; Number of pion tracks; Number of events", nBinsMult, hLowMult, hUpMult);
430hMCPtPiPlus = new TH1F("hMCPtPiPlus", "Transverse momentum of selected MC pions; p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
431hMCEtaPiPlus = new TH1F("hMCEtaPiPlus", "Pseudorapidity of selected MC piaons; n; dN/dn", nBinsEta, hLowEta, hUpEta);
432hMCRapidityPiPlus = new TH1F("hMCRapidityPiPlus", "Pseudorapidity of selected MC pions; n; dN/dn", nBinsEta, hLowEta, hUpEta);
433hMCNDaughtersPlus = new TH1F("hMCNDaughtersPlus", "Number of daughters; number of daughers; number of pions", 10,0,10);
434hMCRadPiDauPlus = new TH1F("hMCRadPiDauPlus", "Radius of MC daughter generation position; R (cm); dN/dR", nBinsR, hLowR, hUpR);
435hMCKinkPosZPlus = new TH1F("hMCKinkPosZPlus", "z position of MC daughter generation vertex; z (cm); dN/dz", 100, 0.0, 500.0);
436hMCUIDPiDauPlus = new TH1F("hMCUIDPiDauPlus", "UID (method of production) of MC pion daughters; UID (method of production); Number of particles", 21, 0.0, 20);
437hMCPdgPiNonDecayedPlus = new TH1F("hMCPdgPiNonDecayedPlus", "Pdg code of MC pion non-decayed products; Pdg code; Number of particles", nBinsPdg, hLowPdg, hUpPdg);
438hMCPdgPiDauPlus = new TH1F("hMCPdgPiDauPlus", "Pdg code of MC pion daughters; Pdg code; Number of particles", nBinsPdg, hLowPdg, hUpPdg);
439hMCQtPlus = new TH1F("hMCQtPlus", "Daughter's transverse momentum in mother's frame for MC pion daughters; q_{T} (GeV/c); dN/dq_{T}", nBinsQt, hLowQt, hUpQt);
440hMCKinkAnglePlus = new TH1F("hMCKinkAnglePlus", "MC angle between pion mother's and daughter's momentum; #theta (#circ); dN/d#theta", nBinsAngle, hLowAngle, hUpAngle);
441hMCPKinkAngPlus = new TH2F("hMCPKinkAngPlus", "MC mother's P vs kink angle; P (GeV/c); #theta (#circ); dN/d#theta", nBinsPt, hLowPt, hUpPt, nBinsAngle, hLowAngle, hUpAngle);
442hMCPdgCodemdPlus = new TH2F("hMCPdgCodemdPlus", "MC mother vs daughter pdg code; Mother's pdg code; Daughter's pdg code", nBinsPdg, hLowPdg, hUpPdg, nBinsPdg, hLowPdg, hUpPdg);
443hMCPtmdPlus = new TH2F("hMCPtmdPlus", "MC mother vs daughter transverse momentum; Mother's p_{T} (GeV/c); Daughter's p_{T} (GeV/c)", nBinsPt, hLowPt, hUpPt, nBinsPt, hLowPt, hUpPt);
444hMCPtPimuonPlus = new TH1F("hMCPtPimuonPlus", "Transverse momentum of selected pions MC decaying to muons; p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
445hMCEtaPimuonPlus = new TH1F("hMCEtaPimuonPlus", "Pseudorapidity; n; dN/dn", nBinsEta, hLowEta, hUpEta);
446hMCRapidityPimuonPlus = new TH1F("hMCRapidityPimuonPlus", "Rapidity of selected MC tracks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
447hMCQtPimuonPlus = new TH1F("hMCQtPimuonPlus", "MC daughter's (muon) transverse momentum in mother's (pion) frame; q_{T} (GeV/c); dN/dq_{T}", nBinsQt, hLowQt, hUpQt);
448hMCPKinkAngPimuonPlus = new TH1F("hMCPKinkAngPimuonPlus", "MC angle between pion mother's and muon daughter's momentum; #theta (#circ); dN/d#theta", nBinsAngle, hLowAngle, hUpAngle);
449hMCPtPiotherPlus = new TH1F("hMCPtPiotherPlus", "Transverse momentum of selected pions MC not decaying to muons; p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
450hMCEtaPiotherPlus = new TH1F("hMCEtaPiotherPlus", "Pseudorapidity; n; dN/dn", nBinsEta, hLowEta, hUpEta);
451hMCRapidityPiotherPlus = new TH1F("hMCRapidityPiotherPlus", "Rapidity of selected MC tracks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
452hMCQtPiotherPlus = new TH1F("hMCQtPiotherPlus", "MC daughter's (muon) transverse momentum in mother's (pion) frame; q_{T} (GeV/c); dN/dq_{T}", nBinsQt, hLowQt, hUpQt);
453hMCPKinkAngPiotherPlus = new TH1F("hMCPKinkAngPiotherPlus", "MC angle between pion mother's and non-muon daughter's momentum; #theta (#circ); dN/d#theta", nBinsAngle, hLowAngle, hUpAngle);
454hMCMultPiMinus = new TH1F("hMCMultPiMinus", "MC pion multiplicity; Number of pion tracks; Number of events", nBinsMult, hLowMult, hUpMult);
455hMCPtPiMinus = new TH1F("hMCPtPiMinus", "Transverse momentum of selected MC pions; p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
456hMCEtaPiMinus = new TH1F("hMCEtaPiMinus", "Pseudorapidity of selected MC pions; n; dN/dn", nBinsEta, hLowEta, hUpEta);
457hMCRapidityPiMinus = new TH1F("hMCRapidityPiMinus", "Pseudorapidity of selected MC pions; n; dN/dn", nBinsEta, hLowEta, hUpEta);
458hMCNDaughtersMinus = new TH1F("hMCNDaughtersMinus", "Number of daughters; number of daughers; number of pions", 10,0,10);
459hMCRadPiDauMinus = new TH1F("hMCRadPiDauMinus", "Radius of MC daughter generation position; R (cm); dN/dR", nBinsR, hLowR, hUpR);
460hMCKinkPosZMinus = new TH1F("hMCKinkPosZMinus", "z position of MC daughter generation vertex; z (cm); dN/dz", 100, 0.0, 500.0);
461hMCUIDPiDauMinus = new TH1F("hMCUIDPiDauMinus", "UID (method of production) of MC pion daughters; UID (method of production); Number of particles", 21, 0.0, 20);
462hMCPdgPiNonDecayedMinus = new TH1F("hMCPdgPiNonDecayedMinus", "Pdg code of MC pion non-decayed products; Pdg code; Number of particles", nBinsPdg, hLowPdg, hUpPdg);
463hMCPdgPiDauMinus = new TH1F("hMCPdgPiDauMinus", "Pdg code of MC pion daughters; Pdg code; Number of particles", nBinsPdg, hLowPdg, hUpPdg);
464hMCQtMinus = new TH1F("hMCQtMinus", "Daughter's transverse momentum in mother's frame for MC pion daughters; q_{T} (GeV/c); dN/dq_{T}", nBinsQt, hLowQt, hUpQt);
465hMCKinkAngleMinus = new TH1F("hMCKinkAngleMinus", "MC angle between pion mother's and daughter's momentum; #theta (#circ); dN/d#theta", nBinsAngle, hLowAngle, hUpAngle);
466hMCPKinkAngMinus = new TH2F("hMCPKinkAngMinus", "MC mother's P vs kink angle; P (GeV/c); #theta (#circ); dN/d#theta", nBinsPt, hLowPt, hUpPt, nBinsAngle, hLowAngle, hUpAngle);
467hMCPdgCodemdMinus = new TH2F("hMCPdgCodemdMinus", "MC mother vs daughter pdg code; Mother's pdg code; Daughter's pdg code", nBinsPdg, hLowPdg, hUpPdg, nBinsPdg, hLowPdg, hUpPdg);
468hMCPtmdMinus = new TH2F("hMCPtmdMinus", "MC mother vs daughter transverse momentum; Mother's p_{T} (GeV/c); Daughter's p_{T} (GeV/c)", nBinsPt, hLowPt, hUpPt, nBinsPt, hLowPt, hUpPt);
469hMCPtPimuonMinus = new TH1F("hMCPtPimuonMinus", "Transverse momentum of selected pions MC decaying to muons; p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
470hMCEtaPimuonMinus = new TH1F("hMCEtaPimuonMinus", "Pseudorapidity; n; dN/dn", nBinsEta, hLowEta, hUpEta);
471hMCRapidityPimuonMinus = new TH1F("hMCRapidityPimuonMinus", "Rapidity of selected MC tracks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
472hMCQtPimuonMinus = new TH1F("hMCQtPimuonMinus", "MC daughter's (muon) transverse momentum in mother's (pion) frame; q_{T} (GeV/c); dN/dq_{T}", nBinsQt, hLowQt, hUpQt);
473hMCPKinkAngPimuonMinus = new TH1F("hMCPKinkAngPimuonMinus", "MC angle betweenpion mother's and muon daughter's momentum; #theta (#circ); dN/d#theta", nBinsAngle, hLowAngle, hUpAngle);
474hMCPtPiotherMinus = new TH1F("hMCPtPiotherMinus", "Transverse momentum of selected pions MC not decaying to muons; p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
475hMCEtaPiotherMinus = new TH1F("hMCEtaPiotherMinus", "Pseudorapidity; n; dN/dn", nBinsEta, hLowEta, hUpEta);
476hMCRapidityPiotherMinus = new TH1F("hMCRapidityPiotherMinus", "Rapidity of selected MC tracks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
477hMCQtPiotherMinus = new TH1F("hMCQtPiotherMinus", "MC daughter's (muon) transverse momentum in mother's (pion) frame; q_{T} (GeV/c); dN/dq_{T}", nBinsQt, hLowQt, hUpQt);
478hMCPKinkAngPiotherMinus = new TH1F("hMCPKinkAngPiotherMinus", "MC angle betweenpion mother's and non-muon daughter's momentum; #theta (#circ); dN/d#theta", nBinsAngle, hLowAngle, hUpAngle);
479
480
481//Reconstruction histograms
482hMult = new TH1F("hMult", "Multiplicity (unbiased); Number of tracks; Number of events", nBinsMult, hLowMult, hUpMult);
483hAcceptedMult = new TH1F("hAcceptedMult", "Multiplicity (biased); Number of tracks; Number of events", nBinsMult, hLowMult, hUpMult);
484hMultPS = new TH1F("hMultPS", "Multiplicity after physics selection; Number of tracks; Number of events", nBinsMult, hLowMult, hUpMult);
485hvtx = new TH3F("hvtx", "Reconstructed primary vertex position; x axis; y axis; z axis", nBinsXYV, hLowXYV, hUpXYV, nBinsXYV, hLowXYV, hUpXYV, nBinsZV, hLowZV, hUpZV);
486hvtxy = new TH2F("hvtxy", "Reconstructed primary vertex position in x-y plane; x axis; y axis", nBinsXYV, hLowXYV, hUpXYV, nBinsXYV, hLowXYV, hUpXYV);
487hvtyz = new TH2F("hvtyz", "Reconstructed primary vertex position in y-z plane; y axis; z axis", nBinsXYV, hLowXYV, hUpXYV, nBinsZV, hLowZV, hUpZV);
488hvtxz = new TH2F("hvtxz", "Reconstructed primary vertex position in x-z plane; x axis; z axis", nBinsXYV, hLowXYV, hUpXYV, nBinsZV, hLowZV, hUpZV);
489hMultPSV = new TH1F("hMultPSV", "Multiplicity after physics selection & vertex cut; Number of tracks; Number of events", nBinsMult, hLowMult, hUpMult);
490hPtAll = new TH1F("hPtAll", "Transverse momentum of all tracks; p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
491hEtaAll = new TH1F("hEtaAll", "Pseudorapidity of all tracks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
492hTrackPos = new TH3F("hTrackPos", "Generetion position of all reconstructed tracks", nBinsXYV, hLowXYV, hUpXYV, nBinsXYV, hLowXYV, hUpXYV, nBinsZV, hLowZV, hUpZV);
493hTrackPosxy = new TH2F("hTrackPosxy", "Generetion position of all reconstructed tracks in x-y plane; x axis; y axis", nBinsXYV, hLowXYV, hUpXYV, nBinsXYV, hLowXYV, hUpXYV);
494hTrackPosyz = new TH2F("hTrackPosyz", "Generetion position of all reconstructed tracks in y-z plane; y axis; z axis", nBinsXYV, hLowXYV, hUpXYV, nBinsZV, hLowZV, hUpZV);
495hTrackPosxz = new TH2F("hTrackPosxz", "Generetion position of all reconstructed tracks in x-z plane; x axis; z axis", nBinsXYV, hLowXYV, hUpXYV, nBinsZV, hLowZV, hUpZV);
496//hTPCchi2clusters = new TH1F("hTPCchi2clusters", "#chi^{2}/Number of TPC clusters; #chi^{2}; TPC clusters)", 100, 0.0, 2.0);//
497//hdcaToVertexXY = new TH1F("hdcaToVertexXY", "Track to vertex impact parameter in x-y plane; DCA_{z} (cm); dN/d(DCA_{z})", 100, 0.0, 2.0);//
498//hdcaToVertexZ = new TH1F("hdcaToVertexZ", "Track to vertex impact parameter in z axis; DCA_{z} (cm); dN/d(DCA_{z})", 100, 0.0, 2.0);//
499hMultPrim = new TH1F("hMultPrim", "ESD primary - supposed tracks multiplicity; Number of tracks; Number of events", nBinsMult, hLowMult, hUpMult);
500hPtPrim = new TH1F("hPtPrim", "Transverse momentum of primary - supposed ESD tracks; p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
501hEtaPrim = new TH1F("hEtaPrim", "Pseudorapidity of primary - supposed ESD tracks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
502hPrimTrackPos = new TH3F("hPrimTrackPos", "Generetion position of selected tracks (DCA and quality cuts)", nBinsXYV, hLowXYV, hUpXYV, nBinsXYV, hLowXYV, hUpXYV, nBinsZV, hLowZV, hUpZV);
503hPrimTrackPosxy = new TH2F("hPrimTrackPosxy", "Generetion position of selected tracks in x-y plane (DCA and quality cuts); x axis; y axis", nBinsXYV, hLowXYV, hUpXYV, nBinsXYV, hLowXYV, hUpXYV);
504hPrimTrackPosyz = new TH2F("hPrimTrackPosyz", "Generetion position of selected tracks in y-z plane (DCA and quality cuts); y axis; z axis", nBinsXYV, hLowXYV, hUpXYV, nBinsZV, hLowZV, hUpZV);
505hPrimTrackPosxz = new TH2F("hPrimTrackPosxz", "Generetion position of selected tracks in x-z plane (DCA and quality cuts); x axis; z axis", nBinsXYV, hLowXYV, hUpXYV, nBinsZV, hLowZV, hUpZV);
506hPt = new TH1F("hPt", "Transverse momentum of selected ESD tracks; p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
507hEta = new TH1F("hEta", "Pseudorapidity of selected ESD tracks; n; Number of tracks dN/dn", nBinsEta, hLowEta, hUpEta);
508//hRapidity = new TH1F("hRapidity", "Rapidity of selected ESD tracks; n; Number of tracks dN/dn", nBinsEta, hLowEta, hUpEta);
509hPtKink = new TH1F("hPtKink", "Mother's transverse momentum for all ESD kinks; p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
510hEtaKink = new TH1F("hEtaKink", "Mother's pseudorapidity for all ESD kinks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
511hRapidityKink = new TH1F("hRapidityKink", "Mother's rapidity for all ESD kinks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
512hPmP = new TH2F("hPmP", "Mother's momentum as calculated by kink and by track; P_{kink}; P_{track}", nBinsPt, hLowPt, hUpPt, nBinsPt, hLowPt, hUpPt);
513hKinkPosRTPCclusters1 = new TH1F("hKinkPosRTPCclusters1", " ;kinkposR; tpc clusters",100,0,1);
514hKinkPosRTPCclusters2 = new TH2F("hKinkPosRTPCclusters2", " ;kinkposR; tpc clusters",nBinsR, hLowR, hUpR,100,0,200 );
515hQt = new TH1F("hQt", "Daughter's transverse momentum in mother's frame for all ESD kinks; q_{T} (GeV/c); dN/dq_{T}", nBinsQt, hLowQt, hUpQt);
516hKinkAngle = new TH1F("hKinkAngle", "Kink angle for all ESD kinks; #theta (#circ); dN/d#theta", nBinsAngle, hLowAngle, hUpAngle);
517hDCAkink = new TH1F("hDCAkink", "DCA between the two kink tracks; DCA(cm); Number of kinks", 100, 0.0, 2.0);
518hPmKinkAng = new TH2F("hPmKinkAng", "k, p_(GeV/c); #theta (#circ); d^{2}N/dpd#theta", nBinsPt, hLowPt, hUpPt, nBinsAngle, hLowAngle, hUpAngle);
519hKinkPosXY = new TH2F("hKinkPosXY", "X-Y Position of all kinks; X (cm); Y (cm)", nBinsXY, hLowXY, hUpXY, nBinsXY, hLowXY, hUpXY);
520hKinkPosZY = new TH2F("hKinkPosZY", "z vs y position of kinks (DCA, quality, p_{T} & y cuts); z (cm); y (cm)", nBinsZ, hLowZ, hUpZ, nBinsXY, hLowXY, hUpXY);
521hKinkPosZR = new TH2F("hKinkPosZR", "Z vs radius of all kinks position; Z (cm); R (cm)", nBinsZ, hLowZ, hUpZ, nBinsR, hLowR, hUpR);
522hKinkPosR = new TH1F("hKinkPosR", "Position radius of all ESD kinks; R (cm); dN/dR", nBinsR, hLowR, hUpR);
523hKinkPosZ = new TH1F("hKinkPosZ", "z position of kinks (DCA, quality, p_{T} & y cuts); z (cm); dN/dz", nBinsZ, -1, 1);
524hKinkPosZMCKinkPosZ = new TH2F("hKinkPosZMCKinkPosZ", "Reconstructed vs generated z position of kinks (DCA, quality, p_{T} & y cuts); z (cm); dN/dz", nBinsZ, hLowZ, hUpZ, nBinsZ, hLowZ, hUpZ);
525hPdgCodemd = new TH2F("hPdgCodemd", "Mother vs daughter pdg code for all ESD kinks; Mother's pdg code; Daughter's pdg code", nBinsPdg, hLowPdg, hUpPdg, nBinsPdg, hLowPdg, hUpPdg);
526hPmd = new TH2F("hPmd", "ESD mother vs daughter momentum magnitude; Mother's P (GeV/c); Daughter's P (GeV/c)", nBinsPt, hLowPt, hUpPt, nBinsPt, hLowPt, hUpPt);
527hMinvPimu = new TH1F("hMinvPimu", "Invariant mass of ESD pions decaying to muons; m (GeV/c^{2}); dN/dm", nBinsInvMass, hLowInvMass, hUpInvMass);
528hUIDKinkDau = new TH1F("hUIDKinkDau", "UID (method of production) of all ESD pion kink daughters (perfect PID); UID (method of production); Number of particles", 21, 0.0, 20);
529hdEdx = new TH2F("hdEdx", "dE/dx vs mother's momentum; p (GeV/c); dE/dx (GeV/cm)", nBinsPt, hLowPt, hUpPt, 100, 0.0, 300.0);
530hPtKinkFake = new TH1F("hPtKinkFake", "Mother's transverse momentum for all fake kinks; p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
531hEtaKinkFake = new TH1F("hEtaKinkFake", "Mother's pseudorapidity for all fake kinks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
532hRapidityKinkFake = new TH1F("hRapidityKinkFake", "Mother's rapidity for all fake kinks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
533hPmPFake = new TH2F("hPmPFake", "Mother's momentum magnitude calculated from kink vs calculated from track for all fake kinks; p_{kink} (GeV/c); p_{track} (GeV/c)", nBinsPt, hLowPt, hUpPt, nBinsPt, hLowPt, hUpPt);
534hKinkPosRTPCclusters1Fake = new TH1F("hKinkPosRTPCclusters1Fake", " ;kinkposR; tpc clusters",100,0,1);
535hKinkPosRTPCclusters2Fake = new TH2F("hKinkPosRTPCclusters2Fake", " ;kinkposR; tpc clusters",nBinsR, hLowR, hUpR,100,0,200 );
536hQtFake = new TH1F("hQtFake", "Daughter's transverse momentum in mother's frame for all fake kinks; q_{T} (GeV/c); dN/dq_{T}", nBinsQt, hLowQt, hUpQt);
537hKinkAngleFake = new TH1F("hKinkAngleFake", "Kink angle for all fake kinks; #theta (#circ); dN/d#theta", nBinsAngle, hLowAngle, hUpAngle);
538hDCAkinkFake = new TH1F("hDCAkinkFake", "DCA between the two fake kink tracks; DCA(cm); Number of kinks", 100, 0.0, 2.0);
539hPmKinkAngFake = new TH2F("hPmKinkAngFake", "k, p_(GeV/c); #theta (#circ); d^{2}N/dpd#theta", nBinsPt, hLowPt, hUpPt, nBinsAngle, hLowAngle, hUpAngle);
540hKinkPosXYFake = new TH2F("hKinkPosXYFake", "X-Y Position of all fake kinks; X (cm); Y (cm)", nBinsXY, hLowXY, hUpXY, nBinsXY, hLowXY, hUpXY);
541hKinkPosZYFake = new TH2F("hKinkPosZYFake", "z vs y position of fake kinks (DCA, quality, p_{T} & y cuts); z (cm); y (cm)", nBinsZ, hLowZ, hUpZ, nBinsXY, hLowXY, hUpXY);
542hKinkPosZRFake = new TH2F("hKinkPosZRFake", "Z vs radius of all fake kinks position; Z (cm); R (cm)", nBinsZ, hLowZ, hUpZ, nBinsR, hLowR, hUpR);
543hKinkPosRFake = new TH1F("hKinkPosRFake", "Position radius of all fake kinks; R (cm); dN/dR", nBinsR, hLowR, hUpR);
544hKinkPosZFake = new TH1F("hKinkPosZFake", "z position of fake kinks (DCA, quality, p_{T} & y cuts); z (cm); dN/dz", nBinsZ, -1, 1);
545hKinkPosZMCKinkPosZFake = new TH2F("hKinkPosZMCKinkPosZFake", "Reconstructed vs generated z position of fake kinks (DCA, quality, p_{T} & y cuts); z (cm); dN/dz", nBinsZ, hLowZ, hUpZ, nBinsZ, hLowZ, hUpZ);
546hPdgCodemdFake = new TH2F("hPdgCodemdFake", "Mother vs daughter pdg code for fakes; Mother's pdg code; Daughter's pdg code", nBinsPdg, hLowPdg, hUpPdg, nBinsPdg, hLowPdg, hUpPdg);
547hPmdFake = new TH2F("hPmdFake", "ESD mother vs daughter momentum magnitude (fake kinks); Mother's P (GeV/c); Daughter's P (GeV/c)", nBinsPt, hLowPt, hUpPt, nBinsPt, hLowPt, hUpPt);
548hMinvPimuFake = new TH1F("hMinvPimuFake", "Invariant mass of ESD pions decaying to muons (fake kinks); m (GeV/c^{2}); dN/dm", nBinsInvMass, hLowInvMass, hUpInvMass);
549hUIDKinkDauFake = new TH1F("hUIDKinkDauFake", "UID (method of production) of all ESD pion kink daughters (perfect PID); UID (method of production); Number of particles", 21, 0.0, 20);
550hdEdxFake = new TH2F("hdEdxFake", "dE/dx vs mother's momentum; p (GeV/c); dE/dx (GeV/cm)", nBinsPt, hLowPt, hUpPt, 100, 0.0, 300.0);
551hPtPosRSelected = new TH1F("hPtPosRSelected", "Mother's transverse momentum for selected kinks (DCA, quality, p_{T}, y & R cuts); R (cm); dN/dR", nBinsPt, hLowPt, hUpPt);
552hPdgCodemdZRejected = new TH2F("hPdgCodemdZRejected", "Mother's vs daughter's pdg code for rejected kinks (DCA, quality, p_{T}, y, R & z cuts); Mother's pdg code; Daughter's pdg code", nBinsPdg, hLowPdg, hUpPdg, nBinsPdg, hLowPdg, hUpPdg);
553hPtZSelected = new TH1F("hPtZSelected", "Mother's transverse momentum for selected kinks (DCA, quality, p_{T}, y, R & z cuts); p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
554hPdgCodemdAngRejected = new TH2F("hPdgCodemdAngRejected", "Mother's vs daughter's pdg code for rejected kinks (DCA, quality, p_{T}, y, R, z & #theta cuts); Mother's pdg code; Daughter's pdg code", nBinsPdg, hLowPdg, hUpPdg, nBinsPdg, hLowPdg, hUpPdg);
555hPtAngSelected = new TH1F("hPtAngSelected", "Mother's transverse momentum for selected kinks (DCA, quality, p_{T}, y, R, z & #theta cuts); p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
556hPdgCodemdPmRejected = new TH2F("hPdgCodemdPmRejected", "Mother's vs daughter's pdg code for rejected kinks (DCA, quality, p_{T}, y, R, z, #theta & p_{track}/p{kink} cuts); Mother's pdg code; Daughter's pdg code", nBinsPdg, hLowPdg, hUpPdg, nBinsPdg, hLowPdg, hUpPdg);
557hPtPmSelected = new TH1F("hPtPmSelected", "Mother's transverse momentum for selected kinks (DCA, quality, p_{T}, y, R, z, #theta & p_{track}/p{kink} cuts); p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
558hPdgCodemdQtLowRejected = new TH2F("hPdgCodemdQtLowRejected", "Mother's vs daughter's pdg code for rejected kinks (DCA, quality, p_{T}, y, R, z, #theta, p_{track}/p{kink} & low q_{T} cuts); Mother's pdg code; Daughter's pdg code", nBinsPdg, hLowPdg, hUpPdg, nBinsPdg, hLowPdg, hUpPdg);
559hPtGoodKink = new TH1F("hPtGoodKink", "Mother's transverse momentum for real ESD kinks (realistic PID); p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
560hEtaGoodKink = new TH1F("hEtaGoodKink", "Mother's pseudorapidity for real ESD kinks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
561hRapidityGoodKink = new TH1F("hRapidityGoodKink", "Mother's rapidity for real ESD kinks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
562hQtGoodKink = new TH1F("hQtGoodKink", "Daughter's transverse momentum in mother's frame for real ESD kinks (realistic PID); q_{T} (GeV/c); dN/dq_{T}", 200, 0.0, 0.3);
563hPmGoodKinkAng = new TH2F("hPmGoodKinkAng", "Mother's momentum magnitude vs kink angle for real ESD kinks (realistic PID); p_{T} (GeV/c); #theta (#circ); d^{2}N/dp_{T}d#theta", nBinsPt, hLowPt, hUpPt, nBinsAngle, hLowAngle, hUpAngle);
564hPdgCodemdGoodKink = new TH2F("hPdgCodemdGoodKink", "Mother vs daughter pdg code for real ESD kinks; Mother's pdg code; Daughter's pdg code", nBinsPdg, hLowPdg, hUpPdg, nBinsPdg, hLowPdg, hUpPdg);
565hPmdGoodKink = new TH2F("hPmdGoodKink", "Mother vs daughter momentum magnitude for real ESD kinks (realistic PID); Mother's P; Daughter's P", nBinsPt, hLowPt, hUpPt, nBinsPt, hLowPt, hUpPt);
566hUIDGoodKinkDau = new TH1F("hUIDGoodKinkDau", "UID (method of production); UID (method of production); Number of particles", 21, 0.0, 20);
567hdEdxGoodKink = new TH2F("hdEdxGoodKink", "dE/dx vs mother's momentum; p (GeV/c); dE/dx (GeV/cm)", nBinsPt, hLowPt, hUpPt, 100, 0.0, 300.0);
568hUIDPiDauPlus = new TH1F("hUIDPiDauPlus", "UID (method of production) of all ESD pion kink daughters (perfect PID); UID (method of production); Number of particles", 21, 0.0, 20);
569hMultPiPlus = new TH1F("hMultPiPlus", "ESD pion multiplicity in selected TPC area; Number of pions; Number of events", 100, 0.0, 200.0);
570hPtPiPlus = new TH1F("hPtPiPlus", "Mother's transverse momentum for ESD pion kinks (perfect PID); p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
571hEtaPiPlus = new TH1F("hEtaPiPlus", "Mother's pseudorapidity for ESD pion kinks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
572hRapidityPiPlus = new TH1F("hRapidityPiPlus", "Mother's rapidity for ESD pion kinks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
573hQtPiPlus = new TH1F("hQtPiPlus", "Daughter's transverse momentum in mother's frame for ESD pion kinks (perfect PID); q_{T} (GeV/c); dN/dq_{T}", 100, 0.0, 0.1);
574hKinkAnglePiPlus = new TH1F("hKinkAnglePiPlus", "Kink angle of ESD pion kinks (perfect PID); #theta (#circ); dN/d#theta", nBinsAngle, hLowAngle, hUpAngle);
575hPmKinkAngPiPlus = new TH2F("hPmKinkAngPiPlus", "Mother's momentum magnitude vs kink angle for ESD pion kinks (perfect PID); p_{T} (GeV/c); #theta (#circ); d^{2}N/dp_{T}d#theta", nBinsPt, hLowPt, hUpPt, nBinsAngle, hLowAngle, hUpAngle);
576hKinkPosXYPiPlus = new TH2F("hKinkPosXYPiPlus", "X-Y Position ; X (cm); Y (cm)", nBinsXY, hLowXY, hUpXY, nBinsXY, hLowXY, hUpXY);
577hKinkPosZRPiPlus = new TH2F("hKinkPosZRPiPlus", "Z vs radius of all fake kinks position; Z (cm); R (cm)", nBinsZ, hLowZ, hUpZ, nBinsR, hLowR, hUpR);
578hKinkPosRPiPlus = new TH1F("hKinkPosRPiPlus", "Position radius of all fake kinks; R (cm); dN/dR", nBinsR, hLowR, hUpR);
579hDCAkinkPiPlus = new TH1F("hDCAkinkPiPlus", "DCA; DCA(cm); Number of kinks", 100, 0.0, 2.0);
580hPdgCodemdPiPlus = new TH2F("hPdgCodemdPiPlus", "Mother vs daughter pdg code for pi kinks; Mother's pdg code; Daughter's pdg code", nBinsPdg, hLowPdg, hUpPdg, nBinsPdg, hLowPdg, hUpPdg);
581hPmdPiPlus = new TH2F("hPmdPiPlus", "Mother vs daughter momentum magnitude for pi kinks (realistic PID); Mother's P; Daughter's P", nBinsPt, hLowPt, hUpPt, nBinsPt, hLowPt, hUpPt);
582hdEdxPiPlus = new TH2F("hdEdxPiPlus", "dE/dx vs mother's momentum; p (GeV/c); dE/dx (GeV/cm)", nBinsPt, hLowPt, hUpPt, 100, 0.0, 300.0);
583hQtPimuPlus = new TH1F("hQtPimuPlus", "Daughter's transverse momentum in mother's frame for ESD pion to muon kinks (perfect PID); q_{T} (GeV/c); dN/dq_{T}", 100, 0.0, 0.1);
584hPmKinkAngPimuPlus = new TH2F("hPmKinkAngPimuPlus", "Mother's momentum magnitude vs kink angle for ESD pion to muon kinks (perfect PID); p_{T} (GeV/c); #theta (#circ); d^{2}N/dp_{T}d#theta", nBinsPt, hLowPt, hUpPt, nBinsAngle, hLowAngle, hUpAngle);
585hQtPiotherPlus = new TH1F("hQtPiotherPlus", "Daughter's transverse momentum in mother's frame for ESD pion to other (not muon) kinks (perfect PID); q_{T} (GeV/c); dN/dq_{T}", 100, 0.0, 0.1);
586hPmKinkAngPiotherPlus = new TH2F("hPmKinkAngPiotherPlus", "Mother's momentum magnitude vs kink angle for ESD pion to other (not muon) kinks (perfect PID); p_{T} (GeV/c); #theta (#circ); d^{2}N/dp_{T}d#theta", nBinsPt, hLowPt, hUpPt, nBinsAngle, hLowAngle, hUpAngle);
587hPdgCodemdPiotherPlus = new TH2F("hPdgCodemdPiotherPlus", "Mother vs daughter pdg code for ESD pion to other (not muon) kinks (perfect PID); Mother's pdg code; Daughter's pdg code", nBinsPdg, hLowPdg, hUpPdg, nBinsPdg, hLowPdg, hUpPdg);
588hUIDPiDauMinus = new TH1F("hUIDPiDauMinus", "UID (method of production) of all ESD pion kink daughters (perfect PID); UID (method of production); Number of particles", 21, 0.0, 20);
589hMultPiMinus = new TH1F("hMultPiMinus", "ESD pion multiplicity in selected TPC area; Number of pions; Number of events", 100, 0.0, 200.0);
590hPtPiMinus = new TH1F("hPtPiMinus", "Mother's transverse momentum for ESD pion kinks (perfect PID); p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
591hEtaPiMinus = new TH1F("hEtaPiMinus", "Mother's pseudorapidity for ESD pion kinks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
592hRapidityPiMinus = new TH1F("hRapidityPiMinus", "Mother's rapidity for ESD pion kinks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
593hQtPiMinus = new TH1F("hQtPiMinus", "Daughter's transverse momentum in mother's frame for ESD pion kinks (perfect PID); q_{T} (GeV/c); dN/dq_{T}", 100, 0.0, 0.1);
594hKinkAnglePiMinus = new TH1F("hKinkAnglePiMinus", "Kink angle of ESD pion kinks (perfect PID); #theta (#circ); dN/d#theta", nBinsAngle, hLowAngle, hUpAngle);
595hPmKinkAngPiMinus = new TH2F("hPmKinkAngPiMinus", "Mother's momentum magnitude vs kink angle for ESD pion kinks (perfect PID); p_{T} (GeV/c); #theta (#circ); d^{2}N/dp_{T}d#theta", nBinsPt, hLowPt, hUpPt, nBinsAngle, hLowAngle, hUpAngle);
596hKinkPosXYPiMinus = new TH2F("hKinkPosXYPiMinus", "X-Y Position ; X (cm); Y (cm)", nBinsXY, hLowXY, hUpXY, nBinsXY, hLowXY, hUpXY);
597hKinkPosZRPiMinus = new TH2F("hKinkPosZRPiMinus", "Z vs radius of all fake kinks position; Z (cm); R (cm)", nBinsZ, hLowZ, hUpZ, nBinsR, hLowR, hUpR);
598hKinkPosRPiMinus = new TH1F("hKinkPosRPiMinus", "Position radius of all fake kinks; R (cm); dN/dR", nBinsR, hLowR, hUpR);
599hDCAkinkPiMinus = new TH1F("hDCAkinkPiMinus", "DCA; DCA(cm); Number of kinks", 100, 0.0, 2.0);
600hPdgCodemdPiMinus = new TH2F("hPdgCodemdPiMinus", "Mother vs daughter pdg code for pi kinks; Mother's pdg code; Daughter's pdg code", nBinsPdg, hLowPdg, hUpPdg, nBinsPdg, hLowPdg, hUpPdg);
601hPmdPiMinus = new TH2F("hPmdPiMinus", "Mother vs daughter momentum magnitude for pi kinks (realistic PID); Mother's P; Daughter's P", nBinsPt, hLowPt, hUpPt, nBinsPt, hLowPt, hUpPt);
602hdEdxPiMinus = new TH2F("hdEdxPiMinus", "dE/dx vs mother's momentum; p (GeV/c); dE/dx (GeV/cm)", nBinsPt, hLowPt, hUpPt, 100, 0.0, 300.0);
603hQtPimuMinus = new TH1F("hQtPimuMinus", "Daughter's transverse momentum in mother's frame for ESD pion to muon kinks (perfect PID); q_{T} (GeV/c); dN/dq_{T}", 100, 0.0, 0.1);
604hPmKinkAngPimuMinus = new TH2F("hPmKinkAngPimuMinus", "Mother's momentum magnitude vs kink angle for ESD pion to muon kinks (perfect PID); p_{T} (GeV/c); #theta (#circ); d^{2}N/dp_{T}d#theta", nBinsPt, hLowPt, hUpPt, nBinsAngle, hLowAngle, hUpAngle);
605hQtPiotherMinus = new TH1F("hQtPiotherMinus", "Daughter's transverse momentum in mother's frame for ESD pion to other (not muon) kinks (perfect PID); q_{T} (GeV/c); dN/dq_{T}", 100, 0.0, 0.1);
606hPmKinkAngPiotherMinus = new TH2F("hPmKinkAngPiotherMinus", "Mother's momentum magnitude vs kink angle for ESD pion to other (not muon) kinks (perfect PID); p_{T} (GeV/c); #theta (#circ); d^{2}N/dp_{T}d#theta", nBinsPt, hLowPt, hUpPt, nBinsAngle, hLowAngle, hUpAngle);
607hPdgCodemdPiotherMinus = new TH2F("hPdgCodemdPiotherMinus", "Mother vs daughter pdg code for ESD pion to other (not muon) kinks (perfect PID); Mother's pdg code; Daughter's pdg code", nBinsPdg, hLowPdg, hUpPdg, nBinsPdg, hLowPdg, hUpPdg);
608hPdgCodemdQtRejected = new TH2F("hPdgCodemdQtRejected", "Mother's vs daughter's pdg code for rejected kinks (DCA, quality, p_{T}, y, R, z, #theta, p_{track}/p{kink} & q^{T} cuts); Mother's pdg code; Daughter's pdg code", nBinsPdg, hLowPdg, hUpPdg, nBinsPdg, hLowPdg, hUpPdg);
609hPtQtSelected = new TH1F("hPtQtSelected", "Mother's transverse momentum for selected kinks (DCA, quality, p_{T}, y, R, z, #theta, p_{track}/p{kink} & q^{T} cuts); p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
610hPdgCodemdMaxAngRejected = new TH2F("hPdgCodemdMaxAngRejected", "Mother's vs daughter's pdg code for rejected kinks (DCA, quality, p_{T}, y, R, z, #theta, p_{track}/p{kink}, q^{T} & #theta_{max} cuts); Mother's pdg code; Daughter's pdg code", nBinsPdg, hLowPdg, hUpPdg, nBinsPdg, hLowPdg, hUpPdg);
611hPtMaxAngSelected = new TH1F("hPtMaxAngSelected", "Mother's transverse momentum for selected kinks (DCA, quality, p_{T}, y, R, z, #theta, p_{track}/p{kink}, q^{T} & #theta_{max} cuts); p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
612hPdgCodemdRTPCclustersRejected = new TH2F("hPdgCodemdRTPCclustersRejected", "Mother's vs daughter's pdg code for rejected kinks (DCA, quality, p_{T}, y, R, z, #theta, p_{track}/p{kink}, q^{T}, #theta_{max} & R/TPC clusters cuts); Mother's pdg code; Daughter's pdg code", nBinsPdg, hLowPdg, hUpPdg, nBinsPdg, hLowPdg, hUpPdg);
613hPtRTPCclustersSelected = new TH1F("hPtRTPCclustersSelected", "Mother's transverse momentum for selected kinks (DCA, quality, p_{T}, y, R, z, #theta, p_{track}/p{kink}, q^{T}, #theta_{max} & R/TPC clusters cuts); p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
614hRTPCclustersRTPCclustersSelected = new TH2F("hRTPCclustersRTPCclustersSelected", "Number of TPC clusters vs radius for selected kinks (DCA, quality, p_{T}, y, R, z, #theta, p_{track}/p{kink}, q^{T}, #theta_{max} & R/TPC clusters cuts) R (cm); number of TPC clusters", nBinsR, hLowR, hUpR, 100, 0, 200);
615hPdgCodemdMinvRejected = new TH2F("hPdgCodemdMinvRejected", "Mother's vs daughter's pdg code for rejected kinks (DCA, quality, p_{T}, y, R, z, #theta, p_{track}/p{kink}, q^{T}, #theta_{max}, R/TPC clusters & m_{inv} cuts); Mother's pdg code; Daughter's pdg code", nBinsPdg, hLowPdg, hUpPdg, nBinsPdg, hLowPdg, hUpPdg);
616hPtSelected = new TH1F("hPtSelected", "Mother's transverse momentum for selected kinks (all cuts except dE/dx); p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
617hEtaSelected = new TH1F("hEtaSelected", "Mother's pseudorapidity for selected kinks (all cuts except dE/dx); n; dN/dn", nBinsEta, hLowEta, hUpEta);
618hRapiditySelected = new TH1F("hRapiditySelected", "Mother's rapidity for selected kinks (all cuts except dE/dx); n; dN/dn", nBinsEta, hLowEta, hUpEta);
619hQtSelected = new TH1F("hQtSelected", "Daughter's transverse momentum in mother's frame for selected kinks (all cuts except dE/dx); q_{T} (GeV/c); dN/dq_{T}", 200, 0.0, 0.3);
620hKinkAngleSelected = new TH1F("hKinkAngleSelected", "Kink angle of selected kinks (all cuts except dE/dx); #theta (#circ); dN/d#theta", nBinsAngle, hLowAngle, hUpAngle);
621hDCAkinkSelected = new TH1F("hDCAkinkSelected", "DCA; DCA(cm); Number of kinks", 100, 0.0, 2.0);
622hPmKinkAngSelected = new TH2F("hPmKinkAngSelected", "Mother's momentum magnitude vs kink angle for selected kinks (all cuts except dE/dx); p_{T} (GeV/c); #theta (#circ); d^{2}N/dp_{T}d#theta", nBinsPt, hLowPt, hUpPt, nBinsAngle, hLowAngle, hUpAngle);
623hKinkPosXYSelected = new TH2F("hKinkPosXYSelected", "X-Y Position ; X (cm); Y (cm)", nBinsXY, hLowXY, hUpXY, nBinsXY, hLowXY, hUpXY);
624hKinkPosZRSelected = new TH2F("hKinkPosZRSelected", "Z vs radius of selected kinks (all cuts except dE/dx); Z (cm); R (cm)", nBinsZ, hLowZ, hUpZ, nBinsR, hLowR, hUpR);
625hKinkPosRSelected = new TH1F("hKinkPosRSelected", "Position radius of selected kinks (all cuts except dE/dx); R (cm); dN/dR", nBinsR, hLowR, hUpR);
626hPdgCodemdSelected = new TH2F("hPdgCodemdSelected", "Mother vs daughter pdg code for selected kinks (all cuts except dE/dx); Mother's pdg code; Daughter's pdg code", nBinsPdg, hLowPdg, hUpPdg, nBinsPdg, hLowPdg, hUpPdg);
627hPmdSelected = new TH2F("hPmdSelected", "Mother vs daughter momentum magnitude for selected kinks (all cuts except dE/dx); Mother's P; Daughter's P", nBinsPt, hLowPt, hUpPt, nBinsPt, hLowPt, hUpPt);
628hMinvPimuSelected = new TH1F("hMinvPimuSelected", "Invariant mass for #pi^{#pm} decaying to #mu^{#pm} for selected kinks (all cuts except dE/dx); m (GeV/c^{2}); dN/dm", nBinsInvMass, hLowInvMass, hUpInvMass);
629hUIDKinkDauSelected = new TH1F("hUIDKinkDauSelected", "UID (method of production); UID (method of production); Number of particles", 100, 0.0, 20);
630hdEdxSelected = new TH2F("hdEdxSelected", "dE/dx vs mother's momentum for selected kinks (all cuts except dE/dx); p (GeV/c); dE/dx (GeV/cm)", nBinsPt, hLowPt, hUpPt, 100, 0.0, 300.0);
631hPtSelectedFake = new TH1F("hPtSelectedFake", "Mother's transverse momentum for fake kinks (all cuts except dE/dx); p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
632hEtaSelectedFake = new TH1F("hEtaSelectedFake", "Mother's pseudorapidity for fake kinks (all cuts except dE/dx); n; dN/dn", nBinsEta, hLowEta, hUpEta);
633hRapiditySelectedFake = new TH1F("hRapiditySelectedFake", "Mother's rapidity ffor fake kinks (all cuts except dE/dx); n; dN/dn", nBinsEta, hLowEta, hUpEta);
634hQtSelectedFake = new TH1F("hQtSelectedFake", "Daughter's transverse momentum in mother's frame ffor fake kinks (all cuts except dE/dx); q_{T} (GeV/c); dN/dq_{T}", 200, 0.0, 0.3);
635hKinkAngleSelectedFake = new TH1F("hKinkAngleSelectedFake", "Kink angle of fake kinks (all cuts except dE/dx); #theta (#circ); dN/d#theta", nBinsAngle, hLowAngle, hUpAngle);
636hDCAkinkSelectedFake = new TH1F("hDCAkinkSelectedFake", "Kink DCA for fake kinks (all cuts except dE/dx); DCA; Number of kinks", 100, 0.0, 2.0);
637hPmKinkAngSelectedFake = new TH2F("hPmKinkAngSelectedFake", "Mother's momentum magnitude vs kink angle for fake kinks (all cuts except dE/dx); #theta (#circ); d^{2}N/dp_{T}d#theta", nBinsPt, hLowPt, hUpPt, nBinsAngle, hLowAngle, hUpAngle);
638hKinkPosXYSelectedFake = new TH2F("hKinkPosXYSelectedFake", "X-Y Position for fake kinks (all cuts except dE/dx); X (cm); Y (cm)", nBinsXY, hLowXY, hUpXY, nBinsXY, hLowXY, hUpXY);
639hKinkPosZRSelectedFake = new TH2F("hKinkPosZRSelectedFake", "Z vs radius of fake kinks (all cuts except dE/dx); Z (cm); R (cm)", nBinsZ, hLowZ, hUpZ, nBinsR, hLowR, hUpR);
640hKinkPosRSelectedFake = new TH1F("hKinkPosRSelectedFake", "Position radius of fake kinks (all cuts except dE/dx); R (cm); dN/dR", nBinsR, hLowR, hUpR);
641hPmdSelectedFake = new TH2F("hPmdSelectedFake", "Mother vs daughter momentum magnitude for fake kinks (all cuts except dE/dx); Mother's P; Daughter's P", nBinsPt, hLowPt, hUpPt, nBinsPt, hLowPt, hUpPt);
642hMinvPimuSelectedFake = new TH1F("hMinvPimuSelectedFake", "Invariant mass for #pi^{#pm} decaying to #mu^{#pm} for selected kinks (all cuts) for fake kinks (all cuts except dE/dx); m (GeV/c^{2}); dN/dm", nBinsInvMass, hLowInvMass, hUpInvMass);
643hdEdxSelectedFake = new TH2F("hdEdxSelectedFake", "dE/dx vs mother's momentum for fake kinks (all cuts except dE/dx); p (GeV/c); dE/dx (GeV/cm)", nBinsPt, hLowPt, hUpPt, 100, 0.0, 300.0);
644hPdgCodemddEdxRejected = new TH2F("hPdgCodemddEdxRejected", "Mother's vs daughter's pdg code for rejected kinks (all cuts); Mother's pdg code; Daughter's pdg code", nBinsPdg, hLowPdg, hUpPdg, nBinsPdg, hLowPdg, hUpPdg);
645hPtPiSelected = new TH1F("hPtPiSelected", "Mother's transverse momentum for selected kinks (all cuts); p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
646hEtaPiSelected = new TH1F("hEtaPiSelected", "Mother's pseudorapidity for selected kinks (all cuts); n; dN/dn", nBinsEta, hLowEta, hUpEta);
647hRapidityPiSelected = new TH1F("hRapidityPiSelected", "Mother's rapidity for selected kinks (all cuts); n; dN/dn", nBinsEta, hLowEta, hUpEta);
648hQtPiSelected = new TH1F("hQtPiSelected", "Daughter's transverse momentum in mother's frame for selected kinks (all cuts); q_{T} (GeV/c); dN/dq_{T}", 200, 0.0, 0.3);
649hKinkAnglePiSelected = new TH1F("hKinkAnglePiSelected", "Kink angle of selected kinks (all cuts); #theta (#circ); dN/d#theta", nBinsAngle, hLowAngle, hUpAngle);
650hDCAkinkPiSelected = new TH1F("hDCAkinkPiSelected", "DCA; DCA(cm); Number of kinks", 100, 0.0, 2.0);
651hPmKinkAngPiSelected = new TH2F("hPmKinkAngPiSelected", "Mother's momentum magnitude vs kink angle for selected kinks (all cuts); p_{T} (GeV/c); #theta (#circ); d^{2}N/dp_{T}d#theta", nBinsPt, hLowPt, hUpPt, nBinsAngle, hLowAngle, hUpAngle);
652hKinkPosRTPCclusters1PiSelected = new TH1F("hKinkPosRTPCclusters1PiSelected", " ;kinkposR; tpc clusters",100,0,1);
653hKinkPosRTPCclusters2PiSelected = new TH2F("hKinkPosRTPCclusters2PiSelected", " ;kinkposR; tpc clusters",nBinsR, hLowR, hUpR,100,0,200 );
654hKinkPosXYPiSelected = new TH2F("hKinkPosXYPiSelected", "X-Y Position ; X (cm); Y (cm)", nBinsXY, hLowXY, hUpXY, nBinsXY, hLowXY, hUpXY);
655hKinkPosZRPiSelected = new TH2F("hKinkPosZRPiSelected", "Z vs radius of selected kinks (all cuts); Z (cm); R (cm)", nBinsZ, hLowZ, hUpZ, nBinsR, hLowR, hUpR);
656hKinkPosRPiSelected = new TH1F("hKinkPosRPiSelected", "Position radius of selected kinks (all cuts); R (cm); dN/dR", nBinsR, hLowR, hUpR);
657hKinkPosZPiSelected = new TH1F("hKinkPosZPiSelected", "z position of selected kinks (all cuts); R (cm); dN/dR", nBinsZ, hLowZ, hUpZ);
658hPmPPiSelected = new TH2F("hPmPPiSelected", "Mother's momentum as calculated by kink and by track of selected kinks (all cuts); R (cm); dN/dR", nBinsPt, hLowPt, hUpPt, nBinsPt, hLowPt, hUpPt);
659hPdgCodemdPiSelected = new TH2F("hPdgCodemdPiSelected", "Mother vs daughter pdg code for selected kinks (all cuts); Mother's pdg code; Daughter's pdg code", nBinsPdg, hLowPdg, hUpPdg, nBinsPdg, hLowPdg, hUpPdg);
660hPmdPiSelected = new TH2F("hPmdPiSelected", "Mother vs daughter momentum magnitude for selected kinks (all cuts); Mother's P; Daughter's P", nBinsPt, hLowPt, hUpPt, nBinsPt, hLowPt, hUpPt);
661hMinvPimuPiSelected = new TH1F("hMinvPimuPiSelected", "Invariant mass for #pi^{#pm} decaying to #mu^{#pm} for selected kinks (all cuts); m (GeV/c^{2}); dN/dm", nBinsInvMass, hLowInvMass, hUpInvMass);
662hUIDKinkDauPiSelected = new TH1F("hUIDKinkDauPiSelected", "UID (method of production); UID (method of production); Number of particles", 100, 0.0, 20);
663hdEdxPiSelected = new TH2F("hdEdxPiSelected", "dE/dx vs mother's momentum for selected kinks (all cuts); p (GeV/c); dE/dx (GeV/cm)", nBinsPt, hLowPt, hUpPt, 100, 0.0, 300.0);
664
665hPtPiSelectedPlus = new TH1F("hPtPiSelectedPlus", "Mother's transverse momentum for selected positive kinks (all cuts); p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
666hEtaPiSelectedPlus = new TH1F("hEtaPiSelectedPlus", "Mother's pseudorapidity for selected positive kinks (all cuts); n; dN/dn", nBinsEta, hLowEta, hUpEta);
667hRapidityPiSelectedPlus = new TH1F("hRapidityPiSelectedPlus", "Mother's rapidity for selected positive kinks (all cuts); n; dN/dn", nBinsEta, hLowEta, hUpEta);
668hQtPiSelectedPlus = new TH1F("hQtPiSelectedPlus", "Daughter's transverse momentum in mother's frame for selected positive kinks (all cuts); q_{T} (GeV/c); dN/dq_{T}", 200, 0.0, 0.3);
669hKinkAnglePiSelectedPlus = new TH1F("hKinkAnglePiSelectedPlus", "Kink angle for selected positive kinks (all cuts); #theta (#circ); dN/d#theta", nBinsAngle, hLowAngle, hUpAngle);
670hDCAkinkPiSelectedPlus = new TH1F("hDCAkinkPiSelectedPlus", "DCA for selected positive kinks (all cuts); DCA(cm); Number of kinks", 100, 0.0, 2.0);
671hPmKinkAngPiSelectedPlus = new TH2F("hPmKinkAngPiSelectedPlus", "Mother's momentum magnitude vs kink angle for selected positive kinks (all cuts); p_{T} (GeV/c); #theta (#circ); d^{2}N/dp_{T}d#theta", nBinsPt, hLowPt, hUpPt, nBinsAngle, hLowAngle, hUpAngle);
672hKinkPosXYPiSelectedPlus = new TH2F("hKinkPosXYPiSelectedPlus", "X-Y Position of selected positive kinks (all cuts); X (cm); Y (cm)", nBinsXY, hLowXY, hUpXY, nBinsXY, hLowXY, hUpXY);
673hKinkPosZRPiSelectedPlus = new TH2F("hKinkPosZRPiSelectedPlus", "Z vs radius of selected positive kinks (all cuts); Z (cm); R (cm)", nBinsZ, hLowZ, hUpZ,nBinsR, hLowR, hUpR);
674hPdgCodemdPiSelectedPlus = new TH2F("hPdgCodemdPiSelectedPlus", "Mother vs daughter pdg code for selected positive kinks (all cuts); Mother's pdg code; Daughter's pdg code", nBinsPdg, hLowPdg, hUpPdg, nBinsPdg, hLowPdg, hUpPdg);
675hPmdPiSelectedPlus = new TH2F("hPmdPiSelectedPlus", "Mother vs daughter momentum magnitude for selected positive kinks (all cuts); Mother's P; Daughter's P", nBinsPt, hLowPt, hUpPt, nBinsPt, hLowPt, hUpPt);
676hMinvPimuPiSelectedPlus = new TH1F("hMinvPimuPiSelectedPlus", "Invariant mass for #pi^{+} decaying to #mu^{+} for selected kinks (all cuts); m (GeV/c^{2}); dN/dm",nBinsInvMass, hLowInvMass, hUpInvMass);
677hUIDPiDaumuSelectedPlus = new TH1F("hUIDPiDaumuSelectedPlus", "UID (method of production) of selected positive kinks (all cuts); UID (method of production); Number of particles", 100, 0.0, 20);
678hdEdxPiSelectedPlus = new TH2F("hdEdxPiSelectedPlus", "dE/dx vs mother's momentum for selected positive kinks (all cuts); p (GeV/c); dE/dx (GeV/cm)", nBinsPt, hLowPt, hUpPt, 100, 0.0, 300.0);
679hPtPrimPiKinksPlus = new TH1F("hPtPrimPiKinksPlus", "Mother's transverse momentum for selected real #pi^{+} primary kinks; p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
680hEtaPrimPiKinksPlus = new TH1F("hEtaPrimPiKinksPlus", "Mother's pseudorapidity for selected real #pi^{+} primary kinks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
681hRapidityPrimPiKinksPlus = new TH1F("hRapidityPrimPiKinksPlus", "Mother's rapidity for selected real #pi^{+} primary kinks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
682hPtSecondPiKinksPlus = new TH1F("hPtSecondPiKinksPlus", "Mother's transverse momentum for selected real #pi^{+} secondary kinks; p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
683hEtaSecondPiKinksPlus = new TH1F("hEtaSecondPiKinksPlus", "Mother's pseudorapidity for selected real #pi^{+} secondary kinks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
684hRapiditySecondPiKinksPlus = new TH1F("hRapiditySecondPiKinksPlus", "Mother's rapidity for selected real #pi^{+} secondary kinks; y; dN/dy", nBinsEta, hLowEta, hUpEta);
685hPtNonPiKinksPlus = new TH1F("hPtNonPiKinksPlus", "Mother's transverse momentum for selected non #pi^{+} kinks; p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
686hEtaNonPiKinksPlus = new TH1F("hEtaNonPiKinksPlus", "Mother's pseudorapidity for selected non #pi^{+} kinks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
687hRapidityNonPiKinksPlus = new TH1F("hRapidityNonPiKinksPlus", "Mother's rapidity for selected non #pi^{+} kinks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
688hPdgCodemdNonPiKinksPlus = new TH2F("hPdgCodemdNonPiKinksPlus", "Mother vs daughter pdg code for selected non #pi^{+} kinks; Mother's pdg code; Daughter's pdg code", nBinsPdg, hLowPdg, hUpPdg, nBinsPdg, hLowPdg, hUpPdg);
689
690hPtPiSelectedMinus = new TH1F("hPtPiSelectedMinus", "Mother's transverse momentum for selected negative kinks (all cuts); p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
691hEtaPiSelectedMinus = new TH1F("hEtaPiSelectedMinus", "Mother's pseudorapidity for selected negative kinks (all cuts); n; dN/dn", nBinsEta, hLowEta, hUpEta);
692hRapidityPiSelectedMinus = new TH1F("hRapidityPiSelectedMinus", "Mother's rapidity for selected negative kinks (all cuts); n; dN/dn", nBinsEta, hLowEta, hUpEta);
693hQtPiSelectedMinus = new TH1F("hQtPiSelectedMinus", "Daughter's transverse momentum in mother's frame for selected negative kinks (all cuts); q_{T} (GeV/c); dN/dq_{T}", 200, 0.0, 0.3);
694hKinkAnglePiSelectedMinus = new TH1F("hKinkAnglePiSelectedMinus", "Kink angle for selected negative kinks (all cuts); #theta (#circ); dN/d#theta", nBinsAngle, hLowAngle, hUpAngle);
695hDCAkinkPiSelectedMinus = new TH1F("hDCAkinkPiSelectedMinus", "DCA for selected negative kinks (all cuts); DCA(cm); Number of kinks", 100, 0.0, 2.0);
696hPmKinkAngPiSelectedMinus = new TH2F("hPmKinkAngPiSelectedMinus", "Mother's momentum magnitude vs kink angle for selected negative kinks (all cuts); p_{T} (GeV/c); #theta (#circ); d^{2}N/dp_{T}d#theta", nBinsPt, hLowPt, hUpPt, nBinsAngle, hLowAngle, hUpAngle);
697hKinkPosXYPiSelectedMinus = new TH2F("hKinkPosXYPiSelectedMinus", "X-Y Position for selected negative kinks (all cuts); X (cm); Y (cm)", nBinsXY, hLowXY, hUpXY, nBinsXY, hLowXY, hUpXY);
698hKinkPosZRPiSelectedMinus = new TH2F("hKinkPosZRPiSelectedMinus", "Z vs radius for selected negative kinks (all cuts); Z (cm); R (cm)",nBinsZ, hLowZ, hUpZ,nBinsR, hLowR, hUpR);
699hPdgCodemdPiSelectedMinus = new TH2F("hPdgCodemdPiSelectedMinus", "Mother vs daughter pdg code for selected negative kinks (all cuts); Mother's pdg code; Daughter's pdg code", nBinsPdg, hLowPdg, hUpPdg, nBinsPdg, hLowPdg, hUpPdg);
700hPmdPiSelectedMinus = new TH2F("hPmdPiSelectedMinus", "Mother vs daughter momentum magnitude for selected negative kinks (all cuts); Mother's P; Daughter's P", nBinsPt, hLowPt, hUpPt, nBinsPt, hLowPt, hUpPt);
701hMinvPimuPiSelectedMinus = new TH1F("hMinvPimuPiSelectedMinus", "Invariant mass for #pi^{-} decaying to #mu^{-} for selected kinks (all cuts); m (GeV/c^{2}); dN/dm", nBinsInvMass, hLowInvMass, hUpInvMass);
702hUIDPiDaumuSelectedMinus = new TH1F("hUIDPiDaumuSelectedMinus", "UID (method of production) of selected negative kinks (all cuts); UID (method of production); Number of particles", 100, 0.0, 20);
703hdEdxPiSelectedMinus = new TH2F("hdEdxPiSelectedMinus", "dE/dx vs mother's momentum for selected negative kinks (all cuts); p (GeV/c); dE/dx (GeV/cm)", nBinsPt, hLowPt, hUpPt, 100, 0.0, 300.0);
704hPtPrimPiKinksMinus = new TH1F("hPtPrimPiKinksMinus", "Mother's transverse momentum for selected real #pi^{-} primary kinks; p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
705hEtaPrimPiKinksMinus = new TH1F("hEtaPrimPiKinksMinus", "Mother's pseudorapidity for selected real #pi^{-} primary kinks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
706hRapidityPrimPiKinksMinus = new TH1F("hRapidityPrimPiKinksMinus", "Mother's rapidity for selected real #pi^{-} primary kinks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
707hPtSecondPiKinksMinus = new TH1F("hPtSecondPiKinksMinus", "Mother's transverse momentum for selected real #pi^{-} secondary kinks; p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
708hEtaSecondPiKinksMinus = new TH1F("hEtaSecondPiKinksMinus", "Mother's pseudorapidity for selected real #pi^{-} secondary kinks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
709hRapiditySecondPiKinksMinus = new TH1F("hRapiditySecondPiKinksMinus", "Mother's rapidity for selected real #pi^{-} secondary kinks; y; dN/dy", nBinsEta, hLowEta, hUpEta);
710hPtNonPiKinksMinus = new TH1F("hPtNonPiKinksMinus", "Mother's transverse momentum for selected non #pi^{-} kinks; p_{T} (GeV/c); dN/dp_{T}", nBinsPt, hLowPt, hUpPt);
711hEtaNonPiKinksMinus = new TH1F("hEtaNonPiKinksMinus", "Mother's pseudorapidity for selected non #pi^{-} kinks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
712hRapidityNonPiKinksMinus = new TH1F("hRapidityNonPiKinksMinus", "Mother's rapidity for selected non #pi^{-} kinks; n; dN/dn", nBinsEta, hLowEta, hUpEta);
713hPdgCodemdNonPiKinksMinus = new TH2F("hPdgCodemdNonPiKinksMinus", "Mother vs daughter pdg code for selected non #pi^{-} kinks; Mother's pdg code; Daughter's pdg code", nBinsPdg, hLowPdg, hUpPdg, nBinsPdg, hLowPdg, hUpPdg);
714
715
716
717fListOfHistos->Add(hMCMult);
718fListOfHistos->Add(hMCMultPrim);
719fListOfHistos->Add(hMCPtAll);
720fListOfHistos->Add(hMCEtaAll);
721fListOfHistos->Add(hMCPtPrim);
722fListOfHistos->Add(hMCEtaPrim);
723fListOfHistos->Add(hMCPt);
724fListOfHistos->Add(hMCEta);
725fListOfHistos->Add(hMCPdg);
726fListOfHistos->Add(hMCMultPiPlus);
727fListOfHistos->Add(hMCPtPiPlus);
728fListOfHistos->Add(hMCEtaPiPlus);
729fListOfHistos->Add(hMCRapidityPiPlus);
730fListOfHistos->Add(hMCNDaughtersPlus);
731fListOfHistos->Add(hMCRadPiDauPlus);
732fListOfHistos->Add(hMCKinkPosZPlus);
733fListOfHistos->Add(hMCUIDPiDauPlus);
734fListOfHistos->Add(hMCPdgPiNonDecayedPlus);
735fListOfHistos->Add(hMCPdgPiDauPlus);
736fListOfHistos->Add(hMCQtPlus);
737fListOfHistos->Add(hMCKinkAnglePlus);
738fListOfHistos->Add(hMCPKinkAngPlus);
739fListOfHistos->Add(hMCPdgCodemdPlus);
740fListOfHistos->Add(hMCPtmdPlus);
741fListOfHistos->Add(hMCPtPimuonPlus);
742fListOfHistos->Add(hMCEtaPimuonPlus);
743fListOfHistos->Add(hMCRapidityPimuonPlus);
744fListOfHistos->Add(hMCQtPimuonPlus);
745fListOfHistos->Add(hMCPKinkAngPimuonPlus);
746fListOfHistos->Add(hMCPtPiotherPlus);
747fListOfHistos->Add(hMCEtaPiotherPlus);
748fListOfHistos->Add(hMCRapidityPiotherPlus);
749fListOfHistos->Add(hMCQtPiotherPlus);
750fListOfHistos->Add(hMCPKinkAngPiotherPlus);
751fListOfHistos->Add(hMCMultPiMinus);
752fListOfHistos->Add(hMCPtPiMinus);
753fListOfHistos->Add(hMCEtaPiMinus);
754fListOfHistos->Add(hMCRapidityPiMinus);
755fListOfHistos->Add(hMCNDaughtersMinus);
756fListOfHistos->Add(hMCRadPiDauMinus);
757fListOfHistos->Add(hMCKinkPosZMinus);
758fListOfHistos->Add(hMCUIDPiDauMinus);
759fListOfHistos->Add(hMCPdgPiNonDecayedMinus);
760fListOfHistos->Add(hMCPdgPiDauMinus);
761fListOfHistos->Add(hMCQtMinus);
762fListOfHistos->Add(hMCKinkAngleMinus);
763fListOfHistos->Add(hMCPKinkAngMinus);
764fListOfHistos->Add(hMCPdgCodemdMinus);
765fListOfHistos->Add(hMCPtmdMinus);
766fListOfHistos->Add(hMCPtPimuonMinus);
767fListOfHistos->Add(hMCEtaPimuonMinus);
768fListOfHistos->Add(hMCRapidityPimuonMinus);
769fListOfHistos->Add(hMCQtPimuonMinus);
770fListOfHistos->Add(hMCPKinkAngPimuonMinus);
771fListOfHistos->Add(hMCPtPiotherMinus);
772fListOfHistos->Add(hMCEtaPiotherMinus);
773fListOfHistos->Add(hMCRapidityPiotherMinus);
774fListOfHistos->Add(hMCQtPiotherMinus);
775fListOfHistos->Add(hMCPKinkAngPiotherMinus);
776
777fListOfHistos->Add(hMult);
778fListOfHistos->Add(hAcceptedMult);
779fListOfHistos->Add(hMultPS);
780fListOfHistos->Add(hvtx);
781fListOfHistos->Add(hvtxy);
782fListOfHistos->Add(hvtyz);
783fListOfHistos->Add(hvtxz);
784fListOfHistos->Add(hMultPSV);
785fListOfHistos->Add(hPtAll);
786fListOfHistos->Add(hEtaAll);
787fListOfHistos->Add(hTrackPos);
788fListOfHistos->Add(hTrackPosxy);
789fListOfHistos->Add(hTrackPosyz);
790fListOfHistos->Add(hTrackPosxz);
791//fListOfHistos->Add(hTPCchi2clusters);
792//fListOfHistos->Add(hdcaToVertexXY);
793//fListOfHistos->Add(hdcaToVertexZ);
794fListOfHistos->Add(hMultPrim);
795fListOfHistos->Add(hPtPrim);
796fListOfHistos->Add(hEtaPrim);
797fListOfHistos->Add(hPrimTrackPos);
798fListOfHistos->Add(hPrimTrackPosxy);
799fListOfHistos->Add(hPrimTrackPosyz);
800fListOfHistos->Add(hPrimTrackPosxz);
801fListOfHistos->Add(hPt);
802fListOfHistos->Add(hEta);
803//fListOfHistos->Add(hRapidity);
804fListOfHistos->Add(hPtKink);
805fListOfHistos->Add(hEtaKink);
806fListOfHistos->Add(hRapidityKink);
807fListOfHistos->Add(hPmP);
808fListOfHistos->Add(hKinkPosRTPCclusters1);
809fListOfHistos->Add(hKinkPosRTPCclusters2);
810fListOfHistos->Add(hQt);
811fListOfHistos->Add(hKinkAngle);
812fListOfHistos->Add(hDCAkink);
813fListOfHistos->Add(hPmKinkAng);
814fListOfHistos->Add(hKinkPosXY);
815fListOfHistos->Add(hKinkPosZY);
816fListOfHistos->Add(hKinkPosZR);
817fListOfHistos->Add(hKinkPosR);
818fListOfHistos->Add(hKinkPosZ);
819fListOfHistos->Add(hKinkPosZMCKinkPosZ);
820fListOfHistos->Add(hPdgCodemd);
821fListOfHistos->Add(hPmd);
822fListOfHistos->Add(hMinvPimu);
823fListOfHistos->Add(hUIDKinkDau);
824fListOfHistos->Add(hdEdx);
825fListOfHistos->Add(hPtKinkFake);
826fListOfHistos->Add(hEtaKinkFake);
827fListOfHistos->Add(hRapidityKinkFake);
828fListOfHistos->Add(hPmPFake);
829fListOfHistos->Add(hKinkPosRTPCclusters1Fake);
830fListOfHistos->Add(hKinkPosRTPCclusters2Fake);
831fListOfHistos->Add(hQtFake);
832fListOfHistos->Add(hKinkAngleFake);
833fListOfHistos->Add(hDCAkinkFake);
834fListOfHistos->Add(hPmKinkAngFake);
835fListOfHistos->Add(hKinkPosXYFake);
836fListOfHistos->Add(hKinkPosZYFake);
837fListOfHistos->Add(hKinkPosZRFake);
838fListOfHistos->Add(hKinkPosRFake);
839fListOfHistos->Add(hKinkPosZFake);
840fListOfHistos->Add(hKinkPosZMCKinkPosZFake);
841fListOfHistos->Add(hPdgCodemdFake);
842fListOfHistos->Add(hPmdFake);
843fListOfHistos->Add(hMinvPimuFake);
844fListOfHistos->Add(hUIDKinkDauFake);
845fListOfHistos->Add(hdEdxFake);
846fListOfHistos->Add(hPtPosRSelected);
847fListOfHistos->Add(hPdgCodemdZRejected);
848fListOfHistos->Add(hPtZSelected);
849fListOfHistos->Add(hPdgCodemdAngRejected);
850fListOfHistos->Add(hPtAngSelected);
851fListOfHistos->Add(hPdgCodemdPmRejected);
852fListOfHistos->Add(hPtPmSelected);
853fListOfHistos->Add(hPdgCodemdQtLowRejected);
854fListOfHistos->Add(hPtGoodKink);
855fListOfHistos->Add(hEtaGoodKink);
856fListOfHistos->Add(hRapidityGoodKink);
857fListOfHistos->Add(hQtGoodKink);
858fListOfHistos->Add(hPmGoodKinkAng);
859fListOfHistos->Add(hPdgCodemdGoodKink);
860fListOfHistos->Add(hPmdGoodKink);
861fListOfHistos->Add(hUIDGoodKinkDau);
862fListOfHistos->Add(hdEdxGoodKink);
863fListOfHistos->Add(hUIDPiDauPlus);
864fListOfHistos->Add(hMultPiPlus);
865fListOfHistos->Add(hPtPiPlus);
866fListOfHistos->Add(hEtaPiPlus);
867fListOfHistos->Add(hRapidityPiPlus);
868fListOfHistos->Add(hQtPiPlus);
869fListOfHistos->Add(hKinkAnglePiPlus);
870fListOfHistos->Add(hPmKinkAngPiPlus);
871fListOfHistos->Add(hKinkPosXYPiPlus);
872fListOfHistos->Add(hKinkPosZRPiPlus);
873fListOfHistos->Add(hKinkPosRPiPlus);
874fListOfHistos->Add(hDCAkinkPiPlus);
875fListOfHistos->Add(hPdgCodemdPiPlus);
876fListOfHistos->Add(hPmdPiPlus);
877fListOfHistos->Add(hdEdxPiPlus);
878fListOfHistos->Add(hQtPimuPlus);
879fListOfHistos->Add(hPmKinkAngPimuPlus);
880fListOfHistos->Add(hQtPiotherPlus);
881fListOfHistos->Add(hPmKinkAngPiotherPlus);
882fListOfHistos->Add(hPdgCodemdPiotherPlus);
883fListOfHistos->Add(hUIDPiDauMinus);
884fListOfHistos->Add(hMultPiMinus);
885fListOfHistos->Add(hPtPiMinus);
886fListOfHistos->Add(hEtaPiMinus);
887fListOfHistos->Add(hRapidityPiMinus);
888fListOfHistos->Add(hQtPiMinus);
889fListOfHistos->Add(hKinkAnglePiMinus);
890fListOfHistos->Add(hPmKinkAngPiMinus);
891fListOfHistos->Add(hKinkPosXYPiMinus);
892fListOfHistos->Add(hKinkPosZRPiMinus);
893fListOfHistos->Add(hKinkPosRPiMinus);
894fListOfHistos->Add(hDCAkinkPiMinus);
895fListOfHistos->Add(hPdgCodemdPiMinus);
896fListOfHistos->Add(hPmdPiMinus);
897fListOfHistos->Add(hdEdxPiMinus);
898fListOfHistos->Add(hQtPimuMinus);
899fListOfHistos->Add(hPmKinkAngPimuMinus);
900fListOfHistos->Add(hQtPiotherMinus);
901fListOfHistos->Add(hPmKinkAngPiotherMinus);
902fListOfHistos->Add(hPdgCodemdPiotherMinus);
903fListOfHistos->Add(hPdgCodemdQtRejected);
904fListOfHistos->Add(hPtQtSelected);
905fListOfHistos->Add(hPdgCodemdMaxAngRejected);
906fListOfHistos->Add(hPtMaxAngSelected);
907fListOfHistos->Add(hPdgCodemdRTPCclustersRejected);
908fListOfHistos->Add(hPtRTPCclustersSelected);
909fListOfHistos->Add(hRTPCclustersRTPCclustersSelected);
910fListOfHistos->Add(hPdgCodemdMinvRejected);
911fListOfHistos->Add(hPtSelected);
912fListOfHistos->Add(hEtaSelected);
913fListOfHistos->Add(hRapiditySelected);
914fListOfHistos->Add(hQtSelected);
915fListOfHistos->Add(hKinkAngleSelected);
916fListOfHistos->Add(hDCAkinkSelected);
917fListOfHistos->Add(hPmKinkAngSelected);
918fListOfHistos->Add(hKinkPosXYSelected);
919fListOfHistos->Add(hKinkPosZRSelected);
920fListOfHistos->Add(hKinkPosRSelected);
921fListOfHistos->Add(hPdgCodemdSelected);
922fListOfHistos->Add(hPmdSelected);
923fListOfHistos->Add(hMinvPimuSelected);
924fListOfHistos->Add(hUIDKinkDauSelected);
925fListOfHistos->Add(hdEdxSelected);
926fListOfHistos->Add(hPtSelectedFake);
927fListOfHistos->Add(hEtaSelectedFake);
928fListOfHistos->Add(hRapiditySelectedFake);
929fListOfHistos->Add(hQtSelectedFake);
930fListOfHistos->Add(hKinkAngleSelectedFake);
931fListOfHistos->Add(hDCAkinkSelectedFake);
932fListOfHistos->Add(hPmKinkAngSelectedFake);
933fListOfHistos->Add(hKinkPosXYSelectedFake);
934fListOfHistos->Add(hKinkPosZRSelectedFake);
935fListOfHistos->Add(hKinkPosRSelectedFake);
936fListOfHistos->Add(hPmdSelectedFake);
937fListOfHistos->Add(hMinvPimuSelectedFake);
938fListOfHistos->Add(hdEdxSelectedFake);
939fListOfHistos->Add(hPdgCodemddEdxRejected);
940fListOfHistos->Add(hPtPiSelected);
941fListOfHistos->Add(hEtaPiSelected);
942fListOfHistos->Add(hRapidityPiSelected);
943fListOfHistos->Add(hQtPiSelected);
944fListOfHistos->Add(hKinkAnglePiSelected);
945fListOfHistos->Add(hDCAkinkPiSelected);
946fListOfHistos->Add(hPmKinkAngPiSelected);
947fListOfHistos->Add(hKinkPosRTPCclusters1PiSelected);
948fListOfHistos->Add(hKinkPosRTPCclusters2PiSelected);
949fListOfHistos->Add(hKinkPosXYPiSelected);
950fListOfHistos->Add(hKinkPosZRPiSelected);
951fListOfHistos->Add(hKinkPosRPiSelected);
952fListOfHistos->Add(hKinkPosZPiSelected);
953fListOfHistos->Add(hPmPPiSelected);
954fListOfHistos->Add(hPdgCodemdPiSelected);
955fListOfHistos->Add(hPmdPiSelected);
956fListOfHistos->Add(hMinvPimuPiSelected);
957fListOfHistos->Add(hUIDKinkDauPiSelected);
958fListOfHistos->Add(hdEdxPiSelected);
959
960fListOfHistos->Add(hPtPiSelectedPlus);
961fListOfHistos->Add(hEtaPiSelectedPlus);
962fListOfHistos->Add(hRapidityPiSelectedPlus);
963fListOfHistos->Add(hQtPiSelectedPlus);
964fListOfHistos->Add(hKinkAnglePiSelectedPlus);
965fListOfHistos->Add(hDCAkinkPiSelectedPlus);
966fListOfHistos->Add(hPmKinkAngPiSelectedPlus);
967fListOfHistos->Add(hKinkPosXYPiSelectedPlus);
968fListOfHistos->Add(hKinkPosZRPiSelectedPlus);
969fListOfHistos->Add(hPdgCodemdPiSelectedPlus);
970fListOfHistos->Add(hPmdPiSelectedPlus);
971fListOfHistos->Add(hMinvPimuPiSelectedPlus);
972fListOfHistos->Add(hUIDPiDaumuSelectedPlus);
973fListOfHistos->Add(hdEdxPiSelectedPlus);
974fListOfHistos->Add(hPtPrimPiKinksPlus);
975fListOfHistos->Add(hEtaPrimPiKinksPlus);
976fListOfHistos->Add(hRapidityPrimPiKinksPlus);
977fListOfHistos->Add(hPtSecondPiKinksPlus);
978fListOfHistos->Add(hEtaSecondPiKinksPlus);
979fListOfHistos->Add(hRapiditySecondPiKinksPlus);
980fListOfHistos->Add(hPtNonPiKinksPlus);
981fListOfHistos->Add(hEtaNonPiKinksPlus);
982fListOfHistos->Add(hRapidityNonPiKinksPlus);
983fListOfHistos->Add(hPdgCodemdNonPiKinksPlus);
984
985fListOfHistos->Add(hPtPiSelectedMinus);
986fListOfHistos->Add(hEtaPiSelectedMinus);
987fListOfHistos->Add(hRapidityPiSelectedMinus);
988fListOfHistos->Add(hQtPiSelectedMinus);
989fListOfHistos->Add(hKinkAnglePiSelectedMinus);
990fListOfHistos->Add(hDCAkinkPiSelectedMinus);
991fListOfHistos->Add(hPmKinkAngPiSelectedMinus);
992fListOfHistos->Add(hKinkPosXYPiSelectedMinus);
993fListOfHistos->Add(hKinkPosZRPiSelectedMinus);
994fListOfHistos->Add(hPdgCodemdPiSelectedMinus);
995fListOfHistos->Add(hPmdPiSelectedMinus);
996fListOfHistos->Add(hMinvPimuPiSelectedMinus);
997fListOfHistos->Add(hUIDPiDaumuSelectedMinus);
998fListOfHistos->Add(hdEdxPiSelectedMinus);
999fListOfHistos->Add(hPtPrimPiKinksMinus);
1000fListOfHistos->Add(hEtaPrimPiKinksMinus);
1001fListOfHistos->Add(hRapidityPrimPiKinksMinus);
1002fListOfHistos->Add(hPtSecondPiKinksMinus);
1003fListOfHistos->Add(hEtaSecondPiKinksMinus);
1004fListOfHistos->Add(hRapiditySecondPiKinksMinus);
1005fListOfHistos->Add(hPtNonPiKinksMinus);
1006fListOfHistos->Add(hEtaNonPiKinksMinus);
1007fListOfHistos->Add(hRapidityNonPiKinksMinus);
1008fListOfHistos->Add(hPdgCodemdNonPiKinksMinus);
1009
1010fListOfHistos->SetOwner(kTRUE);
1011PostData(1, fListOfHistos);
1012}
1013
1014//________________________________________________________________________
1015void AliAnalysisPionKinksMCESD::UserExec(Option_t *) {
1016 AliVEvent *event = InputEvent();
1017 if (!event) {
1018 Printf("ERROR: Could not retrieve event");
1019 return;
1020 }
1021
1022 AliMCEvent* mcEvent = MCEvent();
1023 if (!mcEvent) {
1024 Printf("ERROR: Could not retrieve MC event");
1025 return;
1026 }
1027 AliESDEvent* esdEvent = dynamic_cast<AliESDEvent*>(event);
1028 if (!esdEvent) {
1029 Printf("ERROR: Could not retrieve esd");
1030 return;
1031 }
1032
1033
1034//------------------------------ MC Multiplicity unbiased------------------------//
1035 AliStack* MCstack = mcEvent->Stack(); //stack of MC events
1036 Int_t MCNTracks = mcEvent->GetNumberOfTracks();
1037// Int_t MCNTracks2 = MCstack->GetNtrack();
1038 hMCMult->Fill(MCNTracks);
1039 Int_t MCNPrimTracks = MCstack->GetNprimary();
1040 //Printf("There are %d number of primary tracks in this Monte Carlo event", MCNPrimTracks);
1041 hMCMultPrim->Fill(MCNPrimTracks);
1042
1043//------------------------ Data Multiplicity unbiased --------------------------//
1044 Int_t NTracks = esdEvent->GetNumberOfTracks(); //number of ESD tracks
1045 hMult->Fill(NTracks);
1046
1047//----------------------------- Accepted Multiplicity -----------------------------//
1048 Float_t NAcceptedTracks = fTrackCuts->CountAcceptedTracks(esdEvent);
1049 if(fLowMulcut>-1) {
1050 if(NAcceptedTracks<fLowMulcut) return;
1051 }
1052 if(fUpMulcut>-1) {
1053 if(NAcceptedTracks>fUpMulcut) return;
1054 }
1055 hAcceptedMult->Fill(NAcceptedTracks); //to check if the multiplicity limits are ok
1056
1057
1058//-------------------------------- MC data Analysis -----------------------------//
1059 for (Int_t iMC = 0; iMC < MCNTracks; iMC++) { //loop on all accepted MC tracks
1060 TParticle* MCparticle = MCstack->Particle(iMC);
1061 if (!MCparticle) {
1062 Printf("ERROR: Could not receive MC particle %d", iMC);
1063 continue;
1064 }
1065
1066 Double_t MCPt = MCparticle->Pt();
1067 Double_t MCP = MCparticle->P();
1068 Double_t MCEta = MCparticle->Eta();
1069 hMCPtAll->Fill(MCPt);
1070 hMCEtaAll->Fill(MCEta);
1071
1072 if (!MCstack->IsPhysicalPrimary(iMC)) continue;
1073 hMCPtPrim->Fill(MCPt);
1074 hMCEtaPrim->Fill(MCEta);
1075
1076 if (MCPt<cLowPt) continue;
1077
1078 hMCPt->Fill(MCPt);
1079 hMCEta->Fill(MCEta);
1080
1081 Int_t MCPdg = MCparticle->GetPdgCode();
1082 hMCPdg->Fill(MCPdg);
1083
1084 if (MCPdg==cPdgPion) { //positive pion selection
1085 Double_t MCRapidity = GetMCRapidity(MCparticle);
1086 if (TMath::Abs(MCRapidity)>cRapidityLim) continue;
1087 hMCMultPiPlus->Fill(iMC); //MC pion multiplicity
1088 hMCPtPiPlus->Fill(MCPt);
1089 hMCEtaPiPlus->Fill(MCEta);
1090 hMCRapidityPiPlus->Fill(MCRapidity);
1091
1092 Int_t MCNDaughtersPlus = MCparticle->GetNDaughters();
1093 hMCNDaughtersPlus->Fill(MCNDaughtersPlus);
1094 Int_t FirstDPlus = MCparticle->GetFirstDaughter(); //first daughter's label
1095 Int_t LastDPlus = MCparticle->GetLastDaughter(); //last daughter's label
1096 if ((FirstDPlus>MCNTracks)||(LastDPlus>MCNTracks)) continue;
1097
1098
1099 for (Int_t iMCdPlus=FirstDPlus; iMCdPlus<=LastDPlus; iMCdPlus++) { //loop on pion daughters
1100 if (iMCdPlus<0) continue; //debug
1101 TParticle* MCdaughterPlus = MCstack->Particle(iMCdPlus);
1102
1103 Double_t RdPlus = MCdaughterPlus->R(); //position radius of daughter's generation vertex
1104 hMCRadPiDauPlus->Fill(RdPlus);
1105
1106 Double_t MCKinkPosZPlus = MCdaughterPlus->Vz();
1107 hMCKinkPosZPlus->Fill(MCKinkPosZPlus);
1108
1109 if ((TMath::Abs(MCKinkPosZPlus)<cLowZ) || (TMath::Abs(MCKinkPosZPlus)>cUpZ)) continue;
1110
1111 if ((RdPlus<cLowR) || (RdPlus>cUpR)) continue; //selection of daughters that where generated in TPC
1112
1113 Int_t dcodePlus = MCdaughterPlus->GetPdgCode();
1114
1115 UInt_t MCDauUIDPlus = MCdaughterPlus->GetUniqueID(); //daughter's unique id (= method of production)
1116 hMCUIDPiDauPlus->Fill(MCDauUIDPlus);
1117
1118 if (MCDauUIDPlus!=4) { //selection of decayed daughters
1119 hMCPdgPiNonDecayedPlus->Fill(dcodePlus);
1120 continue;
1121 }
1122
1123 hMCPdgPiDauPlus->Fill(TMath::Abs(dcodePlus));
1124
1125 Double_t MCPtdPlus = MCdaughterPlus->Pt(); //daughter's transverse momentum in lab frame
1126 Double_t MCQtPlus = MCPQt(mcEvent, iMC, MCdaughterPlus); //daughter's transverse momentum in mother's frame (Qt)
1127 Double_t MCKinkAnglePlus2 = fuMCKinkAngle(mcEvent, iMC, MCdaughterPlus, kTRUE); //kink angle in degrees
1128 Double_t MCMaxKinkAngPimuPlus=fMaxKinkAngPimu->Eval(MCP,0.,0.,0.); //maximum decay angle in lab for pion decaying to muon
1129
30687e36 1130 // if (MCKinkAnglePlus2>(MCMaxKinkAngPimuPlus*1.1)) continue;
1131 if (MCKinkAnglePlus2>(MCMaxKinkAngPimuPlus)) continue;
bd4be5f8 1132
1133 hMCQtPlus->Fill(MCQtPlus);
1134 hMCKinkAnglePlus->Fill(MCKinkAnglePlus2);
1135 hMCPKinkAngPlus->Fill(MCP,MCKinkAnglePlus2);
1136 hMCPdgCodemdPlus->Fill(TMath::Abs(MCPdg),TMath::Abs(dcodePlus));
1137 hMCPtmdPlus->Fill(MCPt, MCPtdPlus);
1138
1139 if ((MCQtPlus<cLowQt) || (MCQtPlus>cUpQt) || (MCKinkAnglePlus2<cLowKinkAngle)) continue;
1140
1141 if (dcodePlus==-cPdgMuon) { //muon daughters selection
1142 hMCPtPimuonPlus->Fill(MCPt);
1143 hMCEtaPimuonPlus->Fill(MCEta);
1144 hMCRapidityPimuonPlus->Fill(MCRapidity);
1145 hMCQtPimuonPlus->Fill(MCQtPlus);
1146 hMCPKinkAngPimuonPlus->Fill(MCKinkAnglePlus2);
1147 } else {hMCPtPiotherPlus->Fill(MCPt);
1148 hMCEtaPiotherPlus->Fill(MCEta);
1149 hMCRapidityPiotherPlus->Fill(MCRapidity);
1150 hMCQtPiotherPlus->Fill(MCQtPlus);
1151 hMCPKinkAngPiotherPlus->Fill(MCKinkAnglePlus2);
1152 }
1153 } //end of pion daughters' loop
1154 } else if (MCPdg==-cPdgPion) { //negative pion selection
1155 Double_t MCRapidity = GetMCRapidity(MCparticle);
1156 if (TMath::Abs(MCRapidity)>cRapidityLim) continue;
1157 hMCMultPiMinus->Fill(iMC); //MC pion multiplicity
1158 hMCPtPiMinus->Fill(MCPt);
1159 hMCEtaPiMinus->Fill(MCEta);
1160 hMCRapidityPiMinus->Fill(MCRapidity);
1161
1162 Int_t MCNDaughtersMinus = MCparticle->GetNDaughters();
1163 hMCNDaughtersMinus->Fill(MCNDaughtersMinus);
1164 Int_t FirstDMinus = MCparticle->GetFirstDaughter(); //first daughter's label
1165 Int_t LastDMinus = MCparticle->GetLastDaughter(); //last daughter's label
1166 if ((FirstDMinus>MCNTracks)||(LastDMinus>MCNTracks)) continue;
1167
1168 for (Int_t iMCdMinus=FirstDMinus; iMCdMinus<=LastDMinus; iMCdMinus++) { //loop on pion daughters
1169 if (iMCdMinus<0) continue; //debug
1170 TParticle* MCdaughterMinus = MCstack->Particle(iMCdMinus);
1171
1172 Double_t RdMinus = MCdaughterMinus->R(); //position radius of daughter's generation vertex
1173 hMCRadPiDauMinus->Fill(RdMinus);
1174
1175 Double_t MCKinkPosZMinus = MCdaughterMinus->Vz();
1176 hMCKinkPosZMinus->Fill(MCKinkPosZMinus);
1177
1178 if ((TMath::Abs(MCKinkPosZMinus)<cLowZ) || (TMath::Abs(MCKinkPosZMinus)>cUpZ)) continue;
1179
1180 if ((RdMinus<cLowR) || (RdMinus>cUpR)) continue; //selection of daughters that where generated in TPC
1181
1182 Int_t dcodeMinus = MCdaughterMinus->GetPdgCode();
1183
1184 UInt_t MCDauUIDMinus = MCdaughterMinus->GetUniqueID(); //daughter's unique id (= method of production)
1185 hMCUIDPiDauMinus->Fill(MCDauUIDMinus);
1186
1187 if (MCDauUIDMinus!=4) { //selection of decayed daughters
1188 hMCPdgPiNonDecayedMinus->Fill(dcodeMinus);
1189 continue;
1190 }
1191
1192 hMCPdgPiDauMinus->Fill(TMath::Abs(dcodeMinus));
1193
1194
1195 Double_t MCPtdMinus = MCdaughterMinus->Pt(); //daughter's transverse momentum in lab frame
1196 Double_t MCQtMinus = MCPQt(mcEvent, iMC, MCdaughterMinus); //daughter's transverse momentum in mother's frame (Qt)
1197 Double_t MCKinkAngleMinus2 = fuMCKinkAngle(mcEvent, iMC, MCdaughterMinus, kTRUE); //kink angle in degrees
1198 Double_t MCMaxKinkAngPimuMinus=fMaxKinkAngPimu->Eval(MCP,0.,0.,0.); //maximum decay angle in lab for pion decaying to muon
1199
1200 if (MCKinkAngleMinus2>(MCMaxKinkAngPimuMinus*1.1)) continue;
1201
1202 hMCQtMinus->Fill(MCQtMinus);
1203 hMCKinkAngleMinus->Fill(MCKinkAngleMinus2);
1204 hMCPKinkAngMinus->Fill(MCP,MCKinkAngleMinus2);
1205 hMCPdgCodemdMinus->Fill(TMath::Abs(MCPdg),TMath::Abs(dcodeMinus));
1206 hMCPtmdMinus->Fill(MCPt, MCPtdMinus);
1207
1208 if ((MCQtMinus<cLowQt) || (MCQtMinus>cUpQt) || (MCKinkAngleMinus2<cLowKinkAngle)) continue;
1209
1210 if (dcodeMinus==cPdgMuon) { //muon daughters selection
1211 hMCPtPimuonMinus->Fill(MCPt);
1212 hMCEtaPimuonMinus->Fill(MCEta);
1213 hMCRapidityPimuonMinus->Fill(MCRapidity);
1214 hMCQtPimuonMinus->Fill(MCQtMinus);
1215 hMCPKinkAngPimuonMinus->Fill(MCKinkAngleMinus2);
1216 } else {hMCPtPiotherMinus->Fill(MCPt);///////////////////////////
1217 hMCEtaPiotherMinus->Fill(MCEta);
1218 hMCRapidityPiotherMinus->Fill(MCRapidity);
1219 hMCQtPiotherMinus->Fill(MCQtMinus);
1220 hMCPKinkAngPiotherMinus->Fill(MCKinkAngleMinus2);
1221 }
1222 } //end of pion daughters' loop
1223 }
1224
1225 } // end of MC tracks loop
1226
1227
1228
1229//----------------------------- Physics selection ------------------------------//
1230 Bool_t IsSelected = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected()&AliVEvent::kMB;
1231 if ( IsSelected ==kFALSE) return;
1232
1233//--------------- Data Multiplicity after Physics selection --------------------//
1234 hMultPS->Fill(NTracks);
1235
1236//------------------------------------ Vertex ----------------------------------//
1237 const AliESDVertex* vtx = GetEventVertex(esdEvent); //ESD primary vertex
1238 if (!vtx) return;
1239
1240 Double_t vtxpos[3]; //vertex position vector
1241 vtx->GetXYZ(vtxpos);
1242 hvtx->Fill(vtxpos[0], vtxpos[1], vtxpos[2]); //ESD primary vertex position (x-y-z)
1243 hvtxy->Fill(vtxpos[0], vtxpos[1]);
1244 hvtyz->Fill(vtxpos[1], vtxpos[2]);
1245 hvtxz->Fill(vtxpos[0], vtxpos[2]);
1246
1247 if (TMath::Abs(vtxpos[2])>10.) return;
1248
1249//-------------------- Data Multiplicity after vertex cut -----------------------//
1250 hMultPSV->Fill(NTracks);
1251
1252//------------------------------- dE/dx parameters -----------------------------//
1253 if(!fPIDResponse) {
1254 AliAnalysisManager *man = AliAnalysisManager::GetAnalysisManager();
1255 AliInputEventHandler* inputHandler = (AliInputEventHandler*)(man->GetInputEventHandler());
1256 fPIDResponse = inputHandler->GetPIDResponse();
1257 }
1258
1259//------------------------- Reconstructed data Analysis -----------------------//
1260 for (Int_t iData = 0; iData<NTracks; iData++) { //loop on all ESD tracks
1261 AliESDtrack *ESDtrack = esdEvent->GetTrack(iData);
1262 if (!ESDtrack) {
1263 Printf("ERROR: Could not receive ESD track %d", iData);
1264 continue;
1265 }
1266
1267 Double_t Pt = ESDtrack->Pt();
1268 Double_t Eta = ESDtrack->Eta();
1269
1270 hPtAll->Fill(Pt);
1271 hEtaAll->Fill(Eta);
1272 //hRapidityAll->Fill(Rapidity(ESDtrack));
1273
1274 Double_t TrackPos[3]; //starting position of ESD tracks (x-y-z)
1275 ESDtrack->GetXYZ(TrackPos);
1276 hTrackPos->Fill(TrackPos[0],TrackPos[1],TrackPos[2]);
1277 hTrackPosxy->Fill(TrackPos[0], TrackPos[1]);
1278 hTrackPosyz->Fill(TrackPos[1], TrackPos[2]);
1279 hTrackPosxz->Fill(TrackPos[0], TrackPos[2]);
1280
1281 if ((IsPrimaryTrack(ESDtrack) == kFALSE) || (IsGoodTrack(ESDtrack) == kFALSE)) continue; //reject bad & secondary tracks
1282 hMultPrim->Fill(NTracks);
1283 hPtPrim->Fill(Pt);
1284 hEtaPrim->Fill(Eta);
1285 //hRapidityPrim->Fill(Rapidity(ESDtrack));
1286
1287 hPrimTrackPos->Fill(TrackPos[0],TrackPos[1],TrackPos[2]); //starting position of primary - supposed ESD tracks (x-y-z)
1288 hPrimTrackPosxy->Fill(TrackPos[0], TrackPos[1]);
1289 hPrimTrackPosyz->Fill(TrackPos[1], TrackPos[2]);
1290 hPrimTrackPosxz->Fill(TrackPos[0], TrackPos[2]);
1291
1292 if (Pt<cLowPt) continue;
1293
1294 hPt->Fill(Pt);
1295 hEta->Fill(Eta);
1296 //hRapidity->Fill(fuRapidity(ESDtrack));
1297
1298 Int_t KinkIndex = ESDtrack->GetKinkIndex(0); //kink index (1st component is negative if the track is a kink candidate)
1299 if (KinkIndex>=0) continue; //kink selection
1300
1301 Double_t Rapidity = fuRapidity(ESDtrack);
1302 if (TMath::Abs(Rapidity)>cRapidityLim) continue;
1303
1304 Double_t dEdx = ESDtrack->GetTPCsignal();
1305 Double_t NTPCclusters = ESDtrack->GetTPCclusters(0);
1306
1307 AliESDkink *kink = esdEvent->GetKink(TMath::Abs(KinkIndex)-1);
1308
1309 Int_t Label1 = kink->GetLabel(0); //mother's track MC label (first component is mother)
1310 Int_t Label2 = kink->GetLabel(1); //daughter's track MC label (second component is daughter)
1311 if (Label1>MCNTracks) continue;
1312 if (Label2>MCNTracks) continue;
1313
1314 const TVector3 KinkPos(kink->GetPosition());
1315 Double_t KinkPosR = kink->GetR(); //kink's position radius
1316 Double_t KinkDistance = kink->GetDistance();
1317 Double_t Qt = kink->GetQt(); //daughter's transverse momentum in mother's frame
1318 Double_t KinkAngle =TMath::RadToDeg()*kink->GetAngle(2); //kink angle in mother frame (3rd component is angle in rads)
1319
1320 const TVector3 PMother(kink->GetMotherP()); //ESD mother's momentum
1321 Double_t Pmx = PMother.Px();
1322 Double_t Pmy = PMother.Py();
1323 Double_t Pmz = PMother.Pz();
1324 Double_t Pm = PMother.Mag(); //ESD mother's momentum magnitude
1325 Double_t PTrack[3];
1326 ESDtrack->GetPxPyPz(PTrack);
1327 TVector3 Pvector3(PTrack[0], PTrack[1], PTrack[2]);
1328 Double_t P = Pvector3.Mag();
1329 Double_t PTPC = ESDtrack->GetInnerParam()->GetP();
1330
1331 const TVector3 PDaughter(kink->GetDaughterP()); //ESD daughter's momentum
1332 Double_t Pdx = PDaughter.Px();
1333 Double_t Pdy = PDaughter.Py();
1334 Double_t Pdz = PDaughter.Pz();
1335 Double_t Pd = PDaughter.Mag(); //ESD daugter's momentum magnitude
1336 Double_t Edmu = TMath::Sqrt(TMath::Power(Pd,2)+TMath::Power(cMuonMass,2)); //ESD muon daughter's energy
1337
1338 Double_t DP = TMath::Sqrt((Pmx-Pdx)*(Pmx-Pdx)+(Pmy-Pdy)*(Pmy-Pdy)+(Pmz-Pdz)*(Pmz-Pdz)); //transferred momentum magnitude
1339 Double_t MinvPimu = TMath::Sqrt((Edmu+DP)*(Edmu+DP)-TMath::Power(Pm,2)); //pion mother's invariant mass when decaying to muon
1340 Double_t MaxKinkAngPimu=fMaxKinkAngPimu->Eval(P,0.,0.,0.); //maximum decay angle in lab frame for a pion decaying to muon
1341
1342 TParticle *particle1 = MCstack->Particle(TMath::Abs(kink->GetLabel(0))); //mother MC particle object
1343 TParticle *particle2 = MCstack->Particle(TMath::Abs(kink->GetLabel(1))); //daughter MC particle object
1344
1345 Int_t code1 = particle1->GetPdgCode(); //mother's pdg code obtained from MC mother object
1346 Int_t code2 = particle2->GetPdgCode(); //daughter's pdg code obtained from MC daughter object
1347
1348 UInt_t DauUID = particle2->GetUniqueID(); //ESD daughter's unique id (method of production)
1349
1350 Double_t MCKinkPosZ = particle2->Vz();
1351
1352 hPtKink->Fill(Pt);
1353 hEtaKink->Fill(Eta);
1354 hRapidityKink->Fill(Rapidity);
1355 hPmP->Fill(Pm,P);
1356 hKinkPosRTPCclusters1->Fill(NTPCclusters/KinkPosR);
1357 hKinkPosRTPCclusters2->Fill(KinkPosR, NTPCclusters);
1358 hQt->Fill(Qt);
1359 hKinkAngle->Fill(KinkAngle);
1360 hDCAkink->Fill(KinkDistance);
1361 hPmKinkAng->Fill(P, KinkAngle);
1362 hKinkPosXY->Fill(KinkPos[0],KinkPos[1]);
1363 hKinkPosZY->Fill(KinkPos[2],KinkPos[1]);
1364 hKinkPosZR->Fill(KinkPos[2],KinkPosR);
1365 hKinkPosR->Fill(KinkPosR);
1366 hKinkPosZ->Fill(KinkPos[2]);
1367 hKinkPosZMCKinkPosZ->Fill(KinkPos[2], MCKinkPosZ);
1368 hPdgCodemd->Fill(TMath::Abs(code1),TMath::Abs(code2));
1369 hPmd->Fill(Pm,Pd);
1370 hMinvPimu->Fill(MinvPimu);
1371 hUIDKinkDau->Fill(DauUID);
1372 hdEdx->Fill(PTPC, dEdx);
1373
1374 if ( (IsRealPionKink(kink, MCstack) == kFALSE) || (Label1>MCNPrimTracks) ) {
1375 hPtKinkFake->Fill(Pt);
1376 hEtaKinkFake->Fill(Eta);
1377 hRapidityKinkFake->Fill(Rapidity);
1378 hPmPFake->Fill(Pm,P);
1379 hKinkPosRTPCclusters1Fake->Fill(NTPCclusters/KinkPosR);
1380 hKinkPosRTPCclusters2Fake->Fill(KinkPosR,NTPCclusters);
1381 hQtFake->Fill(Qt);
1382 hKinkAngleFake->Fill(KinkAngle);
1383 hDCAkinkFake->Fill(KinkDistance);
1384 hPmKinkAngFake->Fill(P, KinkAngle);
1385 hKinkPosXYFake->Fill(KinkPos[0],KinkPos[1]);
1386 hKinkPosZYFake->Fill(KinkPos[2],KinkPos[1]);
1387 hKinkPosZRFake->Fill(KinkPos[2],KinkPosR);
1388 hKinkPosRFake->Fill(KinkPosR);
1389 hKinkPosZFake->Fill(KinkPos[2]);
1390 hKinkPosZMCKinkPosZFake->Fill(KinkPos[2], MCKinkPosZ);
1391 hPdgCodemdFake->Fill(TMath::Abs(code1),TMath::Abs(code2));
1392 hPmdFake->Fill(Pm,Pd);
1393 hMinvPimuFake->Fill(MinvPimu);
1394 hUIDKinkDauFake->Fill(DauUID);
1395 hdEdxFake->Fill(PTPC, dEdx);
1396 }
1397
1398 if ((KinkPosR<cLowR)||(KinkPosR>cUpR)) continue; //selection of kinks that are detected in the main region of TPC
1399
1400 hPtPosRSelected->Fill(Pt);
1401
1402 if ((TMath::Abs(KinkPos[2])<0.5) || (TMath::Abs(KinkPos[2])>225)){
1403 hPdgCodemdZRejected->Fill(TMath::Abs(code1),TMath::Abs(code2));
1404 continue;
1405 }
1406 hPtZSelected->Fill(Pt);
1407
1408
1409 if (KinkAngle<cLowKinkAngle) { //reject fake kinks (with very small kink angle)
1410 hPdgCodemdAngRejected->Fill(TMath::Abs(code1), TMath::Abs(code2));
1411 continue;
1412 }
1413 hPtAngSelected->Fill(Pt);
1414
1415 if ((Pm/P<0.7) || (1.3<Pm/P)) {
1416 hPdgCodemdPmRejected->Fill(TMath::Abs(code1),TMath::Abs(code2));
1417 continue;
1418 }//good tracks check mother track and kink if near
1419 hPtPmSelected->Fill(Pt);
1420
1421 if (Qt<cLowQt) { //pion kinks Qt cuts
1422 hPdgCodemdQtLowRejected->Fill(TMath::Abs(code1),TMath::Abs(code2));
1423 continue;
1424 }
1425
1426 //Good Kinks
1427 hPtGoodKink->Fill(Pt);
1428 hEtaGoodKink->Fill(Eta);
1429 hRapidityGoodKink->Fill(Rapidity);
1430 hQtGoodKink->Fill(Qt);
1431 hPmGoodKinkAng->Fill(P, KinkAngle);
1432 hPdgCodemdGoodKink->Fill(TMath::Abs(code1),TMath::Abs(code2));
1433 hPmdGoodKink->Fill(Pm,Pd);
1434 hUIDGoodKinkDau->Fill(DauUID);
1435 hdEdxGoodKink->Fill(PTPC, dEdx);
1436
1437
1438
1439 //---------------------- perfect PID from pdg code -------------------------//
1440
1441 if (code1==cPdgPion) { //selection of pion plus kinks
1442 hUIDPiDauPlus->Fill(DauUID);
1443 if ((Label1<=MCNPrimTracks) && (DauUID==4)) { //select primary pions that decay
1444 hMultPiPlus->Fill(NTracks);
1445 hPtPiPlus->Fill(Pt);
1446 hEtaPiPlus->Fill(Eta);
1447 hRapidityPiPlus->Fill(Rapidity);
1448 hQtPiPlus->Fill(Qt);
1449 hKinkAnglePiPlus->Fill(KinkAngle);
1450 hPmKinkAngPiPlus->Fill(P, KinkAngle);
1451 hKinkPosXYPiPlus->Fill(KinkPos[0],KinkPos[1]);
1452 hKinkPosZRPiPlus->Fill(KinkPos[2],KinkPosR);
1453 hKinkPosRPiPlus->Fill(KinkPosR);
1454 hDCAkinkPiPlus->Fill(KinkDistance);
1455 hPdgCodemdPiPlus->Fill(TMath::Abs(code1),TMath::Abs(code2));
1456 hPmdPiPlus->Fill(Pm,Pd);
1457 hdEdxPiPlus->Fill(PTPC, dEdx);
1458
1459 if (code2==-cPdgMuon) { //selection of muon daughters
1460 hQtPimuPlus->Fill(Qt);
1461 hPmKinkAngPimuPlus->Fill(P, KinkAngle);
1462 } else { //other daughters?
1463 hQtPiotherPlus->Fill(Qt);
1464 hPmKinkAngPiotherPlus->Fill(P, KinkAngle);
1465 hPdgCodemdPiotherPlus->Fill(TMath::Abs(code1), TMath::Abs(code2));
1466 }
1467 }
1468 } else if (code1==-cPdgPion) {
1469 hUIDPiDauMinus->Fill(DauUID);
1470 if ((Label1<=MCNPrimTracks) && (DauUID==4)) { //select primary pions that decay
1471 hMultPiMinus->Fill(NTracks);
1472 hPtPiMinus->Fill(Pt);
1473 hEtaPiMinus->Fill(Eta);
1474 hRapidityPiMinus->Fill(Rapidity);
1475 hQtPiMinus->Fill(Qt);
1476 hKinkAnglePiMinus->Fill(KinkAngle);
1477 hPmKinkAngPiMinus->Fill(P, KinkAngle);
1478 hKinkPosXYPiMinus->Fill(KinkPos[0],KinkPos[1]);
1479 hKinkPosZRPiMinus->Fill(KinkPos[2],KinkPosR);
1480 hKinkPosRPiMinus->Fill(KinkPosR);
1481 hDCAkinkPiMinus->Fill(KinkDistance);
1482 hPdgCodemdPiMinus->Fill(TMath::Abs(code1),TMath::Abs(code2));
1483 hPmdPiMinus->Fill(Pm,Pd);
1484 hdEdxPiMinus->Fill(PTPC, dEdx);
1485
1486 if (code2==cPdgMuon) { //selection of muon daughters
1487 hQtPimuMinus->Fill(Qt);
1488 hPmKinkAngPimuMinus->Fill(P, KinkAngle);
1489 } else { //other daughters?
1490 hQtPiotherMinus->Fill(Qt);
1491 hPmKinkAngPiotherMinus->Fill(P, KinkAngle);
1492 hPdgCodemdPiotherMinus->Fill(TMath::Abs(code1), TMath::Abs(code2));
1493 }
1494 }
1495 }// end of pion selection
1496
1497
1498 //------------------------ realistic PID from physical criteria --------------------//
1499
1500
1501
1502 if (Qt>cUpQt){ //pion kinks Qt cuts
1503 hPdgCodemdQtRejected->Fill(TMath::Abs(code1),TMath::Abs(code2));
1504 continue;
1505 }
1506 hPtQtSelected->Fill(Pt);
1507
1508 if (KinkAngle>(MaxKinkAngPimu*1.1)) { //pion kink angle cuts
1509 hPdgCodemdMaxAngRejected->Fill(TMath::Abs(code1),TMath::Abs(code2));
1510 continue;
1511 }
1512 hPtMaxAngSelected->Fill(Pt);
1513
1514// if ( ((NTPCclusters/KinkPosR)>0.63) || ((NTPCclusters/KinkPosR)<0.20) ) { //good TPC tracks selection
1515 Double_t tpcNClHigh = -51.67+ (11./12.)*KinkPosR;
1516 Double_t tpcNClMin = -85.5 + (65./95.)*KinkPosR;
1517 if ( (NTPCclusters>tpcNClHigh) || (NTPCclusters<tpcNClMin) ){ //good TPC tracks selection
1518 hPdgCodemdRTPCclustersRejected->Fill(TMath::Abs(code1),TMath::Abs(code2));
1519 continue;
1520 }
1521 hPtRTPCclustersSelected->Fill(Pt);
1522 hRTPCclustersRTPCclustersSelected->Fill(KinkPosR,NTPCclusters);
1523
1524 if ((MinvPimu>cUpInvMass) || (MinvPimu<cLowInvMass)) { //pion kinks invariant mass cuts
1525 hPdgCodemdMinvRejected->Fill(TMath::Abs(code1),TMath::Abs(code2));
1526 continue;
1527 }
1528
1529
1530/////////////////selected without dE/dx cut
1531 hPtSelected->Fill(Pt);
1532 hEtaSelected->Fill(Eta);
1533 hRapiditySelected->Fill(Rapidity);
1534 hQtSelected->Fill(Qt);
1535 hKinkAngleSelected->Fill(KinkAngle);
1536 hDCAkinkSelected->Fill(KinkDistance);
1537 hPmKinkAngSelected->Fill(P, KinkAngle);
1538 hKinkPosXYSelected->Fill(KinkPos[0],KinkPos[1]);
1539 hKinkPosZRSelected->Fill(KinkPos[2],KinkPosR);
1540 hKinkPosRSelected->Fill(KinkPosR);
1541 hPdgCodemdSelected->Fill(TMath::Abs(code1),TMath::Abs(code2));
1542 hPmdSelected->Fill(Pm,Pd);
1543 hMinvPimuSelected->Fill(MinvPimu);
1544 hUIDKinkDauSelected->Fill(DauUID);
1545 hdEdxSelected->Fill(PTPC, dEdx);
1546 if ( (IsRealPionKink(kink, MCstack) == kFALSE) || (Label1>MCNPrimTracks) ) {
1547 hPtSelectedFake->Fill(Pt);
1548 hEtaSelectedFake->Fill(Eta);
1549 hRapiditySelectedFake->Fill(Rapidity);
1550 hQtSelectedFake->Fill(Qt);
1551 hKinkAngleSelectedFake->Fill(KinkAngle);
1552 hDCAkinkSelectedFake->Fill(KinkDistance);
1553 hPmKinkAngSelectedFake->Fill(P, KinkAngle);
1554 hKinkPosXYSelectedFake->Fill(KinkPos[0],KinkPos[1]);
1555 hKinkPosZRSelectedFake->Fill(KinkPos[2],KinkPosR);
1556 hKinkPosRSelectedFake->Fill(KinkPosR);
1557 hPmdSelectedFake->Fill(Pm,Pd);
1558 hMinvPimuSelectedFake->Fill(MinvPimu);
1559 hdEdxSelectedFake->Fill(PTPC, dEdx);
1560 }
1561
1562
1563 Double_t NSigmaTPC = TMath::Abs(fPIDResponse->NumberOfSigmasTPC(ESDtrack, AliPID::kPion));
1564 if (NSigmaTPC>cSigmaCut) { // dE/dx cut
1565 hPdgCodemddEdxRejected->Fill(TMath::Abs(code1),TMath::Abs(code2));
1566 continue;
1567 }
1568
1569 Double_t Sign = ESDtrack->GetSign();
1570
1571///////////////// dEdx selected
1572 hPtPiSelected->Fill(Pt);
1573 hEtaPiSelected->Fill(Eta);
1574 hRapidityPiSelected->Fill(Rapidity);
1575 hQtPiSelected->Fill(Qt);
1576 hKinkAnglePiSelected->Fill(KinkAngle);
1577 hDCAkinkPiSelected->Fill(KinkDistance);
1578 hPmKinkAngPiSelected->Fill(P, KinkAngle);
1579 hKinkPosRTPCclusters1PiSelected->Fill(NTPCclusters/KinkPosR);
1580 hKinkPosRTPCclusters2PiSelected->Fill(KinkPosR, NTPCclusters);
1581 hKinkPosXYPiSelected->Fill(KinkPos[0],KinkPos[1]);
1582 hKinkPosZRPiSelected->Fill(KinkPos[2],KinkPosR);
1583 hKinkPosRPiSelected->Fill(KinkPosR);
1584 hKinkPosZPiSelected->Fill(KinkPos[2]);
1585 hPmPPiSelected->Fill(Pm,P);
1586 hPdgCodemdPiSelected->Fill(TMath::Abs(code1),TMath::Abs(code2));
1587 hPmdPiSelected->Fill(Pm,Pd);
1588 hMinvPimuPiSelected->Fill(MinvPimu);
1589 hUIDKinkDauPiSelected->Fill(DauUID);
1590 hdEdxPiSelected->Fill(PTPC, dEdx);
1591
1592 if (Sign>0) {
1593 hPtPiSelectedPlus->Fill(Pt);
1594 hEtaPiSelectedPlus->Fill(Eta);
1595 hRapidityPiSelectedPlus->Fill(Rapidity);
1596 hQtPiSelectedPlus->Fill(Qt);
1597 hKinkAnglePiSelectedPlus->Fill(KinkAngle);
1598 hDCAkinkPiSelectedPlus->Fill(KinkDistance);
1599 hPmKinkAngPiSelectedPlus->Fill(P, KinkAngle);
1600 hKinkPosXYPiSelectedPlus->Fill(KinkPos[0],KinkPos[1]);
1601 hKinkPosZRPiSelectedPlus->Fill(KinkPos[2],KinkPosR);
1602 hPdgCodemdPiSelectedPlus->Fill(TMath::Abs(code1),TMath::Abs(code2));
1603 hPmdPiSelectedPlus->Fill(Pm,Pd);
1604 hMinvPimuPiSelectedPlus->Fill(MinvPimu);
1605 hUIDPiDaumuSelectedPlus->Fill(DauUID);
1606 hdEdxPiSelectedPlus->Fill(PTPC, dEdx);
1607
1608//------------------- contamination of results of realistic PID ----------------//
1609 if (IsRealPionKink(kink, MCstack) == kTRUE) { //real pion kinks
1610 if (Label1<=MCNPrimTracks) { //primaries
1611 hPtPrimPiKinksPlus->Fill(Pt);
1612 hEtaPrimPiKinksPlus->Fill(Eta);
1613 hRapidityPrimPiKinksPlus->Fill(Rapidity);
1614 } else { //secondary real kinks
1615 hPtSecondPiKinksPlus->Fill(Pt);
1616 hEtaSecondPiKinksPlus->Fill(Eta);
1617 hRapiditySecondPiKinksPlus->Fill(Rapidity);
1618 }
1619 } else { //fakes
1620 hPtNonPiKinksPlus->Fill(Pt);
1621 hEtaNonPiKinksPlus->Fill(Eta);
1622 hRapidityNonPiKinksPlus->Fill(Rapidity);
1623 hPdgCodemdNonPiKinksPlus->Fill(TMath::Abs(code1),TMath::Abs(code2));
1624 }
1625
1626 } else if (Sign<0) {
1627 hPtPiSelectedMinus->Fill(Pt);
1628 hEtaPiSelectedMinus->Fill(Eta);
1629 hRapidityPiSelectedMinus->Fill(Rapidity);
1630 hQtPiSelectedMinus->Fill(Qt);
1631 hKinkAnglePiSelectedMinus->Fill(KinkAngle);
1632 hDCAkinkPiSelectedMinus->Fill(KinkDistance);
1633 hPmKinkAngPiSelectedMinus->Fill(P, KinkAngle);
1634 hKinkPosXYPiSelectedMinus->Fill(KinkPos[0],KinkPos[1]);
1635 hKinkPosZRPiSelectedMinus->Fill(KinkPos[2],KinkPosR);
1636 hPdgCodemdPiSelectedMinus->Fill(TMath::Abs(code1),TMath::Abs(code2));
1637 hPmdPiSelectedMinus->Fill(Pm,Pd);
1638 hMinvPimuPiSelectedMinus->Fill(MinvPimu);
1639 hUIDPiDaumuSelectedMinus->Fill(DauUID);
1640 hdEdxPiSelectedMinus->Fill(PTPC, dEdx);
1641
1642//------------------- contamination of results of realistic PID ----------------//
1643 if (IsRealPionKink(kink, MCstack) == kTRUE) { //real pion kinks
1644 if (Label1<=MCNPrimTracks) { //primaries
1645 hPtPrimPiKinksMinus->Fill(Pt);
1646 hEtaPrimPiKinksMinus->Fill(Eta);
1647 hRapidityPrimPiKinksMinus->Fill(Rapidity);
1648 } else { //secondary real kinks
1649 hPtSecondPiKinksMinus->Fill(Pt);
1650 hEtaSecondPiKinksMinus->Fill(Eta);
1651 hRapiditySecondPiKinksMinus->Fill(Rapidity);
1652 }
1653 } else { //fakes
1654 hPtNonPiKinksMinus->Fill(Pt);
1655 hEtaNonPiKinksMinus->Fill(Eta);
1656 hRapidityNonPiKinksMinus->Fill(Rapidity);
1657 hPdgCodemdNonPiKinksMinus->Fill(TMath::Abs(code1),TMath::Abs(code2));
1658 }
1659 }
1660 } //end of ESD track loop
1661 PostData(1, fListOfHistos);
1662}
1663
1664
1665//________________________________________________________________________
1666void AliAnalysisPionKinksMCESD::Terminate(Option_t *) {
1667}
1668
1669//_________________________________________________________________________
1670const AliESDVertex* AliAnalysisPionKinksMCESD::GetEventVertex(AliESDEvent* esd) { //Gets ESD vertex and returns it if it is valid
1671 const AliESDVertex* vertex = esd->GetPrimaryVertexTracks();
1672 if(vertex->GetStatus()==kTRUE) return vertex;
1673 else {
1674 vertex = esd->GetPrimaryVertexSPD();
1675 if((vertex->GetStatus()==kTRUE)&&(vertex->GetNContributors()>0)) return vertex;
1676 else return 0;
1677 }
1678}
1679
1680//________________________________________________________________________
1681Double_t AliAnalysisPionKinksMCESD::Energy(AliESDtrack* track) const { //calculates the energy for a pion track
1682 Double_t TrackMom[3];
1683 track->GetPxPyPz(TrackMom);
1684 TVector3 P(TrackMom[0], TrackMom[1], TrackMom[2]);
1685 //Double_t EnergyK = TMath::Sqrt(P.Mag()*P.Mag()+0.493677*0.493677); //kaon's energy
1686 Double_t EnergyPi = TMath::Sqrt(P.Mag()*P.Mag()+0.13957018*0.13957018); //pion's energy
1687 return EnergyPi;
1688}
1689
1690//________________________________________________________________________
1691Double_t AliAnalysisPionKinksMCESD::GetMCRapidity(TParticle* particle) const { //calculates the rapidity of a track
1692 TVector3 P(particle->Px(),particle->Py(),particle->Pz());
1693 Double_t MCRapidity = 0.5*(TMath::Log(((particle->Energy())+P[2])/((particle->Energy())-P[2])));
1694 return MCRapidity;
1695}
1696
1697//________________________________________________________________________
1698Double_t AliAnalysisPionKinksMCESD::fuRapidity(AliESDtrack* track) const { //calculates the rapidity for a track
1699 Double_t TrackMom[3];
1700 track->GetPxPyPz(TrackMom);
1701 TVector3 P(TrackMom[0], TrackMom[1], TrackMom[2]);
1702 Double_t RapidityPi = 0.5*(TMath::Log((Energy(track)+P[2])/(Energy(track)-P[2])));
1703 return RapidityPi;
1704}
1705
1706//________________________________________________________________________
1707Double_t AliAnalysisPionKinksMCESD::MCPQt(AliMCEvent* mcEvent, Int_t iMC, TParticle* MCdaughter) const {
1708 TVector3 DecayMomentumPi(0,0,0); //mother's momentum when it decays
1709 TClonesArray* trArray=0;
1710 TParticle* tempParticle=0;
1711 if (mcEvent->GetParticleAndTR(iMC, tempParticle, trArray) != -1) {
1712 AliTrackReference* MCtrackReference = static_cast<AliTrackReference*>(trArray->Last());
1713 DecayMomentumPi.SetXYZ(MCtrackReference->Px(), MCtrackReference->Py(), MCtrackReference->Pz());
1714 } else return 0;
1715
1716 const TVector3 MCP3d(MCdaughter->Px(), MCdaughter->Py(), MCdaughter->Pz()); //daughter's momentum when producedframe
1717 Double_t MCQt = MCP3d.Perp(DecayMomentumPi); //daughter's transverse momentum in mother's frame (Qt)
1718 return MCQt;
1719}
1720
1721//________________________________________________________________________
1722Double_t AliAnalysisPionKinksMCESD::fuMCKinkAngle(AliMCEvent* mcEvent, Int_t iMC, TParticle* MCdaughter, Bool_t degrees) const {
1723 Double_t MCQt=MCPQt(mcEvent, iMC, MCdaughter);
1724 Double_t MCKinkAngle = TMath::ASin(MCQt/(MCdaughter->P())); //kink angle in rads
1725 if (degrees==kFALSE) {
1726 return MCKinkAngle;
1727 } else {
1728 MCKinkAngle = TMath::RadToDeg()*MCKinkAngle; //kink angle in degrees
1729 return MCKinkAngle;
1730 }
1731}
1732
1733//________________________________________________________________________
1734Bool_t AliAnalysisPionKinksMCESD::IsGoodTrack(AliESDtrack* ESDtrack) const { //Checks if a track is acceptable as good
1735 UInt_t status = ESDtrack->GetStatus();
1736 if ((status&AliESDtrack::kITSrefit)==0) return kFALSE; //cut tracks that cannot be reconstructed by ITS only
1737 if ((status&AliESDtrack::kTPCrefit)==0) return kFALSE; //cut tracks that cannot be reconstructed by TPC only
1738
1739 Double_t NTPCclusters = ESDtrack->GetTPCclusters(0);
1740 Double_t TPCchi2 = ESDtrack->GetTPCchi2();
1741 if (NTPCclusters<20) return kFALSE;
1742 //if (NTPCclusters<30) return kFALSE; // cut sta 30 gia syst
1743
1744 //hTPCchi2clusters->Fill(TPCchi2/NTPCclusters);//histo to check???????
1745 if (TPCchi2/NTPCclusters>3.8) return kFALSE; //cut tracks of bad quality fit with the contributing clusters
1746
1747 /*Double_t ExtCov[15]; //external covariances matrix
1748 ESDtrack->GetExternalCovariance(ExtCov);
1749 if(ExtCov[0]>2) return kFALSE; //sigma(y^2)
1750 if(ExtCov[2]>2) return kFALSE; //sigma(z^2)
1751 if(ExtCov[5]>0.5) return kFALSE; //sigma(sinphi^2)
1752 if(ExtCov[9]>0.5) return kFALSE; //sigma(tanlamda^2)
1753 if(ExtCov[14]>2) return kFALSE; //sigma(1/Pt^2)*/
1754
1755 return kTRUE;
1756}
1757
1758//________________________________________________________________________
1759Bool_t AliAnalysisPionKinksMCESD::IsPrimaryTrack(AliESDtrack* ESDtrack) const { //Checks if a track is acceptable as a primary
1760 Float_t ImpParam[2]; //DCA to vertex, 0->in x-y plane, 1->in z
1761 Float_t ImpParamCov[3]; //covariances of DCA to vertex
1762 ESDtrack->GetImpactParameters(ImpParam,ImpParamCov);
1763 //hdcaToVertexXY->Fill(ImpParam[0]);
1764 //hdcaToVertexZ->Fill(ImpParam[1]);
1765 if (ImpParamCov[0]<=0 || ImpParamCov[2]<=0) {
1766 AliDebug (1, "Estimated DCA covariance lower or equal zero!");
1767 ImpParamCov[0]=0; ImpParamCov[2]=0;
1768 }
1769
1770 //if((TMath::Abs(ImpParam[0])>0.3) || (TMath::Abs((ImpParam[1])>2.5))) return kFALSE; //absolute DCA cut
1771 if (!fMaxDCAtoVtxCut->AcceptTrack(ESDtrack)) return kFALSE;
1772 else return kTRUE;
1773}
1774
1775
1776//________________________________________________________________________
1777Bool_t AliAnalysisPionKinksMCESD::IsRealPionKink(AliESDkink* kink, AliStack* MCstack) const { //checks if a reconstructed kink is a pion kink
1778 Int_t Label1 = kink->GetLabel(0); //mother's track MC label (first component is mother)
1779 Int_t Label2 = kink->GetLabel(1); //daughter's track MC label (second component is daughter)
1780 //if (Label1>MCNTracks) return kFALSE;
1781 //if (Label2>MCNTracks) return kFALSE;
1782
1783 TParticle *particle1 = MCstack->Particle(TMath::Abs(Label1)); //mother MC particle object
1784 TParticle *particle2 = MCstack->Particle(TMath::Abs(Label2)); //daughter MC particle object
1785
1786 Int_t code1 = particle1->GetPdgCode(); //mother's pdg code obtained from MC mother object
1787 Int_t code2 = particle2->GetPdgCode(); //daughter's pdg code obtained from MC daughter object
1788
1789 UInt_t UID = particle2->GetUniqueID(); //ESD daughter's unique id (method of production)
1790 if (UID!=4) return kFALSE;
1791
1792 if( (code1==cPdgPion) && (code2==-cPdgMuon) ){
1793 return kTRUE;
1794 } else if ( (code1==-cPdgPion) && (code2==cPdgMuon) ){
1795 return kTRUE;
1796 } else {
1797 return kFALSE;
1798 }
1799}
1800