Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:12:32

0001 #include "L1Trigger/L1TMuon/interface/MuonTriggerPrimitive.h"
0002 
0003 // Muon primitive digi types
0004 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambPhDigi.h"
0005 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambThDigi.h"
0006 #include "DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigi.h"
0007 #include "DataFormats/RPCRecHit/interface/RPCRecHit.h"
0008 #include "DataFormats/RPCDigi/interface/RPCDigi.h"
0009 #include "DataFormats/L1TMuon/interface/CPPFDigi.h"
0010 #include "DataFormats/GEMDigi/interface/GEMPadDigiCluster.h"
0011 #include "DataFormats/GEMDigi/interface/ME0TriggerDigi.h"
0012 
0013 // Muon detector ID types
0014 #include "DataFormats/MuonDetId/interface/DTChamberId.h"
0015 #include "DataFormats/MuonDetId/interface/CSCDetId.h"
0016 #include "DataFormats/MuonDetId/interface/RPCDetId.h"
0017 #include "DataFormats/MuonDetId/interface/GEMDetId.h"
0018 #include "DataFormats/MuonDetId/interface/ME0DetId.h"
0019 
0020 #include <iostream>
0021 
0022 using namespace L1TMuon;
0023 
0024 namespace {
0025   const char subsystem_names[][4] = {"DT", "CSC", "RPC", "GEM", "ME0"};
0026 }
0027 
0028 // _____________________________________________________________________________
0029 // Constructors from DT data
0030 TriggerPrimitive::TriggerPrimitive(const DTChamberId& detid,
0031                                    const L1MuDTChambPhDigi& digi_phi,
0032                                    const int segment_number)
0033     : _id(detid), _subsystem(L1TMuon::kDT) {
0034   calculateGlobalSector(detid, _globalsector, _subsector);
0035   _eta = 0.;
0036   _phi = 0.;
0037   _rho = 0.;
0038   _theta = 0.;
0039   // fill in information from theta trigger
0040   _dt.theta_bti_group = -1;
0041   _dt.segment_number = segment_number;
0042   _dt.theta_code = -1;
0043   _dt.theta_quality = -1;
0044   // now phi trigger
0045   _dt.bx = digi_phi.bxNum();
0046   _dt.wheel = digi_phi.whNum();
0047   _dt.sector = digi_phi.scNum();
0048   _dt.station = digi_phi.stNum();
0049   _dt.radialAngle = digi_phi.phi();
0050   _dt.bendingAngle = digi_phi.phiB();
0051   _dt.qualityCode = digi_phi.code();
0052   _dt.Ts2TagCode = digi_phi.Ts2Tag();
0053   _dt.BxCntCode = digi_phi.BxCnt();
0054   _dt.RpcBit = digi_phi.RpcBit();
0055 }
0056 
0057 TriggerPrimitive::TriggerPrimitive(const DTChamberId& detid,
0058                                    const L1MuDTChambThDigi& digi_th,
0059                                    const int theta_bti_group)
0060     : _id(detid), _subsystem(L1TMuon::kDT) {
0061   calculateGlobalSector(detid, _globalsector, _subsector);
0062   _eta = 0.;
0063   _phi = 0.;
0064   _rho = 0.;
0065   _theta = 0.;
0066   // fill in information from theta trigger
0067   _dt.theta_bti_group = theta_bti_group;
0068   _dt.segment_number = digi_th.position(theta_bti_group);
0069   _dt.theta_code = digi_th.code(theta_bti_group);
0070   _dt.theta_quality = digi_th.quality(theta_bti_group);
0071   // now phi trigger
0072   _dt.bx = digi_th.bxNum();
0073   _dt.wheel = digi_th.whNum();
0074   _dt.sector = digi_th.scNum();
0075   _dt.station = digi_th.stNum();
0076   _dt.radialAngle = -1;
0077   _dt.bendingAngle = -1;
0078   _dt.qualityCode = -1;
0079   _dt.Ts2TagCode = -1;
0080   _dt.BxCntCode = -1;
0081   _dt.RpcBit = -10;
0082 }
0083 
0084 TriggerPrimitive::TriggerPrimitive(const DTChamberId& detid,
0085                                    const L1MuDTChambPhDigi& digi_phi,
0086                                    const L1MuDTChambThDigi& digi_th,
0087                                    const int theta_bti_group)
0088     : _id(detid), _subsystem(L1TMuon::kDT) {
0089   calculateGlobalSector(detid, _globalsector, _subsector);
0090   _eta = 0.;
0091   _phi = 0.;
0092   _rho = 0.;
0093   _theta = 0.;
0094   // fill in information from theta trigger
0095   _dt.theta_bti_group = theta_bti_group;
0096   _dt.segment_number = digi_th.position(theta_bti_group);
0097   _dt.theta_code = digi_th.code(theta_bti_group);
0098   _dt.theta_quality = digi_th.quality(theta_bti_group);
0099   // now phi trigger
0100   _dt.bx = digi_phi.bxNum();
0101   _dt.wheel = digi_phi.whNum();
0102   _dt.sector = digi_phi.scNum();
0103   _dt.station = digi_phi.stNum();
0104   _dt.radialAngle = digi_phi.phi();
0105   _dt.bendingAngle = digi_phi.phiB();
0106   _dt.qualityCode = digi_phi.code();
0107   _dt.Ts2TagCode = digi_phi.Ts2Tag();
0108   _dt.BxCntCode = digi_phi.BxCnt();
0109   _dt.RpcBit = digi_phi.RpcBit();
0110 }
0111 
0112 // _____________________________________________________________________________
0113 // Constructor from CSC data
0114 TriggerPrimitive::TriggerPrimitive(const CSCDetId& detid, const CSCCorrelatedLCTDigi& digi)
0115     : _id(detid), _subsystem(L1TMuon::kCSC) {
0116   calculateGlobalSector(detid, _globalsector, _subsector);
0117   _eta = 0.;
0118   _phi = 0.;
0119   _rho = 0.;
0120   _theta = 0.;
0121   _csc.trknmb = digi.getTrknmb();
0122   _csc.valid = digi.isValid();
0123   _csc.quality = digi.getQuality();
0124   _csc.keywire = digi.getKeyWG();
0125   _csc.strip = digi.getStrip();
0126   _csc.pattern = digi.getPattern();
0127   _csc.bend = digi.getBend();
0128   _csc.bx = digi.getBX();
0129   _csc.mpclink = digi.getMPCLink();
0130   _csc.bx0 = digi.getBX0();
0131   _csc.syncErr = digi.getSyncErr();
0132   _csc.cscID = digi.getCSCID();
0133   _csc.alct_quality = digi.getALCT().getQuality();
0134   _csc.clct_quality = digi.getCLCT().getQuality();
0135   // run-3
0136   _csc.pattern_run3 = digi.getRun3Pattern();
0137   _csc.slope = digi.getSlope();
0138   _csc.strip_quart_bit = digi.getQuartStripBit();
0139   _csc.strip_eighth_bit = digi.getEighthStripBit();
0140   _csc.strip_quart = digi.getStrip(4);
0141   _csc.strip_eighth = digi.getStrip(8);
0142 
0143   // Use ME1/1a --> ring 4 convention
0144   const bool is_me11a = (detid.station() == 1 && detid.ring() == 1 && digi.getStrip() >= 128);
0145   if (is_me11a) {
0146     _id = CSCDetId(detid.endcap(), detid.station(), 4, detid.chamber(), detid.layer());
0147     _csc.strip = digi.getStrip() - 128;
0148   }
0149 }
0150 
0151 // _____________________________________________________________________________
0152 // Constructors from RPC data
0153 TriggerPrimitive::TriggerPrimitive(const RPCDetId& detid, const RPCDigi& digi) : _id(detid), _subsystem(L1TMuon::kRPC) {
0154   calculateGlobalSector(detid, _globalsector, _subsector);
0155   _eta = 0.;
0156   _phi = 0.;
0157   _rho = 0.;
0158   _theta = 0.;
0159   _rpc.strip = digi.strip();
0160   _rpc.strip_low = digi.strip();
0161   _rpc.strip_hi = digi.strip();
0162   _rpc.phi_int = 0;
0163   _rpc.theta_int = 0;
0164   _rpc.emtf_sector = 0;
0165   _rpc.emtf_link = 0;
0166   _rpc.bx = digi.bx();
0167   _rpc.valid = 1;
0168   _rpc.x = digi.hasX() ? digi.coordinateX() : -999999.;
0169   _rpc.y = digi.hasY() ? digi.coordinateY() : -999999.;
0170   _rpc.time = digi.hasTime() ? digi.time() : -999999.;
0171   _rpc.isCPPF = false;
0172 }
0173 
0174 TriggerPrimitive::TriggerPrimitive(const RPCDetId& detid, const RPCRecHit& rechit)
0175     : _id(detid), _subsystem(L1TMuon::kRPC) {
0176   calculateGlobalSector(detid, _globalsector, _subsector);
0177   _eta = 0.;
0178   _phi = 0.;
0179   _rho = 0.;
0180   _theta = 0.;
0181   _rpc.strip = rechit.firstClusterStrip() + (rechit.clusterSize() - 1) / 2;
0182   _rpc.strip_low = rechit.firstClusterStrip();
0183   _rpc.strip_hi = rechit.firstClusterStrip() + rechit.clusterSize() - 1;
0184   _rpc.phi_int = 0;
0185   _rpc.theta_int = 0;
0186   _rpc.emtf_sector = 0;
0187   _rpc.emtf_link = 0;
0188   _rpc.bx = rechit.BunchX();
0189   _rpc.valid = 1;
0190   _rpc.x = rechit.localPosition().x();
0191   _rpc.y = rechit.localPosition().y();
0192   _rpc.time = rechit.time();
0193   _rpc.isCPPF = false;
0194 }
0195 
0196 // _____________________________________________________________________________
0197 // Constructor from CPPF data
0198 TriggerPrimitive::TriggerPrimitive(const RPCDetId& detid, const l1t::CPPFDigi& digi)
0199     : _id(detid), _subsystem(L1TMuon::kRPC) {
0200   calculateGlobalSector(detid, _globalsector, _subsector);
0201   _eta = 0.;
0202   _phi = 0.;
0203   _rho = 0.;
0204   _theta = 0.;
0205   // In unpacked CPPF digis, the strip number and cluster size are not available, and are set to -99
0206   _rpc.strip = (digi.first_strip() < 0 ? 0 : digi.first_strip() + ((digi.cluster_size() - 1) / 2));
0207   _rpc.strip_low = (digi.first_strip() < 0 ? 0 : digi.first_strip());
0208   _rpc.strip_hi = (digi.first_strip() < 0 ? 0 : digi.first_strip() + digi.cluster_size() - 1);
0209   _rpc.phi_int = digi.phi_int();
0210   _rpc.theta_int = digi.theta_int();
0211   _rpc.emtf_sector = digi.emtf_sector();
0212   _rpc.emtf_link = digi.emtf_link();
0213   _rpc.bx = digi.bx();
0214   _rpc.valid = digi.valid();
0215   _rpc.x = -999999.;
0216   _rpc.y = -999999.;
0217   _rpc.time = -999999.;
0218   _rpc.isCPPF = true;
0219 }
0220 
0221 // _____________________________________________________________________________
0222 // Constructor from GEM data
0223 TriggerPrimitive::TriggerPrimitive(const GEMDetId& detid, const GEMPadDigiCluster& digi)
0224     : _id(detid), _subsystem(L1TMuon::kGEM) {
0225   calculateGlobalSector(detid, _globalsector, _subsector);
0226   _eta = 0.;
0227   _phi = 0.;
0228   _rho = 0.;
0229   _theta = 0.;
0230   _gem.pad = digi.pads().front() + ((digi.pads().size() - 1) / 2);
0231   _gem.pad_low = digi.pads().front();
0232   _gem.pad_hi = digi.pads().front() + digi.pads().size() - 1;
0233   _gem.bx = digi.bx();
0234 }
0235 
0236 // _____________________________________________________________________________
0237 // Constructor from ME0 data
0238 TriggerPrimitive::TriggerPrimitive(const ME0DetId& detid, const ME0TriggerDigi& digi)
0239     : _id(detid), _subsystem(L1TMuon::kME0) {
0240   calculateGlobalSector(detid, _globalsector, _subsector);
0241   _eta = 0.;
0242   _phi = 0.;
0243   _rho = 0.;
0244   _theta = 0.;
0245   _me0.chamberid = digi.getChamberid();
0246   _me0.quality = digi.getQuality();
0247   _me0.phiposition = digi.getPhiposition();
0248   _me0.partition = digi.getPartition();
0249   _me0.deltaphi = digi.getDeltaphi();
0250   _me0.bend = digi.getBend();
0251   _me0.bx = digi.getBX();
0252 }
0253 
0254 // _____________________________________________________________________________
0255 // Copy constructor
0256 TriggerPrimitive::TriggerPrimitive(const TriggerPrimitive& tp)
0257     : _dt(tp._dt),
0258       _csc(tp._csc),
0259       _rpc(tp._rpc),
0260       _gem(tp._gem),
0261       _me0(tp._me0),
0262       _id(tp._id),
0263       _subsystem(tp._subsystem),
0264       _globalsector(tp._globalsector),
0265       _subsector(tp._subsector),
0266       _eta(tp._eta),
0267       _phi(tp._phi),
0268       _rho(tp._rho),
0269       _theta(tp._theta) {}
0270 
0271 TriggerPrimitive& TriggerPrimitive::operator=(const TriggerPrimitive& tp) {
0272   this->_dt = tp._dt;
0273   this->_csc = tp._csc;
0274   this->_rpc = tp._rpc;
0275   this->_gem = tp._gem;
0276   this->_me0 = tp._me0;
0277   this->_id = tp._id;
0278   this->_subsystem = tp._subsystem;
0279   this->_globalsector = tp._globalsector;
0280   this->_subsector = tp._subsector;
0281   this->_eta = tp._eta;
0282   this->_phi = tp._phi;
0283   this->_rho = tp._rho;
0284   this->_theta = tp._theta;
0285   return *this;
0286 }
0287 
0288 bool TriggerPrimitive::operator==(const TriggerPrimitive& tp) const {
0289   // Copied from Numpy
0290   // https://github.com/numpy/numpy/blob/v1.14.0/numpy/core/numeric.py#L2260-L2355
0291   auto isclose = [](float a, float b, float rtol = 1.e-5, float atol = 1.e-8) {
0292     return std::abs(a - b) <= (atol + rtol * std::abs(b));
0293   };
0294 
0295   switch (_subsystem) {
0296     case kDT:
0297       return (this->_dt.bx == tp._dt.bx && this->_dt.wheel == tp._dt.wheel && this->_dt.sector == tp._dt.sector &&
0298               this->_dt.station == tp._dt.station && this->_dt.radialAngle == tp._dt.radialAngle &&
0299               this->_dt.bendingAngle == tp._dt.bendingAngle && this->_dt.qualityCode == tp._dt.qualityCode &&
0300               this->_dt.Ts2TagCode == tp._dt.Ts2TagCode && this->_dt.BxCntCode == tp._dt.BxCntCode &&
0301               this->_dt.RpcBit == tp._dt.RpcBit && this->_dt.theta_bti_group == tp._dt.theta_bti_group &&
0302               this->_dt.segment_number == tp._dt.segment_number && this->_dt.theta_code == tp._dt.theta_code &&
0303               this->_dt.theta_quality == tp._dt.theta_quality && this->_id == tp._id &&
0304               this->_subsystem == tp._subsystem && this->_globalsector == tp._globalsector &&
0305               this->_subsector == tp._subsector);
0306     case kCSC:
0307       return (this->_csc.trknmb == tp._csc.trknmb && this->_csc.valid == tp._csc.valid &&
0308               this->_csc.quality == tp._csc.quality && this->_csc.keywire == tp._csc.keywire &&
0309               this->_csc.strip == tp._csc.strip && this->_csc.pattern == tp._csc.pattern &&
0310               this->_csc.bend == tp._csc.bend && this->_csc.bx == tp._csc.bx && this->_csc.mpclink == tp._csc.mpclink &&
0311               this->_csc.bx0 == tp._csc.bx0 && this->_csc.syncErr == tp._csc.syncErr &&
0312               this->_csc.cscID == tp._csc.cscID && this->_csc.alct_quality == tp._csc.alct_quality &&
0313               this->_csc.clct_quality == tp._csc.clct_quality && this->_id == tp._id &&
0314               this->_subsystem == tp._subsystem && this->_globalsector == tp._globalsector &&
0315               this->_subsector == tp._subsector);
0316     case kRPC:
0317       return (this->_rpc.strip == tp._rpc.strip && this->_rpc.strip_low == tp._rpc.strip_low &&
0318               this->_rpc.strip_hi == tp._rpc.strip_hi && this->_rpc.phi_int == tp._rpc.phi_int &&
0319               this->_rpc.theta_int == tp._rpc.theta_int && this->_rpc.emtf_sector == tp._rpc.emtf_sector &&
0320               this->_rpc.emtf_link == tp._rpc.emtf_link && this->_rpc.bx == tp._rpc.bx &&
0321               this->_rpc.valid == tp._rpc.valid && isclose(this->_rpc.x, tp._rpc.x) &&  // floating-point
0322               isclose(this->_rpc.y, tp._rpc.y) &&                                       // floating-point
0323               isclose(this->_rpc.time, tp._rpc.time) &&                                 // floating-point
0324               this->_rpc.isCPPF == tp._rpc.isCPPF && this->_id == tp._id && this->_subsystem == tp._subsystem &&
0325               this->_globalsector == tp._globalsector && this->_subsector == tp._subsector);
0326     case kGEM:
0327       return (this->_gem.pad == tp._gem.pad && this->_gem.pad_low == tp._gem.pad_low &&
0328               this->_gem.pad_hi == tp._gem.pad_hi && this->_gem.bx == tp._gem.bx && this->_id == tp._id &&
0329               this->_subsystem == tp._subsystem && this->_globalsector == tp._globalsector &&
0330               this->_subsector == tp._subsector);
0331     case kME0:
0332       return (this->_me0.chamberid == tp._me0.chamberid && this->_me0.quality == tp._me0.quality &&
0333               this->_me0.phiposition == tp._me0.phiposition && this->_me0.partition == tp._me0.partition &&
0334               this->_me0.deltaphi == tp._me0.deltaphi && this->_me0.bend == tp._me0.bend &&
0335               this->_me0.bx == tp._me0.bx && this->_id == tp._id && this->_subsystem == tp._subsystem &&
0336               this->_globalsector == tp._globalsector && this->_subsector == tp._subsector);
0337     default:
0338       throw cms::Exception("Invalid Subsystem")
0339           << "The specified subsystem for this track stub is out of range" << std::endl;
0340   }
0341   return false;
0342 }
0343 
0344 // _____________________________________________________________________________
0345 int TriggerPrimitive::getBX() const {
0346   switch (_subsystem) {
0347     case kDT:
0348       return _dt.bx;
0349     case kCSC:
0350       return _csc.bx;
0351     case kRPC:
0352       return _rpc.bx;
0353     case kGEM:
0354       return _gem.bx;
0355     case kME0:
0356       return _me0.bx;
0357     default:
0358       throw cms::Exception("Invalid Subsystem")
0359           << "The specified subsystem for this track stub is out of range" << std::endl;
0360   }
0361   return -1;
0362 }
0363 
0364 int TriggerPrimitive::getStrip() const {
0365   switch (_subsystem) {
0366     case kDT:
0367       return _dt.radialAngle;
0368     case kCSC:
0369       return _csc.strip;
0370     case kRPC:
0371       return _rpc.strip;
0372     case kGEM:
0373       return _gem.pad;
0374     case kME0:
0375       return _me0.phiposition;
0376     default:
0377       throw cms::Exception("Invalid Subsystem")
0378           << "The specified subsystem for this track stub is out of range" << std::endl;
0379   }
0380   return -1;
0381 }
0382 
0383 int TriggerPrimitive::getWire() const {
0384   switch (_subsystem) {
0385     case kDT:
0386       return _dt.theta_bti_group;
0387     case kCSC:
0388       return _csc.keywire;
0389     case kRPC:
0390       return -1;
0391     case kGEM:
0392       return -1;
0393     case kME0:
0394       return -1;
0395     default:
0396       throw cms::Exception("Invalid Subsystem")
0397           << "The specified subsystem for this track stub is out of range" << std::endl;
0398   }
0399   return -1;
0400 }
0401 
0402 int TriggerPrimitive::getPattern() const {
0403   switch (_subsystem) {
0404     case kDT:
0405       return -1;
0406     case kCSC:
0407       return _csc.pattern;
0408     case kRPC:
0409       return -1;
0410     case kGEM:
0411       return -1;
0412     case kME0:
0413       return -1;
0414     default:
0415       throw cms::Exception("Invalid Subsystem")
0416           << "The specified subsystem for this track stub is out of range" << std::endl;
0417   }
0418   return -1;
0419 }
0420 
0421 void TriggerPrimitive::print(std::ostream& out) const {
0422   unsigned idx = (unsigned)_subsystem;
0423   out << subsystem_names[idx] << " Trigger Primitive" << std::endl;
0424   out << "eta: " << _eta << " phi: " << _phi << " rho: " << _rho << " theta: " << _theta << std::endl;
0425   switch (_subsystem) {
0426     case kDT:
0427       out << detId<DTChamberId>() << std::endl;
0428       out << "Local BX      : " << _dt.bx << std::endl;
0429       out << "Segment Nmb   : " << _dt.segment_number << std::endl;
0430       out << "Packed Phi    : " << _dt.radialAngle << std::endl;
0431       out << "Packed Bend   : " << _dt.bendingAngle << std::endl;
0432       out << "Quality Code  : " << _dt.qualityCode << std::endl;
0433       out << "Ts2Tag Code   : " << _dt.Ts2TagCode << std::endl;
0434       out << "BxCnt Code    : " << _dt.BxCntCode << std::endl;
0435       out << "RPC Bit       : " << _dt.RpcBit << std::endl;
0436       out << "Theta BTI Grp : " << _dt.theta_bti_group << std::endl;
0437       out << "Theta Code    : " << _dt.theta_code << std::endl;
0438       out << "Theta Quality : " << _dt.theta_quality << std::endl;
0439       break;
0440     case kCSC:
0441       out << detId<CSCDetId>() << std::endl;
0442       out << "Local BX      : " << _csc.bx << std::endl;
0443       out << "Segment Nmb   : " << _csc.trknmb << std::endl;
0444       out << "Segment Valid : " << _csc.valid << std::endl;
0445       out << "Quality Code  : " << _csc.quality << std::endl;
0446       out << "Key Wire Grp  : " << _csc.keywire << std::endl;
0447       out << "Half-Strip    : " << _csc.strip << std::endl;
0448       out << "CLCT Pattern  : " << _csc.pattern << std::endl;
0449       out << "Packed Bend   : " << _csc.bend << std::endl;
0450       out << "MPC Link      : " << _csc.mpclink << std::endl;
0451       out << "BX0           : " << _csc.bx0 << std::endl;
0452       out << "Sync Error    : " << _csc.syncErr << std::endl;
0453       out << "CSCID         : " << _csc.cscID << std::endl;
0454       out << "ALCT Quality  : " << _csc.alct_quality << std::endl;
0455       out << "CLCT Quality  : " << _csc.clct_quality << std::endl;
0456       break;
0457     case kRPC:
0458       out << detId<RPCDetId>() << std::endl;
0459       out << "Local BX      : " << _rpc.bx << std::endl;
0460       out << "Strip         : " << _rpc.strip << std::endl;
0461       out << "Strip low     : " << _rpc.strip_low << std::endl;
0462       out << "Strip high    : " << _rpc.strip_hi << std::endl;
0463       out << "Integer phi   : " << _rpc.phi_int << std::endl;
0464       out << "Integer theta : " << _rpc.theta_int << std::endl;
0465       out << "EMTF sector   : " << _rpc.emtf_sector << std::endl;
0466       out << "EMTF link     : " << _rpc.emtf_link << std::endl;
0467       out << "Valid         : " << _rpc.valid << std::endl;
0468       out << "Local x       : " << _rpc.x << std::endl;
0469       out << "Local y       : " << _rpc.y << std::endl;
0470       out << "Time          : " << _rpc.time << std::endl;
0471       out << "IsCPPF        : " << _rpc.isCPPF << std::endl;
0472       break;
0473     case kGEM:
0474       out << detId<GEMDetId>() << std::endl;
0475       out << "Local BX      : " << _gem.bx << std::endl;
0476       out << "Pad           : " << _gem.pad << std::endl;
0477       out << "Pad low       : " << _gem.pad_low << std::endl;
0478       out << "Pad high      : " << _gem.pad_hi << std::endl;
0479       break;
0480     case kME0:
0481       out << detId<ME0DetId>() << std::endl;
0482       out << "Local BX      : " << _me0.bx << std::endl;
0483       out << "Chamber id    : " << _me0.chamberid << std::endl;
0484       out << "Quality       : " << _me0.quality << std::endl;
0485       out << "Phiposition   : " << _me0.phiposition << std::endl;
0486       out << "Partition     : " << _me0.partition << std::endl;
0487       out << "Deltaphi      : " << _me0.deltaphi << std::endl;
0488       out << "Bend          : " << _me0.bend << std::endl;
0489       break;
0490     default:
0491       throw cms::Exception("Invalid Subsystem")
0492           << "The specified subsystem for this track stub is out of range" << std::endl;
0493   }
0494 }