CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
 
double coffset (double c, double vtx, int centbin) const
 
int cutIndx (int centbin, double vtx, int iord) const
 
double etScale (double vtx, int centbin) 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 getFlatPsi (double psi, double vtx, int centbin) const
 
int getHBins () const
 
int getNcent () const
 
int getNvtx () const
 
int getOBins () 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 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, int nvtxbins=10, double minvtx=-25, double delvtx=5, std::string tag="", int vord=2)
 
float maxCent (int indx) const
 
double maxVtx (int indx) const
 
float minCent (int indx) const
 
double minVtx (int indx) const
 
int offsetIndx (int centbin, double vtx) const
 
double offsetPsi (double s, double c) const
 
std::string rangeString (int indx)
 
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)
 
double soffset (double s, double vtx, int centbin) const
 
 ~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 delvtx_
 
double flatCnt_ [MAXCUT]
 
double flatX_ [MAXCUT]
 
double flatXDB_ [MAXCUT]
 
double flatY_ [MAXCUT]
 
double flatYDB_ [MAXCUT]
 
int hbins_
 
int hOrder_
 
double minvtx_
 
int nbins_
 
int nvtxbins_
 
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 const int MAXCUT = 10000
 
static const int MAXCUTOFF = 1000
 

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 239 of file HiEvtPlaneFlatten.h.

239 {}

Member Function Documentation

double HiEvtPlaneFlatten::bounds ( double  ang) const
inline

Definition at line 282 of file HiEvtPlaneFlatten.h.

References M_PI.

Referenced by getFlatPsi(), and offsetPsi().

282  {
283  if (ang < -M_PI)
284  ang += 2. * M_PI;
285  if (ang > M_PI)
286  ang -= 2. * M_PI;
287  return ang;
288  }
#define M_PI
double HiEvtPlaneFlatten::bounds2 ( double  ang) const
inline

Definition at line 289 of file HiEvtPlaneFlatten.h.

References M_PI, sistrip::SpyUtilities::range(), and vorder_.

Referenced by getFlatPsi(), and offsetPsi().

289  {
290  double range = M_PI / (double)vorder_;
291  while (ang < -range) {
292  ang += 2 * range;
293  }
294  while (ang > range) {
295  ang -= 2 * range;
296  }
297  return ang;
298  }
const uint16_t range(const Frame &aFrame)
#define M_PI
double HiEvtPlaneFlatten::coffset ( double  c,
double  vtx,
int  centbin 
) const
inline

Definition at line 196 of file HiEvtPlaneFlatten.h.

References c, offsetIndx(), and xoffDB_.

Referenced by HiEvtPlaneFlatProducer::produce().

196  {
197  int indx = offsetIndx(centbin, vtx);
198  if (indx >= 0)
199  return c - xoffDB_[indx];
200  else
201  return c;
202  }
double xoffDB_[MAXCUTOFF]
const edm::EventSetup & c
int offsetIndx(int centbin, double vtx) const
int HiEvtPlaneFlatten::cutIndx ( int  centbin,
double  vtx,
int  iord 
) const
inline

Definition at line 79 of file HiEvtPlaneFlatten.h.

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

Referenced by fill(), and getFlatPsi().

79  {
80  int cut;
81  if (centbin < 0)
82  return -1;
83  int ibin = centbin;
84  int ivtx = (vtx - minvtx_) / delvtx_;
85  if (vtx < minvtx_ || ivtx >= nvtxbins_)
86  return -1;
87  cut = hOrder_ * nvtxbins_ * ibin + hOrder_ * ivtx + iord;
88  if (cut < 0 || cut >= hbins_)
89  return -1;
90  return cut;
91  }
double HiEvtPlaneFlatten::etScale ( double  vtx,
int  centbin 
) const
inline

Definition at line 144 of file HiEvtPlaneFlatten.h.

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

Referenced by getW().

144  {
145  int refmin = offsetIndx(caloCentRefMinBin_, vtx);
146  int refmax = offsetIndx(caloCentRefMaxBin_, vtx);
147  double caloCentRefVal_ = 0;
148  for (int i = refmin; i <= refmax; i++) {
149  caloCentRefVal_ += getPtDB(i);
150  }
151  caloCentRefVal_ /= refmax - refmin + 1.;
152  if (caloCentRefMinBin_ < 0)
153  return 1.;
154  int indx = offsetIndx(centbin, vtx);
155  if (indx < 0 || caloCentRefVal_ == 0 || getPtDB(indx) == 0)
156  return 1.;
157  return caloCentRefVal_ / getPtDB(indx);
158  }
double getPtDB(unsigned int bin) const
int offsetIndx(int centbin, double vtx) const
void HiEvtPlaneFlatten::fill ( double  psi,
double  vtx,
int  centbin 
)
inline

Definition at line 107 of file HiEvtPlaneFlatten.h.

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

107  {
108  if (fabs(psi) > 4)
109  return;
110  for (int k = 0; k < hOrder_; k++) {
111  double fsin = sin(vorder_ * (k + 1) * psi);
112  double fcos = cos(vorder_ * (k + 1) * psi);
113  int indx = cutIndx(centbin, vtx, k);
114  if (indx >= 0) {
115  flatX_[indx] += fcos;
116  flatY_[indx] += fsin;
117  ++flatCnt_[indx];
118  }
119  }
120  }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
double flatX_[MAXCUT]
std::map< std::string, int, std::less< std::string > > psi
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
double flatCnt_[MAXCUT]
double flatY_[MAXCUT]
int cutIndx(int centbin, double vtx, int iord) const
void HiEvtPlaneFlatten::fillOffset ( double  s,
double  c,
uint  m,
double  vtx,
int  centbin 
)
inline

Definition at line 121 of file HiEvtPlaneFlatten.h.

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

121  {
122  int indx = offsetIndx(centbin, vtx);
123  if (indx >= 0) {
124  xoff_[indx] += c;
125  yoff_[indx] += s;
126  xyoffmult_[indx] += m;
127  ++xyoffcnt_[indx];
128  }
129  }
const edm::EventSetup & c
double xoff_[MAXCUTOFF]
double yoff_[MAXCUTOFF]
uint xyoffmult_[MAXCUTOFF]
double xyoffcnt_[MAXCUTOFF]
int offsetIndx(int centbin, double vtx) const
void HiEvtPlaneFlatten::fillPt ( double  ptval,
double  vtx,
int  centbin 
)
inline

Definition at line 130 of file HiEvtPlaneFlatten.h.

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

130  {
131  int indx = offsetIndx(centbin, vtx);
132  if (indx >= 0) {
133  pt_[indx] += ptval;
134  pt2_[indx] += ptval * ptval;
135  ++ptcnt_[indx];
136  }
137  }
double ptcnt_[MAXCUTOFF]
double pt_[MAXCUTOFF]
double pt2_[MAXCUTOFF]
int offsetIndx(int centbin, double vtx) const
double HiEvtPlaneFlatten::getCentRes1 ( unsigned int  bin) const
inline

Definition at line 348 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centRes1_.

348  {
349  if (bin < 100) {
350  return centRes1_[bin];
351  } else {
352  return 0.;
353  }
354  }
double HiEvtPlaneFlatten::getCentRes10 ( unsigned int  bin) const
inline

Definition at line 369 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centRes10_.

369  {
370  if (bin < 10) {
371  return centRes10_[bin];
372  } else {
373  return 0.;
374  }
375  }
double HiEvtPlaneFlatten::getCentRes2 ( unsigned int  bin) const
inline

Definition at line 355 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centRes2_.

355  {
356  if (bin < 50) {
357  return centRes2_[bin];
358  } else {
359  return 0.;
360  }
361  }
double HiEvtPlaneFlatten::getCentRes20 ( unsigned int  bin) const
inline

Definition at line 376 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centRes20_.

376  {
377  if (bin < 5) {
378  return centRes20_[bin];
379  } else {
380  return 0.;
381  }
382  }
double HiEvtPlaneFlatten::getCentRes25 ( unsigned int  bin) const
inline

Definition at line 383 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centRes25_.

383  {
384  if (bin < 4) {
385  return centRes25_[bin];
386  } else {
387  return 0.;
388  }
389  }
double HiEvtPlaneFlatten::getCentRes30 ( unsigned int  bin) const
inline

Definition at line 390 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centRes30_.

390  {
391  if (bin < 3) {
392  return centRes30_[bin];
393  } else {
394  return 0.;
395  }
396  }
double HiEvtPlaneFlatten::getCentRes40 ( unsigned int  bin) const
inline

Definition at line 397 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centRes40_.

