CMS 3D CMS Logo

MuonStubsInput.cc
Go to the documentation of this file.
1 /*
2  * MuonStubsInput.cc
3  *
4  * Created on: Jan 31, 2019
5  * Author: Karol Bunkowski kbunkow@cern.ch
6  */
7 
10 
12  : config(config), muonStubsInLayers(config->nLayers()) {}
13 
14 std::ostream& operator<<(std::ostream& out, const MuonStubsInput& stubsInput) {
15  out << "MuonStubsInput: " << std::endl;
16  for (auto& layerStubs : stubsInput.getMuonStubs()) {
17  for (auto& stub : layerStubs) {
18  out << (*stub) << std::endl;
19  }
20  }
21  return out;
22 }
23 
24 //gives stub phiHw or phiBHw - depending which layer is requested
25 //assumes that the banidg layer
26 int MuonStubsInput::getPhiHw(unsigned int iLayer, unsigned int iInput) const {
27  if (config->isBendingLayer(iLayer)) {
28  if (iInput >= muonStubsInLayers[iLayer - 1].size())
29  return MuonStub::EMTPY_PHI;
30  return muonStubsInLayers[iLayer - 1][iInput]->phiBHw;
31  } else {
32  if (iInput >= muonStubsInLayers[iLayer].size())
33  return MuonStub::EMTPY_PHI;
34  return muonStubsInLayers[iLayer][iInput]->phiHw;
35  }
36 }
size
Write out results.
std::ostream & operator<<(std::ostream &out, const MuonStubsInput &stubsInput)
Definition: config.py:1
virtual MuonStubPtrs2D & getMuonStubs()
virtual int getPhiHw(unsigned int iLayer, unsigned int iInput) const
MuonStubsInput(const ProcConfigurationBase *config)
static const int EMTPY_PHI
Definition: MuonStub.h:43
MuonStubPtrs2D muonStubsInLayers