Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-10-06 02:54:08

0001 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/AlgoMuon.h"
0002 
0003 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0004 
0005 #include <bitset>
0006 #include <iostream>
0007 
0008 bool AlgoMuon::isValid() const {
0009   return getPt() > 0;  //should this realy be pt or quality ?? FIXME
0010 }
0011 
0012 bool AlgoMuon::operator<(const AlgoMuon &o) const {
0013   if (this->getQ() > o.getQ())
0014     return false;
0015   else if (this->getQ() == o.getQ() && this->getDisc() > o.getDisc())
0016     return false;
0017   else if (getQ() == o.getQ() && getDisc() == o.getDisc() && getPatternNumber() > o.getPatternNumber())
0018     return false;
0019   else if (getQ() == o.getQ() && getDisc() == o.getDisc() && getPatternNumber() == o.getPatternNumber() &&
0020            getRefHitNumber() < o.getRefHitNumber())
0021     return false;
0022   else
0023     return true;
0024 }
0025 
0026 std::ostream &operator<<(std::ostream &out, const AlgoMuon &o) {
0027   out << "AlgoMuon: ";
0028   out << " pt: " << o.getPt() << ", phi: " << o.getPhi() << ", eta: " << o.getEtaHw()
0029       << ", hits: " << std::bitset<18>(o.getFiredLayerBits()).to_string() << ", q: " << o.getQ()
0030       << ", bx: " << o.getBx() << ", charge: " << o.getCharge() << ", disc: " << o.getDisc()
0031       << " refLayer: " << o.getRefLayer() << " m_patNumb: " << o.getPatternNumber();
0032 
0033   return out;
0034 }