Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
CorrFitConst.cxx
1/*
2 * CorrFitConst.cxx
3 *
4 * Created on: 4 sty 2024
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9#include "CorrFitConst.h"
10
11#include "CorrFitVerticalSlices.h"
12#include "Femto1DCF.h"
13#include "Femto3DCF.h"
14#include "FemtoSHCF.h"
15
16#include <iostream>
17
18namespace Hal {
19 namespace Femto {
20 Int_t GetNSlices(TObject* obj) {
21 auto cfType = Hal::Femto::GetCFType(obj);
22 switch (cfType) {
23 case ECFType::kOneDim: {
24 auto cf = (Hal::Femto1DCF*) obj;
25 return cf->GetNum()->GetNbinsX();
26 } break;
27 case ECFType::kThreeDim: {
28 auto cf = (Hal::Femto3DCF*) obj;
29 return cf->GetNum()->GetNbinsX();
30 } break;
31 case ECFType::kSpherical: {
32 auto cf = (Hal::FemtoSHCF*) obj;
33 return cf->GetNum()->GetNbinsX();
34 } break;
35 }
36 return -1;
37 }
38
39 CorrFitVerticalSlices* MakeSlice(const Hal::DividedHisto1D& h, Int_t nParams) {
40 if (dynamic_cast<const Hal::FemtoSHCF*>(&h)) {
41 return new Hal::CorrFitVerticalSlicesSH(dynamic_cast<const Hal::FemtoSHCF&>(h), nParams);
42 }
43 if (dynamic_cast<const Hal::Femto1DCF*>(&h)) {
44 return new Hal::CorrFitVerticalSlices1D(dynamic_cast<const Hal::Femto1DCF&>(h), nParams);
45 }
46 if (dynamic_cast<const Hal::Femto3DCF*>(&h)) {
47 return new Hal::CorrFitVerticalSlices3D(dynamic_cast<const Hal::Femto3DCF&>(h), nParams);
48 }
49 return nullptr;
50 }
51
52 void MergeVertical(Hal::Femto::ECFType cfType, TObject* obj, Array_1<Float_t>* input, Array_1<Float_t>* output, Int_t pos) {
53 /* switch (cfType) { KURWA
54 case ECFType::kOneDim: {
55 auto cf = (Hal::Femto1DCF*) obj;
56 cf->ImportSlice(input, pos);
57 if (pos == cf->GetNum()->GetNbinsX()) { cf->ExportIntoToFlatNum(output); }
58 } break;
59 case ECFType::kThreeDim: {
60 auto cf = (Hal::Femto3DCF*) obj;
61 cf->ImportSlice(input, pos);
62 if (pos == cf->GetNum()->GetNbinsX()) { cf->ExportIntoToFlatNum(output); }
63 } break;
64 case ECFType::kSpherical: {
65 auto cf = (Hal::FemtoSHCF*) obj;
66 // this is only temporary for valyria
67 cf->ImportSlice(input, pos);
68 int maxL = cf->GetLMax();
69 int maxJM = (maxL + 1) * (maxL + 1);
70 // cf->ExportIntoToFlatNumValkyria(output);
71
72 // cf->ImportSlice(input, pos);
73 if (pos == cf->GetNum()->GetNbinsX()) {
74 cf->RecalculateCF();
75 cf->ExportIntoToFlatNum(output);
76 }
77
78 } break;
79 }*/
80 }
81 } // namespace Femto
82} // namespace Hal