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 // C++ Headers --
24 //---------------
25 using namespace std;
26 
27 //-------------------
28 // Initializations --
29 //-------------------
30 
31 //----------------
32 // Constructors --
33 //----------------
35 
36 //--------------
37 // Operations --
38 //--------------
40 
42 
44  bool empty = true;
45 
46  for (Phi_iterator i = phiSegments.begin(); i != phiSegments.end(); i++) {
47  if (step == i->bxNum())
48  empty = false;
49  }
50 
51  return (empty);
52 }
53 
54 int L1MuDTChambPhContainer::bxSize(int step1, int step2) const {
55  int size = 0;
56 
57  for (Phi_iterator i = phiSegments.begin(); i != phiSegments.end(); i++) {
58  if (step1 <= i->bxNum() && step2 >= i->bxNum() && i->Ts2Tag() == 0 && i->code() != 7)
59  size++;
60  if (step1 <= i->bxNum() - 1 && step2 >= i->bxNum() - 1 && i->Ts2Tag() == 1 && i->code() != 7)
61  size++;
62  }
63 
64  return (size);
65 }
66 
67 L1MuDTChambPhDigi const* L1MuDTChambPhContainer::chPhiSegm1(int wheel, int stat, int sect, int step) const {
68  L1MuDTChambPhDigi const* rT = nullptr;
69 
70  for (Phi_iterator i = phiSegments.begin(); i != phiSegments.end(); i++) {
71  if (step == i->bxNum() && wheel == i->whNum() && sect == i->scNum() && stat == i->stNum() && i->Ts2Tag() == 0)
72  rT = &(*i);
73  }
74 
75  return (rT);
76 }
77 
78 L1MuDTChambPhDigi const* L1MuDTChambPhContainer::chPhiSegm2(int wheel, int stat, int sect, int step) const {
79  L1MuDTChambPhDigi const* rT = nullptr;
80 
81  for (Phi_iterator i = phiSegments.begin(); i != phiSegments.end(); i++) {
82  if (step == i->bxNum() - 1 && wheel == i->whNum() && sect == i->scNum() && stat == i->stNum() && i->Ts2Tag() == 1)
83  rT = &(*i);
84  }
85 
86  return (rT);
87 }
size
Write out results.
int bxSize(int step1, int step2) const
void setContainer(Phi_Container inputSegments)
L1MuDTChambPhDigi const * chPhiSegm2(int wheel, int stat, int sect, int bx) const
L1MuDTChambPhContainer()=default
std::vector< L1MuDTChambPhDigi > Phi_Container
bool bxEmpty(int step) const
Phi_Container::const_iterator Phi_iterator
Phi_Container const * getContainer() const
step
Definition: StallMonitor.cc:83
def move(src, dest)
Definition: eostools.py:511
L1MuDTChambPhDigi const * chPhiSegm1(int wheel, int stat, int sect, int bx) const