1 #ifndef __HiEvtPlaneFlatten__
2 #define __HiEvtPlaneFlatten__
75 if(centbin < 0 )
return -1;
78 if(vtx < minvtx_ || ivtx >=
nvtxbins_)
return -1;
80 if(cut<0 || cut>=
hbins_)
return -1;
87 if(centbin < 0 )
return -1;
90 if(ivtx < 0 || ivtx >
nvtxbins_)
return -1;
91 cut = nvtxbins_*ibin + ivtx ;
92 if(cut<0 || cut>
hbins_)
return -1;
96 void fill(
double psi,
double vtx,
int centbin)
98 if(fabs(psi)>4 )
return;
120 void fillPt(
double ptval,
double vtx,
int centbin)
125 pt2_[indx]+=ptval*ptval;
138 double caloCentRefVal_ = 0;
139 for(
int i = refmin;
i<=refmax;
i++) {
142 caloCentRefVal_/=refmax-refmin+1.;
145 if(indx < 0 || caloCentRefVal_ == 0 ||
getPtDB(indx)==0)
return 1.;
146 return caloCentRefVal_/
getPtDB(indx);
149 double getW(
double pt,
double vtx,
int centbin)
const
156 if(ptval>0)
return pt*scale-pt2val/ptval;
163 double correction = 0;
177 if ( indx >= 0 )
return s-
yoffDB_[indx];
184 if ( indx >= 0 )
return c-
xoffDB_[indx];
191 if((fabs(s)<1
e-4) && (fabs(c)<1
e-4)) psi = 0.;
236 while(ang<-range) { ang+=2*range; }
237 while(ang>range) {ang-=2*range; }
void init(int order, int nbins, std::string tag, int vord)
double getCentResErr25(unsigned int bin) const
double xoffDB_[MAXCUTOFF]
void fillOffset(double s, double c, uint m, double vtx, int centbin)
static const int MAXCUTOFF
double getPt2DB(unsigned int bin) const
void setCentRes1(unsigned int bin, double res, double err)
double bounds(double ang) const
void setXoffDB(unsigned int indx, double val)
double getPtDB(unsigned int bin) const
double getXYoffmult(unsigned int bin) const
void setXDB(unsigned int indx, double val)
double getXYoffcnt(unsigned int bin) const
double getPtcnt(unsigned int bin) const
double getCentResErr5(unsigned int bin) const
double getY(unsigned int bin) const
double getSoffset(double s, double vtx, int centbin) const
Sin< T >::type sin(const T &t)
double getOffsetPsi(double s, double c) const
double yoffDB_[MAXCUTOFF]
double getYoffDB(unsigned int bin) const
double getCentRes30(unsigned int bin) const
void setCaloCentRefBins(const int caloCentRefMinBin, const int caloCentRefMaxBin)
void setYDB(unsigned int indx, double val)
double getCentRes1(unsigned int bin) const
void setCentRes30(unsigned int bin, double res, double err)
double getCentResErr40(unsigned int bin) const
double getCnt(unsigned int bin) const
double getCentResErr30(unsigned int bin) const
std::map< std::string, int, std::less< std::string > > psi
void setCentRes5(unsigned int bin, double res, double err)
double getCentRes40(unsigned int bin) const
double getEtScale(double vtx, int centbin) const
void setCentRes25(unsigned int bin, double res, double err)
void setYoffDB(unsigned int indx, double val)
double getCentResErr1(unsigned int bin) const
double getCentResErr20(unsigned int bin) const
void setPt2DB(unsigned int indx, double val)
double getCentRes10(unsigned int bin) const
void setCentRes2(unsigned int bin, double res, double err)
int getOffsetIndx(int centbin, double vtx) const
double bounds2(double ang) const
void fill(double psi, double vtx, int centbin)
int getCutIndx(int centbin, double vtx, int iord) const
Cos< T >::type cos(const T &t)
double getPt2(unsigned int bin) const
double getCoffset(double c, double vtx, int centbin) const
uint xyoffmult_[MAXCUTOFF]
double getXoff(unsigned int bin) const
double getCentRes20(unsigned int bin) const
double getFlatPsi(double psi, double vtx, int centbin) const
double getYoff(unsigned int bin) const
void setCentRes40(unsigned int bin, double res, double err)
double getW(double pt, double vtx, int centbin) const
double getYDB(unsigned int bin) const
double getCentResErr2(unsigned int bin) const
double getCentRes5(unsigned int bin) const
double getCentRes25(unsigned int bin) const
double xyoffcnt_[MAXCUTOFF]
double getX(unsigned int bin) const
double getCentRes2(unsigned int bin) const
double getPt(unsigned int bin) const
void setCentRes20(unsigned int bin, double res, double err)
void setCentRes10(unsigned int bin, double res, double err)
void setPtDB(unsigned int indx, double val)
double getXoffDB(unsigned int bin) const
double getXDB(unsigned int bin) const
Power< A, B >::type pow(const A &a, const B &b)
void fillPt(double ptval, double vtx, int centbin)
double getCentResErr10(unsigned int bin) const