Geant4_10
G4PhysicalVolumeSearchScene.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: G4PhysicalVolumeSearchScene.hh 68043 2013-03-13 14:27:49Z gcosmo $
28 //
29 //
30 // John Allison 10th August 1998.
31 // An artificial scene to find physical volumes.
32 
33 #ifndef G4PHYSICALVOLUMESEARCHSCENE_HH
34 #define G4PHYSICALVOLUMESEARCHSCENE_HH
35 
36 #include "G4VGraphicsScene.hh"
37 #include "G4VisExtent.hh"
38 #include "G4Box.hh"
39 #include "G4Cons.hh"
40 #include "G4Tubs.hh"
41 #include "G4Trd.hh"
42 #include "G4Trap.hh"
43 #include "G4Sphere.hh"
44 #include "G4Para.hh"
45 #include "G4Torus.hh"
46 #include "G4Polycone.hh"
47 #include "G4Polyhedra.hh"
48 #include "G4VPhysicalVolume.hh"
49 #include "G4LogicalVolume.hh"
50 #include "G4PhysicalVolumeModel.hh"
51 
53 
54 public:
57  const G4String& requiredPhysicalVolumeName,
58  G4int requiredCopyNo,
59  G4int verbosity = 99);
61  void PreAddSolid (const G4Transform3D& objectTransformation,
62  const G4VisAttributes&);
63  void PostAddSolid ();
64  void AddSolid (const G4Box& solid) {FindVolume (solid);}
65  void AddSolid (const G4Cons & solid) {FindVolume (solid);}
66  void AddSolid (const G4Tubs& solid) {FindVolume (solid);}
67  void AddSolid (const G4Trd& solid) {FindVolume (solid);}
68  void AddSolid (const G4Trap& solid) {FindVolume (solid);}
69  void AddSolid (const G4Sphere& solid) {FindVolume (solid);}
70  void AddSolid (const G4Para& solid) {FindVolume (solid);}
71  void AddSolid (const G4Torus& solid) {FindVolume (solid);}
72  void AddSolid (const G4Polycone& solid) {FindVolume (solid);}
73  void AddSolid (const G4Polyhedra& solid) {FindVolume (solid);}
74  void AddSolid (const G4VSolid& solid) {FindVolume (solid);}
75  void AddCompound (const G4VTrajectory&) {}
76  void AddCompound (const G4VHit&) {}
77  void AddCompound (const G4VDigi&) {}
79 
80  const std::vector<G4PhysicalVolumeModel::G4PhysicalVolumeNodeID>&
81  GetFoundFullPVPath () const;
82  G4int GetFoundDepth () const;
84  const G4Transform3D& GetFoundTransformation () const;
85 
87  // Functions not used but required by the abstract interface.
88 
89  virtual void BeginPrimitives (const G4Transform3D&) {}
90  virtual void EndPrimitives () {}
91  virtual void BeginPrimitives2D (const G4Transform3D&) {}
92  virtual void EndPrimitives2D () {}
93  virtual void AddPrimitive (const G4Polyline&) {}
94  virtual void AddPrimitive (const G4Scale&) {}
95  virtual void AddPrimitive (const G4Text&) {}
96  virtual void AddPrimitive (const G4Circle&) {}
97  virtual void AddPrimitive (const G4Square&) {}
98  virtual void AddPrimitive (const G4Polymarker&) {}
99  virtual void AddPrimitive (const G4Polyhedron&) {}
100 
101 private:
102  void FindVolume (const G4VSolid&);
103  const G4PhysicalVolumeModel* fpPVModel;
104  G4String fRequiredPhysicalVolumeName;
105  G4int fRequiredCopyNo;
106  const G4Transform3D* fpCurrentObjectTransformation;
107  std::vector<G4PhysicalVolumeModel::G4PhysicalVolumeNodeID>
108  fFoundFullPVPath; // Found full path.
109  G4int fFoundDepth; // Found depth.
110  G4VPhysicalVolume* fpFoundPV; // Found physical volume.
111  G4LogicalVolume* fpFoundLV; // Found logical volume.
112  G4Transform3D fFoundObjectTransformation; // Found transformation.
113  G4int fVerbosity;
114  G4bool fMultipleOccurrence;
115 };
116 
117 #include "G4PhysicalVolumeSearchScene.icc"
118 
119 #endif
Definition: G4Para.hh:76
Definition: G4Text.hh:73
virtual void AddPrimitive(const G4Polymarker &)
Definition: G4Box.hh:63
void AddSolid(const G4Polycone &solid)
void AddSolid(const G4Sphere &solid)
Definition: G4Tubs.hh:84
void PreAddSolid(const G4Transform3D &objectTransformation, const G4VisAttributes &)
void AddCompound(const G4VTrajectory &)
Definition: G4VHit.hh:48
void AddSolid(const G4VSolid &solid)
Definition: G4Trd.hh:71
int G4int
Definition: G4Types.hh:78
G4PhysicalVolumeSearchScene(G4PhysicalVolumeModel *, const G4String &requiredPhysicalVolumeName, G4int requiredCopyNo, G4int verbosity=99)
virtual void BeginPrimitives2D(const G4Transform3D &)
void AddCompound(const G4THitsMap< G4double > &)
virtual void AddPrimitive(const G4Circle &)
bool G4bool
Definition: G4Types.hh:79
virtual void AddPrimitive(const G4Polyhedron &)
G4int GetFoundDepth() const
virtual void BeginPrimitives(const G4Transform3D &)
Definition: G4Cons.hh:82
virtual void AddPrimitive(const G4Text &)
void AddSolid(const G4Torus &solid)
const std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > & GetFoundFullPVPath() const
G4VPhysicalVolume * GetFoundVolume() const
virtual void AddPrimitive(const G4Scale &)
const G4Transform3D & GetFoundTransformation() const
virtual void AddPrimitive(const G4Square &)
virtual void AddPrimitive(const G4Polyline &)
void AddSolid(const G4Polyhedra &solid)