AliPhysics  6f1d526 (6f1d526)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskSEXicPlus2XiPiPifromAODtracks.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appeuear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 
16 /* $Id$ */
17 
18 //
19 //
20 // XicPlus2XiPiPi analysis code
21 //
22 // Input: AOD
23 // Output: TTree or THnSparse (mass vs pT vs Centrality)
24 //
25 // Cuts:
26 // TTree: very loose cut
27 // THnSparse: One THnSparse is created per cut. One cut is specified by
28 // an array of bits, each bit corresponds to a cut in "Cut" function.
29 //
30 //-------------------------------------------------------------------------
31 //
32 // Authors: Y.S Watanabe(a)
33 // (a) CNS, the University of Tokyo
34 // Contatcs: wyosuke@cns.s.u-tokyo.ac.jp
35 //-------------------------------------------------------------------------
36 
37 #include <TSystem.h>
38 #include <TParticle.h>
39 #include <TParticlePDG.h>
40 #include <THnSparse.h>
41 #include <TH1F.h>
42 #include <TH2F.h>
43 #include <TLorentzVector.h>
44 #include <TTree.h>
45 #include "TROOT.h"
46 #include <TDatabasePDG.h>
47 #include <AliAnalysisDataSlot.h>
48 #include <AliAnalysisDataContainer.h>
49 #include "AliMCEvent.h"
50 #include "AliAnalysisManager.h"
51 #include "AliAODMCHeader.h"
52 #include "AliAODHandler.h"
53 #include "AliLog.h"
54 #include "AliExternalTrackParam.h"
55 #include "AliAODVertex.h"
56 #include "AliESDVertex.h"
57 #include "AliAODRecoDecay.h"
58 #include "AliAODRecoDecayHF.h"
60 #include "AliESDtrack.h"
61 #include "AliAODTrack.h"
62 #include "AliAODv0.h"
63 #include "AliAODcascade.h"
64 #include "AliAODMCParticle.h"
65 #include "AliAnalysisTaskSE.h"
67 #include "AliPIDResponse.h"
68 #include "AliPIDCombined.h"
69 #include "AliAODPidHF.h"
70 #include "AliInputEventHandler.h"
71 #include "AliESDtrackCuts.h"
72 #include "AliNeutralTrackParam.h"
73 #include "AliKFParticle.h"
74 #include "AliKFVertex.h"
75 #include "AliExternalTrackParam.h"
76 #include "AliCentrality.h"
77 #include "AliVertexerTracks.h"
78 
79 using std::cout;
80 using std::endl;
81 
85 
86 //__________________________________________________________________________
89  fUseMCInfo(kFALSE),
90  fOutput(0),
91  fOutputAll(0),
92  fListCuts(0),
93  fCEvents(0),
94  fHTrigger(0),
95  fHCentrality(0),
96  fAnalCuts(0),
97  fIsEventSelected(kFALSE),
98  fWriteVariableTree(kFALSE),
99  fVariablesTree(0),
100  fReconstructPrimVert(kFALSE),
101  fIsMB(kFALSE),
102  fIsSemi(kFALSE),
103  fIsCent(kFALSE),
104  fIsINT7(kFALSE),
105  fIsEMC7(kFALSE),
106  fCandidateVariables(),
107  fVtx1(0),
108  fV1(0),
109  fBzkG(0),
110  fCentrality(0),
111  fTriggerCheck(0),
112  fHistoXicMass(0),
113  fHistoDcaPi1Pi2(0),
114  fHistoDcaPiCasc(0),
115  fHistoLikeDecayLength(0),
116  fHistoLikeDecayLengthXY(0),
117  fHistoXicCosPAXY(0),
118  fHistoXiMass(0),
119  fHistoCascDcaXiDaughters(0),
120  fHistoCascDcaV0Daughters(0),
121  fHistoCascDcaV0ToPrimVertex(0),
122  fHistoCascDcaPosToPrimVertex(0),
123  fHistoCascDcaNegToPrimVertex(0),
124  fHistoCascDcaBachToPrimVertex(0),
125  fHistoCascCosPAXiPrim(0),
126  fHistoXiPt(0),
127  fHistoPiPt(0),
128  fHistoPid0(0),
129  fHistonSigmaTPCpi(0),
130  fHistonSigmaTOFpi(0),
131  fHistoProbPion(0),
132  fHistoXiMassvsPtRef(0),
133  fHistoXiMassvsPtRef2(0),
134  fHistoXiMassvsPtRef3(0),
135  fHistoXiMassvsPtRef4(0),
136  fHistoXiMassvsPtRef5(0),
137  fHistoXiMassvsPtRef6(0),
138  fHistoPiPtRef(0)
139 {
140  //
141  // Default Constructor.
142  //
143 }
144 
145 //___________________________________________________________________________
148  Bool_t writeVariableTree) :
149  AliAnalysisTaskSE(name),
150  fUseMCInfo(kFALSE),
151  fOutput(0),
152  fOutputAll(0),
153  fListCuts(0),
154  fCEvents(0),
155  fHTrigger(0),
156  fHCentrality(0),
157  fAnalCuts(analCuts),
158  fIsEventSelected(kFALSE),
159  fWriteVariableTree(writeVariableTree),
160  fVariablesTree(0),
161  fReconstructPrimVert(kFALSE),
162  fIsMB(kFALSE),
163  fIsSemi(kFALSE),
164  fIsCent(kFALSE),
165  fIsINT7(kFALSE),
166  fIsEMC7(kFALSE),
167  fCandidateVariables(),
168  fVtx1(0),
169  fV1(0),
170  fBzkG(0),
171  fCentrality(0),
172  fTriggerCheck(0),
173  fHistoXicMass(0),
174  fHistoDcaPi1Pi2(0),
175  fHistoDcaPiCasc(0),
176  fHistoLikeDecayLength(0),
177  fHistoLikeDecayLengthXY(0),
178  fHistoXicCosPAXY(0),
179  fHistoXiMass(0),
180  fHistoCascDcaXiDaughters(0),
181  fHistoCascDcaV0Daughters(0),
182  fHistoCascDcaV0ToPrimVertex(0),
183  fHistoCascDcaPosToPrimVertex(0),
184  fHistoCascDcaNegToPrimVertex(0),
185  fHistoCascDcaBachToPrimVertex(0),
186  fHistoCascCosPAXiPrim(0),
187  fHistoXiPt(0),
188  fHistoPiPt(0),
189  fHistoPid0(0),
190  fHistonSigmaTPCpi(0),
191  fHistonSigmaTOFpi(0),
192  fHistoProbPion(0),
193  fHistoXiMassvsPtRef(0),
194  fHistoXiMassvsPtRef2(0),
195  fHistoXiMassvsPtRef3(0),
196  fHistoXiMassvsPtRef4(0),
197  fHistoXiMassvsPtRef5(0),
198  fHistoXiMassvsPtRef6(0),
199  fHistoPiPtRef(0)
200 {
201  //
202  // Constructor. Initialization of Inputs and Outputs
203  //
204  Info("AliAnalysisTaskSEXicPlus2XiPiPifromAODtracks","Calling Constructor");
205 
206  DefineOutput(1,TList::Class());
207  DefineOutput(2,TList::Class());
208  if(writeVariableTree){
209  DefineOutput(3,TTree::Class());
210  }else{
211  DefineOutput(3,TList::Class());
212  }
213 }
214 
215 //___________________________________________________________________________
217  //
218  // destructor
219  //
220  Info("~AliAnalysisTaskSEXicPlus2XiPiPifromAODtracks","Calling Destructor");
221 
222 
223  if (fOutput) {
224  delete fOutput;
225  fOutput = 0;
226  }
227 
228  if (fOutputAll) {
229  delete fOutputAll;
230  fOutputAll = 0;
231  }
232 
233  if (fListCuts) {
234  delete fListCuts;
235  fListCuts = 0;
236  }
237 
238 
239  if (fAnalCuts) {
240  delete fAnalCuts;
241  fAnalCuts = 0;
242  }
243 
244  if (fVariablesTree) {
245  delete fVariablesTree;
246  fVariablesTree = 0;
247  }
248 
250  delete fCandidateVariables;
252  }
253 
254 }
255 
256 //_________________________________________________
258  //
259  // Initialization
260  //
261  //
262 
263  //Copied from $ALICE_ROOT/PWGHF/vertexingHF/ConfigVertexingHF.C
264 
265  fIsEventSelected=kFALSE;
266 
267  if (fDebug > 1) AliInfo("Init");
268 
269  fListCuts = new TList();
270  fListCuts->SetOwner();
271  fListCuts->SetName("ListCuts");
273  PostData(2,fListCuts);
274 
275  return;
276 }
277 
278 //_________________________________________________
280 {
281  //
282  // UserExec code
283  //
284 
285  if (!fInputEvent) {
286  AliError("NO EVENT FOUND!");
287  return;
288  }
289  AliAODEvent* aodEvent = dynamic_cast<AliAODEvent*>(fInputEvent);
290 
291 
292  fCEvents->Fill(1);
293  //------------------------------------------------
294  // First check if the event has proper vertex and B
295  //------------------------------------------------
296  fVtx1 = (AliAODVertex*)aodEvent->GetPrimaryVertex();
297  if (!fVtx1) return;
298 
299  Double_t pos[3],cov[6];
300  fVtx1->GetXYZ(pos);
301  fVtx1->GetCovarianceMatrix(cov);
302  fV1 = new AliESDVertex(pos,cov,100.,100,fVtx1->GetName());
303 
304  fBzkG = (Double_t)aodEvent->GetMagneticField();
305  AliKFParticle::SetField(fBzkG);
306  if (TMath::Abs(fBzkG)<0.001) {
307  delete fV1;
308  return;
309  }
310  fCEvents->Fill(2);
311 
312  //------------------------------------------------
313  // Event selection
314  //------------------------------------------------
315  Bool_t fIsTriggerNotOK = fAnalCuts->IsEventRejectedDueToTrigger();
316  if(!fIsTriggerNotOK) fCEvents->Fill(3);
317 
319  if(!fIsEventSelected) {
320  //cout<<"Why: "<<fAnalCuts->GetWhyRejection()<<endl;
321  delete fV1;
322  return;
323  }
324 
325  //cout<<fabs(aodEvent->GetPrimaryVertex()->GetZ()-aodEvent->GetPrimaryVertexSPD()->GetZ())<<endl;
326 
327  fCEvents->Fill(4);
328 
329  fIsMB=(((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected()&AliVEvent::kMB)==(AliVEvent::kMB);
330  fIsSemi=(((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected()&AliVEvent::kSemiCentral)==(AliVEvent::kSemiCentral);
331  fIsCent=(((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected()&AliVEvent::kCentral)==(AliVEvent::kCentral);
332  fIsINT7=(((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected()&AliVEvent::kINT7)==(AliVEvent::kINT7);
333  fIsEMC7=(((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected()&AliVEvent::kEMC7)==(AliVEvent::kEMC7);
335  if(fIsMB) fHTrigger->Fill(1);
336  if(fIsSemi) fHTrigger->Fill(2);
337  if(fIsCent) fHTrigger->Fill(3);
338  if(fIsINT7) fHTrigger->Fill(4);
339  if(fIsEMC7) fHTrigger->Fill(5);
340  if(fIsMB|fIsSemi|fIsCent) fHTrigger->Fill(7);
341  if(fIsINT7|fIsEMC7) fHTrigger->Fill(8);
342  if(fIsMB&fIsSemi) fHTrigger->Fill(10);
343  if(fIsMB&fIsCent) fHTrigger->Fill(11);
344  if(fIsINT7&fIsEMC7) fHTrigger->Fill(12);
345 
346  AliCentrality *cent = aodEvent->GetCentrality();
347  fCentrality = cent->GetCentralityPercentile("V0M");
348  fHCentrality->Fill(fCentrality);
349 
350  //------------------------------------------------
351  // Check if the event has cascade candidate
352  //------------------------------------------------
353  Int_t ncasc = aodEvent->GetNumberOfCascades();
354  Int_t nselecasc = 0.;
355  for(Int_t ic=0;ic<ncasc;ic++){
356  AliAODcascade *casc = aodEvent->GetCascade(ic);
357  if(!fAnalCuts) continue;
358  if(fAnalCuts->SingleCascadeCuts(casc,pos)) nselecasc++;
359  }
360 
361  if(nselecasc==0){
362  delete fV1;
363  return;
364  }
365 
366  fCEvents->Fill(5);
367 
368  //------------------------------------------------
369  // MC analysis setting
370  //------------------------------------------------
371  TClonesArray *mcArray = 0;
372  AliAODMCHeader *mcHeader=0;
373  if (fUseMCInfo) {
374  // MC array need for maching
375  mcArray = dynamic_cast<TClonesArray*>(aodEvent->FindListObject(AliAODMCParticle::StdBranchName()));
376  if (!mcArray) {
377  AliError("Could not find Monte-Carlo in AOD");
378  delete fV1;
379  return;
380  }
381  fCEvents->Fill(6); // in case of MC events
382 
383  // load MC header
384  mcHeader = (AliAODMCHeader*)aodEvent->GetList()->FindObject(AliAODMCHeader::StdBranchName());
385  if (!mcHeader) {
386  AliError("AliAnalysisTaskSEXicPlus2XiPiPifromAODtracks::UserExec: MC header branch not found!\n");
387  delete fV1;
388  return;
389  }
390  fCEvents->Fill(7); // in case of MC events
391 
392  Double_t zMCVertex = mcHeader->GetVtxZ();
393  if (TMath::Abs(zMCVertex) > fAnalCuts->GetMaxVtxZ()) {
394  AliDebug(2,Form("Event rejected: abs(zVtxMC)=%f > fAnalCuts->GetMaxVtxZ()=%f",zMCVertex,fAnalCuts->GetMaxVtxZ()));
395  delete fV1;
396  return;
397  } else {
398  fCEvents->Fill(17); // in case of MC events
399  }
400  }
401 
402  //------------------------------------------------
403  // Main analysis done in this function
404  //------------------------------------------------
405  MakeAnalysis(aodEvent, mcArray);
406 
407  PostData(1,fOutput);
408  if(fWriteVariableTree){
409  PostData(3,fVariablesTree);
410  }else{
411  PostData(3,fOutputAll);
412  }
413 
414  fIsEventSelected=kFALSE;
415 
416  delete fV1;
417  return;
418 }
419 
420 //________________________________________ terminate ___________________________
422 {
423  // The Terminate() function is the last function to be called during
424  // a query. It always runs on the client, it can be used to present
425  // the results graphically or save the results to file.
426 
427  //AliInfo("Terminate","");
428  AliAnalysisTaskSE::Terminate();
429 
430  fOutput = dynamic_cast<TList*> (GetOutputData(1));
431  if (!fOutput) {
432  AliError("fOutput not available");
433  return;
434  }
435 
436  if(!fWriteVariableTree){
437  fOutputAll = dynamic_cast<TList*> (GetOutputData(3));
438  if (!fOutputAll) {
439  AliError("fOutputAll not available");
440  return;
441  }
442  }
443 
444  return;
445 }
446 
447 //___________________________________________________________________________
449 {
450  //
451  // UserCreateOutputObjects
452  //
453 
454  AliInfo(Form("CreateOutputObjects of task %s\n", GetName()));
455 
456  //------------------------------------------------
457  // output object setting
458  //------------------------------------------------
459  fOutput = new TList();
460  fOutput->SetOwner();
461  fOutput->SetName("chist0");
462  DefineGeneralHistograms(); // define general histograms
463  PostData(1,fOutput);
464 
466  if (fWriteVariableTree) {
467  PostData(3,fVariablesTree);
468  }else{
469  fOutputAll = new TList();
470  fOutputAll->SetOwner();
471  fOutputAll->SetName("anahisto");
472  DefineAnalysisHistograms(); // define general histograms
473  PostData(3,fOutputAll);
474  }
475 
476 
477  return;
478 }
479 
480 //________________________________________________________________________
482 (
483  AliAODEvent *aodEvent, TClonesArray *mcArray
484  )
485 {
486  //
487  // Main analysis part called from UserExec
488  //
489 
490  Int_t nCascades= aodEvent->GetNumberOfCascades();
491  if (nCascades==0) {
492  return;
493  }
494  Int_t nTracks= aodEvent->GetNumberOfTracks();
495  if (nTracks==0) {
496  return;
497  }
498 
499  //------------------------------------------------
500  // Select good track before hand to save time
501  //------------------------------------------------
502  Bool_t seleTrkFlags[nTracks];
503  Int_t nSeleTrks=0;
504  SelectTrack(aodEvent,nTracks,nSeleTrks,seleTrkFlags);
505  Bool_t seleCascFlags[nCascades];
506  Int_t nSeleCasc=0;
507  SelectCascade(aodEvent,nCascades,nSeleCasc,seleCascFlags);
508 
509  Int_t usedmclab[20];//Used Xic Label: Assuming there are less than 20 Xic/evt
510  Int_t nusedmclab[20];//Number of times the Xic label is used: Assuming there are less than 20 Xic/evt
511  for(Int_t i=0;i<20;i++) {
512  usedmclab[i]=-9999;
513  nusedmclab[i]=0;
514  }
515 
516  //------------------------------------------------
517  // Cascade loop
518  //------------------------------------------------
519  for (Int_t icasc = 0; icasc<nCascades; icasc++) {
520  if(!seleCascFlags[icasc]) continue;
521  AliAODcascade *casc = aodEvent->GetCascade(icasc);
522  if(!casc) continue;
523 
524  AliAODTrack *cptrack = (AliAODTrack*)(casc->GetDaughter(0));
525  AliAODTrack *cntrack = (AliAODTrack*)(casc->GetDaughter(1));
526  AliAODTrack *cbtrack = (AliAODTrack*)(casc->GetDecayVertexXi()->GetDaughter(0));
527  if(!cptrack || !cntrack || !cbtrack) continue;
528 
529  Int_t cpid = cptrack->GetID();
530  Int_t cnid = cntrack->GetID();
531  Int_t cbid = cbtrack->GetID();
532 
533  if(cptrack->Charge()==0) continue;
534  if(cntrack->Charge()==0) continue;
535  if(cbtrack->Charge()==0) continue;
536 
537  Short_t charge_casc = cptrack->Charge() + cntrack->Charge() + cbtrack->Charge();
538 
539  //------------------------------------------------
540  // Track1 loop
541  //------------------------------------------------
542  for (Int_t itrk1 = 0; itrk1<nTracks-1; itrk1++) {
543  if(!seleTrkFlags[itrk1]) continue;
544  AliAODTrack *trk1 = (AliAODTrack*)aodEvent->GetTrack(itrk1);
545  if(!trk1||trk1->GetID()<0) continue;
546 
547  //------------------------------------------------
548  // Track2 loop
549  //------------------------------------------------
550  for (Int_t itrk2 = itrk1+1; itrk2<nTracks; itrk2++) {
551  if(!seleTrkFlags[itrk2]) continue;
552  AliAODTrack *trk2 = (AliAODTrack*)aodEvent->GetTrack(itrk2);
553  if(!trk2||trk2->GetID()<0) continue;
554 
555  if(!SelectLikeSign(trk1,trk2)) continue;
556 
557  Int_t lpid1 = trk1->GetID();
558  Int_t lpid2 = trk2->GetID();
559  if((cpid==lpid1)||(cpid==lpid2)||(cnid==lpid1)||(cnid==lpid2)||(cbid==lpid1)||(cbid==lpid2)) continue;
560 
561 
562  Short_t charge_like1 = trk1->Charge();
563  Short_t charge_like2 = trk2->Charge();
564  Bool_t ok_charge = kFALSE;
565  if((charge_casc==-1)&&(charge_like1==1)&&(charge_like2==1)) ok_charge = kTRUE;
566  if((charge_casc==1)&&(charge_like1==-1)&&(charge_like2==-1)) ok_charge = kTRUE;
567  if(!ok_charge) continue;
568 
569  //------------------------------------------------
570  // Roughly select good candidates to speed up
571  //------------------------------------------------
572  if(!fAnalCuts->SelectWithRoughCuts(casc,trk1,trk2)) continue;
573 
574  //------------------------------------------------
575  // Secondary vertex calculation
576  //------------------------------------------------
577  Double_t dispersion;
578  AliAODVertex *secVert = CallReconstructSecondaryVertex(trk1,trk2,dispersion);
579  if(!secVert) continue;
580 
581  AliAODRecoCascadeHF3Prong *xicobj = MakeCascadeHF3Prong(casc,trk1,trk2,aodEvent,secVert,dispersion);
582  if(!xicobj) {
583  delete secVert;
584  continue;
585  }
586  AliAODMCParticle *mcxic = 0;
587  AliAODMCParticle *mcdaughter1 = 0;
588  AliAODMCParticle *mcdaughter2 = 0;
589  AliAODMCParticle *mcdaughterxi = 0;
590  Int_t mclabxic = 0;
591  Int_t nmclabxic = 0;
592  if(fUseMCInfo)
593  {
594  Int_t pdgDg[3]={211,3312,211};
595  Int_t pdgDgcasc[2]={211,3122};
596  Int_t pdgDgv0[2]={2212,211};
597  mclabxic = xicobj->MatchToMC(4232,pdgDg[1],pdgDg,pdgDgcasc,pdgDgv0,mcArray);
598  if(mclabxic>-1){
599  mcxic = (AliAODMCParticle*) mcArray->At(mclabxic);
600  for(Int_t ia=0;ia<20;ia++){
601  if(usedmclab[ia]==mclabxic){
602  nusedmclab[ia]++;
603  nmclabxic = nusedmclab[ia];
604  break;
605  }
606  if(usedmclab[ia]==-9999){
607  usedmclab[ia]=mclabxic;
608  nusedmclab[ia]++;
609  nmclabxic = nusedmclab[ia];
610  break;
611  }
612  }
613 
614  Int_t pi_counter = 0;
615  for(Int_t idau=mcxic->GetFirstDaughter();idau<mcxic->GetLastDaughter()+1;idau++)
616  {
617  //cout<<idau<<endl;
618  if(idau<0) break;
619  AliAODMCParticle *mcpart = (AliAODMCParticle*) mcArray->At(idau);
620  Int_t pdgcode = TMath::Abs(mcpart->GetPdgCode());
621  if(pdgcode==211 && pi_counter==0){
622  mcdaughter1 = mcpart;
623  pi_counter=1;
624  }else if(pdgcode==211 && pi_counter==1){
625  mcdaughter2 = mcpart;
626  pi_counter=2;
627  }else if(pdgcode==3312){
628  mcdaughterxi = mcpart;
629  }
630  }
631  //cout<<"pointer: "<<mcdaughter1<<" "<<mcdaughter2<<" "<<mcdaughterxi<<endl;
632  //cout<<"1: "<<mcdaughter1->GetPdgCode()<<endl;
633  //cout<<"2: "<<mcdaughter2->GetPdgCode()<<endl;
634  //cout<<"3: "<<mcdaughterxi->GetPdgCode()<<endl;
635 
636  }
637  }
638 
639  FillROOTObjects(xicobj,mcxic,mcdaughter1,mcdaughter2,mcdaughterxi,nmclabxic);
640 
641  xicobj->GetSecondaryVtx()->RemoveDaughters();
642  xicobj->UnsetOwnPrimaryVtx();
643  delete xicobj;xicobj=NULL;
644  delete secVert;
645 
646  }//trk2
647  }//trk1
648  }//casc
649 }
650 
651 //________________________________________________________________________
652 void AliAnalysisTaskSEXicPlus2XiPiPifromAODtracks::FillROOTObjects(AliAODRecoCascadeHF3Prong *xicobj, AliAODMCParticle *mcpart, AliAODMCParticle *mcdaughter1, AliAODMCParticle *mcdaughter2, AliAODMCParticle *mcdaughterxi, Int_t mcnused)
653 {
654  //
655  // Fill histogram or Tree depending on fWriteVariableTree flag
656  //
657 
658  AliAODTrack *part1 = xicobj->GetBachelor1();
659  AliAODTrack *part2 = xicobj->GetBachelor2();
660  AliAODcascade *casc = xicobj->GetCascade();
661 
662  fCandidateVariables[ 0] = xicobj->InvMassPiXiPi();
663  fCandidateVariables[ 1] = xicobj->Px();
664  fCandidateVariables[ 2] = xicobj->Py();
665  fCandidateVariables[ 3] = xicobj->Pz();
666  fCandidateVariables[ 4] = part1->Px();
667  fCandidateVariables[ 5] = part1->Py();
668  fCandidateVariables[ 6] = part1->Pz();
669  fCandidateVariables[ 7] = part2->Px();
670  fCandidateVariables[ 8] = part2->Py();
671  fCandidateVariables[ 9] = part2->Pz();
672  fCandidateVariables[10] = casc->MassXi();
673  fCandidateVariables[11] = casc->MomXiX();
674  fCandidateVariables[12] = casc->MomXiY();
675  fCandidateVariables[13] = casc->MomXiZ();
676  fCandidateVariables[14] = casc->MassLambda();
677  fCandidateVariables[15] = casc->MassAntiLambda();
678 
680  fCandidateVariables[17] = fVtx1->GetX();
681  fCandidateVariables[18] = fVtx1->GetY();
682  fCandidateVariables[19] = fVtx1->GetZ();
683  fCandidateVariables[20] = xicobj->GetOwnPrimaryVtx()->GetX();
684  fCandidateVariables[21] = xicobj->GetOwnPrimaryVtx()->GetY();
685  fCandidateVariables[22] = xicobj->GetOwnPrimaryVtx()->GetZ();
686 
687  fCandidateVariables[23] = xicobj->CascDcaXiDaughters();
688  fCandidateVariables[24] = xicobj->CascDcaV0Daughters();
689  fCandidateVariables[25] = xicobj->CascDecayLength();
695  fCandidateVariables[31] = xicobj->CascDecayLengthV0();
697 
698  Double_t dca[3];
699  xicobj->GetDCAs(dca);
700  fCandidateVariables[33] = dca[0];
701  fCandidateVariables[34] = dca[1];
702  fCandidateVariables[35] = dca[2];
703  fCandidateVariables[36] = xicobj->Getd0Prong(0);
704  fCandidateVariables[37] = xicobj->Getd0Prong(2);
705  fCandidateVariables[38] = xicobj->Getd0Prong(1);
706 
707  fCandidateVariables[39] = xicobj->DecayLength();
708  fCandidateVariables[40] = xicobj->DecayLengthXY();
710 
711  Double_t nSigmaTPCpi1=-9999.;
712  Double_t nSigmaTPCpi2=-9999.;
713  Double_t nSigmaTOFpi1=-9999.;
714  Double_t nSigmaTOFpi2=-9999.;
715  Double_t probPion1=-9999.;
716  Double_t probPion2=-9999.;
717 
718  if(fAnalCuts->GetIsUsePID())
719  {
720  nSigmaTPCpi1 = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTPC(part1,AliPID::kPion);
721  fCandidateVariables[42] = nSigmaTPCpi1;
722  nSigmaTPCpi2 = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTPC(part2,AliPID::kPion);
723  fCandidateVariables[43] = nSigmaTPCpi2;
724  nSigmaTOFpi1 = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTOF(part1,AliPID::kPion);
725  fCandidateVariables[44] = nSigmaTOFpi1;
726  nSigmaTOFpi2 = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTOF(part2,AliPID::kPion);
727  fCandidateVariables[45] = nSigmaTOFpi2;
728 
730  probPion1 = fAnalCuts->GetPionProbabilityTPCTOF(part1);
731  probPion2 = fAnalCuts->GetPionProbabilityTPCTOF(part2);
732  }
733  fCandidateVariables[46] = probPion1;
734  fCandidateVariables[47] = probPion2;
735  }
736  fCandidateVariables[48] = -9999;
737  fCandidateVariables[49] = -9999;
738  fCandidateVariables[50] = -9999;
739  fCandidateVariables[51] = -9999;
740  fCandidateVariables[52] = -9999;
741  fCandidateVariables[53] = -9999;
742  fCandidateVariables[54] = -9999;
743  fCandidateVariables[55] = -9999;
744  fCandidateVariables[56] = -9999;
745  fCandidateVariables[57] = -9999;
746  fCandidateVariables[65] = -9999;
747  fCandidateVariables[66] = -9999;
748  fCandidateVariables[67] = -9999;
749  fCandidateVariables[68] = -9999;
750  fCandidateVariables[69] = -9999;
751  fCandidateVariables[70] = -9999;
752  fCandidateVariables[71] = -9999;
753  fCandidateVariables[72] = -9999;
754  fCandidateVariables[73] = -9999;
755  fCandidateVariables[74] = -9999;
756  fCandidateVariables[75] = -9999;
757  fCandidateVariables[76] = -9999;
758 
759  if(fUseMCInfo){
760  if(mcpart){
761  fCandidateVariables[48] = mcpart->Label();
762  fCandidateVariables[49] = mcnused;
763  fCandidateVariables[50] = mcpart->GetPdgCode();
764  fCandidateVariables[54] = mcpart->Pt();
765  if(mcdaughter1&&mcdaughter2&&mcdaughterxi){
766  Double_t mcprimvertx = mcpart->Xv();
767  Double_t mcprimverty = mcpart->Yv();
768  Double_t mcsecvertx = mcdaughter1->Xv();
769  Double_t mcsecverty = mcdaughter1->Yv();
770  Double_t recosecvertx = xicobj->GetSecondaryVtx()->GetX();
771  Double_t recosecverty = xicobj->GetSecondaryVtx()->GetY();
772  fCandidateVariables[51] = TMath::Sqrt((mcsecvertx-mcprimvertx)*(mcsecvertx-mcprimvertx)+(mcsecverty-mcprimverty)*(mcsecverty-mcprimverty));
773  fCandidateVariables[52] = TMath::Sqrt((recosecvertx-mcprimvertx)*(recosecvertx-mcprimvertx)+(recosecverty-mcprimverty)*(recosecverty-mcprimverty));
774  Double_t vecx_vert = recosecvertx-mcprimvertx;
775  Double_t vecy_vert = recosecverty-mcprimverty;
776  Double_t vecl_vert = TMath::Sqrt(vecx_vert*vecx_vert+vecy_vert*vecy_vert);
777  Double_t vecx_mom = xicobj->Px();
778  Double_t vecy_mom = xicobj->Py();
779  Double_t vecl_mom = xicobj->Pt();
780  if(vecl_vert>0.&&vecl_mom>0.)
781  fCandidateVariables[53] = (vecx_vert*vecx_mom+vecy_vert*vecy_mom)/vecl_vert/vecl_mom;
782  fCandidateVariables[55] = mcdaughter1->Pt();
783  fCandidateVariables[56] = mcdaughter2->Pt();
784  fCandidateVariables[57] = mcdaughterxi->Pt();
785  fCandidateVariables[65] = mcpart->Px();
786  fCandidateVariables[66] = mcpart->Py();
787  fCandidateVariables[67] = mcpart->Pz();
788  fCandidateVariables[68] = mcdaughter1->Px();
789  fCandidateVariables[69] = mcdaughter1->Py();
790  fCandidateVariables[70] = mcdaughter1->Pz();
791  fCandidateVariables[71] = mcdaughter2->Px();
792  fCandidateVariables[72] = mcdaughter2->Py();
793  fCandidateVariables[73] = mcdaughter2->Pz();
794  fCandidateVariables[74] = mcdaughterxi->Px();
795  fCandidateVariables[75] = mcdaughterxi->Py();
796  fCandidateVariables[76] = mcdaughterxi->Pz();
797  }
798  }
799  }
800  fCandidateVariables[58] = casc->Px();
801  fCandidateVariables[59] = casc->Py();
802  fCandidateVariables[60] = casc->Pz();
803  fCandidateVariables[61] = -9999.;
804  fCandidateVariables[62] = -9999.;
805  fCandidateVariables[63] = -9999.;
806  if(TMath::Abs(casc->MassLambda()-1.115683)<0.02){
807  fCandidateVariables[61] = casc->MomPosX();
808  fCandidateVariables[62] = casc->MomPosY();
809  fCandidateVariables[63] = casc->MomPosZ();
810  }else{
811  fCandidateVariables[61] = casc->MomNegX();
812  fCandidateVariables[62] = casc->MomNegY();
813  fCandidateVariables[63] = casc->MomNegZ();
814  }
816 
817  fCandidateVariables[77] = casc->DecayVertexV0X();
818  fCandidateVariables[78] = casc->DecayVertexV0Y();
819  fCandidateVariables[79] = casc->DecayVertexV0Z();
820  fCandidateVariables[80] = casc->DecayVertexXiX();
821  fCandidateVariables[81] = casc->DecayVertexXiY();
822  fCandidateVariables[82] = casc->DecayVertexXiZ();
823  fCandidateVariables[83] = xicobj->GetSecondaryVtx()->GetX();
824  fCandidateVariables[84] = xicobj->GetSecondaryVtx()->GetY();
825  fCandidateVariables[85] = xicobj->GetSecondaryVtx()->GetZ();
826 
827  if(fUseMCInfo){
828  }
829 
830 
831 
833  fVariablesTree->Fill();
834  else{
836  {
837  Double_t cont[3];
838  cont[0] = xicobj->InvMassPiXiPi();
839  cont[1] = xicobj->Pt();
840  cont[2] = fCentrality;
841  fHistoXicMass->Fill(cont);
842 
843  fHistoDcaPi1Pi2->Fill(dca[2]);
844  fHistoDcaPiCasc->Fill(dca[0]);
845  fHistoDcaPiCasc->Fill(dca[1]);
846  fHistoLikeDecayLength->Fill(xicobj->DecayLength());
847  fHistoLikeDecayLengthXY->Fill(xicobj->DecayLengthXY());
848  fHistoXicCosPAXY->Fill(xicobj->XicCosPointingAngle());
849  fHistoXiMass->Fill(xicobj->CascMassXi());
857  fHistoXiPt->Fill(xicobj->PtProng(1));
858  fHistoPiPt->Fill(xicobj->PtProng(0));
859  fHistoPiPt->Fill(xicobj->PtProng(2));
860  fHistoPid0->Fill(xicobj->Getd0Prong(0));
861  fHistoPid0->Fill(xicobj->Getd0Prong(2));
862  fHistonSigmaTPCpi->Fill(nSigmaTPCpi1);
863  fHistonSigmaTPCpi->Fill(nSigmaTPCpi2);
864  fHistonSigmaTOFpi->Fill(nSigmaTOFpi1);
865  fHistonSigmaTOFpi->Fill(nSigmaTOFpi2);
866  fHistoProbPion->Fill(probPion1);
867  fHistoProbPion->Fill(probPion2);
868  }
869 
870  }
871  return;
872 }
873 
874 //________________________________________________________________________
876 {
877  //
878  // This is to define tree variables
879  //
880  const char* nameoutput = GetOutputSlot(3)->GetContainer()->GetName();
881  fVariablesTree = new TTree(nameoutput,"Candidates variables tree");
882  Int_t nVar = 86;
884  TString * fCandidateVariableNames = new TString[nVar];
885 
886  fCandidateVariableNames[ 0]="InvMassXic";
887  fCandidateVariableNames[ 1]="XicPx";
888  fCandidateVariableNames[ 2]="XicPy";
889  fCandidateVariableNames[ 3]="XicPz";
890  fCandidateVariableNames[ 4]="Pi1Px";
891  fCandidateVariableNames[ 5]="Pi1Py";
892  fCandidateVariableNames[ 6]="Pi1Pz";
893  fCandidateVariableNames[ 7]="Pi2Px";
894  fCandidateVariableNames[ 8]="Pi2Py";
895  fCandidateVariableNames[ 9]="Pi2Pz";
896  fCandidateVariableNames[10]="MassXi";
897  fCandidateVariableNames[11]="XiPx";
898  fCandidateVariableNames[12]="XiPy";
899  fCandidateVariableNames[13]="XiPz";
900  fCandidateVariableNames[14]="MassLambda";
901  fCandidateVariableNames[15]="MassAntiLambda";
902 
903  fCandidateVariableNames[16]="Centrality";
904  fCandidateVariableNames[17]="PrimVtxX";
905  fCandidateVariableNames[18]="PrimVtxY";
906  fCandidateVariableNames[19]="PrimVtxZ";
907  fCandidateVariableNames[20]="NewPrimVtxX";
908  fCandidateVariableNames[21]="NewPrimVtxY";
909  fCandidateVariableNames[22]="NewPrimVtxZ";
910 
911  fCandidateVariableNames[23]="CascDcaXiDaughters";
912  fCandidateVariableNames[24]="CascDcaV0Daughters";
913  fCandidateVariableNames[25]="CascDecayLengthXi";
914  fCandidateVariableNames[26]="CascCosPointingAngleXi";
915  fCandidateVariableNames[27]="CascDcaV0ToPrimVertex";
916  fCandidateVariableNames[28]="CascDcaPosToPrimVertex";
917  fCandidateVariableNames[29]="CascDcaNegToPrimVertex";
918  fCandidateVariableNames[30]="CascDcaBachToPrimVertex";
919  fCandidateVariableNames[31]="CascDecayLengthV0";
920  fCandidateVariableNames[32]="CascCosPointingAngleV0";
921 
922  fCandidateVariableNames[33]="DcaPi1Casc";
923  fCandidateVariableNames[34]="DcaPi2Casc";
924  fCandidateVariableNames[35]="DcaPi1Pi2";
925 
926  fCandidateVariableNames[36]="Pi1d0";
927  fCandidateVariableNames[37]="Pi2d0";
928  fCandidateVariableNames[38]="Cascd0";
929 
930  fCandidateVariableNames[39]="DecayLength";
931  fCandidateVariableNames[40]="DecayLengthXY";
932  fCandidateVariableNames[41]="XicCosPAXY";
933 
934  fCandidateVariableNames[42]="nSigmaTPCpi1";
935  fCandidateVariableNames[43]="nSigmaTPCpi2";
936  fCandidateVariableNames[44]="nSigmaTOFpi1";
937  fCandidateVariableNames[45]="nSigmaTOFpi2";
938  fCandidateVariableNames[46]="probPion1";
939  fCandidateVariableNames[47]="probPion2";
940 
941  fCandidateVariableNames[48]="mcxicID";
942  fCandidateVariableNames[49]="mcnused";
943  fCandidateVariableNames[50]="mcpdgcode";
944  fCandidateVariableNames[51]="mcdecaylength";
945  fCandidateVariableNames[52]="mcdecaylength_secsmear";
946  fCandidateVariableNames[53]="mcxiccospaxy";
947  fCandidateVariableNames[54]="mcxicpt";
948  fCandidateVariableNames[55]="mcpi1pt";
949  fCandidateVariableNames[56]="mcpi2pt";
950  fCandidateVariableNames[57]="mcxipt";
951 
952  fCandidateVariableNames[58]="LambdaPx";
953  fCandidateVariableNames[59]="LambdaPy";
954  fCandidateVariableNames[60]="LambdaPz";
955  fCandidateVariableNames[61]="ProtonPx";
956  fCandidateVariableNames[62]="ProtonPy";
957  fCandidateVariableNames[63]="ProtonPz";
958  fCandidateVariableNames[64]="BachelorsCosPAXY";
959 
960  fCandidateVariableNames[65]="mcxicpx";
961  fCandidateVariableNames[66]="mcxicpy";
962  fCandidateVariableNames[67]="mcxicpz";
963  fCandidateVariableNames[68]="mcpi1px";
964  fCandidateVariableNames[69]="mcpi1py";
965  fCandidateVariableNames[70]="mcpi1pz";
966  fCandidateVariableNames[71]="mcpi2px";
967  fCandidateVariableNames[72]="mcpi2py";
968  fCandidateVariableNames[73]="mcpi2pz";
969  fCandidateVariableNames[74]="mcxipx";
970  fCandidateVariableNames[75]="mcxipy";
971  fCandidateVariableNames[76]="mcxipz";
972 
973  fCandidateVariableNames[77]="LambdaVertX";
974  fCandidateVariableNames[78]="LambdaVertY";
975  fCandidateVariableNames[79]="LambdaVertZ";
976  fCandidateVariableNames[80]="XiVertX";
977  fCandidateVariableNames[81]="XiVertY";
978  fCandidateVariableNames[82]="XiVertZ";
979  fCandidateVariableNames[83]="XicVertX";
980  fCandidateVariableNames[84]="XicVertY";
981  fCandidateVariableNames[85]="XicVertZ";
982 
983 
984  for (Int_t ivar=0; ivar<nVar; ivar++) {
985  fVariablesTree->Branch(fCandidateVariableNames[ivar].Data(),&fCandidateVariables[ivar],Form("%s/f",fCandidateVariableNames[ivar].Data()));
986  }
987 
988  return;
989 }
990 
991 //__________________________________________________________________________
993  //
994  // This is to define general histograms
995  //
996 
997  fCEvents = new TH1F("fCEvents","conter",18,-0.5,17.5);
998  fCEvents->SetStats(kTRUE);
999  fCEvents->GetXaxis()->SetBinLabel(1,"X1");
1000  fCEvents->GetXaxis()->SetBinLabel(2,"Analyzed events");
1001  fCEvents->GetXaxis()->SetBinLabel(3,"AliAODVertex exists");
1002  fCEvents->GetXaxis()->SetBinLabel(4,"TriggerOK");
1003  fCEvents->GetXaxis()->SetBinLabel(5,"IsEventSelected");
1004  fCEvents->GetXaxis()->SetBinLabel(6,"CascadesHF exists");
1005  fCEvents->GetXaxis()->SetBinLabel(7,"MCarray exists");
1006  fCEvents->GetXaxis()->SetBinLabel(8,"MCheader exists");
1007  fCEvents->GetXaxis()->SetBinLabel(9,"triggerClass!=CINT1");
1008  fCEvents->GetXaxis()->SetBinLabel(10,"triggerMask!=kAnyINT");
1009  fCEvents->GetXaxis()->SetBinLabel(11,"triggerMask!=kAny");
1010  fCEvents->GetXaxis()->SetBinLabel(12,"vtxTitle.Contains(Z)");
1011  fCEvents->GetXaxis()->SetBinLabel(13,"vtxTitle.Contains(3D)");
1012  fCEvents->GetXaxis()->SetBinLabel(14,"vtxTitle.Doesn'tContain(Z-3D)");
1013  fCEvents->GetXaxis()->SetBinLabel(15,Form("zVtx<=%2.0fcm",fAnalCuts->GetMaxVtxZ()));
1014  fCEvents->GetXaxis()->SetBinLabel(16,"!IsEventSelected");
1015  fCEvents->GetXaxis()->SetBinLabel(17,"triggerMask!=kAnyINT || triggerClass!=CINT1");
1016  fCEvents->GetXaxis()->SetBinLabel(18,Form("zVtxMC<=%2.0fcm",fAnalCuts->GetMaxVtxZ()));
1017  //fCEvents->GetXaxis()->SetTitle("");
1018  fCEvents->GetYaxis()->SetTitle("counts");
1019 
1020  fHTrigger = new TH1F("fHTrigger","counter",18,-0.5,17.5);
1021  fHTrigger->SetStats(kTRUE);
1022  fHTrigger->GetXaxis()->SetBinLabel(1,"X1");
1023  fHTrigger->GetXaxis()->SetBinLabel(2,"kMB");
1024  fHTrigger->GetXaxis()->SetBinLabel(3,"kSemiCentral");
1025  fHTrigger->GetXaxis()->SetBinLabel(4,"kCentral");
1026  fHTrigger->GetXaxis()->SetBinLabel(5,"kINT7");
1027  fHTrigger->GetXaxis()->SetBinLabel(6,"kEMC7");
1028  //fHTrigger->GetXaxis()->SetBinLabel(7,"Space");
1029  fHTrigger->GetXaxis()->SetBinLabel(8,"kMB|kSemiCentral|kCentral");
1030  fHTrigger->GetXaxis()->SetBinLabel(9,"kINT7|kEMC7");
1031  fHTrigger->GetXaxis()->SetBinLabel(11,"kMB&kSemiCentral");
1032  fHTrigger->GetXaxis()->SetBinLabel(12,"kMB&kCentral");
1033  fHTrigger->GetXaxis()->SetBinLabel(13,"kINT7&kEMC7");
1034 
1035  fHCentrality = new TH1F("fHCentrality","conter",100,0.,100.);
1036 
1037  Double_t binx[101];
1038  for(Int_t ib=0;ib<101;ib++){
1039  binx[ib] = 1.322-0.05 + 0.1/100.*(Double_t)ib ;
1040  }
1041  Double_t biny[21]={0.0,0.60,0.80,0.90,1.00,1.1,1.2,1.3,1.4,1.5,1.7,1.9,2.2,2.6,3.1,3.9,4.9,6.0,7.2,8.5,10.};
1042  fHistoXiMassvsPtRef = new TH2F("fHistoXiMassvsPtRef","Reference #Xi spectrum",100,binx,20,biny);
1043  fHistoXiMassvsPtRef2 = new TH2F("fHistoXiMassvsPtRef2","Reference #Xi spectrum",100,binx,20,biny);
1044  fHistoXiMassvsPtRef3 = new TH2F("fHistoXiMassvsPtRef3","Reference #Xi spectrum",100,binx,20,biny);
1045  fHistoXiMassvsPtRef4 = new TH2F("fHistoXiMassvsPtRef4","Reference #Xi spectrum",100,binx,20,biny);
1046  fHistoXiMassvsPtRef5 = new TH2F("fHistoXiMassvsPtRef5","Reference #Xi spectrum",100,binx,20,biny);
1047  fHistoXiMassvsPtRef6 = new TH2F("fHistoXiMassvsPtRef6","Reference #Xi spectrum",100,binx,20,biny);
1048  fHistoPiPtRef = new TH1F("fHistoPiPtRef","Reference #pi spectrum",20,0.,10.);
1049 
1050  fOutput->Add(fCEvents);
1051  fOutput->Add(fHTrigger);
1052  fOutput->Add(fHCentrality);
1059  fOutput->Add(fHistoPiPtRef);
1060 
1061  return;
1062 }
1063 
1064 //__________________________________________________________________________
1066 {
1067  //
1068  // Define histograms
1069  //
1070 
1071  //------------------------------------------------
1072  // Basic histograms
1073  //------------------------------------------------
1074  Int_t bins_base[3]= {80 ,20 ,10};
1075  Double_t xmin_base[3]={2.468-0.2,0 ,0.00};
1076  Double_t xmax_base[3]={2.468+0.2,20. ,100};
1077  fHistoXicMass = new THnSparseF("fHistoXicMass","",3,bins_base,xmin_base,xmax_base);
1078  fOutputAll->Add(fHistoXicMass);
1079 
1080  //------------------------------------------------
1081  // Checking histograms
1082  //------------------------------------------------
1083  fHistoDcaPi1Pi2 = new TH1F("fHistoDcaPi1Pi2","DCA (#pi_{1}-#pi_{2})",100,0.0,1.0);
1085  fHistoDcaPiCasc = new TH1F("fHistoDcaPiCasc","DCA (#pi-#Xi)",100,0.0,1.0);
1087  fHistoLikeDecayLength = new TH1F("fHistoLikeDecayLength","Decay Length (#pi-#pi)",100,0.,0.2);
1089  fHistoLikeDecayLengthXY = new TH1F("fHistoLikeDecayLengthXY","Decay Length (#pi-#pi)",100,0.,0.2);
1091  fHistoXicCosPAXY = new TH1F("fHistoXicCosPAXY","#Xi_{c} cos(pa) ",100,-1.0,1.0);
1093  fHistoXiMass=new TH1F("fHistoXiMass","#Xi^{-} Mass",100,1.322-0.05,1.322+0.05);
1094  fOutputAll->Add(fHistoXiMass);
1095  fHistoCascDcaXiDaughters=new TH1F("fHistoCascDcaXiDaughters","DCA #Xi daughters ",100,0.0,1.0);
1097  fHistoCascDcaV0Daughters=new TH1F("fHistoCascDcaV0Daughters","DCA #Xi daughters ",100,0.0,1.0);
1099  fHistoCascDcaV0ToPrimVertex=new TH1F("fHistoCascDcaV0ToPrimVertex","DCA V0 daughters ",100,0.0,1.0);
1101  fHistoCascDcaPosToPrimVertex=new TH1F("fHistoCascDcaPosToPrimVertex","DCA Pos-Prim ",100,0.0,1.0);
1103  fHistoCascDcaNegToPrimVertex=new TH1F("fHistoCascDcaNegToPrimVertex","DCA Neg-Prim ",100,0.0,1.0);
1105  fHistoCascDcaBachToPrimVertex=new TH1F("fHistoCascDcaBachToPrimVertex","DCA Bach-Prim ",100,0.0,1.0);
1107  fHistoCascCosPAXiPrim=new TH1F("fHistoCascCosPAXiPrim","#Xi CosPA (prim)",100,0.8,1.0);
1109  fHistoXiPt=new TH1F("fHistoXiPt","#Xi^{-} p_{T}",100,0.,10.);
1110  fOutputAll->Add(fHistoXiPt);
1111  fHistoPiPt=new TH1F("fHistoPiPt","#pi p_{T}",100,0.,10);
1112  fOutputAll->Add(fHistoPiPt);
1113  fHistoPid0=new TH1F("fHistoPid0","#pi d_{0}",100,-0.1,0.1);
1114  fOutputAll->Add(fHistoPid0);
1115  fHistonSigmaTPCpi=new TH1F("fHistonSigmaTPCpi","n#sigma (TPC, pion)",100,-10.,10.);
1117  fHistonSigmaTOFpi=new TH1F("fHistonSigmaTOFpi","n#sigma (TOF, pion)",100,-10.,10.);
1119  fHistoProbPion=new TH1F("fHistoProbPion","Bayse Prob",100,0.0,1.);
1120  fOutputAll->Add(fHistoProbPion);
1121 
1122  return;
1123 }
1124 
1125 //________________________________________________________________________
1126 void AliAnalysisTaskSEXicPlus2XiPiPifromAODtracks::SelectTrack( const AliVEvent *event, Int_t trkEntries, Int_t &nSeleTrks,Bool_t *seleFlags)
1127 {
1128  //
1129  // Select good tracks using fAnalCuts (AliRDHFCuts object) and return the array of their ids
1130  //
1131 
1132  //const Int_t entries = event->GetNumberOfTracks();
1133  if(trkEntries==0) return;
1134 
1135  nSeleTrks=0;
1136  for(Int_t i=0; i<trkEntries; i++) {
1137  seleFlags[i] = kFALSE;
1138 
1139  AliVTrack *track;
1140  track = (AliVTrack*)event->GetTrack(i);
1141 
1142  if(track->GetID()<0) continue;
1143  Double_t covtest[21];
1144  if(!track->GetCovarianceXYZPxPyPz(covtest)) continue;
1145 
1146  AliAODTrack *aodt = (AliAODTrack*)track;
1147 
1148  if(!fAnalCuts) continue;
1149  if(fAnalCuts->SingleTrkCuts(aodt)){
1150  seleFlags[i]=kTRUE;
1151  nSeleTrks++;
1152  fHistoPiPtRef->Fill(aodt->Pt());
1153  }
1154  } // end loop on tracks
1155 }
1156 
1157 //________________________________________________________________________
1158 void AliAnalysisTaskSEXicPlus2XiPiPifromAODtracks::SelectCascade( const AliVEvent *event,Int_t nCascades,Int_t &nSeleCasc, Bool_t *seleCascFlags)
1159 {
1160  //
1161  // Select good cascade using fAnalCuts (AliRDHFCuts object) and return the array of their ids
1162  //
1163 
1164  Double_t primVtx[3];
1165  fVtx1->GetXYZ(primVtx);
1166 
1167  nSeleCasc = 0;
1168  for(Int_t icasc=0;icasc<nCascades;icasc++)
1169  {
1170  seleCascFlags[icasc] = kFALSE;
1171  AliAODcascade *casc = ((AliAODEvent*)event)->GetCascade(icasc);
1172 
1173  if(!fAnalCuts) continue;
1174  if(fAnalCuts->SingleCascadeCuts(casc,primVtx)){
1175  seleCascFlags[icasc] = kTRUE;
1176  nSeleCasc++;
1177  }
1178  if(fAnalCuts->SingleCascadeCutsRef(casc,primVtx))
1179  {
1180  Double_t rapxi = casc->RapXi();
1181  if(rapxi>-1.5&&rapxi<-1.0){
1182  fHistoXiMassvsPtRef2->Fill(casc->MassXi(),sqrt(pow(casc->MomXiX(),2)+pow(casc->MomXiY(),2)));
1183  }
1184  if(rapxi>-1.0&&rapxi<-0.5){
1185  fHistoXiMassvsPtRef3->Fill(casc->MassXi(),sqrt(pow(casc->MomXiX(),2)+pow(casc->MomXiY(),2)));
1186  }
1187  if(rapxi>-0.5&&rapxi<0.0){
1188  fHistoXiMassvsPtRef->Fill(casc->MassXi(),sqrt(pow(casc->MomXiX(),2)+pow(casc->MomXiY(),2)));
1189  }
1190  if(rapxi>0.0&&rapxi<0.5){
1191  fHistoXiMassvsPtRef4->Fill(casc->MassXi(),sqrt(pow(casc->MomXiX(),2)+pow(casc->MomXiY(),2)));
1192  }
1193  if(rapxi>0.5&&rapxi<1.0){
1194  fHistoXiMassvsPtRef5->Fill(casc->MassXi(),sqrt(pow(casc->MomXiX(),2)+pow(casc->MomXiY(),2)));
1195  }
1196  if(rapxi>1.0&&rapxi<1.5){
1197  fHistoXiMassvsPtRef6->Fill(casc->MassXi(),sqrt(pow(casc->MomXiX(),2)+pow(casc->MomXiY(),2)));
1198  }
1199  }
1200  }
1201 }
1202 
1203 //________________________________________________________________________
1205 {
1206  //
1207  // Select LikeSign tracks
1208  //
1209 
1210  if(trk1->Charge()!=trk2->Charge()) return kFALSE;
1211  if(trk1->GetID()==trk2->GetID()) return kFALSE;
1212  return kTRUE;
1213 }
1214 
1215 //________________________________________________________________________
1216 AliAODVertex* AliAnalysisTaskSEXicPlus2XiPiPifromAODtracks::CallPrimaryVertex(AliAODcascade *casc, AliAODTrack *trk1, AliAODTrack *trk2, AliAODEvent* aod)
1217 {
1218  //
1219  // Make an array of tracks which should not be used in primary vertex calculation and
1220  // Call PrimaryVertex function
1221  //
1222 
1223  TObjArray *twoTrackArrayPlusXi = new TObjArray(5);
1224 
1225  AliESDtrack *cptrk1 = new AliESDtrack((AliVTrack*)trk1);
1226  twoTrackArrayPlusXi->AddAt(cptrk1,0);
1227  AliESDtrack *cptrk2 = new AliESDtrack((AliVTrack*)trk2);
1228  twoTrackArrayPlusXi->AddAt(cptrk2,1);
1229 
1230  AliESDtrack *cascptrack = new AliESDtrack((AliVTrack*)casc->GetDaughter(0));
1231  twoTrackArrayPlusXi->AddAt(cascptrack,2);
1232  AliESDtrack *cascntrack = new AliESDtrack((AliVTrack*)casc->GetDaughter(1));
1233  twoTrackArrayPlusXi->AddAt(cascntrack,3);
1234  AliESDtrack *cascbtrack = new AliESDtrack((AliVTrack*)casc->GetDecayVertexXi()->GetDaughter(0));
1235  twoTrackArrayPlusXi->AddAt(cascbtrack,4);
1236 
1237  AliAODVertex *newvert = PrimaryVertex(twoTrackArrayPlusXi,aod);
1238 
1239  for(Int_t i=0;i<5;i++)
1240  {
1241  AliESDtrack *tesd = (AliESDtrack*)twoTrackArrayPlusXi->UncheckedAt(i);
1242  delete tesd;
1243  }
1244  twoTrackArrayPlusXi->Clear();
1245  delete twoTrackArrayPlusXi;
1246 
1247  return newvert;
1248 }
1249 
1250 //________________________________________________________________________
1251 AliAODVertex* AliAnalysisTaskSEXicPlus2XiPiPifromAODtracks::CallReconstructSecondaryVertex(AliAODTrack *trk1, AliAODTrack *trk2, Double_t &dispersion)
1252 {
1253  //
1254  // Make an array of tracks which I want to use for vertex calculation and call ReconstructSecondaryVertex
1255  //
1256 
1257  TObjArray *trkArray;
1258  trkArray= new TObjArray(2);
1259 
1260  AliESDtrack *cptrk1 = new AliESDtrack((AliVTrack*)trk1);
1261  trkArray->AddAt(cptrk1,0);
1262  AliESDtrack *cptrk2 = new AliESDtrack((AliVTrack*)trk2);
1263  trkArray->AddAt(cptrk2,1);
1264 
1265  Double_t xdummy, ydummy;
1266  Double_t dcap1p2 = cptrk1->GetDCA(cptrk2,fBzkG,xdummy,ydummy);
1267 
1268  AliAODVertex *secvertex=0;
1269  if(dcap1p2<fAnalCuts->GetProdLikeSignDcaMax()){
1270  secvertex = ReconstructSecondaryVertex(trkArray,dispersion);
1271  }
1272 
1273  for(Int_t i=0;i<2;i++)
1274  {
1275  AliESDtrack *tesd = (AliESDtrack*)trkArray->UncheckedAt(i);
1276  delete tesd;
1277  }
1278  trkArray->Clear();
1279  delete trkArray;
1280 
1281  return secvertex;
1282 }
1283 
1284 //________________________________________________________________________
1286  AliVEvent *event)
1287 {
1288  //
1289  //Used only for pp
1290  //copied from AliAnalysisVertexingHF (except for the following 3 lines)
1291  //
1292 
1293  Bool_t fRecoPrimVtxSkippingTrks = kTRUE;
1294  Bool_t fRmTrksFromPrimVtx = kFALSE;
1295 
1296  AliESDVertex *vertexESD = 0;
1297  AliAODVertex *vertexAOD = 0;
1298 
1299  //vertexESD = new AliESDVertex(*fV1);
1300 
1301 
1302  if(!fRecoPrimVtxSkippingTrks && !fRmTrksFromPrimVtx) {
1303  // primary vertex from the input event
1304 
1305  vertexESD = new AliESDVertex(*fV1);
1306 
1307  } else {
1308  // primary vertex specific to this candidate
1309 
1310  Int_t nTrks = trkArray->GetEntriesFast();
1311  AliVertexerTracks *vertexer = new AliVertexerTracks(event->GetMagneticField());
1312 
1313  if(fRecoPrimVtxSkippingTrks) {
1314  // recalculating the vertex
1315 
1316  if(strstr(fV1->GetTitle(),"VertexerTracksWithConstraint")) {
1317  Float_t diamondcovxy[3];
1318  event->GetDiamondCovXY(diamondcovxy);
1319  Double_t pos[3]={event->GetDiamondX(),event->GetDiamondY(),0.};
1320  Double_t cov[6]={diamondcovxy[0],diamondcovxy[1],diamondcovxy[2],0.,0.,10.*10.};
1321  AliESDVertex *diamond = new AliESDVertex(pos,cov,1.,1);
1322  vertexer->SetVtxStart(diamond);
1323  delete diamond; diamond=NULL;
1324  if(strstr(fV1->GetTitle(),"VertexerTracksWithConstraintOnlyFitter"))
1325  vertexer->SetOnlyFitter();
1326  }
1327  Int_t skipped[1000];
1328  Int_t nTrksToSkip=0,id;
1329  AliExternalTrackParam *t = 0;
1330  for(Int_t i=0; i<nTrks; i++) {
1331  t = (AliExternalTrackParam*)trkArray->UncheckedAt(i);
1332  id = (Int_t)t->GetID();
1333  if(id<0) continue;
1334  skipped[nTrksToSkip++] = id;
1335  }
1336  // TEMPORARY FIX
1337  // For AOD, skip also tracks without covariance matrix
1338  Double_t covtest[21];
1339  for(Int_t j=0; j<event->GetNumberOfTracks(); j++) {
1340  AliVTrack *vtrack = (AliVTrack*)event->GetTrack(j);
1341  if(!vtrack->GetCovarianceXYZPxPyPz(covtest)) {
1342  id = (Int_t)vtrack->GetID();
1343  if(id<0) continue;
1344  skipped[nTrksToSkip++] = id;
1345  }
1346  }
1347  for(Int_t ijk=nTrksToSkip; ijk<1000; ijk++) skipped[ijk]=-1;
1348  //
1349  vertexer->SetSkipTracks(nTrksToSkip,skipped);
1350  vertexESD = (AliESDVertex*)vertexer->FindPrimaryVertex(event);
1351 
1352  } else if(fRmTrksFromPrimVtx && nTrks>0) {
1353  // removing the prongs tracks
1354 
1355  TObjArray rmArray(nTrks);
1356  UShort_t *rmId = new UShort_t[nTrks];
1357  AliESDtrack *esdTrack = 0;
1358  AliESDtrack *t = 0;
1359  for(Int_t i=0; i<nTrks; i++) {
1360  t = (AliESDtrack*)trkArray->UncheckedAt(i);
1361  esdTrack = new AliESDtrack(*t);
1362  rmArray.AddLast(esdTrack);
1363  if(esdTrack->GetID()>=0) {
1364  rmId[i]=(UShort_t)esdTrack->GetID();
1365  } else {
1366  rmId[i]=9999;
1367  }
1368  }
1369  Float_t diamondxy[2]={static_cast<Float_t>(event->GetDiamondX()),static_cast<Float_t>(event->GetDiamondY())};
1370  vertexESD = vertexer->RemoveTracksFromVertex(fV1,&rmArray,rmId,diamondxy);
1371  delete [] rmId; rmId=NULL;
1372  rmArray.Delete();
1373 
1374  }
1375 
1376  delete vertexer; vertexer=NULL;
1377  if(!vertexESD) return vertexAOD;
1378  if(vertexESD->GetNContributors()<=0) {
1379  //AliDebug(2,"vertexing failed");
1380  delete vertexESD; vertexESD=NULL;
1381  return vertexAOD;
1382  }
1383 
1384 
1385  }
1386 
1387  // convert to AliAODVertex
1388  Double_t pos[3],cov[6],chi2perNDF;
1389  vertexESD->GetXYZ(pos); // position
1390  vertexESD->GetCovMatrix(cov); //covariance matrix
1391  chi2perNDF = vertexESD->GetChi2toNDF();
1392  delete vertexESD; vertexESD=NULL;
1393 
1394  vertexAOD = new AliAODVertex(pos,cov,chi2perNDF);
1395 
1396  return vertexAOD;
1397 }
1398 
1399 //________________________________________________________________________
1401 {
1402  //
1403  // Reconstruct secondary vertex from trkArray (Copied from AliAnalysisVertexingHF)
1404  //
1405 
1406  AliESDVertex *vertexESD = 0;
1407  AliAODVertex *vertexAOD = 0;
1408 
1409  AliVertexerTracks *fVertexerTracks = new AliVertexerTracks(fBzkG);
1410 
1411  fVertexerTracks->SetVtxStart(fV1);
1412  vertexESD = (AliESDVertex*)fVertexerTracks->VertexForSelectedESDTracks(trkArray);
1413 
1414  delete fVertexerTracks; fVertexerTracks=NULL;
1415 
1416  if(!vertexESD) return vertexAOD;
1417 
1418  if(vertexESD->GetNContributors()!=trkArray->GetEntriesFast()) {
1419  //AliDebug(2,"vertexing failed");
1420  delete vertexESD; vertexESD=NULL;
1421  return vertexAOD;
1422  }
1423 
1424  Double_t vertRadius2=vertexESD->GetX()*vertexESD->GetX()+vertexESD->GetY()*vertexESD->GetY();
1425  if(vertRadius2>8.){
1426  // vertex outside beam pipe, reject candidate to avoid propagation through material
1427  delete vertexESD; vertexESD=NULL;
1428  return vertexAOD;
1429  }
1430 
1431 
1432  // convert to AliAODVertex
1433  Double_t pos[3],cov[6],chi2perNDF;
1434  vertexESD->GetXYZ(pos); // position
1435  vertexESD->GetCovMatrix(cov); //covariance matrix
1436  chi2perNDF = vertexESD->GetChi2toNDF();
1437  dispersion = vertexESD->GetDispersion();
1438  delete vertexESD; vertexESD=NULL;
1439 
1440  Int_t nprongs= (useTRefArray ? 0 : trkArray->GetEntriesFast());
1441  vertexAOD = new AliAODVertex(pos,cov,chi2perNDF,0x0,-1,AliAODVertex::kUndef,nprongs);
1442 
1443  return vertexAOD;
1444 }
1445 
1446 //________________________________________________________________________
1447 AliAODRecoCascadeHF3Prong* AliAnalysisTaskSEXicPlus2XiPiPifromAODtracks::MakeCascadeHF3Prong(AliAODcascade *casc, AliAODTrack *part1, AliAODTrack *part2, AliAODEvent * aod, AliAODVertex *secVert, Double_t dispersion)
1448 {
1449  //
1450  // Make AliAODRecoCascadeHF3Prong object from the arguments
1451  //
1452 
1453  //------------------------------------------------
1454  // PrimaryVertex
1455  //------------------------------------------------
1456  AliAODVertex *primVertexAOD;
1457  Bool_t unsetvtx = kFALSE;
1459  primVertexAOD = CallPrimaryVertex(casc,part1,part2,aod);
1460  if(!primVertexAOD){
1461  primVertexAOD = fVtx1;
1462  }else{
1463  unsetvtx = kTRUE;
1464  }
1465  }else{
1466  primVertexAOD = fVtx1;
1467  }
1468  if(!primVertexAOD) return 0x0;
1469  Double_t pos[3]; primVertexAOD->GetXYZ(pos);
1470 
1471 
1472  //------------------------------------------------
1473  // DCA between tracks
1474  //------------------------------------------------
1475  AliESDtrack *esdtrack1 = new AliESDtrack((AliVTrack*)part1);
1476  AliESDtrack *esdtrack2 = new AliESDtrack((AliVTrack*)part2);
1477  Double_t xyz[3], pxpypz[3], cv[21]; Short_t sign;
1478  xyz[0]=casc->DecayVertexXiX();
1479  xyz[1]=casc->DecayVertexXiY();
1480  xyz[2]=casc->DecayVertexXiZ();
1481  pxpypz[0]=casc->MomXiX();
1482  pxpypz[1]=casc->MomXiY();
1483  pxpypz[2]=casc->MomXiZ();
1484  casc->GetCovarianceXYZPxPyPz(cv);
1485  sign=casc->ChargeXi();
1486  AliExternalTrackParam *trackCasc = new AliExternalTrackParam(xyz,pxpypz,cv,sign);
1487 
1488  Double_t xdummy, ydummy;
1489  Double_t dcap1p2 = esdtrack1->GetDCA(esdtrack2,fBzkG,xdummy,ydummy);
1490  Double_t dcap1casc = esdtrack1->GetDCA(trackCasc,fBzkG,xdummy,ydummy);
1491  Double_t dcap2casc = esdtrack2->GetDCA(trackCasc,fBzkG,xdummy,ydummy);
1492  Double_t dca[3]={dcap1casc,dcap2casc,dcap1p2};
1493 
1494  //------------------------------------------------
1495  // Propagate all tracks to the secondary vertex and calculate momentum there
1496  //------------------------------------------------
1497 
1498  Double_t d0z0[2],covd0z0[3];
1499  Double_t secR = TMath::Sqrt(secVert->GetX()*secVert->GetX()+secVert->GetY()*secVert->GetY());
1500  if(secR<1.0){
1501  part1->PropagateToDCA(secVert,fBzkG,kVeryBig,d0z0,covd0z0);
1502  part2->PropagateToDCA(secVert,fBzkG,kVeryBig,d0z0,covd0z0);
1503  trackCasc->PropagateToDCA(secVert,fBzkG,kVeryBig);
1504  }else{
1505  part1->PropagateToDCA(primVertexAOD,fBzkG,kVeryBig,d0z0,covd0z0);
1506  part2->PropagateToDCA(primVertexAOD,fBzkG,kVeryBig,d0z0,covd0z0);
1507  trackCasc->PropagateToDCA(primVertexAOD,fBzkG,kVeryBig);
1508  }
1509 
1510  Double_t momxi_new[3]={-9999,-9999,-9999.};
1511  trackCasc->GetPxPyPz(momxi_new);
1512 
1513  Double_t px[3],py[3],pz[3];
1514  px[0] = part1->Px(); py[0] = part1->Py(); pz[0] = part1->Pz();
1515  px[1] = momxi_new[0]; py[1] = momxi_new[1]; pz[1] = momxi_new[2];
1516  px[2] = part2->Px(); py[2] = part2->Py(); pz[2] = part2->Pz();
1517 
1518  //------------------------------------------------
1519  // d0
1520  //------------------------------------------------
1521  Double_t d0[3],d0err[3];
1522  part1->PropagateToDCA(primVertexAOD,fBzkG,kVeryBig,d0z0,covd0z0);
1523  d0[0]= d0z0[0];
1524  d0err[0] = TMath::Sqrt(covd0z0[0]);
1525 
1526  trackCasc->PropagateToDCA(primVertexAOD,fBzkG,kVeryBig,d0z0,covd0z0);
1527  d0[1]= d0z0[0];
1528  d0err[1] = TMath::Sqrt(covd0z0[0]);//Do not know what to use
1529 
1530  part2->PropagateToDCA(primVertexAOD,fBzkG,kVeryBig,d0z0,covd0z0);
1531  d0[2]= d0z0[0];
1532  d0err[2] = TMath::Sqrt(covd0z0[0]);
1533 
1534 
1535  //------------------------------------------------
1536  // Other stuff
1537  //------------------------------------------------
1538  Double_t dist12=0.0;//Vertex pi-casc not calculated
1539  Double_t dist23=0.0;//Vertex pi-casc not calculated
1540  Short_t charge=(Short_t)(part1->Charge()+trackCasc->Charge()+part2->Charge());
1541 
1542  //------------------------------------------------
1543  // Create AliAODRecoCascadeHF3Prong
1544  //------------------------------------------------
1545  AliAODRecoCascadeHF3Prong *theCascade = new AliAODRecoCascadeHF3Prong(secVert,charge,px,py,pz,d0,d0err,dca,dispersion,dist12,dist23);
1546  if(!theCascade)
1547  {
1548  if(unsetvtx) delete primVertexAOD; primVertexAOD=NULL;
1549  if(esdtrack1) delete esdtrack1;
1550  if(esdtrack2) delete esdtrack2;
1551  if(trackCasc) delete trackCasc;
1552  return 0x0;
1553  }
1554  theCascade->SetOwnPrimaryVtx(primVertexAOD);
1555  UShort_t id[3]={(UShort_t)part1->GetID(),(UShort_t)trackCasc->GetID(),(UShort_t)part2->GetID()};
1556  theCascade->SetProngIDs(3,id);
1557 
1558  theCascade->GetSecondaryVtx()->AddDaughter(part1);
1559  theCascade->GetSecondaryVtx()->AddDaughter(casc);
1560  theCascade->GetSecondaryVtx()->AddDaughter(part2);
1561 
1562  if(unsetvtx) delete primVertexAOD; primVertexAOD=NULL;
1563  if(esdtrack1) delete esdtrack1;
1564  if(esdtrack2) delete esdtrack2;
1565  if(trackCasc) delete trackCasc;
1566 
1567  return theCascade;
1568 }
Int_t charge
Double_t InvMassPiXiPi() const
Xic invariant mass.
AliAODTrack * GetBachelor2() const
double Double_t
Definition: External.C:58
Bool_t SingleCascadeCutsRef(AliAODcascade *casc, Double_t *vert)
AliAODVertex * PrimaryVertex(const TObjArray *trkArray, AliVEvent *event)
void SelectTrack(const AliVEvent *event, Int_t trkEntries, Int_t &nSeleTrks, Bool_t *seleFlags)
Definition: External.C:236
Bool_t GetUseCombined()
Definition: AliAODPidHF.h:165
char Char_t
Definition: External.C:18
AliAODVertex * CallReconstructSecondaryVertex(AliAODTrack *trk1, AliAODTrack *trk2, Double_t &disp)
TList * fOutputAll
! User output slot 3 // Analysis histos
void SelectCascade(const AliVEvent *event, Int_t nCascades, Int_t &nSeleCasc, Bool_t *seleCascFlags)
AliAODcascade * GetCascade() const
Double_t GetMaxVtxZ() const
Definition: AliRDHFCuts.h:247
AliAODPidHF * GetPidHF() const
Definition: AliRDHFCuts.h:237
Bool_t fIsMB
Reconstruct primary vertex excluding candidate tracks.
AliAODVertex * ReconstructSecondaryVertex(TObjArray *trkArray, Double_t &dispersion, Bool_t useTRefArray=kTRUE)
virtual void UserCreateOutputObjects()
Implementation of interface methods.
int Int_t
Definition: External.C:63
float Float_t
Definition: External.C:68
virtual Int_t IsSelected(TObject *obj, Int_t selectionLevel)
AliAODTrack * GetBachelor1() const
AliAODVertex * GetOwnPrimaryVtx() const
AliAODVertex * CallPrimaryVertex(AliAODcascade *casc, AliAODTrack *trk1, AliAODTrack *trk2, AliAODEvent *evt)
void SetProngIDs(Int_t nIDs, UShort_t *id)
TH1F * fHistoCascDcaPosToPrimVertex
! DCA of positive track to primary vertex
AliPIDResponse * GetPidResponse() const
Definition: AliAODPidHF.h:160
void GetDCAs(Double_t dca[3]) const
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
short Short_t
Definition: External.C:23
void SetOwnPrimaryVtx(const AliAODVertex *vtx)
Double_t DecayLengthXY() const
TH1F * fHistoCascDcaBachToPrimVertex
! DCA of bachelor track to primary vertex
AliAODRecoCascadeHF3Prong * MakeCascadeHF3Prong(AliAODcascade *casc, AliAODTrack *trk1, AliAODTrack *trk2, AliAODEvent *aod, AliAODVertex *secvert, Double_t dispersion)
Bool_t SingleCascadeCuts(AliAODcascade *casc, Double_t *vert)
AliRDHFCutsXicPlustoXiPiPifromAODtracks * fAnalCuts
histogram to check centrality
Bool_t IsEventSelected(AliVEvent *event)
Int_t MatchToMC(Int_t pdgabs, Int_t pdgabscasc, Int_t *pdgDg, Int_t *pdgDgcasc, Int_t *pdgDgv0, TClonesArray *mcArray) const
const Int_t nVar
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
void FillROOTObjects(AliAODRecoCascadeHF3Prong *xicobj, AliAODMCParticle *mcpart, AliAODMCParticle *mcdau1, AliAODMCParticle *mcdau2, AliAODMCParticle *mcdauxi, Int_t mcnused)
TH1F * fHistoCascCosPAXiPrim
! Cosine pointing angle of Xi to primary vertex
unsigned short UShort_t
Definition: External.C:28
Bool_t GetIsUsePID() const
Definition: AliRDHFCuts.h:260
const char Option_t
Definition: External.C:48
Bool_t IsEventRejectedDueToTrigger() const
Definition: AliRDHFCuts.h:306
bool Bool_t
Definition: External.C:53
TH1F * fHistoCascDcaNegToPrimVertex
! DCA of negative track to primary vertex
Double_t DecayLength() const
TTree * fVariablesTree
flag to decide whether to write the candidate variables on a tree variables