]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/OnlineDisplay/AliHLTTPCDisplay.cxx
6313a63104dfee362186c717afdb887859f50afd
[u/mrichter/AliRoot.git] / HLT / TPCLib / OnlineDisplay / AliHLTTPCDisplay.cxx
1 // @(#) $Id$
2 // Original: AliHLTDisplay.cxx,v 1.26 2005/06/14 10:55:21 cvetan 
3
4 /**
5 <pre>
6 //_____________________________________________________________
7 // AliHLTTPCDisplay
8 //
9 // Display class for the HLT TPC events.
10 </pre>
11 */
12 // Author: Jochen Thaeder <mailto:thaeder@kip.uni-heidelberg.de>
13 //         Anders Vestbo <mailto:vestbo@fi.uib.no>      
14 //*-- Copyright &copy ALICE HLT Group 
15
16 #define TRACKHELIX 0
17 #define TRACKPOLYMARKER 0
18 #define BACKWARD 0
19 #define FIRSTLASTPOINT 0
20
21 #define TRACKCOLOR 
22 #define USEDCLUSTERCOLOR
23 #define UNUSEDCLUSTERCOLOR
24
25 #include "AliHLTStdIncludes.h"
26 #if defined(HAVE_TVIEW3D_H)
27 #include <TView3D.h>
28 #else
29 #include <TView.h>
30 #endif
31 #include <TPolyMarker3D.h>
32 #include <TPolyLine3D.h>
33 #include <TH2.h>
34 #include <TTree.h>
35 #include <TNode.h>
36 #include <TGeometry.h>
37 #include <TShape.h>
38 #include <TParticle.h>
39 #include <TFile.h>
40 #include <THelix.h>
41 #include <TStyle.h>
42 #include <TGraph.h>
43 #include <TMultiGraph.h>
44 #include <TAttText.h>
45 #include <TAxis.h>
46
47 #if TRACKHELIX
48 #include <THelix.h>
49 #endif
50
51 #ifdef use_aliroot
52 #include <TClonesArray.h>
53 #include <AliRun.h>
54 #include <AliSimDigits.h>
55 #include <AliTPCParam.h>
56 #endif
57
58 #include "AliHLTTPCLogging.h"
59 #include "AliHLTTPCDisplay.h"
60 #include "AliHLTTPCTransform.h"
61 #include "AliHLTTPCTrack.h"
62 #include "AliHLTTPCTrackArray.h"
63 #include "AliHLTTPCSpacePointData.h"
64 #include "AliHLTTPCMemHandler.h"
65 #include "AliHLTTPCDigitReaderPacked.h"
66
67 #if __GNUC__ == 3
68 using namespace std;
69 #endif
70
71 ClassImp(AliHLTTPCDisplay)
72
73 // #############################################################################
74 void AliHLTTPCDisplay::InitDisplay(Char_t *gfile) {
75     //constructor
76     memset(fClusters,0,36*6*sizeof(AliHLTTPCSpacePointData*));
77     memset(fNcl, 0, 36*6*sizeof(UInt_t)); 
78
79     fTracks = NULL;
80     fHistrawcl = NULL;
81     fHistraw = NULL;
82     fHistpad1 = NULL;
83     fHistpad2 = NULL;
84     fHistpad3 = NULL;
85     fHistallresidualsY = NULL;   
86     fHistallresidualsZ = NULL;
87     fHistcharge = NULL;
88     fGraphresidualsY = NULL;
89     fGraphresidualsZ = NULL;
90     fGraphresidualsYLength = NULL;
91     fGraphresidualsZLength = NULL;
92
93
94     fGeom = NULL;
95 // ---------------------------------------------------
96 // In order to be backward compatible
97 // ---------------------------------------------------
98 #if BACKWARD
99     //fc1 = NULL;
100 #endif 
101 // ---------------------------------------------------
102     fNPads = 0;
103     fNTimes = 0;
104     fMinHits = 0;
105     fPtThreshold = 0.;
106     fPad = -1;
107     fPadRow = 0;
108     fSlicePadRow = 0; 
109     fSelectTrack = -1;
110     fSelectTrackSlice = 0;
111     fSelectTrackSwitch = kFALSE;
112     fSelectCluster = 0;
113
114     fMinSlice = 0;
115     fMaxSlice = 35;
116     fSlicePair = kFALSE;
117
118     SetSliceArray();
119
120     fBackColor = 1; 
121     fLineColor = 0;
122     fKeepView = kFALSE;
123
124     fSwitch3DCluster = kFALSE;
125     fSwitch3DTracks = kFALSE;
126     fSwitch3DPadRow = kFALSE;
127     fSwitch3DGeometry = kFALSE;
128
129     AliHLTTPCTransform::SetBField(0.4);
130     LoadGeometrie(gfile);
131 }
132
133
134 // #############################################################################
135 AliHLTTPCDisplay::~AliHLTTPCDisplay() {
136     //destructor
137     if(fTracks) delete fTracks;
138     fTracks = NULL;
139 }
140
141 // #############################################################################
142 Bool_t AliHLTTPCDisplay::LoadGeometrie(Char_t *gfile) {
143     if (gfile) {
144         TFile *file = TFile::Open(gfile);
145         if(!file) {
146             LOG(AliHLTTPCLog::kError,"AliHLTTPCDisplay::AliHLTTPCDisplay","File Open") <<"Geometry file " << gfile << " does not exist!"<<ENDLOG;
147             return kFALSE;
148         }
149         
150         fGeom = (TGeometry*)file->Get("AliceGeom");
151
152         file->Close();
153         delete file;
154     }
155     return kTRUE;
156 }
157
158 // #############################################################################
159 //                 EXECUTER
160 // #############################################################################
161 void AliHLTTPCDisplay::ExecPadRow(){
162    int event = gPad->GetEvent();
163    if (event != 11) return;
164
165    printf("TEST !!!!!!!!!!!!!!!");
166 /*   int px = gPad->GetEventX();
167    TObject *select = gPad->GetSelected();
168    if (!select) return;
169    if (select->InheritsFrom("TH1")) {
170       TH1 *h = (TH1*)select;
171       Float_t xx = gPad->AbsPixeltoX(px);
172       Float_t x  = gPad->PadtoX(xx);
173       Int_t binx = h->GetXaxis()->FindBin(x);
174       printf("event=%d, hist:%s, bin=%d, content=%f\n",event,h->GetName(),binx,h->GetBinContent(binx));
175    }
176
177 */
178
179 }
180
181 // #############################################################################
182 //                 SETTER
183 // #############################################################################
184 void AliHLTTPCDisplay::SetHistPadRowAxis() {
185     // Set Axis range of Histogramm, due to variable NPads per padrow
186
187     fNPads = AliHLTTPCTransform::GetNPads(fPadRow);
188     fHistrawcl->SetAxisRange(0,fNPads);
189     fHistraw->SetAxisRange(0,fNPads);
190     fHistrawcl->SetAxisRange(0,fNTimes,"Y");
191     fHistraw->SetAxisRange(0,fNTimes,"Y");
192 }
193
194 void AliHLTTPCDisplay::SetSliceArray() {
195     Int_t slice=0;
196     Int_t minSlice = fMinSlice; 
197     Int_t maxSlice = fMaxSlice; 
198     Int_t realslice = 0;
199
200     for (slice=0;slice<=35;slice++){
201         fSliceArray[slice] = kFALSE;
202     }
203
204     // Single Slice, or Range
205     if (minSlice > maxSlice) maxSlice += 17;
206         
207     for (slice=minSlice;slice<=maxSlice;slice++){
208         realslice = slice % 18;
209         fSliceArray[realslice] = kTRUE;
210         fSliceArray[realslice+18] = kTRUE;
211     }
212
213     // Pair of Slices
214     if (fSlicePair) {
215         minSlice = fMinSlice + 9;
216         maxSlice = fMaxSlice + 9;
217         
218         if (minSlice > maxSlice) maxSlice += 17;
219         
220         for (slice=minSlice;slice<=maxSlice;slice++){
221             realslice = slice % 18;
222             fSliceArray[realslice] = kTRUE;     
223             fSliceArray[realslice+18] = kTRUE;
224         }
225     }
226 }
227
228 // #############################################################################
229 //                 SETUP
230 // #############################################################################
231 void AliHLTTPCDisplay::SetupCluster(Int_t slice, Int_t patch, UInt_t nofClusters, AliHLTTPCSpacePointData* data)  {  
232
233     if (data && slice>=0 && slice<36 && patch>=0 && patch<AliHLTTPCTransform::GetNPatches()) {
234         if (fClusters[slice][patch]!=NULL) {
235             delete(fClusters[slice][patch]);
236             fClusters[slice][patch]=NULL;
237         }
238         Int_t arraysize=nofClusters*sizeof(AliHLTTPCSpacePointData);
239         fClusters[slice][patch] = (AliHLTTPCSpacePointData*)new Byte_t[arraysize];
240         if (fClusters[slice][patch]) {
241             memcpy(fClusters[slice][patch], data, arraysize);
242             fNcl[slice][patch]=nofClusters;
243         } else {
244             fNcl[slice][patch]=nofClusters;
245             LOG(AliHLTTPCLog::kError,"AliHLTTPCDisplay::SetupCluster","memory allocation") << "memory allocation failed "<<ENDLOG; 
246         }
247     } else LOG(AliHLTTPCLog::kError,"AliHLTTPCDisplay::SetupCluster","argument check") << "invalid argument "<<ENDLOG; 
248 }
249
250 // #############################################################################
251 void AliHLTTPCDisplay::SetupTracks(AliHLTTPCTrackArray *tracks) {
252     fTracks=tracks;
253
254     // Set USED cluster
255     Int_t ntracks = fTracks->GetNTracks();
256
257     for(Int_t j=0; j<ntracks; j++) {    
258         AliHLTTPCTrack *gtrack = fTracks->GetCheckedTrack(j); 
259         if(!gtrack) continue;
260
261         Int_t nHits = gtrack->GetNHits();
262         UInt_t *hitnum = gtrack->GetHitNumbers();
263
264         for(Int_t h=0; h<nHits; h++){
265           
266             UInt_t id=hitnum[h];
267             Int_t slice = (id>>25) & 0x7f;
268             Int_t patch = (id>>22) & 0x7;
269             UInt_t pos = id&0x3fffff;       
270                 
271             AliHLTTPCSpacePointData *points = fClusters[slice][patch];
272             
273             if(!points) {
274                 LOG(AliHLTTPCLog::kError,"AliHLTTPCDisplay::Draw3D","Clusterarray") <<"No points at slice "<<slice<<" patch "<<patch<<" pos "<<pos<<ENDLOG;
275                 continue;
276             }
277  
278             if(pos>=fNcl[slice][patch]) {
279                 LOG(AliHLTTPCLog::kError,"AliHLTTPCDisplay::Draw3D","Clusterarray") <<"Pos is too large: pos "<<pos <<" ncl "<<fNcl[slice][patch]<<ENDLOG;
280                 continue;
281             }
282             points[pos].fUsed = kTRUE;
283             points[pos].fTrackN = j;
284         }
285     }
286 }
287
288 // #############################################################################
289 void AliHLTTPCDisplay::SetupHist(){
290
291     Int_t maxpads = 150;
292     fNTimes = AliHLTTPCTransform::GetNTimeBins();
293
294     if ( fHistraw ){
295         delete fHistraw;
296         fHistraw = NULL;
297     }
298     if ( fHistrawcl ){
299         delete fHistrawcl;
300         fHistrawcl = NULL;
301     }
302
303     if ( fHistpad1 ){
304         delete fHistpad1;
305         fHistpad1 = NULL;
306     }
307
308     if ( fHistpad2 ){
309         delete fHistpad2;
310         fHistpad2 = NULL;
311     }
312
313     if ( fHistpad3 ){
314         delete fHistpad3;
315         fHistpad3 = NULL;
316     }
317
318     if ( fHistallresidualsY){
319         delete fHistallresidualsY;
320         fHistallresidualsY = NULL;
321     }
322
323     if ( fHistallresidualsZ){
324         delete fHistallresidualsZ;
325         fHistallresidualsZ = NULL;
326     }
327     if ( fHistcharge){
328         delete fHistcharge;
329         fHistcharge = NULL;
330     }
331
332     // Setup the histograms
333     Int_t padbinning = maxpads*10;
334     fHistraw = new TH2F("fHistraw","Selected PadRow with found Clusters;Pad #;Timebin #",maxpads,0,maxpads-1,fNTimes,0,fNTimes-1);
335     fHistrawcl = new TH1F("fHistrawcl","",padbinning,0,maxpads-1);
336     fHistpad1 = new TH1F ("fHistpad1","Selected Pad -1;Timebin #",fNTimes,0,fNTimes-1);
337     fHistpad2 = new TH1F ("fHistpad2","Selected Pad;Timebin #",fNTimes,0,fNTimes-1); 
338     fHistpad3 = new TH1F ("fHistpad3","Selected Pad +1;Timebin #",fNTimes,0,fNTimes-1);
339     fHistallresidualsY = new TH1F ("fHistallresiduals","Y Residuals of all Tracks in selected slices;residuals",5000,-100,100);
340     fHistallresidualsZ = new TH1F ("fHistallresiduals","Z Residuals of all Tracks in selected slices;residuals",5000,-100,100);
341     fHistcharge = new TH1F ("fHistcharge","Cluster distribution per charge;charge;#cluster",5000,0,30000);
342
343     fHistraw->SetOption("COLZ"); 
344
345     fHistallresidualsY->SetTitleSize(0.03);
346     fHistallresidualsY->GetXaxis()->SetLabelSize(0.03);
347     fHistallresidualsY->GetXaxis()->SetTitleSize(0.03);
348     fHistallresidualsY->GetYaxis()->SetLabelSize(0.03);
349     fHistallresidualsY->GetYaxis()->SetTitleSize(0.03);
350
351     fHistallresidualsZ->SetTitleSize(0.03);
352     fHistallresidualsZ->GetXaxis()->SetLabelSize(0.03);
353     fHistallresidualsZ->GetXaxis()->SetTitleSize(0.03);
354     fHistallresidualsZ->GetYaxis()->SetLabelSize(0.03);
355     fHistallresidualsZ->GetYaxis()->SetTitleSize(0.03);
356
357     fHistcharge->SetTitleSize(0.03);
358     fHistcharge->GetXaxis()->SetLabelSize(0.03);
359     fHistcharge->GetXaxis()->SetTitleSize(0.03);
360     fHistcharge->GetYaxis()->SetLabelSize(0.03);
361     fHistcharge->GetYaxis()->SetTitleSize(0.03);
362
363     fHistraw->SetTitleSize(0.03);
364     fHistraw->GetXaxis()->SetLabelSize(0.03);
365     fHistraw->GetXaxis()->SetTitleSize(0.03);
366     fHistraw->GetYaxis()->SetLabelSize(0.03);
367     fHistraw->GetYaxis()->SetTitleSize(0.03);
368
369     fHistpad1->SetTitleSize(0.03);
370     fHistpad1->GetXaxis()->SetLabelSize(0.03);
371     fHistpad1->GetXaxis()->SetTitleSize(0.03);
372     fHistpad1->GetYaxis()->SetLabelSize(0.03);
373     fHistpad1->GetYaxis()->SetTitleSize(0.03);
374
375     fHistpad2->SetTitleSize(0.03);
376     fHistpad2->GetXaxis()->SetLabelSize(0.03);
377     fHistpad2->GetXaxis()->SetTitleSize(0.03);
378     fHistpad2->GetYaxis()->SetLabelSize(0.03);
379     fHistpad2->GetYaxis()->SetTitleSize(0.03);
380
381     fHistpad3->SetTitleSize(0.03);
382     fHistpad3->GetXaxis()->SetLabelSize(0.03);
383     fHistpad3->GetXaxis()->SetTitleSize(0.03);
384     fHistpad3->GetYaxis()->SetLabelSize(0.03);
385     fHistpad3->GetYaxis()->SetTitleSize(0.03);
386
387     gStyle->SetPalette(1);
388     
389     SetHistPadRowAxis();
390 }
391
392 // ####################################################################################################
393 void AliHLTTPCDisplay::FillPadRow(Int_t patch, ULong_t dataBlock, ULong_t dataLen){
394 #if defined(HAVE_ALIRAWDATA) && defined(HAVE_ALITPCRAWSTREAM_H)
395     AliHLTTPCDigitReader* digitReader = new AliHLTTPCDigitReaderPacked();
396     bool readValue = true;
397     Int_t rowOffset = 0;
398
399     // Initialize RAW DATA
400     Int_t firstRow = AliHLTTPCTransform::GetFirstRow(patch);
401     Int_t lastRow = AliHLTTPCTransform::GetLastRow(patch);
402
403     // Outer sector, patches 2, 3, 4, 5 -  start counting in patch 2 with row 0
404     if ( patch >= 2 ) rowOffset = AliHLTTPCTransform::GetFirstRow( 2 );
405
406     // Initialize block for reading packed data
407     void* tmpdataBlock = (void*) dataBlock;
408     digitReader->InitBlock(tmpdataBlock,dataLen,firstRow,lastRow,patch,0);
409
410     readValue = digitReader->Next();
411
412     if (!readValue){    
413         LOG(AliHLTTPCLog::kError,"AliHLTTPCDisplay::FillPadRow","Read first value") << "No value in data block" << ENDLOG;
414         return;
415     }
416     
417     // FILL PADROW 3D --- Initialize the colorbins
418     if (fSwitch3DPadRow){
419         for (UInt_t ii=0;ii < 20;ii++){
420             fbinct[ii] = 0;
421             fcolorbin[ii] = 0;
422         }
423
424         // read number of entries in colorbin
425         while ( readValue ){ 
426
427             Int_t row = digitReader->GetRow() + rowOffset;
428             
429             if (row == fPadRow){    
430                 UInt_t charge = digitReader->GetSignal();
431                 
432                 for (UInt_t ii=0;ii < 19;ii++){
433                     if ( charge > (ii*15) && charge <= ((ii*15) + 15) ) fcolorbin[ii]++;
434                 }
435                 // larger than 19 * 15  
436                 if (charge > 285 ) fcolorbin[19]++;
437             }
438
439             // read next value
440             readValue = digitReader->Next();
441       
442             if(!readValue) break; //No more value
443         } 
444         //Initialize fpmarr[color][3*colorbin[ii]]  
445         fpmarr[0] = new Float_t[fcolorbin[0]*3]; 
446         fpmarr[1] = new Float_t[fcolorbin[1]*3]; 
447         fpmarr[2] = new Float_t[fcolorbin[2]*3]; 
448         fpmarr[3] = new Float_t[fcolorbin[3]*3]; 
449         fpmarr[4] = new Float_t[fcolorbin[4]*3];  
450         fpmarr[5] = new Float_t[fcolorbin[5]*3]; 
451         fpmarr[6] = new Float_t[fcolorbin[6]*3]; 
452         fpmarr[7] = new Float_t[fcolorbin[7]*3]; 
453         fpmarr[8] = new Float_t[fcolorbin[8]*3]; 
454         fpmarr[9] = new Float_t[fcolorbin[9]*3]; 
455         fpmarr[10] = new Float_t[fcolorbin[10]*3]; 
456         fpmarr[11] = new Float_t[fcolorbin[11]*3]; 
457         fpmarr[12] = new Float_t[fcolorbin[12]*3]; 
458         fpmarr[13] = new Float_t[fcolorbin[13]*3]; 
459         fpmarr[14] = new Float_t[fcolorbin[14]*3]; 
460         fpmarr[15] = new Float_t[fcolorbin[15]*3]; 
461         fpmarr[16] = new Float_t[fcolorbin[16]*3]; 
462         fpmarr[17] = new Float_t[fcolorbin[17]*3]; 
463         fpmarr[18] = new Float_t[fcolorbin[18]*3]; 
464         fpmarr[19] = new Float_t[fcolorbin[19]*3]; 
465         
466         // Rewind the raw reader and fill the polymarker3D
467         digitReader->InitBlock(tmpdataBlock,dataLen,firstRow,lastRow,patch,0);
468         
469         readValue = digitReader->Next();
470     } // END if (fSwitch3DPadRow)
471
472     // -- Fill Raw Data
473     while ( readValue ){ 
474
475         Int_t row = digitReader->GetRow() + rowOffset;
476
477         // select padrow to fill in histogramm
478         if (row == fPadRow){    
479             UChar_t pad = digitReader->GetPad();
480             UShort_t time = digitReader->GetTime();
481             UInt_t charge = digitReader->GetSignal();
482             Float_t xyz[3];
483             fHistraw->Fill(pad,time,charge);
484
485             if (pad == (fPad-1) ) fHistpad1->Fill(time,charge);
486             if (pad == fPad) fHistpad2->Fill(time,charge);
487             if (pad == (fPad+1) ) fHistpad3->Fill(time,charge);
488
489             if (fSwitch3DPadRow) {
490                 // Transform raw coordinates to local coordinates
491                 AliHLTTPCTransform::RawHLT2Global(xyz, fSlicePadRow, fPadRow, pad, time);
492
493                 for (UInt_t ii=0;ii < 19;ii++){
494                     if ( charge > (ii*15) && charge <= ((ii*15) + 15) ){
495                         fpmarr[ii][fbinct[ii]] = xyz[0];
496                         fpmarr[ii][fbinct[ii]+1] = xyz[1];
497                         fpmarr[ii][fbinct[ii]+2] = xyz[2];
498                         fbinct[ii] += 3;
499                     }
500                 }
501                 // larger than 19 * 15
502                 if (charge > 285 ) {
503                     fpmarr[19][fbinct[19]] = xyz[0];
504                     fpmarr[19][fbinct[19]+1] = xyz[1];
505                     fpmarr[19][fbinct[19]+2] = xyz[2];
506                     fbinct[19] += 3;
507                 }
508             } // END if (fSwitch3DPadRow)
509         
510         }
511         
512         // read next value
513         readValue = digitReader->Next();
514       
515         //Check where to stop:
516         if(!readValue) break; //No more value
517     } 
518     
519     if ( digitReader )
520         delete digitReader;
521     digitReader = NULL;
522
523     AliHLTTPCSpacePointData *points = fClusters[fSlicePadRow][patch];
524     if(!points) return;
525     Int_t npoints = fNcl[fSlicePadRow][patch];
526     
527     Float_t xyz[3];
528     for(Int_t i=0; i<npoints; i++){
529         xyz[0] = points[i].fX;
530         xyz[1] = points[i].fY;
531         xyz[2] = points[i].fZ;
532         
533         Int_t clrow = AliHLTTPCTransform::GetPadRow(xyz[0]);
534         // select padrow to fill in histogramm
535         if (clrow == fPadRow){
536             AliHLTTPCTransform::LocHLT2Raw(xyz, fSlicePadRow, fPadRow);
537             fHistrawcl->Fill(xyz[1],xyz[2]);
538         }
539     }
540 #else //! if defined(HAVE_ALIRAWDATA) && defined(HAVE_ALITPCRAWSTREAM_H)
541     HLTFatal("DigitReaderPacked not available - check your build");
542 #endif //defined(HAVE_ALIRAWDATA) && defined(HAVE_ALITPCRAWSTREAM_H)
543 }
544
545 // #############################################################################
546 void AliHLTTPCDisplay::ResetHistPadRow(){  
547     fHistraw->Reset();   
548     fHistrawcl->Reset(); 
549     fHistpad1->Reset(); 
550     fHistpad2->Reset();  
551     fHistpad3->Reset(); 
552 }
553
554 // #############################################################################
555 void AliHLTTPCDisplay::ResetHistResiduals(){  
556     fHistallresidualsY->Reset();
557     fHistallresidualsZ->Reset();
558 }
559
560 // #############################################################################
561 void AliHLTTPCDisplay::ResetHistCharge(){  
562     fHistcharge->Reset();
563 }
564
565
566 // #############################################################################
567 //                 DRAWER
568 // #############################################################################
569 void AliHLTTPCDisplay::DrawGeomSector(Int_t sector) {  
570   Char_t fname[256];
571   Int_t realsector = sector;// % 18;
572   
573   if (realsector < 10){
574     sprintf(fname,"LS0%d",realsector);
575     fGeom->GetNode(fname)->SetLineColor(fLineColor);
576     fGeom->GetNode(fname)->Draw("same");
577     sprintf(fname,"US0%d",realsector);
578     fGeom->GetNode(fname)->SetLineColor(fLineColor); 
579     fGeom->GetNode(fname)->Draw("same");
580   }
581   else {
582     sprintf(fname,"LS%d",realsector);
583     fGeom->GetNode(fname)->SetLineColor(fLineColor);
584     fGeom->GetNode(fname)->Draw("same");
585     sprintf(fname,"US%d",realsector);
586     fGeom->GetNode(fname)->SetLineColor(fLineColor); 
587     fGeom->GetNode(fname)->Draw("same");
588   }   
589 }
590 // #############################################################################
591 void AliHLTTPCDisplay::DrawHistPadRow(){  
592     Char_t title[256];
593     sprintf(title,"Selected PadRow %d with found Clusters",fPadRow);
594
595     fHistraw->SetTitle(title);
596     fHistraw->SetStats(kFALSE);
597     fHistraw->Draw("COLZ");
598
599     fHistrawcl->SetStats(kFALSE);
600     fHistrawcl->SetMarkerStyle(28);
601     fHistrawcl->SetMarkerSize(2);
602     fHistrawcl->SetMarkerColor(1);
603     fHistrawcl->Draw("psame");
604 }
605
606 // #############################################################################
607 void AliHLTTPCDisplay::DrawHistPad1(){  
608     Char_t title[256];
609     sprintf(title,"Selected Pad %d",fPad -1);
610     fHistpad1->SetStats(kFALSE);
611     fHistpad1->SetTitle(title);
612     fHistpad1->Draw();
613 }
614
615 // #############################################################################
616 void AliHLTTPCDisplay::DrawHistPad2(){  
617     Char_t title[256];
618     sprintf(title,"Selected Pad %d",fPad);
619
620     fHistpad2->SetStats(kFALSE);
621     fHistpad2->SetTitle(title);
622     fHistpad2->Draw();
623 }
624
625 // #############################################################################
626 void AliHLTTPCDisplay::DrawHistPad3(){  
627     Char_t title[256];
628     sprintf(title,"Selected Pad %d",fPad +1);
629
630     fHistpad3->SetStats(kFALSE);
631     fHistpad3->SetTitle(title);
632     fHistpad3->Draw();
633 }
634
635 // #############################################################################
636 void AliHLTTPCDisplay::DrawHistResiduals(Bool_t ySwitch){  
637     if (fSwitch3DTracks){
638         if (ySwitch){
639             // Y Residual histogram for 1 track
640
641             if (fSelectTrackSwitch){
642                 Char_t title[256];
643                 sprintf(title,"Y Residuals of Track %d in Slice %d",fSelectTrack, fSelectTrackSlice );
644
645                 TMultiGraph *mgY = new TMultiGraph();
646
647
648 //              fGraphresidualsY->SetTitle(title);      
649                 fGraphresidualsY->GetXaxis()->SetTitle("padrow");       
650                 fGraphresidualsY->GetYaxis()->SetTitle("residuals");
651 //              fGraphresidualsY->Draw("A*");
652                 fGraphresidualsY->GetXaxis()->SetLabelSize(0.02);
653                 fGraphresidualsY->GetXaxis()->SetTitleSize(0.02);
654                 fGraphresidualsY->GetYaxis()->SetLabelSize(0.02);
655                 fGraphresidualsY->GetYaxis()->SetTitleSize(0.02);
656                 fGraphresidualsYLength->SetMarkerColor(2);
657                 fGraphresidualsYLength->SetMarkerStyle(5);
658                 fGraphresidualsY->SetMarkerColor(1);
659                 fGraphresidualsY->SetMarkerStyle(3);
660
661 //              fGraphresidualsY->Draw("A*");
662 //              fGraphresidualsYLength->Draw("*");
663
664                 mgY->Add(fGraphresidualsY);
665                 mgY->Add(fGraphresidualsYLength);
666                 mgY->SetTitle(title);
667 //              mgY->GetXaxis()->SetTitle("padrow");    
668 //              mgY->GetYaxis()->SetTitle("residuals");
669                 mgY->Draw("AP");
670             }
671             // Global residuals histogram
672             else{
673                 fHistallresidualsY->SetStats(kFALSE);
674                 fHistallresidualsY->Draw();
675             }
676         }
677         else {
678             // Z Residual histogram for 1 track
679             if (fSelectTrackSwitch){
680                 Char_t title[256];
681                 sprintf(title,"Z Residuals of Track %d in Slice %d",fSelectTrack, fSelectTrackSlice );
682
683                 TMultiGraph *mgZ = new TMultiGraph();
684
685                 fGraphresidualsZ->SetTitle(title);      
686                 fGraphresidualsZ->GetXaxis()->SetTitle("padrow");       
687                 fGraphresidualsZ->GetYaxis()->SetTitle("residuals");
688                 fGraphresidualsZ->GetXaxis()->SetLabelSize(0.02);
689                 fGraphresidualsZ->GetXaxis()->SetTitleSize(0.02);
690                 fGraphresidualsZ->GetYaxis()->SetLabelSize(0.02);
691                 fGraphresidualsZ->GetYaxis()->SetTitleSize(0.02);
692 //              fGraphresidualsZLength->Draw("F*");
693 //              fGraphresidualsZ->Draw("A*");
694         
695                 mgZ->Add(fGraphresidualsZ);
696 //              mgZ->Add(fGraphresidualsZLength);
697                 mgZ->SetTitle(title);
698                 mgZ->Draw("A*");
699             }
700             // Global residuals histogram
701             else{
702                 fHistallresidualsZ->SetStats(kFALSE);
703                 fHistallresidualsZ->Draw();
704             }
705         }
706     }
707 }
708
709 // #############################################################################
710 void AliHLTTPCDisplay::DrawHistCharge(){  
711     if (fSwitch3DCluster){
712 //      fHistcharge->SetStats(kFALSE);
713         fHistcharge->Draw();
714     }
715 }
716
717 // #############################################################################
718 void AliHLTTPCDisplay::Draw3D(){        
719     
720 #if defined(HAVE_TVIEW3D_H)
721     TView3D *v = new TView3D();
722     if (v) v->SetSystem(1);
723 #else
724     TView *v = new TView(1);
725 #endif
726     if (v==NULL) {
727       HLTFatal("can not create viewer");
728       return;
729     }
730     v->SetRange(-800,-800,-800,800,800,800);
731
732     Float_t* etaRange = NULL;   // ------  STILL TO FIX
733     
734
735     //--------------------------------------------------------------------------------------------
736     // DRAW 3D CLUSTER
737     //--------------------------------------------------------------------------------------------
738     if (fSwitch3DCluster){
739         Int_t maxCharge = 0;
740
741         for (Int_t slice=0; slice <= 35; slice++){
742
743             Int_t currenttrack = -1;
744
745             if (fSelectCluster == 1 && fSelectTrackSwitch && slice == fSelectTrackSlice ){
746
747                 Int_t trackcounter = 0;
748                 Int_t ntracks = fTracks->GetNTracks();
749         
750                 for(Int_t j=0; j<ntracks; j++) {        
751
752                     AliHLTTPCTrack *gtrack = fTracks->GetCheckedTrack(j); 
753                     if(!gtrack) continue;
754
755                     Int_t nHits = gtrack->GetNHits();  // Number of associated hits to track
756                     Int_t tmpslice = gtrack->GetSector();
757
758                     // --- CHECK if track is should be drawn
759                     // select Single Track
760                     if(tmpslice != fSelectTrackSlice) continue;
761                         
762                     if (trackcounter != fSelectTrack){
763                         trackcounter++;  
764                         continue;
765                     }
766                     trackcounter++;
767
768                     if((fPtThreshold > 0) && (gtrack->GetPt()< fPtThreshold)) continue;
769                     if(nHits < fMinHits) continue;
770
771                     currenttrack = j;
772                     break;
773                 }
774             }
775             
776             if (!fSliceArray[slice]) continue;
777             
778             for(Int_t p=0;p<6;p++){
779
780                 AliHLTTPCSpacePointData *points = fClusters[slice][p];
781                 if(!points) continue;
782                 Int_t npoints = fNcl[slice][p];
783                 TPolyMarker3D *pmUsed = new TPolyMarker3D(1,6);
784                 TPolyMarker3D *pmUnused = new TPolyMarker3D(1,6);
785                 Int_t nUsedCluster = 0;
786                 Int_t nUnusedCluster = 0;
787
788                 Float_t xyz[3];
789                 for(Int_t i=0; i<npoints; i++){
790                     // Used  cluster only
791                     if (fSelectCluster == 1  && points[i].fUsed == kFALSE) continue; 
792                     // Unused cluster only
793                     if (fSelectCluster == 2  && points[i].fUsed == kTRUE) continue; 
794
795                     // if single track is selcted draw only cluster for this track
796                     if (fSelectCluster == 1 && fSelectTrackSwitch && points[i].fTrackN != currenttrack) continue;
797                     
798                     xyz[0] = points[i].fX;
799                     xyz[1] = points[i].fY;
800                     xyz[2] = points[i].fZ;
801                     
802                     if ( etaRange ){              
803                         // Do this before the transform, because the tracker also uses
804                         // local coordinates when using this limit to determine 
805                         // which clusters to use for tracking
806                         Double_t pointEta = AliHLTTPCTransform::GetEta( xyz );
807                         if ( pointEta<etaRange[0] || pointEta>etaRange[1] )
808                             continue;
809                     }
810
811                     AliHLTTPCTransform::Local2Global(xyz,slice);
812                  
813                     if (points[i].fUsed == kTRUE){
814                         pmUsed->SetPoint(nUsedCluster,xyz[0],xyz[1],xyz[2]);
815                         nUsedCluster++;
816                     }
817                     else {
818                         pmUnused->SetPoint(nUnusedCluster,xyz[0],xyz[1],xyz[2]);
819                         nUnusedCluster++;
820                     }
821
822                     // Fill Charge Histogram
823                     fHistcharge->Fill(points[i].fCharge);
824                     if ((Int_t)points[i].fCharge > maxCharge ) maxCharge = (Int_t) points[i].fCharge; 
825                 }
826                 pmUsed->SetMarkerSize(1);
827                 pmUsed->SetMarkerColor(3); 
828                 pmUsed->Draw("");
829
830                 pmUnused->SetMarkerSize(1);
831                 pmUnused->SetMarkerColor(2); 
832                 pmUnused->Draw("");
833             } // END - PATCH LOOP           
834         }  // END - SLICE LOOP
835         fHistcharge->SetAxisRange(0,maxCharge);
836     }   // END - DRAW 3D CLUSTER 
837
838     //--------------------------------------------------------------------------------------------
839     // DRAW 3D TRACKS
840     //--------------------------------------------------------------------------------------------
841     if (fSwitch3DTracks){
842
843         Int_t trackcounter = 0;
844         Int_t ntracks = fTracks->GetNTracks();
845         Double_t drawStep = 0.2;
846
847         Double_t maxResidualY = 0.;
848         Double_t maxResidualZ = 0.;
849
850         TPolyLine3D *line = new TPolyLine3D[ntracks];
851 #if TRACKHELIX
852         THelix *helix = new THelix[ntracks];
853 #endif
854         for(Int_t j=0; j<ntracks; j++) {        
855
856             AliHLTTPCTrack *gtrack = fTracks->GetCheckedTrack(j); 
857             if(!gtrack) continue;
858
859             Int_t nHits = gtrack->GetNHits();  // Number of associated hits to track
860             Int_t slice = gtrack->GetSector();
861
862             // --- CHECK if track is should be drawn
863             // select if slice should be displayed or not
864             if (!fSliceArray[slice]) continue;  
865             
866             // select Single Track
867             if (fSelectTrackSwitch){
868                 if(slice != fSelectTrackSlice) continue;
869         
870                 if (trackcounter != fSelectTrack){
871                     trackcounter++;  
872                     continue;
873                 }
874                 trackcounter++;
875             }
876     
877             if((fPtThreshold > 0) && (gtrack->GetPt()< fPtThreshold)) continue;
878             if(nHits < fMinHits) continue;
879             
880             TPolyMarker3D *pmL = new TPolyMarker3D(1,2);
881             TPolyMarker3D *pmF = new TPolyMarker3D(1,2);
882
883             Double_t radius = gtrack->GetRadius();      // radius
884             Double_t kappa = gtrack->GetKappa();        // curvature = 1/R , signed
885             Double_t lambda = atan( gtrack->GetTgl() ); // dipAngle lambda
886             Double_t phi0 = gtrack->GetPsi() + (gtrack->GetCharge() * AliHLTTPCTransform::PiHalf() ); // azimuthal angle of startingpoint, with respect to helix axis
887
888             Double_t xyzL[3];      // lastpoint of track
889             Double_t xyzF[3];      // firstpoint of track
890
891             xyzF[0] = gtrack->GetFirstPointX();
892             xyzF[1] = gtrack->GetFirstPointY();
893             xyzF[2] = gtrack->GetFirstPointZ();
894             pmF->SetPoint(0,xyzF[0],xyzF[1],xyzF[2]);
895
896             xyzL[0] = gtrack->GetLastPointX();
897             xyzL[1] = gtrack->GetLastPointY();
898             xyzL[2] = gtrack->GetLastPointZ();
899             pmL->SetPoint(0,xyzL[0],xyzL[1],xyzL[2]);
900
901             Double_t s = 0.;       // length of the track
902
903             // Calculate the length of the track. If it is to flat in in s,z plane use sxy, otherwise use sz
904             if (fabs(lambda) > 0.05){
905                 // length of track calculated out of z
906                 s = fabs( (xyzL[2] - xyzF[2]) / sin(lambda) ); // length of track calculated out of z
907             }
908             else {
909                 Double_t d =  (xyzL[0] - xyzF[0])*(xyzL[0] - xyzF[0]) + (xyzL[1] - xyzF[1])*(xyzL[1] - xyzF[1]);
910                 // length of track calculated out of xy
911                 s = fabs ( acos( 0.5 * (2 - (d / (radius*radius)))) / ( kappa * cos(lambda) ) );                
912             }
913             
914             Int_t nTrackPoints = 2 + (Int_t) floor(s / drawStep);
915
916 #if TRACKPOLYMARKER
917             TPolyMarker3D *pmT = new TPolyMarker3D(nTrackPoints,6);
918 #endif
919
920             Double_t *xT = new Double_t[nTrackPoints];
921             Double_t *yT = new Double_t[nTrackPoints];
922             Double_t *zT = new Double_t[nTrackPoints];
923
924             //Write Track Parameters for single track
925             if (fSelectTrackSwitch){
926                 fTrackParam.id = trackcounter - 1;
927                 fTrackParam.nHits = nHits;
928                 fTrackParam.charge = gtrack->GetCharge();
929                 fTrackParam.lambda = lambda;
930                 fTrackParam.kappa = kappa;
931                 fTrackParam.radius = radius;
932                 fTrackParam.slice = slice;
933                 fTrackParam.phi0 = phi0;
934                 fTrackParam.pt = gtrack->GetPt();
935                 fTrackParam.bfield = AliHLTTPCTransform::GetBFieldValue();
936                 fTrackParam.xyzF[0] = gtrack->GetFirstPointX();
937                 fTrackParam.xyzF[1] = gtrack->GetFirstPointY();
938                 fTrackParam.xyzF[2] = gtrack->GetFirstPointZ();
939                 fTrackParam.xyzL[0] = gtrack->GetLastPointX();
940                 fTrackParam.xyzL[1] = gtrack->GetLastPointY();
941                 fTrackParam.xyzL[2] = gtrack->GetLastPointZ();
942                 fTrackParam.psi = gtrack->GetPsi();
943                 fTrackParam.s = s;
944             }
945
946             Int_t trackPointCounter = 0;
947
948             for (Double_t ds = 0.; ds < s; ds = ds + drawStep){
949                 // FILL ARRAYS IN ORDER TO DRAW THE TRACKPOINTS, OUT OF THE PARAMETER
950                 xT[trackPointCounter] = xyzF[0] + radius * ( cos( phi0 + (ds*kappa*cos(lambda)) ) - cos(phi0) );
951                 yT[trackPointCounter] = xyzF[1] + radius * ( sin( phi0 + (ds*kappa*cos(lambda)) ) - sin(phi0) );
952                 zT[trackPointCounter] = xyzF[2] + ds * sin(lambda);
953 #if TRACKPOLYMARKER
954                 pmT->SetPoint(trackPointCounter,xT[trackPointCounter],yT[trackPointCounter],zT[trackPointCounter]);
955 #endif
956                 trackPointCounter++;
957             }
958
959             xT[trackPointCounter] = xyzF[0] + radius * ( cos( phi0 + (s*kappa*cos(lambda)) ) - cos(phi0) );
960             yT[trackPointCounter] = xyzF[1] + radius * ( sin( phi0 + (s*kappa*cos(lambda)) ) - sin(phi0) );
961             zT[trackPointCounter] = xyzF[2] + s * sin(lambda);
962 #if TRACKPOLYMARKER       
963             pmT->SetPoint(trackPointCounter,xT[trackPointCounter],yT[trackPointCounter],zT[trackPointCounter]);
964 #endif
965             // --- RESIDUALS ---
966             gtrack->Rotate(slice,kTRUE);
967             Int_t nRes = 0;  // number of resiudals
968             
969             UInt_t *hitnum = gtrack->GetHitNumbers();
970
971             Double_t *resY= new Double_t[nHits];
972             Double_t *resZ= new Double_t[nHits];
973
974             Double_t *resYLength= new Double_t[2*nHits];
975             Double_t *resZLength= new Double_t[2*nHits];
976
977             Double_t *padrows = new Double_t[nHits];
978             Double_t *padrowsLength = new Double_t[2*nHits];
979
980             for(Int_t h=0; h<nHits; h++){
981                 UInt_t id=hitnum[h];
982                 Int_t patch = (id>>22) & 0x7;
983                 UInt_t pos = id&0x3fffff; 
984
985                 AliHLTTPCSpacePointData *points = fClusters[slice][patch];
986
987                 Float_t xyzCtmp[3];    // cluster tmp
988                 Float_t xyzTtmp[3];    // track tmp
989
990                 xyzCtmp[0] = points[pos].fX;
991                 xyzCtmp[1] = points[pos].fY;
992                 xyzCtmp[2] = points[pos].fZ;
993
994                 Int_t padrow = AliHLTTPCTransform::GetPadRow(points[pos].fX);
995                 xyzTtmp[0] = gtrack->GetFirstPointX();
996                 if(gtrack->GetCrossingPoint(padrow,xyzTtmp)) {
997
998                     Float_t deltaY = ( xyzCtmp[1] - xyzTtmp[1] );
999                     Float_t deltaZ = ( xyzCtmp[2] - xyzTtmp[2] );
1000 //                  Float_t residual = sqrt( deltaY*deltaY + deltaZ*deltaZ );
1001                     
1002                     padrows[nRes] = (Double_t) padrow;
1003                     resY[nRes] = (Double_t) deltaY;
1004                     resZ[nRes] = (Double_t) deltaZ;
1005
1006                     resYLength[(2*nRes)] = 0.5 * AliHLTTPCTransform::GetPadLength(padrow);
1007                     resYLength[(2*nRes)+1] = -0.5 * AliHLTTPCTransform::GetPadLength(padrow);
1008                     resZLength[nRes] = AliHLTTPCTransform::GetZLength();
1009                     padrowsLength[(2*nRes)] = (Double_t) padrow;
1010                     padrowsLength[(2*nRes)+1] = (Double_t) padrow;
1011
1012                     // FILL RESIDUALS HISTOGRAM
1013                     fHistallresidualsY->Fill(resY[nRes]);
1014                     fHistallresidualsZ->Fill(resZ[nRes]);
1015                     if (resY[nRes] > maxResidualY ) maxResidualY = resY[nRes];
1016                     if (resZ[nRes] > maxResidualZ ) maxResidualZ = resZ[nRes];
1017                     nRes++;
1018                 }
1019             }
1020
1021             gtrack->Rotate(slice,kFALSE);
1022             // --- RESIDUALS ---
1023
1024             // Draw last point of Track
1025             pmL->SetMarkerSize(3);
1026             pmL->SetMarkerColor(4); 
1027 //          pmL->Draw();
1028
1029             // Draw first point of Track
1030             pmF->SetMarkerSize(3);
1031             pmF->SetMarkerColor(5); 
1032 //          pmF->Draw();
1033
1034 #if TRACKPOLYMARKER
1035             // Draw Track -- as polymarker
1036             pmT->SetMarkerSize(3);
1037             pmT->SetMarkerColor(3); 
1038             pmT->Draw();
1039 #endif
1040             // Draw Track -- as line
1041             TPolyLine3D *currentline = &(line[j]);
1042             currentline = new TPolyLine3D(nTrackPoints,xT,yT,zT,"");
1043             currentline->SetLineColor(4);   
1044             currentline->SetLineWidth(2);
1045             currentline->Draw("same");
1046
1047 #if TRACKHELIX
1048             // Draw Track -- as helix
1049             // works ok, execpt for very small dipangles -> track almost horizontal
1050             Double_t hrange[2];
1051             Double_t v0[3];
1052             Double_t omega;
1053             hrange[0] = xyzF[2];
1054             hrange[1] = xyzL[2];
1055             v0[0] = gtrack->GetPx();
1056             v0[1] = gtrack->GetPy();
1057             v0[2] = gtrack->GetPz();
1058             omega = AliHLTTPCTransform::GetBFieldValue() * gtrack->GetCharge();
1059
1060             THelix *currenthelix = &(helix[j]);
1061             currenthelix = new THelix(xyzF,v0,omega,hrange,kHelixZ,0);
1062             currenthelix->SetLineColor(6);   
1063             currenthelix->SetLineWidth(1);
1064             currenthelix->Draw("same");             
1065 #endif
1066
1067             //Residuals
1068             if ( fGraphresidualsY){
1069                 delete fGraphresidualsY;
1070                 fGraphresidualsY = NULL;
1071             }
1072
1073             if ( fGraphresidualsZ){
1074                 delete fGraphresidualsZ;
1075                 fGraphresidualsZ = NULL;
1076             }
1077             //Residuals
1078             if ( fGraphresidualsYLength){
1079                 delete fGraphresidualsYLength;
1080                 fGraphresidualsYLength = NULL;
1081             }
1082
1083             if ( fGraphresidualsZLength){
1084                 delete fGraphresidualsZLength;
1085                 fGraphresidualsZLength = NULL;
1086             }
1087
1088
1089
1090             // FILL Y RESIDUALS GRAPH
1091             fGraphresidualsY = new TGraph(nRes-1,padrows,resY);
1092             fGraphresidualsYLength = new TGraph((2*nRes)-2,padrowsLength,resYLength);
1093             // FILL Z RESIDUALS GRAPH
1094             fGraphresidualsZ = new TGraph(nRes-1,padrows,resZ);
1095             fGraphresidualsZLength = new TGraph(nRes-1,padrows,resZLength);
1096
1097             if (xT) delete xT;
1098             if (yT) delete yT;
1099             if (zT) delete zT;
1100
1101         } // END for tracks
1102
1103         fHistallresidualsY->SetAxisRange(-maxResidualY,maxResidualY);
1104         fHistallresidualsZ->SetAxisRange(-maxResidualZ,maxResidualZ);
1105
1106     }   // END - DRAW 3D Tracks
1107
1108     //--------------------------------------------------------------------------------------------
1109     // DRAW 3D GEOMETRY
1110     //--------------------------------------------------------------------------------------------
1111     if (fSwitch3DGeometry){
1112
1113         for (Int_t slice=0; slice <= 17; slice++){
1114             if (!fSliceArray[slice]) continue;
1115             DrawGeomSector(slice);
1116         }
1117     }   // END - DRAW 3D GEOMETRY
1118     
1119     //--------------------------------------------------------------------------------------------
1120     // DRAW 3D PadRow
1121     //--------------------------------------------------------------------------------------------
1122     if (fSwitch3DPadRow && fSliceArray[fSlicePadRow]){
1123         Int_t markercolor = 51;
1124
1125         for (UInt_t ii=0;ii < 20;ii++){
1126             if (fcolorbin[ii]> 0){
1127                 
1128                 TPolyMarker3D *pm = new TPolyMarker3D(fcolorbin[ii], fpmarr[ii], 7 );
1129
1130                 pm->SetMarkerColor(markercolor); 
1131                 pm->Draw(""); 
1132             }
1133
1134             // in order to have the SetPalette(1), so called "pretty"
1135             if (ii % 2 == 0 ) markercolor += 2;
1136             else  markercolor += 3;
1137         }
1138     }
1139
1140     //--------------------------------------------------------------------------------------------
1141     // DRAW 3D 
1142     //--------------------------------------------------------------------------------------------
1143     v->ZoomView(0,4);
1144     v->Draw();   
1145 }
1146
1147 // ---------------------------------------------------
1148 // In order to be backward compatible
1149 // ---------------------------------------------------
1150 #if BACKWARD
1151 void AliHLTTPCDisplay::DisplayClusters(Bool_t x3don,Float_t* etaRange) {
1152     if (!fc1){
1153         fc1 = new TCanvas("c1","",900,900);
1154         fc1->cd();
1155     }
1156
1157     fSwitch3DTracks = kFALSE; 
1158     fSwitch3DCluster = kTRUE; 
1159     fSwitch3DPadRow = kFALSE; 
1160     fSwitch3DGeometry = kFALSE;
1161
1162     Draw3D();
1163 }
1164 // ---------------------------------------------------
1165 void AliHLTTPCDisplay::DisplayTracks(Int_t minhits,Bool_t x3don,Float_t thr) {
1166     if (!fc1){
1167         fc1 = new TCanvas("c1","",900,900);
1168         fc1->cd();
1169     }
1170
1171     fMinHits = minhits; 
1172     fPtThreshold = thr;
1173     fSwitch3DTracks = kTRUE; 
1174     fSwitch3DCluster = kFALSE; 
1175     fSwitch3DPadRow = kFALSE; 
1176     fSwitch3DGeometry = kFALSE;
1177
1178     Draw3D();
1179 }
1180 // ---------------------------------------------------
1181 void AliHLTTPCDisplay::DisplayAll(Int_t minhits,Bool_t clusterswitch,Bool_t trackswitch,Bool_t x3don, Float_t thr, Float_t* etaRange){
1182     if (!fc1){
1183         fc1 = new TCanvas("c1","",900,900);
1184         fc1->cd();
1185     }
1186
1187     fMinHits = minhits; 
1188     fPtThreshold = thr;
1189     fSwitch3DTracks = trackswitch; 
1190     fSwitch3DCluster = clusterswitch; 
1191     fSwitch3DPadRow = kFALSE; 
1192     fSwitch3DGeometry = kFALSE;
1193
1194     Draw3D();
1195 }
1196 #endif
1197 // ---------------------------------------------------