PandaRoot
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 74 of file PndLmdDim.h.

Constructor & Destructor Documentation

◆ PndLmdDimPropMat() [1/2]

PndLmdDimPropMat::PndLmdDimPropMat ( )
inline

Definition at line 78 of file PndLmdDim.h.

References i.

79  {
80  mom = 0;
81  for (int i = 0; i < 7; i++) {
82  for (int j = 0; j < 7; j++) {
83  M[i][j] = 0;
84  }
85  }
86  }
unsigned int i
Definition: P4_F32vec4.h:33
double M[7][7]
Definition: PndLmdDim.h:77

◆ PndLmdDimPropMat() [2/2]

PndLmdDimPropMat::PndLmdDimPropMat ( double  mom_init)
inline

Definition at line 97 of file PndLmdDim.h.

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

Member Function Documentation

◆ Propagate()

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

Definition at line 125 of file PndLmdDim.h.

References i.

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

◆ Set()

void PndLmdDimPropMat::Set ( const double *  matrix)
inline

Definition at line 88 of file PndLmdDim.h.

References i.

89  {
90  for (int i = 0; i < 7 * 7; i++) {
91  M[i / 7][i % 7] = matrix[i];
92  }
93  }
unsigned int i
Definition: P4_F32vec4.h:33
double M[7][7]
Definition: PndLmdDim.h:77

Member Data Documentation

◆ M

double PndLmdDimPropMat::M[7][7]

Definition at line 77 of file PndLmdDim.h.

◆ mom

double PndLmdDimPropMat::mom

Definition at line 76 of file PndLmdDim.h.


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