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 }
mps_fire.i
i
Definition: mps_fire.py:355
L1MuTMChambPhContainer::bxSize
int bxSize(int step1, int step2) const
Definition: L1MuTMChambPhContainer.cc:57
step
step
Definition: StallMonitor.cc:94
L1MuTMChambPhContainer::setContainer
void setContainer(const Phi_Container &inputSegments)
Definition: L1MuTMChambPhContainer.cc:44
L1MuTMChambPhContainer::getContainer
Phi_Container const * getContainer() const
Definition: L1MuTMChambPhContainer.cc:46
L1MuTMChambPhContainer::chPhiSegm1
L1MuDTChambPhDigi const * chPhiSegm1(int wheel, int stat, int sect, int bx) const
Definition: L1MuTMChambPhContainer.cc:70
L1MuTMChambPhContainer::Phi_iterator
Phi_Container::const_iterator Phi_iterator
Definition: L1MuTMChambPhContainer.h:36
std::size
constexpr auto size(const C &c) -> decltype(c.size())
Definition: cuda_cxx17.h:13
L1MuTMChambPhContainer::Phi_Container
std::vector< L1MuDTChambPhDigi > Phi_Container
Definition: L1MuTMChambPhContainer.h:35
hgcalPlots.stat
stat
Definition: hgcalPlots.py:1111
L1MuTMChambPhContainer::L1MuTMChambPhContainer
L1MuTMChambPhContainer()
Definition: L1MuTMChambPhContainer.cc:34
L1MuTMChambPhContainer::bxEmpty
bool bxEmpty(int step) const
Definition: L1MuTMChambPhContainer.cc:48
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
L1MuTMChambPhContainer.h
L1MuTMChambPhContainer::chPhiSegm2
L1MuDTChambPhDigi const * chPhiSegm2(int wheel, int stat, int sect, int bx) const
Definition: L1MuTMChambPhContainer.cc:81
std
Definition: JetResolutionObject.h:76
L1MuTMChambPhContainer::chPhiSegm
L1MuDTChambPhDigi * chPhiSegm(int wheel, int stat, int sect, int bx, int ts2tag)
Definition: L1MuTMChambPhContainer.cc:92
L1MuTMChambPhContainer::~L1MuTMChambPhContainer
~L1MuTMChambPhContainer()
Definition: L1MuTMChambPhContainer.cc:39
L1MuDTChambPhDigi
Definition: L1MuDTChambPhDigi.h:31