]>
Commit | Line | Data |
---|---|---|
3c833c8a | 1 | #include <iomanip> |
2 | ||
3 | void | |
4 | PrintOne(Char_t r) | |
5 | { | |
6 | AliFMDRing* ring = AliFMDGeometry::Instance()->GetRing(r); | |
7 | if (!ring) { | |
8 | std::cerr << "Ring " << r << " not found" << std::endl; | |
9 | return; | |
10 | } | |
11 | const TObjArray& vertices = ring->GetVerticies(); | |
12 | Double_t x[] = { -1, -1, -1, -1, -1, -1 }; | |
13 | Double_t y[] = { -1, -1, -1, -1, -1, -1 }; | |
14 | for (int i = 1; i < 4; i++) { | |
15 | TVector2* v = static_cast<TVector2*>(vertices.At(i)); | |
16 | int j = i-1; | |
17 | x[j] = v->X(); | |
18 | y[j] = v->Y(); | |
19 | } | |
20 | for (int i = 3; i > 0; i--) { | |
21 | TVector2* v= static_cast<TVector2*>(vertices.At(i)); | |
22 | int j = 3+(3-i); | |
23 | x[j] = -v->X(); | |
24 | y[j] = v->Y(); | |
25 | } | |
26 | std::cout << " Double_t r" << r << "[][2] = { "; | |
27 | TGraph* g = new TGraph(7); | |
28 | g->SetFillColor(kGray); | |
29 | g->SetFillStyle(3001); | |
30 | for (int i = 0; i < 6; i++) { | |
31 | std::cout << "{" << std::setw(12) << x[i] | |
32 | << "," << std::setw(12) << y[i] << "}"; | |
33 | if (i != 5) | |
34 | std::cout << ", // " << i << "\n "; | |
35 | else | |
36 | std::cout << " }; // " << i << std::endl; | |
37 | g->SetPoint(i, x[i], y[i]); | |
38 | } | |
39 | g->SetPoint(6, x[0], y[0]); | |
40 | ||
41 | // TCanvas* c = new TCanvas(Form("c%c", r)); | |
42 | // c->cd(); | |
43 | // g->Draw("afl"); | |
44 | } | |
45 | ||
46 | void | |
47 | PrintSensorVertices() | |
48 | { | |
49 | AliFMDGeometry::Instance()->Init(); | |
50 | ||
51 | PrintOne('I'); | |
52 | PrintOne('O'); | |
53 | } |