]>
Commit | Line | Data |
---|---|---|
9c35f272 | 1 | void |
2 | TestESDPhi() | |
3 | { | |
4 | AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB"); | |
5 | AliCDBManager::Instance()->SetRun(0); | |
6 | ||
7 | AliGeomManager::LoadGeometry(); | |
8 | ||
9 | AliFMDGeometry* geom = AliFMDGeometry::Instance(); | |
10 | geom->Init(); | |
11 | geom->InitTransformations(); | |
12 | ||
13 | AliESDFMD esd; | |
14 | ||
15 | for (UShort_t d = 1; d <= 3; d++) { | |
16 | UShort_t nRng = (d == 1 ? 1 : 2); | |
17 | for (UShort_t q = 0; q < nRng; q++) { | |
18 | Char_t r = (q == 0 ? 'I' : 'O'); | |
19 | UShort_t nSec = (q == 0 ? 20 : 40); | |
20 | for (UShort_t s = 0; s < nSec; s++) { | |
21 | Double_t x, y, z; | |
22 | geom->Detector2XYZ(d, r, s, 0, x, y, z); | |
23 | Double_t a = TMath::ATan2(y, x); | |
24 | Double_t p = esd.Phi(d, r, s, 0); | |
25 | ||
26 | if (a < 0) a+= 2 * TMath::Pi(); | |
27 | a *= 180 / TMath::Pi(); | |
28 | ||
29 | Printf("FMD%d%c[%2d]: Geom: %5.1f, ESD: %5.1f", d, r, s, a, p); | |
30 | } | |
31 | } | |
32 | } | |
33 | for (UShort_t q = 0; q < nRng; q++) { | |
34 | Char_t r = (q == 0 ? 'I' : 'O'); | |
35 | UShort_t nStr = (q == 0 ? 512 : 256); | |
36 | for (UShort_t t = 0; t < nStr; t++) { | |
37 | Double_t x, y, z; | |
38 | geom->Detector2XYZ(2, r, 0, t, x, y, z); | |
39 | Double_t l = TMath::Sqrt(x * x + y * y); | |
40 | Double_t v = esd.R(2, r, 0, t); | |
41 | ||
42 | Printf("FMD%c[%3d]: Geom: %6.3f, ESD: %6.3f", r, t, l, v); | |
43 | } | |
44 | } | |
45 | } |