3 // Test macro for making an output file, where all mapping elements
4 // indices & positions are written.
6 void testPrintLimits(AliMpStationType station = kStation1,
7 AliMpPlaneType plane = kBendingPlane, ostream& out=cout)
9 AliMpReader r(station, plane);
11 AliMpSector *sector=r.BuildSector();
13 AliMpVPainter* painter = AliMpVPainter::CreatePainter(sector);
14 painter->Draw("ZSSMP");
16 AliMpIntPair low,high;
19 for (Int_t irow=0;irow<sector->GetNofRows();irow++){
22 AliMpRow* row = sector->GetRow(irow);
23 low = row->GetLowIndicesLimit();
24 high = row->GetHighIndicesLimit();
25 rlow = TVector2(row->Position().X()-row->Dimensions().X(),
26 row->Position().Y()-row->Dimensions().Y());
27 rhigh = TVector2(row->Position().X()+row->Dimensions().X(),
28 row->Position().Y()+row->Dimensions().Y());
29 out<<"_______________________________________________________________"<<endl;
30 out<<"Row "<<irow<<" between "<<low<<" and "<<high
31 <<"-->("<<rlow.X()<<','<<rlow.Y()<<") and ("
32 <<rhigh.X()<<','<<rhigh.Y()<<')'<<endl;
33 out<<"_______________________________________________________________"<<endl;
35 for (Int_t iseg=0;iseg<row->GetNofRowSegments();iseg++){
36 // For each row segment
38 AliMpVRowSegment* seg = row->GetRowSegment(iseg);
39 low = seg->GetLowIndicesLimit();
40 high = seg->GetHighIndicesLimit();
41 rlow = TVector2(seg->Position().X()-seg->Dimensions().X(),
42 seg->Position().Y()-seg->Dimensions().Y());
43 rhigh = TVector2(seg->Position().X()+seg->Dimensions().X(),
44 seg->Position().Y()+seg->Dimensions().Y());
45 out<<"-----------------------------------------------------------"<<endl;
46 out<<" Segment "<<iseg<<" between "<<low<<" and "<<high
47 <<"-->("<<rlow.X()<<','<<rlow.Y()<<") and ("
48 <<rhigh.X()<<','<<rhigh.Y()<<')'<<endl;
49 out<<"-----------------------------------------------------------"<<endl;
51 for (Int_t imotif=0;imotif<seg->GetNofMotifs();imotif++){
54 AliMpMotifPosition* motifPos
55 = sector->GetMotifMap()
56 ->FindMotifPosition(seg->GetMotifPositionId(imotif));
57 AliMpVMotif* motif = motifPos->GetMotif();
59 low = motifPos->GetLowIndicesLimit();
60 high = motifPos->GetHighIndicesLimit();
61 rlow = TVector2(motifPos->Position().X()-motif->Dimensions().X(),
62 motifPos->Position().Y()-motif->Dimensions().Y());
63 rhigh = TVector2(motifPos->Position().X()+motif->Dimensions().X(),
64 motifPos->Position().Y()+motif->Dimensions().Y());
65 out<<" Motif "<<imotif<<" between "<<low<<" and "<<high
66 <<"-->("<<rlow.X()<<','<<rlow.Y()<<") and ("
67 <<rhigh.X()<<','<<rhigh.Y()<<')'<<endl;