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

#include <G4tgrRotationMatrix.hh>

Public Member Functions

 G4tgrRotationMatrix ()
 
 ~G4tgrRotationMatrix ()
 
 G4tgrRotationMatrix (const std::vector< G4String > &wl)
 
const G4StringGetName ()
 
std::vector< G4double > & GetValues ()
 

Friends

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

Detailed Description

Definition at line 48 of file G4tgrRotationMatrix.hh.

Constructor & Destructor Documentation

◆ G4tgrRotationMatrix() [1/2]

G4tgrRotationMatrix::G4tgrRotationMatrix ( )

Definition at line 39 of file G4tgrRotationMatrix.cc.

40{
41}

◆ ~G4tgrRotationMatrix()

G4tgrRotationMatrix::~G4tgrRotationMatrix ( )

Definition at line 44 of file G4tgrRotationMatrix.cc.

45{
46}

◆ G4tgrRotationMatrix() [2/2]

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

Definition at line 49 of file G4tgrRotationMatrix.cc.

50{
51 theName = G4tgrUtils::GetString(wl[1]);
52
53 switch(wl.size())
54 {
55 case 5:
56 theInputType = rm3;
57 break;
58 case 8:
59 theInputType = rm6;
60 break;
61 case 11:
62 theInputType = rm9;
63 break;
64 default:
65 G4Exception("G4tgrRotationMatrix::G4tgrRotationMatrix()", "InvalidMatrix",
66 FatalException, "Input line must have 5, 8 or 11 words.");
67 break;
68 }
69
70 //-------- Fill matrix values
71 std::size_t siz = wl.size() - 2;
72 for(std::size_t ii = 0; ii < siz; ++ii)
73 {
74 if(siz == 9)
75 {
76 theValues.push_back(G4tgrUtils::GetDouble(wl[ii + 2]));
77 }
78 else
79 {
80 theValues.push_back(G4tgrUtils::GetDouble(wl[ii + 2], deg));
81 }
82 }
83#ifdef G4VERBOSE
85 {
86 G4cout << " G4tgrRotationMatrix::G4tgrRotationMatrix() - Created: "
87 << theName << G4endl;
88 for(std::size_t ii = 0; ii < siz; ++ii)
89 {
90 G4cout << " " << theValues[ii];
91 }
92 G4cout << G4endl;
93 }
94#endif
95}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout
static G4int GetVerboseLevel()
static G4String GetString(const G4String &str)
static G4double GetDouble(const G4String &str, G4double unitval=1.)

Member Function Documentation

◆ GetName()

const G4String & G4tgrRotationMatrix::GetName ( )
inline

Definition at line 59 of file G4tgrRotationMatrix.hh.

59{ return theName; }

Referenced by G4tgrRotationMatrixFactory::AddRotMatrix(), and G4tgbRotationMatrix::GetName().

◆ GetValues()

std::vector< G4double > & G4tgrRotationMatrix::GetValues ( )
inline

Definition at line 60 of file G4tgrRotationMatrix.hh.

60{ return theValues; }

Referenced by G4tgbRotationMatrix::BuildG4RotMatrix().

Friends And Related Symbol Documentation

◆ operator<<

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

Definition at line 98 of file G4tgrRotationMatrix.cc.

99{
100 os << "G4tgrRotationMatrix= " << obj.theName
101 << " InputTyep = " << obj.theInputType << " VALUES= ";
102
103 for(std::size_t ii = 0; ii < obj.theValues.size(); ++ii)
104 {
105 os << obj.theValues[ii] << " ";
106 }
107
108 os << G4endl;
109
110 return os;
111}

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