67 "PhysVol representation of LogVol " + pLV -> GetName (),
80 fCheckOverlaps(checkOverlaps),
81 fOverlapsPrinted(
false)
83 fType =
"G4LogicalVolumeModel";
84 fGlobalTag = fpLV -> GetName ();
85 fGlobalDescription =
"G4LogicalVolumeModel " + fGlobalTag;
92 const G4Colour highlightSolidColour(1.0,0.8,0.8);
93 const G4double highlightSolidLineWidth(10.);
94 const G4Colour highlightPointColour(0.5,0.5,1.0);
95 const G4double highlightPointDiameter(20.);
97 typedef std::pair<G4VSolid*,G4int> solidCopyNoPair;
98 std::vector<solidCopyNoPair> solidCopyNoVector;
103 std::pair<G4VSolid*,G4int> pair(sol,copyNo);
104 auto iter = solidCopyNoVector.begin();
105 for ( ; iter != solidCopyNoVector.end(); ++iter) {
106 if (*iter == pair)
break;
108 if (iter == solidCopyNoVector.end()) {
109 solidCopyNoVector.push_back(pair);
111 highlightSolidVisAtts.SetLineWidth(highlightSolidLineWidth);
124 overlapPoint.
SetDiameter(G4VMarker::SizeType::screen,highlightPointDiameter);
125 overlapPoint.
SetFillStyle(G4VMarker::FillStyle::filled);
138 if (fpMP) nonCulledMP = *fpMP;
145 if (fpTopPV->GetLogicalVolume()->GetVoxelHeader()) {
150 for (
size_t i = 0; i < pPPL -> size (); i++) {
152 const G4Polyhedron& polyhedron = (*pPPL)[i].GetPolyhedron ();
169 <<
"\" with top physical volume \""
179 if (fCheckOverlaps) {
186 if (!fOverlapsPrinted) {
187 for (
G4int iDaughter = 0; iDaughter < nDaughters; ++iDaughter) {
191 fOverlapsPrinted =
true;
195 solidCopyNoVector.clear();
196 for (
G4int iDaughter = 0; iDaughter < nDaughters; ++iDaughter) {
200 const G4int nPoints = 1000;
202 if (daughterPVPlace) {
207 for (
G4int i = 0; i < nPoints; ++i) {
215 DrawSolid(sceneHandler,daughterSolid,daughterPhys->
GetCopyNo(),tDaughter);
216 DrawPoint(sceneHandler,motherPoint);
219 for (
G4int iSister = 0; iSister < nDaughters; ++iSister) {
220 if (iSister == iDaughter)
continue;
224 G4ThreeVector sisterPoint = tSister.InverseTransformPoint(motherPoint);
229 DrawSolid(sceneHandler,daughterSolid,daughterPhys->
GetCopyNo(),tDaughter);
230 DrawSolid(sceneHandler,sisterSolid,sisterPhys->
GetCopyNo(),tSister);
231 DrawPoint(sceneHandler,motherPoint);
236 }
else if (daughterPVParam) {
242 std::vector<G4ThreeVector> motherPoints;
243 for (
G4int iP = 0; iP < multiplicity; iP++) {
244 G4VSolid* daughterSolid = param->ComputeSolid(iP, daughterPhys);
246 param->ComputeTransformation(iP, daughterPhys);
248 for (
G4int i = 0; i < nPoints; ++i) {
256 DrawSolid(sceneHandler,daughterSolid,iP,tDaughter);
257 DrawPoint(sceneHandler,motherPoint);
259 motherPoints.push_back(motherPoint);
262 for (
G4int iPP = iP + 1; iPP < multiplicity; iPP++) {
263 G4VSolid* sisterSolid = param->ComputeSolid(iPP, daughterPhys);
265 param->ComputeTransformation(iPP, daughterPhys);
268 for (
const auto& motherPoint: motherPoints) {
270 G4ThreeVector sisterPoint = tSister.InverseTransformPoint(motherPoint);
273 DrawSolid(sceneHandler,sisterSolid,iPP,tSister);
276 param->ComputeTransformation(iP, daughterPhys);
279 DrawSolid(sceneHandler,daughterSolid,iP,tDaughter);
280 DrawPoint(sceneHandler,motherPoint);
300 G4VSolid* pSol0 = pSol -> GetConstituentSolid (0);
302 G4VSolid* pSol1 = pSol -> GetConstituentSolid (1);
305 (
"G4PhysicalVolumeModel::DescribeSolid",
307 "2nd component solid in Boolean is missing.");
312 DescribeSolid (theAT, pSol0, &constituentAttributes, sceneHandler);
313 DescribeSolid (theAT, pSol1, &constituentAttributes, sceneHandler);
319 pSol -> DescribeYourselfTo (sceneHandler);