Geant4  10.02.p03
G4PhysicalVolumeSearchScene Class Reference

#include <G4PhysicalVolumeSearchScene.hh>

Inheritance diagram for G4PhysicalVolumeSearchScene:
Collaboration diagram for G4PhysicalVolumeSearchScene:

Public Member Functions

 G4PhysicalVolumeSearchScene (G4PhysicalVolumeModel *, const G4String &requiredPhysicalVolumeName, G4int requiredCopyNo, G4int verbosity=99)
 
virtual ~G4PhysicalVolumeSearchScene ()
 
const std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > & GetFoundFullPVPath () const
 
G4int GetFoundDepth () const
 
G4VPhysicalVolumeGetFoundVolume () const
 
const G4Transform3DGetFoundTransformation () const
 
- Public Member Functions inherited from G4PseudoScene
 G4PseudoScene ()
 
virtual ~G4PseudoScene ()
 
void PreAddSolid (const G4Transform3D &objectTransformation, const G4VisAttributes &)
 
void PostAddSolid ()
 
void AddSolid (const G4Box &solid)
 
void AddSolid (const G4Cons &solid)
 
void AddSolid (const G4Tubs &solid)
 
void AddSolid (const G4Trd &solid)
 
void AddSolid (const G4Trap &solid)
 
void AddSolid (const G4Sphere &solid)
 
void AddSolid (const G4Para &solid)
 
void AddSolid (const G4Torus &solid)
 
void AddSolid (const G4Polycone &solid)
 
void AddSolid (const G4Polyhedra &solid)
 
void AddSolid (const G4VSolid &solid)
 
void AddCompound (const G4VTrajectory &)
 
void AddCompound (const G4VHit &)
 
void AddCompound (const G4VDigi &)
 
void AddCompound (const G4THitsMap< G4double > &)
 
void BeginPrimitives (const G4Transform3D &)
 
void EndPrimitives ()
 
void BeginPrimitives2D (const G4Transform3D &)
 
void EndPrimitives2D ()
 
void AddPrimitive (const G4Polyline &)
 
void AddPrimitive (const G4Scale &)
 
void AddPrimitive (const G4Text &)
 
void AddPrimitive (const G4Circle &)
 
void AddPrimitive (const G4Square &)
 
void AddPrimitive (const G4Polymarker &)
 
void AddPrimitive (const G4Polyhedron &)
 
- Public Member Functions inherited from G4VGraphicsScene
 G4VGraphicsScene ()
 
virtual ~G4VGraphicsScene ()
 
virtual const G4VisExtentGetExtent () const
 

Private Member Functions

void ProcessVolume (const G4VSolid &)
 

Private Attributes

const G4PhysicalVolumeModelfpPVModel
 
G4String fRequiredPhysicalVolumeName
 
G4int fRequiredCopyNo
 
std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeIDfFoundFullPVPath
 
G4int fFoundDepth
 
G4VPhysicalVolumefpFoundPV
 
G4LogicalVolumefpFoundLV
 
G4Transform3D fFoundObjectTransformation
 
G4int fVerbosity
 
G4bool fMultipleOccurrence
 

Additional Inherited Members

- Protected Attributes inherited from G4PseudoScene
const G4Transform3DfpCurrentObjectTransformation
 

Detailed Description

Definition at line 42 of file G4PhysicalVolumeSearchScene.hh.

Constructor & Destructor Documentation

◆ G4PhysicalVolumeSearchScene()

G4PhysicalVolumeSearchScene::G4PhysicalVolumeSearchScene ( G4PhysicalVolumeModel pPVModel,
const G4String requiredPhysicalVolumeName,
G4int  requiredCopyNo,
G4int  verbosity = 99 
)

Definition at line 40 of file G4PhysicalVolumeSearchScene.cc.

◆ ~G4PhysicalVolumeSearchScene()

G4PhysicalVolumeSearchScene::~G4PhysicalVolumeSearchScene ( )
virtual

Definition at line 54 of file G4PhysicalVolumeSearchScene.cc.

54 {}

Member Function Documentation

◆ GetFoundDepth()

G4int G4PhysicalVolumeSearchScene::GetFoundDepth ( ) const
inline

Definition at line 58 of file G4PhysicalVolumeSearchScene.hh.

Here is the caller graph for this function:

◆ GetFoundFullPVPath()

const std::vector<G4PhysicalVolumeModel::G4PhysicalVolumeNodeID>& G4PhysicalVolumeSearchScene::GetFoundFullPVPath ( ) const
inline

Definition at line 55 of file G4PhysicalVolumeSearchScene.hh.

56  {return fFoundFullPVPath;}
std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > fFoundFullPVPath
Here is the caller graph for this function:

◆ GetFoundTransformation()

const G4Transform3D& G4PhysicalVolumeSearchScene::GetFoundTransformation ( ) const
inline

Definition at line 62 of file G4PhysicalVolumeSearchScene.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFoundVolume()

G4VPhysicalVolume* G4PhysicalVolumeSearchScene::GetFoundVolume ( ) const
inline

Definition at line 60 of file G4PhysicalVolumeSearchScene.hh.

60 {return fpFoundPV;}
Here is the caller graph for this function:

◆ ProcessVolume()

void G4PhysicalVolumeSearchScene::ProcessVolume ( const G4VSolid )
privatevirtual

