CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes | Friends
MuonStubsInput Class Reference

#include <MuonStubsInput.h>

Inheritance diagram for MuonStubsInput:
OMTFinput

Public Member Functions

virtual void addStub (unsigned int iLayer, const MuonStubPtr &stub)
 
virtual MuonStubPtrs2DgetMuonStubs ()
 
virtual const MuonStubPtrs2DgetMuonStubs () const
 
virtual int getPhiHw (unsigned int iLayer, unsigned int iInput) const
 
 MuonStubsInput (const ProcConfigurationBase *config)
 
virtual ~MuonStubsInput ()
 

Protected Attributes

const ProcConfigurationBaseconfig = nullptr
 
MuonStubPtrs2D muonStubsInLayers
 

Friends

std::ostream & operator<< (std::ostream &out, const MuonStubsInput &stubsInput)
 

Detailed Description

Definition at line 15 of file MuonStubsInput.h.

Constructor & Destructor Documentation

◆ MuonStubsInput()

MuonStubsInput::MuonStubsInput ( const ProcConfigurationBase config)

Definition at line 11 of file MuonStubsInput.cc.

12  : config(config), muonStubsInLayers(config->nLayers()) {}
Definition: config.py:1
const ProcConfigurationBase * config
MuonStubPtrs2D muonStubsInLayers

◆ ~MuonStubsInput()

virtual MuonStubsInput::~MuonStubsInput ( )
inlinevirtual

Definition at line 19 of file MuonStubsInput.h.

19 {}

Member Function Documentation

◆ addStub()

virtual void MuonStubsInput::addStub ( unsigned int  iLayer,
const MuonStubPtr stub 
)
inlinevirtual

Definition at line 21 of file MuonStubsInput.h.

References muonStubsInLayers.

21  {
22  muonStubsInLayers.at(iLayer).emplace_back(stub);
23  }
MuonStubPtrs2D muonStubsInLayers

◆ getMuonStubs() [1/2]

virtual MuonStubPtrs2D& MuonStubsInput::getMuonStubs ( )
inlinevirtual

Definition at line 25 of file MuonStubsInput.h.

References muonStubsInLayers.

Referenced by operator<<().

25 { return muonStubsInLayers; }
MuonStubPtrs2D muonStubsInLayers

◆ getMuonStubs() [2/2]

virtual const MuonStubPtrs2D& MuonStubsInput::getMuonStubs ( ) const
inlinevirtual

Definition at line 27 of file MuonStubsInput.h.

References muonStubsInLayers.

27 { return muonStubsInLayers; }
MuonStubPtrs2D muonStubsInLayers

◆ getPhiHw()

int MuonStubsInput::getPhiHw ( unsigned int  iLayer,
unsigned int  iInput 
) const
virtual

Reimplemented in OMTFinput.

Definition at line 26 of file MuonStubsInput.cc.

References MuonStub::EMTPY_PHI, muonStubsInLayers, and findQualityFiles::size.

26  {
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.
Definition: config.py:1
static const int EMTPY_PHI
Definition: MuonStub.h:43
MuonStubPtrs2D muonStubsInLayers

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const MuonStubsInput stubsInput 
)
friend

Definition at line 14 of file MuonStubsInput.cc.

14  {
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 }
virtual MuonStubPtrs2D & getMuonStubs()

Member Data Documentation

◆ config

const ProcConfigurationBase* MuonStubsInput::config = nullptr
protected

Definition at line 36 of file MuonStubsInput.h.

◆ muonStubsInLayers

MuonStubPtrs2D MuonStubsInput::muonStubsInLayers
protected

Definition at line 39 of file MuonStubsInput.h.

Referenced by addStub(), OMTFinput::getMuonStub(), getMuonStubs(), getPhiHw(), and operator<<().