Skip to content

Commit 5496a29

Browse files
committed
fixed mDOM harness
1 parent ff10edf commit 5496a29

File tree

4 files changed

+30
-25
lines changed

4 files changed

+30
-25
lines changed

common/geometry_construction/include/OMSimDetectorComponent.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public:
2929
virtual void construction() = 0; ///< Abstract method you have to define in order to make a derived class from OMSimDetectorComponent
3030

3131
OMSimInputData *m_data; ///< Instance of OMSimInputdata, which should be started only once.
32-
bool m_checkOverlaps = false;
32+
bool m_checkOverlaps = true;
3333

3434
/**
3535
* @struct OMSimDetectorComponent::Component

common/geometry_construction/include/OMSimMDOMHarness.hh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ private:
3131
const G4double m_teraThickness = 1.0 * mm;
3232
const G4double m_ropeRMax = 3.0 * mm;
3333
const G4double m_bridgeAddedThickness = 14.6 * mm;
34-
const G4double m_ropeRotationAngleX = 11.245557 * deg;
34+
const G4double m_ropeRotationAngleX = 11.*deg;
3535
const G4double m_ropeDz = 509.5 * mm;
36-
const G4double m_bridgeCorrection = 7.85*mm * tan(m_ropeRotationAngleX); //
37-
const G4double m_ropeStartingPoint = m_totalWidth + m_bridgeCorrection + m_ropeRMax / cos(m_ropeRotationAngleX); // this is the actual starting point of the rope, i.e. the distance to the z-axis, which has to be larger than lBridgeROuter[2] in order for the rope not to cut the bridge.
36+
const G4double m_bridgeCorrection = 7.85*mm * tan(m_ropeRotationAngleX); //
3837

3938
G4double m_totalWidth;
39+
G4double m_ropeStartingPoint;
4040
};

common/geometry_construction/src/OMSimDEGG.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ G4VSolid *internalVolume = createEggSolid(innSegments1,
112112

113113
// Delete dummy box from internal components
114114
deleteComponent("SubstractionBox");
115-
appendInternalComponentsFromCAD();
115+
//appendInternalComponentsFromCAD();
116116

117117
// Logicals
118118
G4LogicalVolume *lDEggGlassLogical = new G4LogicalVolume(outerGlass, m_data->getMaterial("RiAbs_Glass_Okamoto_DOUMEKI"), "Glass_log");

common/geometry_construction/src/OMSimMDOMHarness.cc

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,20 @@
1010
#include <G4LogicalSkinSurface.hh>
1111
#include <G4Polycone.hh>
1212
#include <G4Torus.hh>
13+
#include <G4MultiUnion.hh>
1314

1415
mDOMHarness::mDOMHarness(mDOM *p_MDOM): OMSimDetectorComponent(), m_opticalModule(p_MDOM)
1516
{
1617
m_totalWidth = m_opticalModule->m_glassOutRad + m_teraThickness + m_padThickness + m_bridgeAddedThickness;
18+
m_ropeStartingPoint = m_totalWidth + m_bridgeCorrection + m_ropeRMax / cos(m_ropeRotationAngleX); // this is the actual starting point of the rope, i.e. the distance to the z-axis, which has to be larger than lBridgeROuter[2] in order for the rope not to cut the bridge.
1719
construction();
1820
};
1921

2022
void mDOMHarness::construction()
2123
{
2224

2325
bandsAndClamps();
24-
// bridgeRopesSolid();
26+
bridgeRopesSolid();
2527
mainDataCable();
2628
pads();
2729
PCA();
@@ -135,36 +137,37 @@ void mDOMHarness::bridgeRopesSolid()
135137

136138
G4Tubs *ropesSolid = new G4Tubs("ropesSolid", 0.0, m_ropeRMax, m_ropeDz - ropesZShift, 0.0, 360.0 * deg);
137139

138-
// First union
140+
G4MultiUnion* multi_union = new G4MultiUnion("united_bridge_rope");
141+
G4Transform3D transformers;
142+
multi_union->AddNode(bridgeSolid, G4Transform3D(G4RotationMatrix(), G4ThreeVector(0,0,0)));
143+
139144
G4RotationMatrix rot = G4RotationMatrix();
140145
rot.rotateX(m_ropeRotationAngleX);
141-
142146
G4ThreeVector unionPos = G4ThreeVector(0, m_opticalModule->m_glassOutRad - m_ropeDz * sin(m_ropeRotationAngleX) + 2.25 * cm, (m_ropeDz)*cos(m_ropeRotationAngleX));
143-
G4UnionSolid *tempUnion1 = new G4UnionSolid("temp1", bridgeSolid, ropesSolid, G4Transform3D(rot, unionPos));
147+
multi_union->AddNode(ropesSolid, G4Transform3D(rot, unionPos));
144148

145-
// second union, rope in the other side
146149
rot = G4RotationMatrix();
147150
rot.rotateX(-m_ropeRotationAngleX);
148151
unionPos = G4ThreeVector(0, m_opticalModule->m_glassOutRad - m_ropeDz * sin(m_ropeRotationAngleX) + 2.25 * cm, -(m_ropeDz)*cos(m_ropeRotationAngleX));
149-
G4UnionSolid *lTempUnion2 = new G4UnionSolid("temp2", tempUnion1, ropesSolid, G4Transform3D(rot, unionPos));
150-
151-
// and now this same object 3 more times, with 90 degrees difference
152-
rot = G4RotationMatrix();
153-
rot.rotateZ(90 * deg);
154-
G4UnionSolid *tempUnion3 = new G4UnionSolid("temp3", lTempUnion2, lTempUnion2, G4Transform3D(rot, G4ThreeVector(0, 0, 0)));
155-
rot.rotateZ(90 * deg);
156-
G4UnionSolid *tempUnion4 = new G4UnionSolid("temp4", tempUnion3, lTempUnion2, G4Transform3D(rot, G4ThreeVector(0, 0, 0)));
157-
rot.rotateZ(90 * deg);
152+
multi_union->AddNode(ropesSolid, G4Transform3D(rot, unionPos));
153+
multi_union ->Voxelize();
158154

159-
G4UnionSolid *ropesUnionSolid = new G4UnionSolid("ropesUnionSolid", tempUnion4, lTempUnion2, G4Transform3D(rot, G4ThreeVector(0, 0, 0)));
160-
G4LogicalVolume *ropesUnionLogical = new G4LogicalVolume(ropesUnionSolid, m_data->getMaterial("NoOptic_Stahl"), "");
155+
G4LogicalVolume *ropesUnionLogical = new G4LogicalVolume(multi_union, m_data->getMaterial("NoOptic_Stahl"), "");
161156

162157
new G4LogicalSkinSurface("ropes_skin", ropesUnionLogical, m_data->getOpticalSurface("Surf_StainlessSteelGround"));
163158

164159
G4RotationMatrix ropesRot = G4RotationMatrix();
165160
ropesRot.rotateZ(m_harnessRotAngle);
166-
167-
appendComponent(ropesUnionSolid, ropesUnionLogical, G4ThreeVector(0, 0, 0), ropesRot, "Ropes");
161+
appendComponent(multi_union, ropesUnionLogical, G4ThreeVector(0, 0, 0), ropesRot, "Ropes_0");
162+
163+
std::stringstream converter;
164+
for (int k = 1; k <= 3; k++)
165+
{
166+
converter.str("");
167+
converter << "Ropes_" << k;
168+
ropesRot.rotateZ(90*deg);
169+
appendComponent(multi_union, ropesUnionLogical, G4ThreeVector(0, 0, 0), ropesRot, converter.str());
170+
}
168171
}
169172

170173
void mDOMHarness::mainDataCable()
@@ -180,6 +183,7 @@ void mDOMHarness::mainDataCable()
180183

181184
G4double mainCableAngle = 90.0 * deg;
182185
G4double mainCableRadius = (m_ropeStartingPoint + dataCableRadius + m_ropeRMax + 0.2 * cm - m_bridgeAddedThickness - 0.75 * cm);
186+
183187
G4ThreeVector dataCablePosition = G4ThreeVector(mainCableRadius * sin(mainCableAngle),
184188
mainCableRadius * cos(mainCableAngle),
185189
0.0);
@@ -190,7 +194,7 @@ void mDOMHarness::mainDataCable()
190194
void mDOMHarness::pads()
191195
{
192196
const G4double padWidth = 11.0 * mm; // (taken from construction sketch of the rubber pads provided by Anna Pollmann)
193-
const G4double padAngle = 44.5 * deg; // (taken from construction sketch of the rubber pads provided by Anna Pollmann)
197+
const G4double padAngle = 44.5 * deg / (2 * CLHEP::pi * m_opticalModule->m_glassOutRad) * 360.;
194198

195199
G4Tubs *padSolid = new G4Tubs("padSolid", m_opticalModule->m_glassOutRad + m_teraThickness, m_opticalModule->m_glassOutRad + m_teraThickness + m_padThickness, padWidth / 2.0, padAngle / 2.0, padAngle);
196200

@@ -255,7 +259,7 @@ void mDOMHarness::PCA()
255259
const G4double wireRadius = 17.78 * cm; // minimum bending diameter of the cable (14 inches)
256260
const G4double disanceTubeToRope = ((m_ropeStartingPoint) + m_ropeRMax * (1 - cos(m_ropeRotationAngleX)) - ((m_opticalModule->m_glassOutRad + mushHeight - tubeRadius) * cos(m_plugAngle) + tubeLength * sin(m_plugAngle) + m_opticalModule->m_cylinderHeight) * tan(m_ropeRotationAngleX) - (m_opticalModule->m_glassOutRad + mushHeight - tubeRadius) * sin(m_plugAngle) + tubeLength * cos(m_plugAngle)) / cos(m_ropeRotationAngleX) - (wireThickness / 2 + m_ropeRMax) - m_ropeDz * (1 - cos(m_ropeRotationAngleX)) * sin(m_ropeRotationAngleX); // Modified distance between start of first torus and end of second torus
257261

258-
const G4double anglePCA2 = acos((0.5) * (disanceTubeToRope / wireRadius + sin(m_plugAngle + m_ropeRotationAngleX) + 1.));
262+
const G4double anglePCA2 = acos((0.5) * (-disanceTubeToRope / wireRadius + sin(m_plugAngle + m_ropeRotationAngleX) + 1.));
259263
const G4double anglePCA1 = 90. * deg + anglePCA2 - (m_plugAngle + m_ropeRotationAngleX);
260264
const G4double extnLength = 30. * 2.54 * cm - wireRadius * (anglePCA1 + anglePCA2) - tubeLength;
261265

@@ -290,6 +294,7 @@ void mDOMHarness::PCA()
290294

291295
G4ThreeVector positionPCA = G4ThreeVector((m_opticalModule->m_glassOutRad + (2 * mushCylinderHeight + mushConeHeight) / 2.) * (cos(m_harnessRotAngle)) * sin(m_plugAngle), (m_opticalModule->m_glassOutRad + (2 * mushCylinderHeight + mushConeHeight) / 2) * sin(m_harnessRotAngle) * sin(m_plugAngle), (m_opticalModule->m_glassOutRad + (2 * mushCylinderHeight + mushConeHeight) / 2) * cos(m_plugAngle) + m_opticalModule->m_cylinderHeight);
292296
appendComponent(solidPCA, logicalPCA, positionPCA, mushRot, "PCA");
297+
293298
}
294299

295300
void mDOMHarness::plug()

0 commit comments

Comments
 (0)