Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4tgrSolidScaled Class Reference

#include <G4tgrSolidScaled.hh>

+ Inheritance diagram for G4tgrSolidScaled:

Public Member Functions

 G4tgrSolidScaled (const std::vector< G4String > &wl)
 
 ~G4tgrSolidScaled ()
 
const G4Scale3D GetScale3d () const
 
const G4tgrSolidGetOrigSolid () const
 
- Public Member Functions inherited from G4tgrSolid
 G4tgrSolid ()
 
 G4tgrSolid (const std::vector< G4String > &wl)
 
virtual ~G4tgrSolid ()
 
const G4StringGetName () const
 
const G4StringGetType () const
 
const std::vector< std::vector< G4double > * > GetSolidParams () const
 
virtual const G4StringGetRelativeRotMatName () const
 
virtual G4ThreeVector GetRelativePlace () const
 

Friends

std::ostream & operator<< (std::ostream &, const G4tgrSolidScaled &)
 

Additional Inherited Members

- Protected Attributes inherited from G4tgrSolid
G4String theName
 
G4String theType
 
std::vector< std::vector< G4double > * > theSolidParams
 

Detailed Description

Definition at line 45 of file G4tgrSolidScaled.hh.

Constructor & Destructor Documentation

◆ G4tgrSolidScaled()

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

Definition at line 38 of file G4tgrSolidScaled.cc.

39{
40 // :SOLID/:VOLU SOL1 SCALED SOL0 SCLAEX SCALEY SCALEZ
41 if(wl.size() != 7)
42 {
43 G4tgrUtils::DumpVS(wl, "G4tgrSolidScaled::G4tgrSolidScaled()");
44 G4Exception("G4tgrSolidScaled::G4tgrSolidScaled()", "InvalidInput",
45 FatalException, "Line read with less or more than 7 words.");
46 }
47
48 //---------- Set name
50
52 origSolid = volmgr->FindSolid(G4tgrUtils::GetString(wl[3]));
53 if(origSolid == nullptr)
54 {
55 origSolid = volmgr->FindVolume(G4tgrUtils::GetString(wl[3]), 1)->GetSolid();
56 }
57
58 //---------- Set scale vector
61
62 //---------- Set solid type
63 G4String wl2 = wl[2];
64 for(G4int ii = 0; ii < (G4int)wl2.length(); ++ii)
65 {
66 wl2[ii] = (char)std::toupper(wl2[ii]);
67 }
68 theType = wl2;
69
70#ifdef G4VERBOSE
72 {
73 G4cout << " Created " << *this << G4endl;
74 }
75#endif
76
78}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:59
HepGeom::Scale3D G4Scale3D
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
static G4int GetVerboseLevel()
G4String theType
Definition: G4tgrSolid.hh:68
G4String theName
Definition: G4tgrSolid.hh:66
static G4String GetString(const G4String &str)
Definition: G4tgrUtils.cc:173
static void DumpVS(const std::vector< G4String > &wl, const char *msg)
Definition: G4tgrUtils.cc:153
static G4double GetDouble(const G4String &str, G4double unitval=1.)
Definition: G4tgrUtils.cc:198
G4tgrVolume * FindVolume(const G4String &volname, G4bool exists=false)
G4tgrSolid * FindSolid(const G4String &name, G4bool exists=false)
void RegisterMe(G4tgrSolid *vol)
static G4tgrVolumeMgr * GetInstance()
G4tgrSolid * GetSolid() const
Definition: G4tgrVolume.hh:86

◆ ~G4tgrSolidScaled()

G4tgrSolidScaled::~G4tgrSolidScaled ( )

Definition at line 81 of file G4tgrSolidScaled.cc.

82{
83}

Member Function Documentation

◆ GetOrigSolid()

const G4tgrSolid * G4tgrSolidScaled::GetOrigSolid ( ) const
inline

Definition at line 56 of file G4tgrSolidScaled.hh.

56{ return origSolid; }

Referenced by G4tgbVolume::FindOrConstructG4Solid().

◆ GetScale3d()

const G4Scale3D G4tgrSolidScaled::GetScale3d ( ) const
inline

Definition at line 55 of file G4tgrSolidScaled.hh.

55{ return scale3d; }

Referenced by G4tgbVolume::FindOrConstructG4Solid().

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const G4tgrSolidScaled sol 
)
friend

Definition at line 86 of file G4tgrSolidScaled.cc.

87{
88 os << "G4tgrSolidScaled= " << sol.theName << " of type " << sol.theType
89 << " original solid: " << sol.origSolid->GetName() << " Scale x: " <<
90 sol.scale3d.xx() << " Scale y: " << sol.scale3d.yy() <<
91 " Scale z: " << sol.scale3d.zz() << G4endl;
92
93 return os;
94}
const G4String & GetName() const
Definition: G4tgrSolid.hh:54
double zz() const
Definition: Transform3D.h:281
double xx() const
Definition: Transform3D.h:257
double yy() const
Definition: Transform3D.h:269

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