397  {
398  if (bin < 2) {
399  return centRes40_[bin];
400  } else {
401  return 0.;
402  }
403  }
double HiEvtPlaneFlatten::getCentRes5 ( unsigned int  bin) const
inline

Definition at line 362 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centRes5_.

362  {
363  if (bin < 20) {
364  return centRes5_[bin];
365  } else {
366  return 0.;
367  }
368  }
double HiEvtPlaneFlatten::getCentResErr1 ( unsigned int  bin) const
inline

Definition at line 405 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centResErr1_.

405  {
406  if (bin < 100) {
407  return centResErr1_[bin];
408  } else {
409  return 0.;
410  }
411  }
double centResErr1_[100]
double HiEvtPlaneFlatten::getCentResErr10 ( unsigned int  bin) const
inline

Definition at line 426 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centResErr10_.

426  {
427  if (bin < 10) {
428  return centResErr10_[bin];
429  } else {
430  return 0.;
431  }
432  }
double HiEvtPlaneFlatten::getCentResErr2 ( unsigned int  bin) const
inline

Definition at line 412 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centResErr2_.

412  {
413  if (bin < 50) {
414  return centResErr2_[bin];
415  } else {
416  return 0.;
417  }
418  }
double HiEvtPlaneFlatten::getCentResErr20 ( unsigned int  bin) const
inline

Definition at line 433 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centResErr20_.

433  {
434  if (bin < 5) {
435  return centResErr20_[bin];
436  } else {
437  return 0.;
438  }
439  }
double HiEvtPlaneFlatten::getCentResErr25 ( unsigned int  bin) const
inline

Definition at line 440 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centResErr25_.

440  {
441  if (bin < 4) {
442  return centResErr25_[bin];
443  } else {
444  return 0.;
445  }
446  }
double HiEvtPlaneFlatten::getCentResErr30 ( unsigned int  bin) const
inline

Definition at line 447 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centResErr30_.

447  {
448  if (bin < 3) {
449  return centResErr30_[bin];
450  } else {
451  return 0.;
452  }
453  }
double HiEvtPlaneFlatten::getCentResErr40 ( unsigned int  bin) const
inline

Definition at line 454 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centResErr40_.

454  {
455  if (bin < 2) {
456  return centResErr40_[bin];
457  } else {
458  return 0.;
459  }
460  }
double HiEvtPlaneFlatten::getCentResErr5 ( unsigned int  bin) const
inline

Definition at line 419 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and centResErr5_.

419  {
420  if (bin < 20) {
421  return centResErr5_[bin];
422  } else {
423  return 0.;
424  }
425  }
double HiEvtPlaneFlatten::getCnt ( unsigned int  bin) const
inline

Definition at line 275 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and flatCnt_.

275 { return flatCnt_[bin]; }
double flatCnt_[MAXCUT]
double HiEvtPlaneFlatten::getFlatPsi ( double  psi,
double  vtx,
int  centbin 
) const
inline

Definition at line 173 of file HiEvtPlaneFlatten.h.

References bounds(), bounds2(), pixelCPEforGPU::correction(), funct::cos(), cutIndx(), flatXDB_, flatYDB_, hOrder_, isotrackApplyRegressor::k, funct::sin(), and vorder_.

Referenced by HiEvtPlaneFlatProducer::produce().

173  {
174  double correction = 0;
175  for (int k = 0; k < hOrder_; k++) {
176  int indx = cutIndx(centbin, vtx, k);
177  if (indx >= 0)
178  correction += (2. / (double)((k + 1) * vorder_)) *
179  (flatXDB_[indx] * sin(vorder_ * (k + 1) * psi) - flatYDB_[indx] * cos(vorder_ * (k + 1) * psi));
180  }
181  psi += correction;
182  psi = bounds(psi);
183  psi = bounds2(psi);
184  return psi;
185  }
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
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
constexpr float correction(int sizeM1, int q_f, int q_l, uint16_t upper_edge_first_pix, uint16_t lower_edge_last_pix, float lorentz_shift, float theThickness, float cot_angle, float pitch, bool first_is_big, bool last_is_big)
double flatYDB_[MAXCUT]
double flatXDB_[MAXCUT]
int cutIndx(int centbin, double vtx, int iord) const
int HiEvtPlaneFlatten::getHBins ( ) const
inline

Definition at line 240 of file HiEvtPlaneFlatten.h.

References hbins_.

Referenced by LoadEPDB::LoadEPDB().

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

Definition at line 245 of file HiEvtPlaneFlatten.h.

References hbins_.

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

Definition at line 242 of file HiEvtPlaneFlatten.h.

References nvtxbins_.

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

Definition at line 241 of file HiEvtPlaneFlatten.h.

References obins_.

Referenced by LoadEPDB::LoadEPDB().

241 { return obins_; }
double HiEvtPlaneFlatten::getPt ( unsigned int  bin) const
inline

Definition at line 255 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and pt_.

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

Definition at line 256 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and pt2_.

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

Definition at line 264 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, MAXCUTOFF, and pt2DB_.

Referenced by getW().

264  {
265  if (bin < MAXCUTOFF) {
266  return pt2DB_[bin];
267  } else {
268  return 0.;
269  }
270  }
static const int MAXCUTOFF
double pt2DB_[MAXCUTOFF]
double HiEvtPlaneFlatten::getPtcnt ( unsigned int  bin) const
inline

Definition at line 271 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and ptcnt_.

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

Definition at line 257 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, MAXCUTOFF, and ptDB_.

Referenced by etScale(), and getW().

257  {
258  if (bin < MAXCUTOFF) {
259  return ptDB_[bin];
260  } else {
261  return 0.;
262  }
263  }
static const int MAXCUTOFF
double ptDB_[MAXCUTOFF]
double HiEvtPlaneFlatten::getVtxMax ( ) const
inline

Definition at line 244 of file HiEvtPlaneFlatten.h.

References delvtx_, minvtx_, and nvtxbins_.

double HiEvtPlaneFlatten::getVtxMin ( ) const
inline

Definition at line 243 of file HiEvtPlaneFlatten.h.

References minvtx_.

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

Definition at line 160 of file HiEvtPlaneFlatten.h.

References etScale(), getPt2DB(), getPtDB(), offsetIndx(), funct::pow(), and pileupReCalc_HLTpaths::scale.

160  {
161  int indx = offsetIndx(centbin, vtx);
162  if (indx >= 0) {
163  double scale = etScale(vtx, centbin);
164  double ptval = getPtDB(indx) * scale;
165  double pt2val = getPt2DB(indx) * pow(scale, 2);
166  double rv = pt * scale - pt2val / ptval;
167  if (ptval > 0)
168  return rv;
169  }
170  return 0.;
171  }
double getPt2DB(unsigned int bin) const
double getPtDB(unsigned int bin) const
double etScale(double vtx, int centbin) const
int offsetIndx(int centbin, double vtx) const
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
double HiEvtPlaneFlatten::getX ( unsigned int  bin) const
inline

Definition at line 247 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and flatX_.

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

Definition at line 272 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and flatXDB_.

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

Definition at line 249 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and xoff_.

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

Definition at line 251 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and xoffDB_.

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

Definition at line 253 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and xyoffcnt_.

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

Definition at line 254 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and xyoffmult_.

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

Definition at line 248 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and flatY_.

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

Definition at line 273 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and flatYDB_.

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

Definition at line 250 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and yoff_.

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

Definition at line 252 of file HiEvtPlaneFlatten.h.

References newFWLiteAna::bin, and yoffDB_.

252 { return yoffDB_[bin]; }
double yoffDB_[MAXCUTOFF]
void HiEvtPlaneFlatten::init ( int  order,
int  nbins,
int  nvtxbins = 10,
double  minvtx = -25,
double  delvtx = 5,
std::string  tag = "",
int  vord = 2 
)
inline

Definition at line 35 of file HiEvtPlaneFlatten.h.

References caloCentRefMaxBin_, caloCentRefMinBin_, delvtx_, flatCnt_, flatX_, flatXDB_, flatY_, flatYDB_, hbins_, hOrder_, mps_fire::i, MAXCUT, minvtx_, hlt_dqm_clientPB-live_cfg::nbins, nbins_, nvtxbins_, obins_, pt2_, pt2DB_, pt_, ptcnt_, ptDB_, vorder_, xoff_, xoffDB_, xyoffcnt_, xyoffmult_, yoff_, and yoffDB_.

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

41  {
42  hOrder_ = order; //order of flattening
43  vorder_ = vord; //1(v1), 2(v2), 3(v3), 4(v4)
44  nvtxbins_ = nvtxbins;
45  nbins_ = nbins;
46  minvtx_ = minvtx;
47  delvtx_ = delvtx;
48 
49  caloCentRefMinBin_ = -1;
50  caloCentRefMaxBin_ = -1;
53  if (hbins_ > MAXCUT) {
54  hbins_ = 1;
55  hOrder_ = 9;
56  }
57  for (int i = 0; i < hbins_; i++) {
58  flatX_[i] = 0;
59  flatY_[i] = 0;
60  flatXDB_[i] = 0;
61  flatYDB_[i] = 0;
62  flatCnt_[i] = 0;
63  }
64  for (int i = 0; i < obins_; i++) {
65  xoff_[i] = 0;
66  yoff_[i] = 0;
67  xoffDB_[i] = 0;
68  yoffDB_[i] = 0;
69  xyoffcnt_[i] = 0;
70  xyoffmult_[i] = 0;
71  pt_[i] = 0;
72  pt2_[i] = 0;
73  ptDB_[i] = 0;
74  pt2DB_[i] = 0;
75  ptcnt_[i] = 0;
76  }
77  }
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]
float HiEvtPlaneFlatten::maxCent ( int  indx) const
inline

Definition at line 218 of file HiEvtPlaneFlatten.h.

References nbins_, and nvtxbins_.

Referenced by rangeString().

218  {
219  int ibin = indx / nvtxbins_;
220  return (ibin + 1) * 100. / nbins_;
221  }
double HiEvtPlaneFlatten::maxVtx ( int  indx) const
inline

Definition at line 228 of file HiEvtPlaneFlatten.h.

References delvtx_, minvtx_, and nvtxbins_.

Referenced by rangeString().

228  {
229  int ivtx = indx - nvtxbins_ * (int)(indx / nvtxbins_);
230  return minvtx_ + (ivtx + 1) * delvtx_;
231  }
float HiEvtPlaneFlatten::minCent ( int  indx) const
inline

Definition at line 213 of file HiEvtPlaneFlatten.h.

References nbins_, and nvtxbins_.

Referenced by rangeString().

213  {
214  int ibin = indx / nvtxbins_;
215  return ibin * 100. / nbins_;
216  }
double HiEvtPlaneFlatten::minVtx ( int  indx) const
inline

Definition at line 223 of file HiEvtPlaneFlatten.h.

References delvtx_, minvtx_, and nvtxbins_.

Referenced by rangeString().

223  {
224  int ivtx = indx - nvtxbins_ * (int)(indx / nvtxbins_);
225  return minvtx_ + ivtx * delvtx_;
226  }
int HiEvtPlaneFlatten::offsetIndx ( int  centbin,
double  vtx 
) const
inline

Definition at line 93 of file HiEvtPlaneFlatten.h.

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

Referenced by coffset(), etScale(), fillOffset(), fillPt(), getW(), and soffset().

93  {
94  int cut;
95  if (centbin < 0)
96  return -1;
97  int ibin = centbin;
98  int ivtx = (vtx - minvtx_) / delvtx_;
99  if (ivtx < 0 || ivtx > nvtxbins_)
100  return -1;
101  cut = nvtxbins_ * ibin + ivtx;
102  if (cut < 0 || cut > hbins_)
103  return -1;
104  return cut;
105  }
double HiEvtPlaneFlatten::offsetPsi ( double  s,
double  c 
) const
inline

Definition at line 204 of file HiEvtPlaneFlatten.h.

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

Referenced by HiEvtPlaneFlatProducer::produce().

204  {
205  double psi = atan2(s, c) / vorder_;
206  if ((fabs(s) < 1e-4) && (fabs(c) < 1e-4))
207  psi = 0.;
208  psi = bounds(psi);
209  psi = bounds2(psi);
210  return psi;
211  }
const edm::EventSetup & c
double bounds(double ang) const
std::map< std::string, int, std::less< std::string > > psi
double bounds2(double ang) const
std::string HiEvtPlaneFlatten::rangeString ( int  indx)
inline

Definition at line 233 of file HiEvtPlaneFlatten.h.

References visDQMUpload::buf, maxCent(), maxVtx(), minCent(), minVtx(), and AlCaHLTBitMon_QueryRunRegistry::string.

