10
10
#include < G4LogicalSkinSurface.hh>
11
11
#include < G4Polycone.hh>
12
12
#include < G4Torus.hh>
13
+ #include < G4MultiUnion.hh>
13
14
14
15
mDOMHarness::mDOMHarness (mDOM *p_MDOM): OMSimDetectorComponent(), m_opticalModule(p_MDOM)
15
16
{
16
17
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.
17
19
construction ();
18
20
};
19
21
20
22
void mDOMHarness::construction ()
21
23
{
22
24
23
25
bandsAndClamps ();
24
- // bridgeRopesSolid();
26
+ bridgeRopesSolid ();
25
27
mainDataCable ();
26
28
pads ();
27
29
PCA ();
@@ -135,36 +137,37 @@ void mDOMHarness::bridgeRopesSolid()
135
137
136
138
G4Tubs *ropesSolid = new G4Tubs (" ropesSolid" , 0.0 , m_ropeRMax, m_ropeDz - ropesZShift, 0.0 , 360.0 * deg);
137
139
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
+
139
144
G4RotationMatrix rot = G4RotationMatrix ();
140
145
rot.rotateX (m_ropeRotationAngleX);
141
-
142
146
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));
144
148
145
- // second union, rope in the other side
146
149
rot = G4RotationMatrix ();
147
150
rot.rotateX (-m_ropeRotationAngleX);
148
151
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 ();
158
154
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" ), " " );
161
156
162
157
new G4LogicalSkinSurface (" ropes_skin" , ropesUnionLogical, m_data->getOpticalSurface (" Surf_StainlessSteelGround" ));
163
158
164
159
G4RotationMatrix ropesRot = G4RotationMatrix ();
165
160
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
+ }
168
171
}
169
172
170
173
void mDOMHarness::mainDataCable ()
@@ -180,6 +183,7 @@ void mDOMHarness::mainDataCable()
180
183
181
184
G4double mainCableAngle = 90.0 * deg;
182
185
G4double mainCableRadius = (m_ropeStartingPoint + dataCableRadius + m_ropeRMax + 0.2 * cm - m_bridgeAddedThickness - 0.75 * cm);
186
+
183
187
G4ThreeVector dataCablePosition = G4ThreeVector (mainCableRadius * sin (mainCableAngle),
184
188
mainCableRadius * cos (mainCableAngle),
185
189
0.0 );
@@ -190,7 +194,7 @@ void mDOMHarness::mainDataCable()
190
194
void mDOMHarness::pads ()
191
195
{
192
196
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 .;
194
198
195
199
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);
196
200
@@ -255,7 +259,7 @@ void mDOMHarness::PCA()
255
259
const G4double wireRadius = 17.78 * cm; // minimum bending diameter of the cable (14 inches)
256
260
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
257
261
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 .));
259
263
const G4double anglePCA1 = 90 . * deg + anglePCA2 - (m_plugAngle + m_ropeRotationAngleX);
260
264
const G4double extnLength = 30 . * 2.54 * cm - wireRadius * (anglePCA1 + anglePCA2) - tubeLength;
261
265
@@ -290,6 +294,7 @@ void mDOMHarness::PCA()
290
294
291
295
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 );
292
296
appendComponent (solidPCA, logicalPCA, positionPCA, mushRot, " PCA" );
297
+
293
298
}
294
299
295
300
void mDOMHarness::plug ()
0 commit comments