Added Bool_t rootInput argument; if set to true, the sector
[u/mrichter/AliRoot.git] / MUON / mapping / macros / testSectorFind.C
1 // $Id$
2 // $MpId: testSectorFind.C,v 1.9 2005/09/26 16:05:25 ivana Exp $
3 //
4 // Test macro for which verify that all FindPosition, FindIndices
5 // and FindLocation methods are consistents between them.
6
7 void testSectorFind(AliMpStationType station = kStation1,
8                     AliMpPlaneType plane = kBendingPlane,
9                     Bool_t rootInput = false) 
10 {
11   AliMpSector *sector = 0;
12   if (!rootInput) {
13     AliMpSectorReader r(station, plane);
14     sector=r.BuildSector();
15   }
16   else  {
17     TString filePath = AliMpFiles::Instance()->SectorFilePath(station,plane);
18     filePath.ReplaceAll("zones.dat", "sector.root"); 
19
20     TFile f(filePath.Data(), "READ");
21     sector = (AliMpSector*)f.Get("Sector");
22   }  
23
24   AliMpSectorSegmentation segmentation(sector);
25   AliMpVPainter* painter = AliMpVPainter::CreatePainter(sector);
26   painter->Draw("ZSSMP");
27
28   for (Int_t i=0; i<90;i++){
29     cout<<"Verifying column "<<i<<"....."<<endl;
30
31     for (Int_t j=0;j<230;++j)
32       segmentation.CircleTest(AliMpIntPair(i,j));    
33   }
34 }