233  {
234  char buf[120];
235  sprintf(buf, "%5.1f < cent < %5.1f; %4.1f < vtx < %4.1f", minCent(indx), maxCent(indx), minVtx(indx), maxVtx(indx));
236  return std::string(buf);
237  }
double minVtx(int indx) const
float maxCent(int indx) const
double maxVtx(int indx) const
float minCent(int indx) const
void HiEvtPlaneFlatten::setCaloCentRefBins ( const int  caloCentRefMinBin,
const int  caloCentRefMaxBin 
)
inline

Definition at line 139 of file HiEvtPlaneFlatten.h.

References caloCentRefMaxBin_, and caloCentRefMinBin_.

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

139  {
140  caloCentRefMinBin_ = caloCentRefMinBin;
141  caloCentRefMaxBin_ = caloCentRefMaxBin;
142  }
void HiEvtPlaneFlatten::setCentRes1 ( unsigned int  bin,
double  res,
double  err 
)
inline

Definition at line 299 of file HiEvtPlaneFlatten.h.

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

Referenced by LoadEPDB::LoadEPDB().

299  {
300  if (bin < 100) {
301  centRes1_[bin] = res;
302  centResErr1_[bin] = err;
303  }
304  }
double centResErr1_[100]
void HiEvtPlaneFlatten::setCentRes10 ( unsigned int  bin,
double  res,
double  err 
)
inline

Definition at line 317 of file HiEvtPlaneFlatten.h.

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

317  {
318  if (bin < 10) {
319  centRes10_[bin] = res;
320  centResErr10_[bin] = err;
321  }
322  }
void HiEvtPlaneFlatten::setCentRes2 ( unsigned int  bin,
double  res,
double  err 
)
inline

Definition at line 305 of file HiEvtPlaneFlatten.h.

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

305  {
306  if (bin < 50) {
307  centRes2_[bin] = res;
308  centResErr2_[bin] = err;
309  }
310  }
void HiEvtPlaneFlatten::setCentRes20 ( unsigned int  bin,
double  res,
double  err 
)
inline

Definition at line 323 of file HiEvtPlaneFlatten.h.

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

323  {
324  if (bin < 5) {
325  centRes20_[bin] = res;
326  centResErr20_[bin] = err;
327  }
328  }
void HiEvtPlaneFlatten::setCentRes25 ( unsigned int  bin,
double  res,
double  err 
)
inline

Definition at line 329 of file HiEvtPlaneFlatten.h.

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

329  {
330  if (bin < 4) {
331  centRes25_[bin] = res;
332  centResErr25_[bin] = err;
333  }
334  }
void HiEvtPlaneFlatten::setCentRes30 ( unsigned int  bin,
double  res,
double  err 
)
inline

Definition at line 335 of file HiEvtPlaneFlatten.h.

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

335  {
336  if (bin < 3) {
337  centRes30_[bin] = res;
338  centResErr30_[bin] = err;
339  }
340  }
void HiEvtPlaneFlatten::setCentRes40 ( unsigned int  bin,
double  res,
double  err 
)
inline

Definition at line 341 of file HiEvtPlaneFlatten.h.

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

341  {
342  if (bin < 2) {
343  centRes40_[bin] = res;
344  centResErr40_[bin] = err;
345  }
346  }
void HiEvtPlaneFlatten::setCentRes5 ( unsigned int  bin,
double  res,
double  err 
)
inline

Definition at line 311 of file HiEvtPlaneFlatten.h.

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

311  {
312  if (bin < 20) {
313  centRes5_[bin] = res;
314  centResErr5_[bin] = err;
315  }
316  }
void HiEvtPlaneFlatten::setPt2DB ( unsigned int  indx,
double  val 
)
inline

Definition at line 281 of file HiEvtPlaneFlatten.h.

References pt2DB_, and hgcalPerformanceValidation::val.

Referenced by LoadEPDB::LoadEPDB().

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

Definition at line 280 of file HiEvtPlaneFlatten.h.

References ptDB_, and hgcalPerformanceValidation::val.

Referenced by LoadEPDB::LoadEPDB().

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

Definition at line 276 of file HiEvtPlaneFlatten.h.

References flatXDB_, and hgcalPerformanceValidation::val.

Referenced by LoadEPDB::LoadEPDB().

void HiEvtPlaneFlatten::setXoffDB ( unsigned int  indx,
double  val 
)
inline

Definition at line 278 of file HiEvtPlaneFlatten.h.

References hgcalPerformanceValidation::val, and xoffDB_.

Referenced by LoadEPDB::LoadEPDB().

