detailed analysis of pad rows sets of clusters attached to tracklets
[u/mrichter/AliRoot.git] / EVE / alice-macros / esd_spd_tracklets.C
CommitLineData
d810d0de 1// $Id$
2// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4/**************************************************************************
5 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
51346b82 7 * full copyright notice. *
d810d0de 8 **************************************************************************/
cb4245bb 9
57e8f8f1 10// Lines commented with //x should be reactivated when we
11// move to a newer ROOT (after 5.25.2).
12// Corresponding lines that are now replacing them should be removed.
13//
14// The problem was the TEveTrackProjected did not support projection
15// of tracks with locked points -- and we do that for tracklets.
16//
17// Maybe it would be even better to have AliEveTracklet : public TEveLine
18// and support both in AliEveTrackCounter.
19// Or have trackelt counter -- as not all histograms collected for tracks
20// are relevant for tracklets.
cb4245bb 21
bccc8088 22TEveTrackList* esd_spd_tracklets(Float_t radius=8, Width_t line_width=3,
23 Float_t d_theta=0.025, Float_t d_phi=0.08)
c46fd838 24{
57e8f8f1 25 // radius - cylindrical radius to which the tracklets should be extrapolated
c46fd838 26
57e8f8f1 27 AliESDEvent *esd = AliEveEventManager::AssertESD();
28 AliESDVertex *pv = esd->GetPrimaryVertexSPD();
29 AliMultiplicity *mul = esd->GetMultiplicity();
c46fd838 30
bccc8088 31 AliMagF *field = AliEveEventManager::AssertMagField();
32
3a20f984 33 TEveTrackList *cont = new TEveTrackList("SPD Tracklets");
57e8f8f1 34 cont->SetTitle(Form("N=%d", mul->GetNumberOfTracklets()));
35 cont->SetMainColor(7);
3a20f984 36 cont->SetLineWidth(line_width);
57e8f8f1 37
3a20f984 38 TEveTrackPropagator* prop = cont->GetPropagator();
39 prop->SetMaxR(radius);
57e8f8f1 40 gEve->AddElement(cont);
c46fd838 41
3a20f984 42 for (Int_t i = 0; i < mul->GetNumberOfTracklets(); ++i)
c46fd838 43 {
57e8f8f1 44 Float_t theta = mul->GetTheta(i);
45 Float_t phi = mul->GetPhi(i);
57e8f8f1 46
3a20f984 47 AliEveTracklet* t = new AliEveTracklet(pv, theta, phi, prop);
48 t->SetAttLineAttMarker(cont);
49 t->SetElementName(Form("Tracklet %d", i));
bccc8088 50 t->SetElementTitle(Form("id=%d: eta=%.3f, theta=%.3f, phi=%.3f",
51 i, mul->GetEta(i), theta, phi));
52 // if some condition
53 mul->SetLabel(i, 0, 3);
54 // else mul->SetLabel(i, 0, 0);
57e8f8f1 55
3a20f984 56 cont->AddElement(t);
c46fd838 57 }
58
3a20f984 59 cont->MakeTracks();
60
84aff7a4 61 gEve->Redraw3D();
c46fd838 62
57e8f8f1 63 return cont;
c46fd838 64}