3 // Test macro for reading sector data.
5 void testReadSector(AliMpStationType station = kStation1,
6 AliMpPlaneType plane = kBendingPlane)
8 AliMpReader reader(station, plane);
9 //reader.SetVerboseLevel(1);
12 AliMpSector* sector = reader.BuildSector();
17 sector->PrintGeometry();
22 cout << "0th row low border " << sector->FindRow(TVector2(0., 0.))->GetID() << endl;
23 cout << "in 0th row " << sector->FindRow(TVector2(0., 25.))->GetID() << endl;
24 cout << "0th row up border " << sector->FindRow(TVector2(0., 67.2))->GetID() << endl;
25 cout << "in 4th row " << sector->FindRow(TVector2(0., 300.))->GetID() << endl;
26 if (plane == kBendingPlane)
27 cout << "12th row up border " << sector->FindRow(TVector2(0., 894.6))->GetID() << endl;
28 if (plane == kNonBendingPlane)
29 cout << "12th row up border " << sector->FindRow(TVector2(0., 848.4))->GetID() << endl;
32 // Find motif position test
33 for (Int_t i=1; i<4 ; i++) {
34 for (Int_t j=0; j<5; j++) {
37 if (plane == kBendingPlane) start = 0;
38 if (plane == kNonBendingPlane) start = 3000;
40 Int_t id = start + i*1010 + 5*j;
42 cout << "Motif pos " << id;
43 if (!sector->FindRowSegment(id)) {
44 cout << " not found." << endl;
47 cout << " found in : "
48 << sector->FindRow(id)->GetID() << " row, "
50 << sector->FindRowSegment(id)->GetMotif(0)->GetID().Data()
58 // Find motif by coordinates test
59 for (Int_t i=0; i<2 ; i++) {
60 TVector2 pos(5., 186. - i*20.); // i=0 in motif 1001,
61 // i=1 outside (below) motif 1001
62 AliMpMotif* motif = sector->FindMotif(pos);
63 cout << "In the position " << pos.X() << " " << pos.Y();
66 cout << " found motif " << motif->GetID() << endl;
68 cout << " motif not found " << endl;
71 // Find special motif test
72 if (plane == kNonBendingPlane)
73 for (Int_t i=0; i<6 ; i++) {
75 cout << "Motif pos " << id;
76 if (!sector->FindRowSegment(id)) {
77 cout << " not found." << endl;
80 cout << " found in : "
81 << sector->FindRow(id)->GetID() << " row, "
83 << sector->FindPosition(id).X() << " " << sector->FindPosition(id).Y()
90 sector->GetMotifMap()->Print();