Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
CorrFit3DCFBowlerSinyukovExtra.cxx
1/*
2 * CorrFit3DCFBowlerSinyukovExtra.cxx
3 *
4 * Created on: 31 mar 2019
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9#include "CorrFit3DCFBowlerSinyukovExtra.h"
10
11#include <TVector3.h>
12
13namespace Hal {
14 Double_t CorrFit3DCFBowlerSinyukovEllipse::CalculateCF(const Double_t* x, const Double_t* params) const {
15 Double_t cf_free = 0;
16 Double_t kq = 0;
17 switch (fFrame) {
18 case Femto::EKinematics::kLCMS: {
19 Double_t rout = GetRoutPRF(params[RoutID()], params[Tau()]);
20 Double_t k_star = fQinvMap->Eval(x[0], x[1], x[2]);
21 Double_t kout = TMath::Sqrt(k_star * k_star - x[1] * x[1] - x[2] * x[2]);
22 k_star = k_star * 0.5;
23 Double_t rinv = GetRinv(rout, params[RsideID()], params[RlongID()], kout, x[1], x[2]);
24 kq = fCFs->Eval(k_star, rinv);
25 cf_free = 1.
26 + fQSMode
27 * TMath::Exp(-25.76578
28 * (x[0] * x[0] * params[RoutID()] * params[RoutID()]
29 + x[1] * x[1] * params[RsideID()] * params[RsideID()]
30 + x[2] * x[2] * params[RlongID()] * params[RlongID()]));
31
32 } break;
33 case Femto::EKinematics::kPRF: {
34 Double_t k_star = TMath::Sqrt(x[0] * x[0] + x[1] * x[1] + x[2] * x[2]);
35 Double_t rinv = GetRinv(params[RoutID()], params[RsideID()], params[RlongID()], x[0], x[1], x[2]);
36 std::cout << rinv << std::endl;
37 cf_free = 1.
38 + fQSMode
39 * TMath::Exp(-25.76578 * 4.0
40 * (x[0] * x[0] * params[RoutID()] * params[RoutID()]
41 + x[1] * x[1] * params[RsideID()] * params[RsideID()]
42 + x[2] * x[2] * params[RlongID()] * params[RlongID()])); // x4 cause PRF
43 kq = fCFs->Eval(k_star, rinv);
44 } break;
45 default:
46 // r_out = params[Routidx()];
47 break;
48 }
49 return params[NormID()] * (1.0 - params[LambdaID()] + params[LambdaID()] * kq * cf_free);
50 }
51
52 CorrFit3DCFBowlerSinyukovEllipse::CorrFit3DCFBowlerSinyukovEllipse() : CorrFit3DCFBowlerSinyukov() {}
53
55 Double_t xside,
56 Double_t xlong,
57 Double_t kout,
58 Double_t kside,
59 Double_t klong) const {
60 TVector3 vec(kout, kside, klong);
61 Double_t P = vec.Phi();
62 Double_t T = vec.Theta();
63 Double_t sinP = TMath::Power(TMath::Sin(P), 2);
64 Double_t sinT = TMath::Power(TMath::Sin(T), 2);
65 Double_t cosP = TMath::Power(TMath::Cos(P), 2);
66 Double_t cosT = TMath::Power(TMath::Cos(T), 2);
67 Double_t a = xout * xout;
68 Double_t b = xside * xside;
69 Double_t c = xlong * xlong;
70 Double_t rinv = TMath::Sqrt(1.0 / (cosP * sinT / a + sinP * sinT / b + cosT / c));
71 if (TMath::IsNaN(rinv)) rinv = 20;
72 return rinv;
73 }
74
75 CorrFit3DCFBowlerSinyukovEllipse::~CorrFit3DCFBowlerSinyukovEllipse() {}
76
77 Double_t CorrFit3DCFBowlerSinyukovClassic::CalculateCF(const Double_t* x, const Double_t* params) const {
78 Double_t cf_free = 0;
79 Double_t kq = 0;
80
81 switch (fFrame) {
82 case Femto::EKinematics::kLCMS: {
83 Double_t k_star = 0;
84 k_star = 0.5 * fQinvMap->Eval(x[0], x[1], x[2]);
85 kq = fCFs->Eval(k_star, params[RCoul()]);
86 cf_free = 1.
87 + fQSMode
88 * TMath::Exp(-25.76578
89 * (x[0] * x[0] * params[RoutID()] * params[RoutID()]
90 + x[1] * x[1] * params[RsideID()] * params[RsideID()]
91 + x[2] * x[2] * params[RlongID()] * params[RlongID()]));
92 } break;
93 case Femto::EKinematics::kPRF: {
94 Double_t k_star = TMath::Sqrt(x[0] * x[0] + x[1] * x[1] + x[2] * x[2]);
95 cf_free = 1.
96 + fQSMode
97 * TMath::Exp(-25.76578 * 4.0
98 * (x[0] * x[0] * params[RoutID()] * params[RoutID()]
99 + x[1] * x[1] * params[RsideID()] * params[RsideID()]
100 + x[2] * x[2] * params[RlongID()] * params[RlongID()])); // x4 cause PRF
101 kq = fCFs->Eval(k_star, params[RCoul()]);
102 } break;
103 default: break;
104 }
105 if (kq < 0 || TMath::IsNaN(kq)) kq = 0;
106 return params[NormID()] * (1.0 - params[LambdaID()] + params[LambdaID()] * kq * cf_free);
107 }
108
109 CorrFit3DCFBowlerSinyukovClassic::CorrFit3DCFBowlerSinyukovClassic() : CorrFit3DCFBowlerSinyukov(1) {
110 SetParameterName(6, "R_{coul}");
111 FixParameter(RCoul(), 4);
112 }
113
114 CorrFit3DCFBowlerSinyukovClassic::~CorrFit3DCFBowlerSinyukovClassic() {}
115} // namespace Hal
virtual Double_t CalculateCF(const Double_t *x, const Double_t *params) const
Double_t GetRinv(Double_t xout, Double_t xside, Double_t xlong, Double_t kout, Double_t kside, Double_t klong) const
virtual Double_t CalculateCF(const Double_t *x, const Double_t *params) const
Int_t RsideID() const
Int_t LambdaID() const
Int_t RoutID() const
Int_t RlongID() const
Int_t NormID() const
void FixParameter(Int_t par, Double_t val)
Definition CorrFit.cxx:106
void SetParameterName(Int_t par, TString name)
Definition CorrFit.cxx:110
Double_t Eval(Double_t x, Double_t y) const
Definition Splines.cxx:327
Double_t Eval(Double_t x, Double_t y, Double_t z) const
Definition Splines.cxx:645