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

#include <G4tgrRotationMatrix.hh>

Public Member Functions

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

Private Attributes

G4RotMatInputType theInputType = rm9
 
G4String theName = "Rotation-Matrix"
 
std::vector< G4doubletheValues
 

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{
52
53 switch(wl.size())
54 {
55 case 5:
57 break;
58 case 8:
60 break;
61 case 11:
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)
Definition: G4Exception.cc:35
static constexpr double deg
Definition: G4SIunits.hh:132
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
static G4int GetVerboseLevel()
std::vector< G4double > theValues
G4RotMatInputType theInputType
static G4String GetString(const G4String &str)
Definition: G4tgrUtils.cc:173
static G4double GetDouble(const G4String &str, G4double unitval=1.)
Definition: G4tgrUtils.cc:198

References deg, FatalException, G4cout, G4endl, G4Exception(), G4tgrUtils::GetDouble(), G4tgrUtils::GetString(), G4tgrMessenger::GetVerboseLevel(), rm3, rm6, rm9, theInputType, theName, and theValues.

Member Function Documentation

◆ GetName()

const G4String & G4tgrRotationMatrix::GetName ( )
inline

Definition at line 59 of file G4tgrRotationMatrix.hh.

59{ return theName; }

References 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; }

References theValues.

Referenced by G4tgbRotationMatrix::BuildG4RotMatrix().

Friends And Related Function 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}

Field Documentation

◆ theInputType

G4RotMatInputType G4tgrRotationMatrix::theInputType = rm9
private

Definition at line 71 of file G4tgrRotationMatrix.hh.

Referenced by G4tgrRotationMatrix().

◆ theName

G4String G4tgrRotationMatrix::theName = "Rotation-Matrix"
private

Definition at line 67 of file G4tgrRotationMatrix.hh.

Referenced by G4tgrRotationMatrix(), and GetName().

◆ theValues

std::vector<G4double> G4tgrRotationMatrix::theValues
private

Definition at line 68 of file G4tgrRotationMatrix.hh.

Referenced by G4tgrRotationMatrix(), and GetValues().


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