1 #ifndef RecoHI_HiEvtPlaneAlgos_LoadEPDB_h 2 #define RecoHI_HiEvtPlaneAlgos_LoadEPDB_h 35 int flatTableSize = flatparmsDB_->
m_table.size();
37 if (flatTableSize < flat[0]->getHBins() + 2 * flat[0]->getOBins()) {
43 for (
int i = 0;
i < flatTableSize;
i++) {
47 if (indx < 0 || indx >= hi::NumEPNames) {
55 }
else if (
i >= Hbins &&
i < Hbins + Obins) {
59 }
else if (
i >= Hbins + Obins &&
i < Hbins + 2 * Obins) {
60 flat[indx]->
setPtDB(
i - Hbins - Obins, thisBin->
x[
j]);
61 flat[indx]->
setPt2DB(
i - Hbins - Obins, thisBin->
y[
j]);
67 while (flatTableSize > Hbins + 2 * Obins + cbins) {
69 double centbinning = thisBin->
x[0];
70 int ncentbins = (
int)thisBin->
y[0] + 0.01;
73 for (
int j = 0;
j < ncentbins;
j++) {
75 if (fabs(centbinning - 1.) < 0.01) {
77 flat[
i]->setCentRes1(
j, thisBin->
x[
i], thisBin->
y[
i]);
79 if (fabs(centbinning - 2.) < 0.01) {
81 flat[
i]->setCentRes2(
j, thisBin->
x[
i], thisBin->
y[
i]);
83 if (fabs(centbinning - 5.) < 0.01) {
85 flat[
i]->setCentRes5(
j, thisBin->
x[
i], thisBin->
y[
i]);
87 if (fabs(centbinning - 10.) < 0.01) {
89 flat[
i]->setCentRes10(
j, thisBin->
x[
i], thisBin->
y[
i]);
91 if (fabs(centbinning - 20.) < 0.01) {
93 flat[
i]->setCentRes20(
j, thisBin->
x[
i], thisBin->
y[
i]);
95 if (fabs(centbinning - 25.) < 0.01) {
97 flat[
i]->setCentRes25(
j, thisBin->
x[
i], thisBin->
y[
i]);
99 if (fabs(centbinning - 30.) < 0.01) {
101 flat[
i]->setCentRes30(
j, thisBin->
x[
i], thisBin->
y[
i]);
103 if (fabs(centbinning - 40.) < 0.01) {
105 flat[
i]->setCentRes40(
j, thisBin->
x[
i], thisBin->
y[
i]);
109 cbins += ncentbins + 1;
void setXoffDB(unsigned int indx, double val)
void setXDB(unsigned int indx, double val)
void setYDB(unsigned int indx, double val)
void setYoffDB(unsigned int indx, double val)
std::vector< EP > m_table
void setPt2DB(unsigned int indx, double val)
LoadEPDB(const edm::ESHandle< RPFlatParams > flatparmsDB_, HiEvtPlaneFlatten **flat)
void setPtDB(unsigned int indx, double val)
static const int NumEPNames