Geant4-11
Public Member Functions | Protected Attributes | Private Attributes | Friends
G4tgrPlaceDivRep Class Reference

#include <G4tgrPlaceDivRep.hh>

Inheritance diagram for G4tgrPlaceDivRep:
G4tgrPlace

Public Member Functions

EAxis BuildAxis (const G4String &axisName)
 
 G4tgrPlaceDivRep ()
 
 G4tgrPlaceDivRep (const std::vector< G4String > &wl)
 
EAxis GetAxis () const
 
unsigned int GetCopyNo () const
 
G4DivType GetDivType () const
 
G4int GetNDiv () const
 
G4double GetOffset () const
 
const G4StringGetParentName () const
 
virtual G4ThreeVector GetPlacement () const
 
const G4StringGetType () const
 
G4tgrVolumeGetVolume () const
 
G4double GetWidth () const
 
void SetAxis (EAxis axis)
 
void SetDivType (G4DivType typ)
 
void SetNDiv (G4int ndiv)
 
void SetOffset (G4double offset)
 
void SetParentName (const G4String &parentName)
 
void SetType (const G4String &typ)
 
void SetVolume (G4tgrVolume *vol)
 
void SetWidth (G4double width)
 
 ~G4tgrPlaceDivRep ()
 

Protected Attributes

unsigned int theCopyNo = 0
 
G4String theParentName = ""
 
G4String theType = ""
 
G4tgrVolumetheVolume = nullptr
 

Private Attributes

EAxis theAxis = kUndefined
 
G4DivType theDivType = DivByNdivAndWidth
 
G4int theNDiv = 0
 
G4double theOffset = 0.0
 
G4double theWidth = 0.0
 

Friends

std::ostream & operator<< (std::ostream &os, const G4tgrPlaceDivRep &obj)
 

Detailed Description

Definition at line 51 of file G4tgrPlaceDivRep.hh.

Constructor & Destructor Documentation

◆ G4tgrPlaceDivRep() [1/2]

G4tgrPlaceDivRep::G4tgrPlaceDivRep ( )

Definition at line 39 of file G4tgrPlaceDivRep.cc.

40{
41}

◆ ~G4tgrPlaceDivRep()

G4tgrPlaceDivRep::~G4tgrPlaceDivRep ( )

Definition at line 44 of file G4tgrPlaceDivRep.cc.

45{
46}

◆ G4tgrPlaceDivRep() [2/2]

G4tgrPlaceDivRep::G4tgrPlaceDivRep ( const std::vector< G4String > &  wl)

Definition at line 49 of file G4tgrPlaceDivRep.cc.

50{
52
53 // Name parent axis nrep width offset
55 "G4tgrPlaceDivRep::G4tgrPlaceDivRep");
57 "G4tgrPlaceDivRep::G4tgrPlaceDivRep");
58
62 theWidth = G4tgrUtils::GetDouble(wl[5]) * mm; // check if it is deg
63 if(wl.size() == 7)
64 {
65 theOffset = G4tgrUtils::GetDouble(wl[6]) * mm; // check if it is deg
66 }
67 else
68 {
69 theOffset = 0.;
70 }
71
72#ifdef G4VERBOSE
74 {
75 G4cout << " Created " << *this << G4endl;
76 }
77#endif
78}
static constexpr double mm
Definition: G4SIunits.hh:95
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
@ DivByNdivAndWidth
@ WLSIZE_GE
Definition: G4tgrUtils.hh:51
@ WLSIZE_LE
Definition: G4tgrUtils.hh:49
static G4int GetVerboseLevel()
EAxis BuildAxis(const G4String &axisName)
G4String theParentName
Definition: G4tgrPlace.hh:66
static G4String GetString(const G4String &str)
Definition: G4tgrUtils.cc:173
static void CheckWLsize(const std::vector< G4String > &wl, unsigned int nWCheck, WLSIZEtype st, const G4String &methodName)
Definition: G4tgrUtils.cc:490
static G4int GetInt(const G4String &str)
Definition: G4tgrUtils.cc:447
static G4double GetDouble(const G4String &str, G4double unitval=1.)
Definition: G4tgrUtils.cc:198

References BuildAxis(), G4tgrUtils::CheckWLsize(), DivByNdivAndWidth, G4cout, G4endl, G4tgrUtils::GetDouble(), G4tgrUtils::GetInt(), G4tgrUtils::GetString(), G4tgrMessenger::GetVerboseLevel(), mm, theAxis, theDivType, theNDiv, theOffset, G4tgrPlace::theParentName, theWidth, WLSIZE_GE, and WLSIZE_LE.

