92 void StoreHits(
THitI nhits,
107 void BuildBins(
float yMin,
129 void AllocateMemory(
int NThreads);
131 Create(
float yMin,
float yMax,
float zMin,
float zMax,
float sy,
float sz);
137 int GetBin(
float Y,
float Z)
const;
139 unsigned int GetBinBounded(
const float& Y,
const float& Z)
const;
140 void GetBinBounded(
const float& Y,
143 unsigned short& bZ)
const;
146 int GetBin(
float Y,
float Z,
float T)
const;
152 void GetBinBounds(
unsigned int iBin,
158 GetBinBounded(
const float& Y,
const float& Z,
const float& T)
const;
159 void GetBinBounded(
const float& Y,
164 unsigned short& bT)
const;
165 void GetBinBounds(
unsigned int iBin,
173 unsigned int N()
const {
return fN; }
174 unsigned short Ny()
const {
return fNy; }
175 unsigned short Nz()
const {
return fNz; }
176 unsigned short Nt()
const {
return fNt; }
180 return fFirstHitInBin[
i];
182 return fFirstHitInBin[fN + 1];
194 void UpdateIterGrid(
unsigned int Nelements,
196 vector<THitI>* indicesBuf,
198 vector<L1StsHit>* hits2,
199 vector<L1HitPoint>* pointsBuf,
204 const vector<unsigned char>* vSFlag,
205 const vector<unsigned char>* vSFlagB);
270 const int& yBin =
static_cast<int>(Y * fStepYInv - fYMinOverStep);
271 const int& zBin =
static_cast<int>(Z * fStepZInv - fZMinOverStep);
274 assert(yBin <
static_cast<int>(fNy));
275 assert(zBin <
static_cast<int>(fNz));
276 const int& bin = zBin * fNy + yBin;
282 const int& yBin =
static_cast<int>(Y * fStepYInv - fYMinOverStep);
283 const int& zBin =
static_cast<int>(Z * fStepZInv - fZMinOverStep);
284 const int& tBin =
static_cast<int>(T * fStepTInv - fTMinOverStep);
288 assert(yBin <
static_cast<int>(fNy));
289 assert(zBin <
static_cast<int>(fNz));
290 assert(tBin <
static_cast<int>(fNt));
291 const int& bin = zBin * fNy + yBin + tBin * (fNy * fNz);
301 int zBin = iBin / fNy;
302 int yBin = iBin % fNy;
303 Ymin = (fYMinOverStep + yBin) / fStepYInv;
304 Zmin = (fZMinOverStep + zBin) / fStepZInv;
305 Ymax = Ymin + 1. / fStepYInv;
306 Zmax = Zmin + 1. / fStepZInv;
316 int zBin = (iBin % (fNy * fNz)) / fNy;
317 int yBin = (iBin % (fNy * fNz)) % fNy;
318 int tBin = (iBin / (fNy * fNz));
319 Ymin = (fYMinOverStep + yBin) / fStepYInv;
320 Zmin = (fZMinOverStep + zBin) / fStepZInv;
321 Tmin = (fTMinOverStep + tBin) / fStepTInv;
322 Ymax = Ymin + 1. / fStepYInv;
323 Zmax = Zmin + 1. / fStepZInv;
324 Tmax = Tmin + 1. / fStepTInv;
329 const float& Z)
const {
332 unsigned short yBin, zBin;
333 GetBinBounded(Y, Z, yBin, zBin);
334 return (
unsigned int) zBin * (
unsigned int) fNy + (
unsigned int) yBin;
341 unsigned short yBin, zBin, tBin;
342 GetBinBounded(Y, Z, T, yBin, zBin, tBin);
343 return (
unsigned int) zBin * (
unsigned int) fNy + (
unsigned int) yBin
344 + tBin * ((
unsigned int) fNy * (
unsigned int) fNz);
350 unsigned short& bZ)
const {
351 const short& yBin = (Y * fStepYInv - fYMinOverStep);
352 const short& zBin = (Z * fStepZInv - fZMinOverStep);
354 bY =
max(
short(0),
min(
short(fNy - 1), yBin));
355 bZ =
max(
short(0),
min(
short(fNz - 1), zBin));
363 unsigned short& bT)
const {
364 const short& yBin = (Y * fStepYInv - fYMinOverStep);
365 const short& zBin = (Z * fStepZInv - fZMinOverStep);
366 const short& tBin = (T * fStepTInv - fTMinOverStep);
371 bY =
max(
short(0),
min(
short(fNy - 1), yBin));
372 bZ =
max(
short(0),
min(
short(fNz - 1), zBin));
373 bT =
max(
short(0),
min(
short(fNt - 1), tBin));