CMS 3D CMS Logo

L1MuTMChambPhContainer.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class L1MuTMChambPhContainer
4 //
5 //
6 //
7 //
8 // Author List: Jorge Troconiz, George Karathanasis
9 //
10 //
11 //--------------------------------------------------
12 
13 //-----------------------
14 // This Class's Header --
15 //-----------------------
17 
18 //-------------------------------
19 // Collaborating Class Headers --
20 //-------------------------------
21 
22 //---------------
23 // C++ Headers --
24 //---------------
25 using namespace std;
26 
27 //-------------------
28 // Initializations --
29 //-------------------
30 
31 //----------------
32 // Constructors --
33 //----------------
35 
36 //--------------
37 // Destructor --
38 //--------------
40 
41 //--------------
42 // Operations --
43 //--------------
44 void L1MuTMChambPhContainer::setContainer(const Phi_Container& inputSegments) { phiSegments = inputSegments; }
45 
47 
49  for (Phi_iterator i = phiSegments.begin(); i != phiSegments.end(); i++) {
50  if (step == i->bxNum())
51  return false;
52  }
53 
54  return true;
55 }
56 
57 int L1MuTMChambPhContainer::bxSize(int step1, int step2) const {
58  int size = 0;
59 
60  for (Phi_iterator i = phiSegments.begin(); i != phiSegments.end(); i++) {
61  if (step1 <= i->bxNum() && step2 >= i->bxNum() && i->Ts2Tag() == 0 && i->code() != 7)
62  size++;
63  if (step1 <= i->bxNum() - 1 && step2 >= i->bxNum() - 1 && i->Ts2Tag() == 1 && i->code() != 7)
64  size++;
65  }
66 
67  return (size);
68 }
69 
70 L1MuDTChambPhDigi const* L1MuTMChambPhContainer::chPhiSegm1(int wheel, int stat, int sect, int step) const {
71  L1MuDTChambPhDigi const* rT = nullptr;
72 
73  for (Phi_iterator i = phiSegments.begin(); i != phiSegments.end(); i++) {
74  if (step == i->bxNum() && wheel == i->whNum() && sect == i->scNum() && stat == i->stNum() && i->Ts2Tag() == 0)
75  rT = &(*i);
76  }
77 
78  return (rT);
79 }
80 
81 L1MuDTChambPhDigi const* L1MuTMChambPhContainer::chPhiSegm2(int wheel, int stat, int sect, int step) const {
82  L1MuDTChambPhDigi const* rT = nullptr;
83 
84  for (Phi_iterator i = phiSegments.begin(); i != phiSegments.end(); i++) {
85  if (step == i->bxNum() - 1 && wheel == i->whNum() && sect == i->scNum() && stat == i->stNum() && i->Ts2Tag() == 1)
86  rT = &(*i);
87  }
88 
89  return (rT);
90 }
91 
92 L1MuDTChambPhDigi* L1MuTMChambPhContainer::chPhiSegm(int wheel, int stat, int sect, int step, int ts2tag) {
93  L1MuDTChambPhDigi* rT = nullptr;
94  for (Phi_Container::iterator i = phiSegments.begin(); i != phiSegments.end(); i++) {
95  if (step == i->bxNum() && wheel == i->whNum() && sect == i->scNum() && stat == i->stNum() && i->Ts2Tag() == ts2tag)
96  rT = &(*i);
97  }
98 
99  return (rT);
100 }
L1MuDTChambPhDigi * chPhiSegm(int wheel, int stat, int sect, int bx, int ts2tag)
std::vector< L1MuDTChambPhDigi > Phi_Container
void setContainer(const Phi_Container &inputSegments)
Phi_Container::const_iterator Phi_iterator
int bxSize(int step1, int step2) const
L1MuDTChambPhDigi const * chPhiSegm1(int wheel, int stat, int sect, int bx) const
bool bxEmpty(int step) const
L1MuDTChambPhDigi const * chPhiSegm2(int wheel, int stat, int sect, int bx) const
step
Definition: StallMonitor.cc:83
Phi_Container const * getContainer() const