// SPDX-License-Identifier: LGPL-3.0-or-other // Copyright (C) 2021 Contributors to the SLS Detector Package #ifndef ETA_INTERPOLATION_GLOBAL_H #define ETA_INTERPOLATION_GLOBAL_H #include "etaInterpolationBase.h" class etaInterpolationGlobal : public etaInterpolationBase { public: globalEtaInterpolation(int nx = 400, int ny = 400, int ns = 25, int nb = -1, double emin = 1, double emax = 0) : etaInterpolationBase(nx, ny, ns, nb, emin, emax){}; virtual void prepareInterpolation(int &ok) { ok = 1; ///*Eta Distribution Rebinning*/// double bsize = 1. / nSubPixels; // precision // cout<<"nPixelsX = "< (ib + 1) * tot_eta * bsize) ib++; for (int iby = 0; iby < nbeta; iby++) { #ifdef MYROOT1 hhx->SetBinContent(ibx + 1, iby + 1, ib); #endif #ifndef MYROOT1 hhx[ibx + iby * nbeta] = ib; #endif } } ib = 0; for (int iby = 0; iby < nbeta; iby++) { if (hiy[iby] > (ib + 1) * tot_eta * bsize) ib++; for (int ibx = 0; ibx < nbeta; ibx++) { #ifdef MYROOT1 hhy->SetBinContent(ibx + 1, iby + 1, ib); #endif #ifndef MYROOT1 hhy[ibx + iby * nbeta] = ib; #endif } } return; }; }; #endif