CbmRoot
MultiscatteringModel.h
Go to the documentation of this file.
1 #ifndef MULTISCATTERINGMODEL_H
2 #define MULTISCATTERINGMODEL_H
3 
4 //#include <cmath>
5 #include "TMath.h"
6 
7 //#include <omp.h>
8 
9 
11  std::vector<double> xlag32, wlag32;
12 
13 public:
15 
16  virtual ~MultiscatteringModel(void) {}
17 
18  double GetSigt(double apt) { return TMath::Sqrt(2. / TMath::Pi()) * apt; }
19 
20  double GetSigz(double apz2, double apz4) {
21  double ret = 3. / 2. * apz2 * apz2 - apz4 / 2.;
22  if (ret < 0.)
23  return TMath::Sqrt(apz2);
24  else
25  return TMath::Sqrt(apz2 - TMath::Sqrt(ret));
26  }
27 
28  double GetQz(double apz2, double apz4) {
29  double ret = 3. / 2. * apz2 * apz2 - apz4 / 2.;
30  if (ret < 0.) return 0.;
31  return TMath::Power(ret, 1. / 4.);
32  }
33 
34  double fpt(double pt, double sigt) {
35  return pt / sigt / sigt * TMath::Exp(-pt * pt / 2. / sigt / sigt);
36  }
37 
38  double fpz(double pz, double sigz, double qz) {
39  return 1. / 2. / TMath::Sqrt(2. * TMath::Pi()) / sigz
40  * (TMath::Exp(-(pz - qz) * (pz - qz) / 2. / sigz / sigz)
41  + TMath::Exp(-(pz + qz) * (pz + qz) / 2. / sigz / sigz));
42  }
43 
44  double dndy(double y, double m, double sigt, double sigz, double qz) {
45  double ret = 0.;
46  for (int i = 0; i < 32; i++) {
47  double mt = TMath::Sqrt(m * m + xlag32[i] * xlag32[i]);
48  ret += wlag32[i] * mt * fpt(xlag32[i], sigt)
49  * fpz(mt * TMath::SinH(y), sigz, qz);
50  }
51  return ret * TMath::CosH(y);
52  }
53 
54  double
55  fypt(double y, double pt, double m, double sigt, double sigz, double qz) {
56  double mt = TMath::Sqrt(m * m + pt * pt);
57  return mt * TMath::CosH(y) * fpt(pt, sigt)
58  * fpz(mt * TMath::SinH(y), sigz, qz);
59  }
60 };
61 
62 #endif
MultiscatteringModel::fypt
double fypt(double y, double pt, double m, double sigt, double sigz, double qz)
Definition: MultiscatteringModel.h:55
MultiscatteringModel::GetSigt
double GetSigt(double apt)
Definition: MultiscatteringModel.h:18
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
MultiscatteringModel::GetSigz
double GetSigz(double apz2, double apz4)
Definition: MultiscatteringModel.h:20
MultiscatteringModel::~MultiscatteringModel
virtual ~MultiscatteringModel(void)
Definition: MultiscatteringModel.h:16
MultiscatteringModel::MultiscatteringModel
MultiscatteringModel()
Definition: MultiscatteringModel.cxx:10
MultiscatteringModel::fpz
double fpz(double pz, double sigz, double qz)
Definition: MultiscatteringModel.h:38
MultiscatteringModel::fpt
double fpt(double pt, double sigt)
Definition: MultiscatteringModel.h:34
xMath::Pi
double Pi()
Definition: xMath.h:5
MultiscatteringModel::GetQz
double GetQz(double apz2, double apz4)
Definition: MultiscatteringModel.h:28
MultiscatteringModel::xlag32
std::vector< double > xlag32
Definition: MultiscatteringModel.h:11
m
__m128 m
Definition: L1/vectors/P4_F32vec4.h:26
y
Double_t y
Definition: CbmMvdSensorDigiToHitTask.cxx:68
MultiscatteringModel::dndy
double dndy(double y, double m, double sigt, double sigz, double qz)
Definition: MultiscatteringModel.h:44
MultiscatteringModel
Definition: MultiscatteringModel.h:10
MultiscatteringModel::wlag32
std::vector< double > wlag32
Definition: MultiscatteringModel.h:11