CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Static Private Attributes
HiEvtPlaneFlatten Class Reference

#include <HiEvtPlaneFlatten.h>

Public Member Functions

double bounds (double ang) const
 
double bounds2 (double ang) const
 
void fill (double psi, double vtx, int centbin)
 
void fillOffset (double s, double c, uint m, double vtx, int centbin)
 
void fillPt (double ptval, double vtx, int centbin)
 
double getCentRes1 (unsigned int bin) const
 
double getCentRes10 (unsigned int bin) const
 
double getCentRes2 (unsigned int bin) const
 
double getCentRes20 (unsigned int bin) const
 
double getCentRes25 (unsigned int bin) const
 
double getCentRes30 (unsigned int bin) const
 
double getCentRes40 (unsigned int bin) const
 
double getCentRes5 (unsigned int bin) const
 
double getCentResErr1 (unsigned int bin) const
 
double getCentResErr10 (unsigned int bin) const
 
double getCentResErr2 (unsigned int bin) const
 
double getCentResErr20 (unsigned int bin) const
 
double getCentResErr25 (unsigned int bin) const
 
double getCentResErr30 (unsigned int bin) const
 
double getCentResErr40 (unsigned int bin) const
 
double getCentResErr5 (unsigned int bin) const
 
double getCnt (unsigned int bin) const
 
double getCoffset (double c, double vtx, int centbin) const
 
int getCutIndx (int centbin, double vtx, int iord) const
 
double getEtScale (double vtx, int centbin) const
 
double getFlatPsi (double psi, double vtx, int centbin) const
 
int getHBins () const
 
int getNcent () const
 
int getNvtx () const
 
int getOBins () const
 
int getOffsetIndx (int centbin, double vtx) const
 
double getOffsetPsi (double s, double c) const
 
double getPt (unsigned int bin) const
 
double getPt2 (unsigned int bin) const
 
double getPt2DB (unsigned int bin) const
 
double getPtcnt (unsigned int bin) const
 
double getPtDB (unsigned int bin) const
 
double getSoffset (double s, double vtx, int centbin) const
 
double getVtxMax () const
 
double getVtxMin () const
 
double getW (double pt, double vtx, int centbin) const
 
double getX (unsigned int bin) const
 
double getXDB (unsigned int bin) const
 
double getXoff (unsigned int bin) const
 
double getXoffDB (unsigned int bin) const
 
double getXYoffcnt (unsigned int bin) const
 
double getXYoffmult (unsigned int bin) const
 
double getY (unsigned int bin) const
 
double getYDB (unsigned int bin) const
 
double getYoff (unsigned int bin) const
 
double getYoffDB (unsigned int bin) const
 
 HiEvtPlaneFlatten ()
 
void init (int order, int nbins, std::string tag, int vord)
 
void setCaloCentRefBins (const int caloCentRefMinBin, const int caloCentRefMaxBin)
 
void setCentRes1 (unsigned int bin, double res, double err)
 
void setCentRes10 (unsigned int bin, double res, double err)
 
void setCentRes2 (unsigned int bin, double res, double err)
 
void setCentRes20 (unsigned int bin, double res, double err)
 
void setCentRes25 (unsigned int bin, double res, double err)
 
void setCentRes30 (unsigned int bin, double res, double err)
 
void setCentRes40 (unsigned int bin, double res, double err)
 
void setCentRes5 (unsigned int bin, double res, double err)
 
void setPt2DB (unsigned int indx, double val)
 
void setPtDB (unsigned int indx, double val)
 
void setXDB (unsigned int indx, double val)
 
void setXoffDB (unsigned int indx, double val)
 
void setYDB (unsigned int indx, double val)
 
void setYoffDB (unsigned int indx, double val)
 
 ~HiEvtPlaneFlatten ()
 

Private Attributes

int caloCentRefMaxBin_
 
int caloCentRefMinBin_
 
double centRes10_ [10]
 
double centRes1_ [100]
 
double centRes20_ [5]
 
double centRes25_ [4]
 
double centRes2_ [50]
 
double centRes30_ [3]
 
double centRes40_ [2]
 
double centRes5_ [20]
 
double centResErr10_ [10]
 
double centResErr1_ [100]
 
double centResErr20_ [5]
 
double centResErr25_ [4]
 
double centResErr2_ [50]
 
double centResErr30_ [3]
 
double centResErr40_ [2]
 
double centResErr5_ [20]
 
double flatCnt_ [MAXCUT]
 
double flatX_ [MAXCUT]
 
double flatXDB_ [MAXCUT]
 
double flatY_ [MAXCUT]
 
double flatYDB_ [MAXCUT]
 
int hbins_
 
int hOrder_
 
int obins_
 
double pt2_ [MAXCUTOFF]
 
double pt2DB_ [MAXCUTOFF]
 
double pt_ [MAXCUTOFF]
 
double ptcnt_ [MAXCUTOFF]
 
double ptDB_ [MAXCUTOFF]
 
int vorder_
 
double xoff_ [MAXCUTOFF]
 
double xoffDB_ [MAXCUTOFF]
 
double xyoffcnt_ [MAXCUTOFF]
 
uint xyoffmult_ [MAXCUTOFF]
 
double yoff_ [MAXCUTOFF]
 
double yoffDB_ [MAXCUTOFF]
 

Static Private Attributes

static double delvtx_ = 5.
 
static const int MAXCUT = 10000
 
static const int MAXCUTOFF = 1000
 
static double minvtx_ = -25.
 
static int nvtxbins_ = 10
 

Detailed Description

Definition at line 27 of file HiEvtPlaneFlatten.h.

Constructor & Destructor Documentation

HiEvtPlaneFlatten::HiEvtPlaneFlatten ( )
inlineexplicit

Definition at line 29 of file HiEvtPlaneFlatten.h.

References hbins_, hOrder_, and vorder_.

29  {
30  hbins_ = 1;
31  hOrder_ = 9;
32  vorder_ = 2; //sets default order of event plane
33  }
HiEvtPlaneFlatten::~HiEvtPlaneFlatten ( )
inline

Definition at line 200 of file HiEvtPlaneFlatten.h.

200 {}

Member Function Documentation

double HiEvtPlaneFlatten::bounds ( double  ang) const
inline

Definition at line 243 of file HiEvtPlaneFlatten.h.

References M_PI.

Referenced by getFlatPsi(), and getOffsetPsi().

243  {
244  if (ang < -M_PI)
245  ang += 2. * M_PI;
246  if (ang > M_PI)
247  ang -= 2. * M_PI;
248  return ang;
249  }
#define M_PI
double HiEvtPlaneFlatten::bounds2 ( double  ang) const
inline

Definition at line 250 of file HiEvtPlaneFlatten.h.

References M_PI, FastTimerService_cff::range, and vorder_.

Referenced by getFlatPsi(), and getOffsetPsi().

250  {
251  double range = M_PI / (double)vorder_;
252  while (ang < -range) {
253  ang += 2 * range;
254  }
255  while (ang > range) {
256  ang -= 2 * range;
257  }
258  return ang;
259  }
#define M_PI
void HiEvtPlaneFlatten::fill ( double  psi,
double  vtx,
int  centbin 
)
inline

Definition at line 96 of file HiEvtPlaneFlatten.h.

References funct::cos(), flatCnt_, flatX_, flatY_, getCutIndx(), hOrder_, dqmdumpme::k, funct::sin(), and vorder_.

96  {
97  if (fabs(psi) > 4)
98  return;
99  for (int k = 0; k < hOrder_; k++) {
100  double fsin = sin(vorder_ * (k + 1) * psi);
101  double fcos = cos(vorder_ * (k + 1) * psi);
102  int indx = getCutIndx(centbin, vtx, k);
103  if (indx >= 0) {
104  flatX_[indx] += fcos;
105  flatY_[indx] += fsin;
106  ++flatCnt_[indx];
107  }
108  }
109  }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
double flatX_[MAXCUT]
std::map< std::string, int, std::less< std::string > > psi
int getCutIndx(int centbin, double vtx, int iord) const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
double flatCnt_[MAXCUT]
double flatY_[MAXCUT]
void HiEvtPlaneFlatten::fillOffset ( double  s,
double  c,
uint  m,
double  vtx,
int  centbin 
)
inline

Definition at line 110 of file HiEvtPlaneFlatten.h.

References HltBtagPostValidation_cff::c, getOffsetIndx(), visualization-live-secondInstance_cfg::m, alignCSCRings::s, xoff_, xyoffcnt_, xyoffmult_, and yoff_.

110  {
111  int indx = getOffsetIndx(centbin, vtx);
112  if (indx >= 0) {
113  xoff_[indx] += c;
114  yoff_[indx] += s;
115  xyoffmult_[indx] += m;
116  ++xyoffcnt_[indx];
117  }
118  }
double xoff_[MAXCUTOFF]
double yoff_[MAXCUTOFF]
int getOffsetIndx(int centbin, double vtx) const
uint xyoffmult_[MAXCUTOFF]
double xyoffcnt_[MAXCUTOFF]
void HiEvtPlaneFlatten::fillPt ( double  ptval,
double  vtx,
int  centbin 
)
inline

Definition at line 119 of file HiEvtPlaneFlatten.h.

References getOffsetIndx(), pt2_, pt_, and ptcnt_.

119  {
120  int indx = getOffsetIndx(centbin, vtx);
121  if (indx >= 0) {
122  pt_[indx] += ptval;
123  pt2_[indx] += ptval * ptval;
124  ++ptcnt_[indx];
125  }
126  }
double ptcnt_[MAXCUTOFF]
double pt_[MAXCUTOFF]
int getOffsetIndx(int centbin, double vtx) const
double pt2_[MAXCUTOFF]
double HiEvtPlaneFlatten::getCentRes1 ( unsigned int  bin) const
inline

Definition at line 309 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centRes1_.

309  {
310  if (bin < 100) {
311  return centRes1_[bin];
312  } else {
313  return 0.;
314  }
315  }
double HiEvtPlaneFlatten::getCentRes10 ( unsigned int  bin) const
inline

Definition at line 330 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centRes10_.

330  {
331  if (bin < 10) {
332  return centRes10_[bin];
333  } else {
334  return 0.;
335  }
336  }
double HiEvtPlaneFlatten::getCentRes2 ( unsigned int  bin) const
inline

Definition at line 316 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centRes2_.

316  {
317  if (bin < 50) {
318  return centRes2_[bin];
319  } else {
320  return 0.;
321  }
322  }
double HiEvtPlaneFlatten::getCentRes20 ( unsigned int  bin) const
inline

Definition at line 337 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centRes20_.

337  {
338  if (bin < 5) {
339  return centRes20_[bin];
340  } else {
341  return 0.;
342  }
343  }
double HiEvtPlaneFlatten::getCentRes25 ( unsigned int  bin) const
inline

Definition at line 344 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centRes25_.

344  {
345  if (bin < 4) {
346  return centRes25_[bin];
347  } else {
348  return 0.;
349  }
350  }
double HiEvtPlaneFlatten::getCentRes30 ( unsigned int  bin) const
inline

Definition at line 351 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centRes30_.

351  {
352  if (bin < 3) {
353  return centRes30_[bin];
354  } else {
355  return 0.;
356  }
357  }
double HiEvtPlaneFlatten::getCentRes40 ( unsigned int  bin) const
inline

Definition at line 358 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centRes40_.

358  {
359  if (bin < 2) {
360  return centRes40_[bin];
361  } else {
362  return 0.;
363  }
364  }
double HiEvtPlaneFlatten::getCentRes5 ( unsigned int  bin) const
inline

Definition at line 323 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centRes5_.

323  {
324  if (bin < 20) {
325  return centRes5_[bin];
326  } else {
327  return 0.;
328  }
329  }
double HiEvtPlaneFlatten::getCentResErr1 ( unsigned int  bin) const
inline

Definition at line 366 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centResErr1_.

366  {
367  if (bin < 100) {
368  return centResErr1_[bin];
369  } else {
370  return 0.;
371  }
372  }
double centResErr1_[100]
double HiEvtPlaneFlatten::getCentResErr10 ( unsigned int  bin) const
inline

Definition at line 387 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centResErr10_.

387  {
388  if (bin < 10) {
389  return centResErr10_[bin];
390  } else {
391  return 0.;
392  }
393  }
double HiEvtPlaneFlatten::getCentResErr2 ( unsigned int  bin) const
inline

Definition at line 373 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centResErr2_.

373  {
374  if (bin < 50) {
375  return centResErr2_[bin];
376  } else {
377  return 0.;
378  }
379  }
double HiEvtPlaneFlatten::getCentResErr20 ( unsigned int  bin) const
inline

Definition at line 394 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centResErr20_.

394  {
395  if (bin < 5) {
396  return centResErr20_[bin];
397  } else {
398  return 0.;
399  }
400  }
double HiEvtPlaneFlatten::getCentResErr25 ( unsigned int  bin) const
inline

Definition at line 401 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centResErr25_.

401  {
402  if (bin < 4) {
403  return centResErr25_[bin];
404  } else {
405  return 0.;
406  }
407  }
double HiEvtPlaneFlatten::getCentResErr30 ( unsigned int  bin) const
inline

Definition at line 408 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centResErr30_.

408  {
409  if (bin < 3) {
410  return centResErr30_[bin];
411  } else {
412  return 0.;
413  }
414  }
double HiEvtPlaneFlatten::getCentResErr40 ( unsigned int  bin) const
inline

Definition at line 415 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centResErr40_.

415  {
416  if (bin < 2) {
417  return centResErr40_[bin];
418  } else {
419  return 0.;
420  }
421  }
double HiEvtPlaneFlatten::getCentResErr5 ( unsigned int  bin) const
inline

Definition at line 380 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centResErr5_.

380  {
381  if (bin < 20) {
382  return centResErr5_[bin];
383  } else {
384  return 0.;
385  }
386  }
double HiEvtPlaneFlatten::getCnt ( unsigned int  bin) const
inline

Definition at line 236 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and flatCnt_.

236 { return flatCnt_[bin]; }
double flatCnt_[MAXCUT]
double HiEvtPlaneFlatten::getCoffset ( double  c,
double  vtx,
int  centbin 
) const
inline

Definition at line 183 of file HiEvtPlaneFlatten.h.

References HltBtagPostValidation_cff::c, getOffsetIndx(), and xoffDB_.

Referenced by HiEvtPlaneFlatProducer::produce().

183  {
184  int indx = getOffsetIndx(centbin, vtx);
185  if (indx >= 0)
186  return c - xoffDB_[indx];
187  else
188  return c;
189  }
double xoffDB_[MAXCUTOFF]
int getOffsetIndx(int centbin, double vtx) const
int HiEvtPlaneFlatten::getCutIndx ( int  centbin,
double  vtx,
int  iord 
) const
inline

Definition at line 68 of file HiEvtPlaneFlatten.h.

References TkAlMuonSelectors_cfi::cut, delvtx_, hbins_, hOrder_, minvtx_, and nvtxbins_.

Referenced by fill(), and getFlatPsi().

68  {
69  int cut;
70  if (centbin < 0)
71  return -1;
72  int ibin = centbin;
73  int ivtx = (vtx - minvtx_) / delvtx_;
74  if (vtx < minvtx_ || ivtx >= nvtxbins_)
75  return -1;
76  cut = hOrder_ * nvtxbins_ * ibin + hOrder_ * ivtx + iord;
77  if (cut < 0 || cut >= hbins_)
78  return -1;
79  return cut;
80  }
static double delvtx_
static double minvtx_
double HiEvtPlaneFlatten::getEtScale ( double  vtx,
int  centbin 
) const
inline

Definition at line 133 of file HiEvtPlaneFlatten.h.

References caloCentRefMaxBin_, caloCentRefMinBin_, getOffsetIndx(), getPtDB(), and mps_fire::i.

Referenced by getW(), and EvtPlaneProducer::produce().

133  {
134  int refmin = getOffsetIndx(caloCentRefMinBin_, vtx);
135  int refmax = getOffsetIndx(caloCentRefMaxBin_, vtx);
136  double caloCentRefVal_ = 0;
137  for (int i = refmin; i <= refmax; i++) {
138  caloCentRefVal_ += getPtDB(i);
139  }
140  caloCentRefVal_ /= refmax - refmin + 1.;
141  if (caloCentRefMinBin_ < 0)
142  return 1.;
143  int indx = getOffsetIndx(centbin, vtx);
144  if (indx < 0 || caloCentRefVal_ == 0 || getPtDB(indx) == 0)
145  return 1.;
146  return caloCentRefVal_ / getPtDB(indx);
147  }
double getPtDB(unsigned int bin) const
int getOffsetIndx(int centbin, double vtx) const
double HiEvtPlaneFlatten::getFlatPsi ( double  psi,
double  vtx,
int  centbin 
) const
inline

Definition at line 161 of file HiEvtPlaneFlatten.h.

References bounds(), bounds2(), pfMETCorrectionType0_cfi::correction, funct::cos(), flatXDB_, flatYDB_, getCutIndx(), hOrder_, dqmdumpme::k, funct::sin(), and vorder_.

Referenced by HiEvtPlaneFlatProducer::produce().

161  {
162  double correction = 0;
163  for (int k = 0; k < hOrder_; k++) {
164  int indx = getCutIndx(centbin, vtx, k);
165  if (indx >= 0)
166  correction += (2. / (double)((k + 1) * vorder_)) *
167  (flatXDB_[indx] * sin(vorder_ * (k + 1) * psi) - flatYDB_[indx] * cos(vorder_ * (k + 1) * psi));
168  }
169  psi += correction;
170  psi = bounds(psi);
171  psi = bounds2(psi);
172  return psi;
173  }
double bounds(double ang) const
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::map< std::string, int, std::less< std::string > > psi
double bounds2(double ang) const
int getCutIndx(int centbin, double vtx, int iord) const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
double flatYDB_[MAXCUT]
double flatXDB_[MAXCUT]
int HiEvtPlaneFlatten::getHBins ( ) const
inline

Definition at line 201 of file HiEvtPlaneFlatten.h.

References hbins_.

Referenced by LoadEPDB::LoadEPDB().

201 { return hbins_; }
int HiEvtPlaneFlatten::getNcent ( ) const
inline

Definition at line 206 of file HiEvtPlaneFlatten.h.

References hbins_.

206 { return hbins_; }
int HiEvtPlaneFlatten::getNvtx ( ) const
inline

Definition at line 203 of file HiEvtPlaneFlatten.h.

References nvtxbins_.

203 { return nvtxbins_; }
int HiEvtPlaneFlatten::getOBins ( ) const
inline

Definition at line 202 of file HiEvtPlaneFlatten.h.

References obins_.

Referenced by LoadEPDB::LoadEPDB().

202 { return obins_; }
int HiEvtPlaneFlatten::getOffsetIndx ( int  centbin,
double  vtx 
) const
inline

Definition at line 82 of file HiEvtPlaneFlatten.h.

References TkAlMuonSelectors_cfi::cut, delvtx_, hbins_, minvtx_, and nvtxbins_.

Referenced by fillOffset(), fillPt(), getCoffset(), getEtScale(), getSoffset(), and getW().

82  {
83  int cut;
84  if (centbin < 0)
85  return -1;
86  int ibin = centbin;
87  int ivtx = (vtx - minvtx_) / delvtx_;
88  if (ivtx < 0 || ivtx > nvtxbins_)
89  return -1;
90  cut = nvtxbins_ * ibin + ivtx;
91  if (cut < 0 || cut > hbins_)
92  return -1;
93  return cut;
94  }
static double delvtx_
static double minvtx_
double HiEvtPlaneFlatten::getOffsetPsi ( double  s,
double  c 
) const
inline

Definition at line 191 of file HiEvtPlaneFlatten.h.

References bounds(), bounds2(), MillePedeFileConverter_cfg::e, and vorder_.

Referenced by HiEvtPlaneFlatProducer::produce().

191  {
192  double psi = atan2(s, c) / vorder_;
193  if ((fabs(s) < 1e-4) && (fabs(c) < 1e-4))
194  psi = 0.;
195  psi = bounds(psi);
196  psi = bounds2(psi);
197  return psi;
198  }
double bounds(double ang) const
std::map< std::string, int, std::less< std::string > > psi
double bounds2(double ang) const
double HiEvtPlaneFlatten::getPt ( unsigned int  bin) const
inline

Definition at line 216 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and pt_.

216 { return pt_[bin]; }
double pt_[MAXCUTOFF]
double HiEvtPlaneFlatten::getPt2 ( unsigned int  bin) const
inline

Definition at line 217 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and pt2_.

217 { return pt2_[bin]; }
double pt2_[MAXCUTOFF]
double HiEvtPlaneFlatten::getPt2DB ( unsigned int  bin) const
inline

Definition at line 225 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, MAXCUTOFF, and pt2DB_.

Referenced by getW().

225  {
226  if (bin < MAXCUTOFF) {
227  return pt2DB_[bin];
228  } else {
229  return 0.;
230  }
231  }
static const int MAXCUTOFF
double pt2DB_[MAXCUTOFF]
double HiEvtPlaneFlatten::getPtcnt ( unsigned int  bin) const
inline

Definition at line 232 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and ptcnt_.

232 { return ptcnt_[bin]; }
double ptcnt_[MAXCUTOFF]
double HiEvtPlaneFlatten::getPtDB ( unsigned int  bin) const
inline

Definition at line 218 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, MAXCUTOFF, and ptDB_.

Referenced by getEtScale(), and getW().

218  {
219  if (bin < MAXCUTOFF) {
220  return ptDB_[bin];
221  } else {
222  return 0.;
223  }
224  }
static const int MAXCUTOFF
double ptDB_[MAXCUTOFF]
double HiEvtPlaneFlatten::getSoffset ( double  s,
double  vtx,
int  centbin 
) const
inline

Definition at line 175 of file HiEvtPlaneFlatten.h.

References getOffsetIndx(), alignCSCRings::s, and yoffDB_.

Referenced by HiEvtPlaneFlatProducer::produce().

175  {
176  int indx = getOffsetIndx(centbin, vtx);
177  if (indx >= 0)
178  return s - yoffDB_[indx];
179  else
180  return s;
181  }
double yoffDB_[MAXCUTOFF]
int getOffsetIndx(int centbin, double vtx) const
double HiEvtPlaneFlatten::getVtxMax ( ) const
inline

Definition at line 205 of file HiEvtPlaneFlatten.h.

References delvtx_, minvtx_, and nvtxbins_.

205 { return minvtx_ + nvtxbins_ * delvtx_; }
static double delvtx_
static double minvtx_
double HiEvtPlaneFlatten::getVtxMin ( ) const
inline

Definition at line 204 of file HiEvtPlaneFlatten.h.

References minvtx_.

204 { return minvtx_; }
static double minvtx_
double HiEvtPlaneFlatten::getW ( double  pt,
double  vtx,
int  centbin 
) const
inline

Definition at line 149 of file HiEvtPlaneFlatten.h.

References getEtScale(), getOffsetIndx(), getPt2DB(), getPtDB(), funct::pow(), and Scenarios_cff::scale.

Referenced by EvtPlaneProducer::produce().

149  {
150  int indx = getOffsetIndx(centbin, vtx);
151  if (indx >= 0) {
152  double scale = getEtScale(vtx, centbin);
153  double ptval = getPtDB(indx) * scale;
154  double pt2val = getPt2DB(indx) * pow(scale, 2);
155  if (ptval > 0)
156  return pt * scale - pt2val / ptval;
157  }
158  return 0.;
159  }
double getPt2DB(unsigned int bin) const
double getPtDB(unsigned int bin) const
double getEtScale(double vtx, int centbin) const
int getOffsetIndx(int centbin, double vtx) const
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30
double HiEvtPlaneFlatten::getX ( unsigned int  bin) const
inline

Definition at line 208 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and flatX_.

208 { return flatX_[bin]; }
double flatX_[MAXCUT]
double HiEvtPlaneFlatten::getXDB ( unsigned int  bin) const
inline

Definition at line 233 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and flatXDB_.

233 { return flatXDB_[bin]; }
double flatXDB_[MAXCUT]
double HiEvtPlaneFlatten::getXoff ( unsigned int  bin) const
inline

Definition at line 210 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and xoff_.

210 { return xoff_[bin]; }
double xoff_[MAXCUTOFF]
double HiEvtPlaneFlatten::getXoffDB ( unsigned int  bin) const
inline

Definition at line 212 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and xoffDB_.

212 { return xoffDB_[bin]; }
double xoffDB_[MAXCUTOFF]
double HiEvtPlaneFlatten::getXYoffcnt ( unsigned int  bin) const
inline

Definition at line 214 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and xyoffcnt_.

214 { return xyoffcnt_[bin]; }
double xyoffcnt_[MAXCUTOFF]
double HiEvtPlaneFlatten::getXYoffmult ( unsigned int  bin) const
inline

Definition at line 215 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and xyoffmult_.

215 { return xyoffmult_[bin]; }
uint xyoffmult_[MAXCUTOFF]
double HiEvtPlaneFlatten::getY ( unsigned int  bin) const
inline

Definition at line 209 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and flatY_.

209 { return flatY_[bin]; }
double flatY_[MAXCUT]
double HiEvtPlaneFlatten::getYDB ( unsigned int  bin) const
inline

Definition at line 234 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and flatYDB_.

234 { return flatYDB_[bin]; }
double flatYDB_[MAXCUT]
double HiEvtPlaneFlatten::getYoff ( unsigned int  bin) const
inline

Definition at line 211 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and yoff_.

211 { return yoff_[bin]; }
double yoff_[MAXCUTOFF]
double HiEvtPlaneFlatten::getYoffDB ( unsigned int  bin) const
inline

Definition at line 213 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and yoffDB_.

213 { return yoffDB_[bin]; }
double yoffDB_[MAXCUTOFF]
void HiEvtPlaneFlatten::init ( int  order,
int  nbins,
std::string  tag,
int  vord 
)
inline

Definition at line 35 of file HiEvtPlaneFlatten.h.

References caloCentRefMaxBin_, caloCentRefMinBin_, flatCnt_, flatX_, flatXDB_, flatY_, flatYDB_, hbins_, hOrder_, mps_fire::i, MAXCUT, nvtxbins_, obins_, eventshapeDQM_cfi::order, pt2_, pt2DB_, pt_, ptcnt_, ptDB_, vorder_, xoff_, xoffDB_, xyoffcnt_, xyoffmult_, yoff_, and yoffDB_.

Referenced by EvtPlaneProducer::EvtPlaneProducer(), and HiEvtPlaneFlatProducer::HiEvtPlaneFlatProducer().

35  {
36  hOrder_ = order; //order of flattening
37  vorder_ = vord; //1(v1), 2(v2), 3(v3), 4(v4)
38  caloCentRefMinBin_ = -1;
39  caloCentRefMaxBin_ = -1;
42  if (hbins_ > MAXCUT) {
43  hbins_ = 1;
44  hOrder_ = 9;
45  }
46  for (int i = 0; i < hbins_; i++) {
47  flatX_[i] = 0;
48  flatY_[i] = 0;
49  flatXDB_[i] = 0;
50  flatYDB_[i] = 0;
51  flatCnt_[i] = 0;
52  }
53  for (int i = 0; i < obins_; i++) {
54  xoff_[i] = 0;
55  yoff_[i] = 0;
56  xoffDB_[i] = 0;
57  yoffDB_[i] = 0;
58  xyoffcnt_[i] = 0;
59  xyoffmult_[i] = 0;
60  pt_[i] = 0;
61  pt2_[i] = 0;
62  ptDB_[i] = 0;
63  pt2DB_[i] = 0;
64  ptcnt_[i] = 0;
65  }
66  }
double xoffDB_[MAXCUTOFF]
static const int MAXCUT
double ptcnt_[MAXCUTOFF]
double yoffDB_[MAXCUTOFF]
double pt_[MAXCUTOFF]
double xoff_[MAXCUTOFF]
double flatX_[MAXCUT]
double ptDB_[MAXCUTOFF]
double yoff_[MAXCUTOFF]
uint xyoffmult_[MAXCUTOFF]
double pt2DB_[MAXCUTOFF]
double flatCnt_[MAXCUT]
double pt2_[MAXCUTOFF]
double xyoffcnt_[MAXCUTOFF]
double flatYDB_[MAXCUT]
double flatXDB_[MAXCUT]
double flatY_[MAXCUT]
void HiEvtPlaneFlatten::setCaloCentRefBins ( const int  caloCentRefMinBin,
const int  caloCentRefMaxBin 
)
inline

Definition at line 128 of file HiEvtPlaneFlatten.h.

References caloCentRefMaxBin_, and caloCentRefMinBin_.

Referenced by HiEvtPlaneFlatProducer::produce(), and EvtPlaneProducer::produce().

128  {
129  caloCentRefMinBin_ = caloCentRefMinBin;
130  caloCentRefMaxBin_ = caloCentRefMaxBin;
131  }
void HiEvtPlaneFlatten::setCentRes1 ( unsigned int  bin,
double  res,
double  err 
)
inline

Definition at line 260 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, centRes1_, centResErr1_, and runTheMatrix::err.

260  {
261  if (bin < 100) {
262  centRes1_[bin] = res;
263  centResErr1_[bin] = err;
264  }
265  }
double centResErr1_[100]
Definition: Electron.h:6
void HiEvtPlaneFlatten::setCentRes10 ( unsigned int  bin,
double  res,
double  err 
)
inline

Definition at line 278 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, centRes10_, centResErr10_, and runTheMatrix::err.

278  {
279  if (bin < 10) {
280  centRes10_[bin] = res;
281  centResErr10_[bin] = err;
282  }
283  }
Definition: Electron.h:6
void HiEvtPlaneFlatten::setCentRes2 ( unsigned int  bin,
double  res,
double  err 
)
inline

Definition at line 266 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, centRes2_, centResErr2_, and runTheMatrix::err.

266  {
267  if (bin < 50) {
268  centRes2_[bin] = res;
269  centResErr2_[bin] = err;
270  }
271  }
Definition: Electron.h:6
void HiEvtPlaneFlatten::setCentRes20 ( unsigned int  bin,
double  res,
double  err 
)
inline

Definition at line 284 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, centRes20_, centResErr20_, and runTheMatrix::err.

284  {
285  if (bin < 5) {
286  centRes20_[bin] = res;
287  centResErr20_[bin] = err;
288  }
289  }
Definition: Electron.h:6
void HiEvtPlaneFlatten::setCentRes25 ( unsigned int  bin,
double  res,
double  err 
)
inline

Definition at line 290 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, centRes25_, centResErr25_, and runTheMatrix::err.

290  {
291  if (bin < 4) {
292  centRes25_[bin] = res;
293  centResErr25_[bin] = err;
294  }
295  }
Definition: Electron.h:6
void HiEvtPlaneFlatten::setCentRes30 ( unsigned int  bin,
double  res,
double  err 
)
inline

Definition at line 296 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, centRes30_, centResErr30_, and runTheMatrix::err.

296  {
297  if (bin < 3) {
298  centRes30_[bin] = res;
299  centResErr30_[bin] = err;
300  }
301  }
Definition: Electron.h:6
void HiEvtPlaneFlatten::setCentRes40 ( unsigned int  bin,
double  res,
double  err 
)
inline

Definition at line 302 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, centRes40_, centResErr40_, and runTheMatrix::err.

302  {
303  if (bin < 2) {
304  centRes40_[bin] = res;
305  centResErr40_[bin] = err;
306  }
307  }
Definition: Electron.h:6
void HiEvtPlaneFlatten::setCentRes5 ( unsigned int  bin,
double  res,
double  err 
)
inline

Definition at line 272 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, centRes5_, centResErr5_, and runTheMatrix::err.

272  {
273  if (bin < 20) {
274  centRes5_[bin] = res;
275  centResErr5_[bin] = err;
276  }
277  }
Definition: Electron.h:6
void HiEvtPlaneFlatten::setPt2DB ( unsigned int  indx,
double  val 
)
inline

Definition at line 242 of file HiEvtPlaneFlatten.h.

References pt2DB_, and heppy_batch::val.

Referenced by LoadEPDB::LoadEPDB().

242 { pt2DB_[indx] = val; }
double pt2DB_[MAXCUTOFF]
void HiEvtPlaneFlatten::setPtDB ( unsigned int  indx,
double  val 
)
inline

Definition at line 241 of file HiEvtPlaneFlatten.h.

References ptDB_, and heppy_batch::val.

Referenced by LoadEPDB::LoadEPDB().

241 { ptDB_[indx] = val; }
double ptDB_[MAXCUTOFF]
void HiEvtPlaneFlatten::setXDB ( unsigned int  indx,
double  val 
)
inline

Definition at line 237 of file HiEvtPlaneFlatten.h.

References flatXDB_, and heppy_batch::val.

Referenced by LoadEPDB::LoadEPDB().

237 { flatXDB_[indx] = val; }
double flatXDB_[MAXCUT]
void HiEvtPlaneFlatten::setXoffDB ( unsigned int  indx,
double  val 
)
inline

Definition at line 239 of file HiEvtPlaneFlatten.h.

References heppy_batch::val, and xoffDB_.

Referenced by LoadEPDB::LoadEPDB().

239 { xoffDB_[indx] = val; }
double xoffDB_[MAXCUTOFF]
void HiEvtPlaneFlatten::setYDB ( unsigned int  indx,
double  val 
)
inline

Definition at line 238 of file HiEvtPlaneFlatten.h.

References flatYDB_, and heppy_batch::val.

Referenced by LoadEPDB::LoadEPDB().

238 { flatYDB_[indx] = val; }
double flatYDB_[MAXCUT]
void HiEvtPlaneFlatten::setYoffDB ( unsigned int  indx,
double  val 
)
inline

Definition at line 240 of file HiEvtPlaneFlatten.h.

References heppy_batch::val, and yoffDB_.

Referenced by LoadEPDB::LoadEPDB().

240 { yoffDB_[indx] = val; }
double yoffDB_[MAXCUTOFF]

Member Data Documentation

int HiEvtPlaneFlatten::caloCentRefMaxBin_
private

Definition at line 478 of file HiEvtPlaneFlatten.h.

Referenced by getEtScale(), init(), and setCaloCentRefBins().

int HiEvtPlaneFlatten::caloCentRefMinBin_
private

Definition at line 477 of file HiEvtPlaneFlatten.h.

Referenced by getEtScale(), init(), and setCaloCentRefBins().

double HiEvtPlaneFlatten::centRes10_[10]
private

Definition at line 458 of file HiEvtPlaneFlatten.h.

Referenced by getCentRes10(), and setCentRes10().

double HiEvtPlaneFlatten::centRes1_[100]
private

Definition at line 449 of file HiEvtPlaneFlatten.h.

Referenced by getCentRes1(), and setCentRes1().

double HiEvtPlaneFlatten::centRes20_[5]
private

Definition at line 461 of file HiEvtPlaneFlatten.h.

Referenced by getCentRes20(), and setCentRes20().

double HiEvtPlaneFlatten::centRes25_[4]
private

Definition at line 464 of file HiEvtPlaneFlatten.h.

Referenced by getCentRes25(), and setCentRes25().

double HiEvtPlaneFlatten::centRes2_[50]
private

Definition at line 452 of file HiEvtPlaneFlatten.h.

Referenced by getCentRes2(), and setCentRes2().

double HiEvtPlaneFlatten::centRes30_[3]
private

Definition at line 467 of file HiEvtPlaneFlatten.h.

Referenced by getCentRes30(), and setCentRes30().

double HiEvtPlaneFlatten::centRes40_[2]
private

Definition at line 470 of file HiEvtPlaneFlatten.h.

Referenced by getCentRes40(), and setCentRes40().

double HiEvtPlaneFlatten::centRes5_[20]
private

Definition at line 455 of file HiEvtPlaneFlatten.h.

Referenced by getCentRes5(), and setCentRes5().

double HiEvtPlaneFlatten::centResErr10_[10]
private

Definition at line 459 of file HiEvtPlaneFlatten.h.

Referenced by getCentResErr10(), and setCentRes10().

double HiEvtPlaneFlatten::centResErr1_[100]
private

Definition at line 450 of file HiEvtPlaneFlatten.h.

Referenced by getCentResErr1(), and setCentRes1().

double HiEvtPlaneFlatten::centResErr20_[5]
private

Definition at line 462 of file HiEvtPlaneFlatten.h.

Referenced by getCentResErr20(), and setCentRes20().

double HiEvtPlaneFlatten::centResErr25_[4]
private

Definition at line 465 of file HiEvtPlaneFlatten.h.

Referenced by getCentResErr25(), and setCentRes25().

double HiEvtPlaneFlatten::centResErr2_[50]
private

Definition at line 453 of file HiEvtPlaneFlatten.h.

Referenced by getCentResErr2(), and setCentRes2().

double HiEvtPlaneFlatten::centResErr30_[3]
private

Definition at line 468 of file HiEvtPlaneFlatten.h.

Referenced by getCentResErr30(), and setCentRes30().

double HiEvtPlaneFlatten::centResErr40_[2]
private

Definition at line 471 of file HiEvtPlaneFlatten.h.

