1 //***This macro shows a track pointed by its index in the kinematics data base.
2 //***Use this macro only after starting a display.C macro !
3 void ShowTrack(int idx) {
4 AliTPC *TPC=(AliTPC*)gAlice->GetDetector("TPC");
5 TClonesArray *points=TPC->Points();
6 int ntracks=points->GetEntriesFast();
8 for (int track=0;track<ntracks;track++) {
9 AliPoints *pm = (AliPoints*)points->UncheckedAt(track);
11 if (idx == pm->GetIndex()) {
12 pm->SetMarkerColor(2);
13 pm->SetMarkerStyle(22);
21 TPad *pp=(TPad*)gROOT->FindObject("viewpad");
25 TClonesArray *particles=gAlice->Particles();
26 GParticle *p = (GParticle*)particles->UncheckedAt(idx);
27 cout<<"Paritcle ID "<<p->GetKF()<<endl;
28 cout<<"Parent "<<p->GetParent()<<endl;
29 cout<<"First child "<<p->GetFirstChild()<<endl;
30 cout<<"Px,Py,Pz "<<p->GetPx()<<' '<<p->GetPy()<<' '<<p->GetPz()<<endl;
32 cerr<<"OK ? "; char c[100]; cin.getline(c,100);
33 if (tolower(c[0])!='y') return;
35 trk->SetMarkerColor(5);
36 trk->SetMarkerStyle(1);