1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 Revision 1.10 1999/11/10 07:37:04 fca
19 Pads do not inherit editability from canvas any more
21 Revision 1.9 1999/11/09 07:38:51 fca
22 Changes for compatibility with version 2.23 of ROOT
24 Revision 1.8 1999/09/29 09:24:23 fca
25 Introduction of the Copyright and cvs Log
30 //////////////////////////////////////////////////////////////////////////
34 // Utility class to display ALICE outline, tracks, hits,.. //
36 //////////////////////////////////////////////////////////////////////////
46 #include <TPolyMarker3D.h>
47 #include <TPaveLabel.h>
48 #include <TPaveText.h>
55 #include <TSliderBox.h>
57 #include <TVirtualX.h>
61 #include <TObjArray.h>
62 #include <X3DBuffer.h>
65 #include "AliDetector.h"
67 #include "AliITSdigitNew.h"
68 #include "AliITSMap.h"
69 #include "AliITSresponseV0.h"
70 #include "AliITSdisplay.h"
71 #include "AliITSpoints.h"
72 #include "TParticle.h"
75 const Int_t kMAXHIST = 20;
77 static Int_t sModule=0;
80 ClassImp(AliITSdisplay)
83 //_____________________________________________________________________________
84 AliITSdisplay::AliITSdisplay()
97 //_____________________________________________________________________________
98 AliITSdisplay::AliITSdisplay(Int_t size)
100 // Create an event display object.
101 // A canvas named "edisplay" is created with a vertical size in pixels
103 // A QUICK Overview of the Event Display functions
104 // ===============================================
106 // The event display can ve invoked by executing the macro "display.C"
107 // A canvas like in the picture below will appear.
109 // On the left side of the canvas, the following buttons appear:
110 // *Next* to move to the next event
111 // *Previous* to move to the previous event
113 // *Pick* Select this option to be able to point on a track with the
114 // mouse. Once on the track, use the right button to select
115 // an action. For example, select SetMarkerAttributes to
116 // change the marker type/color/size for the track.
117 // *Zoom* Select this option (default) if you want to zoom.
118 // To zoom, simply select the selected area with the left button.
119 // *UnZoom* To revert to the previous picture size.
121 // slider R On the left side, the vertical slider can be used to
122 // set the default picture size.
124 // When you are in Zoom mode, you can click on the black part of the canvas
125 // to select special options with the right mouse button.
128 // When you are in pick mode, you can "Inspect" the object pointed by the mouse.
129 // When you are on a track, select the menu item "InspectParticle"
130 // to display the current particle attributes.
132 // You can activate the Root browser by selecting the Inspect menu
133 // in the canvas tool bar menu. Then select "Start Browser"
134 // This will open a new canvas with the browser. At this point, you may want
135 // to display some histograms (from the Trees). Go to the "File" menu
136 // of the browser and click on "New canvas".
137 // In the browser, click on item "ROOT files" in the left pane.
138 // Click on galice.root.
140 // Click on TPC for example
141 // Click on any variable (eg TPC.fX) to histogram the variable.
143 // If you are lost, you can click on HELP in any Root canvas or browser.
146 <img src="gif/aliITSdisplay.gif">
153 gAlice->SetDisplay(this);
155 // Set module view by default
165 AliITS *ITS = (AliITS*)gAlice->GetModule("ITS");
166 AliITSgeom *gm=ITS->GetITSgeom();
167 gm->GetModuleId(fModule,fLayer,fLadder,fDetector);
170 fDrawClusters = kTRUE;
172 fDrawCathCor = kFALSE;
188 // Initialize display default parameters
192 // Create display canvas
194 if (ysize < 100) ysize = 750;
195 Int_t xsize = Int_t(size*830./ysize);
196 fCanvas = new TCanvas("ModuleCanvas", "ITS Clusters Display",14,47,xsize,ysize);
197 fCanvas->ToggleEventStatus();
199 // Create main display pad
200 fPad = new TPad("mviewpad", "ITS display",0.15,0,0.9,1);
203 fPad->SetFillColor(1);
204 fPad->SetBorderSize(2);
209 fColPad = new TPad("colpad", "Colors pad",0.9,0,1,1);
212 fColPad->SetFillColor(19);
213 fColPad->SetBorderSize(2);
219 // Create user interface control pad
223 // Create Range and mode pad
226 fTrigPad = new TPad("mtrigger", "range and mode pad",0,0,dxtr,dytr);
227 fTrigPad->SetEditable(kFALSE);
230 fTrigPad->SetFillColor(22);
231 fTrigPad->SetBorderSize(2);
232 fRangeSlider = new TSlider("mrange","range",0.7,0.42,0.9,0.98);
233 fRangeSlider->SetObject(this);
234 //char pickmode[] = "gAlice->Display()->SetPickMode()";
235 char pickmode[] = "((AliITSdisplay*)(gAlice->Display()))->SetPickMode()";
237 fPickButton = new TButton("Pick",pickmode,0.05,0.32,0.65,0.32+db);
238 fPickButton->SetFillColor(38);
240 //char zoommode[] = "gAlice->Display()->SetZoomMode()";
241 char zoommode[] = "((AliITSdisplay*)(gAlice->Display()))->SetZoomMode()";
242 fZoomButton = new TButton("Zoom",zoommode,0.05,0.21,0.65,0.21+db);
243 fZoomButton->SetFillColor(38);
245 fArcButton = new TArc(.8,fZoomButton->GetYlowNDC()+0.5*db,0.33*db);
246 fArcButton->SetFillColor(kGreen);
248 //char butUnzoom[] = "gAlice->Display()->UnZoom()";
249 char butUnzoom[] = "((AliITSdisplay*)(gAlice->Display()))->UnZoom()";
250 TButton *button = new TButton("UnZoom",butUnzoom,0.05,0.05,0.95,0.15);
251 button->SetFillColor(38);
253 AppendPad(); // append display object as last object to force selection
259 CreateModuleCanvas(size);
263 //_____________________________________________________________________________
264 void AliITSdisplay::CreateModuleCanvas(Int_t size)
267 // Initialize display default parameters
271 // Create display canvas
273 if (ysize < 100) ysize = 750;
274 Int_t xsize = Int_t(size*830./ysize);
275 fCanvas = new TCanvas("ModuleCanvas", "ITS Clusters Display",14,47,xsize,ysize);
276 fCanvas->ToggleEventStatus();
280 fCanvas->GetCanvasPar(wtopx,wtopy,ww,wh);
282 Float_t cx = gStyle->GetScreenFactor();
284 printf("CreateCanvas: cx wtopx wtopy ww wh %f %d %d %d %d\n", cx,wtopx,wtopy,ww,wh);
289 Int_t fCanvasID=fCanvas->GetCanvasID();
290 gVirtualX->GetGeometry(fCanvasID, dum1, dum2, fCw, fCh);
292 printf("CreateCanvas: fCw, fCh %d %d \n", fCw, fCh );
296 // Create main display pad
297 fPad = new TPad("mviewpad", "ITS display",0.15,0,0.9,1);
300 fPad->SetFillColor(1);
301 fPad->SetBorderSize(2);
306 fColPad = new TPad("colpad", "Colors pad",0.9,0,1,1);
309 fColPad->SetFillColor(19);
310 fColPad->SetBorderSize(2);
316 // Create user interface control pad
320 // Create Range and mode pad
323 fTrigPad = new TPad("mtrigger", "range and mode pad",0,0,dxtr,dytr);
324 fTrigPad->SetEditable(kFALSE);
327 fTrigPad->SetFillColor(22);
328 fTrigPad->SetBorderSize(2);
329 fRangeSlider = new TSlider("mrange","range",0.7,0.42,0.9,0.98);
330 fRangeSlider->SetObject(this);
332 // to use "gAlice->Display()->SetPickMode()" KEEP "trigger" instead
333 // of "mtrigger" and "range" instead of "mrange" !!!! - do NOT change
334 // the pad names if mix methods from AliDisplay and AliITSdisplay !
336 //char pickmode[] = "gAlice->Display()->SetPickMode()";
337 char pickmode[] = "((AliITSdisplay*)(gAlice->Display()))->SetPickMode()";
339 fPickButton = new TButton("Pick",pickmode,0.05,0.32,0.65,0.32+db);
340 fPickButton->SetFillColor(38);
342 //char zoommode[] = "gAlice->Display()->SetZoomMode()";
343 char zoommode[] = "((AliITSdisplay*)(gAlice->Display()))->SetZoomMode()";
344 fZoomButton = new TButton("Zoom",zoommode,0.05,0.21,0.65,0.21+db);
345 fZoomButton->SetFillColor(38);
347 fArcButton = new TArc(.8,fZoomButton->GetYlowNDC()+0.5*db,0.33*db);
348 fArcButton->SetFillColor(kGreen);
350 //char butUnzoom[] = "gAlice->Display()->UnZoom()";
351 char butUnzoom[] = "((AliITSdisplay*)(gAlice->Display()))->UnZoom()";
352 TButton *button = new TButton("UnZoom",butUnzoom,0.05,0.05,0.95,0.15);
353 button->SetFillColor(38);
355 AppendPad(); // append display object as last object to force selection
362 //_____________________________________________________________________________
363 AliITSdisplay::~AliITSdisplay()
365 // Delete space point structure
366 if (fPoints) fPoints->Delete();
370 if (fPhits) fPhits->Delete();
374 if (fRpoints) fRpoints->Delete();
378 if (fR2points) fR2points->Delete();
382 if (fCpoints) fCpoints->Delete();
387 //_____________________________________________________________________________
388 void AliITSdisplay::Clear(Option_t *)
390 // Delete graphics temporary objects
393 //_____________________________________________________________________________
394 void AliITSdisplay::DisplayButtons()
396 // Create the user interface buttons
399 fButtons = new TPad("buttons", "newpad",0,0.45,0.15,1);
400 fButtons->SetEditable(kFALSE);
402 fButtons->SetFillColor(38);
403 fButtons->SetBorderSize(2);
406 // Int_t butcolor = 33;
407 Float_t dbutton = 0.08;
414 char but1[] = "((AliITSdisplay*)(gAlice->Display()))->ShowNextEvent(1)";
415 button = new TButton("Next",but1,x0,y-dbutton,x1,y);
416 button->SetFillColor(38);
420 //char but2[] = "gAlice->Display()->ShowNextEvent(-1)";
421 char but2[] = "((AliITSdisplay*)(gAlice->Display()))->ShowNextEvent(-1)";
422 button = new TButton("Previous",but2,x0,y-dbutton,x1,y);
423 button->SetFillColor(38);
427 char but3[] = "((AliITSdisplay*)(gAlice->Display()))->NextModule(1)";
428 button = new TButton("Module +", but3, x0, y - dbutton, x1, y);
429 button->SetFillColor(38);
433 char but4[] = "((AliITSdisplay*)(gAlice->Display()))->NextModule(-1)";
434 button = new TButton("Module -", but4, x0, y - dbutton, x1, y);
435 button->SetFillColor(38);
439 char but5[] = "((AliITSdisplay*)(gAlice->Display()))->DrawHistograms()";
440 button = new TButton("DrawHist", but5, x0, y - dbutton, x1, y);
441 button->SetFillColor(38);
445 char but6[] = "((AliITSdisplay*)(gAlice->Display()))->Trigger()";
446 button = new TButton("Trigger",but6,x0,y-dbutton,x1,y);
447 button->SetFillColor(38);
451 TDiamond *diamond = new TDiamond(0.05,0.015,0.95,0.22);
452 diamond->SetFillColor(50);
453 diamond->SetTextAlign(22);
454 diamond->SetTextColor(5);
455 diamond->SetTextSize(0.11);
457 diamond->AddText(".. ");
458 diamond->AddText("ROOT");
459 diamond->AddText("ITS");
460 diamond->AddText("... ");
461 diamond->AddText(" ");
464 //_____________________________________________________________________________
465 void AliITSdisplay::CreateColors()
467 // Create the colors palette used to display clusters
482 new TColor(color,r,g,b);
492 new TColor(color,r,g,b);
502 new TColor(color,r,g,b);
512 new TColor(color,r,g,b);
522 new TColor(color,r,g,b);
531 //_____________________________________________________________________________
532 void AliITSdisplay::DisplayColorScale()
537 Float_t xlow, ylow, xup, yup, hs;
538 Float_t x1, y1, x2, y2;
542 printf("DisplayColorScale - gPad %p\n",gPad);
545 gPad->SetFillColor(0);
547 gPad->Range(x1,y1,x2,y2);
550 fColPad->SetFillColor(0);
552 fColPad->Range(x1,y1,x2,y2);
554 TText *text = new TText(0,0,"");
555 text->SetTextFont(61);
556 text->SetTextSize(0.2);
557 text->SetTextAlign(22);
560 AliMUON *MUON = (AliMUON*)gAlice->GetModule("MUON");
561 AliMUONchamber *iChamber = &(MUON->Chamber(fChamber-1));
562 AliMUONresponse * response=iChamber->GetResponseModel();
563 Int_t adcmax= (Int_t) response->MaxAdc();
571 //*-* draw colortable boxes
572 hs = (y2-y1)/Float_t(22);
576 ylow = y1 + hs*(Float_t(i));
577 yup = y1 + hs*(Float_t(i+1));
579 Double_t logscale=Double_t(i+1)*(TMath::Log(adcmax)/22);
580 Int_t scale=(Int_t)TMath::Exp(logscale);
581 sprintf(label,"%d",scale);
582 box = new TBox(xlow, ylow, xup, yup);
583 box->SetFillColor(color);
585 text->DrawText(xup+4, 0.5*(ylow+yup),label);
589 //______________________________________________________________________________
590 Int_t AliITSdisplay::DistancetoPrimitive(Int_t px, Int_t)
592 // Compute distance from point px,py to objects in event
594 gPad->SetCursor(kCross);
596 if (gPad == fTrigPad) return 9999;
598 const Int_t big = 9999;
600 Float_t xmin = gPad->GetX1();
601 Float_t xmax = gPad->GetX2();
602 Float_t dx = 0.02*(xmax - xmin);
603 Float_t x = gPad->AbsPixeltoX(px);
604 if (x < xmin+dx || x > xmax-dx) return dist;
606 if (fZoomMode) return 0;
610 //_____________________________________________________________________________
611 void AliITSdisplay::Draw(Option_t *)
613 // Display current event
619 DrawView(fTheta, fPhi, fPsi);
620 // Display the event number and title
626 //_____________________________________________________________________________
627 void AliITSdisplay::DrawClusters()
629 // Draw clusters for ITS modules
631 if (!fDrawClusters) return;
633 Int_t ndigits, digit;
642 ndigits = points->GetEntriesFast();
643 for (digit=0;digit<ndigits;digit++){
644 pm = (AliITSpoints*)points->UncheckedAt(digit);
648 TMarker3DBox *marker=pm->GetMarker(0);
649 if (marker) marker->Draw();
651 fClustersCuts +=pm->GetN();
658 //_____________________________________________________________________________
659 void AliITSdisplay::DrawHits()
661 // Draw hits for ITS modules
665 Int_t ntracks, track;
672 ntracks = points->GetEntriesFast();
673 for (track=0;track<ntracks;track++) {
674 pm = (AliITSpoints*)points->UncheckedAt(track);
677 fHitsCuts += pm->GetN();
682 //_____________________________________________________________________________
683 void AliITSdisplay::DrawCoG()
685 // Draw rec hits for ITS module
688 if (!fDrawCoG) return;
689 LoadCoG(fChamber,fCathode);
697 ncog = points->GetEntriesFast();
698 for (icog=0;icog<ncog;icog++) {
699 pm = (AliITSpoints*)points->UncheckedAt(icog);
705 //_____________________________________________________________________________
706 void AliITSdisplay::DrawCoG2()
708 // Draw rec hits for ITS module
712 if (!fDrawCoG) return;
716 LoadCoG2(fChamber,2);
717 } else if (fCathode==2) {
718 LoadCoG2(fChamber,1);
727 ncog = points->GetEntriesFast();
728 for (icog=0;icog<ncog;icog++) {
729 pm = (AliITSpoints*)points->UncheckedAt(icog);
735 //_____________________________________________________________________________
736 void AliITSdisplay::DrawCathCor()
738 // Draw hits for ITS chambers
742 if (!fDrawCathCor) return;
744 LoadCathCor(fChamber);
752 ncog = points->GetEntriesFast();
753 for (icog=0;icog<ncog;icog++) {
754 pm = (AliITSpoints*)points->UncheckedAt(icog);
761 //_____________________________________________________________________________
762 void AliITSdisplay::DrawTitle(Option_t *option)
764 // Draw the event title
766 Float_t xmin = gPad->GetX1();
767 Float_t xmax = gPad->GetX2();
768 Float_t ymin = gPad->GetY1();
769 Float_t ymax = gPad->GetY2();
770 Float_t dx = xmax-xmin;
771 Float_t dy = ymax-ymin;
773 if (strlen(option) == 0) {
774 TPaveText *title = new TPaveText(xmin +0.01*dx, ymax-0.09*dy, xmin +0.5*dx, ymax-0.01*dy);
775 title->SetBit(kCanDelete);
776 title->SetFillColor(42);
779 sprintf(ptitle,"Alice event: %d, Run:%d Module:%d",gAlice->GetHeader()->GetEvent(), gAlice->GetHeader()->GetRun(),fModule);
780 title->AddText(ptitle);
781 Int_t nparticles = gAlice->Particles()->GetEntriesFast();
782 sprintf(ptitle,"Nparticles = %d Nhits = %d Npads fired = %d",nparticles, fHitsCuts,fClustersCuts);
783 title->AddText(ptitle);
785 TPaveLabel *label = new TPaveLabel(xmin +0.01*dx, ymax-0.07*dy, xmin +0.2*dx, ymax-0.01*dy,option);
786 label->SetBit(kCanDelete);
787 label->SetFillColor(42);
792 //_____________________________________________________________________________
793 void AliITSdisplay::DrawView(Float_t theta, Float_t phi, Float_t psi)
795 // Draw a view of ITS clusters
797 printf("DrawView - fPad gPad %p %p\n",fPad,gPad);
799 gPad->SetCursor(kWatch);
800 gPad->SetFillColor(1);
802 gPad->SetFillColor(1);
805 TView *view = new TView(1);
807 printf("DrawView - view %p \n",view);
809 Float_t range = fRrange*fRangeSlider->GetMaximum();
811 printf("DrawView - range fRrange fRangeSlider %f %f %f \n",range,fRrange,fRangeSlider->GetMaximum());
812 view->SetRange(-range,-range,-range,range, range, range);
819 // Display ITS Chamber Geometry
820 // gAlice->GetGeometry()->Draw("same");
822 sprintf(NodeName,"ITS%d",100+fModule);
823 printf("Node name %s\n", NodeName);
825 TNode *node1=gAlice->GetGeometry()->GetNode(NodeName);
826 if (node1) node1->Draw("same");
828 //add clusters to the pad
835 printf("DrawView - before append fPad gPad %p %p\n",fPad,gPad);
836 // add itself to the list (must be last)
838 view->SetView(phi, theta, psi, iret);
842 //______________________________________________________________________________
843 void AliITSdisplay::ExecuteEvent(Int_t event, Int_t px, Int_t py)
845 // Execute action corresponding to the mouse event
847 static Float_t x0, y0, x1, y1;
849 static Int_t pxold, pyold;
850 static Int_t px0, py0;
851 static Int_t linedrawn;
856 //printf("ExecuteEvent - px py %d %d\n",px,py);
858 int px1 = gPad->GetEventX();
859 int py1 = gPad->GetEventY();
860 float uxmin = gPad->GetUxmin();
861 float uxmax = gPad->GetUxmax();
862 int pxmin = gPad->XtoAbsPixel(uxmin);
863 int pxmax = gPad->XtoAbsPixel(uxmax);
865 //printf("ExecuteEvent - px1 py1 uxmin uxmax pxmin pxmax %d %d %f %f %d %d\n",px1,py1,uxmin,uxmax,pxmin,pxmax);
867 Float_t x = gPad->AbsPixeltoX(px);
868 Float_t y = gPad->AbsPixeltoY(py);
869 //printf("x=%.3g, y=%.3g \n",gPad->PadtoX(x),gPad->PadtoY(y));
871 TObject *select = gPad->GetSelected();
872 if(!select) {printf("no select \n"); return;}
873 if (select->InheritsFrom("AliITSdisplay")) printf("Inherits from AliITSdisplay \n");
875 if (select->InheritsFrom("TCanvas")) printf("Inherits from TCanvas \n");
876 if (select->InheritsFrom("TView")) printf("Inherits from TView \n");
880 // x,y in the -1,1 scale
881 x = gPad->AbsPixeltoX(px);
882 y = gPad->AbsPixeltoY(py);
884 printf("abspixeltoX: px py %d %d x=%.3g, y=%.3g \n",px,py,x,y);
885 printf("x=%.3g, y=%.3g \n",gPad->PadtoX(x),gPad->PadtoY(y));
887 // it should be smth like ? - no !
888 x = gPad->AbsPixeltoX(px)*fRrange*fRangeSlider->GetMaximum();
889 y = gPad->AbsPixeltoY(py)*fRrange*fRangeSlider->GetMaximum();
890 // now find out how to convert these x,y to x,y in detector system
894 Float_t fYsizeReal, fXsizeReal;
896 Int_t fCanvasID=fCanvas->GetCanvasID();
897 gVirtualX->GetGeometry(fCanvasID, dum1, dum2, fCw, fCh);
899 printf("Exec: fCw, fCh %d %d \n", fCw, fCh );
903 fXsizeReal = fYsizeReal*Float_t(fCw)/Float_t(fCh);
907 fYsizeReal = fXsizeReal*Float_t(fCh)/Float_t(fCw);
910 printf("Exec: fYsizeReal, fXsizeReal %f %f \n",fYsizeReal, fXsizeReal);
912 fXsizeReal = fXsizeReal*Float_t(px)/Float_t(fCw);
913 fYsizeReal = fYsizeReal*Float_t(py)/Float_t(fCh);
915 printf("Exec: fYsizeReal, fXsizeReal %f %f \n",fYsizeReal, fXsizeReal);
921 Float_t scale[3],center[3];
923 gPad->GetView()->FindScope(scale,center,irep);
924 for(int i=0;i<3;i++) {
925 //printf("Exec: scale center irep %f %f %d \n",scale[i],center[i],irep);
928 // x,y in the -1,1 scale
929 x = gPad->AbsPixeltoX(px);
930 y = gPad->AbsPixeltoY(py);
931 Float_t xhit=x*scale[0]/(fRrange*fRangeSlider->GetMaximum());
932 Float_t yhit=y*scale[0]/(fRrange*fRangeSlider->GetMaximum());
933 //printf("Exec: x*scale y*scale xhit yhit%f %f %f %f \n",x*scale[0],y*scale[1],xhit,yhit);
935 Int_t anode, timebin;
936 GetPadIxy(anode,timebin,x*scale[0],y*scale[0]);
937 //printf("Exec: anode timebin %d %d \n",anode,timebin);
940 if (px == 0 && py == 0) { //when called by sliders
941 if (event == kButton1Up) {
946 if (!fZoomMode && gPad->GetView()) {
947 gPad->GetView()->ExecuteRotateView(event, px, py);
951 // something to zoom ?
952 gPad->SetCursor(kCross);
957 gVirtualX->SetLineColor(-1);
958 gPad->TAttLine::Modify(); //Change line attributes only if necessary
959 x0 = gPad->AbsPixeltoX(px);
960 y0 = gPad->AbsPixeltoY(py);
962 pxold = px; pyold = py;
967 if (linedrawn) gVirtualX->DrawBox(px0, py0, pxold, pyold, TVirtualX::kHollow);
971 gVirtualX->DrawBox(px0, py0, pxold, pyold, TVirtualX::kHollow);
975 gPad->GetCanvas()->FeedbackMode(kFALSE);
976 if (px == px0) return;
977 if (py == py0) return;
978 x1 = gPad->AbsPixeltoX(px);
979 y1 = gPad->AbsPixeltoY(py);
981 if (x1 < x0) {temp = x0; x0 = x1; x1 = temp;}
982 if (y1 < y0) {temp = y0; y0 = y1; y1 = temp;}
983 gPad->Range(x0,y0,x1,y1);
984 if (fZooms < kMAXZOOM-1) {
986 fZoomX0[fZooms] = x0;
987 fZoomY0[fZooms] = y0;
988 fZoomX1[fZooms] = x1;
989 fZoomY1[fZooms] = y1;
991 gPad->Modified(kTRUE);
996 //___________________________________________
997 void AliITSdisplay::LoadDigits(Int_t module)
999 // Read digits info and store x,y,z info in arrays fPoints
1001 printf("LoadDigits - fZooms %d\n",fZooms);
1003 if (module > fNmodules ) return;
1009 AliITS *ITS = (AliITS*)gAlice->GetModule("ITS");
1010 AliITSgeom *geom = ITS->GetITSgeom();
1012 // get detector type
1013 AliITSDetType *iDetType = ITS->DetType(fLayer);
1014 Int_t id=(Int_t)((fLayer-1)/2);
1016 // for the moment do only SDD
1017 if (id != 1) return;
1019 TClonesArray *ITSdigits = ITS->DigitsAddress(id);
1020 if (ITSdigits == 0) return;
1022 Int_t nent=(Int_t)gAlice->TreeD()->GetEntries();
1023 printf("Entries in TreeD - nent %d\n",nent);
1024 Int_t lastSPD=geom->GetLastSPD();
1025 Int_t lastSDD=geom->GetLastSDD();
1026 if (nent < lastSDD) {
1027 printf("You have not done the digitisation for all det types !!!");
1028 module=fModule-lastSPD;
1033 gAlice->TreeD()->GetEvent(module);
1034 //gAlice->TreeD()->GetEvent(nent-nofmodules+module-1);
1035 Int_t ndigits = ITSdigits->GetEntriesFast();
1036 printf("Found %d digits for module %d in det type %d \n",ndigits,fModule,id+1);
1037 if (ndigits == 0) return;
1038 if (fPoints == 0) fPoints = new TObjArray(ndigits);
1040 //AliITSresponseV0* resp = (AliITSresponseV0*)iDetType->GetResponseModel();
1041 AliITSresponse* resp = (AliITSresponse*)iDetType->GetResponseModel();
1042 resp->SetDetSize(38400,75200);
1043 resp->SetDetParam(376,256,40.,6.);
1045 if (!fMap) fMap = new AliITSMapA2(resp);
1046 if (sModule != fModule) fMap->ClearMap();
1049 // if parameters in response where changed during digitisation set these
1050 // parameters here as well !! resp->SetDetParam(....), SetDetSize(...)
1051 // or pass in the constructor of display the pointer to a response
1052 // instantiation done in ITSdisplay.C !
1054 AliITSdigitSDD *mdig;
1055 AliITSpoints *points = 0;
1056 TMarker3DBox *marker=0;
1057 Float_t xl[3], dx[3];
1059 //loop over all digits and store their position
1062 for (Int_t digit=0;digit<ndigits;digit++) {
1063 mdig = (AliITSdigitSDD*)ITSdigits->UncheckedAt(digit);
1065 // First get all needed parameters
1068 Int_t chargecolor=0;
1069 Int_t signal=mdig->fSignal;
1070 for (int i=0;i<3;i++) {charge += mdig->fTcharges[i];}
1071 //printf("charge %d\n",charge);
1072 Int_t chargeindex=Int_t(TMath::Log(charge)/(TMath::Log(adcsatm)/22));
1073 Int_t index=Int_t(TMath::Log(signal)/(TMath::Log(adcsatm)/22));
1074 Int_t color=261+index;
1075 if (color>282) color=282;
1076 if (charge) chargecolor=261+chargeindex;
1077 if (chargecolor>282) chargecolor=282;
1078 Int_t anode=mdig->fCellX ;
1079 Int_t timebin=mdig->fCellY;
1080 fMap->SetHit(anode,timebin,(Double_t)signal);
1081 // get the center of the pad - add on x and y half of pad size
1082 GetPadCxy(anode,timebin,xl,dx);
1092 //printf("anode timebin charge signal %d %d %d %d \n",anode, timebin,charge,signal);
1093 //printf("xpad ypad zpad %f %f %f\n",xpad,ypad,zpad);
1094 //printf(" dpx dpz %f %f \n",dpx,dpz);
1096 // Then set the objects
1098 points = new AliITSpoints(npoints);
1099 fPoints->AddAt(points,digit);
1101 points->SetMarkerColor(color);
1102 points->SetMarkerStyle(21);
1103 //points->SetMarkerSize(0.5);
1104 points->SetMarkerSize(0.7);
1105 points->SetParticle(-1);
1106 points->SetDigitIndex(digit);
1107 points->SetPoint(0,xpad,ypad,zpad);
1108 marker=new TMarker3DBox(xpad,ypad,zpad,dpx,dpy,dpz,0,0);
1109 //marker->SetLineColor(2);
1110 marker->SetLineColor(chargecolor);
1111 marker->SetFillStyle(1001);
1112 marker->SetFillColor(color);
1113 marker->SetRefObject((TObject*)points);
1114 points->Set3DMarker(0, marker);
1118 //___________________________________________
1119 void AliITSdisplay::GetPadCxy(Int_t anode, Int_t timebin, Float_t *xl, Float_t *dx )
1122 AliITS *ITS = (AliITS*)gAlice->GetModule("ITS");
1123 // get detector type
1124 AliITSDetType *iDetType = ITS->DetType(fLayer);
1125 AliITSresponse* resp = (AliITSresponse*)iDetType->GetResponseModel();
1129 Float_t clock, speed;
1130 resp->GetDetParam(na,ns,clock,speed);
1131 //printf("resp na ns clock speed %p %d %d %f %f\n",resp,na,ns,clock,speed);
1133 Float_t timestep=1000./clock;
1134 Float_t pitch=resp->Pitch();
1135 Float_t width=resp->Width();
1136 Float_t length=resp->Length();
1137 //printf("timestep pitch width length %f %f %f %f \n",timestep,pitch,width,length);
1139 const Float_t kconv=10000; // um->cm
1142 //Float_t driftpath=timebin*timestep*speed;
1143 Float_t driftpath=(timebin+1)*timestep*speed;
1144 if (anode >= na) xl[0]=(length-driftpath)/kconv;
1145 else xl[0]= -(length-driftpath)/kconv;
1146 if (anode >= na) anode-=na;
1147 //xl[2]=(anode*pitch-width/2)/kconv;
1148 xl[2]=((anode+1)*pitch-width/2)/kconv;
1150 //printf("anode timebin %d %d \n",anode,timebin);
1151 //printf("anode*pitch timebin*timestep*speed %f %f\n",anode*pitch,timebin*timestep*speed);
1153 // keep these for drawing
1154 //dx[0]=timestep*speed/kconv/2.1;
1156 //dx[2]=pitch/kconv/2.05;
1158 dx[0]=timestep*speed/kconv/2;
1160 dx[2]=pitch/kconv/2;
1163 //___________________________________________
1164 void AliITSdisplay::GetPadIxy(Int_t &anode, Int_t &timebin,Float_t x,Float_t z)
1166 AliITS *ITS = (AliITS*)gAlice->GetModule("ITS");
1167 // get detector type
1168 AliITSDetType *iDetType = ITS->DetType(fLayer);
1169 AliITSresponse* resp = (AliITSresponse*)iDetType->GetResponseModel();
1173 Float_t clock, speed;
1174 resp->GetDetParam(na,ns,clock,speed);
1176 Float_t timestep=1000./clock;
1177 Float_t pitch=resp->Pitch();
1178 Float_t width=resp->Width();
1179 Float_t length=resp->Length();
1181 const Float_t kconv=10000; // cm->um
1183 Float_t driftpath=length-TMath::Abs(kconv*x);
1184 timebin=(Int_t)(driftpath/speed/timestep);
1185 anode=kconv*z/pitch + na/2;
1186 if (x > 0) anode += na;
1190 //printf("anode timebin %d %d\n",anode,timebin);
1193 //___________________________________________
1194 void AliITSdisplay::LoadCoG(Int_t chamber, Int_t cathode)
1196 // Read raw clusters info and store x,y,z info in arrays fRpoints
1197 // Loop on all detectors
1201 if (chamber > 10) return;
1205 AliITS *ITS = (AliITS*)gAlice->GetModule("ITS");
1206 AliITSchamber* iChamber;
1208 TClonesArray *ITSrawclust = ITS->RawClustAddress(chamber-1);
1209 if (ITSrawclust == 0) return;
1211 ITS->ResetRawClusters();
1214 Int_t nent=(Int_t)gAlice->TreeR()->GetEntries();
1215 gAlice->TreeR()->GetEvent(nent-2+cathode-1);
1216 //gAlice->TreeR()->GetEvent(cathode);
1217 Int_t nrawcl = ITSrawclust->GetEntriesFast();
1218 if (nrawcl == 0) return;
1219 if (fRpoints == 0) fRpoints = new TObjArray(nrawcl);
1221 iChamber = &(ITS->Chamber(chamber-1));
1222 Float_t zpos=iChamber->ZPosition();
1223 AliITSRawCluster *mRaw;
1224 AliITSpoints *points = 0;
1226 //loop over all raw clusters and store their position
1227 points = new AliITSpoints(nrawcl);
1228 for (Int_t iraw=0;iraw<nrawcl;iraw++) {
1229 mRaw = (AliITSRawCluster*)ITSrawclust->UncheckedAt(iraw);
1230 fRpoints->AddAt(points,iraw);
1231 points->SetMarkerColor(51);
1232 points->SetMarkerStyle(2);
1233 points->SetMarkerSize(1.);
1234 points->SetParticle(-1);
1235 points->SetHitIndex(-1);
1236 points->SetTrackIndex(-1);
1237 points->SetDigitIndex(-1);
1238 points->SetPoint(iraw,mRaw->fX,mRaw->fY,zpos);
1242 //___________________________________________
1243 void AliITSdisplay::LoadCoG2(Int_t chamber, Int_t cathode)
1245 // Read raw clusters info and store x,y,z info in arrays fRpoints
1246 // Loop on all detectors
1249 if (chamber > 10) return;
1253 AliITS *ITS = (AliITS*)gAlice->GetModule("ITS");
1254 AliMUONchamber* iChamber;
1256 TClonesArray *MUONrawclust = MUON->RawClustAddress(chamber-1);
1257 if (MUONrawclust == 0) return;
1259 MUON->ResetRawClusters();
1261 Int_t nent=(Int_t)gAlice->TreeR()->GetEntries();
1262 gAlice->TreeR()->GetEvent(nent-2+cathode-1);
1263 //gAlice->TreeR()->GetEvent(cathode);
1264 Int_t nrawcl = MUONrawclust->GetEntriesFast();
1265 if (nrawcl == 0) return;
1266 if (fR2points == 0) fR2points = new TObjArray(nrawcl);
1268 iChamber = &(MUON->Chamber(chamber-1));
1269 Float_t zpos=iChamber->ZPosition();
1270 AliMUONRawCluster *mRaw;
1271 AliMUONpoints *points = 0;
1273 //loop over all raw clusters and store their position
1274 points = new AliMUONpoints(nrawcl);
1275 for (Int_t iraw=0;iraw<nrawcl;iraw++) {
1276 mRaw = (AliMUONRawCluster*)MUONrawclust->UncheckedAt(iraw);
1277 fR2points->AddAt(points,iraw);
1278 points->SetMarkerColor(51);
1279 points->SetMarkerStyle(4);
1280 points->SetMarkerSize(1.3);
1281 points->SetParticle(-1);
1282 points->SetHitIndex(-1);
1283 points->SetTrackIndex(-1);
1284 points->SetDigitIndex(-1);
1285 points->SetPoint(iraw,mRaw->fX,mRaw->fY,zpos);
1289 //___________________________________________
1290 void AliITSdisplay::LoadCathCor(Int_t chamber)
1292 // Read correlation info and store x,y,z info in arrays fCpoints
1293 // Loop on all detectors
1296 if (chamber > 10) return;
1300 AliMUON *MUON = (AliMUON*)gAlice->GetModule("MUON");
1301 AliMUONchamber* iChamber;
1302 iChamber = &(MUON->Chamber(chamber-1));
1303 Float_t zpos=iChamber->ZPosition(); // check with Andreas
1307 MUON->GetTreeC(fEvent);
1308 TTree *TC=MUON->TreeC();
1310 // Int_t nent=(Int_t)TC->GetEntries();
1312 TClonesArray *MUONcorrel = MUON->CathCorrelAddress(chamber-1);
1313 if (MUONcorrel == 0) return;
1315 MUON->ResetCorrelation();
1318 Int_t ncor = MUONcorrel->GetEntries();
1320 if (!fCpoints) fCpoints = new TObjArray(ncor);
1322 AliMUONcorrelation *mCor;
1323 AliMUONpoints *points = 0;
1325 //loop over all raw clusters and store their position
1326 points = new AliMUONpoints(ncor);
1327 for (Int_t icor=0;icor<ncor;icor++) {
1328 mCor = (AliMUONcorrelation*)MUONcorrel->UncheckedAt(icor);
1329 fCpoints->AddAt(points,icor);
1330 points->SetMarkerColor(4);
1331 points->SetMarkerStyle(4);
1332 points->SetMarkerSize(0.8);
1333 points->SetParticle(-1);
1334 points->SetHitIndex(-1);
1335 points->SetTrackIndex(-1);
1336 points->SetDigitIndex(-1);
1337 points->SetPoint(icor,mCor->fX[0],mCor->fY[0],zpos);
1342 //___________________________________________
1343 void AliITSdisplay::LoadHits(Int_t module)
1346 // Read hits info and store x,y,z info in arrays fPhits
1347 // Loop on all detectors
1350 if (module > fNmodules || fNmodules==0) return;
1353 printf("LoadModuleHits - fModule module %d %d\n",fModule,module);
1357 AliITS *ITS = (AliITS*)gAlice->GetModule("ITS");
1358 AliITSgeom *geom = ITS->GetITSgeom();
1360 // try fITSmodules first (memory) - check also TreeH with the condition
1361 // if (module != fModule) continue; - see the speed
1363 TObjArray *mods = ITS->GetModules();
1364 Int_t nentries=(Int_t)mods->GetEntriesFast();
1365 printf("nentries %d\n",nentries);
1367 AliITSmodule *mod = (AliITSmodule *)mods->UncheckedAt(fModule);
1368 TObjArray *fHits = mod->GetHits();
1369 Int_t nhits = fHits->GetEntriesFast();
1370 if (fPhits == 0) fPhits = new TObjArray(nhits);
1371 printf("LoadModuleHits - fPhits fModule nhits %p %d %d\n",fPhits,fModule,nhits);
1372 AliITSpoints *points = 0;
1373 AliITShit *mHit = 0;
1374 Int_t idtrack, idhit;
1375 for (Int_t hit=0;hit<nhits;hit++) {
1376 mHit = (AliITShit*)fHits->UncheckedAt(hit);
1377 mod->GetHitTrackAndHitIndex(hit,idtrack,idhit);
1378 printf("hit eloss %d %f\n",hit,mHit->GetIonization());
1379 printf("layer ladder det %d %d %d\n",mHit->GetLayer(),mHit->GetLadder(),mHit->GetDetector());
1380 if (!mHit->GetIonization()) continue;
1381 //fYmodule=mHit->fY;
1382 Float_t xl[3], xg[3];
1387 geom->GtoL(fModule,xg,xl);
1388 printf("hit xhit yhit zhit %d %f %f %f\n",hit,xl[0],xl[1],xl[2]);
1390 mHit->GetPositionL(x,y,z,tof);
1391 printf("hit x y z %d %f %f %f\n",hit,x,y,z);
1395 // Retrieve info and set the objects
1397 points = new AliITSpoints();
1398 points->SetMarkerColor(kRed);
1399 points->SetMarkerStyle(5);
1400 points->SetMarkerSize(1.);
1401 points->SetParticle(mHit->fTrack);
1402 points->SetHitIndex(idhit);
1403 points->SetTrackIndex(idtrack);
1404 //points->SetPoint(0,mHit->fX,mHit->fY,mHit->fZ);
1405 points->SetPoint(0,xl[0],xl[1],xl[2]);
1406 fPhits->AddAt(points,hit);
1411 //_____________________________________________________________________________
1412 void AliITSdisplay::NextModule(Int_t delta)
1414 // to go from module to next module if delta = 1
1415 // or previous module otherwise
1417 if (fModule < fNmodules) fModule++;
1419 if (fModule > 1) fModule--;
1426 //_____________________________________________________________________________
1427 void AliITSdisplay::Paint(Option_t *)
1429 // Paint miscellaneous items
1433 //_____________________________________________________________________________
1434 void AliITSdisplay::DrawHistograms()
1437 // better write a class for this - see TInspectCanvas - with a methode
1438 // called xxxx and here just do smth like it's done for Inspect() in TObject
1439 //gROOT->ProcessLine(Form("TInspectCanvas::Inspector((TObject *)0x%lx);",(Long_t)this));
1440 // with xxxx instead of Inspector - so one can create buttons on the
1441 // new canvas and have more choices
1444 printf("DrawHistograms: fZooms fZoomMode %d %d ! \n",fZooms,fZoomMode);
1446 if (!fZooms) return;
1448 Float_t scale[3],center[3];
1450 gPad->GetView()->FindScope(scale,center,irep);
1452 Int_t amin, tmin, amax, tmax;
1453 GetPadIxy(amin,tmin, fZoomX0[fZooms]*scale[0], fZoomY0[fZooms]*scale[0]);
1454 printf("DrawHist: amin tmin %d %d \n",amin,tmin);
1455 GetPadIxy(amax,tmax, fZoomX1[fZooms]*scale[0], fZoomY1[fZooms]*scale[0]);
1456 printf("DrawHist: amax tmax %d %d \n",amax,tmax);
1458 if ((fZoomX0[fZooms] < 0 && fZoomX1[fZooms] > 0) || (fZoomX0[fZooms] > 0 && fZoomX1[fZooms] < 0) ) tmax=256;
1460 if( amax-amin > kMAXHIST) {
1461 Error("DrawHistograms","Too many histograms %d! Zoom a smaller area and try again!",amax-amin);
1464 Int_t nbinx = amax-amin;
1465 Int_t nbiny = tmax-tmin;
1470 //create or set the new canvas c2
1471 TVirtualPad *padsav = gPad;
1472 TCanvas *c2 = (TCanvas*)gROOT->GetListOfCanvases()->FindObject("c2");
1481 if(c2) delete c2->GetPrimitive("h2map");
1482 else c2=new TCanvas("c2","c2",14,47,830,750);
1485 TPad *hpad = new TPad("hpad","",0.01,0.01,0.99,0.99);
1486 hpad->SetFillColor(0);
1488 hpad->Divide(2,nbinx/2,0.,0.);
1491 char title[30], name[10];
1492 sprintf(title,"Signal map for module %d",fModule);
1493 TH2F *fTH2F = new TH2F("h2map",title,nbinx,amin,amax,nbiny,tmin,tmax);
1494 fHis=new TObjArray(nbinx);
1496 //TH1F *h1=new TH1F(" ","",nbiny,(float)tmin,(float)tmax);
1498 for (int i=amin;i<amax;i++) {
1500 printf("i, i-amin %d %d \n",i,i-amin);
1501 (*fHis)[i-amin] = new TH1F(" "," ",nbiny,(float)tmin,(float)tmax);
1502 //sprintf(title,"Projection on anode=%d",i);
1503 sprintf(title,"anode=%d",i);
1504 sprintf(name,"h%d",i);
1505 ((TH1F*)((*fHis)[i-amin]))->SetTitle(title);
1506 ((TH1F*)((*fHis)[i-amin]))->SetTitleSize(2.);
1507 ((TH1F*)((*fHis)[i-amin]))->SetTitleOffset(2.);
1508 ((TH1F*)((*fHis)[i-amin]))->SetLabelSize(0.05);
1509 //((TH1F*)((*fHis)[i-amin]))->SetYTitle(title);
1510 ((TH1F*)((*fHis)[i-amin]))->SetName(name);
1511 ((TH1F*)((*fHis)[i-amin]))->SetStats(0);
1512 //h1->SetTitle(title);
1513 //h1->SetTitleSize(0.04);
1514 //h1->SetYTitle(title);
1515 //h1->SetName(title);
1517 for (int j=tmin;j<tmax;j++) {
1518 ((TH1F*)((*fHis)[i-amin]))->Fill((float)j,(float)fMap->GetSignal(i,j));
1519 //h1->Fill((float)j,(float)fMap->GetSignal(i,j));
1520 fTH2F->Fill((float)i,(float)j,(float)fMap->GetSignal(i,j));
1522 ((TH1F*)((*fHis)[i-amin]))->Smooth(1);
1523 //((TH1F*)((*fHis)[i-amin]))->Fit("gaus","ql");
1524 ((TH1F*)((*fHis)[i-amin]))->Draw();
1525 //h1->Fit("gaus","ql");
1530 //c2->SetFillColor(1);
1531 //fTH2F->Draw("LEGO2");
1547 //create or set the new canvas c2
1548 TVirtualPad *padsav = gPad;
1549 TCanvas *c2 = (TCanvas*)gROOT->GetListOfCanvases()->FindObject("c2");
1550 if(c2) delete c2->GetPrimitive("Projection");
1551 if(c2) delete c2->GetPrimitive("h2map");
1552 else c2=new TCanvas("c2","c2",14,47,830,750);
1555 c2->SetFillColor(1);
1556 fTH2F->Draw("LEGO2");
1558 TPad *hpad = new TPad("hpad","",0.01,0.01,0.99,0.99);
1559 hpad->SetFillColor(11);
1560 hpad->Divide(1,nbinx/2,0.,0.);
1562 // -empty projections !!
1564 //draw slice corresponding to mouse position
1565 for(int i=amin;i<amax;i++) {
1567 //Int_t biny = fTH2F->GetYaxis()->FindBin(y);
1568 //TH1D *hp = fTH2F->ProjectionX("",biny,biny);
1569 TH1D *hp = fTH2F->ProjectionY("",i,i);
1571 sprintf(title,"Projection on anode=%d",i);
1572 hp->SetName("Projection");
1573 hp->SetTitle(title);
1574 //hp->Fit("gaus","ql");
1585 //_____________________________________________________________________________
1586 void AliITSdisplay::SetPickMode()
1590 fArcButton->SetY1(fPickButton->GetYlowNDC()+0.5*fPickButton->GetHNDC());
1591 fTrigPad->Modified();
1594 //_____________________________________________________________________________
1595 void AliITSdisplay::SetZoomMode()
1599 fArcButton->SetY1(fZoomButton->GetYlowNDC()+0.5*fZoomButton->GetHNDC());
1600 fTrigPad->Modified();
1603 //_____________________________________________________________________________
1604 void AliITSdisplay::SetModule(Int_t layer, Int_t ladder, Int_t detector)
1606 // Set chamber and cathode number
1611 AliITS *ITS = (AliITS*)gAlice->GetModule("ITS");
1612 AliITSgeom *gm=ITS->GetITSgeom();
1613 fModule=gm->GetModuleIndex(fLayer,fLadder,fDetector);
1620 //_____________________________________________________________________________
1621 void AliITSdisplay::SetModuleNumber(Int_t module)
1623 // Set chamber and cathode number
1626 AliITS *ITS = (AliITS*)gAlice->GetModule("ITS");
1627 AliITSgeom *gm=ITS->GetITSgeom();
1628 gm->GetModuleId(fModule,fLayer,fLadder,fDetector);
1634 //_____________________________________________________________________________
1635 void AliITSdisplay::SetRange(Float_t rrange, Float_t zrange)
1637 // Set view range along R and Z
1646 //_____________________________________________________________________________
1647 void AliITSdisplay::SetView(Float_t theta, Float_t phi, Float_t psi)
1649 // change viewing angles for current event
1657 TView *view = gPad->GetView();
1658 printf("SetView view %p \n",view);
1659 if (view) view->SetView(fPhi, fTheta, fPsi, iret);
1666 //_____________________________________________________________________________
1667 void AliITSdisplay::ShowNextEvent(Int_t delta)
1669 // Display (current event_number+delta)
1670 // delta = 1 shown next event
1671 // delta = -1 show previous event
1674 Int_t current_event = gAlice->GetHeader()->GetEvent();
1675 Int_t new_event = current_event + delta;
1676 gAlice->GetEvent(new_event);
1678 if (!gAlice->TreeD() || !gAlice->TreeD() ) return;
1680 AliITS *ITS = (AliITS*)gAlice->GetModule("ITS");
1681 ITS->ClearModules();
1682 ITS->InitModules(-1,fNmodules);
1683 ITS->FillModules(fEvent,0,fNmodules," "," "); //memory problems ?
1689 //_____________________________________________________________________________
1691 void AliITSdisplay::SetEvent(Int_t newevent)
1693 gAlice->GetEvent(newevent);
1695 if (!gAlice->TreeD() || !gAlice->TreeD() ) return;
1697 AliITS *ITS = (AliITS*)gAlice->GetModule("ITS");
1698 ITS->ClearModules();
1699 ITS->InitModules(-1,fNmodules);
1700 ITS->FillModules(fEvent,0,fNmodules," "," "); //memory problems ?
1706 //______________________________________________________________________________
1707 void AliITSdisplay::UnZoom()
1709 printf("UnZoom - fZooms %d\n",fZooms);
1710 if (fZooms <= 0) return;
1712 TPad *pad = (TPad*)gPad->GetPadSave();
1713 printf("UnZoom - pad fPad gPad %p %p %p\n",pad,fPad,gPad);
1717 pad->Range(fZoomX0[fZooms],fZoomY0[fZooms], fZoomX1[fZooms],fZoomY1[fZooms]);
1721 //_____________________________________________________________________________
1722 void AliITSdisplay::ResetPoints()
1725 // Reset array of points
1733 //_____________________________________________________________________________
1734 void AliITSdisplay::ResetPhits()
1737 // Reset array of points
1745 //_____________________________________________________________________________
1746 void AliITSdisplay::ResetRpoints()
1749 // Reset array of points
1757 //_____________________________________________________________________________
1758 void AliITSdisplay::ResetR2points()
1761 // Reset array of points
1764 fR2points->Delete();
1769 //_____________________________________________________________________________
1770 void AliITSdisplay::ResetCpoints()
1773 // Reset array of points