]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/macros/testPadsUpEtc.C
Use new geometry segmentation framework.
[u/mrichter/AliRoot.git] / MUON / mapping / macros / testPadsUpEtc.C
1 // $Id$
2 //
3 // Test macro that starts from a given pad and prints 
4 // all pads up, down, right, left from this pad
5 // (up to the plane border).
6
7 void testPadsUpEtc(AliMpStationType station = kStation1,
8                    AliMpPlaneType  planeType = kBendingPlane)
9 {
10   AliMpPlane* plane = AliMpPlane::Create(station, planeType);
11   AliMpPlaneSegmentation planeSegmentation(plane);
12   
13   //AliMpIntPair indices(85, 101);
14   AliMpIntPair indices(-129, 10);
15  
16   AliMpPad pad;
17   if (planeSegmentation.HasPad(indices)) {
18           
19     pad = planeSegmentation.PadByIndices(indices);
20     cout << "Pad:      "  << pad << endl << endl;
21   
22     cout << "######### GO UP  ############### " << endl;
23
24     AliMpPadPair nextPads(pad, pad);
25     while (nextPads.GetFirst().IsValid()) {
26       nextPads = planeSegmentation.PadsUp(nextPads.GetFirst());
27       cout << " up    1: "  << nextPads.GetFirst() << endl;    
28       cout << "       2: "  << nextPads.GetSecond() << endl;    
29     }
30
31     cout << "######### GO DOWN  ############### " << endl;
32
33     nextPads = AliMpPadPair(pad, pad);
34     while (nextPads.GetFirst().IsValid()) {
35       nextPads = planeSegmentation.PadsDown(nextPads.GetFirst());
36       cout << " down  1: "  << nextPads.GetFirst() << endl;    
37       cout << "       2: "  << nextPads.GetSecond() << endl;    
38     }
39
40     cout << "######### GO RIGHT  ############### " << endl;
41
42     nextPads = AliMpPadPair(pad, pad);
43     while (nextPads.GetFirst().IsValid()) {
44       nextPads = planeSegmentation.PadsRight(nextPads.GetFirst());
45       cout << " right 1: "  << nextPads.GetFirst() << endl;    
46       cout << "       2: "  << nextPads.GetSecond() << endl;    
47     }
48
49     cout << "######### GO LEFT  ############### " << endl;
50
51     nextPads = AliMpPadPair(pad, pad);
52     while (nextPads.GetFirst().IsValid()) {
53       nextPads = planeSegmentation.PadsLeft(nextPads.GetFirst());
54       cout << " left  1: "  << nextPads.GetFirst() << endl;    
55       cout << "       2: "  << nextPads.GetSecond() << endl;    
56     }
57   }  
58 }