Changes to compile with Root6
[u/mrichter/AliRoot.git] / PWGLF / STRANGENESS / Hypernuclei / AliAnalysisTaskReadNuclexAOD.cxx
CommitLineData
930d0706 1/**************************************************************************
2 * Contributors are not mentioned at all. *
3 * *
4 * Permission to use, copy, modify and distribute this software and its *
5 * documentation strictly for non-commercial purposes is hereby granted *
6 * without fee, provided that the above copyright notice appears in all *
7 * copies and that both the copyright notice and this permission notice *
8 * appear in the supporting documentation. The authors make no claims *
9 * about the suitability of this software for any purpose. It is *
10 * provided "as is" without express or implied warranty. *
11 **************************************************************************/
12
13//
14//-----------------------------------------------------------------
15// AliAnalysisTaskNUclexAOD class AOD
16//-----------------------------------------------------------------
17
18
19class TTree;
20class TParticle;
21class TVector3;
22
23#include "AliAnalysisManager.h"
24#include <AliMCEventHandler.h>
25#include <AliMCEvent.h>
26#include <AliStack.h>
27
28class AliESDVertex;
29class AliAODVertex;
30class AliESDv0;
31class AliAODv0;
32class AliCascadeVertexer;
33
34#include <iostream>
35#include "AliAnalysisTaskSE.h"
36#include "TList.h"
37#include "TH1.h"
38#include "TH2.h"
39#include "TH3.h"
40#include "TNtuple.h"
41#include "TGraph.h"
42#include "TCutG.h"
43#include "TF1.h"
44#include "TCanvas.h"
45#include "TMath.h"
46#include "TChain.h"
47#include "Riostream.h"
48#include "AliLog.h"
49#include "AliCascadeVertexer.h"
50#include "AliESDEvent.h"
51#include "AliESDtrack.h"
52#include "AliExternalTrackParam.h"
53#include "AliAODEvent.h"
54#include "AliInputEventHandler.h"
55#include "AliESDcascade.h"
56#include "AliAODcascade.h"
57#include "AliAnalysisTaskReadNuclexAOD.h"
58#include "AliESDtrackCuts.h"
59#include "AliCentrality.h"
60#include "TString.h"
61#include <TDatime.h>
62#include <TRandom3.h>
63#include <AliAODPid.h>
64#include <AliAODHandler.h>
65#include <AliAODRecoDecay.h>
66#include <AliAODRecoDecayLF.h>
67#include <AliAODRecoDecayLF2Prong.h>
68
5e2539d9 69using std::cout;
70using std::endl;
71
930d0706 72ClassImp(AliAnalysisTaskReadNuclexAOD)
73
74//________________________________________________________________________
75AliAnalysisTaskReadNuclexAOD::AliAnalysisTaskReadNuclexAOD()
76 : AliAnalysisTaskSE(),
77 fAnalysisType("AOD"),
78 fCollidingSystems(0),
79 fDataType("REAL"),
80 fListHist(0),
81 fHistEventMultiplicity(0),
82 fHistTrackMultiplicity(0),
83 fHistTrackMultiplicityCent(0),
84 fHistTrackMultiplicitySemiCent(0),
85 fHistTrackMultiplicityMB(0),
86 fHistTrackMultiplicityPVCent(0),
87 fHistTrackMultiplicityPVSemiCent(0),
88 fHistTrackMultiplicityPVMB(0),
89 fhBB(0),
90 fhBBPions(0),
91 fhBBHe(0),
92 aodTree(0x0),
93 Nuclei(0x0),
94 SecondaryVertices(0x0),
95 DaughterTracks(0x0),
96 nevent(0x0),
97 fNtuple1(0),
98 trunNumber(0),
99 tbunchcross(0),
100 torbit(0),
101 tperiod(0),
102 teventtype(0),
103 tTrackNumber(0),
104 tpercentile(0),
105 txPrimaryVertex(0),
106 tyPrimaryVertex(0),
107 tzPrimaryVertex(0),
108 txSecondaryVertex(0),
109 tySecondaryVertex(0),
110 tzSecondaryVertex(0),
111 tdcaTracks(0),
112 tCosPointingAngle(0),
113 tDCAV0toPrimaryVertex(0),
114 tHeSign(0),
115 tHepInTPC(0),
116 tHeTPCsignal(0),
117 tDcaHeToPrimVertex(0),
118 tHeEta(0),
119 tmomHex(0),
120 tmomHey(0),
121 tmomHez(0),
122 tmomHeAtSVx(0),
123 tmomHeAtSVy(0),
124 tmomHeAtSVz(0),
125 tHeTPCNcls(0),
126 tHeimpactXY(0),
127 tHeimpactZ(0),
128 tHeITSClusterMap(0),
129 tIsHeITSRefit(0),
130 tPionSign(0),
131 tPionpInTPC(0),
132 tPionTPCsignal(0),
133 tDcaPionToPrimVertex(0),
134 tPionEta(0),
135 tmomPionx(0),
136 tmomPiony(0),
137 tmomPionz(0),
138 tmomNegPionAtSVx(0),
139 tmomNegPionAtSVy(0),
140 tmomNegPionAtSVz(0),
141 tPionTPCNcls(0),
142 tPionimpactXY(0),
143 tPionimpactZ(0),
144 tPionITSClusterMap(0),
145 tIsPiITSRefit(0),
146 txn(0),
147 txp(0),
148 tchi2He(0),
149 tchi2Pi(0),
150 fNtuple4(0),
151 t3LHlrunNumber(0),
152 t3LHlBCNumber(0),
153 t3LHlOrbitNumber(0),
154 t3LHlPeriodNumber(0),
155 t3LHleventtype(0),
156 t3LHlpercentile(0),
157 t3LHlPx(0),
158 t3LHlPy(0),
159 t3LHlPz(0),
160 t3LHlEta(0),
161 t3LHlY(0),
162 t3LHlM(0),
163 t3LHlxPrimaryVertex(0),
164 t3LHlyPrimaryVertex(0),
165 t3LHlzPrimaryVertex(0),
166 t3LHlp0px(0),
167 t3LHlp0py(0),
168 t3LHlp0pz(0),
169 t3LHlp0ch(0),
170 t3LHlp1px(0),
171 t3LHlp1py(0),
172 t3LHlp1pz(0),
173 t3LHlp1ch(0)
174
175{
176 // Dummy Constructor
177}
178
179//________________________________________________________________________
180AliAnalysisTaskReadNuclexAOD::AliAnalysisTaskReadNuclexAOD(const char *name)
181 : AliAnalysisTaskSE(name),
182 fAnalysisType("AOD"),
183 fCollidingSystems(0),
184 fDataType("REAL"),
185 fListHist(0),
186 fHistEventMultiplicity(0),
187 fHistTrackMultiplicity(0),
188 fHistTrackMultiplicityCent(0),
189 fHistTrackMultiplicitySemiCent(0),
190 fHistTrackMultiplicityMB(0),
191 fHistTrackMultiplicityPVCent(0),
192 fHistTrackMultiplicityPVSemiCent(0),
193 fHistTrackMultiplicityPVMB(0),
194 fhBB(0),
195 fhBBPions(0),
196 fhBBHe(0),
197 aodTree(0x0),
198 Nuclei(0x0),
199 SecondaryVertices(0x0),
200 DaughterTracks(0x0),
201 nevent(0x0),
202 fNtuple1(0),
203 trunNumber(0),
204 tbunchcross(0),
205 torbit(0),
206 tperiod(0),
207 teventtype(0),
208 tTrackNumber(0),
209 tpercentile(0),
210 txPrimaryVertex(0),
211 tyPrimaryVertex(0),
212 tzPrimaryVertex(0),
213 txSecondaryVertex(0),
214 tySecondaryVertex(0),
215 tzSecondaryVertex(0),
216 tdcaTracks(0),
217 tCosPointingAngle(0),
218 tDCAV0toPrimaryVertex(0),
219 tHeSign(0),
220 tHepInTPC(0),
221 tHeTPCsignal(0),
222 tDcaHeToPrimVertex(0),
223 tHeEta(0),
224 tmomHex(0),
225 tmomHey(0),
226 tmomHez(0),
227 tmomHeAtSVx(0),
228 tmomHeAtSVy(0),
229 tmomHeAtSVz(0),
230 tHeTPCNcls(0),
231 tHeimpactXY(0),
232 tHeimpactZ(0),
233 tHeITSClusterMap(0),
234 tIsHeITSRefit(0),
235 tPionSign(0),
236 tPionpInTPC(0),
237 tPionTPCsignal(0),
238 tDcaPionToPrimVertex(0),
239 tPionEta(0),
240 tmomPionx(0),
241 tmomPiony(0),
242 tmomPionz(0),
243 tmomNegPionAtSVx(0),
244 tmomNegPionAtSVy(0),
245 tmomNegPionAtSVz(0),
246 tPionTPCNcls(0),
247 tPionimpactXY(0),
248 tPionimpactZ(0),
249 tPionITSClusterMap(0),
250 tIsPiITSRefit(0),
251 txn(0),
252 txp(0),
253 tchi2He(0),
254 tchi2Pi(0),
255 fNtuple4(0),
256 t3LHlrunNumber(0),
257 t3LHlBCNumber(0),
258 t3LHlOrbitNumber(0),
259 t3LHlPeriodNumber(0),
260 t3LHleventtype(0),
261 t3LHlpercentile(0),
262 t3LHlPx(0),
263 t3LHlPy(0),
264 t3LHlPz(0),
265 t3LHlEta(0),
266 t3LHlY(0),
267 t3LHlM(0),
268 t3LHlxPrimaryVertex(0),
269 t3LHlyPrimaryVertex(0),
270 t3LHlzPrimaryVertex(0),
271 t3LHlp0px(0),
272 t3LHlp0py(0),
273 t3LHlp0pz(0),
274 t3LHlp0ch(0),
275 t3LHlp1px(0),
276 t3LHlp1py(0),
277 t3LHlp1pz(0),
278 t3LHlp1ch(0)
279
280{
281 // Define input and output slots here
282 // Input slot #0 works with a TChain
283 //DefineInput(0, TChain::Class());
284 // Output slot #0 writes into a TList container (Cascade)
285 DefineOutput(1, TList::Class());
286
287 DefineInput(0, TChain::Class());
288
289 DefineOutput(1, TList::Class());
290 DefineOutput(2, TTree::Class());
291 DefineOutput(3, TTree::Class());
292
293}
294//_______________________________________________________
295AliAnalysisTaskReadNuclexAOD::~AliAnalysisTaskReadNuclexAOD()
296{
297 // Destructor
298 if (fListHist) {
299 delete fListHist;
300 fListHist = 0;
301 }
302
303 if(fNtuple1) delete fNtuple1;
304 if(fNtuple4) delete fNtuple4;
305}
306//=================DEFINITION BETHE BLOCH==============================
307
308Double_t AliAnalysisTaskReadNuclexAOD::BetheBloch(Double_t betaGamma,Double_t charge,Bool_t isPbPb) {
309
310 Double_t kp1, kp2, kp3, kp4, kp5;
311
312 if(isPbPb){
313
314
315
316 //pass2 2011
317 kp1 = 4.7*charge*charge;
318 kp2 = 8.98482806165147636e+00;
319 kp3 = 1.54000000000000005e-05;
320 kp4 = 2.30445734159456084e+00;
321 kp5 = 2.25624744086878559e+00;
322
323 }
324
325 else{
326
327
328 //pass2 2011
329 kp1 = 4.7*charge*charge;
330 kp2 = 8.98482806165147636e+00;
331 kp3 = 1.54000000000000005e-05;
332 kp4 = 2.30445734159456084e+00;
333 kp5 = 2.25624744086878559e+00;
334
335
336 }
337
338 Double_t beta = betaGamma / TMath::Sqrt(1.0 + betaGamma * betaGamma);
339
340 Double_t aa = TMath::Power(beta, kp4);
341 Double_t bb = TMath::Power(1.0 / betaGamma, kp5);
342
343 bb = TMath::Log(kp3 + bb);
344
345 Double_t out = (kp2 - aa - bb) * kp1 / aa;
346
347 return out;
348
349}
350
351void AliAnalysisTaskReadNuclexAOD::Init()
352{
353 // cout<<"----------------------------------> Vediamo"<<endl;
354
355 // AliAODHandler* aodHandler = (AliAODHandler*)((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
356 // cout<<aodHandler<<endl;
357 // TTree *aodTree = aodHandler->GetTree();
358 // // aodTree = aodHandler->GetTree();
359 // cout<<"aodTree: "<<aodTree<<endl;
360 // aodTree->SetBranchAddress("Nuclei", &Nuclei);
361 // aodTree->SetBranchAddress("SecondaryVertices",&SecondaryVertices);
362 // aodTree->SetBranchAddress("DaughterTracks", &DaughterTracks);
363
364
365}
366
367//==================DEFINITION OF OUTPUT OBJECTS==============================
368
369void AliAnalysisTaskReadNuclexAOD::UserCreateOutputObjects()
370{
371 fListHist = new TList();
372 fListHist->SetOwner(); // IMPORTANT!
373
374
375 if(! fHistEventMultiplicity ){
376
377 fHistEventMultiplicity = new TH1F( "fHistEventMultiplicity" , "Nb of Events" , 13 , 0, 13);
378
379 fHistEventMultiplicity->GetXaxis()->SetBinLabel(1,"All Events");
380 fHistEventMultiplicity->GetXaxis()->SetBinLabel(2,"Events w/PV");
381 fHistEventMultiplicity->GetXaxis()->SetBinLabel(3,"Events w/|Vz|<10cm");
382 fHistEventMultiplicity->GetXaxis()->SetBinLabel(4,"Central Events");
383 fHistEventMultiplicity->GetXaxis()->SetBinLabel(5,"SemiCentral Events");
384 fHistEventMultiplicity->GetXaxis()->SetBinLabel(6,"MB Events");
385 fHistEventMultiplicity->GetXaxis()->SetBinLabel(7,"Central Events w/|Vz|<10cm");
386 fHistEventMultiplicity->GetXaxis()->SetBinLabel(8,"SemiCentral Events w/|Vz|<10cm");
387 fHistEventMultiplicity->GetXaxis()->SetBinLabel(9,"MB Events w/|Vz|<10cm");
388 fHistEventMultiplicity->GetXaxis()->SetBinLabel(10,"Sec. Vert. Tree");
389 fHistEventMultiplicity->GetXaxis()->SetBinLabel(11,"Sec. Vert. Rec");
390 fHistEventMultiplicity->GetXaxis()->SetBinLabel(12,"Event Not taken");
391 fListHist->Add(fHistEventMultiplicity);
392 }
393
394
395 if(! fHistTrackMultiplicity ){
396 fHistTrackMultiplicity = new TH2F( "fHistTrackMultiplicity" , "Nb of Tracks", 2500,0, 25000,210,-1,104);
397 fHistTrackMultiplicity->GetXaxis()->SetTitle("Number of tracks");
398 fHistTrackMultiplicity->GetYaxis()->SetTitle("Percentile");
399 fListHist->Add(fHistTrackMultiplicity);
400 }
401
402 if(! fHistTrackMultiplicityCent ){
403 fHistTrackMultiplicityCent = new TH2F( "fHistTrackMultiplicityCent", "Nb of Tracks Central Events", 2500,0, 25000,210,-1,104 );
404 fHistTrackMultiplicityCent->GetXaxis()->SetTitle("Number of tracks");
405 fHistTrackMultiplicityCent->GetYaxis()->SetTitle("Percentile");
406 fListHist->Add(fHistTrackMultiplicityCent);
407 }
408
409 if(! fHistTrackMultiplicitySemiCent ){
410 fHistTrackMultiplicitySemiCent = new TH2F( "fHistTrackMultiplicitySemiCent" , "Nb of Tracks SemiCentral Events", 2500,0, 25000 ,210,-1,104);
411 fHistTrackMultiplicitySemiCent->GetXaxis()->SetTitle("Number of tracks");
412 fHistTrackMultiplicitySemiCent->GetYaxis()->SetTitle("Percentile");
413 fListHist->Add(fHistTrackMultiplicitySemiCent);
414 }
415
416 if(! fHistTrackMultiplicityMB ){
417 fHistTrackMultiplicityMB = new TH2F( "fHistTrackMultiplicityMB" , "Nb of Tracks MBral Events", 2500,0, 25000,210,-1,104 );
418 fHistTrackMultiplicityMB->GetXaxis()->SetTitle("Number of tracks");
419 fHistTrackMultiplicityMB->GetYaxis()->SetTitle("Percentile");
420 fListHist->Add(fHistTrackMultiplicityMB);
421 }
422
423 if(! fHistTrackMultiplicityPVCent ){
424 fHistTrackMultiplicityPVCent = new TH2F( "fHistTrackMultiplicityPVCent" , "Nb of Tracks Central Events", 2500,0, 25000,210,-1,104 );
425 fHistTrackMultiplicityPVCent->GetXaxis()->SetTitle("Number of tracks");
426 fHistTrackMultiplicityPVCent->GetYaxis()->SetTitle("Percentile");
427 fListHist->Add(fHistTrackMultiplicityPVCent);
428 }
429
430 if(! fHistTrackMultiplicityPVSemiCent ){
431 fHistTrackMultiplicityPVSemiCent = new TH2F( "fHistTrackMultiplicityPVSemiCent" , "Nb of Tracks SemiCentral Events", 2500,0, 25000 ,210,-1,104);
432 fHistTrackMultiplicityPVSemiCent->GetXaxis()->SetTitle("Number of tracks");
433 fHistTrackMultiplicityPVSemiCent->GetYaxis()->SetTitle("Percentile");
434 fListHist->Add(fHistTrackMultiplicityPVSemiCent);
435 }
436
437 if(! fHistTrackMultiplicityPVMB ){
438 fHistTrackMultiplicityPVMB = new TH2F( "fHistTrackMultiplicityPVMB" , "Nb of Tracks MBral Events", 2500,0, 25000,210,-1,104 );
439 fHistTrackMultiplicityPVMB->GetXaxis()->SetTitle("Number of tracks");
440 fHistTrackMultiplicityPVMB->GetYaxis()->SetTitle("Percentile");
441 fListHist->Add(fHistTrackMultiplicityPVMB);
442 }
443
444 if(! fhBB ){
445 fhBB = new TH2F( "fhBB" , "BetheBlochTPC" , 120,-6,6,150,0,1500);
446 fhBB->GetXaxis()->SetTitle("p/z (GeV/#it{c})");
447 fhBB->GetYaxis()->SetTitle("TPC Signal");
448 fListHist->Add(fhBB);
449 }
450
451 if(! fhBBPions ){
452 fhBBPions = new TH2F( "fhBBPions" , "Bethe-Bloch TPC Pions" , 120,-6,6,150,0,1500);
453 fhBBPions->GetXaxis()->SetTitle("p/z (GeV/#it{c})");
454 fhBBPions->GetYaxis()->SetTitle("TPC Signal");
455 fListHist->Add(fhBBPions);
456 }
457
458 if(! fhBBHe ){
459 fhBBHe = new TH2F( "fhBBHe" , "Bethe-Bloch TPC He" , 120,-6,6,150,0,1500);
460 fhBBHe->GetXaxis()->SetTitle("p/z (GeV/#it{c})");
461 fhBBHe->GetYaxis()->SetTitle("TPC Signal");
462 fListHist->Add(fhBBHe);
463 }
464
465
466
467 if(! fNtuple1 ) {
468
469 fNtuple1 = new TTree("fNtuple1","fNtuple1");
470
471 fNtuple1->Branch("trunNumber" ,&trunNumber ,"trunNumber/F");
472 fNtuple1->Branch("tbunchcross" ,&tbunchcross ,"tbunchcross/F");
473 fNtuple1->Branch("torbit" ,&torbit ,"torbit/F");
474 fNtuple1->Branch("tperiod" ,&tperiod ,"tperiod/F");
475 fNtuple1->Branch("teventtype" ,&teventtype ,"teventtype/F");
476 fNtuple1->Branch("tTrackNumber" ,&tTrackNumber ,"tTrackNumber/F");
477 fNtuple1->Branch("tpercentile" ,&tpercentile ,"tpercentile/F") ;
478 fNtuple1->Branch("txPrimaryVertex" ,&txPrimaryVertex ,"txPrimaryVertex/F");
479 fNtuple1->Branch("tyPrimaryVertex" ,&tyPrimaryVertex ,"tyPrimaryVertex/F");
480 fNtuple1->Branch("tzPrimaryVertex" ,&tzPrimaryVertex ,"tzPrimaryVertex/F");
481 fNtuple1->Branch("txSecondaryVertex" ,&txSecondaryVertex ,"txSecondaryVertex/F");
482 fNtuple1->Branch("tySecondaryVertex" ,&tySecondaryVertex ,"tySecondaryVertex/F");
483 fNtuple1->Branch("tzSecondaryVertex" ,&tzSecondaryVertex ,"tzSecondaryVertex/F");
484 fNtuple1->Branch("tdcaTracks" ,&tdcaTracks ,"tdcaTracks/F");
485 fNtuple1->Branch("tCosPointingAngle" ,&tCosPointingAngle ,"tCosPointingAngle/F");
486 fNtuple1->Branch("tDCAV0toPrimaryVertex",&tDCAV0toPrimaryVertex,"tDCAV0toPrimaryVertex/F");
487 fNtuple1->Branch("tHeSign" ,&tHeSign ,"tHeSign/F");
488 fNtuple1->Branch("tHepInTPC" ,&tHepInTPC ,"tHepInTPC/F");
489 fNtuple1->Branch("tHeTPCsignal" ,&tHeTPCsignal ,"tHeTPCsignal/F");
490 fNtuple1->Branch("tDcaHeToPrimVertex" ,&tDcaHeToPrimVertex ,"tDcaHeToPrimVertex/F");
491 fNtuple1->Branch("tHeEta" ,&tHeEta ,"tHeEta/F");
492 fNtuple1->Branch("tmomHex" ,&tmomHex ,"tmomHex/F");
493 fNtuple1->Branch("tmomHey" ,&tmomHey ,"tmomHey/F");
494 fNtuple1->Branch("tmomHez" ,&tmomHez ,"tmomHez/F");
495 fNtuple1->Branch("tmomHeAtSVx" ,&tmomHeAtSVx ,"tmomHeAtSVx/F");
496 fNtuple1->Branch("tmomHeAtSVy" ,&tmomHeAtSVy ,"tmomHeAtSVy/F");
497 fNtuple1->Branch("tmomHeAtSVz" ,&tmomHeAtSVz ,"tmomHeAtSVz/F");
498 fNtuple1->Branch("tHeTPCNcls" ,&tHeTPCNcls ,"tHeTPCNcls/F");
499 fNtuple1->Branch("tHeimpactXY" ,&tHeimpactXY ,"tHeimpactXY/F");
500 fNtuple1->Branch("tHeimpactZ" ,&tHeimpactZ ,"tHeimpactZ/F");
501 fNtuple1->Branch("tHeITSClusterMap" ,&tHeITSClusterMap ,"tHeITSClusterMap/F");
502 fNtuple1->Branch("tIsHeITSRefit" ,&tIsHeITSRefit ,"tIsHeITSRefit/F");
503 fNtuple1->Branch("tPionSign" ,&tPionSign ,"tPionSign/F");
504 fNtuple1->Branch("tPionpInTPC" ,&tPionpInTPC ,"tPionpInTPC/F");
505 fNtuple1->Branch("tPionTPCsignal" ,&tPionTPCsignal ,"tPionTPCsignal/F");
506 fNtuple1->Branch("tDcaPionToPrimVertex" ,&tDcaPionToPrimVertex ,"tDcaPionToPrimVertex/F");
507 fNtuple1->Branch("tPionEta" ,&tPionEta ,"tPionEta/F");
508 fNtuple1->Branch("tmomPionx" ,&tmomPionx ,"tmomPionx/F");
509 fNtuple1->Branch("tmomPiony" ,&tmomPiony ,"tmomPiony/F");
510 fNtuple1->Branch("tmomPionz" ,&tmomPionz ,"tmomPionz/F");
511 fNtuple1->Branch("tmomNegPionAtSVx" ,&tmomNegPionAtSVx ,"tmomNegPionAtSVx/F");
512 fNtuple1->Branch("tmomNegPionAtSVy" ,&tmomNegPionAtSVy ,"tmomNegPionAtSVy/F");
513 fNtuple1->Branch("tmomNegPionAtSVz" ,&tmomNegPionAtSVz ,"tmomNegPionAtSVz/F");
514 fNtuple1->Branch("tPionTPCNcls" ,&tPionTPCNcls ,"tPionTPCNcls/F");
515 fNtuple1->Branch("tPionimpactXY" ,&tPionimpactXY ,"tPionimpactXY/F");
516 fNtuple1->Branch("tPionimpactZ" ,&tPionimpactZ ,"tPionimpactZ/F");
517 fNtuple1->Branch("tPionITSClusterMap" ,&tPionITSClusterMap ,"tPionITSClusterMap/F");
518 fNtuple1->Branch("tIsPiITSRefit" ,&tIsPiITSRefit ,"tIsPiITSRefit/F");
519 fNtuple1->Branch("txn" ,&txn ,"txn/F");
520 fNtuple1->Branch("txp" ,&txp ,"txp/F");
521 fNtuple1->Branch("tchi2He" ,&tchi2He ,"tchi2He/F");
522 fNtuple1->Branch("tchi2Pi" ,&tchi2Pi ,"tchi2Pi/F");
523
524 }
525
526 if(! fNtuple4 ) {
527
528 fNtuple4 = new TTree("fNtuple4","fNtuple4");
529
530 fNtuple4->Branch("t3LHlrunNumber" ,&t3LHlrunNumber ,"t3LHlrunNumber/F");
531 fNtuple4->Branch("t3LHlBCNumber" ,&t3LHlBCNumber ,"t3LHlBCNumber/F");
532 fNtuple4->Branch("t3LHlOrbitNumber" ,&t3LHlOrbitNumber ,"t3LHlOrbitNumber/F");
533 fNtuple4->Branch("t3LHlPeriodNumber" ,&t3LHlPeriodNumber ,"t3LHlPeriodNumber/F");
534 fNtuple4->Branch("t3LHleventtype" ,&t3LHleventtype ,"t3LHleventtype/F");
535 fNtuple4->Branch("t3LHlpercentile" ,&t3LHlpercentile ,"t3LHlpercentile/F");
536 fNtuple4->Branch("t3LHlPx" ,&t3LHlPx ,"t3LHlPx/F");
537 fNtuple4->Branch("t3LHlPy" ,&t3LHlPy ,"t3LHlPy/F");
538 fNtuple4->Branch("t3LHlPz" ,&t3LHlPz ,"t3LHlPz/F");
539 fNtuple4->Branch("t3LHlEta" ,&t3LHlEta ,"t3LHlEta/F");
540 fNtuple4->Branch("t3LHlY" ,&t3LHlY ,"t3LHlY/F");
541 fNtuple4->Branch("t3LHlM" ,&t3LHlM ,"t3LHlM/F");
542 fNtuple4->Branch("t3LHlxPrimaryVertex" ,&t3LHlxPrimaryVertex ,"t3LHlxPrimaryVertex/F");
543 fNtuple4->Branch("t3LHlyPrimaryVertex" ,&t3LHlyPrimaryVertex ,"t3LHlyPrimaryVertex/F");
544 fNtuple4->Branch("t3LHlzPrimaryVertex" ,&t3LHlzPrimaryVertex ,"t3LHlzPrimaryVertex/F");
545 fNtuple4->Branch("t3LHlp0px" ,&t3LHlp0px ,"t3LHlp0px/F");
546 fNtuple4->Branch("t3LHlp0py" ,&t3LHlp0py ,"t3LHlp0py/F");
547 fNtuple4->Branch("t3LHlp0pz" ,&t3LHlp0pz ,"t3LHlp0pz/F");
548 fNtuple4->Branch("t3LHlp0ch" ,&t3LHlp0ch ,"t3LHlp0ch/F");
549 fNtuple4->Branch("t3LHlp1px" ,&t3LHlp1px ,"t3LHlp1px/F");
550 fNtuple4->Branch("t3LHlp1py" ,&t3LHlp1py ,"t3LHlp1py/F");
551 fNtuple4->Branch("t3LHlp1pz" ,&t3LHlp1pz ,"t3LHlp1pz/F");
552 fNtuple4->Branch("t3LHlp1ch" ,&t3LHlp1ch ,"t3LHlp1ch/F");
553
554
555 }
556
557
558 PostData(1, fListHist);
559 PostData(2, fNtuple1);
560 PostData(3, fNtuple4);
561}// end UserCreateOutputObjects
562
563
564
565//====================== USER EXEC ========================
566
567void AliAnalysisTaskReadNuclexAOD::UserExec(Option_t *)
568{
569 //_______________________________________________________________________
570
571 //!*********************!//
572 //! Define variables !//
573 //!*********************!//
574
575 Double_t xPrimaryVertex=0.,yPrimaryVertex=0.,zPrimaryVertex=0.;
576
577 ULong_t statusT;
578 ULong_t statusPi;
579
580 Bool_t IsHeITSRefit=kFALSE,IsPiITSRefit=kFALSE ;
581
582 Double_t fPos[3]={0.,0.,0.};
583
584 Double_t runNumber=0.;
585 Double_t BCNumber=0.;
586 Double_t OrbitNumber=0.;
587 Double_t PeriodNumber=0.;
588
589 Double_t Helium3Mass = 2.80839;
590 Double_t PionMass = 0.13957;
591
592 // TLORENTZ vectors
593
594 TLorentzVector vPion,vHelium,vSum;
595 TLorentzVector vHyp;
596 TLorentzVector vp0,vp1,vS;
597 //!----------------------------------------------------------------
598 //! A set of very loose parameters for cuts
599
600 // Double_t fgChi2max=33.; //! max chi2
601 Double_t fgDNmin=0.05; //! min imp parameter for the 1st daughter = 500um
602 // Double_t fgDPmin=0.05; //! min imp parameter for the 2nd daughter = 500um
603 Double_t fgDCAmax=1.; //! max DCA between the daughter tracks in cm
604 // Double_t fgCPAmin=0.99; //! min cosine of V0's pointing angle
605 Double_t fgRmin=0.1; //! min radius of the fiducial volume = 1 mm
606 Double_t fgRmax=200.; //! max radius of the fiducial volume = 2 m
607
608 //!-----------------------------------------------------------------
609
610 // Main loop
611 // Called for EACH event
612
613 nevent++; //--> This is important
614
615 AliVEvent *event = InputEvent();
616 if (!event) { Printf("ERROR: Could not retrieve event"); return; }
617 Info("AliAnalysisTaskReadNuclexAOD","Starting UserExec");
618
619 SetDataType("REAL");
620
621 AliAODEvent *lAODevent=(AliAODEvent *)InputEvent();
622 if (!lAODevent) {
623 Printf("ERROR: aod not available");
624 // fHistLog->Fill(98);
625 return;
626 }
627
628 fHistEventMultiplicity->Fill(0.5);
629
630 //*************************************************************
631
632 runNumber = lAODevent->GetRunNumber();
633 BCNumber = lAODevent->GetBunchCrossNumber();
634 OrbitNumber = lAODevent->GetOrbitNumber();
635 PeriodNumber = lAODevent->GetPeriodNumber();
636
637 AliCentrality *centrality = lAODevent->GetCentrality();
638 centrality = lAODevent->GetCentrality();
639
640 Float_t percentile=centrality->GetCentralityPercentile("V0M");
641 Float_t refMult = lAODevent->GetHeader()->GetRefMultiplicity();
642
643 fHistTrackMultiplicity->Fill(refMult,percentile); //tracce per evento
644
645 // cout<<"Centrality: "<<percentile<<" number of track: "<<lAODevent->GetHeader()->GetRefMultiplicity()<<endl;
646 //*************************************************************
647
648 AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager();
649 AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler());
650
651 Int_t eventtype=-99;
652
653 Bool_t isSelectedCentral = (inputHandler->IsEventSelected() & AliVEvent::kCentral);
654 Bool_t isSelectedSemiCentral = (inputHandler->IsEventSelected() & AliVEvent::kSemiCentral);
655 Bool_t isSelectedMB = (inputHandler->IsEventSelected() & AliVEvent::kMB);
656
657 if(isSelectedCentral){
658 fHistEventMultiplicity->Fill(3.5);
659 fHistTrackMultiplicityCent->Fill(refMult,percentile);
660 eventtype=1;
661 }
662
663 if(isSelectedSemiCentral){
664 fHistEventMultiplicity->Fill(4.5);
665 fHistTrackMultiplicitySemiCent->Fill(refMult,percentile);
666 eventtype=2;
667 }
668
669 if(isSelectedMB){
670 fHistEventMultiplicity->Fill(5.5);
671 fHistTrackMultiplicityMB->Fill(refMult,percentile);
672 eventtype=3;
673 }
674
675 if(eventtype==-99)return;
676 // cout<<"eventtype: "<<eventtype<<endl;
677
678 // if(!isSelectedCentral)return;
679 // if(!isSelectedSemiCentral)return;
680 // if(!isSelectedMB)return;
681
682 cout<<"eventtype: "<<eventtype<<endl;
683
684 //-------------------------------
685
686 Double_t lBestPrimaryVtxPos[3] = {-100.0, -100.0, -100.0};
687 Double_t lMagneticField = -10.;
688
689 AliAODVertex* primvtx = lAODevent->GetPrimaryVertex();
690 if(!primvtx){
691 cout<<"No PV"<<endl;
692 return;
693 }
694 fHistEventMultiplicity->Fill(1.5);
695 primvtx->GetXYZ( lBestPrimaryVtxPos );
696
697 if(TMath::Abs(lBestPrimaryVtxPos[2]) > 10.0 ) {
698 AliWarning("Pb / | Z position of Best Prim Vtx | > 10.0 cm ... return !");
699 return;
700 }
701 fHistEventMultiplicity->Fill(2.5);
702
703
704 if(eventtype==1){
705 fHistTrackMultiplicityPVCent->Fill(refMult,percentile);
706 fHistEventMultiplicity->Fill(6.5);
707 }
708
709 if(eventtype==2){
710 fHistTrackMultiplicityPVSemiCent->Fill(refMult,percentile);
711 fHistEventMultiplicity->Fill(7.5);
712 }
713
714 if(eventtype==3){
715 fHistTrackMultiplicityPVMB->Fill(refMult,percentile);
716 fHistEventMultiplicity->Fill(8.5);
717 }
718
719 lMagneticField = lAODevent->GetMagneticField();
720
721 xPrimaryVertex = lBestPrimaryVtxPos[0];
722 yPrimaryVertex = lBestPrimaryVtxPos[1];
723 zPrimaryVertex = lBestPrimaryVtxPos[2];
724
725 //--------------------------------------------------------
726
727 AliAODHandler* aodHandler = (AliAODHandler*)((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
728
729 aodTree = aodHandler->GetTree();
730 aodTree->SetBranchAddress("Nuclei",&Nuclei);
731 aodTree->SetBranchAddress("SecondaryVertices",&SecondaryVertices);
732 aodTree->SetBranchAddress("DaughterTracks",&DaughterTracks);
733
734 //---------------------------------------------------------
735
736 aodTree->GetEntry(nevent);
737
738 if(Nuclei-> GetEntriesFast()>0)
739 fHistEventMultiplicity->Fill(2);
740
741 if(SecondaryVertices-> GetEntriesFast()>0)
742 fHistEventMultiplicity->Fill(3);
743
744 for(Int_t i=0; i < SecondaryVertices-> GetEntriesFast() ; i++){
745
746 AliAODRecoDecayLF2Prong *d = (AliAODRecoDecayLF2Prong*)SecondaryVertices->UncheckedAt(i);
747 //cout<<"\n\n\nPT: "<<d->Pt()<<endl<<endl<<endl<<endl;
748 if(!d) continue;
749
750 fHistEventMultiplicity->Fill(10.5);
751
752 // Double_t tDecayVertexV0[3];
753 // if(d->GetXYZ(tDecayVertexV0))
754
755 Double_t tV0mom[3];
756 d->PxPyPz(tV0mom);
757
758 // TLORENTZ vectors
759
760 // cout<<"px prong 1: "<<d->PxProng(0)<<endl;
761
762 vHyp.SetXYZM(tV0mom[0],tV0mom[1],tV0mom[2],2.991);
763
764
765 vp0.SetXYZM(d->PxProng(0),d->PyProng(0),d->PzProng(0),PionMass);
766 vp1.SetXYZM(d->PxProng(1),d->PyProng(1),d->PzProng(1),Helium3Mass);
767 vS = vp0 + vp1;
768
769 // cout<<"Momemnto pt: "<<lPt<<endl;
770
771 t3LHlrunNumber =(Float_t)runNumber;
772 t3LHlBCNumber =(Float_t)BCNumber;
773 t3LHlOrbitNumber =(Float_t)OrbitNumber;
774 t3LHlPeriodNumber =(Float_t)PeriodNumber;
775 t3LHleventtype =(Float_t)eventtype;
776 t3LHlpercentile =(Float_t)percentile;
777 t3LHlPx =(Float_t)tV0mom[0];
778 t3LHlPy =(Float_t)tV0mom[1];
779 t3LHlPz =(Float_t)tV0mom[2];
780 t3LHlEta =(Float_t)d->Eta();
781 t3LHlY =(Float_t)vHyp.Rapidity();
782 t3LHlM =(Float_t)vS.M();
783 t3LHlxPrimaryVertex =(Float_t)xPrimaryVertex;
784 t3LHlyPrimaryVertex =(Float_t)yPrimaryVertex;
785 t3LHlzPrimaryVertex =(Float_t)zPrimaryVertex;
786
787 t3LHlp0px =(Float_t)d->PxProng(0);
788 t3LHlp0py =(Float_t)d->PyProng(0);
789 t3LHlp0pz =(Float_t)d->PzProng(0);
790 t3LHlp0ch =(Float_t)d->ChargeProng(0);
791 t3LHlp1px =(Float_t)d->PxProng(1);
792 t3LHlp1py =(Float_t)d->PyProng(1);
793 t3LHlp1pz =(Float_t)d->PzProng(1);
794 t3LHlp1ch =(Float_t)d->ChargeProng(1);
795
796 fNtuple4->Fill();
797
798 }
799
800
801 //----------------------------------------
802 // Loop on tracks like-AnalysisTaskHelium3Pi.cxx
803
804 Int_t TrackNumber= DaughterTracks-> GetEntriesFast();
805
806 TArrayI Track0(TrackNumber); //Pions
807 Int_t nTrack0=0;
808
809 TArrayI Track1(TrackNumber); //Helium3
810 Int_t nTrack1=0;
811
812
813 Float_t impactXY=-999, impactZ=-999;
814 Float_t impactXYpi=-999, impactZpi=-999;
815
816 for(Int_t j=0; j<TrackNumber; j++){
817 // cout<<"eventtype inside: "<<eventtype<<endl;
818 // cout<<"Inside loop tracks"<<endl;
819 AliVTrack *track = (AliVTrack*)DaughterTracks->UncheckedAt(j);
820 AliAODTrack *aodtrack =(AliAODTrack*)track;
821
822 fhBB->Fill(aodtrack->GetDetPid()->GetTPCmomentum()*aodtrack->Charge(),aodtrack->GetTPCsignal());
823
824 //-----------------------------------------------------------
825 //Track cuts
826 // if(aodtrack->GetTPCNcls() < 80 )continue;
827 // if(aodtrack->Chi2perNDF() > 5 )continue;
828
829 // if (!aodtrack->IsOn(AliAODTrack::kTPCrefit)) continue;
830 // if (!aodtrack->IsOn(AliAODTrack::kTPCin)) continue;
831 // if (aodtrack->IsOn(AliAODTrack::kITSpureSA)) continue;
832
833 //---------------------------------------------------------------
834
835 if (aodtrack->GetTPCsignal()<100){
836 Track0[nTrack0++]=j;
837 fhBBPions->Fill(aodtrack->GetDetPid()->GetTPCmomentum()*aodtrack->Charge(),aodtrack->GetTPCsignal());
838 }
839
840 else{
841 Track1[nTrack1++]=j;
842 fhBBHe->Fill(aodtrack->GetDetPid()->GetTPCmomentum()*aodtrack->Charge(),aodtrack->GetTPCsignal());
843 }
844
845 }
846
847 Track0.Set(nTrack0);
848 Track1.Set(nTrack1);
849
850
851 //cout<<"nTrack0: "<<nTrack0<<endl;
852 //cout<<"nTrack1: "<<nTrack1<<endl;
853
854
855 //cout<<"Track loops..."<<endl;
856
857 Double_t DcaHeToPrimVertex=0;
858 Double_t DcaPionToPrimVertex=0;
859
860 impactXY=-999, impactZ=-999;
861 impactXYpi=-999, impactZpi=-999;
862
863
864 AliESDtrack *PionTrack = 0x0;
865 AliESDtrack *HeTrack = 0x0;
866
867
868 // Vettors for il PxPyPz
869
870 Double_t momPionVett[3];
871 for(Int_t i=0;i<3;i++)momPionVett[i]=0;
872
873 Double_t momHeVett[3];
874 for(Int_t i=0;i<3;i++)momHeVett[i]=0;
875
876 //At SV
877
878 Double_t momPionVettAt[3];
879 for(Int_t i=0;i<3;i++)momPionVettAt[i]=0;
880
881 Double_t momHeVettAt[3];
882 for(Int_t i=0;i<3;i++)momHeVettAt[i]=0;
883
884
885 //Loop on the tracks
886
887 for (Int_t k=0; k <nTrack0 ; k++) { //! Pion Tracks Loop
888
889 DcaPionToPrimVertex=0.;
890 DcaHeToPrimVertex=0;
891
892 Int_t Track0idx=Track0[k];
893
894 AliVTrack *trackpi = (AliVTrack*)DaughterTracks->UncheckedAt(Track0idx);
895 PionTrack = new AliESDtrack(trackpi);
896
897 statusPi = (ULong_t)trackpi->GetStatus();
898 IsPiITSRefit = ((statusPi) & (AliESDtrack::kITSrefit));
899
900 if (PionTrack)
901 DcaPionToPrimVertex = TMath::Abs(PionTrack->GetD(xPrimaryVertex, yPrimaryVertex,lMagneticField));
902
903 //cout<<"DcaPionToPrimVertex: "<<DcaPionToPrimVertex<<endl;
904
905 if(DcaPionToPrimVertex<0.2)continue;
906 AliExternalTrackParam trackInPion(*PionTrack);
907
908 for (Int_t i=0; i<nTrack1; i++){ //! He Tracks Loop
909
910 Int_t Track1idx=Track1[i];
911
912 AliVTrack *trackhe = (AliVTrack*)DaughterTracks->UncheckedAt(Track1idx);
913 HeTrack = new AliESDtrack(trackhe);
914
915 statusT= (ULong_t)HeTrack->GetStatus();
916 IsHeITSRefit = (statusT & AliESDtrack::kITSrefit);
917
918 if (HeTrack)
919 DcaHeToPrimVertex = TMath::Abs(HeTrack->GetD(xPrimaryVertex, yPrimaryVertex,lMagneticField)); //OK
920
921 AliExternalTrackParam trackInHe(*HeTrack);
922
923 if ( DcaPionToPrimVertex < fgDNmin) //OK
924 if ( DcaHeToPrimVertex < fgDNmin) continue; //OK
925
926 Double_t xn, xp;
927 Double_t dca=0.;
928
929 dca= PionTrack->GetDCA(HeTrack,lMagneticField,xn,xp); //!dca (Neg to Pos)
930
931 //cout<<"dca tracks: "<<dca<<endl;
932
933 if (dca > fgDCAmax) continue;
934 if ((xn+xp) > 2*fgRmax) continue;
935 if ((xn+xp) < 2*fgRmin) continue;
936
937 Bool_t corrected=kFALSE;
938 if ((trackInPion.GetX() > 3.) && (xn < 3.)) {
939 //correct for the beam pipe material
940 corrected=kTRUE;
941 }
942 if ((trackInHe.GetX() > 3.) && (xp < 3.)) {
943 //correct for the beam pipe material
944 corrected=kTRUE;
945 }
946 if (corrected) {
947 dca=trackInPion.GetDCA(&trackInHe,lMagneticField,xn,xp);
948 if (dca > fgDCAmax) continue;
949 if ((xn+xp) > 2*fgRmax) continue;
950 if ((xn+xp) < 2*fgRmin) continue;
951 }
952
953 //=============================================//
954 // Make "V0" with found tracks //
955 //=============================================//
956
957 trackInPion.PropagateTo(xn,lMagneticField);
958 trackInHe.PropagateTo(xp,lMagneticField);
959
960 AliESDv0 vertex(trackInPion,Track0idx,trackInHe,Track1idx);
961 // if (vertex.GetChi2V0() > fgChi2max) continue;
962
963 //cout<<"Made v0"<<endl;
964
965 Float_t CosPointingAngle=vertex.GetV0CosineOfPointingAngle(xPrimaryVertex,yPrimaryVertex,zPrimaryVertex); //PointingAngle
966 //cout<<"cpa: "<<CosPointingAngle<<endl;
967 // if (CosPointingAngle < fgCPAmin) continue;
968
969 vertex.SetDcaV0Daughters(dca);
970 vertex.SetV0CosineOfPointingAngle(CosPointingAngle);
971
972 fPos[0]=vertex.Xv();
973 fPos[1]=vertex.Yv();
974 fPos[2]=vertex.Zv();
975
976 HeTrack->PxPyPz(momHeVett);
977 PionTrack->PxPyPz(momPionVett);
978
979 Double_t raggio=TMath::Sqrt(fPos[0]*fPos[0]+fPos[1]*fPos[1]+fPos[2]*fPos[2]);
980 HeTrack->GetPxPyPzAt(raggio,lMagneticField,momHeVettAt);
981 PionTrack->GetPxPyPzAt(raggio,lMagneticField,momPionVettAt);
982
983 //------------------------------------------------------------------------//
984
985 HeTrack->GetImpactParameters(impactXY, impactZ);
986 PionTrack->GetImpactParameters(impactXYpi, impactZpi);
987
988 // if(vertex.GetD(xPrimaryVertex,yPrimaryVertex,zPrimaryVertex)>3) continue;
989
990 //salvo solo fino a 3.1 GeV/c2
991
992 vHelium.SetXYZM(2*momHeVettAt[0],2*momHeVettAt[1],2*momHeVettAt[2],Helium3Mass);
993 vPion.SetXYZM(momPionVettAt[0],momPionVettAt[1],momPionVettAt[2],PionMass);
994 vSum=vHelium+vPion;
995
996 // if(vSum.M()>3.2)
997 // continue;
998
999 Int_t fIdxInt[200]; //dummy array
1000 Int_t nClustersTPCHe = HeTrack->GetTPCclusters(fIdxInt);
1001 Int_t nClustersTPCPi = PionTrack->GetTPCclusters(fIdxInt);
1002
1003 //cout<<"Cos PA: "<<CosPointingAngle<<endl;
1004 fHistEventMultiplicity->Fill(11.5);
1005 //-------------------------------------------------------------
1006
1007 trunNumber =(Float_t)runNumber;
1008 tbunchcross =(Float_t)BCNumber;
1009 torbit =(Float_t)OrbitNumber;
1010 tperiod =(Float_t)PeriodNumber;
1011 teventtype =(Float_t)eventtype;
1012 tTrackNumber =(Float_t)TrackNumber;
1013 tpercentile =(Float_t)percentile;
1014 txPrimaryVertex =(Float_t)xPrimaryVertex; //PRIMARY
1015 tyPrimaryVertex =(Float_t)yPrimaryVertex;
1016 tzPrimaryVertex =(Float_t)zPrimaryVertex;
1017 txSecondaryVertex =(Float_t)fPos[0]; //SECONDARY
1018 tySecondaryVertex =(Float_t)fPos[1];
1019 tzSecondaryVertex =(Float_t)fPos[2];
1020 tdcaTracks =(Float_t)dca; //between 2 tracks
1021 tCosPointingAngle =(Float_t)CosPointingAngle; //cosPointingAngle da V0
1022 tDCAV0toPrimaryVertex =(Float_t)vertex.GetD(xPrimaryVertex,yPrimaryVertex,zPrimaryVertex);
1023 tHeSign =(Float_t)HeTrack->GetSign(); //He
1024 tHepInTPC =(Float_t)trackInHe.GetP();
1025 tHeTPCsignal =(Float_t)HeTrack->GetTPCsignal();
1026 tDcaHeToPrimVertex =(Float_t)DcaHeToPrimVertex;
1027 tHeEta =(Float_t)HeTrack->Eta();
1028 tmomHex =(Float_t)momHeVett[0];
1029 tmomHey =(Float_t)momHeVett[1];
1030 tmomHez =(Float_t)momHeVett[2];
1031 tmomHeAtSVx =(Float_t)momHeVettAt[0];
1032 tmomHeAtSVy =(Float_t)momHeVettAt[1];
1033 tmomHeAtSVz =(Float_t)momHeVettAt[2];
1034 tHeTPCNcls =(Float_t)HeTrack->GetTPCNcls();
1035 tHeimpactXY =(Float_t)impactXY;
1036 tHeimpactZ =(Float_t)impactZ;
1037 tHeITSClusterMap =(Float_t)HeTrack->GetITSClusterMap();
1038 tIsHeITSRefit =(Float_t)IsHeITSRefit;
1039 tPionSign =(Float_t)PionTrack->GetSign(); //Pion
1040 tPionpInTPC =(Float_t)trackInPion.GetP();
1041 tPionTPCsignal =(Float_t)PionTrack->GetTPCsignal();
1042 tDcaPionToPrimVertex =(Float_t)DcaPionToPrimVertex;
1043 tPionEta =(Float_t)PionTrack->Eta();
1044 tmomPionx =(Float_t)momPionVett[0];
1045 tmomPiony =(Float_t)momPionVett[1];
1046 tmomPionz =(Float_t)momPionVett[2];
1047 tmomNegPionAtSVx =(Float_t)momPionVettAt[0];
1048 tmomNegPionAtSVy =(Float_t)momPionVettAt[1];
1049 tmomNegPionAtSVz =(Float_t)momPionVettAt[2];
1050 tPionTPCNcls =(Float_t)PionTrack->GetTPCNcls();
1051 tPionimpactXY =(Float_t)impactXYpi;
1052 tPionimpactZ =(Float_t)impactZpi;
1053 tPionITSClusterMap =(Float_t)PionTrack->GetITSClusterMap();
1054 tIsPiITSRefit =(Float_t)IsPiITSRefit;
1055 txn =(Float_t)xn;
1056 txp =(Float_t)xp;
1057 tchi2He =(Float_t)HeTrack->GetTPCchi2()/(Float_t)(nClustersTPCHe);
1058 tchi2Pi =(Float_t)PionTrack->GetTPCchi2()/(Float_t)(nClustersTPCPi);
1059
1060 fNtuple1->Fill();
1061 vertex.Delete();
1062
1063 }
1064
1065 }
1066
1067 PostData(1,fListHist);
1068 PostData(2,fNtuple1);
1069 PostData(3,fNtuple4);
1070
1071} //end userexec
1072
1073
1074//________________________________________________________________________
1075
1076void AliAnalysisTaskReadNuclexAOD::Terminate(Option_t *)
1077{
1078 // Draw result to the screen
1079 // Called once at the end of the query
1080}
1081
1082