#ifndef ETA_INTERPOLATION_POSXY_H #define ETA_INTERPOLATION_POSXY_H //#include "tiffIO.h" #include "etaInterpolationBase.h" #include "eta2InterpolationBase.h" #include "eta3InterpolationBase.h" class etaInterpolationPosXY : public virtual etaInterpolationBase{ public: etaInterpolationPosXY(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){ // cout << "epxy " << nb << " " << emin << " " << emax << endl; cout << nbeta << " " << etamin << " " << etamax << endl; }; etaInterpolationPosXY(etaInterpolationPosXY *orig): etaInterpolationBase(orig) {}; virtual etaInterpolationPosXY* Clone()=0;/** { return new etaInterpolationPosXY(this); };*/ 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 = "<(ii+1)*tot_eta_x*bsize) { //ii++; // cout << ib << " x " << ibx << " " << tot_eta_x << " " << (ii)*tot_eta_x*bsize << " " << ii << endl; // } #ifdef MYROOT1 hhx->SetBinContent(ibx+1,ib+1,ii); #endif #ifndef MYROOT1 hhx[ibx+ib*nbeta]=hix[ibx]/((float)tot_eta_x);//ii; #endif } } /* if (ii!=(nSubPixels-1)) */ /* cout << ib << " x " << tot_eta_x << " " << (ii+1)*tot_eta_x*bsize << " " << ii << " " << hix[nbeta-1]<< endl; */ ii=0; for (int ibx=0; ibx(ii+1)*tot_eta_y*bsize) { //ii++; //cout << ib << " y " << ibx << " " << tot_eta_y << " "<< (ii)*tot_eta_y*bsize << " " << ii << endl; //} #ifdef MYROOT1 hhy->SetBinContent(ib+1,ibx+1,ii); #endif #ifndef MYROOT1 hhy[ib+ibx*nbeta]=hiy[ibx]/((float)tot_eta_y);//ii; #endif } } /* if (ii!=(nSubPixels-1)) */ /* cout << ib << " y " << tot_eta_y << " " << (ii+1)*tot_eta_y*bsize << " " << ii << " " << hiy[nbeta-1]<< endl; */ // cout << "y " << nbeta << " " << (ii+1)*tot_eta_x*bsize << " " << ii << endl; } #ifdef SAVE_ALL char tit[10000]; float *etah=new float[nbeta*nbeta]; int etabins=nbeta; for (int ii=0; ii