FairRoot/PandaRoot
Public Member Functions | Public Attributes | List of all members
PndLmdDimPropMat Class Reference

#include <PndLmdDim.h>

Public Member Functions

 PndLmdDimPropMat ()
 
void Set (const double *matrix)
 
 PndLmdDimPropMat (double mom_init)
 
void Propagate (TVector3 &pos, TVector3 &momdir)
 

Public Attributes

double mom
 
double M [7][7]
 

Detailed Description

Definition at line 62 of file PndLmdDim.h.

Constructor & Destructor Documentation

PndLmdDimPropMat::PndLmdDimPropMat ( )
inline

Definition at line 66 of file PndLmdDim.h.

References i, and mom.

66  {
67  mom = 0;
68  for (int i = 0; i < 7; i++){
69  for (int j = 0; j < 7; j++){
70  M[i][j] = 0;
71  }
72  }
73  }
Int_t i
Definition: run_full.C:25
double M[7][7]
Definition: PndLmdDim.h:65
PndLmdDimPropMat::PndLmdDimPropMat ( double  mom_init)
inline

Definition at line 83 of file PndLmdDim.h.

References mom.

83  {
84  mom = mom_init;
85  if (mom == 1.5){
86  double matrix_init[49] = {
87  1.012, 1.22, 5.216e-05, 0.2599, 1.096, -0.1589, -0.0001459,
88  -0.5851, 1.042, 0.001092, -3.991e-06, 0.3103, 1.064, -3.991e-06,
89  -0.04447, -0.04501, 0.001764, 11.24, -0.04385, 0.007135, 0.0001733,
90  -1.36e-15, 1.816e-14, 3.031e-15, 1, 1.513e-16, -2.272e-16, 7.904e-17,
91  0.006668, 1.356, -0.0001811, 0.000127, 0.9794, -0.1215, 0.4001,
92  -0.6638, 0.04068, 0.001168, -7.627e-06, 0.2952, 0.9388, -7.627e-06,
93  -1.003e-15, -3.248e-15, 9.487e-17, 5.594e-18, 2.41e-16, -1.086e-16, 1
94  };
95  Set(matrix_init);
96  } else {
97  if (mom == 15){
98  double matrix_init[49] = {
99  0.9633, 0.2086, -0.01173, 0.2598, 1.123, -0.03217, -0.0002463,
100  -0.104, 0.97, -0.006443, 5.119e-06, 0.06427, 1.12, 5.119e-06,
101  -0.03828, 0.005853, 0.004478, 11.24, -0.0447, 0.001794, 2.613e-06,
102  2.376e-06, -0.0003806, -2.583e-07, 1, -1.647e-05, -1.871e-05, -3.862e-07,
103  -0.01744, 0.1777, -0.01384, 0.0001758, 0.9997, -0.02581, 0.4002,
104  -0.09394, -0.05056, -0.002047, 3.624e-05, 0.06091, 0.994, 3.624e-05,
105  2.376e-06, -0.0003806, -2.583e-07, -3.862e-07, -1.647e-05, -1.871e-05, 1
106  };
107  Set(matrix_init);
108  } else { // identity matrix
109  cout << " Warning in PndLmdDimPropMat: loading identity matrix only " << endl;
110  double matrix_init[49] = {
111  1, 0, 0, 0, 0, 0, 0,
112  0, 1, 0, 0, 0, 0, 0,
113  0, 0, 1, 0, 0, 0, 0,
114  0, 0, 0, 1, 0, 0, 0,
115  0, 0, 0, 0, 1, 0, 0,
116  0, 0, 0, 0, 0, 1, 0,
117  0, 0, 0, 0, 0, 0, 1
118  };
119  Set(matrix_init);
120  }
121  }
122  }
void Set(const double *matrix)
Definition: PndLmdDim.h:75

Member Function Documentation

void PndLmdDimPropMat::Propagate ( TVector3 &  pos,
TVector3 &  momdir 
)
inline

Definition at line 125 of file PndLmdDim.h.

References i.

125  {
126  //TVector3 dir = mom.Unit();
127  double mommag = momdir.Mag();
128  // position transformation was evaluated for meter and angles * 10.
129  double xip[7] = {pos.X()/100., pos.Y()/100., pos.Z()/100., 1, momdir.X()/momdir.Z()*10., momdir.Y()/momdir.Z()*10., 1};
130  double xlmd[7] = {0,0,0,0,0,0,0};
131  for (int i = 0; i < 7; i++){
132  for (int j = 0; j < 7; j++){
133  xlmd[i] += M[i][j] * xip[j];
134  }
135  }
136  pos.SetXYZ(xlmd[0]*100., xlmd[1]*100., xlmd[2]*100.);
137  momdir.SetXYZ(xlmd[4]/10., xlmd[5]/10., 1.); // not an exact calculation ;)
138  momdir = momdir.Unit()*mommag;
139  }
TVector3 pos
Int_t i
Definition: run_full.C:25
double M[7][7]
Definition: PndLmdDim.h:65
void PndLmdDimPropMat::Set ( const double *  matrix)
inline

Definition at line 75 of file PndLmdDim.h.

References i.

75  {
76  for (int i = 0; i < 7*7; i++){
77  M[i/7][i%7]=matrix[i];
78  }
79  }
Int_t i
Definition: run_full.C:25
double M[7][7]
Definition: PndLmdDim.h:65

Member Data Documentation

double PndLmdDimPropMat::M[7][7]

Definition at line 65 of file PndLmdDim.h.

double PndLmdDimPropMat::mom

Definition at line 64 of file PndLmdDim.h.


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