FairRoot/PandaRoot
PndFtsTube.cxx
Go to the documentation of this file.
1 #include "PndFtsTube.h"
2 
3 #include <iostream>
4 
6 :fCenPosition(TVector3(0,0,0)),
7  fRotationMatrix(TMatrixT<double>(3,3)),
8  fRadIn(0),
9  fRadOut(0),
10  fHalfLength(0)
11 {
12  fRotationMatrix[0][0] = -1.;
13  fRotationMatrix[0][1] = -1.;
14  fRotationMatrix[0][2] = -1.;
15 
16  fRotationMatrix[1][0] = -1.;
17  fRotationMatrix[1][1] = -1.;
18  fRotationMatrix[1][2] = -1.;
19 
20  fRotationMatrix[2][0] = -1.;
21  fRotationMatrix[2][1] = -1.;
22  fRotationMatrix[2][2] = -1.;
23 }
24 
26  :TObject(tube),
27  fCenPosition(tube.GetPosition()),
28  fRotationMatrix(TMatrixT<double>(3,3)),
29  fRadIn(tube.GetRadIn()),
30  fRadOut(tube.GetRadOut()),
31  fHalfLength(tube.GetHalfLength())
32 {
33  fRotationMatrix.ResizeTo(3,3);
35 }
36 
38  Double_t r11, Double_t r12, Double_t r13,
39  Double_t r21, Double_t r22, Double_t r23,
40  Double_t r31, Double_t r32, Double_t r33,
41  Double_t radin, Double_t radout, Double_t hl)
42  :fCenPosition(TVector3(x,y,z)),
43  fRotationMatrix(TMatrixT<double>(3,3)),
44  fRadIn(radin),
45  fRadOut(radout),
46  fHalfLength(hl)
47 {
48 
49  fRotationMatrix[0][0] = r11;
50  fRotationMatrix[0][1] = r12;
51  fRotationMatrix[0][2] = r13;
52 
53  fRotationMatrix[1][0] = r21;
54  fRotationMatrix[1][1] = r22;
55  fRotationMatrix[1][2] = r23;
56 
57  fRotationMatrix[2][0] = r31;
58  fRotationMatrix[2][1] = r32;
59  fRotationMatrix[2][2] = r33;
60 
61 }
62 
64 // fCenPosition.Delete();
65 // fRotationMatrix.Delete();
66 }
67 
68 TVector3 PndFtsTube::GetPosition() const {
69  return fCenPosition; }
70 
71 TMatrixT<Double_t> PndFtsTube::GetRotationMatrix() const {
72  return fRotationMatrix; }
73 
75  return fRadIn; }
76 
78  return fRadOut; }
79 
81  return fHalfLength; }
82 
83 TVector3 PndFtsTube::GetWireDirection() const {
84  return TVector3(fRotationMatrix[0][2],
85  fRotationMatrix[1][2],
86  fRotationMatrix[2][2]);}
87 
88 
Double_t fRadIn
Definition: PndFtsTube.h:40
TVector3 GetWireDirection() const
Definition: PndFtsTube.cxx:83
Double_t fHalfLength
Definition: PndFtsTube.h:40
Double_t
Double_t GetRadOut() const
Definition: PndFtsTube.cxx:77
Double_t fRadOut
Definition: PndFtsTube.h:40
TMatrixT< Double_t > GetRotationMatrix() const
Definition: PndFtsTube.cxx:71
TVector3 fCenPosition
Definition: PndFtsTube.h:38
Double_t z
TVector3 GetPosition() const
Definition: PndFtsTube.cxx:68
Double_t GetHalfLength() const
Definition: PndFtsTube.cxx:80
Double_t GetRadIn() const
Definition: PndFtsTube.cxx:74
Double_t x
ClassImp(PndAnaContFact)
TMatrixT< double > fRotationMatrix
Definition: PndFtsTube.h:39
Double_t y
cout<<"the mcX, mcY, mcZ are "<< mcX<<","<< mcY<<","<< mcZ<< endl;vecmc.SetXYZ(mcX, mcY, mcZ);vecrc=hit-> GetPosition()