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);
153 int hitNumberToUse =
nHits;
154 if (hitNumberToUse < 2)
156 if (hitNumberToUse > 32)
169 int indexOfTheHitogramInTheList = ((9 - min_idx) * min_idx) / 2 + max_idx;
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);
std::string fullPath() const
double unpack16log(int16_t i, double lmin, double lmax, uint16_t base=32768)
static float float16to32(uint16_t h)
void swap(Association< C > &lhs, Association< C > &rhs)
U second(std::pair< T, U > const &p)
std::vector< float > params
float unpack(uint16_t packed, float ref=0.) const
float meanValue(int i, int j, int sign, float pt, float eta, int nHits, int pixelHits, float cii=1., float cjj=1.) const
static uint16_t float32to16(float x)
float unpack(uint16_t packed, int schema, int i, int j, float pt, float eta, int nHits, int pixelHits, float cii=1., float cjj=1.) const
Abs< T >::type abs(const T &t)
key
prepare the HTCondor submission files and eventually submit them
uint16_t pack(float value, float ref=0.) const
float pack(float value, int schema, int i, int j, float pt, float eta, int nHits, int pixelHits, float cii=1., float cjj=1.) const
std::vector< TH3D * > cov_elements_pixelHit
void addTheHistogram(std::vector< TH3D *> *HistoVector, std::string StringToAddInTheName, int i, int j, TFile &fileToRead)
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t nHits
std::unordered_map< uint16_t, CompressionSchema > schemas
int16_t pack16log(double x, double lmin, double lmax, uint16_t base=32768)
static float reduceMantissaToNbits(const float &f)
std::vector< TH3D * > cov_elements_noPixelHit