Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
G4ThreeMat.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27// $Id$
28//
29// ----------------------------------------------------------------------
30// Class G4ThreeMat
31//
32// Class description:
33//
34// Defines the class G4ThreeMat for three by three matrices.
35
36// Author: Alan Breakstone
37// Adaptation by: J.Sulkimo, P.Urban.
38// Revisions by: L.Broglia, G.Cosmo.
39// ----------------------------------------------------------------------
40#ifndef __THREEMAT_H
41#define __THREEMAT_H
42
43#include "G4Vector3D.hh"
44
46{
47
48public: // with description
49
50 G4ThreeMat();
51 // Default constructor.
52
53 G4ThreeMat( G4double a[3][3] );
54 // Normal constructors with a 3 x 3 array argument.
55
56 virtual ~G4ThreeMat();
57 // Destructor.
58
59 G4ThreeMat( const G4ThreeMat& m );
60 G4ThreeMat& operator=( const G4ThreeMat& m );
61 // Copy constructor and assignment operator.
62
63 G4int operator==( const G4ThreeMat& m ) const;
64 // Equality operator.
65
66 friend std::ostream& operator<<( std::ostream& os, const G4ThreeMat& m );
67
68 virtual const char* NameOf() const;
69 // Returns the class name.
70
71 virtual void PrintOn( std::ostream& os = G4cout ) const;
72 // Printing functions (derived classes do not need to overwrite operator <<).
73
74 G4double Determinant() const;
75 // Determinant of matrix.
76
77private:
78
79 G4double element[3][3];
80 G4Vector3D row[3], column[3];
81 // The elements exist individually and are also aggregated into rows and
82 // columns to use operations already written for the G4Vector3Dc class.
83};
84
85#endif
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
G4DLLIMPORT std::ostream G4cout
G4int operator==(const G4ThreeMat &m) const
Definition: G4ThreeMat.cc:121
virtual void PrintOn(std::ostream &os=G4cout) const
Definition: G4ThreeMat.cc:100
G4ThreeMat & operator=(const G4ThreeMat &m)
Definition: G4ThreeMat.cc:136
G4double Determinant() const
Definition: G4ThreeMat.cc:151
friend std::ostream & operator<<(std::ostream &os, const G4ThreeMat &m)
Definition: G4ThreeMat.cc:91
virtual ~G4ThreeMat()
Definition: G4ThreeMat.cc:66
virtual const char * NameOf() const
Definition: G4ThreeMat.cc:85