Put black-listed classes out of Alieve namespace.
[u/mrichter/AliRoot.git] / EVE / alice-macros / esd_spd_tracklets.C
CommitLineData
c46fd838 1// To use when per-line id is supported
2class TrackletId : public TObject
3{
4public:
5 // label, phi, theta
6 // virtual void Print(const Option_t* opt="") {}
7};
8
84aff7a4 9TEveStraightLineSet* esd_spd_tracklets(Float_t rad=8)
c46fd838 10{
22aefef8 11 AliESDEvent * esd = Alieve::Event::AssertESD();
c46fd838 12 AliESDVertex * pv = esd->GetPrimaryVertex();
13 AliMultiplicity* mul = esd->GetMultiplicity();
14
15 Double_t pvx[3], pve[3];
16 pv->GetXYZ(pvx);
17 pv->GetSigmaXYZ(pve);
18
84aff7a4 19 TEveStraightLineSet* ls = new TEveStraightLineSet();
c46fd838 20
21 for (Int_t i=0; i<mul->GetNumberOfTracklets(); ++i)
22 {
23 using namespace TMath;
24 Float_t dr[3];
723492dc 25 Float_t phi = PiOver2() - mul->GetPhi(i); // strange people
26 dr[0] = rad*Cos(phi);
27 dr[1] = rad*Sin(phi);
c46fd838 28 dr[2] = rad/Tan(mul->GetTheta(i));
29 ls->AddLine(pvx[0], pvx[1], pvx[2],
30 pvx[0]+dr[0], pvx[1]+dr[1], pvx[2]+dr[2]);
31 }
32
84aff7a4 33 gEve->AddElement(ls);
34 gEve->Redraw3D();
c46fd838 35
36 return ls;
37}