]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/macros/testPadsUpEtc.C
Updated for new numbering of motif positions in mapping.
[u/mrichter/AliRoot.git] / MUON / mapping / macros / testPadsUpEtc.C
CommitLineData
66e0997c 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
7void testPadsUpEtc(AliMpStationType station = kStation1,
8 AliMpPlaneType planeType = kBendingPlane)
9{
e8c253a0 10 AliMpReader reader(station, planeType);
11 AliMpSector* sector = reader.BuildSector();
12 AliMpSectorSegmentation segmentation(sector);
66e0997c 13
e8c253a0 14 AliMpIntPair indices(85, 101);
15 if( planeType == kNonBendingPlane) indices = AliMpIntPair(129, 10);
66e0997c 16
17 AliMpPad pad;
e8c253a0 18 if (segmentation.HasPad(indices)) {
66e0997c 19
e8c253a0 20 pad = segmentation.PadByIndices(indices);
66e0997c 21 cout << "Pad: " << pad << endl << endl;
22
23 cout << "######### GO UP ############### " << endl;
24
25 AliMpPadPair nextPads(pad, pad);
26 while (nextPads.GetFirst().IsValid()) {
e8c253a0 27 nextPads = segmentation.PadsUp(nextPads.GetFirst());
66e0997c 28 cout << " up 1: " << nextPads.GetFirst() << endl;
29 cout << " 2: " << nextPads.GetSecond() << endl;
30 }
31
32 cout << "######### GO DOWN ############### " << endl;
33
34 nextPads = AliMpPadPair(pad, pad);
35 while (nextPads.GetFirst().IsValid()) {
e8c253a0 36 nextPads = segmentation.PadsDown(nextPads.GetFirst());
66e0997c 37 cout << " down 1: " << nextPads.GetFirst() << endl;
38 cout << " 2: " << nextPads.GetSecond() << endl;
39 }
40
41 cout << "######### GO RIGHT ############### " << endl;
42
43 nextPads = AliMpPadPair(pad, pad);
44 while (nextPads.GetFirst().IsValid()) {
e8c253a0 45 nextPads = segmentation.PadsRight(nextPads.GetFirst());
66e0997c 46 cout << " right 1: " << nextPads.GetFirst() << endl;
47 cout << " 2: " << nextPads.GetSecond() << endl;
48 }
49
50 cout << "######### GO LEFT ############### " << endl;
51
52 nextPads = AliMpPadPair(pad, pad);
53 while (nextPads.GetFirst().IsValid()) {
e8c253a0 54 nextPads = segmentation.PadsLeft(nextPads.GetFirst());
66e0997c 55 cout << " left 1: " << nextPads.GetFirst() << endl;
56 cout << " 2: " << nextPads.GetSecond() << endl;
57 }
58 }
59}