source: trunk/MagicSoft/Mars/mgui/MCamDisplay.cc@ 2176

Last change on this file since 2176 was 2173, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 20.6 KB
Line 
1/* ======================================================================== *\
2!
3! *
4! * This file is part of MARS, the MAGIC Analysis and Reconstruction
5! * Software. It is distributed to you in the hope that it can be a useful
6! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
7! * It is distributed WITHOUT ANY WARRANTY.
8! *
9! * Permission to use, copy, modify and distribute this software and its
10! * documentation for any purpose is hereby granted without fee,
11! * provided that the above copyright notice appear in all copies and
12! * that both that copyright notice and this permission notice appear
13! * in supporting documentation. It is provided "as is" without express
14! * or implied warranty.
15! *
16!
17!
18! Author(s): Thomas Bretz, 05/2002 <mailto:tbretz@astro.uni-wuerzburg.de>
19! Author(s): Harald Kornmayer, 1/2001
20!
21! Copyright: MAGIC Software Development, 2000-2003
22!
23!
24\* ======================================================================== */
25
26/////////////////////////////////////////////////////////////////////////////
27//
28// MCamDisplay
29//
30// Camera Display. The Pixels are displayed in
31// contents/area [somthing/mm^2]
32//
33// To change the scale to a logarithmic scale SetLogz() of the Pad.
34//
35//
36////////////////////////////////////////////////////////////////////////////
37#include "MCamDisplay.h"
38
39#include <fstream>
40#include <iostream>
41
42#include <TBox.h>
43#include <TArrow.h>
44#include <TLatex.h>
45#include <TStyle.h>
46#include <TMarker.h>
47#include <TCanvas.h>
48#include <TArrayF.h>
49#include <TClonesArray.h>
50
51#include "MH.h"
52#include "MHexagon.h"
53
54#include "MGeomCam.h"
55
56#include "MRflEvtData.h"
57
58#include "MCerPhotPix.h"
59#include "MCerPhotEvt.h"
60
61#include "MPedestalPix.h"
62#include "MPedestalCam.h"
63
64#include "MCurrents.h"
65
66#include "MImgCleanStd.h"
67
68#define kItemsLegend 48 // see SetPalette(1,0)
69
70ClassImp(MCamDisplay);
71
72using namespace std;
73
74// ------------------------------------------------------------------------
75//
76// Default Constructor. To be used by the root system ONLY.
77//
78MCamDisplay::MCamDisplay() : fGeomCam(NULL), fAutoScale(kTRUE)
79{
80 fNumPixels = 0;
81 fRange = 0;
82
83 fPixels = NULL;
84 fLegend = NULL;
85 fLegText = NULL;
86 fArrowX = NULL;
87 fArrowY = NULL;
88 fLegRadius = NULL;
89 fLegDegree = NULL;
90
91 fMinimum = 0;
92 fMaximum = 1;
93}
94
95// ------------------------------------------------------------------------
96//
97// Constructor. Makes a clone of MGeomCam.
98//
99MCamDisplay::MCamDisplay(MGeomCam *geom)
100 : fGeomCam(NULL), fAutoScale(kTRUE), fColors(kItemsLegend), fData(geom->GetNumPixels()), fMinimum(0), fMaximum(1)
101{
102 fGeomCam = (MGeomCam*)geom->Clone();
103
104 //
105 // create the hexagons of the display
106 //
107 fNumPixels = fGeomCam->GetNumPixels();
108 fRange = fGeomCam->GetMaxRadius();
109
110 // root 3.02
111 // * base/inc/TObject.h:
112 // register BIT(8) as kNoContextMenu. If an object has this bit set it will
113 // not get an automatic context menu when clicked with the right mouse button.
114
115 fPhotons = new TClonesArray("TMarker", 0);
116
117 //
118 // Construct all hexagons. Use new-operator with placement
119 //
120 fPixels = new TClonesArray("MHexagon", fNumPixels);
121 for (UInt_t i=0; i<fNumPixels; i++)
122 {
123 MHexagon &pix = *new ((*fPixels)[i]) MHexagon((*fGeomCam)[i]);
124#if ROOT_VERSION_CODE > ROOT_VERSION(3,01,06)
125 pix.SetBit(/*kNoContextMenu|*/kCannotPick);
126#endif
127 pix.SetFillColor(16);
128 pix.ResetBit(kIsUsed);
129 }
130
131 //
132 // set up the Legend
133 //
134 const Float_t H = 0.9*fRange;
135 const Float_t h = 2./kItemsLegend;
136
137 const Float_t w = fRange/sqrt((float)fNumPixels);
138
139 fLegend = new TClonesArray("TBox", kItemsLegend);
140 fLegText = new TClonesArray("TText", kItemsLegend+1);
141
142 for (Int_t i=0; i<kItemsLegend; i++)
143 {
144 TBox &newbox = *new ((*fLegend)[i]) TBox;
145 newbox.SetX1(fRange);
146 newbox.SetX2(fRange+w);
147 newbox.SetY1(H*( i *h - 1.));
148 newbox.SetY2(H*((i+1)*h - 1.));
149 newbox.SetFillColor(16);
150#if ROOT_VERSION_CODE > ROOT_VERSION(3,01,06)
151 newbox.SetBit(/*kNoContextMenu|*/kCannotPick);
152#endif
153 }
154
155 for (Int_t i=0; i<kItemsLegend+1; i++)
156 {
157 TText &newtxt = *new ((*fLegText)[i]) TText;
158 newtxt.SetTextSize(0.025);
159 newtxt.SetTextAlign(12);
160 newtxt.SetX(fRange+1.5*w);
161 newtxt.SetY(H*((i+0.5)*h - 1.));
162#if ROOT_VERSION_CODE > ROOT_VERSION(3,01,06)
163 newtxt.SetBit(/*kNoContextMenu|*/kCannotPick);
164#endif
165 }
166
167 fArrowX = new TArrow(-fRange*.9, -fRange*.9, -fRange*.6, -fRange*.9, 0.025);
168 fArrowY = new TArrow(-fRange*.9, -fRange*.9, -fRange*.9, -fRange*.6, 0.025);
169
170 TString text;
171 text += (int)(fRange*.3);
172 text += "mm";
173
174 fLegRadius = new TText(-fRange*.85, -fRange*.85, text);
175 text = "";
176 text += (float)((int)(fRange*.3*fGeomCam->GetConvMm2Deg()*10))/10;
177 text += "\\circ";
178 text = text.Strip(TString::kLeading);
179 fLegDegree = new TLatex(-fRange*.85, -fRange*.75, text);
180 fLegRadius->SetTextSize(0.04);
181 fLegDegree->SetTextSize(0.04);
182
183#if ROOT_VERSION_CODE < ROOT_VERSION(3,01,06)
184 SetPalette(1, 0);
185#else
186 SetPalette(51, 0);
187#endif
188}
189
190// ------------------------------------------------------------------------
191//
192// Destructor. Deletes TClonesArrays for hexagons and legend elements.
193//
194MCamDisplay::~MCamDisplay()
195{
196 fPixels->Delete();
197 fLegend->Delete();
198 fLegText->Delete();
199 fPhotons->Delete();
200
201 delete fPixels;
202 delete fLegend;
203 delete fLegText;
204 delete fPhotons;
205
206 delete fArrowX;
207 delete fArrowY;
208
209 delete fLegRadius;
210 delete fLegDegree;
211
212 delete fGeomCam;
213}
214
215// ------------------------------------------------------------------------
216//
217// Call this function to draw the camera layout into your canvas.
218// Setup a drawing canvas. Add this object and all child objects
219// (hexagons, etc) to the current pad. If no pad exists a new one is
220// created.
221//
222void MCamDisplay::Draw(Option_t *option)
223{
224 // root 3.02:
225 // gPad->SetFixedAspectRatio()
226
227 TVirtualPad *pad = gPad ? gPad : MH::MakeDefCanvas("CamDisplay", "Mars Camera Display", 656, 600);
228 pad->SetBorderMode(0);
229 pad->SetFillColor(16);
230
231 AppendPad("");
232}
233
234
235void MCamDisplay::SetRange()
236{
237 //
238 // Maintain aspect ratio
239 //
240 const float ratio = 1.15;
241
242 const float w = gPad->GetWw();
243 const float h = gPad->GetWh()*ratio;
244
245 gPad->Range(-fRange, -fRange, (2*ratio-1)*fRange, fRange);
246
247 if (h<w)
248 gPad->SetPad((1.-h/w)/2, 0, (h/w+1)/2, 0.9999999);
249 else
250 gPad->SetPad(0, (1.-w/h)/2, 1, (w/h+1)/2);
251}
252
253void MCamDisplay::Update(Bool_t islog)
254{
255 // FIXME: Don't do this if nothing changed!
256 if (fAutoScale)
257 {
258 fMinimum = FLT_MAX;
259 fMaximum = -FLT_MAX;
260
261 for (UInt_t i=0; i<fNumPixels; i++)
262 {
263 if (!(*this)[i].TestBit(kIsUsed))
264 continue;
265
266 if (fData[i]<fMinimum)
267 fMinimum = fData[i];
268 if (fData[i]>fMaximum)
269 fMaximum = fData[i];
270 }
271 }
272
273 if (fMinimum==fMaximum)
274 fMaximum = fMinimum + 1;
275
276 UpdateLegend(fMinimum, fMaximum, islog);
277
278 for (UInt_t i=0; i<fNumPixels; i++)
279 {
280 if ((*this)[i].TestBit(kIsUsed))
281 (*this)[i].SetFillColor(GetColor(fData[i], fMinimum, fMaximum, islog));
282 else
283 (*this)[i].SetFillColor(10);
284
285 }
286}
287
288// ------------------------------------------------------------------------
289//
290// This is called at any time the canvas should get repainted.
291// Here we maintain an aspect ratio of 1.15. This makes sure,
292// that the camera image doesn't get distorted by resizing the canvas.
293//
294void MCamDisplay::Paint(Option_t *opt)
295{
296 if (!fPixels)
297 return;
298
299 // Maintain aspect ratio
300 SetRange();
301
302 // Maintain colors
303 SetPalette();
304
305 // Update Contents of the pixels
306 Update(gPad->GetLogz());
307
308 // Paint Legend
309 fArrowX->Paint(">");
310 fArrowY->Paint(">");
311
312 fLegRadius->Paint();
313 fLegDegree->Paint();
314
315 // Paint primitives (pixels, color legend, photons, ...)
316 { fPixels->ForEach(TObject, Paint)(); }
317 { fLegend->ForEach(TObject, Paint)(); }
318 { fLegText->ForEach(TObject, Paint)(); }
319 { fPhotons->ForEach(TObject, Paint)(); }
320}
321
322// ------------------------------------------------------------------------
323//
324// With this function you can change the color palette. For more
325// information see TStyle::SetPalette. Only palettes with 50 colors
326// are allowed.
327// In addition you can use SetPalette(52, 0) to create an inverse
328// deep blue sea palette
329//
330void MCamDisplay::SetPalette(Int_t ncolors, Int_t *colors)
331{
332 //
333 // If not enough colors are specified skip this.
334 //
335 if (ncolors>1 && ncolors<50)
336 {
337 cout << "MCamDisplay::SetPalette: Only default palettes with 50 colors are allowed... ignored." << endl;
338 return;
339 }
340
341 //
342 // If ncolors==52 create a reversed deep blue sea palette
343 //
344 if (ncolors==52)
345 {
346 gStyle->SetPalette(51, NULL);
347 TArrayI c(kItemsLegend);
348 for (int i=0; i<kItemsLegend; i++)
349 c[kItemsLegend-i-1] = gStyle->GetColorPalette(i);
350 gStyle->SetPalette(kItemsLegend, c.GetArray());
351 }
352 else
353 gStyle->SetPalette(ncolors, colors);
354
355 //
356 // Change the colors of the pixels
357 //
358 for (unsigned int i=0; i<fNumPixels; i++)
359 {
360 //
361 // Get the old color index and check whether it is
362 // background or transparent
363 //
364 Int_t col = (*this)[i].GetFillColor();
365 if (col==10 || col==16)
366 continue;
367
368 //
369 // Search for the color index (level) in the color table
370 //
371 int idx;
372 for (idx=0; idx<kItemsLegend; idx++)
373 if (col==fColors[idx])
374 break;
375
376 //
377 // Should not happen
378 //
379 if (idx==kItemsLegend)
380 {
381 cout << "MCamDisplay::SetPalette: Strange... FIXME!" << endl;
382 continue;
383 }
384
385 //
386 // Convert the old color index (level) into the new one
387 //
388 (*this)[i].SetFillColor(gStyle->GetColorPalette(idx));
389 }
390
391 //
392 // Store the color palette used for a leter reverse lookup
393 //
394 for (int i=0; i<kItemsLegend; i++)
395 {
396 fColors[i] = gStyle->GetColorPalette(i);
397 GetBox(i)->SetFillColor(fColors[i]);
398 }
399}
400
401void MCamDisplay::SetPrettyPalette()
402{
403 SetPalette(1, 0);
404}
405
406void MCamDisplay::SetDeepBlueSeaPalette()
407{
408 SetPalette(51, 0);
409}
410
411void MCamDisplay::SetInvDeepBlueSeaPalette()
412{
413 SetPalette(52, 0);
414}
415
416void MCamDisplay::SetPalette()
417{
418 for (int i=0; i<kItemsLegend; i++)
419 GetBox(i)->SetFillColor(fColors[i]);
420}
421
422void MCamDisplay::DrawPixelNumbers()
423{
424 for (int i=0; i<kItemsLegend; i++)
425 fColors[i] = 16;
426
427 if (!gPad)
428 Draw();
429
430 TText txt;
431 txt.SetTextFont(122);
432 txt.SetTextAlign(22); // centered/centered
433
434 for (UInt_t i=0; i<fNumPixels; i++)
435 {
436 TString num;
437 num += i;
438
439 const MHexagon &h = (*this)[i];
440 TText *nt = txt.DrawText(h.GetX(), h.GetY(), num);
441 nt->SetTextSize(0.3*h.GetD()/fGeomCam->GetMaxRadius());
442 }
443}
444
445// ------------------------------------------------------------------------
446//
447// Call this function to fill the number of photo electron into the
448// camera.
449//
450void MCamDisplay::FillPhotNum(const MCerPhotEvt &event)
451{
452 Reset();
453
454 const Int_t entries = event.GetNumPixels();
455
456 for (Int_t i=0; i<entries; i++)
457 {
458 const MCerPhotPix &pix = event[i];
459 if (!pix.IsPixelUsed())
460 continue;
461
462 const Int_t id = pix.GetPixId();
463
464 fData[id] = pix.GetNumPhotons()*fGeomCam->GetPixRatio(id);
465 (*this)[id].SetBit(kIsUsed);
466 }
467}
468
469// ------------------------------------------------------------------------
470//
471// Call this function to fill the number of photo electron into the
472// camera.
473//
474void MCamDisplay::FillPedestals(const MPedestalCam &event)
475{
476 Reset();
477
478 const Int_t entries = event.GetSize();
479 for (Int_t i=0; i<entries; i++)
480 {
481 fData[i] = event[i].GetMean()*fGeomCam->GetPixRatio(i);
482 (*this)[i].SetBit(kIsUsed);
483 }
484}
485
486// ------------------------------------------------------------------------
487//
488// Call this function to fill the error of number of photo electron
489// into the camera.
490//
491void MCamDisplay::FillErrorPhot(const MCerPhotEvt &event)
492{
493 Reset();
494
495 const Int_t entries = event.GetNumPixels();
496
497 for (Int_t i=0; i<entries; i++)
498 {
499 const MCerPhotPix &pix = event[i];
500 if (!pix.IsPixelUsed())
501 continue;
502
503 const Int_t id = pix.GetPixId();
504
505 fData[id] = pix.GetErrorPhot()*sqrt(fGeomCam->GetPixRatio(id));
506 (*this)[id].SetBit(kIsUsed);
507 }
508}
509
510// ------------------------------------------------------------------------
511//
512// Call this function to fill the ratio of the number of photons
513// divided by its error
514//
515void MCamDisplay::FillRatio(const MCerPhotEvt &event)
516{
517 Reset();
518
519 const Int_t entries = event.GetNumPixels();
520
521 for (Int_t i=0; i<entries; i++)
522 {
523 const MCerPhotPix &pix = event[i];
524
525 if (!pix.IsPixelUsed())
526 continue;
527
528 const Int_t id = pix.GetPixId();
529
530 const Float_t entry = pix.GetNumPhotons();
531 const Float_t noise = pix.GetErrorPhot();
532 const Double_t ratio = TMath::Sqrt(fGeomCam->GetPixRatio(id));
533
534 fData[id] = entry*ratio/noise;
535 (*this)[id].SetBit(kIsUsed);
536 }
537}
538
539// ------------------------------------------------------------------------
540//
541// Call this function to fill the currents
542//
543void MCamDisplay::FillCurrents(const MCurrents &event)
544{
545 Reset();
546
547 // FIXME: Security check missing!
548 for (UInt_t i=0; i<fNumPixels; i++)
549 {
550 if (event[i]<=0)
551 continue;
552
553 (*this)[i].SetBit(kIsUsed);
554 fData[i] = event[i];
555 }
556}
557
558// ------------------------------------------------------------------------
559//
560// Fill the colors in respect to the cleaning levels
561//
562void MCamDisplay::FillLevels(const MCerPhotEvt &event, Float_t lvl1, Float_t lvl2)
563{
564 FillRatio(event);
565
566 for (UInt_t i=0; i<fNumPixels; i++)
567 {
568 if (!(*this)[i].TestBit(kIsUsed))
569 continue;
570
571 if (fData[i]>lvl1)
572 fData[i] = 0;
573 else
574 if (fData[i]>lvl2)
575 fData[i] = 1;
576 else
577 fData[i] = 2;
578 }
579}
580
581// ------------------------------------------------------------------------
582//
583// Fill the colors in respect to the cleaning levels
584//
585void MCamDisplay::FillLevels(const MCerPhotEvt &event, const MImgCleanStd &clean)
586{
587 FillLevels(event, clean.GetCleanLvl1(), clean.GetCleanLvl2());
588}
589
590// ------------------------------------------------------------------------
591//
592// Show a reflector event. EMarkerStyle is defined in root/include/Gtypes.h
593// To remove the photons from the display call FillRflEvent(NULL)
594//
595void MCamDisplay::ShowRflEvent(const MRflEvtData *event, EMarkerStyle ms)
596{
597 const Int_t num = event ? event->GetNumPhotons() : 0;
598
599 fPhotons->ExpandCreate(num);
600 if (num < 1)
601 return;
602
603 Int_t i=num-1;
604 do
605 {
606 const MRflSinglePhoton &ph = event->GetPhoton(i);
607 TMarker &m = (TMarker&)*fPhotons->UncheckedAt(i);
608 m.SetX(ph.GetX());
609 m.SetY(ph.GetY());
610 m.SetMarkerStyle(ms);
611 } while (i--);
612}
613
614// ------------------------------------------------------------------------
615//
616// Fill a reflector event. Sums all pixels in each pixel as the
617// pixel contents.
618//
619// WARNING: Due to the estimation in DistanceToPrimitive and the
620// calculation in pixels instead of x, y this is only a
621// rough estimate.
622//
623void MCamDisplay::FillRflEvent(const MRflEvtData &event)
624{
625 //
626 // reset pixel colors to background color
627 //
628 Reset();
629
630 //
631 // sum the photons content in each pixel
632 //
633 const Int_t entries = event.GetNumPhotons();
634
635 for (Int_t i=0; i<entries; i++)
636 {
637 const MRflSinglePhoton &ph = event.GetPhoton(i);
638
639 UInt_t id;
640 for (id=0; id<fNumPixels; id++)
641 {
642 if ((*this)[id].DistanceToPrimitive(ph.GetX(), ph.GetY())<0)
643 break;
644 }
645 if (id==fNumPixels)
646 continue;
647
648 fData[id] += fGeomCam->GetPixRatio(id);
649 }
650
651 //
652 // Set color of pixels
653 //
654 for (UInt_t id=0; id<fNumPixels; id++)
655 if (fData[id]>0)
656 (*this)[id].SetBit(kIsUsed);
657}
658
659// ------------------------------------------------------------------------
660//
661// Reset the all pixel colors to a default value
662//
663void MCamDisplay::Reset()
664{
665 for (UInt_t i=0; i<fNumPixels; i++)
666 (*this)[i].ResetBit(kIsUsed);
667
668 if (fAutoScale)
669 {
670 fMinimum = 0;
671 fMaximum = 0;
672 }
673}
674
675// ------------------------------------------------------------------------
676//
677// Here we calculate the color index for the current value.
678// The color index is defined with the class TStyle and the
679// Color palette inside. We use the command gStyle->SetPalette(1,0)
680// for the display. So we have to convert the value "wert" into
681// a color index that fits the color palette.
682// The range of the color palette is defined by the values fMinPhe
683// and fMaxRange. Between this values we have 50 color index, starting
684// with 0 up to 49.
685//
686Int_t MCamDisplay::GetColor(Float_t val, Float_t min, Float_t max, Bool_t islog)
687{
688 //
689 // first treat the over- and under-flows
690 //
691 const Int_t maxcolidx = kItemsLegend-1;
692
693 if (val >= max)
694 return fColors[maxcolidx];
695
696 if (val <= min)
697 return fColors[0];
698
699 //
700 // calculate the color index
701 //
702 Float_t ratio;
703 if (islog && min>0)
704 ratio = log10(val/min) / log10(max/min);
705 else
706 ratio = (val-min) / (max-min);
707 const Int_t colidx = (Int_t)(ratio*maxcolidx + .5);
708 return fColors[colidx];
709}
710
711// ------------------------------------------------------------------------
712//
713// Change the text on the legend according to the range of the Display
714//
715void MCamDisplay::UpdateLegend(Float_t minphe, Float_t maxphe, Bool_t islog)
716{
717 for (Int_t i=0; i<kItemsLegend+1; i+=3)
718 {
719 const Float_t pos = (Float_t)i/kItemsLegend;
720
721 Float_t val;
722 if (islog && minphe>0)
723 val = pow(10, log10(maxphe/minphe)*pos) * minphe;
724 else
725 val = minphe + pos * (maxphe-minphe);
726
727 TText &txt = *(TText*)fLegText->At(i);
728 txt.SetText(txt.GetX(), txt.GetY(), Form(val<1e6?"%5.1f":"%5.1e", val));
729 }
730}
731
732// ------------------------------------------------------------------------
733//
734// Save primitive as a C++ statement(s) on output stream out
735//
736void MCamDisplay::SavePrimitive(ofstream &out, Option_t *opt)
737{
738 cout << "MCamDisplay::SavePrimitive: Must be rewritten!" << endl;
739 /*
740 if (!gROOT->ClassSaved(TCanvas::Class()))
741 fDrawingPad->SavePrimitive(out, opt);
742
743 out << " " << fDrawingPad->GetName() << "->SetWindowSize(";
744 out << fDrawingPad->GetWw() << "," << fDrawingPad->GetWh() << ");" << endl;
745 */
746}
747
748// ------------------------------------------------------------------------
749//
750// compute the distance of a point (px,py) to the Camera
751// this functions needed for graphical primitives, that
752// means without this function you are not able to interact
753// with the graphical primitive with the mouse!!!
754//
755// All calcutations are running in pixel coordinates
756//
757Int_t MCamDisplay::DistancetoPrimitive(Int_t px, Int_t py)
758{
759 Int_t dist = 999999;
760
761 for (UInt_t i=0; i<fNumPixels; i++)
762 {
763 Int_t d = (*fPixels)[i]->DistancetoPrimitive(px, py);
764
765 if (d<dist)
766 dist=d;
767 }
768 return dist==0?0:999999;
769}
770
771// ------------------------------------------------------------------------
772//
773// Execute a mouse event on the camera
774//
775/*
776 void MCamDisplay::ExecuteEvent(Int_t event, Int_t px, Int_t py)
777 {
778 cout << "Execute Event Camera " << event << " @ " << px << " " << py << endl;
779 }
780 */
781
782
783// ------------------------------------------------------------------------
784//
785// Function introduced (31-01-03) WILL BE REMOVED IN THE FUTURE! DON'T
786// USE IT!
787//
788void MCamDisplay::SetPix(const Int_t pixnum, const Int_t color, Float_t min, Float_t max)
789{
790 fData[pixnum] = color;
791 (*this)[pixnum].SetBit(kIsUsed);
792 (*this)[pixnum].SetFillColor(GetColor(color, min, max, 0));
793}
794
795// ------------------------------------------------------------------------
796//
797// Returns string containing info about the object at position (px,py).
798// Returned string will be re-used (lock in MT environment).
799//
800char *MCamDisplay::GetObjectInfo(Int_t px, Int_t py) const
801{
802 static char info[64];
803
804 UInt_t i;
805 for (i=0; i<fNumPixels; i++)
806 {
807 if ((*fPixels)[i]->DistancetoPrimitive(px, py)>0)
808 continue;
809
810 sprintf(info, "Pixel Id: %d", i);
811 return info;
812 }
813 return TObject::GetObjectInfo(px, py);
814}
Note: See TracBrowser for help on using the repository browser.