CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 }
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
virtual MuonStubPtrs2D & getMuonStubs()
virtual int getPhiHw(unsigned int iLayer, unsigned int iInput) const
const ProcConfigurationBase * config
virtual bool isBendingLayer(unsigned int iLayer) const =0
tuple config
parse the configuration file
MuonStubsInput(const ProcConfigurationBase *config)
static const int EMTPY_PHI
Definition: MuonStub.h:42
MuonStubPtrs2D muonStubsInLayers
tuple size
Write out results.