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 plane.
19 TH2C* histo = new TH2C("pads", "pads", 401, -200, 200, 501, -250, 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 testPlaneAreaIterator(AliMpStationType station = kStation1,
50 AliMpPlaneType planeType = kBendingPlane,
51 AliMpArea area = AliMpArea(TVector2(0.,0.),TVector2(900.,900.)))
53 AliMpPlane* plane = AliMpPlane::Create(station, planeType);
54 AliMpPlaneSegmentation planeSeg(plane);
55 AliMpVPadIterator* iter = planeSeg.CreateIterator(area);
57 TCanvas* graph = new TCanvas("Graph");
60 AliMpVPainter::CreatePainter(plane->GetFrontSector())->Draw("ZSSMP");
62 AliMpVPainter::CreatePainter(plane->GetBackSector())->Draw("ZSSMP");
63 TCanvas *canv = new TCanvas("canv");
64 canv->Range(-1,-1,1,1);
66 MarkPads(*iter, TMath::Abs(area.Position().X())+area.Dimensions().X(),
67 TMath::Abs(area.Position().Y())+area.Dimensions().Y(), kTRUE);