3 // Test macro for iterating over the whole plane
7 class AliMpVPadIterator;
9 void MarkPads(AliMpVPadIterator& it, Double_t xmax, Double_t ymax,
12 // Marks pads according their position.
13 // Fills histogram with pad indices.
14 // Measures time that takes processing of full quadrant
19 TH2C* histo = new TH2C("pads", "pads", 201, 0, 200, 251, 0, 250);
24 for (it.First(); ! it.IsDone(); it.Next()){
26 if (print) cout << endl
28 << " " << it.CurrentItem() << endl;
30 // mark pads positions
31 TVector2 posi = it.CurrentItem().Position();
32 TMarker* marker = new TMarker( posi.X()/xmax, posi.Y()/ymax, 2);
35 // fill pads indices in the histogram
36 histo->Fill(it.CurrentItem().GetIndices().GetFirst(),
37 it.CurrentItem().GetIndices().GetSecond());
40 TCanvas *canv2 = new TCanvas("canv2");
42 //histo->SetMinimum(1.5);
49 void testSectorAreaIterator(AliMpStationType station = kStation1,
50 AliMpPlaneType planeType = kBendingPlane)
52 AliMpReader reader(station, planeType);
53 AliMpSector* sector = reader.BuildSector();
54 AliMpSectorSegmentation segmentation(sector);
57 if ( station == kStation1 )
58 area = AliMpArea(TVector2(450.,450.),TVector2(450.,450.));
60 area = AliMpArea(TVector2(600.,600.),TVector2(600.,600.));
61 AliMpVPadIterator* iter = segmentation.CreateIterator(area);
63 TCanvas* graph = new TCanvas("Graph");
64 AliMpVPainter::CreatePainter(sector)->Draw("ZSSMP");
66 TCanvas *canv = new TCanvas("canv");
67 canv->Range(-1,-1,1,1);
68 MarkPads(*iter, TMath::Abs(area.Position().X())+area.Dimensions().X(),
69 TMath::Abs(area.Position().Y())+area.Dimensions().Y(), kTRUE);