Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
StdMath.h
1/*
2 * Hal::StdMath.h
3 *
4 * Created on: 30-04-2022
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9#ifndef HALSTDMATH_H_
10#define HALSTDMATH_H_
11
12#include <TMath.h>
13#include <TMatrixD.h>
14#include <TVector3.h>
15#include <vector>
16
17class TH1;
18class TH2;
19namespace Hal {
20 namespace Std {
33 void FitParabola(Double_t x1,
34 Double_t x2,
35 Double_t x3,
36 Double_t y1,
37 Double_t y2,
38 Double_t y3,
39 Double_t& a,
40 Double_t& b,
41 Double_t& c);
53 Int_t SolveParabola(Double_t a, Double_t b, Double_t c, Double_t& x1, Double_t& x2);
64 Int_t Bin3dToBin1d(Int_t nbinsX, Int_t nBinsY, Int_t binX, Int_t binY, Int_t binZ, Bool_t root_number = kTRUE);
71 TMatrixD GetVec(const TH1& h, Bool_t horizontal = kFALSE);
78 TMatrixD GetMatrix(const TH2& h, Bool_t swaprow = kFALSE);
89 TVector3 Bin1dToBin3d(Int_t nbinsX, Int_t nBinsY, Int_t bin, Bool_t root_number = kTRUE);
99 Double_t Discretize(Int_t areas, Double_t min, Double_t max, Double_t val, Char_t type);
109 Double_t StatError2Var(Char_t ope, Double_t x, Double_t y, Double_t dx = -1, Double_t dy = -1);
117 Int_t MultiToOneDimIndex(const std::vector<int>& size, const std::vector<int>& position);
124 std::vector<int> OneToMultiDimIndex(const std::vector<int>& size, Int_t n);
131 std::pair<Int_t, Int_t> Division(Int_t num, Int_t div);
132 } // namespace Std
133} // namespace Hal
134#endif /* HAL_FEATURES_STD_HALSTDMATH_H_ */