Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
CorrFitVerticalSlices.h
1/*
2 * CorrFitSlices.h
3 *
4 * Created on: 2 wrz 2022
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9#ifndef HAL_ANALYSIS_FEMTO_CORRFIT_MAPGENERATOR_MULTIDIM_CORRFITVERTICALSLICES_H_
10#define HAL_ANALYSIS_FEMTO_CORRFIT_MAPGENERATOR_MULTIDIM_CORRFITVERTICALSLICES_H_
11
12#include <TObject.h>
13#include <vector>
14
15#include "FemtoYlmIndexes.h"
16#include "FemtoYlmMath.h"
17
18namespace Hal {
19 class FemtoPair;
20 class FemtoSHCF;
21 class Femto1DCF;
22 class Femto3DCF;
23 class DividedHisto1D;
24 class CorrFitVerticalSlices : public TObject {
25 protected:
26 public:
28 virtual void FillNum(Int_t bin, FemtoPair* pair) = 0;
29 virtual void FillDen(Int_t bin, FemtoPair* pair) = 0;
30 virtual ~CorrFitVerticalSlices() {};
31 ClassDef(CorrFitVerticalSlices, 1)
32 };
33
36 std::vector<Double_t> fNum;
37 std::vector<Double_t> fDen;
38
39 public:
40 CorrFitVerticalSlices1D() {}; // only for root
41 CorrFitVerticalSlices1D(const Hal::Femto1DCF& h, Int_t nSamples);
42 void FillNum(Int_t bin, FemtoPair* pair);
43 void FillDen(Int_t bin, FemtoPair* pair);
44 void FillDirectNum(Int_t bin, Double_t val) { fNum[bin] += val; }
45 void FillDirectDen(Int_t bin, Double_t val) { fDen[bin] += val; }
46 virtual ~CorrFitVerticalSlices1D() {};
47 ClassDef(CorrFitVerticalSlices1D, 1)
48 };
49
52 std::vector<std::vector<std::vector<Double_t>>> fNum;
53 std::vector<std::vector<std::vector<Double_t>>> fDen;
54 Int_t fOutBins = {0};
55 Int_t fSideBins = {0};
56 Double_t fMin[2] = {0, 0};
57 Double_t fOverStep[2] = {0, 0};
58
59 public:
60 CorrFitVerticalSlices3D() {}; // only for root
61 CorrFitVerticalSlices3D(const Hal::Femto3DCF& h, Int_t nSamples);
62 std::pair<int, int> FindBin(FemtoPair* pair);
63 void FillNum(Int_t bin, FemtoPair* pair);
64 void FillDen(Int_t bin, FemtoPair* pair);
71 void FillNumDirect(Int_t bin, std::pair<int, int> coord, Double_t w) { fNum[bin][coord.first][coord.second] += w; }
72 void FillDenDirect(Int_t bin, std::pair<int, int> coord, Double_t w) { fDen[bin][coord.first][coord.second] += w; }
73 virtual ~CorrFitVerticalSlices3D() {};
74 ClassDef(CorrFitVerticalSlices3D, 1)
75 };
76
79 FemtoYlmIndexes fLmVals;
80 FemtoYlmMath fLmMath;
81
82 public:
83 const Int_t fMaxJM;
84 std::vector<Double_t> fNum;
85 std::vector<Double_t> fDen;
86 std::vector<std::vector<Double_t>> fShNumReal;
87 std::vector<std::vector<Double_t>> fShDenReal;
88 std::vector<std::vector<Double_t>> fShNumImag;
89 std::vector<std::vector<Double_t>> fShDenImag;
90 std::vector<std::vector<Double_t>> fShNumRealE;
91 std::vector<std::vector<Double_t>> fShDenRealE;
92 std::vector<std::vector<Double_t>> fShNumImagE;
93 std::vector<std::vector<Double_t>> fShDenImagE;
94 std::vector<std::vector<std::vector<Double_t>>> fCovMatrix;
95
96 public:
97 CorrFitVerticalSlicesSH() : fMaxJM(3) {}; // only for root
98 Int_t GetMaxL() const { return fLmVals.GetMaxL(); }
99 CorrFitVerticalSlicesSH(const Hal::FemtoSHCF& h, Int_t nSamples);
100 void FillNum(Int_t bin, FemtoPair* pair);
101 void FillDen(Int_t bin, FemtoPair* pair);
102 std::complex<double>* GetBufferCalc(FemtoPair* pair);
103 void FillNumBuffer(std::complex<double>* shCoord, Double_t weight, Int_t paramBin);
104 void FillDenBuffer(std::complex<double>* shCoord, Double_t weight, Int_t paramBin);
105 void FillNumBuffer10(std::complex<double>* shCoord, std::vector<Double_t>& weight, Int_t paramBin);
106 void FillDenBuffer10(std::complex<double>* shCoord, std::vector<Double_t>& weight, Int_t paramBin);
107 const std::vector<Double_t>& GetNumReal(Int_t bin) const { return fShNumReal[bin]; };
108 const std::vector<Double_t>& GetNumImag(Int_t bin) const { return fShNumImag[bin]; };
109 const std::vector<Double_t>& GetDenReal(Int_t bin) const { return fShDenReal[bin]; };
110 const std::vector<Double_t>& GetDenImag(Int_t bin) const { return fShDenImag[bin]; };
111 void SetNumReal(Int_t parLoc, Int_t lmbin, Double_t re, Double_t im) {
112 fShNumReal[parLoc][lmbin] = re;
113 fShNumImag[parLoc][lmbin] = im;
114 }
115 virtual ~CorrFitVerticalSlicesSH() {};
116 ClassDef(CorrFitVerticalSlicesSH, 1)
117
118 virtual void Print(Option_t* option) const;
119 };
120} /* namespace Hal */
121
122#endif /* HAL_ANALYSIS_FEMTO_CORRFIT_MAPGENERATOR_MULTIDIM_CORRFITVERTICALSLICES_H_ */
void FillNumDirect(Int_t bin, std::pair< int, int > coord, Double_t w)