38 void CorrFitKisiel::Check() {
40 if (fMaps.size() == 0) { Cout::PrintInfo(
"No maps loaded ", EInfo::kCriticalError); }
41 if (IsParFixed(RadiusID())) {
42 Cout::Text(Form(
"Radius fixed at %4.3f", GetRadius()));
44 Cout::Text(Form(
"Radius between %4.3f and %4.3f", fParameters[RadiusID()].GetMin(), fParameters[RadiusID()].GetMax()));
46 for (
unsigned int i = 0; i < fMaps.size(); i++) {
50 Double_t kstarMin = fDenominatorHistogram->GetXaxis()->GetBinLowEdge(1);
51 Double_t kstarMax = fDenominatorHistogram->GetXaxis()->GetBinUpEdge(fDenominatorHistogram->GetNbinsX());
52 Double_t kstarBins = fDenominatorHistogram->GetNbinsX();
53 Double_t rMin = fParameters[RadiusID()].GetMin();
54 Double_t rMax = fParameters[RadiusID()].GetMax();
55 if (fKinematics == Femto::EKinematics::kLCMS) {
59 Double_t kstarDx = (kstarMax - kstarMin) / kstarBins;
61 Cout::SetLineLenght(150);
62 Cout::Text(
"CorrFitKisiel::Check test",
"M", kWhite);
63 Cout::Database({
"ID",
"Rmin",
"Rmax",
"Rstep",
"KStarMin",
"KstarMax",
"KstarStep"});
64 Cout::Database({
"Req.",
68 Form(
"%4.3f", kstarMin),
69 Form(
"%4.3f", kstarMax),
70 Form(
"%4.3f", kstarDx)});
72 auto colEn = [](Color_t Color) {
75 std::cout <<
"\e[0;31m" << std::endl;
76 }
else if (Color == kGreen) {
77 std::cout <<
"\e[0;32m" << std::endl;
83 for (
unsigned int i = 0; i < fMaps.size(); i++) {
84 fMaps[i]->SetFrameScale(fKinematics);
85 Double_t R_min = fMaps[i]->GetRmin();
86 Double_t R_max = fMaps[i]->GetRmax();
87 fParameters[RadiusID()].SetMapMin(R_min);
88 fParameters[RadiusID()].SetMapMax(R_max);
89 Int_t R_bins = fMaps[i]->GetNRbins();
90 Double_t Kmin = fMaps[i]->GetKstarMin();
91 Double_t Kmax = fMaps[i]->GetKstarMax();
92 Double_t Kbins = fMaps[i]->GetNKstrbins();
93 if (fMaps[i]->GetFrame() == Femto::EKinematics::kLCMS) {
98 if (R_min > rMin) good = kFALSE;
99 if (R_max < rMax) good = kFALSE;
100 if (Kmin > kstarMin) good = kFALSE;
101 if (Kmax < kstarMax) good = kFALSE;
107 TString
id = Form(
"%i", i);
108 TString txtRmin = Form(
"%4.3f", R_min);
109 TString txtRmax = Form(
"%4.3f", R_max);
110 TString txtRstep = Form(
"%4.3f", (R_max - R_min) / R_bins);
111 TString txtKstarmin = Form(
"%4.3f", Kmin);
112 TString txtKstarmax = Form(
"%4.3f", Kmax);
113 TString txtKstardelta = Form(
"%4.3f", (Kmax - Kmin) / Kbins);
114 Cout::Database({id, txtRmin, txtRmax, txtRstep, txtKstarmin, txtKstarmax, txtKstardelta});
117 std::cout <<
"\e[0;0m" << std::endl;
119 Cout::SetLineLenght(100);
122 Double_t CorrFitKisiel::CalculateCF(
const Double_t* x,
const Double_t* params)
const {
123 Double_t r = params[RadiusID()];
124 Double_t l = params[LambdaID()];
125 Double_t n = params[NormID()];
126 Double_t cf = fMaps[0]->Eval(x[0], r);
127 return n * ((cf - 1.0) * l + 1);