Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
FemtoWeightGeneratorDummy.cxx
1/*
2 * FemtoWeightGeneratorDummy.cxx
3 *
4 * Created on: 8 lip 2024
5 * Author: daniel
6 */
7
8#include "FemtoWeightGeneratorDummy.h"
9
10#include <RtypesCore.h>
11#include <TComplex.h>
12#include <TMath.h>
13#include <complex>
14#include <iostream>
15
16#include "Const.h"
17#include "FemtoConst.h"
18#include "Std.h"
19
20namespace Hal {
21
22 FemtoWeightGeneratorK0K0::FemtoWeightGeneratorK0K0() {}
23
26
27
28 const Double_t mK2 = Const::KaonZeroMass() * Const::KaonZeroMass();
29 const Double_t mpi2 = Const::PionPlusMass() * Const::PionPlusMass();
30 const Double_t meta2 = 0.547862 * 0.547862;
31 const Double_t ak2 = fKStar * fKStar;
32 Double_t s = 4. * (ak2 + mK2);
33 Double_t U = TMath::Sqrt(s);
34 Double_t k1prim = TMath::Sqrt(fKStar * fKStar + mK2 - mpi2);
35 Double_t e = TMath::Sqrt(ak2 + mK2) * 2.0;
36 Double_t k3prim =
37 TMath::Sqrt(mpi2 * mpi2 - 2.0 * mpi2 * meta2 - 2.0 * e * e * mpi2 + meta2 * meta2 - 2.0 * e * e * meta2 + e * e * e * e)
38 / (2.0 * e);
39
40 Double_t k2prim = TMath::Sqrt(mpi2 * mpi2 + meta2 * meta2 + s * s - 2.0 * (mpi2 * meta2 + mpi2 * s + meta2 * s)) / (2.0 * U);
41
42 TComplex num1(fMf0 * fMf0 - s, -fGamma_f0KK * fKStar - fGamma_f0pipi * k1prim);
43 TComplex num2(fMa0 * fMa0 - s, -fGamma_a0KK * fKStar - fGamma_a0pieta * k2prim);
44
45 TComplex f_1(fGamma_f0KK, 0);
46 TComplex f_2(fGamma_a0KK, 0);
47 f_1 = f_1 / num1;
48 f_2 = f_2 / num2;
49 TComplex fk = 0.5 * (f_1 + f_2);
50 Double_t tRSS = Hal::Femto::FmToGeV(fRStarSide);
51 Double_t tROS = Hal::Femto::FmToGeV(fRStarOut);
52 Double_t tRLS = Hal::Femto::FmToGeV(fRStarLong);
53 Double_t krvec = fKStarOut * tROS + fKStarSide * tRSS + fKStarLong * tRLS;
54 TComplex ikrPlus(0, -krvec);
55 TComplex ikrScalarPlus(0, TMath::Abs(fKStar * Hal::Femto::FmToGeV(fRStar)));
56 TComplex rescattered1 = TComplex::Exp(ikrScalarPlus) / TMath::Abs(Hal::Femto::FmToGeV(fRStar));
57 TComplex rescattered2 = TComplex::Exp(TComplex::Conjugate(ikrScalarPlus)) / TMath::Abs(Hal::Femto::FmToGeV(fRStar));
58 TComplex psiK0K0bar = TComplex::Exp(ikrPlus) + fAssymetry * fk * rescattered1;
59 TComplex psiK0K0bar2 = TComplex::Exp(-ikrPlus) + fAssymetry * fk * rescattered2;
60
61
62 Double_t psiK0K0 = (psiK0K0bar + psiK0K0bar2) * (psiK0K0bar + psiK0K0bar2) * 0.5; // 0.5 - normalization
63 /* Double_t quantum = 1.0 + TMath::Cos(2.0 * (fKStarOut * tROS + fKStarSide * tRSS + fKStarLong * tRLS));
64
65 double fr = fk.Re() / (fk.Re() * fk.Re() + fk.Im() * fk.Im());
66 double fi = -fk.Im() / (fk.Im() * fk.Re() + fk.Im() * fk.Im());
67 double kstar = fKStar;
68 double rstar = Femto::FmToGeV(fRStar);
69
70 dr = 0.5 * fD0s.re * kstar * kstar;
71
72 double ir = fr + dr;
73 double ii = fi - kstar;
74
75 double ar = ir / (ir * ir + ii * ii);
76 double ai = -ii / (ir * ir + ii * ii);
77
78 double srk = sin(kstar * rstar);
79 double crk = cos(kstar * rstar);
80
81 double sgrp = (ar * crk - ai * srk) / rstar;
82 double sgip = (ai * crk + ar * srk) / rstar;
83
84 double srm = sin(kstar * rstar);
85 double crm = cos(kstar * rstar);
86
87 double sgrm = (ar * crm - ai * srm) / rstar;
88 double sgim = (ai * crm + ar * srm) / rstar;
89
90 double skr = sin(krvec);
91 double ckr = cos(krvec);
92
93 double skm = sin(-krvec);
94 double ckm = cos(-krvec);
95
96 double snr = ckr + sgrp + ckm + sgrm;
97 double sni = skr + sgip + skm + sgim;
98
99 double singlet = 0.5 * (snr * snr + sni * sni);
100
101
102 // return (0.25 * ((ckr+sr)*(ckr+sr) + (skr+si)*(skr+si)) +
103 // 0.75 * ((ckr+tr)*(ckr+tr) + (skr+ti)*(skr+ti)));
104
105 // std::cout << "sng tri full " << singlet << " "<< triplet << " " << (0.25 * singlet + 0.75 * triplet) << std::endl;
106
107 return 0.25 * singlet;*/
108 return psiK0K0; // * 0.5 + quantum * 0.5;
109 ;
110 }
111
112 void FemtoWeightGeneratorK0K0::SetDefParams(Int_t opt) {
113 Double_t params[5][6] = {{0.978, 0.792, 0.199, 0.974, 0.333, 0.222},
114 {0.973, 2.763, 0.5283, 0.985, 0.4038, 0.3711},
115 {0.996, 1.305, 0.2684, 0.992, 0.5555, 0.4401},
116 {0.996, 1.305, 0.2684, 1.003, 0.8365, 0.4580},
117 {}};
118 for (int i = 0; i < 6; i++) {
119 Double_t val = 0;
120 for (int j = 0; j < 4; j++)
121 val += params[j][i];
122 params[4][i] = val / 4.0;
123 }
124
125 if (opt > 4) opt = 4;
126 fMf0 = params[opt][0];
127 fGamma_f0KK = params[opt][1];
128 fGamma_f0pipi = params[opt][2];
129 fMa0 = params[opt][3];
130 fGamma_a0KK = params[opt][4];
131 fGamma_a0pieta = params[opt][5];
132 fAssymetry = 0.5;
133 }
134
135} /* namespace Hal */
virtual Double_t GenerateWeight(FemtoPair *pair)
void CalculateKinematics(FemtoPair *pair)