299 for (TrackingGeometry::DetContainer::const_iterator iDet = rpcGeom->
dets().begin(); iDet < rpcGeom->
dets().end();
305 if (dynamic_cast<const RPCChamber *>(*iDet) ==
nullptr)
308 auto chamb =
dynamic_cast<const RPCChamber *
>(*iDet);
309 std::vector<const RPCRoll *> rolls = (chamb->rolls());
312 for (
auto &iRoll : rolls) {
315 typedef std::pair<RPCRecHitCollection::const_iterator, RPCRecHitCollection::const_iterator> rangeRecHits;
316 rangeRecHits recHitCollection = recHits->get(rpcId);
324 int Bx = rechit_it->BunchX();
325 int isValid = rechit_it->isValid();
326 int firststrip = rechit_it->firstClusterStrip();
327 int clustersize = rechit_it->clusterSize();
338 (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)
353 double local_phi = 0.;
358 if ((global_phi > 15.) && (global_phi <= 16.3)) {
359 local_phi = global_phi - 15.;
362 }
else if ((global_phi > 16.3) && (global_phi <= 53.)) {
363 local_phi = global_phi - 15.;
366 }
else if ((global_phi > 53.) && (global_phi <= 75.)) {
367 local_phi = global_phi - 15.;
372 else if ((global_phi > 75.) && (global_phi <= 76.3)) {
373 local_phi = global_phi - 15.;
376 }
else if ((global_phi > 76.3) && (global_phi <= 113.)) {
377 local_phi = global_phi - 75.;
380 }
else if ((global_phi > 113.) && (global_phi <= 135.)) {
381 local_phi = global_phi - 75.;
387 else if ((global_phi > 135.) && (global_phi <= 136.3)) {
388 local_phi = global_phi - 75.;
391 }
else if ((global_phi > 136.3) && (global_phi <= 173.)) {
392 local_phi = global_phi - 135.;
395 }
else if ((global_phi > 173.) && (global_phi <= 180.)) {
396 local_phi = global_phi - 135.;
401 else if ((global_phi < -165.) && (global_phi >= -180.)) {
402 local_phi = global_phi + 225.;
407 else if ((global_phi > -165.) && (global_phi <= -163.7)) {
408 local_phi = global_phi + 225.;
411 }
else if ((global_phi > -163.7) && (global_phi <= -127.)) {
412 local_phi = global_phi + 165.;
415 }
else if ((global_phi > -127.) && (global_phi <= -105.)) {
416 local_phi = global_phi + 165.;
421 else if ((global_phi > -105.) && (global_phi <= -103.7)) {
422 local_phi = global_phi + 165.;
425 }
else if ((global_phi > -103.7) && (global_phi <= -67.)) {
426 local_phi = global_phi + 105.;
429 }
else if ((global_phi > -67.) && (global_phi <= -45.)) {
430 local_phi = global_phi + 105.;
435 else if ((global_phi > -45.) && (global_phi <= -43.7)) {
436 local_phi = global_phi + 105.;
439 }
else if ((global_phi > -43.7) && (global_phi <= -7.)) {
440 local_phi = global_phi + 45.;
443 }
else if ((global_phi > -7.) && (global_phi <= 15.)) {
444 local_phi = global_phi + 45.;
449 int int_phi =
int((local_phi + 22.0) * 15. + .5);
451 double EMTFLink1 = 0.;
452 double EMTFLink2 = 0.;
454 double halfchannel = 0.;
460 assert(0 <= int_phi && int_phi < 1250);
461 assert(0 <= int_theta && int_theta < 32);
463 std::shared_ptr<l1t::CPPFDigi> MainVariables1(
new l1t::CPPFDigi(rpcId,
476 std::shared_ptr<l1t::CPPFDigi> MainVariables2(
new l1t::CPPFDigi(rpcId,
491 if ((EMTFsector1 > 0) && (EMTFsector2 == 0)) {
492 cppfDigis.push_back(*MainVariables1.get());
494 if ((EMTFsector1 > 0) && (EMTFsector2 > 0)) {
495 cppfDigis.push_back(*MainVariables1.get());
496 cppfDigis.push_back(*MainVariables2.get());
498 if ((EMTFsector1 == 0) && (EMTFsector2 == 0)) {
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Geom::Phi< T > phi() const
T1 value() const
Explicit access to value in case implicit conversion not OK.
const Plane & surface() const
The nominal surface of the GeomDet.
Geom::Theta< T > theta() const
C::const_iterator const_iterator
constant access iterator type
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
double rad_to_deg(double rad)
const RPCRoll * roll(RPCDetId id) const
Return a roll given its id.
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.