67 "PhysVol representation of LogVol " + pLV -> GetName (),
80 fCheckOverlaps(checkOverlaps),
81 fOverlapsPrinted(false)
83 fType =
"G4LogicalVolumeModel";
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);
150 for (
size_t i = 0; i < pPPL -> size (); i++) {
152 const G4Polyhedron& polyhedron = (*pPPL)[i].GetPolyhedron ();
169 <<
"\" with top physical volume \""
187 for (
G4int iDaughter = 0; iDaughter < nDaughters; ++iDaughter) {
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;
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) {
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);
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::vector< G4PlacedPolyhedron > G4PlacedPolyhedronList
G4GLOB_DLL std::ostream G4cout
G4PlacedPolyhedronList * CreatePlacedPolyhedra(const G4LogicalVolume *) const
void DescribeYourselfTo(G4VGraphicsScene &)
virtual ~G4LogicalVolumeModel()
G4LogicalVolumeModel(G4LogicalVolume *, G4int soughtDepth=1, G4bool booleans=true, G4bool voxels=true, G4bool readout=true, G4bool checkOverlaps=true, const G4Transform3D &modelTransformation=G4Transform3D(), const G4ModelingParameters *=0)
void DescribeSolid(const G4Transform3D &theAT, G4VSolid *pSol, const G4VisAttributes *pVisAttribs, G4VGraphicsScene &sceneHandler)
G4VSolid * GetSolid() const
G4VSensitiveDetector * GetSensitiveDetector() const
size_t GetNoDaughters() const
G4VPhysicalVolume * GetDaughter(const G4int i) const
G4SmartVoxelHeader * GetVoxelHeader() const
G4VPVParameterisation * GetParameterisation() const
virtual G4int GetMultiplicity() const
G4VPhysicalVolume * fpTopPV
void DescribeYourselfTo(G4VGraphicsScene &)
virtual void BeginPrimitives(const G4Transform3D &objectTransformation=G4Transform3D())=0
virtual void PostAddSolid()=0
virtual void AddPrimitive(const G4Polyline &)=0
virtual void AddSolid(const G4Box &)=0
virtual void EndPrimitives()=0
virtual void PreAddSolid(const G4Transform3D &objectTransformation, const G4VisAttributes &visAttribs)=0
void SetDiameter(SizeType, G4double)
void SetFillStyle(FillStyle)
void SetPosition(const G4Point3D &)
void SetModelingParameters(const G4ModelingParameters *)
G4String fGlobalDescription
const G4ModelingParameters * fpMP
const G4RotationMatrix * GetRotation() const
const G4ThreeVector GetTranslation() const
virtual G4bool CheckOverlaps(G4int res=1000, G4double tol=0., G4bool verbose=true, G4int errMax=1)
G4LogicalVolume * GetLogicalVolume() const
virtual G4int GetCopyNo() const =0
const G4String & GetName() const
G4VPhysicalVolume * GetROWorld() const
G4VReadOutGeometry * GetROgeometry() const
virtual EInside Inside(const G4ThreeVector &p) const =0
virtual void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
virtual G4ThreeVector GetPointOnSurface() const
void SetForceWireframe(G4bool=true)
void SetVisAttributes(const G4VisAttributes *)