// 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; #ifdef MYROOT1 if (hhx) delete hhx; if (hhy) delete hhy; hhx=new TH2D("hhx","hhx",heta->GetNbinsX(),heta->GetXaxis()->GetXmin(),heta->GetXaxis()->GetXmax(), heta->GetNbinsY(),heta->GetYaxis()->GetXmin(),heta->GetYaxis()->GetXmax()); hhy=new TH2D("hhy","hhy",heta->GetNbinsX(),heta->GetXaxis()->GetXmin(),heta->GetXaxis()->GetXmax(), heta->GetNbinsY(),heta->GetYaxis()->GetXmin(),heta->GetYaxis()->GetXmax()); #endif ///*Eta Distribution Rebinning*/// double bsize=1./nSubPixels; //precision // cout<<"nPixelsX = "<(ib+1)*tot_eta*bsize) ib++; for (int iby=0; ibySetBinContent(ibx+1,iby+1,ib); #endif #ifndef MYROOT1 hhx[ibx+iby*nbeta]=ib; #endif } } ib=0; for (int iby=0; iby(ib+1)*tot_eta*bsize) ib++; for (int ibx=0; ibxSetBinContent(ibx+1,iby+1,ib); #endif #ifndef MYROOT1 hhy[ibx+iby*nbeta]=ib; #endif } } return ; }; }; #endif