Skip to content

Commit f799e2c

Browse files
committed
Place the space-frame sectors explicitly instead of dividing BBMO
This replaces the phi division of the space-frame mother BBMO by 18 explicit placements of the sector volume BBCE, so that the sector contents survive the conversion to Geant4. - Geant4 divides a polyhedra in phi by its number of sides and ignores the requested width and offset, and its cell frame sits at the start of a sector where TGeo's sits at the centre. - Both conversion routes, ROOT's GDML writer and VGM, are affected, so the 18 FTOS service boxes placed in BBCE were absent from the Geant4 geometry. - The TGeo geometry is unchanged: same node count, same BBCE shape and content, same global placements, no new overlaps. - With this, the ray-by-ray mass thickness of the two Geant4 geometries agrees with TGeo to 9e-8 relative, against 5e-5 before. https://its.cern.ch/jira/browse/O2-7153
1 parent 28b4754 commit f799e2c

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

Detectors/Passive/src/FrameStructure.cxx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1789,7 +1789,21 @@ void FrameStructure::ConstructGeometry()
17891789
ppgon[9] = ppgon[6];
17901790

17911791
vmc->Gsvolu("BBMO", "PGON", kAir, ppgon, 10);
1792-
vmc->Gsdvn("BBCE", "BBMO", 18, 2);
1792+
1793+
// The 18 sectors, placed one by one rather than made with a phi division.
1794+
// Geant4 has no faithful representation of a phi division of a polyhedra: it
1795+
// divides by the number of sides and ignores the requested width and offset,
1796+
// so the sector contents end up half a sector away from where TGeo puts them.
1797+
const int kNSectors = 18;
1798+
const float kSectorDphi = 360. / kNSectors;
1799+
TGeoPgon* shBBCE = new TGeoPgon(-kSectorDphi / 2., kSectorDphi, 1, 2);
1800+
shBBCE->DefineSection(0, -kBBMdz / 2., kBBMRin, kBBMRou);
1801+
shBBCE->DefineSection(1, kBBMdz / 2., kBBMRin, kBBMRou);
1802+
TGeoVolume* voBBCE = new TGeoVolume("BBCE", shBBCE, kMedAir);
1803+
TGeoVolume* voBBMO = gGeoManager->GetVolume("BBMO");
1804+
for (i = 0; i < kNSectors; i++) {
1805+
voBBMO->AddNode(voBBCE, i + 1, new TGeoRotation("", (i + 0.5) * kSectorDphi, 0., 0.));
1806+
}
17931807

17941808
// CBL ////////////////////////////////////////////////////////
17951809
//

0 commit comments

Comments
 (0)