Implements G4PseudoScene.

Definition at line 56 of file G4PhysicalVolumeSearchScene.cc.

56  {
57 
58  G4VPhysicalVolume* pCurrentPV = fpPVModel->GetCurrentPV();
59 
60  /**************************************************
61  G4cout << "Required volume: \"" << fRequiredPhysicalVolumeName
62  << "\", copy no. " << fRequiredCopyNo << G4endl;
63  G4cout << "PhysicalVolume: \"" << pCurrentPV -> GetName ()
64  << "\", copy no. " << pCurrentPV -> GetCopyNo () << G4endl;
65  *******************************************/
66 
67  const G4String& name = fpPVModel->GetCurrentPV() -> GetName ();
68  if (name.length() == fRequiredPhysicalVolumeName.length()) {
69  if (fRequiredPhysicalVolumeName == name) {
70 
72  typedef std::vector<PVNodeID> PVPath;
73  const PVPath& fullPVPath = fpPVModel->GetFullPVPath();
74  G4int currentDepth = fpPVModel->GetCurrentDepth();
75  G4LogicalVolume* pCurrentLV = fpPVModel->GetCurrentLV();
76  //G4Material* pCurrentMaterial = fpPVModel->GetCurrentMaterial();
77  // Note: pCurrentMaterial may be zero (parallel world).
78 
79  if ((fRequiredCopyNo < 0 || // I.e., ignore negative request.
80  fRequiredCopyNo == pCurrentPV -> GetCopyNo ())) {
81  // Current policy - take first one found!!
82  if (!fpFoundPV) { // i.e., if not already found.
83  fFoundFullPVPath = fullPVPath;
84  fFoundDepth = currentDepth;
85  fpFoundPV = pCurrentPV;
86  fpFoundLV = pCurrentLV;
88  }
89  else {
90  if (!fMultipleOccurrence && fVerbosity > 0) {
91  fMultipleOccurrence = true;
92  G4cout << "G4PhysicalVolumeSearchScene::FindVolume:"
93  << "\n Required volume \""
95  << "\"";
96  if (fRequiredCopyNo >= 0) {
97  G4cout << ", copy no. " << fRequiredCopyNo << ",";
98  }
99  G4cout << " found more than once."
100  "\n This function is not smart enough to distinguish identical"
101  "\n physical volumes which have different parentage. It is"
102  "\n tricky to specify in general. This function gives you access"
103  "\n to the first occurrence only."
104  << G4endl;
105  }
106  }
107  }
108  }
109  }
110 }
const G4Transform3D * fpCurrentObjectTransformation
G4String name
Definition: TRTMaterials.hh:40
int G4int
Definition: G4Types.hh:78
const std::vector< G4PhysicalVolumeNodeID > & GetFullPVPath() const
G4GLOB_DLL std::ostream G4cout
std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > fFoundFullPVPath
G4PhysicalVolumeModel::G4PhysicalVolumeNodeID PVNodeID
std::vector< PVNodeID > PVPath
G4LogicalVolume * GetCurrentLV() const
G4VPhysicalVolume * GetCurrentPV() const
#define G4endl
Definition: G4ios.hh:61
const G4PhysicalVolumeModel * fpPVModel
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ fFoundDepth

G4int G4PhysicalVolumeSearchScene::fFoundDepth
private

Definition at line 74 of file G4PhysicalVolumeSearchScene.hh.

◆ fFoundFullPVPath

std::vector<G4PhysicalVolumeModel::G4PhysicalVolumeNodeID> G4PhysicalVolumeSearchScene::fFoundFullPVPath
private

Definition at line 73 of file G4PhysicalVolumeSearchScene.hh.

◆ fFoundObjectTransformation

G4Transform3D G4PhysicalVolumeSearchScene::fFoundObjectTransformation
private

Definition at line 77 of file G4PhysicalVolumeSearchScene.hh.

◆ fMultipleOccurrence

G4bool G4PhysicalVolumeSearchScene::fMultipleOccurrence
private

Definition at line 79 of file G4PhysicalVolumeSearchScene.hh.

◆ fpFoundLV

G4LogicalVolume* G4PhysicalVolumeSearchScene::fpFoundLV
private

Definition at line 76 of file G4PhysicalVolumeSearchScene.hh.

◆ fpFoundPV

G4VPhysicalVolume* G4PhysicalVolumeSearchScene::fpFoundPV
private

Definition at line 75 of file G4PhysicalVolumeSearchScene.hh.

◆ fpPVModel

const G4PhysicalVolumeModel* G4PhysicalVolumeSearchScene::fpPVModel
private

Definition at line 69 of file G4PhysicalVolumeSearchScene.hh.

◆ fRequiredCopyNo

G4int G4PhysicalVolumeSearchScene::fRequiredCopyNo
private

Definition at line 71 of file G4PhysicalVolumeSearchScene.hh.

◆ fRequiredPhysicalVolumeName

G4String G4PhysicalVolumeSearchScene::fRequiredPhysicalVolumeName
private

Definition at line 70 of file G4PhysicalVolumeSearchScene.hh.

◆ fVerbosity

G4int G4PhysicalVolumeSearchScene::fVerbosity
private

Definition at line 78 of file G4PhysicalVolumeSearchScene.hh.


The documentation for this class was generated from the following files: