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 // Operations --
40 //--------------
42 
43  phiSegments = std::move(inputSegments);
44 }
45 
47  return &phiSegments;
48 }
49 
51 
52  bool empty = true;
53 
54  for ( Phi_iterator i = phiSegments.begin();
55  i != phiSegments.end();
56  i++ ) {
57  if (step == i->bxNum()) empty = false;
58  }
59 
60  return(empty);
61 }
62 
63 int L1MuDTChambPhContainer::bxSize(int step1, int step2) const {
64 
65  int size = 0;
66 
67  for ( Phi_iterator i = phiSegments.begin();
68  i != phiSegments.end();
69  i++ ) {
70  if (step1 <= i->bxNum() && step2 >= i->bxNum()
71  && i->Ts2Tag() == 0 && i->code() != 7) size++;
72  if (step1 <= i->bxNum()-1 && step2 >= i->bxNum()-1
73  && i->Ts2Tag() == 1 && i->code() != 7) size++;
74  }
75 
76  return(size);
77 }
78 
79 L1MuDTChambPhDigi const* L1MuDTChambPhContainer::chPhiSegm1(int wheel, int stat, int sect, int step) const {
80 
81  L1MuDTChambPhDigi const* rT=nullptr;
82 
83  for ( Phi_iterator i = phiSegments.begin();
84  i != phiSegments.end();
85  i++ ) {
86  if (step == i->bxNum() && wheel == i->whNum() && sect == i->scNum()
87  && stat == i->stNum() && i->Ts2Tag() == 0)
88  rT = &(*i);
89  }
90 
91  return(rT);
92 }
93 
94 L1MuDTChambPhDigi const* L1MuDTChambPhContainer::chPhiSegm2(int wheel, int stat, int sect, int step) const {
95 
96  L1MuDTChambPhDigi const* rT=nullptr;
97 
98  for ( Phi_iterator i = phiSegments.begin();
99  i != phiSegments.end();
100  i++ ) {
101  if (step == i->bxNum()-1 && wheel == i->whNum() && sect == i->scNum()
102  && stat == i->stNum() && i->Ts2Tag() == 1)
103  rT = &(*i);
104  }
105 
106  return(rT);
107 }
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
void setContainer(Phi_Container inputSegments)
L1MuDTChambPhContainer()=default
std::vector< L1MuDTChambPhDigi > Phi_Container
Phi_Container::const_iterator Phi_iterator
Phi_Container const * getContainer() const
step
Definition: StallMonitor.cc:94
def move(src, dest)
Definition: eostools.py:511