]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGHF/vertexingHF/AliCFVertexingHFCascade.cxx
Protection for momentum conservation in correction framework
[u/mrichter/AliRoot.git] / PWGHF / vertexingHF / AliCFVertexingHFCascade.cxx
CommitLineData
a9f238cf 1/**************************************************************************
2 * Copyright(c) 1998-2011, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16//-----------------------------------------------------------------------
17// Class for HF corrections as a function of many variables and steps
18// For D* and other cascades
19//
20// Author : A.Grelli a.grelli@uu.nl UTECHT
21//-----------------------------------------------------------------------
22
23#include "AliAODRecoDecayHF2Prong.h"
24#include "AliAODMCParticle.h"
25#include "AliAODEvent.h"
26#include "TClonesArray.h"
27#include "AliCFVertexingHF.h"
28#include "AliESDtrack.h"
29#include "TDatabasePDG.h"
30#include "AliAODRecoCascadeHF.h"
31#include "AliCFVertexingHFCascade.h"
32#include "AliCFContainer.h"
ec5288c3 33#include "AliCFTaskVertexingHF.h"
a9f238cf 34
35ClassImp(AliCFVertexingHFCascade)
36
37
38//_________________________________________
39 AliCFVertexingHFCascade::AliCFVertexingHFCascade(TClonesArray *mcArray, UShort_t originDselection):
40 AliCFVertexingHF(mcArray, originDselection)
41{
42 // standard constructor
43
44 SetNProngs(3);
2bf2e62b 45 fPtAccCut=new Float_t[fProngs];
46 fEtaAccCut=new Float_t[fProngs];
47 // element 0 in the cut arrays corresponds to the soft pion!!!!!!!! Careful when setting the values...
48 fPtAccCut[0]=0.;
49 fEtaAccCut[0]=0.;
50 for(Int_t iP=1; iP<fProngs; iP++){
51 fPtAccCut[iP]=0.1;
52 fEtaAccCut[iP]=0.9;
53 }
54
a9f238cf 55}
56
57
58//_____________________________________
59AliCFVertexingHFCascade& AliCFVertexingHFCascade::operator=(const AliCFVertexingHFCascade& c)
60{
61 // operator =
62
63 if (this != &c) {
64
65 AliCFVertexingHF::operator=(c);
66
67 }
68 return *this;
69}
70
71//__________________________________________
72Bool_t AliCFVertexingHFCascade::SetRecoCandidateParam(AliAODRecoDecayHF *recoCand)
73{
74 // set the AliAODRecoDecay candidate
75
76 Bool_t bSignAssoc = kFALSE;
77
78 fRecoCandidate = recoCand;
79 AliAODRecoCascadeHF* dstarD0pi = (AliAODRecoCascadeHF*)recoCand;
80
81 if (!fRecoCandidate) {
82 AliError("fRecoCandidate not found, problem in assignement\n");
83 return bSignAssoc;
84 }
85
86 if ( fRecoCandidate->GetPrimaryVtx()) AliDebug(3,"fReco Candidate has a pointer to PrimVtx\n");
87 //if (recoCand->GetPrimaryVtx()) printf("Reco Cand has a pointer to PrimVtx\n");
88
89 //Int_t pdgCand = 413;
90
91 Int_t pdgDgDStartoD0pi[2]={421,211};
92 Int_t pdgDgD0toKpi[2]={321,211};
93
94 Int_t nentries = fmcArray->GetEntriesFast();
95
96 AliDebug(3,Form("nentries = %d\n", nentries));
97
98 Int_t mcLabel = dstarD0pi->MatchToMC(413,421,pdgDgDStartoD0pi,pdgDgD0toKpi,fmcArray);
99
fbec9fa9 100 if (mcLabel == -1) return bSignAssoc;
101
1f780958 102 if (fRecoCandidate->NumberOfFakeDaughters()>0){
103 fFake = 0; // fake candidate
104 if (fFakeSelection==1) return bSignAssoc;
105 }
106 if (fRecoCandidate->NumberOfFakeDaughters()==0){
107 fFake = 2; // non-fake candidate
108 if (fFakeSelection==2) return bSignAssoc;
109 }
fbec9fa9 110
a9f238cf 111 SetMCLabel(mcLabel);
112 fmcPartCandidate = dynamic_cast<AliAODMCParticle*>(fmcArray->At(fmcLabel));
113
114 if (!fmcPartCandidate){
115 AliDebug(3,"No part candidate");
116 return bSignAssoc;
117 }
118
119 bSignAssoc = kTRUE;
120 return bSignAssoc;
121}
122
123//______________________________________________
124Bool_t AliCFVertexingHFCascade::GetGeneratedValuesFromMCParticle(Double_t* vectorMC)
125{
126 //
127 // collecting all the necessary info (pt, y, cosThetaStar, ptPi, ptKa, cT) from MC particle
128 //
129
130 Bool_t bGenValues = kFALSE;
131
132
133 Int_t daughter0ds = fmcPartCandidate->GetDaughter(0);
134 Int_t daughter1ds = fmcPartCandidate->GetDaughter(1);
135
136 //the D0
137 AliAODMCParticle* mcPartDaughterD0 = dynamic_cast<AliAODMCParticle*>(fmcArray->At(daughter0ds));
138 AliAODMCParticle* mcPartDaughterPis = dynamic_cast<AliAODMCParticle*>(fmcArray->At(daughter1ds));
139
a828d135 140 if(!mcPartDaughterD0 || !mcPartDaughterPis) return kFALSE;
141
a9f238cf 142 Double_t vtx1[3] = {0,0,0}; // primary vertex
143 Double_t vtx2daughter0[3] = {0,0,0}; // secondary vertex from daughter 0
144 Double_t vtx2daughter1[3] = {0,0,0}; // secondary vertex from daughter 1
145 fmcPartCandidate->XvYvZv(vtx1); // cm
146
147 //D0 daughters
148 Int_t daughter0 = mcPartDaughterD0->GetDaughter(0);
149 Int_t daughter1 = mcPartDaughterD0->GetDaughter(1);
150
151 AliAODMCParticle* mcPartDaughter0 = dynamic_cast<AliAODMCParticle*>(fmcArray->At(daughter0)); //D0
152 AliAODMCParticle* mcPartDaughter1 = dynamic_cast<AliAODMCParticle*>(fmcArray->At(daughter1)); //pis
153
a828d135 154 if(!mcPartDaughter0 || !mcPartDaughter1) return kFALSE;
155
a9f238cf 156 // getting vertex from daughters
157 mcPartDaughter0->XvYvZv(vtx2daughter0); // cm
158 mcPartDaughter1->XvYvZv(vtx2daughter1); //cm
159 if (TMath::Abs(vtx2daughter0[0] - vtx2daughter1[0])>1E-5 || TMath::Abs(vtx2daughter0[1]- vtx2daughter1[1])>1E-5 || TMath::Abs(vtx2daughter0[2] - vtx2daughter1[2])>1E-5) {
160 AliError("Daughters have different secondary vertex, skipping the track");
161 return bGenValues;
162 }
163
164 Int_t nprongs = 2;
165 Short_t charge = 0;
166 // always instantiate the AliAODRecoDecay with the positive daughter first, the negative second
167 AliAODMCParticle* positiveDaugh = mcPartDaughter0;
168 AliAODMCParticle* negativeDaugh = mcPartDaughter1;
169 if (mcPartDaughter0->GetPdgCode()<0 && mcPartDaughter1->GetPdgCode()>0){
170 // inverting in case the positive daughter is the second one
171 positiveDaugh = mcPartDaughter1;
172 negativeDaugh = mcPartDaughter0;
173 }
174 // getting the momentum from the daughters
175 Double_t px[2] = {positiveDaugh->Px(), negativeDaugh->Px()};
176 Double_t py[2] = {positiveDaugh->Py(), negativeDaugh->Py()};
177 Double_t pz[2] = {positiveDaugh->Pz(), negativeDaugh->Pz()};
178
179 Double_t d0[2] = {0.,0.};
180
181 AliAODRecoDecayHF* decay = new AliAODRecoDecayHF(vtx1,vtx2daughter0,nprongs,charge,px,py,pz,d0);
182
183 Double_t cosThetaStar = 0.;
184 Double_t cosThetaStarD0 = 0.;
185 Double_t cosThetaStarD0bar = 0.;
186 cosThetaStarD0 = decay->CosThetaStar(1,421,211,321);
187 cosThetaStarD0bar = decay->CosThetaStar(0,421,321,211);
188 if (mcPartDaughterD0->GetPdgCode() == 421){ // D0
189 AliDebug(3, Form("D0, with pdgprong0 = %d, pdgprong1 = %d",mcPartDaughter0->GetPdgCode(),mcPartDaughter1->GetPdgCode()));
190 cosThetaStar = cosThetaStarD0;
191 }
192 else if (mcPartDaughterD0->GetPdgCode() == -421){ // D0bar{
193 AliDebug(3, Form("D0bar, with pdgprong0 = %d, pdgprong1 = %d",mcPartDaughter0->GetPdgCode(),mcPartDaughter1->GetPdgCode()));
194 cosThetaStar = cosThetaStarD0bar;
195 }
196 else{
197 AliWarning("There are problems!! particle was expected to be either a D0 or a D0bar, check...");
198 return vectorMC;
199 }
200 if (cosThetaStar < -1 || cosThetaStar > 1) {
201 AliWarning("Invalid value for cosine Theta star, returning");
202 return bGenValues;
203 }
204
205 Double_t vectorD0[2] ={0.,0.};
206
207 // evaluate the correct cascade
208 if (!EvaluateIfD0toKpi(mcPartDaughterD0,vectorD0)) {
209 AliDebug(2, "Error! the D0 MC doesn't have correct daughters!!");
210 return bGenValues;
211 }
212
213 //ct
214 Double_t cT = decay->Ct(421);
215 // get the pT of the daughters
216 Double_t pTD0 = 0.;
217 Double_t pTpi = 0.;
218
219 if (TMath::Abs(fmcPartCandidate->GetPdgCode()) == 413) {
220 pTD0 = mcPartDaughterD0->Pt();
221 pTpi = mcPartDaughterPis->Pt();
222 }
223
224
ec5288c3 225 switch (fConfiguration){
226 case AliCFTaskVertexingHF::kSnail:
227 vectorMC[0] = fmcPartCandidate->Pt();
228 vectorMC[1] = fmcPartCandidate->Y() ;
229 vectorMC[2] = cosThetaStar ;
230 vectorMC[3] = vectorD0[0];
231 vectorMC[4] = vectorD0[1];
232 vectorMC[5] = cT*1.E4 ; // in micron
233 vectorMC[6] = 0.; // dummy value, meaningless in MC
234 vectorMC[7] = -100000.; // dummy value, meaningless in MC, in micron^2
235 vectorMC[8] = 1.01; // dummy value, meaningless in MC
236 vectorMC[9] = fmcPartCandidate->Phi();
237 vectorMC[10] = fzMCVertex; // z of reconstructed of primary vertex
238 vectorMC[11] = fCentValue; // reconstructed centrality
239 vectorMC[12] = 1.; // always filling with 1 at MC level
240 vectorMC[13] = 1.01; // dummy value for cosPointingXY multiplicity
241 vectorMC[14] = 0.; // dummy value for NormalizedDecayLengthXY multiplicity
242 vectorMC[15] = fMultiplicity; // reconstructed multiplicity
243 break;
244 case AliCFTaskVertexingHF::kCheetah:
245 vectorMC[0] = fmcPartCandidate->Pt();
246 vectorMC[1] = fmcPartCandidate->Y() ;
247 vectorMC[2] = cT*1.E4; // in micron
248 vectorMC[3] = fmcPartCandidate->Phi();
249 vectorMC[4] = fzMCVertex;
250 vectorMC[5] = fCentValue; // dummy value for dca, meaningless in MC
251 vectorMC[6] = 1. ; // fake: always filling with 1 at MC level
252 vectorMC[7] = fMultiplicity; // dummy value for d0pi, meaningless in MC, in micron
253 break;
254 }
a9f238cf 255
256 delete decay;
257 bGenValues = kTRUE;
258 return bGenValues;
259}
260//____________________________________________
261Bool_t AliCFVertexingHFCascade::GetRecoValuesFromCandidate(Double_t *vectorReco) const
262{
263 // read the variables for the container
264
265 Bool_t bFillRecoValues=kFALSE;
266
267 //Get the D* and the D0 from D*
268 AliAODRecoCascadeHF* dstarD0pi = (AliAODRecoCascadeHF*)fRecoCandidate;
269 AliAODRecoDecayHF2Prong* d0toKpi = (AliAODRecoDecayHF2Prong*)dstarD0pi->Get2Prong();
270
271
c9b41591 272 //if (dstarD0pi->GetPrimaryVtx())printf("dstarD0pi has primary vtx\n");
273 //if (fRecoCandidate->GetPrimaryVtx())printf("fRecoCandidateDstar has primary vtx\n");
a9f238cf 274
275 Double_t pt = dstarD0pi->Pt();
276 Double_t rapidity = dstarD0pi->YDstar();
277 Double_t invMass=0.;
278 Double_t cosThetaStar = 9999.;
279 Double_t pTpi = 0.;
280 Double_t pTK = 0.;
281 Double_t dca = d0toKpi->GetDCA();
282 Double_t d0pi = 0.;
283 Double_t d0K = 0.;
284 Double_t d0xd0 = d0toKpi->Prodd0d0();
285 Double_t cosPointingAngle = d0toKpi->CosPointingAngle();
286 Double_t phi = dstarD0pi->Phi();
ec5288c3 287 Double_t cosPointingAngleXY = d0toKpi->CosPointingAngleXY();
288 Double_t normDecayLengthXY = d0toKpi->NormalizedDecayLengthXY();
a9f238cf 289
290 Int_t pdgCode = fmcPartCandidate->GetPdgCode();
291
292 if (pdgCode > 0){
293 cosThetaStar = d0toKpi->CosThetaStarD0();
294 pTpi = d0toKpi->PtProng(0);
295 pTK = d0toKpi->PtProng(1);
296 d0pi = d0toKpi->Getd0Prong(0);
297 d0K = d0toKpi->Getd0Prong(1);
298 invMass=d0toKpi->InvMassD0();
299 }
300 else {
301 cosThetaStar = d0toKpi->CosThetaStarD0bar();
302 pTpi = d0toKpi->PtProng(1);
303 pTK = d0toKpi->PtProng(0);
304 d0pi = d0toKpi->Getd0Prong(1);
305 d0K = d0toKpi->Getd0Prong(0);
306 invMass= d0toKpi->InvMassD0bar();
307 }
308
309 Double_t cT = d0toKpi->CtD0();
310
ec5288c3 311 switch (fConfiguration){
312 case AliCFTaskVertexingHF::kSnail:
313 vectorReco[0] = pt;
314 vectorReco[1] = rapidity;
315 vectorReco[2] = cosThetaStar;
316 vectorReco[3] = pTpi;
317 vectorReco[4] = pTK;
318 vectorReco[5] = cT*1.E4; // in micron
319 vectorReco[6] = dca*1.E4; // in micron
320 vectorReco[7] = d0xd0*1.E8; // in micron^2
321 vectorReco[8] = cosPointingAngle; // in micron
322 vectorReco[9] = phi;
323 vectorReco[10] = fzPrimVertex; // z of reconstructed of primary vertex
324 vectorReco[11] = fCentValue;
325 vectorReco[12] = fFake; // whether the reconstructed candidate was a fake (fFake = 0) or not (fFake = 2)
326 vectorReco[13] = cosPointingAngleXY;
327 vectorReco[14] = normDecayLengthXY; // in cm
328 vectorReco[15] = fMultiplicity; // reconstructed multiplicity
329 break;
330 case AliCFTaskVertexingHF::kCheetah:
331 vectorReco[0] = pt;
332 vectorReco[1] = rapidity ;
333 vectorReco[2] = cT*1.E4; // in micron
334 vectorReco[3] = phi;
335 vectorReco[4] = fzPrimVertex;
336 vectorReco[5] = fCentValue;
337 vectorReco[6] = fFake ;
338 vectorReco[7] = fMultiplicity;
339 break;
340 }
a9f238cf 341
ec5288c3 342 bFillRecoValues = kTRUE;
343
a9f238cf 344 return bFillRecoValues;
345}
346
347
348//_____________________________________________________________
349Bool_t AliCFVertexingHFCascade::CheckMCChannelDecay() const
350{
351 // check the required decay channel
352
353 Bool_t checkCD = kFALSE;
354
355
356 Int_t daughter0 = fmcPartCandidate->GetDaughter(0);
357 Int_t daughter1 = fmcPartCandidate->GetDaughter(1);
358 AliAODMCParticle* mcPartDaughter0 = dynamic_cast<AliAODMCParticle*>(fmcArray->At(daughter0));
359 AliAODMCParticle* mcPartDaughter1 = dynamic_cast<AliAODMCParticle*>(fmcArray->At(daughter1));
360
361 if (!mcPartDaughter0 || !mcPartDaughter1) {
362 AliDebug (2,"Problems in the MC Daughters\n");
363 return checkCD;
364 }
365
366 if (!(TMath::Abs(mcPartDaughter0->GetPdgCode())==421 &&
367 TMath::Abs(mcPartDaughter1->GetPdgCode())==211) &&
368 !(TMath::Abs(mcPartDaughter0->GetPdgCode())==211 &&
369 TMath::Abs(mcPartDaughter1->GetPdgCode())==421)) {
370 AliDebug(2, "The D0 MC doesn't come from a Kpi decay, skipping!!");
371 return checkCD;
372 }
373
374 Double_t vectorD0[2] ={0.,0.};
375
376 // D* is a cascade ...evaluate the correct cascade
377 if (!EvaluateIfD0toKpi(mcPartDaughter0,vectorD0)) {
378 AliDebug(2, "Error! the D0 MC doesn't have correct daughters!!");
379 return checkCD;
380 }
381
382 checkCD = kTRUE;
383 return checkCD;
384
385}
386
387//__________________________________________
388Bool_t AliCFVertexingHFCascade::EvaluateIfD0toKpi(AliAODMCParticle* neutralDaugh, Double_t* vectorD0)const
389{
390 //
391 // chack wether D0 is decaing into kpi
392 //
393
394 Bool_t isHadronic = kFALSE;
395
396 Int_t daughterD00 = neutralDaugh->GetDaughter(0);
397 Int_t daughterD01 = neutralDaugh->GetDaughter(1);
398
399 AliDebug(2, Form("daughter0 = %d and daughter1 = %d",daughterD00,daughterD01));
400 if (daughterD00 == 0 || daughterD01 == 0) {
401 AliDebug(2, "Error! the D0 MC doesn't have correct daughters!!");
402 return isHadronic;
403 }
404
405 if (TMath::Abs(daughterD01 - daughterD00) != 1) { // should be everytime true - see PDGdatabooklet
406 AliDebug(2, "The D0 MC doesn't come from a 2-prong decay, skipping!!");
407 return isHadronic;
408 }
409
410 AliAODMCParticle* mcPartDaughterD00 = dynamic_cast<AliAODMCParticle*>(fmcArray->At(daughterD00));
411 AliAODMCParticle* mcPartDaughterD01 = dynamic_cast<AliAODMCParticle*>(fmcArray->At(daughterD01));
412 if (!mcPartDaughterD00 || !mcPartDaughterD01) {
413 AliWarning("D0 MC analysis: At least one Daughter Particle not found in tree, skipping");
414 return isHadronic;
415 }
416
417 if (!(TMath::Abs(mcPartDaughterD00->GetPdgCode())==321 &&
418 TMath::Abs(mcPartDaughterD01->GetPdgCode())==211) &&
419 !(TMath::Abs(mcPartDaughterD00->GetPdgCode())==211 &&
420 TMath::Abs(mcPartDaughterD01->GetPdgCode())==321)) {
421 AliDebug(2, "The D0 MC doesn't come from a Kpi decay, skipping!!");
422 return isHadronic;
423 }
424
88bc191b 425 Double_t sumPxDau=mcPartDaughterD00->Px()+mcPartDaughterD01->Px();
426 Double_t sumPyDau=mcPartDaughterD00->Py()+mcPartDaughterD01->Py();
427 Double_t sumPzDau=mcPartDaughterD00->Pz()+mcPartDaughterD01->Pz();
428 Double_t pxMother=neutralDaugh->Px();
429 Double_t pyMother=neutralDaugh->Py();
430 Double_t pzMother=neutralDaugh->Pz();
431 if(TMath::Abs(pxMother-sumPxDau)/(TMath::Abs(pxMother)+1.e-13)>0.00001 ||
432 TMath::Abs(pyMother-sumPyDau)/(TMath::Abs(pyMother)+1.e-13)>0.00001 ||
433 TMath::Abs(pzMother-sumPzDau)/(TMath::Abs(pzMother)+1.e-13)>0.00001){
434 AliDebug(2, "Momentum conservation violated, skipping!!");
435 return isHadronic;
436 }
437
a9f238cf 438 Double_t pTD0pi = 0;
439 Double_t pTD0K = 0;
440
441
442 if (TMath::Abs(mcPartDaughterD00->GetPdgCode()) == 211) {
443 pTD0pi = mcPartDaughterD00->Pt();
444 pTD0K = mcPartDaughterD01->Pt();
445 }
446 else {
447 pTD0pi = mcPartDaughterD01->Pt();
448 pTD0K = mcPartDaughterD00->Pt();
449 }
450
451 isHadronic = kTRUE;
452
453 vectorD0[0] = pTD0pi;
454 vectorD0[1] = pTD0K;
455
456 return isHadronic;
457
458}
459
2bf2e62b 460//___________________________________________________________
461
462void AliCFVertexingHFCascade::SetPtAccCut(Float_t* ptAccCut)
463{
464 //
465 // setting the pt cut to be used in the Acceptance steps (MC+Reco)
466 //
467
468 AliInfo("The 3rd element of the pt cut array will correspond to the cut applied to the soft pion - please check that it is correct");
469 if (fProngs>0){
470 for (Int_t iP=0; iP<fProngs; iP++){
471 fPtAccCut[iP]=ptAccCut[iP];
472 }
473 }
474 return;
475}
476
477
478
479//___________________________________________________________
480
481void AliCFVertexingHFCascade::SetEtaAccCut(Float_t* etaAccCut)
482{
483 //
484 // setting the eta cut to be used in the Acceptance steps (MC+Reco)
485 //
486
487 AliInfo("The 3rd element of the eta cut array will correspond to the cut applied to the soft pion - please check that it is correct");
488 if (fProngs>0){
489 for (Int_t iP=0; iP<fProngs; iP++){
490 fEtaAccCut[iP]=etaAccCut[iP];
491 }
492 }
493 return;
494}
495//___________________________________________________________
496
497void AliCFVertexingHFCascade::SetAccCut(Float_t* ptAccCut, Float_t* etaAccCut)
498{
499 //
500 // setting the pt and eta cut to be used in the Acceptance steps (MC+Reco)
501 //
502
503 AliInfo("The 3rd element of the pt and cut array will correspond to the cut applied to the soft pion - please check that they are correct");
504 if (fProngs>0){
505 for (Int_t iP=0; iP<fProngs; iP++){
506 fPtAccCut[iP]=ptAccCut[iP];
507 fEtaAccCut[iP]=etaAccCut[iP];
508 }
509 }
510 return;
511}
512
513//___________________________________________________________
514
515void AliCFVertexingHFCascade::SetAccCut()
516{
517 //
518 // setting the pt and eta cut to be used in the Acceptance steps (MC+Reco)
519 //
367e9aa3 520
521 AliAODMCParticle* mcPartDaughter = dynamic_cast<AliAODMCParticle*>(fmcArray->At(fLabelArray[2])); // should be the soft pion...
522 if(!mcPartDaughter) return;
523 Int_t mother = mcPartDaughter->GetMother();
524 AliAODMCParticle* mcMother = dynamic_cast<AliAODMCParticle*>(fmcArray->At(mother));
525 if(!mcMother) return;
526
527 if (TMath::Abs(mcPartDaughter->GetPdgCode())!= 211 || TMath::Abs(mcMother->GetPdgCode())!=413){
528 AliFatal("Apparently the soft pion is not in the third position, causing a crash!!");
529 }
530 if (fProngs>0){
531 for (Int_t iP=0; iP<fProngs-1; iP++){
532 fPtAccCut[iP]=0.1;
533 fEtaAccCut[iP]=0.9;
534 }
535 fPtAccCut[2]=0.06; // soft pion
536 fEtaAccCut[2]=0.9; // soft pion
537 }
538 return;
2bf2e62b 539}
a9f238cf 540
367e9aa3 541//_____________________________________________________________
542Double_t AliCFVertexingHFCascade::GetEtaProng(Int_t iProng) const
543{
544 //
545 // getting eta of the prong - overload the mother class method
546 //
a9f238cf 547
367e9aa3 548 if (fRecoCandidate){
549
550 AliAODRecoCascadeHF* dstarD0pi = (AliAODRecoCascadeHF*)fRecoCandidate;
551
552 Double_t etaProng =-9999;
553 if(iProng==0) etaProng =dstarD0pi->Get2Prong()->EtaProng(0);
554 if(iProng==1) etaProng =dstarD0pi->Get2Prong()->EtaProng(1);
555 if(iProng==2) etaProng =dstarD0pi->EtaProng(1);
556
557 return etaProng;
558
559 }
560 return 999999;
561}
562//_____________________________________________________________
563Double_t AliCFVertexingHFCascade::GetPtProng(Int_t iProng) const
564{
565 //
566 // getting pt of the prong
567 //
568
569 if (fRecoCandidate){
570
571 AliAODRecoCascadeHF* dstarD0pi = (AliAODRecoCascadeHF*)fRecoCandidate;
572 Double_t ptProng= -9999;
573 if(iProng==0) ptProng =dstarD0pi->Get2Prong()->PtProng(0);
574 if(iProng==1) ptProng =dstarD0pi->Get2Prong()->PtProng(1);
575 if(iProng==2) ptProng =dstarD0pi->PtProng(1);
576
577 // Double_t ptProng = fRecoCandidate->PtProng(iProng);
578 return ptProng;
579
580 }
581 return 999999;
582
583}