]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/Alieve/MUONDigitsInfo.cxx
Fix effc++ warnings.
[u/mrichter/AliRoot.git] / EVE / Alieve / MUONDigitsInfo.cxx
1 #include <TColor.h>
2
3 #include "MUONDigitsInfo.h"
4
5 #include <AliMUONDigit.h>
6 #include <AliMUONGlobalTrigger.h>
7 #include <AliMUONLocalTrigger.h>
8
9 using namespace Reve;
10 using namespace Alieve;
11 using namespace std;
12
13 ClassImp(MUONDigitsInfo)
14
15 /**************************************************************************/
16 void MUONDigitsInfo::SetDTree(TTree* tree)
17 {
18     
19   static const Exc_t eH("MUONDigitsInfo::SetDTree ");
20
21   fDTree = tree;
22
23 }
24
25 /**************************************************************************/
26 void MUONDigitsInfo::SetRTree(TTree* tree)
27 {
28     
29   static const Exc_t eH("MUONDigitsInfo::SetRTree ");
30
31   fRTree = tree;
32
33 }
34
35 /**************************************************************************/
36 void MUONDigitsInfo::SetTTree(TTree* tree)
37 {
38     
39   static const Exc_t eH("MUONDigitsInfo::SetTTree ");
40
41   fTTree = tree;
42
43 }
44
45 /**************************************************************************/
46 TClonesArray* MUONDigitsInfo::GetDigits(Int_t chamber)
47 {
48
49   Char_t branchname[30];
50
51   sprintf(branchname,"MUONDigits%d",chamber);
52   TClonesArray *digits = 0;
53   fDTree->SetBranchAddress(branchname,&digits);
54   fDTree->GetEntry(0);  // load event 0
55
56   return digits;
57
58 }
59
60 /**************************************************************************/
61 TClonesArray* MUONDigitsInfo::GetClusters(Int_t chamber)
62 {
63
64   if (chamber > 10) return 0;
65
66   Char_t branchname[30];
67
68   sprintf(branchname,"MUONRawClusters%d",chamber);
69   TClonesArray *clusters = 0;
70   fRTree->SetBranchAddress(branchname,&clusters);
71   fRTree->GetEntry(0);  // load event 0
72
73   return clusters;
74
75 }
76
77 /**************************************************************************/
78 TClonesArray* MUONDigitsInfo::GetTracks()
79 {
80
81   Char_t branchname[30];
82
83   sprintf(branchname,"MUONTrack");
84   TClonesArray *tracks = 0;
85   fTTree->SetBranchAddress(branchname,&tracks);
86   fTTree->GetEntry(0);  // load event 0
87
88   return tracks;
89
90 }
91
92 /*****************************************************************************/
93 void MUONDigitsInfo::CreateColors()
94 {
95 //    Create the colors palette used to display clusters
96
97     Int_t k,i;
98     Int_t color;
99     Float_t r,g,b;
100     
101     for (k=1;k<=5;k++) {
102
103         switch(k) {
104         case 1:
105             for (i=1;i<=5;i++) {
106                 r=1.;
107                 g=i*0.2;  
108                 b=0.;
109                 color=i;
110                 color=260+23-color;
111                 new TColor(color,r,g,b);
112             } 
113             break;
114         case 2:
115             for (i=1;i<=4;i++) {
116                 r=1.1-i*0.2;
117                 g=1.;  
118                 b=0.;
119                 color=i+5;
120                 color=260+23-color;
121                 new TColor(color,r,g,b);
122             } 
123             break;
124         case 3:
125             for (i=1;i<=4;i++) {
126                 r=0.;
127                 g=1.;  
128                 b=i*0.2+0.2;
129                 color=i+9;
130                 color=260+23-color;
131                 new TColor(color,r,g,b);
132             } 
133             break;
134         case 4:
135             for (i=1;i<=4;i++) {
136                 r=0.;
137                 g=1.1-i*0.2;  
138                 b=1.;
139                 color=i+13;
140                 color=260+23-color;
141                 new TColor(color,r,g,b);
142             } 
143             break;
144         case 5:
145             for (i=1;i<=5;i++) {
146                 r=i*0.2;
147                 g=0.;  
148                 b=1.;
149                 color=i+17;
150                 color=260+23-color;
151                 new TColor(color,r,g,b);
152             } 
153             break;
154         }
155
156     }
157
158 }