]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ALIFAST/AliFFruit.cxx
Decay_t moved to AliDecayer.h
[u/mrichter/AliRoot.git] / ALIFAST / AliFFruit.cxx
CommitLineData
65a39007 1
2//////////////////////////////////////////////////////////////////////////
3// //
4// AliFFruit //
5// //
6// Utility class to draw Electrons, photons, Jets, Clusters,etc //
7// //
8//////////////////////////////////////////////////////////////////////////
9
10#include <TROOT.h>
11#include <TMath.h>
12
13#include "AliFDisplay.h"
14#include "AliFFruit.h"
15#include "AliFast.h"
16
17ClassImp(AliFFruit)
18
19
20//_____________________________________________________________________________
21AliFFruit::AliFFruit(TObject *obj, Float_t eta, Float_t phi, Float_t pt, Int_t type)
22 : TPolyLine3D(2)
23{
24 // Create a fruit object.
25 // Current implementation uses a 3-d polyline to visualize this fruit
26
27 fFruit = obj;
28 SetBit(kCanDelete);
29
30 const Int_t color[7] = {0,7,3,2,6,4,0};
31 const Int_t width[7] = {8,8,8,8,8,8,8};
32 Int_t lwidth = width[type];
33 AliFDisplay *display = (AliFDisplay*)gAliFast->Display();
34 if (display->AllViews()) lwidth /= 2;
35 const Float_t PTMAX = 100;
36 if (pt <= 0) return;
37 Float_t rin = display->Rin();
38 Float_t rout = display->Rout();
39 Float_t theta = 2*TMath::ATan(TMath::Exp(-eta));
40 Float_t tantet = TMath::Tan(theta);
41 Float_t cosphi = TMath::Cos(phi);
42 Float_t sinphi = TMath::Sin(phi);
43 Float_t zz = pt/PTMAX;
44 if (zz > 3) zz = 3;
45 Float_t rex = rin + 3*zz*(rout - rin);
46 Float_t z1,z2;
47 if (eta != 0) {
48 z1 = rin/tantet;
49 z2 = rex/tantet;
50 } else {
51 z1 = z2 = 0;
52 }
53 SetPoint(0, rin*cosphi,rin*sinphi, z1);
54 SetPoint(1, rex*cosphi,rex*sinphi, z2);
55 SetLineColor(color[type]);
56 SetLineWidth(width[type]);
57}
58
59//_____________________________________________________________________________
60void AliFFruit::Delete(Option_t *)
61{
62// Dummy
63
64}
65
66//______________________________________________________________________________
67char *AliFFruit::GetObjectInfo(Int_t px, Int_t py)
68{
69 return fFruit->GetObjectInfo(px, py);
70}
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93