Geant4 9.6.0
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 49 of file G4tgrRotationMatrix.hh.

Constructor & Destructor Documentation

◆ G4tgrRotationMatrix() [1/2]

G4tgrRotationMatrix::G4tgrRotationMatrix ( )

Definition at line 44 of file G4tgrRotationMatrix.cc.

45 : theName("Rotation-Matrix"), theInputType(rm9)
46{
47}

◆ ~G4tgrRotationMatrix()

G4tgrRotationMatrix::~G4tgrRotationMatrix ( )

Definition at line 51 of file G4tgrRotationMatrix.cc.

52{
53}

◆ G4tgrRotationMatrix() [2/2]

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

Definition at line 57 of file G4tgrRotationMatrix.cc.

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

Member Function Documentation

◆ GetName()

const G4String & G4tgrRotationMatrix::GetName ( )
inline

Definition at line 60 of file G4tgrRotationMatrix.hh.

60{ return theName; }

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

◆ GetValues()

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

Definition at line 61 of file G4tgrRotationMatrix.hh.

61{ return theValues; }

Referenced by G4tgbRotationMatrix::BuildG4RotMatrix().

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 109 of file G4tgrRotationMatrix.cc.

110{
111 os << "G4tgrRotationMatrix= " << obj.theName
112 << " InputTyep = " << obj.theInputType << " VALUES= ";
113
114 for( size_t ii = 0; ii < obj.theValues.size(); ii++ )
115 {
116 os << obj.theValues[ii] << " ";
117 }
118
119 os << G4endl;
120
121 return os;
122}

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