60 bool bigInX,
bool bigInY)
62 std::pair<float,float> element;
63 std::pair<float,float>
errors;
66 throw cms::Exception(
"PixelCPEGenericDBErrorParametrization::getError")
67 <<
"Non-pixel detector type !!!" ;
69 element = std::pair<float,float>(
index(1, sizex, alpha, beta, bigInX),
70 index(0, sizey, alpha, beta, bigInY));
73 element = std::pair<float,float>(
index(3, sizex, alpha, beta, bigInX),
74 index(2, sizey, alpha, beta, bigInY));
77 if (bigInX && sizex == 1) errors.first = element.first;
78 else errors.first = parmErrors->
errors()[(
int)element.first].sigma;
79 if (bigInY && sizey == 1) errors.second = element.second;
80 else errors.second = parmErrors->
errors()[(
int)element.second].sigma;
89 bool bigInX,
bool bigInY)
91 std::pair<float,float> element;
92 std::pair<float,float>
errors;
95 throw cms::Exception(
"PixelCPEGenericDBErrorParametrization::getError")
96 <<
"Non-pixel detector type !!!" ;
98 element = std::pair<float,float>(
index(1, sizex, alpha, beta, bigInX),
99 index(0, sizey, alpha, beta, bigInY));
102 element = std::pair<float,float>(
index(3, sizex, alpha, beta, bigInX),
103 index(2, sizey, alpha, beta, bigInY));
106 if (bigInX && sizex == 1) errors.first = element.first;
108 if (bigInY && sizey == 1) errors.second = element.second;
123 float alpha_rad = -999.9;
124 float betap_rad = -999.9;
129 float binw_a = -999.9;
130 float binw_b = -999.9;
134 betap_rad = fabs(
math_pi/2.0 - beta);
136 if(ind_subpart == 3) alpha_rad = fabs(
math_pi/2.0 - alpha);
137 else alpha_rad = fabs(alpha);
140 if(ind_subpart == 0||ind_subpart == 2)
142 binw_a = (
a_max[ind_subpart][ind_size] -
a_min[ind_subpart][ind_size])/2.0;
143 binw_b = (
b_max[ind_subpart][ind_size] -
b_min[ind_subpart][ind_size])/8.0;
149 binw_a = (
a_max[ind_subpart][ind_size] -
a_min[ind_subpart][ind_size])/8.0;
150 binw_b = (
b_max[ind_subpart][ind_size] -
b_min[ind_subpart][ind_size])/2.0;
156 if ( alpha_rad <
a_min[ind_subpart][ind_size]) ind_alpha = 0;
157 else if ( alpha_rad >=
a_max[ind_subpart][ind_size]) ind_alpha = maxbin_a;
158 else ind_alpha = 1 + (
int)((alpha_rad -
a_min[ind_subpart][ind_size])/binw_a);
163 if ( betap_rad <= 0.7 ) ind_beta = 0;
164 else if ( 0.7 < betap_rad && betap_rad <= 1.0 ) ind_beta = 1;
165 else if ( 1.0 < betap_rad && betap_rad <= 1.2 ) ind_beta = 2;
166 else if ( 1.2 <= betap_rad ) ind_beta = 3;
168 else if ( betap_rad <
b_min[ind_subpart][ind_size]) ind_beta = 0;
169 else if ( betap_rad >=
b_max[ind_subpart][ind_size]) ind_beta = maxbin_b;
170 else ind_beta = 1 + (
int)((betap_rad -
b_min[ind_subpart][ind_size])/binw_b);
static const int beta_bin_size[4]
static const float by_a_min[6]
static const float bx_a_max[3]
static const float fy_b_max[2]
static const int size_max[4]
bool isBarrel(GeomDetEnumerators::SubDetector m)
SiPixelCPEGenericDBErrorParametrization()
static const float errors_big_pix[4]
std::pair< float, float > getError(const SiPixelCPEGenericErrorParm *parmErrors, GeomDetType::SubDetector pixelPart, int sizex, int sizey, float alpha, float beta, bool bigInX=false, bool bigInY=false)
static const float by_a_max[6]
static const float fx_a_max[2]
void setDBAccess(const edm::EventSetup &es)
static const float * b_min[4]
static const float by_b_min[6]
static const int size_bin_size[4]
static const float fx_b_min[2]
static const float * a_min[4]
~SiPixelCPEGenericDBErrorParametrization()
float index(int ind_subpart, int size, float alpha, float beta, bool big)
static const float bx_a_min[3]
static const int part_bin_size[4]
DbVector & errors()
Accessors for the vectors – non-const version.
bool isTrackerPixel(const GeomDetEnumerators::SubDetector m)
static const float fx_a_min[2]
static const float fy_a_min[2]
static const int alpha_bin_size[4]
static const float * b_max[4]
static const float fy_b_min[2]
static const float * a_max[4]
static const float by_b_max[6]
edm::ESHandle< SiPixelCPEGenericErrorParm > errorsH
static const float fx_b_max[2]
static const float fy_a_max[2]