CMS 3D CMS Logo

L1AnalysisBMTFInputs.cc
Go to the documentation of this file.
3 
4 #include <sstream>
5 #include <string>
6 
7 using namespace std;
8 
10 
12 
14  unsigned int maxDTPH) {
15  L1MuDTChambPhContainer::Phi_Container const *PhContainer = L1MuDTChambPhContainer->getContainer();
16 
17  bmtf_.phSize = PhContainer->size();
18  int iphtr = 0;
19  for (L1MuDTChambPhContainer::Phi_Container::const_iterator DTPhDigiItr = PhContainer->begin();
20  DTPhDigiItr != PhContainer->end();
21  ++DTPhDigiItr) {
22  if ((unsigned int)iphtr > maxDTPH - 1)
23  continue;
24  bmtf_.phBx.push_back(DTPhDigiItr->bxNum());
25  bmtf_.phTs2Tag.push_back(DTPhDigiItr->Ts2Tag());
26  bmtf_.phWh.push_back(DTPhDigiItr->whNum());
27  bmtf_.phSe.push_back(DTPhDigiItr->scNum());
28  bmtf_.phSt.push_back(DTPhDigiItr->stNum());
29  bmtf_.phAng.push_back(DTPhDigiItr->phi());
30  bmtf_.phBandAng.push_back(DTPhDigiItr->phiB());
31  bmtf_.phCode.push_back(DTPhDigiItr->code());
32 
33  iphtr++;
34  }
35 }
36 
38  unsigned int maxDTTH) {
39  L1MuDTChambThContainer::The_Container const *ThContainer = L1MuDTChambThContainer->getContainer();
40 
41  int ithtr = 0;
42  bmtf_.thSize = ThContainer->size();
43 
44  for (L1MuDTChambThContainer::The_Container::const_iterator DTThDigiItr = ThContainer->begin();
45  DTThDigiItr != ThContainer->end();
46  ++DTThDigiItr) {
47  if ((unsigned int)ithtr > maxDTTH - 1)
48  continue;
49  bmtf_.thBx.push_back(DTThDigiItr->bxNum());
50  bmtf_.thWh.push_back(DTThDigiItr->whNum());
51  bmtf_.thSe.push_back(DTThDigiItr->scNum());
52  bmtf_.thSt.push_back(DTThDigiItr->stNum());
53 
54  ostringstream ss1, ss2;
55  ss1.clear();
56  ss2.clear();
57  ss1 << "9";
58  ss2 << "9";
59 
60  for (int j = 0; j < 7; j++) {
61  ss1 << DTThDigiItr->position(j);
62  ss2 << DTThDigiItr->code(j);
63  }
64  bmtf_.thTheta.push_back(stoi(ss1.str()));
65  bmtf_.thCode.push_back(stoi(ss2.str()));
66 
67  ithtr++;
68  }
69 }
The_Container const * getContainer() const
void SetBMPH(const edm::Handle< L1MuDTChambPhContainer > L1MuDTChambPhContainer, unsigned int maxDTPH)
std::vector< L1MuDTChambPhDigi > Phi_Container
std::vector< L1MuDTChambThDigi > The_Container
Phi_Container const * getContainer() const
void SetBMTH(const edm::Handle< L1MuDTChambThContainer > L1MuDTChambThContainer, unsigned int maxDTTH)