3 // Test macro for testing which pad is seen as "existing" by AliMpSector.
5 void testAllIndices(AliMpStationType station = kStation1,
6 AliMpPlaneType plane = kBendingPlane)
8 AliMpReader r(station, plane);
10 AliMpSector *sector=r.BuildSector();
11 AliMpSectorSegmentation segmentation(sector);
12 AliMpVPainter* painter = AliMpVPainter::CreatePainter(sector);
14 TCanvas* c1 = new TCanvas("view",
15 "MSectorPainter::Draw() output (view per pad)");
16 painter->Draw("ZSSMP");
19 Int_t maxPadIndexX = segmentation.MaxPadIndexX();
20 Int_t maxPadIndexY = segmentation.MaxPadIndexY();
22 // Define histogram limits
23 Int_t nx = (maxPadIndexX/10 + 1)*10;
24 Int_t ny = (maxPadIndexY/10 + 1)*10;
25 TH2C* histo = new TH2C("histo","Existing pads",
26 nx, -0.5, nx-0.5, ny, -0.5, ny-0.5);
30 if (station == kStation2) {
34 TH2F* histo2 = new TH2F("histo2","Existing positions",
35 nx2, 0, nx2*2, ny2, 0, ny2*2);
38 TCanvas* c2 = new TCanvas("c2","Only existing pads are filled");
39 TCanvas* c3 = new TCanvas("c3","Positions");
41 for (Int_t irow=0;irow<sector->GetNofRows();irow++){
42 AliMpRow* row = sector->GetRow(irow);
44 for (Int_t iseg=0;iseg<row->GetNofRowSegments();iseg++){
45 AliMpVRowSegment* seg = row->GetRowSegment(iseg);
47 for (Int_t imot=0;imot<seg->GetNofMotifs();imot++){
48 AliMpMotifPosition* motifPos
49 = sector->GetMotifMap()->FindMotifPosition(seg->GetMotifPositionId(imot));
51 for (Int_t gassNum=0;gassNum<64;gassNum++){
52 if (motifPos->GetMotif()->GetMotifType()->FindConnectionByGassiNum(gassNum)){
54 AliMpPad pad = segmentation.PadByLocation(AliMpIntPair(motifPos->GetID(),gassNum));
55 if (pad != AliMpPad::Invalid()) {
56 histo->Fill (pad.GetIndices().GetFirst(),
57 pad.GetIndices().GetSecond());
58 histo2->Fill(pad.Position().X(),