Referenced by getCentResErr40(), and setCentRes40().

double HiEvtPlaneFlatten::centResErr5_[20]
private

Definition at line 456 of file HiEvtPlaneFlatten.h.

Referenced by getCentResErr5(), and setCentRes5().

double HiEvtPlaneFlatten::delvtx_ = 5.
staticprivate

Definition at line 426 of file HiEvtPlaneFlatten.h.

Referenced by getCutIndx(), getOffsetIndx(), and getVtxMax().

double HiEvtPlaneFlatten::flatCnt_[MAXCUT]
private

Definition at line 434 of file HiEvtPlaneFlatten.h.

Referenced by fill(), getCnt(), and init().

double HiEvtPlaneFlatten::flatX_[MAXCUT]
private

Definition at line 430 of file HiEvtPlaneFlatten.h.

Referenced by fill(), getX(), and init().

double HiEvtPlaneFlatten::flatXDB_[MAXCUT]
private

Definition at line 432 of file HiEvtPlaneFlatten.h.

Referenced by getFlatPsi(), getXDB(), init(), and setXDB().

double HiEvtPlaneFlatten::flatY_[MAXCUT]
private

Definition at line 431 of file HiEvtPlaneFlatten.h.

Referenced by fill(), getY(), and init().

double HiEvtPlaneFlatten::flatYDB_[MAXCUT]
private

Definition at line 433 of file HiEvtPlaneFlatten.h.

Referenced by getFlatPsi(), getYDB(), init(), and setYDB().

int HiEvtPlaneFlatten::hbins_
private
int HiEvtPlaneFlatten::hOrder_
private

Definition at line 473 of file HiEvtPlaneFlatten.h.

Referenced by fill(), getCutIndx(), getFlatPsi(), HiEvtPlaneFlatten(), and init().

const int HiEvtPlaneFlatten::MAXCUT = 10000
staticprivate

Definition at line 427 of file HiEvtPlaneFlatten.h.

Referenced by init().

const int HiEvtPlaneFlatten::MAXCUTOFF = 1000
staticprivate

Definition at line 428 of file HiEvtPlaneFlatten.h.

Referenced by getPt2DB(), and getPtDB().

double HiEvtPlaneFlatten::minvtx_ = -25.
staticprivate

Definition at line 425 of file HiEvtPlaneFlatten.h.

Referenced by getCutIndx(), getOffsetIndx(), getVtxMax(), and getVtxMin().

int HiEvtPlaneFlatten::nvtxbins_ = 10
staticprivate

Definition at line 424 of file HiEvtPlaneFlatten.h.

Referenced by getCutIndx(), getNvtx(), getOffsetIndx(), getVtxMax(), and init().

int HiEvtPlaneFlatten::obins_
private

Definition at line 475 of file HiEvtPlaneFlatten.h.

Referenced by getOBins(), and init().

double HiEvtPlaneFlatten::pt2_[MAXCUTOFF]
private

Definition at line 444 of file HiEvtPlaneFlatten.h.

Referenced by fillPt(), getPt2(), and init().

double HiEvtPlaneFlatten::pt2DB_[MAXCUTOFF]
private

Definition at line 446 of file HiEvtPlaneFlatten.h.

Referenced by getPt2DB(), init(), and setPt2DB().

double HiEvtPlaneFlatten::pt_[MAXCUTOFF]
private

Definition at line 443 of file HiEvtPlaneFlatten.h.

Referenced by fillPt(), getPt(), and init().

double HiEvtPlaneFlatten::ptcnt_[MAXCUTOFF]
private

Definition at line 447 of file HiEvtPlaneFlatten.h.

Referenced by fillPt(), getPtcnt(), and init().

double HiEvtPlaneFlatten::ptDB_[MAXCUTOFF]
private

Definition at line 445 of file HiEvtPlaneFlatten.h.

Referenced by getPtDB(), init(), and setPtDB().

int HiEvtPlaneFlatten::vorder_
private

Definition at line 476 of file HiEvtPlaneFlatten.h.

Referenced by bounds2(), fill(), getFlatPsi(), getOffsetPsi(), HiEvtPlaneFlatten(), and init().

double HiEvtPlaneFlatten::xoff_[MAXCUTOFF]
private

Definition at line 436 of file HiEvtPlaneFlatten.h.

Referenced by fillOffset(), getXoff(), and init().

double HiEvtPlaneFlatten::xoffDB_[MAXCUTOFF]
private

Definition at line 438 of file HiEvtPlaneFlatten.h.

Referenced by getCoffset(), getXoffDB(), init(), and setXoffDB().

double HiEvtPlaneFlatten::xyoffcnt_[MAXCUTOFF]
private

Definition at line 440 of file HiEvtPlaneFlatten.h.

Referenced by fillOffset(), getXYoffcnt(), and init().

uint HiEvtPlaneFlatten::xyoffmult_[MAXCUTOFF]
private

Definition at line 441 of file HiEvtPlaneFlatten.h.

Referenced by fillOffset(), getXYoffmult(), and init().

double HiEvtPlaneFlatten::yoff_[MAXCUTOFF]
private

Definition at line 437 of file HiEvtPlaneFlatten.h.

Referenced by fillOffset(), getYoff(), and init().

double HiEvtPlaneFlatten::yoffDB_[MAXCUTOFF]
private

Definition at line 439 of file HiEvtPlaneFlatten.h.

Referenced by getSoffset(), getYoffDB(), init(), and setYoffDB().