13#define Draw_2D_option "colz"
14#define Draw_3D_option "box2"
15#define HAL_PHYSICALANALYSYS_VER "jun2024"
20 enum class EInfo { kDebugInfo = 0, kInfo = 1, kLowWarning = 2, kWarning = 3, kError = 4, kCriticalError = 5 };
21 enum class EFormatType { kSim = 0, kReco = 1, kComplexReco = 2, kComplexSim = 3 };
23 enum class ERound { kSeparator, kPrefix };
24 enum class ECutUpdate { kNo = -1, kEvent = 0, kTrack = 1, kTwoTrack = 2, kTwoTrackBackground = 3 };
26 enum class EFormatDepth { kAll, kBuffered, kNonBuffered };
37 typedef std::complex<double> DComplex;
43 TString UpdateEnumToString(Hal::ECutUpdate upd);
50 void CopyFiles(TString from, TString to, Bool_t hidden = kFALSE);
58 std::vector<T> GetVector(
const std::initializer_list<T>& list) {
74 std::vector<TString> GetListOfFiles(TString path, TString extension, Bool_t fullPath = kFALSE, Int_t depth = 0);
91 TString GetUniqueName(TString name);
103 TString GetHalrootPlus();
109 TString GetConfigParameter(TString par_name);
120 std::vector<std::vector<TVirtualPad*>> GetGridPad(Int_t x_pads, Int_t y_pads, Float_t x_margin, Float_t y_margin);
126 Int_t VersionId(TString name);
132 Bool_t FileExists(TString path);
142 TVector3 CalcualteBoostVector(Double_t energy_per_nucleon, Int_t n_proj, Int_t p_proj, Int_t n_tar, Int_t p_tar);
149 void CompressArray(TClonesArray* array,
const CompressionMap& map);
153 Int_t GetJsRootVer();
161 void ResizeVector1D(std::vector<T>& vec,
int size) {
168 void ResizeVector2D(std::vector<std::vector<T>>& vec,
int sizeX,
int sizeY) {
182 void ResizeVector3D(std::vector<std::vector<std::vector<T>>>& vec,
int sizeX,
int sizeY,
int sizeZ) {
184 for (
auto& ela : vec) {
186 for (
auto& el : ela) {
198 unsigned int GetTotalSize(
const std::vector<std::vector<T>>& vec) {
199 unsigned int rowSize = vec.size();
200 unsigned int totSize = 0;
201 for (
auto& i : vec) {
202 totSize += rowSize * i.size();
213 unsigned int GetTotalSize(
const std::vector<std::vector<std::vector<T>>>& vec) {
214 unsigned int rowSize = vec.size();
215 unsigned int totSize = 0;
216 for (
auto& i : vec) {
217 totSize += rowSize * GetTotalSize(i);
227 void DeletePointerVector(std::vector<T*>& vec) {
228 for (
auto& i : vec) {