test
CMS 3D CMS Logo

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