]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/macros/testExistingPads.C
liMUONSt12QuadrantSegmentation.cxx
[u/mrichter/AliRoot.git] / MUON / mapping / macros / testExistingPads.C
CommitLineData
66e0997c 1// $Id$
2//
3// Test macro for testing which pad is seen as "existing" by AliMpSector.
4
5void testExistingPads(AliMpStationType station = kStation1,
6 AliMpPlaneType plane = kBendingPlane)
7{
8 AliMpReader r(station, plane);
9
10 AliMpSector *sector=r.BuildSector();
11 AliMpVPainter* painter = AliMpVPainter::CreatePainter(sector);
12
13 TCanvas* c1 = new TCanvas("view",
14 "AliMpSectorPainter::Draw() output (view per pad)");
15 painter->Draw("ZSSMP");
16 c1->Update();
17
18 TH2C* histo = new TH2C("histo","Existing pads",150,-0.5,149.5,
19 200,-0.5,199.5);
20 TCanvas* c2 = new TCanvas("c2","Only existing pads are filled");
21
22 AliMpSectorSegmentation segmentation(sector);
23 for (Int_t i=0; i<150;i++){
24 for (Int_t j=0;j<200;++j){
25
26 AliMpIntPair indices(i,j);
27 if (segmentation.HasPad(indices)) histo->Fill(i,j);
28 }
29 }
30
31 c2->cd();
32 histo->Draw("box");
33}