3 #include <fmt/printf.h>
5 #include <TParameter.h>
21 toCompress =
value / ref;
24 toCompress =
value - ref;
45 return *reinterpret_cast<uint16_t *>(&
r);
73 return unpacked * ref;
75 return unpacked + ref;
83 fmt::sprintf(
"DataFormats/PatCandidates/data/CovarianceParameterization_version%d.root",
version));
87 if (fileToRead.IsOpen()) {
90 TIter
next(((TDirectoryFile *)fileToRead.Get(
"schemas"))->GetListOfKeys());
92 while ((
key = (TKey *)
next())) {
93 TClass *
cl = gROOT->GetClass(
key->GetClassName());
94 if (!
cl->InheritsFrom(
"TDirectoryFile"))
97 uint16_t schemaN = std::stoi(schemaNumber);
100 for (
int i = 0;
i < 5;
i++) {
101 for (
int j =
i;
j < 5;
j++) {
106 std::vector<float> vParams;
107 TVector *
p = (TVector *)fileToRead.Get((
folder +
"/param").c_str());
108 vParams.reserve(
p->GetNoElements());
109 for (
int k = 0;
k <
p->GetNoElements();
k++) {
110 vParams.push_back((*
p)[
k]);
116 (
int)((TParameter<int> *)fileToRead.Get(bitString.c_str()))->GetVal(),
130 for (
int i = 0;
i < 5;
i++) {
131 for (
int j =
i;
j < 5;
j++) {
142 std::vector<TH3D *> *HistoVector,
std::string StringToAddInTheName,
int i,
int j, TFile &fileToRead) {
143 std::string List_covName[5] = {
"qoverp",
"lambda",
"phi",
"dxy",
"dsz"};
145 std::string histoNameString =
"covariance_" + List_covName[
i] +
"_" + List_covName[
j] + StringToAddInTheName +
147 TH3D *matrixElememtHistogramm = (TH3D *)fileToRead.Get(histoNameString.c_str());
148 HistoVector->push_back(matrixElememtHistogramm);
152 int i,
int j,
int sign,
float pt,
float eta,
int nHits,
int pixelHits,
float cii,
float cjj)
const {
153 int hitNumberToUse = nHits;
154 if (hitNumberToUse < 2)
156 if (hitNumberToUse > 32)
169 int indexOfTheHitogramInTheList = ((9 - min_idx) * min_idx) / 2 + max_idx;
181 float value,
int schema,
int i,
int j,
float pt,
float eta,
int nHits,
int pixelHits,
float cii,
float cjj)
const {
188 if (schema == 0 &&
i ==
j && (
i == 2 ||
i == 0))
189 ref = 1. / (
pt *
pt);
197 uint16_t packed,
int schema,
int i,
int j,
float pt,
float eta,
int nHits,
int pixelHits,
float cii,
float cjj)
205 if (schema == 0 &&
i ==
j && (
i == 2 ||
i == 0))
206 ref = 1. / (
pt *
pt);