Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VModel Class Referenceabstract

#include <G4VModel.hh>

+ Inheritance diagram for G4VModel:

Public Member Functions

 G4VModel (const G4Transform3D &modelTransformation=G4Transform3D(), const G4ModelingParameters *=0)
 
virtual ~G4VModel ()
 
virtual void DescribeYourselfTo (G4VGraphicsScene &)=0
 
const G4ModelingParametersGetModelingParameters () const
 
const G4StringGetType () const
 
virtual G4String GetCurrentDescription () const
 
virtual G4String GetCurrentTag () const
 
const G4VisExtentGetExtent () const
 
const G4VisExtentGetTransformedExtent () const
 
const G4StringGetGlobalDescription () const
 
const G4StringGetGlobalTag () const
 
const G4Transform3DGetTransformation () const
 
void SetModelingParameters (const G4ModelingParameters *)
 
void SetExtent (const G4VisExtent &)
 
void SetType (const G4String &)
 
void SetGlobalDescription (const G4String &)
 
void SetGlobalTag (const G4String &)
 
void SetTransformation (const G4Transform3D &)
 
virtual G4bool Validate (G4bool warn=true)
 

Protected Attributes

G4String fType
 
G4String fGlobalTag
 
G4String fGlobalDescription
 
G4VisExtent fExtent
 
G4Transform3D fTransform
 
const G4ModelingParametersfpMP
 

Friends

std::ostream & operator<< (std::ostream &os, const G4VModel &)
 

Detailed Description

Definition at line 52 of file G4VModel.hh.

Constructor & Destructor Documentation

◆ G4VModel()

G4VModel::G4VModel ( const G4Transform3D modelTransformation = G4Transform3D(),
const G4ModelingParameters pMP = 0 
)

Definition at line 37 of file G4VModel.cc.

38 :
39 fType ("Other"),
40 fGlobalTag ("Empty"),
41 fGlobalDescription ("Empty"),
42 fTransform (modelTransformation),
43 fpMP (pMP)
44{}
G4String fGlobalDescription
Definition: G4VModel.hh:112
G4String fType
Definition: G4VModel.hh:110
const G4ModelingParameters * fpMP
Definition: G4VModel.hh:115
G4Transform3D fTransform
Definition: G4VModel.hh:114
G4String fGlobalTag
Definition: G4VModel.hh:111

◆ ~G4VModel()

G4VModel::~G4VModel ( )
virtual

Definition at line 46 of file G4VModel.cc.

46{}

Member Function Documentation

◆ DescribeYourselfTo()

◆ GetCurrentDescription()

G4String G4VModel::GetCurrentDescription ( ) const
virtual

Reimplemented in G4GPSModel, and G4PhysicalVolumeModel.

Definition at line 53 of file G4VModel.cc.

53 {
54 // Override in concrete class if concept of "current" is meaningful.
55 return fGlobalDescription;
56}

◆ GetCurrentTag()

G4String G4VModel::GetCurrentTag ( ) const
virtual

Reimplemented in G4GPSModel, and G4PhysicalVolumeModel.

Definition at line 48 of file G4VModel.cc.

48 {
49 // Override in concrete class if concept of "current" is meaningful.
50 return fGlobalTag;
51}

◆ GetExtent()

◆ GetGlobalDescription()

const G4String & G4VModel::GetGlobalDescription ( ) const

◆ GetGlobalTag()

const G4String & G4VModel::GetGlobalTag ( ) const

◆ GetModelingParameters()

const G4ModelingParameters * G4VModel::GetModelingParameters ( ) const

◆ GetTransformation()

const G4Transform3D & G4VModel::GetTransformation ( ) const

◆ GetTransformedExtent()

const G4VisExtent & G4VModel::GetTransformedExtent ( ) const

Definition at line 58 of file G4VModel.cc.

58 {
59 static G4VisExtent transformedExtent;
60 transformedExtent = fExtent;
61 transformedExtent.Transform(fTransform);
62 return transformedExtent;
63}
G4VisExtent fExtent
Definition: G4VModel.hh:113
G4VisExtent & Transform(const G4Transform3D &)
Definition: G4VisExtent.cc:102

◆ GetType()

const G4String & G4VModel::GetType ( ) const

◆ SetExtent()

◆ SetGlobalDescription()

◆ SetGlobalTag()

◆ SetModelingParameters()

◆ SetTransformation()

void G4VModel::SetTransformation ( const G4Transform3D )

◆ SetType()

◆ Validate()

G4bool G4VModel::Validate ( G4bool  warn = true)
virtual

Reimplemented in G4PhysicalVolumeModel, and G4LogicalVolumeModel.

Definition at line 65 of file G4VModel.cc.

65 {
66 return true;
67}

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const G4VModel model 
)
friend

Definition at line 69 of file G4VModel.cc.

69 {
70 os << model.fGlobalDescription;
71 os << "\n Modeling parameters:";
72 const G4ModelingParameters* mp = model.fpMP;
73 if (mp) os << "\n " << *mp;
74 else os << " none.";
75 os << "\n Extent: " << model.fExtent;
76 os << "\n Transformation: ";
77 os << "\n Rotation: ";
78 G4RotationMatrix rotation = model.fTransform.getRotation ();
79 os << rotation.thetaX() << ", "
80 << rotation.phiX() << ", "
81 << rotation.thetaY() << ", "
82 << rotation.phiY() << ", "
83 << rotation.thetaZ() << ", "
84 << rotation.phiZ();
85 os << "\n Translation: " << model.fTransform.getTranslation ();
86 return os;
87}
double thetaY() const
Definition: Rotation.cc:140
double phiY() const
Definition: Rotation.cc:128
double thetaX() const
Definition: Rotation.cc:136
double phiX() const
Definition: Rotation.cc:124
double thetaZ() const
Definition: Rotation.cc:144
double phiZ() const
Definition: Rotation.cc:132
CLHEP::HepRotation getRotation() const
CLHEP::Hep3Vector getTranslation() const

Member Data Documentation

◆ fExtent

◆ fGlobalDescription

◆ fGlobalTag

◆ fpMP

◆ fTransform

◆ fType


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