7 if (TMath::Abs(fromGeom-fromUtil) < eps)
return;
9 if (type==1) c = TMath::RadToDeg();
12 Printf(
" FMD%d%c[%2d,%3d]: %20s G:%10.4f U:%10.4f -> D:%10.4f > %g %s",
13 d, r, s, t, what, g, u, (g-u), eps,
14 type==0 ?
"" : type==1 ?
"[degrees]" :
"[cm]" );
19 if (!gROOT->GetGlobal(
"gGeoManager")) init =
true;
20 AliCDBManager* cdb = AliCDBManager::Instance();
22 cdb->SetDefaultStorageFromRun(run);
24 AliGeomManager::LoadGeometry();
25 AliGeomManager::ApplyAlignObjsFromCDB(
"FMD");
27 AliFMDGeometry* fmd = AliFMDGeometry::Instance();
30 fmd->InitTransformations();
36 Int_t nQ = (d == 1 ? 1 : 2);
38 char r = (q == 0 ?
'I' :
'O');
40 UShort_t nStr = (q == 0 ? 512 : 256);
41 printf(
" FMD%d%c ", d, r);
42 for (
UShort_t s = 0; s < nSec; s++) {
44 for (
UShort_t t = 0; t < nStr; t++) {
46 Char_t c = (m == 0 ?
'/' : m == 1 ?
'-' : m == 2 ?
'\\' :
'|');
49 fmd->Detector2XYZ(d, r, s, t, x, y, z);
55 Compare(d, r, s, t,
"X", x, pos.X(), 2, tolXY);
56 Compare(d, r, s, t,
"Y", y, pos.Y(), 2, tolXY);
57 Compare(d, r, s, t,
"Z", z, pos.Z(), 2);
59 Double_t gRadius, gEta, gPhi, gTheta;
60 fmd->XYZ2REtaPhiTheta(x,y,z,gRadius,gEta,gPhi,gTheta);
67 Compare(d,r,s,t,
"eta",gEta, uEta, 0, tolEta);
68 Compare(d,r,s,t,
"phi",gPhi, uPhi, 1);
static Bool_t GetEtaPhi(UShort_t det, Char_t ring, UShort_t sec, UShort_t str, const TVector3 &ip, Double_t &eta, Double_t &phi)
void Compare(UShort_t d, Char_t r, UShort_t s, UShort_t t, const char *what, Double_t fromGeom, Double_t fromUtil, UShort_t type=0, Double_t eps=1e-4)
static Bool_t GetXYZ(UShort_t det, Char_t ring, UShort_t sec, UShort_t str, const TVector3 &ip, TVector3 &pos)
void TestGeomUtils(Bool_t init=false, ULong_t run=138190)