File indexing completed on 2024-04-06 12:04:26
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambThContainer.h"
0017
0018
0019
0020
0021
0022
0023
0024
0025 using namespace std;
0026
0027
0028
0029
0030
0031
0032
0033
0034 L1MuDTChambThContainer::L1MuDTChambThContainer(The_Container c) : theSegments{std::move(c)} {}
0035
0036
0037
0038
0039 void L1MuDTChambThContainer::setContainer(The_Container inputSegments) { theSegments = std::move(inputSegments); }
0040
0041 L1MuDTChambThContainer::The_Container const* L1MuDTChambThContainer::getContainer() const { return &theSegments; }
0042
0043 bool L1MuDTChambThContainer::bxEmpty(int step) const {
0044 bool empty = true;
0045
0046 for (The_iterator i = theSegments.begin(); i != theSegments.end(); i++) {
0047 if (step == i->bxNum())
0048 empty = false;
0049 }
0050
0051 return (empty);
0052 }
0053
0054 int L1MuDTChambThContainer::bxSize(int step1, int step2) const {
0055 int size = 0;
0056
0057 for (The_iterator i = theSegments.begin(); i != theSegments.end(); i++) {
0058 if (step1 <= i->bxNum() && step2 >= i->bxNum())
0059 size++;
0060 }
0061
0062 return (size);
0063 }
0064
0065 L1MuDTChambThDigi const* L1MuDTChambThContainer::chThetaSegm(int wheel, int stat, int sect, int step) const {
0066 L1MuDTChambThDigi const* rT = nullptr;
0067
0068 for (The_iterator i = theSegments.begin(); i != theSegments.end(); i++) {
0069 if (step == i->bxNum() && wheel == i->whNum() && sect == i->scNum() && stat == i->stNum())
0070 rT = &(*i);
0071 }
0072
0073 return (rT);
0074 }