3 // Test macro for reading sector data.
7 void testReadSector(AliMpStationType station = kStation1,
8 AliMpPlaneType plane = kBendingPlane)
10 AliMpReader reader(station, plane);
11 //reader.SetVerboseLevel(1);
14 AliMpSector* sector = reader.BuildSector();
19 sector->PrintGeometry();
24 cout << "0th row low border " << sector->FindRow(TVector2(0., 0.))->GetID() << endl;
25 cout << "in 0th row " << sector->FindRow(TVector2(0., 25.))->GetID() << endl;
26 cout << "0th row up border " << sector->FindRow(TVector2(0., 67.2))->GetID() << endl;
27 cout << "in 4th row " << sector->FindRow(TVector2(0., 300.))->GetID() << endl;
28 if (plane == kBendingPlane)
29 cout << "12th row up border " << sector->FindRow(TVector2(0., 894.6))->GetID() << endl;
30 if (plane == kNonBendingPlane)
31 cout << "12th row up border " << sector->FindRow(TVector2(0., 848.4))->GetID() << endl;
34 // Find motif position test
35 Int_t ids[15] = { 19, 14, 9, 32, 36, 136, 187, 212, 207, 220, 1, 131, 239, 243, 250 };
36 for (Int_t i=0; i<15 ; i++) {
38 cout << "Motif pos " << std::setw(3) << id;
39 if (!sector->FindRowSegment(id)) {
40 cout << " not found." << endl;
43 cout << " found in : "
44 << sector->FindRow(id)->GetID() << " row, "
46 << sector->FindRowSegment(id)->GetMotif(0)->GetID().Data()
52 // Find motif by coordinates test
53 for (Int_t i=0; i<2 ; i++) {
54 TVector2 pos(5., 186. - i*20.); // i=0 in motif 1001,
55 // i=1 outside (below) motif 1001
56 AliMpMotif* motif = sector->FindMotif(pos);
57 cout << "In the position " << pos.X() << " " << pos.Y();
60 cout << " found motif " << motif->GetID() << endl;
62 cout << " motif not found " << endl;
65 // Find special motif test
66 if (plane == kNonBendingPlane) {
68 Int_t ids[6] = { 20, 46, 47, 74, 75, 76 };
69 for (Int_t i=0; i<6 ; i++) {
72 cout << "Motif pos " << id;
73 if (!sector->FindRowSegment(id)) {
74 cout << " not found." << endl;
77 cout << " found in : "
78 << sector->FindRow(id)->GetID() << " row, "
80 << sector->FindPosition(id).X() << " " << sector->FindPosition(id).Y()
88 sector->GetMotifMap()->Print();