CMS 3D CMS Logo

L1MuDTChambPhContainer.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class L1MuDTChambPhContainer
4 //
5 // Description: input data for PHTF trigger
6 //
7 //
8 // Author List: Jorge Troconiz UAM Madrid
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  bool empty = true;
58 
59  for ( Phi_iterator i = phiSegments.begin();
60  i != phiSegments.end();
61  i++ ) {
62  if (step == i->bxNum()) empty = false;
63  }
64 
65  return(empty);
66 }
67 
68 int L1MuDTChambPhContainer::bxSize(int step1, int step2) const {
69 
70  int size = 0;
71 
72  for ( Phi_iterator i = phiSegments.begin();
73  i != phiSegments.end();
74  i++ ) {
75  if (step1 <= i->bxNum() && step2 >= i->bxNum()
76  && i->Ts2Tag() == 0 && i->code() != 7) size++;
77  if (step1 <= i->bxNum()-1 && step2 >= i->bxNum()-1
78  && i->Ts2Tag() == 1 && i->code() != 7) size++;
79  }
80 
81  return(size);
82 }
83 
84 L1MuDTChambPhDigi const* L1MuDTChambPhContainer::chPhiSegm1(int wheel, int stat, int sect, int step) const {
85 
86  L1MuDTChambPhDigi const* rT=0;
87 
88  for ( Phi_iterator i = phiSegments.begin();
89  i != phiSegments.end();
90  i++ ) {
91  if (step == i->bxNum() && wheel == i->whNum() && sect == i->scNum()
92  && stat == i->stNum() && i->Ts2Tag() == 0)
93  rT = &(*i);
94  }
95 
96  return(rT);
97 }
98 
99 L1MuDTChambPhDigi const* L1MuDTChambPhContainer::chPhiSegm2(int wheel, int stat, int sect, int step) const {
100 
101  L1MuDTChambPhDigi const* rT=0;
102 
103  for ( Phi_iterator i = phiSegments.begin();
104  i != phiSegments.end();
105  i++ ) {
106  if (step == i->bxNum()-1 && wheel == i->whNum() && sect == i->scNum()
107  && stat == i->stNum() && i->Ts2Tag() == 1)
108  rT = &(*i);
109  }
110 
111  return(rT);
112 }
size
Write out results.
L1MuDTChambPhDigi const * chPhiSegm1(int wheel, int stat, int sect, int bx) const
L1MuDTChambPhDigi const * chPhiSegm2(int wheel, int stat, int sect, int bx) const
bool bxEmpty(int step) const
int bxSize(int step1, int step2) const
std::vector< L1MuDTChambPhDigi > Phi_Container
Phi_Container::const_iterator Phi_iterator
void setContainer(const Phi_Container &inputSegments)
Phi_Container const * getContainer() const
step