CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
MuonStub.cc File Reference
#include "L1Trigger/L1TMuonOverlapPhase1/interface/MuonStub.h"
#include "DataFormats/MuonDetId/interface/CSCDetId.h"
#include "DataFormats/MuonDetId/interface/RPCDetId.h"
#include "DataFormats/MuonDetId/interface/DTChamberId.h"
#include "DataFormats/MuonDetId/interface/MuonSubdetId.h"
#include <iomanip>

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &out, const MuonStub &stub)
 

Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const MuonStub stub 
)

Definition at line 20 of file MuonStub.cc.

References funct::abs(), MuonStub::bx, MuonSubdetId::CSC, DetId::det(), MuonStub::detId, MuonSubdetId::DT, MuonStub::etaHw, MuonStub::etaSigmaHw, MuonStub::logicLayer, DetId::Muon, submitPVResolutionJobs::out, MuonStub::phiBHw, MuonStub::phiHw, MuonStub::qualityHw, RPCDetId::region(), RPCDetId::ring(), MuonSubdetId::RPC, RPCDetId::station(), DetId::subdetId(), MuonStub::timing, and MuonStub::type.

20  {
21  out << "MuonStub: ";
22  out << " logicLayer: " << std::setw(2) << stub.logicLayer << " type: " << std::setw(2) << stub.type
23  << " roll: " << std::setw(1) << 0 << " phiHw: " << std::setw(5)
24  << stub.phiHw //<<" ("<<std::setw(8)<<stub.phi<<")"
25  << " phiBHw: " << std::setw(4) << stub.phiBHw << " etaHw: " << std::setw(4)
26  << stub.etaHw //<<" ("<<std::setw(8)<<stub.eta<<")"
27  << " etaSigmaHw: " << std::setw(3) << stub.etaSigmaHw << " qualityHw: " << std::setw(2) << stub.qualityHw << " "
28  << " bx: " << std::setw(1) << stub.bx << " "
29  << " timing: " << std::setw(2) << stub.timing << " "
30  << " detId: " << std::setw(9) << stub.detId << " ";
31 
32  DetId detId(stub.detId);
33  if (detId.det() != DetId::Muon) {
34  //std::cout << "PROBLEM: hit in unknown Det, detID: "<<detId.det()<<std::endl;
35  return out;
36  }
37 
38  switch (detId.subdetId()) {
39  case MuonSubdetId::RPC: {
40  RPCDetId rpcId(stub.detId);
41  if (rpcId.region() != 0 && abs(rpcId.station()) >= 3 && rpcId.ring() == 1)
42  out << " iRPC " << rpcId;
43  else
44  out << " RPC " << rpcId;
45  break;
46  }
47  case MuonSubdetId::DT: {
48  DTChamberId dtId(stub.detId);
49  out << " DT " << dtId;
50  break;
51  }
52  case MuonSubdetId::CSC: {
53  CSCDetId cscId(stub.detId);
54  out << " CSC " << cscId;
55  break;
56  }
57  }
58 
59  return out;
60 }
int timing
Definition: MuonStub.h:49
int detId
Definition: MuonStub.h:56
Type type
Definition: MuonStub.h:37
int qualityHw
error of the eta measurement
Definition: MuonStub.h:46
int phiBHw
Definition: MuonStub.h:40
int etaSigmaHw
Definition: MuonStub.h:45
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int etaHw
Definition: MuonStub.h:44
Definition: DetId.h:17
static constexpr int RPC
Definition: MuonSubdetId.h:13
int bx
Definition: MuonStub.h:48
unsigned int logicLayer
Definition: MuonStub.h:52
int phiHw
Definition: MuonStub.h:39
static constexpr int DT
Definition: MuonSubdetId.h:11
static constexpr int CSC
Definition: MuonSubdetId.h:12