Member Function Documentation

◆ BuildAxis()

EAxis G4tgrPlaceDivRep::BuildAxis ( const G4String axisName)

Definition at line 81 of file G4tgrPlaceDivRep.cc.

82{
83 if(axisName == "X")
84 {
85 return kXAxis;
86 }
87 else if(axisName == "Y")
88 {
89 return kYAxis;
90 }
91 else if(axisName == "Z")
92 {
93 return kZAxis;
94 }
95 else if(axisName == "R")
96 {
97 return kRho;
98 }
99 else if(axisName == "PHI")
100 {
101 return kPhi;
102 }
103 else
104 {
105 G4String ErrMessage = "Axis type not found: " + axisName +
106 ". Only valid axis are: X, Y, Z, R, PHI !";
107 G4Exception("G4tgrVolumeDivision::GetReplicaAxis()", "InvalidAxis",
108 FatalException, ErrMessage);
109 }
110 return kXAxis; // to avoid warning errors
111}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
@ kPhi
Definition: geomdefs.hh:60
@ kYAxis
Definition: geomdefs.hh:56
@ kXAxis
Definition: geomdefs.hh:55
@ kZAxis
Definition: geomdefs.hh:57
@ kRho
Definition: geomdefs.hh:58

References FatalException, G4Exception(), kPhi, kRho, kXAxis, kYAxis, and kZAxis.

Referenced by G4tgrPlaceDivRep(), and G4tgrVolumeDivision::G4tgrVolumeDivision().

◆ GetAxis()

EAxis G4tgrPlaceDivRep::GetAxis ( ) const
inline

Definition at line 66 of file G4tgrPlaceDivRep.hh.

66{ return theAxis; }

References theAxis.

Referenced by G4tgbVolume::ConstructG4PhysVol().

◆ GetCopyNo()

unsigned int G4tgrPlace::GetCopyNo ( ) const
inlineinherited

◆ GetDivType()

G4DivType G4tgrPlaceDivRep::GetDivType ( ) const
inline

Definition at line 70 of file G4tgrPlaceDivRep.hh.

70{ return theDivType; }

References theDivType.

Referenced by G4tgbVolume::ConstructG4PhysVol().

◆ GetNDiv()

G4int G4tgrPlaceDivRep::GetNDiv ( ) const
inline

Definition at line 67 of file G4tgrPlaceDivRep.hh.

67{ return theNDiv; }

References theNDiv.

Referenced by G4tgbVolume::ConstructG4PhysVol().

◆ GetOffset()

G4double G4tgrPlaceDivRep::GetOffset ( ) const
inline

Definition at line 69 of file G4tgrPlaceDivRep.hh.

69{ return theOffset; }

References theOffset.

Referenced by G4tgbVolume::ConstructG4PhysVol().

◆ GetParentName()

const G4String & G4tgrPlace::GetParentName ( ) const
inlineinherited

◆ GetPlacement()

G4ThreeVector G4tgrPlace::GetPlacement ( ) const
virtualinherited

Reimplemented in G4tgrPlaceSimple.

Definition at line 44 of file G4tgrPlace.cc.

45{
46 return G4ThreeVector(0, 0, 0); // Dummy...
47}
CLHEP::Hep3Vector G4ThreeVector

Referenced by G4tgbVolume::ConstructG4PhysVol().

◆ GetType()

const G4String & G4tgrPlace::GetType ( ) const
inlineinherited

◆ GetVolume()

G4tgrVolume * G4tgrPlace::GetVolume ( ) const
inlineinherited

Definition at line 53 of file G4tgrPlace.hh.

53{ return theVolume; }
G4tgrVolume * theVolume
Definition: G4tgrPlace.hh:63

References G4tgrPlace::theVolume.

Referenced by G4tgbVolume::ConstructG4Volumes(), and G4tgrVolumeMgr::DumpVolumeLeaf().

◆ GetWidth()

G4double G4tgrPlaceDivRep::GetWidth ( ) const
inline

Definition at line 68 of file G4tgrPlaceDivRep.hh.

68{ return theWidth; }

References theWidth.

Referenced by G4tgbVolume::ConstructG4PhysVol().

◆ SetAxis()

void G4tgrPlaceDivRep::SetAxis ( EAxis  axis)
inline

