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 //---------------
24 // C++ Headers --
25 //---------------
26 using namespace std;
27 
28 //-------------------
29 // Initializations --
30 //-------------------
31 
32 
33 //----------------
34 // Constructors --
35 //----------------
37 
38 //--------------
39 // Destructor --
40 //--------------
42 
43 //--------------
44 // Operations --
45 //--------------
47 
48  phiSegments = inputSegments;
49 }
50 
52  return &phiSegments;
53 }
54 
56 
57  for ( Phi_iterator i = phiSegments.begin();
58  i != phiSegments.end();
59  i++ ) {
60  if (step == i->bxNum()) return false;
61  }
62 
63  return true;
64 }
65 
66 int L1MuTMChambPhContainer::bxSize(int step1, int step2) const {
67 
68  int size = 0;
69 
70  for ( Phi_iterator i = phiSegments.begin();
71  i != phiSegments.end();
72  i++ ) {
73  if (step1 <= i->bxNum() && step2 >= i->bxNum()
74  && i->Ts2Tag() == 0 && i->code() != 7) size++;
75  if (step1 <= i->bxNum()-1 && step2 >= i->bxNum()-1
76  && i->Ts2Tag() == 1 && i->code() != 7) size++;
77  }
78 
79  return(size);
80 }
81 
82 L1MuDTChambPhDigi const* L1MuTMChambPhContainer::chPhiSegm1(int wheel, int stat, int sect, int step) const {
83 
84  L1MuDTChambPhDigi const* rT=nullptr;
85 
86  for ( Phi_iterator i = phiSegments.begin();
87  i != phiSegments.end();
88  i++ ) {
89  if (step == i->bxNum() && wheel == i->whNum() && sect == i->scNum()
90  && stat == i->stNum() && i->Ts2Tag() == 0)
91  rT = &(*i);
92  }
93 
94  return(rT);
95 }
96 
97 L1MuDTChambPhDigi const* L1MuTMChambPhContainer::chPhiSegm2(int wheel, int stat, int sect, int step) const {
98 
99  L1MuDTChambPhDigi const* rT=nullptr;
100 
101  for ( Phi_iterator i = phiSegments.begin();
102  i != phiSegments.end();
103  i++ ) {
104  if (step == i->bxNum()-1 && wheel == i->whNum() && sect == i->scNum()
105  && stat == i->stNum() && i->Ts2Tag() == 1)
106  rT = &(*i);
107  }
108 
109  return(rT);
110 }
111 
112 
113 L1MuDTChambPhDigi* L1MuTMChambPhContainer::chPhiSegm(int wheel, int stat, int sect, int step, int ts2tag) {
114 
115 
116  L1MuDTChambPhDigi * rT=nullptr;
117  for ( Phi_Container::iterator i = phiSegments.begin();
118  i != phiSegments.end();
119  i++ ) {
120  if (step == i->bxNum() && wheel == i->whNum() && sect == i->scNum()
121  && stat == i->stNum() && i->Ts2Tag() == ts2tag)
122  rT = &(*i);
123  }
124 
125  return(rT);
126 }
size
Write out results.
L1MuDTChambPhDigi * chPhiSegm(int wheel, int stat, int sect, int bx, int ts2tag)
std::vector< L1MuDTChambPhDigi > Phi_Container
void setContainer(const Phi_Container &inputSegments)
L1MuDTChambPhDigi const * chPhiSegm2(int wheel, int stat, int sect, int bx) const
Phi_Container::const_iterator Phi_iterator
Phi_Container const * getContainer() const
int bxSize(int step1, int step2) const
bool bxEmpty(int step) const
L1MuDTChambPhDigi const * chPhiSegm1(int wheel, int stat, int sect, int bx) const
step