CMS 3D CMS Logo

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

◆ operator<<()

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, MillePedeFileConverter_cfg::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:50
int detId
Definition: MuonStub.h:57
Type type
Definition: MuonStub.h:38
int qualityHw
error of the eta measurement
Definition: MuonStub.h:47
int phiBHw
Definition: MuonStub.h:41
int etaSigmaHw
Definition: MuonStub.h:46
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int etaHw
Definition: MuonStub.h:45
Definition: DetId.h:17
static constexpr int RPC
Definition: MuonSubdetId.h:13
int bx
Definition: MuonStub.h:49
unsigned int logicLayer
Definition: MuonStub.h:53
int phiHw
Definition: MuonStub.h:40
static constexpr int DT
Definition: MuonSubdetId.h:11
static constexpr int CSC
Definition: MuonSubdetId.h:12