- // The actual building of the TNodes is done by
- // AliFMDSubDetector::SimpleGeometry.
- AliDebug(10, "\tCreating a simplified geometry");
-
- AliFMDGeometry* fmd = AliFMDGeometry::Instance();
-
- static TXTRU* innerShape = 0;
- static TXTRU* outerShape = 0;
- static TObjArray* innerRot = 0;
- static TObjArray* outerRot = 0;
-
- if (!innerShape || !outerShape) {
- // Make the shapes for the modules
- for (Int_t i = 0; i < 2; i++) {
- AliFMDRing* r = 0;
- switch (i) {
- case 0: r = fmd->GetRing('I'); break;
- case 1: r = fmd->GetRing('O'); break;
- }
- if (!r) {
- AliError(Form("no ring found for i=%d", i));
- return;
- }
- Double_t siThick = r->GetSiThickness();
- const Int_t nv = r->GetNVerticies();
- Double_t theta = r->GetTheta();
- Int_t nmod = r->GetNModules();
-
- TXTRU* shape = new TXTRU(r->GetName(), r->GetTitle(), "void", nv, 2);
- for (Int_t j = 0; j < nv; j++) {
- TVector2* vv = r->GetVertex(nv - 1 - j);
- shape->DefineVertex(j, vv->X(), vv->Y());
- }
- shape->DefineSection(0, -siThick / 2, 1, 0, 0);
- shape->DefineSection(1, +siThick / 2, 1, 0, 0);
- shape->SetLineColor(GetLineColor());
-
- TObjArray* rots = new TObjArray(nmod);
- for (Int_t j = 0; j < nmod; j++) {
- Double_t th = (j + .5) * theta * 2;
- TString name(Form("FMD_ring_%c_rot_%02d", r->GetId(), j));
- TString title(Form("FMD Ring %c Rotation # %d", r->GetId(), j));
- TRotMatrix* rot = new TRotMatrix(name.Data(), title.Data(),
- 90, th, 90, fmod(90+th,360), 0, 0);
- rots->AddAt(rot, j);
- }
-
- switch (r->GetId()) {
- case 'i':
- case 'I': innerShape = shape; innerRot = rots; break;
- case 'o':
- case 'O': outerShape = shape; outerRot = rots; break;