]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliESDpid.cxx
Example for vertex finder starting from reconstructed tracks
[u/mrichter/AliRoot.git] / STEER / AliESDpid.cxx
CommitLineData
8c6a71ab 1/**************************************************************************
2 * Copyright(c) 1998-1999, 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// Implementation of the combined PID class
18//
19// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
20//-----------------------------------------------------------------
21
22#include "AliESDpid.h"
23#include "AliESD.h"
24#include "AliESDtrack.h"
25
26ClassImp(AliESDpid)
27
28//_________________________________________________________________________
29Int_t AliESDpid::MakePID(AliESD *event)
30{
31 Int_t ntrk=event->GetNumberOfTracks();
32 for (Int_t i=0; i<ntrk; i++) {
33 Int_t ns=AliESDtrack::kSPECIES;
34 Double_t p[10]={1.,1.,1.,1.,1.,1.,1.,1.,1.,1.};
35
36 AliESDtrack *t=event->GetTrack(i);
37
38 if ((t->GetStatus()&AliESDtrack::kITSpid )!=0) {
39 Double_t d[10];
40 t->GetITSpid(d);
41 for (Int_t j=0; j<ns; j++) p[j]*=d[j];
42 }
43
44 if ((t->GetStatus()&AliESDtrack::kTPCpid )!=0) {
45 Double_t d[10];
46 t->GetTPCpid(d);
47 for (Int_t j=0; j<ns; j++) p[j]*=d[j];
48 }
49
c630aafd 50 if ((t->GetStatus()&AliESDtrack::kTRDpid )!=0) {
51 Double_t d[10];
52 t->GetTRDpid(d);
53 for (Int_t j=0; j<ns; j++) p[j]*=d[j];
54 }
55
56 if ((t->GetStatus()&AliESDtrack::kTOFpid )!=0) {
57 Double_t d[10];
58 t->GetTOFpid(d);
59 for (Int_t j=0; j<ns; j++) p[j]*=d[j];
60 }
61
8c6a71ab 62 t->SetESDpid(p);
63 }
64 return 0;
65}