60 bool bigInX,
bool bigInY)
62 std::pair<float,float> element;
63 std::pair<float,float>
errors;
68 element = std::pair<float,float>(
index(1, sizex, alpha, beta, bigInX),
69 index(0, sizey, alpha, beta, bigInY));
72 element = std::pair<float,float>(
index(3, sizex, alpha, beta, bigInX),
73 index(2, sizey, alpha, beta, bigInY));
76 throw cms::Exception(
"PixelCPEGenericDBErrorParametrization::getError")
77 <<
"Non-pixel detector type !!!" ;
80 if (bigInX && sizex == 1) errors.first = element.first;
81 else errors.first = parmErrors->
errors()[(int)element.first].sigma;
82 if (bigInY && sizey == 1) errors.second = element.second;
83 else errors.second = parmErrors->
errors()[(int)element.second].sigma;
92 bool bigInX,
bool bigInY)
94 std::pair<float,float> element;
95 std::pair<float,float>
errors;
100 element = std::pair<float,float>(
index(1, sizex, alpha, beta, bigInX),
101 index(0, sizey, alpha, beta, bigInY));
104 element = std::pair<float,float>(
index(3, sizex, alpha, beta, bigInX),
105 index(2, sizey, alpha, beta, bigInY));
108 throw cms::Exception(
"PixelCPEGenericDBErrorParametrization::getError")
109 <<
"Non-pixel detector type !!!" ;
112 if (bigInX && sizex == 1) errors.first = element.first;
113 else errors.first =
errorsH->errors()[(int)element.first].sigma;
114 if (bigInY && sizey == 1) errors.second = element.second;
115 else errors.second =
errorsH->errors()[(int)element.second].sigma;
129 float alpha_rad = -999.9;
130 float betap_rad = -999.9;
135 float binw_a = -999.9;
136 float binw_b = -999.9;
140 betap_rad = fabs(
math_pi/2.0 - beta);
142 if(ind_subpart == 3) alpha_rad = fabs(
math_pi/2.0 - alpha);
143 else alpha_rad = fabs(alpha);
146 if(ind_subpart == 0||ind_subpart == 2)
148 binw_a = (
a_max[ind_subpart][ind_size] -
a_min[ind_subpart][ind_size])/2.0;
149 binw_b = (
b_max[ind_subpart][ind_size] -
b_min[ind_subpart][ind_size])/8.0;
155 binw_a = (
a_max[ind_subpart][ind_size] -
a_min[ind_subpart][ind_size])/8.0;
156 binw_b = (
b_max[ind_subpart][ind_size] -
b_min[ind_subpart][ind_size])/2.0;
162 if ( alpha_rad <
a_min[ind_subpart][ind_size]) ind_alpha = 0;
163 else if ( alpha_rad >=
a_max[ind_subpart][ind_size]) ind_alpha = maxbin_a;
164 else ind_alpha = 1 + (int)((alpha_rad -
a_min[ind_subpart][ind_size])/binw_a);
169 if ( betap_rad <= 0.7 ) ind_beta = 0;
170 else if ( 0.7 < betap_rad && betap_rad <= 1.0 ) ind_beta = 1;
171 else if ( 1.0 < betap_rad && betap_rad <= 1.2 ) ind_beta = 2;
172 else if ( 1.2 <= betap_rad ) ind_beta = 3;
174 else if ( betap_rad <
b_min[ind_subpart][ind_size]) ind_beta = 0;
175 else if ( betap_rad >=
b_max[ind_subpart][ind_size]) ind_beta = maxbin_b;
176 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]
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)
SubDetector subDetGeom[18]
static const float bx_a_min[3]
static const int part_bin_size[4]
DbVector & errors()
Accessors for the vectors – non-const version.
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]
if(conf.exists("allCellsPositionCalc"))
edm::ESHandle< SiPixelCPEGenericErrorParm > errorsH
static const float fx_b_max[2]
tuple size
Write out results.
static const float fy_a_max[2]