2 * A script to dump the physical coordinates as given by the
9 * Get the physical coordinates of a strip
17 PhysicalCoordinates(UShort_t det, Char_t rng, UShort_t sec, UShort_t str)
20 AliFMDGeometry::Instance()->Detector2XYZ(det, rng, sec, str, x, y, z);
21 Double_t phi = TMath::ATan2(y, x);
22 Double_t r = TMath::Sqrt(x * x + y * y);
23 Double_t theta = TMath::ATan2(r, z);
24 if (theta < 0) theta += TMath::Pi();
25 Double_t eta = -TMath::Log(TMath::Tan(theta / 2));
26 Double_t deg = 180. / TMath::Pi();
28 std::cout << det << rng << "["
29 << std::setw(2) << sec << ","
30 << std::setw(3) << str << "] | "
31 << std::setw(9) << x << ","
32 << std::setw(9) << y << ","
33 << std::setw(9) << z << " | "
34 << std::setw(9) << phi * deg << ","
35 << std::setw(9) << theta * deg << ","
36 << std::setw(9) << eta << std::endl;
40 * Show coordinates of all strips
46 AliFMDGeometry::Instance()->Init();
47 AliFMDGeometry::Instance()->InitTransformations();
48 std::cout << std::setw(1+1+1+2+1+3+1) << "Detector" << " | "
49 << std::setw(9+1+9+1+9) << "Cartisian Coords" << " | "
50 << std::setw(9+1+9+1+9) << "phi,theta,eta" << "\n"
52 << std::setw(1+1+1+2+1+3+1+1+1) << "+"
53 << std::setw(1+9+1+9+1+9+1+1) << "+"
54 << std::setw(1+9+1+9+1+9+1+1) << "+"
55 << std::setfill(' ') << std::endl;
56 for (UShort_t d = 1; d <= 3; d++) {
57 UShort_t nrng = (d == 1 ? 1 : 2);
58 for (UShort_t ir = 0; ir < nrng; ir++) {
59 Char_t r = (ir == 0 ? 'I' : 'O');
60 UShort_t nsec = (r == 'I' ? 20 : 40);
61 UShort_t nstr = 1; // (r == 'I' ? 512 : 256);
62 for (UShort_t s = 0; s < nsec; s++) {
63 for (UShort_t t = 0; t < nstr; t++) {
64 PhysicalCoordinates(d, r, s, t);