20 if (verbose)
std::cout <<
"\n========== RPC Primitive Converter ==========" << std::endl;
23 for (std::vector<L1TMuon::TriggerPrimitive>::iterator iter = TrigPrim.begin(); iter != TrigPrim.end(); iter++) {
32 if ( SectIndex != (detID.
sector() - 1) + (detID.
region() == -1)*6 )
continue;
40 tmpHits.push_back( thisHit );
44 for (
unsigned int iHit = 0; iHit < tmpHits.size(); iHit++) {
48 bool hit_in_cluster =
false;
49 for (
unsigned int jHit = 0; jHit < clustHits.size(); jHit++) {
54 if (hit_in_cluster)
continue;
58 int prevHi = -999, prevLow = -999;
63 for (
unsigned int jHit = 0; jHit < tmpHits.size(); jHit++) {
64 if (iHit == jHit)
continue;
74 std::unique_ptr<const RPCRoll> roll(rpc_geom->
roll( hit1.
RPC_DetId() ));
81 float glob_phi_hi = gpHi.
phi();
82 float glob_phi_low = gpLow.
phi();
83 float glob_phi = (glob_phi_hi + glob_phi_low) / 2.0;
84 float glob_eta = (gpHi.
eta() + gpLow.
eta()) / 2.0;
86 if (verbose)
std::cout <<
"RPC cluster phi = " << glob_phi <<
" (" << glob_phi_hi <<
", " << glob_phi_low
87 <<
"), eta = " << glob_eta <<
" (" << gpHi.
eta() <<
", " << gpLow.
eta() <<
")" << std::endl;
92 clustHits.push_back( hit1 );
105 std::vector<ConvertedHit>
108 std::vector<ConvertedHit> ConvHits;
109 for (
unsigned int iHit = 0; iHit < exHits.size(); iHit++) {
125 ConvHits.push_back(ConvHit);
void set_strip_low(int bits)
bool sameRpcChamber(l1t::EMTFHit2016Extra hitA, l1t::EMTFHit2016Extra hitB)
void SetNeighbor(int neighbor)
Geom::Phi< T > phi() const
void set_strip_hi(int bits)
const RPCData getRPCData() const
void SetTP(L1TMuon::TriggerPrimitive tp)
std::vector< EMTFHit2016Extra > EMTFHit2016ExtraCollection
Abs< T >::type abs(const T &t)
l1t::EMTFHit2016ExtraCollection convert(std::vector< L1TMuon::TriggerPrimitive > TriggPrim, int SectIndex, edm::ESHandle< RPCGeometry > rpc_geom)
void set_sector_index(int bits)
void ImportRPCDetId(const RPCDetId &_detId)
void ImportRPCDigi(const RPCDigi &_digi)
std::vector< ConvertedHit > fillConvHits(l1t::EMTFHit2016ExtraCollection exHits)
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
RPCDetId RPC_DetId() const
void SetValues(int phi, int theta, int ph_hit, int phzvl, int station, int sub, int id, int quality, int pattern, int wire, int strip, int BX)
const RPCRoll * roll(RPCDetId id) const
Return a roll given its id.
void SetSectorIndex(int sectorIndex)
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.