292 iEvent.getByToken(rpcDigiToken, rpcDigis);
298 for (
const auto &&rpcdgIt : (*rpcDigis)) {
299 const RPCDetId &rpcId = rpcdgIt.first;
310 for (
const auto &
cl : cls) {
312 int isValid = rpcDigis.
isValid();
315 const int firststrip =
cl.firstStrip();
316 const int clustersize =
cl.clusterSize();
317 const int laststrip =
cl.lastStrip();
322 const float centreOfCluster = (fstrip + lstrip) / 2;
323 const double y =
cl.hasY() ?
cl.y() : 0;
326 const auto &topo = dynamic_cast<const TrapezoidalStripTopology &>(roll->
topology());
327 const double angle = topo.stripAngle((firststrip + laststrip) / 2.);
339 (
region == -1 ? 180. * 32. / 36.5 : 0.) + (
float)
region * global_theta * 32. / 36.5 - 8.5 * 32 / 36.5;
341 if (global_theta < 8.5)
343 if (global_theta > 45.)
345 }
else if (
region == -1) {
346 if (global_theta < 135.)
348 if (global_theta > 171.5)
352 double local_phi = 0.;
357 if ((global_phi > 15.) && (global_phi <= 16.3)) {
358 local_phi = global_phi - 15.;
361 }
else if ((global_phi > 16.3) && (global_phi <= 53.)) {
362 local_phi = global_phi - 15.;
365 }
else if ((global_phi > 53.) && (global_phi <= 75.)) {
366 local_phi = global_phi - 15.;
371 else if ((global_phi > 75.) && (global_phi <= 76.3)) {
372 local_phi = global_phi - 15.;
375 }
else if ((global_phi > 76.3) && (global_phi <= 113.)) {
376 local_phi = global_phi - 75.;
379 }
else if ((global_phi > 113.) && (global_phi <= 135.)) {
380 local_phi = global_phi - 75.;
386 else if ((global_phi > 135.) && (global_phi <= 136.3)) {
387 local_phi = global_phi - 75.;
390 }
else if ((global_phi > 136.3) && (global_phi <= 173.)) {
391 local_phi = global_phi - 135.;
394 }
else if ((global_phi > 173.) && (global_phi <= 180.)) {
395 local_phi = global_phi - 135.;
400 else if ((global_phi < -165.) && (global_phi >= -180.)) {
401 local_phi = global_phi + 225.;
406 else if ((global_phi > -165.) && (global_phi <= -163.7)) {
407 local_phi = global_phi + 225.;
410 }
else if ((global_phi > -163.7) && (global_phi <= -127.)) {
411 local_phi = global_phi + 165.;
414 }
else if ((global_phi > -127.) && (global_phi <= -105.)) {
415 local_phi = global_phi + 165.;
420 else if ((global_phi > -105.) && (global_phi <= -103.7)) {
421 local_phi = global_phi + 165.;
424 }
else if ((global_phi > -103.7) && (global_phi <= -67.)) {
425 local_phi = global_phi + 105.;
428 }
else if ((global_phi > -67.) && (global_phi <= -45.)) {
429 local_phi = global_phi + 105.;
434 else if ((global_phi > -45.) && (global_phi <= -43.7)) {
435 local_phi = global_phi + 105.;
438 }
else if ((global_phi > -43.7) && (global_phi <= -7.)) {
439 local_phi = global_phi + 45.;
442 }
else if ((global_phi > -7.) && (global_phi <= 15.)) {
443 local_phi = global_phi + 45.;
448 int int_phi =
int((local_phi + 22.0) * 15. + .5);
449 double EMTFLink1 = 0.;
450 double EMTFLink2 = 0.;
452 double halfchannel = 0.;
458 assert(0 <= int_phi && int_phi < 1250);
459 assert(0 <= int_theta && int_theta < 32);
461 std::shared_ptr<l1t::CPPFDigi> MainVariables1(
new l1t::CPPFDigi(rpcId,
474 std::shared_ptr<l1t::CPPFDigi> MainVariables2(
new l1t::CPPFDigi(rpcId,
489 if ((EMTFsector1 > 0) && (EMTFsector2 == 0)) {
490 cppfDigis.push_back(*MainVariables1.get());
492 if ((EMTFsector1 > 0) && (EMTFsector2 > 0)) {
493 cppfDigis.push_back(*MainVariables1.get());
494 cppfDigis.push_back(*MainVariables2.get());
496 if ((EMTFsector1 == 0) && (EMTFsector2 == 0)) {