]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONDisplay.cxx
Comments put back
[u/mrichter/AliRoot.git] / MUON / AliMUONDisplay.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 /*
17 $Log$
18 Revision 1.11  2001/01/26 21:41:55  morsch
19 Use access functions to AliMUONDigit member data.
20
21 Revision 1.10  2001/01/25 20:41:56  morsch
22 Protect against empty TreeD and TreeR.
23
24 Revision 1.9  2001/01/23 18:58:19  hristov
25 Initialisation of some pointers
26
27 Revision 1.8  2000/10/06 09:09:01  morsch
28 Pad colour according to z-position (slats).
29
30 Revision 1.7  2000/10/02 21:28:09  fca
31 Removal of useless dependecies via forward declarations
32
33 Revision 1.6  2000/07/03 11:54:57  morsch
34 AliMUONSegmentation and AliMUONHitMap have been replaced by AliSegmentation and AliHitMap in STEER
35 The methods GetPadIxy and GetPadXxy of AliMUONSegmentation have changed name to GetPadI and GetPadC.
36
37 Revision 1.5  2000/06/28 15:16:35  morsch
38 (1) Client code adapted to new method signatures in AliMUONSegmentation (see comments there)
39 to allow development of slat-muon chamber simulation and reconstruction code in the MUON
40 framework. The changes should have no side effects (mostly dummy arguments).
41 (2) Hit disintegration uses 3-dim hit coordinates to allow simulation
42 of chambers with overlapping modules (MakePadHits, Disintegration).
43
44 Revision 1.4  2000/06/27 09:46:57  morsch
45 kMAXZOOM global constant now in AliMUONConstants
46
47 Revision 1.3  2000/06/26 14:02:38  morsch
48 Add class AliMUONConstants with MUON specific constants using static memeber data and access methods.
49
50 Revision 1.2  2000/06/15 07:58:48  morsch
51 Code from MUON-dev joined
52
53 Revision 1.1.2.15  2000/06/14 14:37:53  morsch
54 method Trigger() modified
55
56 Revision 1.1.2.14  2000/06/09 21:57:09  morsch
57 Bug in color scale diplay corrected.
58 Most coding rule violations corrected.
59
60 Revision 1.1.2.13  2000/05/02 11:57:27  morsch
61 Coding rules RN3, RN13, RN17 violations corrected.
62
63 Revision 1.1.2.12  2000/04/26 12:27:33  morsch
64 Mods for trigger display (P. Crochet):
65 - color code versus time for pad hits in trigger chambers
66 - call to TriggerDecision corrected
67
68 Revision 1.1.2.11  2000/04/26 09:04:46  morsch
69 Obsolete cathode correlation related code removed.
70
71 Revision 1.1.2.10  2000/04/19 19:43:47  morsch
72 change NCH to kNCH as in AliMUON.h
73 no more TreeC related methods
74
75 Revision 1.1.2.9  2000/03/20 18:10:33  morsch
76 Trigger method for "online" trigger decission added
77
78 Revision 1.1.2.8  2000/02/23 10:12:01  morsch
79 Dont't try to draw reconstructed hit coordinates for Trigger Chambers.
80 General clean-up of commented code.
81
82 Revision 1.1.2.7  2000/02/17 14:36:55  morsch
83 Display of Trigger hits and clusters added.
84 Displacement between clusters and hits has to be investigated and corrected ! (A.M.)
85
86 Revision 1.1.2.6  2000/02/15 10:19:42  morsch
87 Previous log messages included
88
89 Revision 1.1.2.5  2000/02/15 10:09:09  morsch
90 Log Message added
91
92 Revision 1.1.2.4  2000/02/08 09:17:16  gosset    
93 One more improvement of MUON display:
94 same zoom for both cathode planes in a chamber
95
96 Revision 1.1.2.3  2000/02/07 15:37:21  gosset
97 A few improvements of the MUON display:
98 new buttons to change either chamber or cathode,
99 added to the more complicated way
100 (right mouse click and explicit filling of chamber and cathode)
101
102 Revision 1.1.2.2  2000/02/04 10:57:34  gosset
103 Z position of the chambers:
104 it was the Z position of the stations;
105 it is now really the Z position of the chambers.
106    !!!! WARNING: THE CALLS TO "AliMUONChamber::SetZPOS"
107    !!!!                   AND "AliMUONChamber::ZPosition"
108    !!!! HAVE TO BE CHANGED TO "AliMUONChamber::"SetZ"
109    !!!!                   AND "AliMUONChamber::Z"                                                           
110 */
111
112 //////////////////////////////////////////////////////////////////////////
113 //                                                                      //
114 // AliDisplay                                                           //
115 //                                                                      //
116 // Utility class to display ALICE outline, tracks, hits,..              //
117 //                                                                      //
118 //////////////////////////////////////////////////////////////////////////
119
120 #include <TROOT.h>
121 #include <TTree.h>
122 #include <TButton.h>
123 #include <TColor.h>
124 #include <TCanvas.h>
125 #include <TView.h>
126 #include <TText.h>
127 #include <TPolyMarker3D.h>
128 #include <TPaveLabel.h>
129 #include <TPaveText.h>
130 #include <TList.h>
131 #include <TDiamond.h>
132 #include <TNode.h>
133 #include <TArc.h>
134 #include <TTUBE.h>
135 #include <TSlider.h>
136 #include <TSliderBox.h>
137 #include <TGaxis.h>
138 #include <TVirtualX.h>
139 #include <TMath.h>
140 #include <TMatrix.h>
141 #include <TGeometry.h>
142 #include <X3DBuffer.h>
143 #include <TMarker3DBox.h>
144
145 #include "AliRun.h"
146 #include "AliDetector.h"
147 #include "AliMUON.h"
148 #include "AliMUONDisplay.h"
149 #include "AliMUONPoints.h"
150 #include "TParticle.h"
151 #include "AliMUONTriggerDecision.h"
152
153 #include "AliMUONHit.h"
154 #include "AliMUONPadHit.h"
155 #include "AliMUONDigit.h"
156 #include "AliMUONRawCluster.h"
157
158 #include "AliSegmentation.h"
159 #include "AliMUONResponse.h"
160 #include "AliMUONChamber.h"
161 #include "AliMUONConstants.h"
162 // to manage the same zoom on both cathodes
163
164
165
166 ClassImp(AliMUONDisplay)
167
168
169 //_____________________________________________________________________________
170 AliMUONDisplay::AliMUONDisplay()
171 {
172 // Constructor
173     fPoints = 0;
174     fPhits = 0;
175     fRpoints = 0;
176     fR2points = 0;
177     fCpoints = 0;
178     fCanvas = 0;
179     fNextCathode = kFALSE; 
180     fColPad = 0;
181 }
182
183 //_____________________________________________________________________________
184 AliMUONDisplay::AliMUONDisplay(Int_t size)
185 {
186 // Create an event display object.
187 // A canvas named "edisplay" is created with a vertical size in pixels
188 //
189 //    A QUICK Overview of the Event Display functions
190 //    ===============================================
191 //
192 //  The event display can ve invoked by executing the macro "display.C"
193 // A canvas like in the picture below will appear.
194 //
195 //  On the left side of the canvas, the following buttons appear:
196 //   *Next*       to move to the next event
197 //   *Previous*   to move to the previous event
198
199 //   *Pick*       Select this option to be able to point on a track with the
200 //                mouse. Once on the track, use the right button to select
201 //                an action. For example, select SetMarkerAttributes to
202 //                change the marker type/color/size for the track.
203 //   *Zoom*       Select this option (default) if you want to zoom.
204 //                To zoom, simply select the selected area with the left button.
205 //   *UnZoom*     To revert to the previous picture size.
206 //
207 //   slider R     On the left side, the vertical slider can be used to
208 //                set the default picture size.
209 //
210 //    When you are in Zoom mode, you can click on the black part of the canvas
211 //  to select special options with the right mouse button.
212
213 //
214 //  When you are in pick mode, you can "Inspect" the object pointed by the mouse.
215 //  When you are on a track, select the menu item "InspectParticle"
216 //  to display the current particle attributes.
217 //
218 //  You can activate the Root browser by selecting the Inspect menu
219 //  in the canvas tool bar menu. Then select "Start Browser"
220 //  This will open a new canvas with the browser. At this point, you may want
221 //  to display some histograms (from the Trees). Go to the "File" menu
222 //  of the browser and click on "New canvas".
223 //  In the browser, click on item "ROOT files" in the left pane.
224 //  Click on galice.root.
225 //  Click on TH
226 //  Click on TPC for example
227 //  Click on any variable (eg TPC.fX) to histogram the variable.
228 //
229 //   If you are lost, you can click on HELP in any Root canvas or browser.
230 //Begin_Html
231 /*
232 <img src="gif/AliMUONDisplay.gif">
233 */
234 //End_Html
235
236
237     fPad = 0;
238     
239     gAlice->SetDisplay(this);
240    
241    // Initialize display default parameters
242     SetRange(200,2000);
243    // Set front view by default
244     fTheta =   0;
245     fPhi   = -90;
246     fPsi   =   0;
247     fChamber = 1;
248     fCathode = 1;
249     //   fRzone   = 1.e10;
250     fDrawClusters  = kTRUE;
251     fDrawCoG       = kTRUE;
252     fDrawCoG  = kTRUE;
253     fZoomMode      = 1;
254     fZooms         = 0;
255     fClustersCuts  = 0;
256     fPoints        = 0;
257     fPhits         = 0;
258     fRpoints       = 0;
259     fR2points = 0;
260     fCpoints = 0;
261     // Create colors
262     CreateColors();
263     // Create display canvas
264     Int_t ysize = size;
265     if (ysize < 100) ysize = 750;
266     Int_t xsize = Int_t(size*830./ysize);
267     fCanvas = new TCanvas("Canvas", "MUON Clusters Display",14,47,xsize,ysize);
268     fCanvas->ToggleEventStatus();
269     
270    // Create main display pad
271     fPad = new TPad("viewpad", "MUON display",0.15,0,0.9,1);
272     fPad->Draw();
273     fPad->Modified();
274     fPad->SetFillColor(30);
275     fPad->SetBorderSize(2);
276
277     fCanvas->cd();
278
279    // Create colors pad
280     fColPad = new TPad("colpad", "Colors pad",0.9,0,1,1);
281     fColPad->Draw();
282     fColPad->SetFillColor(17);
283     fColPad->SetBorderSize(2);
284     fColPad->cd();
285     DisplayColorScale();
286
287     fCanvas->cd();
288    // Create user interface control pad
289     DisplayButtons();
290     fCanvas->cd();
291
292    // Create Range and mode pad
293     Float_t dxtr     = 0.15;
294     Float_t dytr     = 0.45;
295     fTrigPad = new TPad("trigger", "range and mode pad",0,0,dxtr,dytr);
296     fTrigPad->SetEditable(kFALSE);
297     fTrigPad->Draw();
298     fTrigPad->cd();
299     fTrigPad->SetFillColor(22);
300     fTrigPad->SetBorderSize(2);
301     fRangeSlider = new TSlider("range","range",0.7,0.42,0.9,0.98);
302     fRangeSlider->SetObject(this);
303     char pickmode[] = "gAlice->Display()->SetPickMode()";
304     Float_t db = 0.09;
305     fPickButton = new TButton("Pick",pickmode,0.05,0.32,0.65,0.32+db);
306     fPickButton->SetFillColor(38);
307     fPickButton->Draw();
308     char zoommode[] = "gAlice->Display()->SetZoomMode()";
309     fZoomButton = new TButton("Zoom",zoommode,0.05,0.21,0.65,0.21+db);
310     fZoomButton->SetFillColor(38);
311     fZoomButton->Draw();
312     fArcButton = new TArc(.8,fZoomButton->GetYlowNDC()+0.5*db,0.33*db);
313     fArcButton->SetFillColor(kGreen);
314     fArcButton->Draw();
315     char butUnzoom[] = "gAlice->Display()->UnZoom()";
316     TButton *button = new TButton("UnZoom",butUnzoom,0.05,0.05,0.95,0.15);
317     button->SetFillColor(38);
318     button->Draw();
319     AppendPad(); // append display object as last object to force selection
320     
321     fCanvas->cd();
322     fCanvas->Update();
323     fNextCathode = kFALSE; 
324 }
325
326 AliMUONDisplay::AliMUONDisplay(const AliMUONDisplay & display)
327 {
328 // Dummy copy constructor    
329     ;
330 }
331
332
333
334 //_____________________________________________________________________________
335 AliMUONDisplay::~AliMUONDisplay()
336 {
337   // Delete space point structure
338     if (fPoints) fPoints->Delete();
339     delete fPoints;
340     fPoints     = 0;
341     //
342     if (fPhits) fPhits->Delete();
343     delete fPhits;
344     fPhits     = 0;
345     //
346     if (fRpoints) fRpoints->Delete();
347     delete fRpoints;
348     fRpoints     = 0;
349 //
350     if (fR2points) fR2points->Delete();
351     delete fR2points;
352     fR2points     = 0;
353 //
354     if (fCpoints) fCpoints->Delete();
355     delete fCpoints;
356     fCpoints     = 0;
357 }
358
359 //_____________________________________________________________________________
360 void AliMUONDisplay::Clear(Option_t *)
361 {
362 //    Delete graphics temporary objects
363 }
364
365 //_____________________________________________________________________________
366 void AliMUONDisplay::DisplayButtons()
367 {
368 //    Create the user interface buttons
369
370
371     fButtons = new TPad("buttons", "newpad",0,0.45,0.15,1);
372     fButtons->SetEditable(kFALSE);
373     fButtons->Draw();
374     fButtons->SetFillColor(38);
375     fButtons->SetBorderSize(2);
376     fButtons->cd();
377     
378 //   Int_t butcolor = 33;
379     Float_t dbutton = 0.08;
380     Float_t y  = 0.96;
381     Float_t dy = 0.014;
382     Float_t x0 = 0.05;
383     Float_t x1 = 0.95;
384     
385     TButton *button;
386     char but1[] = "gAlice->Display()->ShowNextEvent(1)";
387     button = new TButton("Event +", but1, x0, y - dbutton, x1, y);
388     button->SetFillColor(38);
389     button->Draw();
390     
391     y -= dbutton + dy;
392     char but2[] = "gAlice->Display()->ShowNextEvent(-1)";
393     button = new TButton("Event -", but2, x0, y - dbutton, x1, y);
394     button->SetFillColor(38);
395     button->Draw();
396    
397     y -= dbutton + dy;
398     char but3[] = "((AliMUONDisplay*)(gAlice->Display()))->NextChamber(1)";
399     button = new TButton("Chamber +", but3, x0, y - dbutton, x1, y);
400     button->SetFillColor(38);
401     button->Draw();
402     
403     y -= dbutton + dy;
404     char but4[] = "((AliMUONDisplay*)(gAlice->Display()))->NextChamber(-1)";
405     button = new TButton("Chamber -", but4, x0, y - dbutton, x1, y);
406     button->SetFillColor(38);
407     button->Draw();
408     
409     y -= dbutton + dy;
410     char but5[] = "((AliMUONDisplay*)(gAlice->Display()))->SetChamberAndCathode(1,1)";
411     button = new TButton("Chamber 1", but5, x0, y - dbutton, x1, y);
412     button->SetFillColor(38);
413     button->Draw();
414    
415     y -= dbutton + dy;
416     char but6[] = "((AliMUONDisplay*)(gAlice->Display()))->NextCathode()";
417     button = new TButton("Cathode <>", but6, x0, y - dbutton, x1, y);
418     button->SetFillColor(38);
419     button->Draw();
420
421     y -= dbutton + dy;
422     char but7[] = "((AliMUONDisplay*)(gAlice->Display()))->Trigger()";
423     button = new TButton("Trigger", but7, x0, y - dbutton, x1, y);
424     button->SetFillColor(38);
425     button->Draw();
426     
427    // display logo
428     TDiamond *diamond = new TDiamond(0.05,0.015,0.95,0.22);
429     diamond->SetFillColor(50);
430     diamond->SetTextAlign(22);
431     diamond->SetTextColor(5);
432     diamond->SetTextSize(0.11);
433     diamond->Draw();
434     diamond->AddText(".. ");
435     diamond->AddText("ROOT");
436     diamond->AddText("MUON");
437     diamond->AddText("... ");
438     diamond->AddText(" ");
439 }
440
441 //_____________________________________________________________________________
442 void AliMUONDisplay::CreateColors()
443 {
444 //    Create the colors palette used to display clusters
445
446     Int_t k,i;
447     Int_t color;
448     Float_t r,g,b;
449     
450     for (k=1;k<=5;k++) {
451         switch(k) {
452         case 1:
453             for (i=1;i<=5;i++) {
454                 r=1.;
455                 g=i*0.2;  
456                 b=0.;
457                 color=i;
458                 color=260+23-color;
459                 new TColor(color,r,g,b);
460             } 
461             break;
462         case 2:
463             for (i=1;i<=4;i++) {
464                 r=1.1-i*0.2;
465                 g=1.;  
466                 b=0.;
467                 color=i+5;
468                 color=260+23-color;
469                 new TColor(color,r,g,b);
470             } 
471             break;
472         case 3:
473             for (i=1;i<=4;i++) {
474                 r=0.;
475                 g=1.;  
476                 b=i*0.2+0.2;
477                 color=i+9;
478                 color=260+23-color;
479                 new TColor(color,r,g,b);
480             } 
481             break;
482         case 4:
483             for (i=1;i<=4;i++) {
484                 r=0.;
485                 g=1.1-i*0.2;  
486                 b=1.;
487                 color=i+13;
488                 color=260+23-color;
489                 new TColor(color,r,g,b);
490             } 
491             break;
492         case 5:
493             for (i=1;i<=5;i++) {
494                 r=i*0.2;
495                 g=0.;  
496                 b=1.;
497                 color=i+17;
498                 color=260+23-color;
499                 new TColor(color,r,g,b);
500             } 
501             break;
502         }
503     }
504 }
505
506 //_____________________________________________________________________________
507 void AliMUONDisplay::DisplayColorScale()
508 {
509 // Display pulse height color scale
510     Int_t i;
511     Int_t color;
512     Float_t xlow, ylow, xup, yup, hs;
513     Float_t x1, y1, x2, y2;
514     x1 = y1 = 0;
515     x2 = y2 = 1.0;
516     
517     TText *text = new TText(0,0,"");
518     text->SetTextFont(61);
519     text->SetTextSize(0.2);
520     text->SetTextAlign(22);
521     
522     AliMUON *pMUON  = (AliMUON*)gAlice->GetModule("MUON");
523     AliMUONChamber *iChamber = &(pMUON->Chamber(fChamber-1));
524     AliMUONResponse * response=iChamber->ResponseModel();
525     Int_t adcmax=1024;
526     if (response) adcmax = (Int_t) response->MaxAdc();
527     
528
529     TBox *box;
530     char label[8];
531 //*-* draw colortable boxes
532     hs = (y2-y1)/Float_t(22);
533     xlow=x1+.05;
534     xup=x2-0.5;
535     for (i=0;i<22;i++) {
536         ylow = y1 + hs*(Float_t(i));
537         yup  = y1 + hs*(Float_t(i+1));
538         color = 261+i;
539         Double_t logscale=Double_t(i+1)*(TMath::Log(adcmax)/22);
540         Int_t scale=(Int_t)TMath::Exp(logscale);
541         sprintf(label,"%d",scale);
542         box = new TBox(xlow, ylow, xup, yup);
543         box->Draw();
544         box->SetFillColor(color);
545         text->DrawText(xlow+0.7, 0.5*(ylow+yup),label);
546     }
547 }
548
549 //______________________________________________________________________________
550 Int_t AliMUONDisplay::DistancetoPrimitive(Int_t px, Int_t)
551 {
552 // Compute distance from point px,py to objects in event
553
554     gPad->SetCursor(kCross);
555     
556     if (gPad == fTrigPad) return 9999;
557     
558     const Int_t kBig = 9999;
559     Int_t dist   = kBig;
560     Float_t xmin = gPad->GetX1();
561     Float_t xmax = gPad->GetX2();
562     Float_t dx   = 0.02*(xmax - xmin);
563     Float_t x    = gPad->AbsPixeltoX(px);
564     if (x < xmin+dx || x > xmax-dx) return dist;
565     
566     if (fZoomMode) return 0;
567     else           return 7;
568 }
569
570 //_____________________________________________________________________________
571 void AliMUONDisplay::Draw(Option_t *)
572 {
573 //    Display current event
574
575     fPad->cd();
576
577     DrawView(fTheta, fPhi, fPsi);   
578     // Display the event number and title
579     fPad->cd();
580     DrawTitle();
581 }
582
583 void AliMUONDisplay::DrawSegmentation()
584 {
585 // Draw graphical representation of segmenatation
586 // Attention: still experimental code
587     Int_t icat=1;
588     
589     AliMUON *pMUON  = (AliMUON*)gAlice->GetModule("MUON");
590     AliMUONChamber*   iChamber;
591     AliSegmentation*  seg;
592     iChamber = &(pMUON->Chamber(fChamber));
593     seg=iChamber->SegmentationModel(icat);
594     Float_t zpos=iChamber->Z();
595     Float_t r=iChamber->ROuter();
596     
597     TMarker3DBox *marker;
598     if (icat == 1) {
599         for (Int_t j=0; j<seg->Npy(); j++) {
600             Float_t y0;
601             y0=j*seg->Dpy()-seg->Dpy()/2.;
602             for (seg->FirstPad(0.,y0,0,300,0.); 
603                  seg->MorePads();
604                  seg->NextPad())
605             {
606                 if (seg->ISector()==0) continue;
607                 Float_t x,y,z;
608                 seg->GetPadC(seg->Ix(), seg->Iy(), x, y, z);
609                 Float_t dpx=seg->Dpx(seg->ISector())/2;
610                 Float_t dpy=seg->Dpy(seg->ISector())/2;
611                 marker=new TMarker3DBox(x,y,zpos,dpx,dpy,0,0,0);
612                 marker->SetLineColor(seg->ISector()+1);
613                 marker->SetFillStyle(1001);
614                 marker->SetFillColor(0);
615                 marker->Draw();
616             }
617         }
618     } else {
619         for (Int_t j=0; j<250; j++) {
620             Float_t x0=j*seg->Dpx();
621             Float_t y0=TMath::Sqrt(r*r-x0*x0);
622             
623             for (seg->FirstPad(x0,0,0,0,y0); 
624                  seg->MorePads();
625                  seg->NextPad())
626             {
627                 if (seg->ISector()==0) continue;
628                 
629                 Float_t x,y,z;
630                 seg->GetPadC(seg->Ix(), seg->Iy(), x, y, z);
631                 Float_t dpx=seg->Dpx(seg->ISector())/2;
632                 Float_t dpy=seg->Dpy(seg->ISector())/2;
633                 marker=new TMarker3DBox(x,y,zpos,dpx,dpy,0,0,0);
634                 marker->SetLineColor(seg->ISector()+1);
635                 marker->SetFillStyle(1001);
636                 marker->SetFillColor(0);
637                 marker->Draw();
638             }
639         }
640     }
641 }
642
643 //_____________________________________________________________________________
644 void AliMUONDisplay::DrawClusters()
645 {
646 //    Draw clusters for MUON chambers
647
648     Int_t ndigits, digit;
649     TObjArray *points;
650     AliMUONPoints *pm;
651
652       
653     fClustersCuts = 0;
654     points = Points();
655     if (!points) return;
656     ndigits = points->GetEntriesFast();
657     for (digit=0;digit<ndigits;digit++){
658         pm = (AliMUONPoints*)points->UncheckedAt(digit);
659         if (!pm) continue;
660         Float_t *pxyz;
661         pxyz=pm->GetP();
662         for (Int_t im=0;im<3;im++) {
663             TMarker3DBox *marker=pm->GetMarker(im);
664             if (marker)
665                 marker->Draw();
666         }
667         pm->Draw();
668         fClustersCuts +=pm->GetN();
669     }
670 }
671
672 //_____________________________________________________________________________
673 void AliMUONDisplay::DrawHits()
674 {
675 //    Draw hits for MUON chambers
676
677     LoadHits(fChamber);
678
679     Int_t ntracks, track;
680     TObjArray *points;
681     AliMUONPoints *pm;
682     
683     fHitsCuts = 0;
684     points = Phits();
685     if (!points) return;
686     ntracks = points->GetEntriesFast();
687     for (track=0;track<ntracks;track++) {
688         pm = (AliMUONPoints*)points->UncheckedAt(track);
689         if (!pm) continue;
690         pm->Draw();
691         fHitsCuts += pm->GetN();
692     }
693 }
694
695
696 //_____________________________________________________________________________
697 void AliMUONDisplay::DrawCoG()
698 {
699 //    Draw hits for MUON chambers
700     if (!fDrawCoG) return;
701     if (fChamber > 10) return;
702     LoadCoG(fChamber,fCathode);
703     
704     Int_t ncog, icog;
705     TObjArray *points;
706     AliMUONPoints *pm;
707
708     points = Rpoints();
709     if (!points) return;
710     ncog = points->GetEntriesFast();
711     for (icog=0;icog<ncog;icog++) {
712         pm = (AliMUONPoints*)points->UncheckedAt(icog);
713         if (!pm) continue;
714         pm->Draw();
715     }
716 }
717 void AliMUONDisplay::DrawCoG2()
718 {
719 //    Draw hits for MUON chambers
720
721     if (!fDrawCoG) return;
722     if (fChamber > 10) return;  
723
724     if (fCathode==1) {
725         LoadCoG2(fChamber,2);
726     } else if (fCathode==2) {
727         LoadCoG2(fChamber,1);
728     }
729
730     Int_t ncog, icog;
731     TObjArray *points;
732     AliMUONPoints *pm;
733     
734     points = R2points();
735     if (!points) return;
736     ncog = points->GetEntriesFast();
737     for (icog=0;icog<ncog;icog++) {
738         pm = (AliMUONPoints*)points->UncheckedAt(icog);
739         if (!pm) continue;
740         pm->Draw();
741     }
742 }
743 //_____________________________________________________________________________
744
745 void AliMUONDisplay::DrawTitle(Option_t *option)
746 {
747 //    Draw the event title
748
749     Float_t xmin = gPad->GetX1();
750     Float_t xmax = gPad->GetX2();
751     Float_t ymin = gPad->GetY1();
752     Float_t ymax = gPad->GetY2();
753     Float_t dx   = xmax-xmin;
754     Float_t dy   = ymax-ymin;
755     
756     if (strlen(option) == 0) {
757         TPaveText *title = new TPaveText(xmin +0.01*dx, ymax-0.09*dy, xmin +0.5*dx, ymax-0.01*dy);
758 //      title->SetTextSize(0.023932);
759         title->SetTextSize(0.02);
760         title->SetBit(kCanDelete);
761         title->SetFillColor(42);
762         title->Draw();
763         char ptitle[100];
764         sprintf(ptitle, "Alice event:%d Run:%d Chamber:%d Cathode:%d",
765                 gAlice->GetHeader()->GetEvent(),
766                 gAlice->GetHeader()->GetRun(),
767                 fChamber,
768                 fCathode);
769         title->AddText(ptitle);
770         Int_t nparticles = gAlice->Particles()->GetEntriesFast();
771         sprintf(ptitle,"Nparticles = %d Nhits = %d Npads fired = %d",
772                 nparticles, fHitsCuts,fClustersCuts);
773         title->AddText(ptitle);
774     } else {
775         TPaveLabel *label = new TPaveLabel(xmin +0.01*dx, ymax-0.07*dy, xmin +0.2*dx, ymax-0.01*dy,option);
776         label->SetBit(kCanDelete);
777         label->SetFillColor(42);
778         label->Draw();
779     }
780 }
781
782 //_____________________________________________________________________________
783 void AliMUONDisplay::DrawView(Float_t theta, Float_t phi, Float_t psi)
784 {
785 //    Draw a view of MUON clusters
786     printf("\n Draw View");
787     
788     gPad->SetCursor(kWatch);
789     // gPad->SetFillColor(39);
790     gPad->SetFillColor(1);
791     gPad->Clear();
792     // gPad->SetFillColor(39);
793     gPad->SetFillColor(1);
794     
795
796     Int_t iret=0;
797     TView *view = new TView(1);
798     
799     Float_t range = fRrange*fRangeSlider->GetMaximum();
800     view->SetRange(-range,-range,-range,range, range, range);
801     // zoom back to full scale only if DrawView not called from NextCathode
802     if (!fNextCathode) {
803         fZoomX0[0] = -1;
804         fZoomY0[0] = -1;
805         fZoomX1[0] =  1;
806         fZoomY1[0] =  1;
807         fZooms = 0;
808     }
809
810 // Display MUON Chamber Geometry
811     char nodeName[7];
812     sprintf(nodeName,"MUON%d",100+fChamber);
813     
814     TNode *node1=gAlice->GetGeometry()->GetNode(nodeName);
815     if (node1) node1->Draw("same");  
816 //add clusters to the pad
817     DrawClusters();
818     DrawHits();
819     DrawCoG();
820     DrawCoG2();
821 //     DrawSegmentation();
822     // add itself to the list (must be last)
823     AppendPad();
824     view->SetView(phi, theta, psi, iret);
825 }
826
827
828 //______________________________________________________________________________
829 void AliMUONDisplay::ExecuteEvent(Int_t event, Int_t px, Int_t py)
830 {
831 //  Execute action corresponding to the mouse event
832
833     static Float_t x0, y0, x1, y1;
834     
835     static Int_t pxold, pyold;
836     static Int_t px0, py0;
837     static Int_t linedrawn;
838     Float_t temp;
839     
840     if (px == 0 && py == 0) { //when called by sliders
841         if (event == kButton1Up) {
842             Draw();
843         }
844         return;
845     }
846     if (!fZoomMode && gPad->GetView()) {
847         gPad->GetView()->ExecuteRotateView(event, px, py);
848         return;
849     }
850
851     // something to zoom ?
852     gPad->SetCursor(kCross);
853     
854     switch (event) {
855
856     case kButton1Down:
857         gVirtualX->SetLineColor(-1);
858         gPad->TAttLine::Modify();  //Change line attributes only if necessary
859         x0 = gPad->AbsPixeltoX(px);
860         y0 = gPad->AbsPixeltoY(py);
861         px0   = px; py0   = py;
862         pxold = px; pyold = py;
863         linedrawn = 0;
864         return;
865         
866     case kButton1Motion:
867         if (linedrawn) gVirtualX->DrawBox(px0, py0, pxold, pyold, TVirtualX::kHollow);
868         pxold = px;
869         pyold = py;
870         linedrawn = 1;
871         gVirtualX->DrawBox(px0, py0, pxold, pyold,  TVirtualX::kHollow);
872         return;
873         
874     case kButton1Up:
875         gPad->GetCanvas()->FeedbackMode(kFALSE);
876         if (px == px0) return;
877         if (py == py0) return;
878         x1 = gPad->AbsPixeltoX(px);
879         y1 = gPad->AbsPixeltoY(py);
880         
881         if (x1 < x0) {temp = x0; x0 = x1; x1 = temp;}
882         if (y1 < y0) {temp = y0; y0 = y1; y1 = temp;}
883         gPad->Range(x0,y0,x1,y1);
884         if (fZooms < AliMUONConstants::MaxZoom()-1) {
885             fZooms++;
886             fZoomX0[fZooms] = x0;
887             fZoomY0[fZooms] = y0;
888             fZoomX1[fZooms] = x1;
889             fZoomY1[fZooms] = y1;
890         }
891         gPad->Modified(kTRUE);
892         return;
893     }
894 }
895  
896 //___________________________________________
897 void AliMUONDisplay::LoadDigits(Int_t chamber, Int_t cathode)
898 {
899 // Read digits info and store x,y,z info in arrays fPoints
900 // Loop on all detectors
901
902     if (chamber > 14) return;
903     printf(" chamber %d \n",chamber);
904     fChamber = chamber;
905     fCathode = cathode;
906     
907     ResetPoints();
908     
909     AliMUON *pMUON  =     (AliMUON*)gAlice->GetModule("MUON");
910     AliMUONChamber*       iChamber;
911     AliSegmentation*      segmentation;
912     AliMUONResponse*      response;
913
914     TClonesArray *muonDigits  = pMUON->DigitsAddress(chamber-1);
915     if (muonDigits == 0) return;
916
917     gAlice->ResetDigits();
918     Int_t nent = 0;
919  
920    if (gAlice->TreeD()) {
921      nent = (Int_t) gAlice->TreeD()->GetEntries();
922      printf(" entries %d \n", nent);
923      //     gAlice->TreeD()->GetEvent(nent-2+cathode-1);
924      gAlice->TreeD()->GetEvent(cathode-1);
925     }
926     
927     Int_t ndigits = muonDigits->GetEntriesFast();
928     if (ndigits == 0) return;
929     if (fPoints == 0) fPoints = new TObjArray(ndigits);
930     
931     iChamber = &(pMUON->Chamber(chamber-1));
932
933     segmentation = iChamber->SegmentationModel(cathode);
934     response     = iChamber->ResponseModel();
935     Float_t zpos = iChamber->Z();
936
937     AliMUONDigit  *mdig;
938     AliMUONPoints *points  = 0;
939     TMarker3DBox  *marker  = 0;
940     //
941     //loop over all digits and store their position
942     
943     Int_t npoints  = 1;
944     Float_t adcmax = 1024;
945     if (response) adcmax = response->MaxAdc();
946
947     for (Int_t digit = 0; digit < ndigits; digit++) {
948         mdig    = (AliMUONDigit*)muonDigits->UncheckedAt(digit);
949         if (mdig->Cathode() != cathode-1) continue;
950
951         //
952         // First get all needed parameters
953         //
954         Int_t charge = mdig->Signal();
955         Int_t index  = Int_t(TMath::Log(charge)/(TMath::Log(adcmax)/22));
956         Int_t color  = 261+index;
957         Int_t colorTrigger = 2;   
958         if (color > 282) color = 282;
959
960         if (chamber > 10) { // trigger chamber 
961             Int_t sumCharge = 0;
962             for (Int_t icharge = 0; icharge < 10; icharge++) {
963                 sumCharge = sumCharge+mdig->TrackCharge(icharge);
964             }
965             Int_t testCharge = sumCharge-(Int_t(sumCharge/10))*10;
966             if(sumCharge <= 10 || testCharge > 0) {
967                 colorTrigger = color; 
968             } else {
969                 colorTrigger = 5; 
970             }
971         }
972
973         // get the center of the pad - add on x and y half of pad size
974         Float_t xpad, ypad, zpad;
975         segmentation->GetPadC(mdig->PadX(), mdig->PadY(), xpad, ypad, zpad);
976         
977         Int_t   isec = segmentation->Sector(mdig->PadX(), mdig->PadY());
978         Float_t  dpx = segmentation->Dpx(isec)/2;
979         Float_t  dpy = segmentation->Dpy(isec)/2;
980 //
981 //      segmentation->Dump();
982         
983         //
984         // Then set the objects
985         //
986         points = new AliMUONPoints(npoints);
987         fPoints->AddAt(points,digit);
988         if (chamber > 10) {
989             points->SetMarkerColor(colorTrigger);
990         } else {  
991             points->SetMarkerColor(color);
992         }
993         points->SetMarkerStyle(21);
994         points->SetMarkerSize(0.5);
995         points->SetParticle(-1);
996         points->SetHitIndex(-1);
997         points->SetTrackIndex(-1);
998         points->SetDigitIndex(digit);
999         points->SetPoint(0,xpad,ypad,zpos);     
1000
1001         Int_t lineColor = (zpad-zpos > 0) ? 2:3;
1002         marker=new TMarker3DBox(xpad,ypad,zpos,dpx,dpy,0,0,0);
1003
1004             
1005         marker->SetLineColor(lineColor);
1006         marker->SetFillStyle(1001);
1007         marker->SetFillColor(color);
1008         marker->SetRefObject((TObject*)points);
1009         points->Set3DMarker(0, marker);
1010     }
1011 }
1012 //___________________________________________
1013 void AliMUONDisplay::LoadCoG(Int_t chamber, Int_t cathode)
1014 {
1015 // Read raw clusters info and store x,y,z info in arrays fRpoints
1016 // Loop on all detectors
1017
1018     if (chamber > 10) return;
1019     
1020     ResetRpoints();
1021     
1022     AliMUON *pMUON  = (AliMUON*)gAlice->GetModule("MUON");
1023     AliMUONChamber*  iChamber;
1024     
1025     TClonesArray *muonRawClusters  = pMUON->RawClustAddress(chamber-1);
1026     if (muonRawClusters == 0) return;
1027
1028     pMUON->ResetRawClusters();
1029
1030     Int_t nent = 0;
1031     if (gAlice->TreeR()) {
1032         nent=(Int_t)gAlice->TreeR()->GetEntries();
1033         gAlice->TreeR()->GetEvent(cathode-1);
1034     }
1035     
1036     Int_t nrawcl = muonRawClusters->GetEntriesFast();
1037     if (nrawcl == 0) return;
1038     if (fRpoints == 0) fRpoints = new TObjArray(nrawcl);
1039     
1040     iChamber = &(pMUON->Chamber(chamber-1));
1041     Float_t zpos=iChamber->Z();  
1042     AliMUONRawCluster  *mRaw;
1043     AliMUONPoints *points = 0;
1044     //
1045     //loop over all raw clusters and store their position
1046     points = new AliMUONPoints(nrawcl);
1047     for (Int_t iraw=0;iraw<nrawcl;iraw++) {
1048         mRaw   = (AliMUONRawCluster*)muonRawClusters->UncheckedAt(iraw);
1049         fRpoints->AddAt(points,iraw);
1050         points->SetMarkerColor(51);
1051         points->SetMarkerStyle(2);
1052         points->SetMarkerSize(1.);
1053         points->SetParticle(-1);
1054         points->SetHitIndex(-1);
1055         points->SetTrackIndex(-1);
1056         points->SetDigitIndex(-1);
1057         points->SetPoint(iraw,mRaw->fX[0],mRaw->fY[0],zpos);
1058     }
1059 }
1060 //___________________________________________
1061 void AliMUONDisplay::LoadCoG2(Int_t chamber, Int_t cathode)
1062 {
1063 // Read raw clusters info and store x,y,z info in arrays fRpoints
1064 // Loop on all detectors
1065
1066     if (chamber > 10) return;
1067
1068     ResetR2points();
1069
1070     AliMUON *pMUON  = (AliMUON*)gAlice->GetModule("MUON");
1071     AliMUONChamber*  iChamber;
1072     
1073     TClonesArray *muonRawClusters  = pMUON->RawClustAddress(chamber-1);
1074     if (muonRawClusters == 0) return;
1075     
1076     pMUON->ResetRawClusters();
1077     
1078     Int_t nent = 0;
1079     if (gAlice->TreeR()) {
1080         nent=(Int_t)gAlice->TreeR()->GetEntries();
1081         gAlice->TreeR()->GetEvent(nent-2+cathode-1);
1082     }
1083     
1084     Int_t nrawcl = muonRawClusters->GetEntriesFast();
1085     if (nrawcl == 0) return;
1086     if (fR2points == 0) fR2points = new TObjArray(nrawcl);
1087     
1088     iChamber = &(pMUON->Chamber(chamber-1));
1089     Float_t zpos=iChamber->Z();  
1090     AliMUONRawCluster  *mRaw;
1091     AliMUONPoints *points = 0;
1092     //
1093     //loop over all raw clusters and store their position
1094     points = new AliMUONPoints(nrawcl);
1095     for (Int_t iraw=0;iraw<nrawcl;iraw++) {
1096         mRaw   = (AliMUONRawCluster*)muonRawClusters->UncheckedAt(iraw);
1097         fR2points->AddAt(points,iraw);
1098         points->SetMarkerColor(51);
1099         points->SetMarkerStyle(4);
1100         points->SetMarkerSize(1.3);
1101         points->SetParticle(-1);
1102         points->SetHitIndex(-1);
1103         points->SetTrackIndex(-1);
1104         points->SetDigitIndex(-1);
1105         points->SetPoint(iraw,mRaw->fX[0],mRaw->fY[0],zpos);
1106    }
1107 }
1108 //___________________________________________
1109 void AliMUONDisplay::LoadHits(Int_t chamber)
1110 {
1111 // Read hits info and store x,y,z info in arrays fPhits
1112 // Loop on all detectors
1113
1114     if (chamber > 14) return;
1115     Int_t track;
1116
1117     fChamber=chamber;
1118  
1119     ResetPhits();
1120     
1121     AliMUON *pMUON  = (AliMUON*)gAlice->GetModule("MUON");
1122     AliMUONChamber*  iChamber;
1123
1124     iChamber = &(pMUON->Chamber(chamber-1));
1125     Float_t zpos=iChamber->Z();
1126
1127     Int_t ntracks = (Int_t)gAlice->TreeH()->GetEntries();
1128     Int_t nthits  = 0;
1129     for (track = 0; track < ntracks; track++) {
1130         gAlice->ResetHits();
1131         gAlice->TreeH()->GetEvent(track);
1132         TClonesArray *muonHits  = pMUON->Hits();
1133         if (muonHits == 0) return;
1134         nthits += muonHits->GetEntriesFast();
1135     } 
1136     if (fPhits == 0) fPhits = new TObjArray(nthits);
1137     Int_t nhold=0;
1138     for (track=0; track<ntracks;track++) {
1139         gAlice->ResetHits();
1140         gAlice->TreeH()->GetEvent(track);
1141         TClonesArray *muonHits  = pMUON->Hits();
1142         if (muonHits == 0) return;
1143         Int_t nhits = muonHits->GetEntriesFast();
1144         if (nhits == 0) continue;
1145         AliMUONHit *mHit;
1146         AliMUONPoints *points = 0;
1147         Int_t npoints=1;
1148         for (Int_t hit=0;hit<nhits;hit++) {
1149             mHit = (AliMUONHit*)muonHits->UncheckedAt(hit);
1150             Int_t nch  = mHit->Chamber();              // chamber number
1151             if (nch != chamber) continue;
1152             //
1153             // Retrieve info and set the objects
1154             //
1155             points = new AliMUONPoints(npoints);
1156             fPhits->AddAt(points,nhold+hit);
1157             points->SetMarkerColor(kRed);
1158             points->SetMarkerStyle(5);
1159             points->SetMarkerSize(1.);
1160             points->SetParticle(mHit->Track());
1161             points->SetHitIndex(hit);
1162             points->SetTrackIndex(track);
1163             points->SetDigitIndex(-1);
1164             points->SetPoint(0,mHit->X(),mHit->Y(),zpos);
1165         }
1166         nhold+=nhits;
1167     }
1168 }
1169
1170 //_____________________________________________________________________________
1171 void AliMUONDisplay::Paint(Option_t *)
1172 {
1173 //    Paint miscellaneous items
1174 }
1175
1176 //_____________________________________________________________________________
1177 void AliMUONDisplay::SetPickMode()
1178 {
1179 // Set parameters for pick mode.
1180 // 
1181     fZoomMode = 0;
1182
1183     fArcButton->SetY1(fPickButton->GetYlowNDC()+0.5*fPickButton->GetHNDC());
1184     fTrigPad->Modified();
1185 }
1186
1187 //_____________________________________________________________________________
1188 void AliMUONDisplay::SetZoomMode()
1189 {
1190 //  Set parameters for zoom mode
1191     fZoomMode = 1;
1192     
1193     fArcButton->SetY1(fZoomButton->GetYlowNDC()+0.5*fZoomButton->GetHNDC());
1194     fTrigPad->Modified();
1195 }
1196
1197 //_____________________________________________________________________________
1198 void AliMUONDisplay::NextChamber(Int_t delta)
1199 {
1200   // to go from chamber to next chamber if delta = 1
1201   // or previous chamber otherwise
1202     if (delta == 1) {
1203         if (fChamber < AliMUONConstants::NCh()) fChamber++;
1204     } else {
1205         if (fChamber > 1) fChamber--;
1206     }
1207     if (!fPad) return;
1208     fPad->Clear();
1209     LoadDigits(fChamber, fCathode);
1210     Draw();
1211 }
1212
1213 //_____________________________________________________________________________
1214 void AliMUONDisplay::NextCathode()
1215 {
1216     // to switch to other cathode plane
1217     if (!fPad) return;
1218     fPad->Clear();
1219     if (fCathode == 1) {
1220         LoadDigits(fChamber, 2);        
1221     } else {
1222         LoadDigits(fChamber, 1);
1223     }
1224     fNextCathode = kTRUE; // to keep the same zoom
1225     Draw();
1226     fNextCathode = kFALSE;
1227     TPad *pad = (TPad*)gPad->GetPadSave();
1228     pad->Range(fZoomX0[fZooms], fZoomY0[fZooms],
1229                fZoomX1[fZooms], fZoomY1[fZooms]);
1230     pad->Modified();
1231     fPad->cd();
1232     DrawTitle();
1233 }
1234
1235 //_____________________________________________________________________________
1236 void AliMUONDisplay::Trigger()
1237 {
1238   // returns Trigger Decision for current event
1239   AliMUONTriggerDecision* decision= new AliMUONTriggerDecision(1);
1240   decision->Trigger(); 
1241 }
1242
1243
1244 //_____________________________________________________________________________
1245 void AliMUONDisplay::SetChamberAndCathode(Int_t chamber, Int_t cathode)
1246 {
1247 // Set chamber and cathode number
1248    fChamber = chamber;
1249    fCathode = cathode;
1250
1251    if (!fPad) return;
1252    fPad->Clear();
1253    LoadDigits(chamber,cathode);
1254    Draw();
1255 }
1256
1257 void AliMUONDisplay::SetEvent(Int_t newevent)
1258 {
1259 // Chose event 
1260     gAlice->GetEvent(newevent);
1261     fEvent=newevent;
1262     if (!gAlice->TreeD()) return; 
1263     if (!fPad) return;
1264     fPad->Clear();
1265     LoadDigits(fChamber,fCathode);
1266     Draw();
1267 }
1268
1269 //_____________________________________________________________________________
1270 void AliMUONDisplay::SetRange(Float_t rrange, Float_t zrange)
1271 {
1272 // Set view range along R and Z
1273     fRrange = rrange;
1274     fZrange = zrange;
1275
1276     if (!fPad) return;
1277     fPad->Clear();
1278     Draw();
1279 }
1280    
1281 //_____________________________________________________________________________
1282 void AliMUONDisplay::SetView(Float_t theta, Float_t phi, Float_t psi)
1283 {
1284 //  change viewing angles for current event
1285
1286     fPad->cd();
1287     fPhi   = phi;
1288     fTheta = theta;
1289     fPsi   = psi;
1290     Int_t iret = 0;
1291     
1292     TView *view = gPad->GetView();
1293     if (view) view->SetView(fPhi, fTheta, fPsi, iret);
1294     else      Draw();
1295     gPad->Modified();
1296 }
1297
1298 //_____________________________________________________________________________
1299 void AliMUONDisplay::ShowNextEvent(Int_t delta)
1300 {
1301 //  Display (current event_number + delta)
1302 //    delta =  1  shown next event
1303 //    delta = -1 show previous event
1304     if (delta) {
1305         gAlice->Clear();
1306         Int_t currentEvent = gAlice->GetHeader()->GetEvent();
1307         Int_t newEvent     = currentEvent + delta;
1308         gAlice->GetEvent(newEvent);
1309         fEvent=newEvent;
1310         if (!gAlice->TreeD()) return; 
1311     }
1312     
1313     LoadDigits(fChamber, fCathode);
1314     fPad->cd(); 
1315     Draw();
1316 }
1317
1318 //______________________________________________________________________________
1319 void AliMUONDisplay::UnZoom()
1320 {
1321 // Unzoom 
1322     if (fZooms <= 0) return;
1323     fZooms--;
1324     TPad *pad = (TPad*)gPad->GetPadSave();
1325     pad->Range(fZoomX0[fZooms],fZoomY0[fZooms], fZoomX1[fZooms],fZoomY1[fZooms]);
1326     pad->Modified();
1327 }
1328
1329 //_____________________________________________________________________________
1330 void AliMUONDisplay::ResetPoints()
1331 {
1332     //
1333     // Reset array of points
1334     //
1335     if (fPoints) {
1336         fPoints->Delete();
1337         delete fPoints;
1338         fPoints = 0;
1339     }
1340 }
1341 //_____________________________________________________________________________
1342 void AliMUONDisplay::ResetPhits()
1343 {
1344     //
1345     // Reset array of points
1346     //
1347     if (fPhits) {
1348         fPhits->Delete();
1349         delete fPhits;
1350         fPhits = 0;
1351     }
1352 }
1353 //_____________________________________________________________________________
1354 void AliMUONDisplay::ResetRpoints()
1355 {
1356   //
1357   // Reset array of points
1358   //
1359     if (fRpoints) {
1360         fRpoints->Delete();
1361         delete fRpoints;
1362         fRpoints = 0;
1363     }
1364 }
1365 //_____________________________________________________________________________
1366 void AliMUONDisplay::ResetR2points()
1367 {
1368   //
1369   // Reset array of points
1370   //
1371     if (fR2points) {
1372         fR2points->Delete();
1373         delete fR2points;
1374         fR2points = 0;
1375     }
1376 }
1377 //_____________________________________________________________________________
1378 void AliMUONDisplay::ResetCpoints()
1379 {
1380     //
1381     // Reset array of points
1382     //
1383   if (fCpoints) {
1384       fCpoints->Delete();
1385       delete fCpoints;
1386       fCpoints = 0;
1387   }
1388 }
1389
1390
1391 AliMUONDisplay & AliMUONDisplay::operator = (const AliMUONDisplay &)
1392 {
1393 // Dummy assignment operator
1394     return *this;
1395 }
1396
1397
1398
1399
1400
1401
1402
1403
1404