AliFMDDetector::operator=(const AliFMDDetector& other)
{
// Assignment operator
+ if (&other == this) return *this;
SetName(other.GetName());
SetTitle(other.GetTitle());
fId = other.fId;
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');
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.
}
// Translate detector coordinates (this,ring,sector,strip) into
// (x,y,z) coordinates (in global reference frame)
AliFMDRing* r = GetRing(ring);
- if (!r) return;
+ if (!r) {
+ AliWarning(Form("No such ring FMD%d%c ", fId, ring));
+ return;
+ }
TGeoMatrix* m = FindTransform(ring, sector);
- if (!m) return;
+ if (!m) {
+ AliWarning(Form("No transfrmation found for FMD%d%c[%02d]",
+ fId, ring, sector));
+ return;
+ }
Double_t rho = r->GetStripRadius(strip);
Double_t phi = ((sector % 2) - .5) * r->GetTheta();
Double_t siThick = r->GetSiThickness();