Definition at line 75 of file G4tgrPlaceDivRep.hh.

75{ theAxis = axis; }

References theAxis.

Referenced by G4tgrVolumeDivision::G4tgrVolumeDivision().

◆ SetDivType()

void G4tgrPlaceDivRep::SetDivType ( G4DivType  typ)
inline

Definition at line 77 of file G4tgrPlaceDivRep.hh.

77{ theDivType = typ; }
G4ProcessVectorTypeIndex typ

References theDivType, and pyG4ProcessManager::typ.

Referenced by G4tgrVolumeDivision::G4tgrVolumeDivision().

◆ SetNDiv()

void G4tgrPlaceDivRep::SetNDiv ( G4int  ndiv)
inline

Definition at line 73 of file G4tgrPlaceDivRep.hh.

73{ theNDiv = ndiv; }

References theNDiv.

Referenced by G4tgrVolumeDivision::G4tgrVolumeDivision().

◆ SetOffset()

void G4tgrPlaceDivRep::SetOffset ( G4double  offset)
inline

Definition at line 76 of file G4tgrPlaceDivRep.hh.

76{ theOffset = offset; }

References theOffset.

Referenced by G4tgrVolumeDivision::G4tgrVolumeDivision().

◆ SetParentName()

void G4tgrPlaceDivRep::SetParentName ( const G4String parentName)
inline

Definition at line 72 of file G4tgrPlaceDivRep.hh.

72{ theParentName=parentName; }

References G4tgrPlace::theParentName.

Referenced by G4tgrVolumeDivision::G4tgrVolumeDivision().

◆ SetType()

void G4tgrPlace::SetType ( const G4String typ)
inlineinherited

◆ SetVolume()

void G4tgrPlace::SetVolume ( G4tgrVolume vol)
inlineinherited

◆ SetWidth()

void G4tgrPlaceDivRep::SetWidth ( G4double  width)
inline

Definition at line 74 of file G4tgrPlaceDivRep.hh.

74{ theWidth = width; }

References theWidth.

Referenced by G4tgrVolumeDivision::G4tgrVolumeDivision().

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const G4tgrPlaceDivRep obj 
)
friend

Definition at line 114 of file G4tgrPlaceDivRep.cc.

115{
116 os << "G4tgrPlaceDivRep= in " << obj.theParentName << " NDiv= " << obj.theNDiv
117 << " Width= " << obj.theWidth << " Axis= " << obj.theAxis
118 << " Offset= " << obj.theOffset << " DivType= " << obj.theDivType
119 << G4endl;
120
121 return os;
122}

Field Documentation

◆ theAxis

EAxis G4tgrPlaceDivRep::theAxis = kUndefined
private

Definition at line 86 of file G4tgrPlaceDivRep.hh.

Referenced by G4tgrPlaceDivRep(), GetAxis(), and SetAxis().

◆ theCopyNo

unsigned int G4tgrPlace::theCopyNo = 0
protectedinherited

◆ theDivType

G4DivType G4tgrPlaceDivRep::theDivType = DivByNdivAndWidth
private

Definition at line 88 of file G4tgrPlaceDivRep.hh.

Referenced by G4tgrPlaceDivRep(), GetDivType(), and SetDivType().

◆ theNDiv

G4int G4tgrPlaceDivRep::theNDiv = 0
private

Definition at line 84 of file G4tgrPlaceDivRep.hh.

Referenced by G4tgrPlaceDivRep(), GetNDiv(), and SetNDiv().

◆ theOffset

G4double G4tgrPlaceDivRep::theOffset = 0.0
private

Definition at line 87 of file G4tgrPlaceDivRep.hh.

Referenced by G4tgrPlaceDivRep(), GetOffset(), and SetOffset().

◆ theParentName

G4String G4tgrPlace::theParentName = ""
protectedinherited

◆ theType

G4String G4tgrPlace::theType = ""
protectedinherited

◆ theVolume

G4tgrVolume* G4tgrPlace::theVolume = nullptr
protectedinherited

Definition at line 63 of file G4tgrPlace.hh.

Referenced by G4tgrPlace::GetVolume(), and G4tgrPlace::SetVolume().

◆ theWidth

G4double G4tgrPlaceDivRep::theWidth = 0.0
private

Definition at line 85 of file G4tgrPlaceDivRep.hh.

Referenced by G4tgrPlaceDivRep(), GetWidth(), and SetWidth().


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