11#ifndef FPGATrackSimFUNCTIONS_H
12#define FPGATrackSimFUNCTIONS_H
18#include <TObjString.h>
19#include <TTreeReader.h>
20#include <TTreeReaderValue.h>
44 std::vector<uint32_t> out;
45 uint32_t setbit = 0x1;
46 while (setbit != 0 &&
x != 0)
48 if (
x & 1) out.push_back(setbit);
63 if (
x & 1)
return bit;
72inline unsigned divUp(
unsigned x,
unsigned y)
75 return 1 + ((
x - 1) /
y);
82 return num ^ (num >> 1);
88 num = num ^ (num >> 16);
89 num = num ^ (num >> 8);
90 num = num ^ (num >> 4);
91 num = num ^ (num >> 2);
92 num = num ^ (num >> 1);
108std::vector<std::vector<int>>
getComboIndices(std::vector<size_t>
const & sizes);
122double rms95(TH1
const *
h);
std::vector< std::vector< int > > getComboIndices(std::vector< size_t > const &sizes)
Given a vector of sizes (of arrays), generates a vector of all combinations of indices to index one e...
double rms95(TH1 const *h)
This function is used to calculate RMS95 value for 1D histograms.
std::vector< float > computeIdealCoords(const FPGATrackSimHit &hit, const double hough_x, const double hough_y, const double target_r, const bool doDeltaGPhis, const TrackCorrType trackCorrType)
unsigned divUp(unsigned x, unsigned y)
uint32_t grayToBinary32(uint32_t num)
uint32_t binaryToGray(uint32_t num)
int firstSetBit32(uint32_t x)
double fieldCorrection(unsigned region, double qoverpt, double r)
std::vector< uint32_t > splitSetBits32(uint32_t x)
: FPGATrackSim-specific class to represent an hit in the detector.
Header file for AthHistogramAlgorithm.