EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
FairGeoMatrix.cxx
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file FairGeoMatrix.cxx
1
//*-- Author : M. Sanchez
2
//*-- Modified : 07.03.2001
3
4
#include "
FairGeoMatrix.h
"
5
6
8
// FairGeoMatrix
9
//
10
// Simple 3D matrix interface for use with FairGeoVector.
11
//
12
// Note:
13
// This class is completely incomplete. Features will be
14
// added as needed
16
17
18
FairGeoMatrix::FairGeoMatrix
(
void
)
19
:
TObject
()
20
{
21
// Initializes the matrix to 0
22
for
(
int
i=0; i<9; i++) {
fM
[i]=0.0; }
23
}
24
25
FairGeoMatrix::~FairGeoMatrix
(
void
)
26
{
27
}
28
29
Double_t
FairGeoMatrix::det
(
void
)
30
{
31
// Computes de determinat of the 3D matrix
32
return
(
fM
[0] *
fM
[4] *
fM
[8] +
fM
[1] *
fM
[5] *
fM
[6] +
fM
[3] *
fM
[7] *
fM
[2] -
33
fM
[2] *
fM
[4] *
fM
[6] -
fM
[1] *
fM
[3] *
fM
[8] -
fM
[5] *
fM
[7] *
fM
[0]);
34
}
35
36
FairGeoVector
FairGeoMatrix::operator*
(
FairGeoVector
&
v
)
37
{
38
// Matrix multiplication
39
FairGeoVector
vo;
40
vo.
setX
(
fM
[0] * v.
getX
() +
fM
[1] * v.
getY
() +
fM
[2] * v.
getZ
());
41
vo.
setY
(
fM
[3] * v.
getX
() +
fM
[4] * v.
getY
() +
fM
[5] * v.
getZ
());
42
vo.
setZ
(
fM
[6] * v.
getX
() +
fM
[7] * v.
getY
() +
fM
[8] * v.
getZ
());
43
return
vo;
44
}
45
46
FairGeoMatrix
&
FairGeoMatrix::operator/=
(Double_t
d
)
47
{
48
// Matrix division by a constant. Divides each element on the
49
//matrix by the constant "d"
50
for
(
int
i=0; i<9; i++) {
fM
[i]/=
d
; }
51
return
*
this
;
52
}
53
54
ClassImp
(
FairGeoMatrix
)
EicRoot
blob
master
geobase
FairGeoMatrix.cxx
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:36
using
1.8.2 with
EIC GitHub integration