X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=FMD%2FAliFMDDetector.cxx;h=78cc6ffd1e8d988bcdb25fa3a531ba6148da2e42;hb=0b7685afdeeee754fedbb3039335957ad452253b;hp=4851e2469bb84049566cd1bde0ac94630d1a2b8c;hpb=f38b16535e46e28a81d875e6a66476b85fe80e8b;p=u%2Fmrichter%2FAliRoot.git diff --git a/FMD/AliFMDDetector.cxx b/FMD/AliFMDDetector.cxx index 4851e2469bb..78cc6ffd1e8 100644 --- a/FMD/AliFMDDetector.cxx +++ b/FMD/AliFMDDetector.cxx @@ -108,6 +108,7 @@ AliFMDDetector& AliFMDDetector::operator=(const AliFMDDetector& other) { // Assignment operator + if (&other == this) return *this; SetName(other.GetName()); SetTitle(other.GetTitle()); fId = other.fId; @@ -188,6 +189,27 @@ AliFMDDetector::InitTransformations() if (fOuter && !fOuterTransforms) fOuterTransforms = new TObjArray(fOuter->GetNModules()); + // Loop over bottom/top + for (size_t ihalf = 0; ihalf < 2; ihalf++) { + char half = (ihalf == 0 ? 'T' : 'B'); + TString path(Form(HALF_FORMAT, fId, half)); + TGeoPNEntry* entry = gGeoManager->GetAlignableEntry(path.Data()); + if (!entry) { + AliError(Form("Alignable entry for half-detector \"%s\" not found!", + path.Data())); + continue; + } + TGeoPhysicalNode* pn = entry->GetPhysicalNode(); + if (!pn) { + AliWarning(Form("Making physical volume for \"%s\"", path.Data())); + pn = gGeoManager->MakeAlignablePN(entry); + if (!pn) { + AliError(Form("No physical node for \"%s\"", path.Data())); + continue; + } + } + } + // Loop over rings for (size_t iring = 0; iring < 2; iring++) { char ring = (iring == 0 ? 'I' : 'O'); @@ -379,7 +401,7 @@ AliFMDDetector::SetAlignableVolumes() const case 'T': hasTop = true; break; case 'B': hasBottom = true; break; default: - AliWarning(Form("Unknown part '%c' of FMD%d", fId)); + AliWarning(Form("Unknown part '%c' of FMD%d", thisHalf, fId)); continue; // because the node is unknown. }