CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
L1MuDTTrackContainer.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class L1MuDTTrackContainer
4 //
5 // Description: output data for DTTF 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 // Destructor --
38 //--------------
40 
41 //--------------
42 // Operations --
43 //--------------
44 void L1MuDTTrackContainer::setContainer(const TrackContainer& inputTracks) { dtTracks = inputTracks; }
45 
47 
49  bool empty = true;
50 
51  for (Trackiterator i = dtTracks.begin(); i != dtTracks.end(); i++) {
52  if (step == i->bx())
53  empty = false;
54  }
55 
56  return (empty);
57 }
58 
59 int L1MuDTTrackContainer::bxSize(int step1, int step2) const {
60  int size = 0;
61 
62  for (Trackiterator i = dtTracks.begin(); i != dtTracks.end(); i++) {
63  if (step1 <= i->bx() && step2 >= i->bx() && i->quality_packed() != 0)
64  size++;
65  }
66 
67  return (size);
68 }
69 
70 L1MuDTTrackCand const* L1MuDTTrackContainer::dtTrackCand1(int wheel, int sect, int step) const {
71  L1MuDTTrackCand const* rT = nullptr;
72 
73  for (Trackiterator i = dtTracks.begin(); i != dtTracks.end(); i++) {
74  if (step == i->bx() && wheel == i->whNum() && sect == i->scNum() && i->TrkTag() == 0)
75  rT = &(*i);
76  }
77 
78  return (rT);
79 }
80 
81 L1MuDTTrackCand const* L1MuDTTrackContainer::dtTrackCand2(int wheel, int sect, int step) const {
82  L1MuDTTrackCand const* rT = nullptr;
83 
84  for (Trackiterator i = dtTracks.begin(); i != dtTracks.end(); i++) {
85  if (step == i->bx() && wheel == i->whNum() && sect == i->scNum() && i->TrkTag() == 1)
86  rT = &(*i);
87  }
88 
89  return (rT);
90 }
L1MuDTTrackCand const * dtTrackCand2(int wheel, int sect, int bx) const
bool bxEmpty(int step) const
void setContainer(const TrackContainer &inputTracks)
std::vector< L1MuDTTrackCand > TrackContainer
TrackContainer::const_iterator Trackiterator
L1MuDTTrackCand const * dtTrackCand1(int wheel, int sect, int bx) const
int bxSize(int step1, int step2) const
step
Definition: StallMonitor.cc:94
TrackContainer const * getContainer() const
tuple size
Write out results.