void HiEvtPlaneFlatten::setYDB ( unsigned int  indx,
double  val 
)
inline

Definition at line 277 of file HiEvtPlaneFlatten.h.

References flatYDB_, and hgcalPerformanceValidation::val.

Referenced by LoadEPDB::LoadEPDB().

void HiEvtPlaneFlatten::setYoffDB ( unsigned int  indx,
double  val 
)
inline

Definition at line 279 of file HiEvtPlaneFlatten.h.

References hgcalPerformanceValidation::val, and yoffDB_.

Referenced by LoadEPDB::LoadEPDB().

double HiEvtPlaneFlatten::soffset ( double  s,
double  vtx,
int  centbin 
) const
inline

Definition at line 187 of file HiEvtPlaneFlatten.h.

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

Referenced by HiEvtPlaneFlatProducer::produce().

187  {
188  int indx = offsetIndx(centbin, vtx);
189  if (indx >= 0) {
190  return s - yoffDB_[indx];
191  } else {
192  return s;
193  }
194  }
double yoffDB_[MAXCUTOFF]
int offsetIndx(int centbin, double vtx) const

Member Data Documentation

int HiEvtPlaneFlatten::caloCentRefMaxBin_
private

Definition at line 518 of file HiEvtPlaneFlatten.h.

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

int HiEvtPlaneFlatten::caloCentRefMinBin_
private

Definition at line 517 of file HiEvtPlaneFlatten.h.

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

double HiEvtPlaneFlatten::centRes10_[10]
private

Definition at line 494 of file HiEvtPlaneFlatten.h.

Referenced by getCentRes10(), and setCentRes10().

double HiEvtPlaneFlatten::centRes1_[100]
private

Definition at line 485 of file HiEvtPlaneFlatten.h.

Referenced by getCentRes1(), and setCentRes1().

double HiEvtPlaneFlatten::centRes20_[5]
private

Definition at line 497 of file HiEvtPlaneFlatten.h.

Referenced by getCentRes20(), and setCentRes20().

double HiEvtPlaneFlatten::centRes25_[4]
private

Definition at line 500 of file HiEvtPlaneFlatten.h.

Referenced by getCentRes25(), and setCentRes25().

double HiEvtPlaneFlatten::centRes2_[50]
private

Definition at line 488 of file HiEvtPlaneFlatten.h.

Referenced by getCentRes2(), and setCentRes2().

double HiEvtPlaneFlatten::centRes30_[3]
private

Definition at line 503 of file HiEvtPlaneFlatten.h.

Referenced by getCentRes30(), and setCentRes30().

double HiEvtPlaneFlatten::centRes40_[2]
private

Definition at line 506 of file HiEvtPlaneFlatten.h.

Referenced by getCentRes40(), and setCentRes40().

double HiEvtPlaneFlatten::centRes5_[20]
private

Definition at line 491 of file HiEvtPlaneFlatten.h.

Referenced by getCentRes5(), and setCentRes5().

double HiEvtPlaneFlatten::centResErr10_[10]
private

Definition at line 495 of file HiEvtPlaneFlatten.h.

Referenced by getCentResErr10(), and setCentRes10().

double HiEvtPlaneFlatten::centResErr1_[100]
private

Definition at line 486 of file HiEvtPlaneFlatten.h.

Referenced by getCentResErr1(), and setCentRes1().

double HiEvtPlaneFlatten::centResErr20_[5]
private

Definition at line 498 of file HiEvtPlaneFlatten.h.

Referenced by getCentResErr20(), and setCentRes20().

double HiEvtPlaneFlatten::centResErr25_[4]
private

Definition at line 501 of file HiEvtPlaneFlatten.h.

Referenced by getCentResErr25(), and setCentRes25().

double HiEvtPlaneFlatten::centResErr2_[50]
private

Definition at line 489 of file HiEvtPlaneFlatten.h.

Referenced by getCentResErr2(), and setCentRes2().

double HiEvtPlaneFlatten::centResErr30_[3]
private

Definition at line 504 of file HiEvtPlaneFlatten.h.

Referenced by getCentResErr30(), and setCentRes30().

double HiEvtPlaneFlatten::centResErr40_[2]
private

Definition at line 507 of file HiEvtPlaneFlatten.h.

Referenced by getCentResErr40(), and setCentRes40().

double HiEvtPlaneFlatten::centResErr5_[20]
private

Definition at line 492 of file HiEvtPlaneFlatten.h.

