FairRoot
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
FairGeoTransform.h
Go to the documentation of this file.
1
/********************************************************************************
2
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3
* *
4
* This software is distributed under the terms of the *
5
* GNU Lesser General Public Licence (LGPL) version 3, *
6
* copied verbatim in the file "LICENSE" *
7
********************************************************************************/
8
#ifndef FAIRGEOTRANSFORM_H
9
#define FAIRGEOTRANSFORM_H
10
11
#include "
FairGeoRotation.h
"
// for FairGeoRotation
12
#include "
FairGeoVector.h
"
// for FairGeoVector
13
14
#include <Rtypes.h>
// for Double_t, etc
15
#include <TObject.h>
// for TObject
16
20
class
FairGeoTransform
:
public
TObject
21
{
22
protected
:
23
FairGeoRotation
rot
;
24
FairGeoVector
trans
;
25
FairGeoVector
trans_cm
;
27
public
:
28
FairGeoTransform
();
29
inline
FairGeoTransform
(
const
FairGeoTransform
& t);
30
~FairGeoTransform
() {}
31
FairGeoTransform
&
operator=
(
const
FairGeoTransform
& t);
32
const
FairGeoRotation
&
getRotMatrix
()
const
{
return
rot
; }
33
const
FairGeoVector
&
getTransVector
()
const
{
return
trans
; }
34
void
setRotMatrix
(
const
FairGeoRotation
& r) {
rot
= r; }
35
void
setRotMatrix
(
const
Double_t* a) {
rot
.
setMatrix
(a); }
36
void
setRotMatrix
(
const
Float_t* a) {
rot
.
setMatrix
(a); }
37
void
setTransVector
(
const
FairGeoVector
& t) {
trans
= t; }
38
void
setTransVector
(
const
Double_t* a) {
trans
.
setVector
(a); }
39
void
setTransVector
(
const
Float_t* a) {
trans
.
setVector
(a); }
40
FairGeoVector
transFrom
(
const
FairGeoVector
& p)
const
;
41
FairGeoVector
transTo
(
const
FairGeoVector
& p)
const
;
42
void
transFrom
(
const
FairGeoTransform
&);
43
void
transTo
(
const
FairGeoTransform
&);
44
void
invert
(
void
);
45
void
clear
();
46
void
print
();
47
const
FairGeoVector
&
getTranslation
()
48
{
49
const
double
fac = 10.;
50
trans_cm
=
trans
;
51
return
(
trans_cm
/= fac);
52
}
53
54
const
FairGeoRotation
&
getRotation
()
const
{
return
rot
; }
55
56
inline
void
setTransform
(
const
FairGeoTransform
& t);
57
ClassDef
(
FairGeoTransform
, 1);
//
58
};
59
60
inline
FairGeoTransform::FairGeoTransform
(
const
FairGeoTransform
& t)
61
: TObject(t)
62
, rot(t.getRotMatrix())
63
, trans(t.getTransVector())
64
, trans_cm(
FairGeoVector
(0, 0, 0))
65
{}
66
67
inline
void
FairGeoTransform::setTransform
(
const
FairGeoTransform
& t)
68
{
69
rot
= t.
getRotMatrix
();
70
trans
= t.
getTransVector
();
71
}
72
73
#endif
/* !FAIRGEOTRANSFORM_H */
FairGeoTransform::FairGeoTransform
FairGeoTransform()
Definition:
FairGeoTransform.cxx:56
FairGeoTransform::setTransVector
void setTransVector(const FairGeoVector &t)
Definition:
FairGeoTransform.h:37
FairGeoTransform::rot
FairGeoRotation rot
Definition:
FairGeoTransform.h:23
FairGeoTransform::print
void print()
Definition:
FairGeoTransform.cxx:132
FairGeoRotation.h
FairGeoVector::setVector
void setVector(const Double_t *a)
Definition:
FairGeoVector.h:107
FairGeoTransform::clear
void clear()
Definition:
FairGeoTransform.cxx:126
FairGeoTransform::ClassDef
ClassDef(FairGeoTransform, 1)
FairGeoTransform
Definition:
FairGeoTransform.h:20
FairGeoRotation::setMatrix
void setMatrix(const Double_t *)
Definition:
FairGeoRotation.h:94
FairGeoTransform::setTransVector
void setTransVector(const Float_t *a)
Definition:
FairGeoTransform.h:39
FairGeoTransform::operator=
FairGeoTransform & operator=(const FairGeoTransform &t)
Definition:
FairGeoTransform.cxx:63
FairGeoTransform::getTransVector
const FairGeoVector & getTransVector() const
Definition:
FairGeoTransform.h:33
FairGeoTransform::transFrom
FairGeoVector transFrom(const FairGeoVector &p) const
Definition:
FairGeoTransform.cxx:71
FairGeoTransform::getRotMatrix
const FairGeoRotation & getRotMatrix() const
Definition:
FairGeoTransform.h:32
FairGeoTransform::transTo
FairGeoVector transTo(const FairGeoVector &p) const
Definition:
FairGeoTransform.cxx:82
FairGeoTransform::getTranslation
const FairGeoVector & getTranslation()
Definition:
FairGeoTransform.h:47
FairGeoTransform::trans_cm
FairGeoVector trans_cm
Definition:
FairGeoTransform.h:25
FairGeoVector
Definition:
FairGeoVector.h:19
FairGeoTransform::trans
FairGeoVector trans
Definition:
FairGeoTransform.h:24
FairGeoTransform::setRotMatrix
void setRotMatrix(const FairGeoRotation &r)
Definition:
FairGeoTransform.h:34
FairGeoTransform::invert
void invert(void)
Definition:
FairGeoTransform.cxx:138
FairGeoTransform::setRotMatrix
void setRotMatrix(const Double_t *a)
Definition:
FairGeoTransform.h:35
FairGeoTransform::~FairGeoTransform
~FairGeoTransform()
Definition:
FairGeoTransform.h:30
FairGeoTransform::setRotMatrix
void setRotMatrix(const Float_t *a)
Definition:
FairGeoTransform.h:36
FairGeoTransform::getRotation
const FairGeoRotation & getRotation() const
Definition:
FairGeoTransform.h:54
FairGeoRotation
Definition:
FairGeoRotation.h:23
FairGeoVector.h
FairGeoTransform::setTransform
void setTransform(const FairGeoTransform &t)
Definition:
FairGeoTransform.h:67
FairGeoTransform::setTransVector
void setTransVector(const Double_t *a)
Definition:
FairGeoTransform.h:38
FairRoot
geobase
FairGeoTransform.h
Generated on Mon Mar 8 2021 12:14:06 for FairRoot by
1.8.5