31 if (
output ==
"stubpairout") {
37 throw cms::Exception(
"BadConfig") << __FILE__ <<
" " << __LINE__ <<
" Could not find output : " <<
output;
45 if (
input ==
"innervmstubin") {
52 if (
input ==
"outervmstubin") {
59 throw cms::Exception(
"BadConfig") << __FILE__ <<
" " << __LINE__ <<
" Could not find input : " <<
input;
66 unsigned int countall = 0;
67 unsigned int countpass = 0;
76 unsigned int nbits = 7;
80 int rzbinfirst = lookupbits.
bits(0, 3);
89 for (
int ibin =
start; ibin <=
last; ibin++) {
104 int ir = ((ibin & 3) << 1) + (rzbin >> 2);
110 if ((rzbin < rzbinfirst) || (rzbin - rzbinfirst > rzdiffmax)) {
122 edm::LogVerbatim(
"Tracklet") <<
"Stub pair rejected because of stub pt cut bends : "
155 int outerrbins = (1 << outerrbits);
159 double innerphimin, innerphimax;
162 double outerphimin, outerphimax;
169 unsigned int nbendbitsinner = 3;
170 unsigned int nbendbitsouter = 3;
179 std::vector<bool> vmbendinner((1 << nbendbitsinner),
false);
180 std::vector<bool> vmbendouter((1 << nbendbitsouter),
false);
182 for (
int iphiinnerbin = 0; iphiinnerbin < innerphibins; iphiinnerbin++) {
183 phiinner[0] = innerphimin + iphiinnerbin * (innerphimax - innerphimin) / innerphibins;
184 phiinner[1] = innerphimin + (iphiinnerbin + 1) * (innerphimax - innerphimin) / innerphibins;
185 for (
int iphiouterbin = 0; iphiouterbin < outerphibins; iphiouterbin++) {
186 phiouter[0] = outerphimin + iphiouterbin * (outerphimax - outerphimin) / outerphibins;
187 phiouter[1] = outerphimin + (iphiouterbin + 1) * (outerphimax - outerphimin) / outerphibins;
188 for (
int irouterbin = 0; irouterbin < outerrbins; irouterbin++) {
199 double bendinnermin = 20.0;
200 double bendinnermax = -20.0;
201 double bendoutermin = 20.0;
202 double bendoutermax = -20.0;
203 double rinvmin = 1.0;
204 for (
int i1 = 0;
i1 < 2;
i1++) {
205 for (
int i2 = 0;
i2 < 2;
i2++) {
206 for (
int i3 = 0;
i3 < 2;
i3++) {
213 double rinv1 =
rinv(phiinner[
i1], phiouter[
i2], rinner, router[
i3]);
218 double abendinner = -
bend(rinner, rinv1, pitchinner);
219 double abendouter = -
bend(router[
i3], rinv1, pitchouter);
220 if (abendinner < bendinnermin)
221 bendinnermin = abendinner;
222 if (abendinner > bendinnermax)
223 bendinnermax = abendinner;
224 if (abendouter < bendoutermin)
225 bendoutermin = abendouter;
226 if (abendouter > bendoutermax)
227 bendoutermax = abendouter;
237 for (
int ibend = 0; ibend < (1 << nbendbitsinner); ibend++) {
243 vmbendinner[ibend] =
true;
247 for (
int ibend = 0; ibend < (1 << nbendbitsouter); ibend++) {
253 vmbendouter[ibend] =
true;
268 ofstream outstubptinnercut;
269 outstubptinnercut.open(
getName() +
"_stubptinnercut.tab");
270 outstubptinnercut <<
"{" << endl;
273 outstubptinnercut <<
"," << endl;
276 outstubptinnercut << endl <<
"};" << endl;
277 outstubptinnercut.close();
279 ofstream outstubptoutercut;
280 outstubptoutercut.open(
getName() +
"_stubptoutercut.tab");
281 outstubptoutercut <<
"{" << endl;
284 outstubptoutercut <<
"," << endl;
287 outstubptoutercut << endl <<
"};" << endl;
288 outstubptoutercut.close();