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