Referenced by getCentResErr5(), and setCentRes5().

double HiEvtPlaneFlatten::delvtx_
private

Definition at line 512 of file HiEvtPlaneFlatten.h.

Referenced by cutIndx(), getVtxMax(), init(), maxVtx(), minVtx(), and offsetIndx().

double HiEvtPlaneFlatten::flatCnt_[MAXCUT]
private

Definition at line 470 of file HiEvtPlaneFlatten.h.

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

double HiEvtPlaneFlatten::flatX_[MAXCUT]
private

Definition at line 466 of file HiEvtPlaneFlatten.h.

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

double HiEvtPlaneFlatten::flatXDB_[MAXCUT]
private

Definition at line 468 of file HiEvtPlaneFlatten.h.

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

double HiEvtPlaneFlatten::flatY_[MAXCUT]
private

Definition at line 467 of file HiEvtPlaneFlatten.h.

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

double HiEvtPlaneFlatten::flatYDB_[MAXCUT]
private

Definition at line 469 of file HiEvtPlaneFlatten.h.

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

int HiEvtPlaneFlatten::hbins_
private

Definition at line 514 of file HiEvtPlaneFlatten.h.

Referenced by cutIndx(), getHBins(), getNcent(), HiEvtPlaneFlatten(), init(), and offsetIndx().

int HiEvtPlaneFlatten::hOrder_
private

Definition at line 513 of file HiEvtPlaneFlatten.h.

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

const int HiEvtPlaneFlatten::MAXCUT = 10000
staticprivate

Definition at line 463 of file HiEvtPlaneFlatten.h.

Referenced by init().

const int HiEvtPlaneFlatten::MAXCUTOFF = 1000
staticprivate

Definition at line 464 of file HiEvtPlaneFlatten.h.

Referenced by getPt2DB(), and getPtDB().

double HiEvtPlaneFlatten::minvtx_
private

Definition at line 511 of file HiEvtPlaneFlatten.h.

Referenced by cutIndx(), getVtxMax(), getVtxMin(), init(), maxVtx(), minVtx(), and offsetIndx().

int HiEvtPlaneFlatten::nbins_
private

Definition at line 510 of file HiEvtPlaneFlatten.h.

Referenced by init(), maxCent(), and minCent().

int HiEvtPlaneFlatten::nvtxbins_
private
int HiEvtPlaneFlatten::obins_
private

Definition at line 515 of file HiEvtPlaneFlatten.h.

Referenced by getOBins(), and init().

double HiEvtPlaneFlatten::pt2_[MAXCUTOFF]
private

Definition at line 480 of file HiEvtPlaneFlatten.h.

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

double HiEvtPlaneFlatten::pt2DB_[MAXCUTOFF]
private

Definition at line 482 of file HiEvtPlaneFlatten.h.

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

double HiEvtPlaneFlatten::pt_[MAXCUTOFF]
private

Definition at line 479 of file HiEvtPlaneFlatten.h.

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

double HiEvtPlaneFlatten::ptcnt_[MAXCUTOFF]
private

Definition at line 483 of file HiEvtPlaneFlatten.h.

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

double HiEvtPlaneFlatten::ptDB_[MAXCUTOFF]
private

Definition at line 481 of file HiEvtPlaneFlatten.h.

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

int HiEvtPlaneFlatten::vorder_
private

Definition at line 516 of file HiEvtPlaneFlatten.h.

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

double HiEvtPlaneFlatten::xoff_[MAXCUTOFF]
private

Definition at line 472 of file HiEvtPlaneFlatten.h.

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

double HiEvtPlaneFlatten::xoffDB_[MAXCUTOFF]
private

Definition at line 474 of file HiEvtPlaneFlatten.h.

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

double HiEvtPlaneFlatten::xyoffcnt_[MAXCUTOFF]
private

Definition at line 476 of file HiEvtPlaneFlatten.h.

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

uint HiEvtPlaneFlatten::xyoffmult_[MAXCUTOFF]
private

Definition at line 477 of file HiEvtPlaneFlatten.h.

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

double HiEvtPlaneFlatten::yoff_[MAXCUTOFF]
private

Definition at line 473 of file HiEvtPlaneFlatten.h.

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

double HiEvtPlaneFlatten::yoffDB_[MAXCUTOFF]
private

Definition at line 475 of file HiEvtPlaneFlatten.h.

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