diff --git a/core/detectors/trd/CbmTrdGeoFactory.cxx b/core/detectors/trd/CbmTrdGeoFactory.cxx index 7a0a5b57d260f82b53f7e5023a92aac3c20e7c38..63ae6050cefa1a62acf19acf727638a861b69fcf 100644 --- a/core/detectors/trd/CbmTrdGeoFactory.cxx +++ b/core/detectors/trd/CbmTrdGeoFactory.cxx @@ -651,6 +651,7 @@ InitStatus ChamberBuilder::FEB::Init() auto connBrg = new TGeoBBox("connBrg", ConnBRG_x / 2., ConnBRG_y / 2., ConnBRG_z / 2.); auto vol_conn_brg = new TGeoVolume("connBrg", connBrg, cbm::trd::geo::GetMaterial("polypropylene")); vol_conn_brg->SetLineColor(kYellow + 2); + fHeight += FASP_z; fHeight += ConnBRG_z; // Init volume: @@ -664,18 +665,20 @@ InitStatus ChamberBuilder::FEB::Init() fVol->SetTransparency(50); // Add up all components - fHeight = -0.5 * fHeight; - fVol->AddNode(vol_faspro_cu, 1, new TGeoTranslation("", 0., 0., fHeight)); - fVol->AddNode(vol_faspro_pcb, 1, new TGeoTranslation("", 0., 0., fHeight)); + double offset = -0.5 * fHeight; + fHeight = offset + FASP_z / 2; // add FASPs on the back side of the FEB //info_t infoAsic; for (int ifasp(0), jfasp(0); ifasp < faspFeb[fType].nasic; ifasp++) { vol_fasp->SetTitle(Form("%x", 0xff /*gDB->GetASICMask*/)); // if ((jfasp = WriteAsicInfo(&infoAsic)) < 0) continue; - fVol->AddNode(vol_fasp, jfasp, - new TGeoTranslation("", FASP_pos[ifasp][0], FASP_pos[ifasp][1], fHeight - FASP_z / 2)); + fVol->AddNode(vol_fasp, jfasp, new TGeoTranslation("", FASP_pos[ifasp][0], FASP_pos[ifasp][1], fHeight)); } + fHeight += 0.5 * FASP_z; + fVol->AddNode(vol_faspro_cu, 1, new TGeoTranslation("", 0., 0., fHeight)); + fVol->AddNode(vol_faspro_pcb, 1, new TGeoTranslation("", 0., 0., fHeight)); fHeight += FASPRO_thickness; + // add ADCs, FPGAs and DCDC converters on the tob side of the FEB for (int iadc(0); iadc < FASPRO_Nadc; iadc++) fVol->AddNode(vol_adc, iadc + 1, new TGeoTranslation("", ADC_pos[iadc][0], ADC_pos[iadc][1], fHeight + ADC_z / 2)); @@ -693,8 +696,7 @@ InitStatus ChamberBuilder::FEB::Init() fVol->AddNode(vol_conn_brg, iconn + 1, new TGeoTranslation("", ConnBRG_pos[iconn][0], ConnBRG_pos[iconn][1], fHeight + ConnBRG_z / 2)); fHeight += ConnBRG_z; - fHeight *= 2; - + fHeight -= offset; return kSUCCESS; }