CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
L1Analysis::L1AnalysisDTTF Class Reference

#include <L1AnalysisDTTF.h>

Public Member Functions

L1AnalysisDTTFDataFormatgetData ()
 
 L1AnalysisDTTF ()
 
void Reset ()
 
void SetDTPH (const edm::Handle< L1MuDTChambPhContainer > L1MuDTChambPhContainer, unsigned int maxDTPH)
 
void SetDTTH (const edm::Handle< L1MuDTChambThContainer > L1MuDTChambThContainer, unsigned int maxDTTH)
 
void SetDTTR (const edm::Handle< L1MuDTTrackContainer > L1MuDTTrackContainer, unsigned int maxDTTR)
 
 ~L1AnalysisDTTF ()
 

Private Attributes

L1AnalysisDTTFDataFormat dttf_
 

Detailed Description

Definition at line 21 of file L1AnalysisDTTF.h.

Constructor & Destructor Documentation

◆ L1AnalysisDTTF()

L1Analysis::L1AnalysisDTTF::L1AnalysisDTTF ( )

Definition at line 5 of file L1AnalysisDTTF.cc.

5 {}

◆ ~L1AnalysisDTTF()

L1Analysis::L1AnalysisDTTF::~L1AnalysisDTTF ( )

Definition at line 7 of file L1AnalysisDTTF.cc.

7 {}

Member Function Documentation

◆ getData()

L1AnalysisDTTFDataFormat* L1Analysis::L1AnalysisDTTF::getData ( void  )
inline

Definition at line 30 of file L1AnalysisDTTF.h.

30 { return &dttf_; }

References dttf_.

◆ Reset()

void L1Analysis::L1AnalysisDTTF::Reset ( )
inline

Definition at line 29 of file L1AnalysisDTTF.h.

29 { dttf_.Reset(); }

References dttf_, and L1Analysis::L1AnalysisDTTFDataFormat::Reset().

◆ SetDTPH()

void L1Analysis::L1AnalysisDTTF::SetDTPH ( const edm::Handle< L1MuDTChambPhContainer L1MuDTChambPhContainer,
unsigned int  maxDTPH 
)

Definition at line 9 of file L1AnalysisDTTF.cc.

10  {
12 
13  dttf_.phSize = PhContainer->size();
14  int iphtr = 0;
15  double pig = acos(-1);
16  for (L1MuDTChambPhContainer::Phi_Container::const_iterator DTPhDigiItr = PhContainer->begin();
17  DTPhDigiItr != PhContainer->end();
18  ++DTPhDigiItr) {
19  if ((unsigned int)iphtr > maxDTPH - 1)
20  continue;
21  dttf_.phBx.push_back(DTPhDigiItr->bxNum() - DTPhDigiItr->Ts2Tag() + 1);
22  dttf_.phWh.push_back(DTPhDigiItr->whNum());
23  dttf_.phSe.push_back(DTPhDigiItr->scNum());
24  dttf_.phSt.push_back(DTPhDigiItr->stNum());
25  dttf_.phAng.push_back(DTPhDigiItr->phi());
26  dttf_.phBandAng.push_back(DTPhDigiItr->phiB());
27  double locphi = (((double)DTPhDigiItr->phi()) / 4096.0);
28  double newphi = locphi + (DTPhDigiItr->scNum() * (pig / 6.));
29  if (newphi > 2 * pig)
30  newphi -= 2 * pig;
31  if (newphi < 0)
32  newphi += 2 * pig;
33  dttf_.phGlobPhi.push_back(newphi);
34  dttf_.phCode.push_back(DTPhDigiItr->code());
35  dttf_.phX.push_back(DTPhDigiItr->scNum());
36  dttf_.phY.push_back(DTPhDigiItr->stNum() + 4 * (DTPhDigiItr->whNum() + 2));
37 
38  iphtr++;
39  }
40 }

References L1MuDTChambPhContainer::getContainer(), and l1Tree_cfi::maxDTPH.

◆ SetDTTH()

void L1Analysis::L1AnalysisDTTF::SetDTTH ( const edm::Handle< L1MuDTChambThContainer L1MuDTChambThContainer,
unsigned int  maxDTTH 
)

Definition at line 42 of file L1AnalysisDTTF.cc.

43  {
45 
46  int ithtr = 0;
47  dttf_.thSize = ThContainer->size();
48  dttf_.thTheta.ResizeTo(dttf_.thSize, 7);
49  dttf_.thCode.ResizeTo(dttf_.thSize, 7);
50 
51  for (L1MuDTChambThContainer::The_Container::const_iterator DTThDigiItr = ThContainer->begin();
52  DTThDigiItr != ThContainer->end();
53  ++DTThDigiItr) {
54  if ((unsigned int)ithtr > maxDTTH - 1)
55  continue;
56  dttf_.thBx.push_back(DTThDigiItr->bxNum() + 1);
57  dttf_.thWh.push_back(DTThDigiItr->whNum());
58  dttf_.thSe.push_back(DTThDigiItr->scNum());
59  dttf_.thSt.push_back(DTThDigiItr->stNum());
60  dttf_.thX.push_back(DTThDigiItr->stNum() + 4 * (DTThDigiItr->whNum() + 2));
61  // int xpos = iwh*4+ist+1; ????
62  dttf_.thY.push_back(DTThDigiItr->scNum());
64 
65  for (unsigned int j = 0; j < 7; j++) {
66  dttf_.thTheta[ithtr][j] = DTThDigiItr->position(j);
67  dttf_.thCode[ithtr][j] = DTThDigiItr->code(j);
68  }
69 
70  ithtr++;
71  }
72 }

References L1MuDTChambThContainer::getContainer(), dqmiolumiharvest::j, and l1Tree_cfi::maxDTTH.

◆ SetDTTR()

void L1Analysis::L1AnalysisDTTF::SetDTTR ( const edm::Handle< L1MuDTTrackContainer L1MuDTTrackContainer,
unsigned int  maxDTTR 
)

Definition at line 74 of file L1AnalysisDTTF.cc.

75  {
76  double pig = acos(-1);
78  int idttr = 0;
79  dttf_.trSize = tr->size();
80  for (L1MuDTTrackContainer::TrackContainer::const_iterator i = tr->begin(); i != tr->end(); ++i) {
81  if ((unsigned int)idttr > maxDTTR - 1)
82  continue;
83  dttf_.trBx.push_back(i->bx() + 1);
84  dttf_.trTag.push_back(i->TrkTag());
85  dttf_.trQual.push_back(i->quality_packed());
86  dttf_.trPtPck.push_back(i->pt_packed());
87  dttf_.trPtVal.push_back(i->ptValue());
88  dttf_.trPhiPck.push_back(i->phi_packed());
89  dttf_.trPhiVal.push_back(i->phiValue());
90  dttf_.trEtaPck.push_back(i->eta_packed());
91  dttf_.trEtaVal.push_back(i->etaValue());
92 
93  int phi_local = i->phi_packed(); //range: 0 < phi_local < 31
94  if (phi_local > 15)
95  phi_local -= 32; //range: -16 < phi_local < 15
96  double phi_global =
97  (phi_local * (pig / 72.)) + ((pig / 6.) * i->scNum()); // + 12*i->scNum(); //range: -16 < phi_global < 147
98  if (phi_global < 0)
99  phi_global += 2 * pig; //range: 0 < phi_global < 147
100  if (phi_global > 2 * pig)
101  phi_global -= 2 * pig; //range: 0 < phi_global < 143
102  dttf_.trPhiGlob.push_back(phi_global);
103  dttf_.trChPck.push_back(i->charge_packed());
104  dttf_.trWh.push_back(i->whNum());
105  dttf_.trSc.push_back(i->scNum());
106  unsigned int addresses = 0;
107  for (int KK = 0; KK < 4; KK++) {
108  addresses |= ((unsigned int)(i->stNum(KK + 1)) << (KK * 4));
109  }
110  dttf_.trAddress.push_back(addresses);
111  idttr++;
112  }
113 }

References L1MuDTTrackContainer::getContainer(), mps_fire::i, createfilelist::int, and l1Tree_cfi::maxDTTR.

Member Data Documentation

◆ dttf_

L1AnalysisDTTFDataFormat L1Analysis::L1AnalysisDTTF::dttf_
private

Definition at line 33 of file L1AnalysisDTTF.h.

Referenced by getData(), and Reset().

L1Analysis::L1AnalysisDTTFDataFormat::thTheta
TMatrixD thTheta
Definition: L1AnalysisDTTFDataFormat.h:85
mps_fire.i
i
Definition: mps_fire.py:428
L1Analysis::L1AnalysisDTTFDataFormat::Reset
void Reset()
Definition: L1AnalysisDTTFDataFormat.h:19
L1Analysis::L1AnalysisDTTFDataFormat::trEtaPck
std::vector< int > trEtaPck
Definition: L1AnalysisDTTFDataFormat.h:96
L1Analysis::L1AnalysisDTTFDataFormat::trPtPck
std::vector< int > trPtPck
Definition: L1AnalysisDTTFDataFormat.h:92
L1Analysis::L1AnalysisDTTFDataFormat::trSize
int trSize
Definition: L1AnalysisDTTFDataFormat.h:88
L1Analysis::L1AnalysisDTTFDataFormat::trQual
std::vector< int > trQual
Definition: L1AnalysisDTTFDataFormat.h:91
L1Analysis::L1AnalysisDTTFDataFormat::trTag
std::vector< int > trTag
Definition: L1AnalysisDTTFDataFormat.h:90
L1Analysis::L1AnalysisDTTFDataFormat::thSize
int thSize
Definition: L1AnalysisDTTFDataFormat.h:77
l1Tree_cfi.maxDTTR
maxDTTR
Definition: l1Tree_cfi.py:54
l1Tree_cfi.maxDTPH
maxDTPH
Definition: l1Tree_cfi.py:52
L1Analysis::L1AnalysisDTTFDataFormat::trEtaVal
std::vector< float > trEtaVal
Definition: L1AnalysisDTTFDataFormat.h:97
L1Analysis::L1AnalysisDTTFDataFormat::trBx
std::vector< int > trBx
Definition: L1AnalysisDTTFDataFormat.h:89
L1Analysis::L1AnalysisDTTFDataFormat::trPhiPck
std::vector< int > trPhiPck
Definition: L1AnalysisDTTFDataFormat.h:94
L1Analysis::L1AnalysisDTTFDataFormat::thY
std::vector< float > thY
Definition: L1AnalysisDTTFDataFormat.h:83
L1Analysis::L1AnalysisDTTFDataFormat::phWh
std::vector< int > phWh
Definition: L1AnalysisDTTFDataFormat.h:67
L1MuDTChambPhContainer
Definition: L1MuDTChambPhContainer.h:33
L1MuDTChambPhContainer::getContainer
Phi_Container const * getContainer() const
Definition: L1MuDTChambPhContainer.cc:41
L1Analysis::L1AnalysisDTTFDataFormat::thBx
std::vector< int > thBx
Definition: L1AnalysisDTTFDataFormat.h:78
L1Analysis::L1AnalysisDTTFDataFormat::trPhiGlob
std::vector< double > trPhiGlob
Definition: L1AnalysisDTTFDataFormat.h:98
L1Analysis::L1AnalysisDTTFDataFormat::trSc
std::vector< int > trSc
Definition: L1AnalysisDTTFDataFormat.h:101
L1Analysis::L1AnalysisDTTFDataFormat::phSe
std::vector< int > phSe
Definition: L1AnalysisDTTFDataFormat.h:68
L1Analysis::L1AnalysisDTTFDataFormat::thCode
TMatrixD thCode
Definition: L1AnalysisDTTFDataFormat.h:86
l1Tree_cfi.maxDTTH
maxDTTH
Definition: l1Tree_cfi.py:53
L1Analysis::L1AnalysisDTTFDataFormat::trChPck
std::vector< int > trChPck
Definition: L1AnalysisDTTFDataFormat.h:99
L1Analysis::L1AnalysisDTTFDataFormat::phX
std::vector< float > phX
Definition: L1AnalysisDTTFDataFormat.h:74
createfilelist.int
int
Definition: createfilelist.py:10
L1MuDTChambThContainer::getContainer
The_Container const * getContainer() const
Definition: L1MuDTChambThContainer.cc:41
L1Analysis::L1AnalysisDTTFDataFormat::thWh
std::vector< int > thWh
Definition: L1AnalysisDTTFDataFormat.h:79
L1Analysis::L1AnalysisDTTFDataFormat::phSt
std::vector< int > phSt
Definition: L1AnalysisDTTFDataFormat.h:69
L1MuDTChambThContainer::The_Container
std::vector< L1MuDTChambThDigi > The_Container
Definition: L1MuDTChambThContainer.h:35
L1Analysis::L1AnalysisDTTFDataFormat::phCode
std::vector< int > phCode
Definition: L1AnalysisDTTFDataFormat.h:73
L1Analysis::L1AnalysisDTTFDataFormat::phY
std::vector< float > phY
Definition: L1AnalysisDTTFDataFormat.h:75
L1Analysis::L1AnalysisDTTFDataFormat::trAddress
std::vector< unsigned int > trAddress
Definition: L1AnalysisDTTFDataFormat.h:102
L1Analysis::L1AnalysisDTTFDataFormat::thX
std::vector< float > thX
Definition: L1AnalysisDTTFDataFormat.h:82
L1Analysis::L1AnalysisDTTFDataFormat::trWh
std::vector< int > trWh
Definition: L1AnalysisDTTFDataFormat.h:100
L1Analysis::L1AnalysisDTTFDataFormat::phSize
int phSize
Definition: L1AnalysisDTTFDataFormat.h:65
L1Analysis::L1AnalysisDTTFDataFormat::thSe
std::vector< int > thSe
Definition: L1AnalysisDTTFDataFormat.h:80
L1MuDTChambPhContainer::Phi_Container
std::vector< L1MuDTChambPhDigi > Phi_Container
Definition: L1MuDTChambPhContainer.h:35
L1Analysis::L1AnalysisDTTFDataFormat::phBx
std::vector< int > phBx
Definition: L1AnalysisDTTFDataFormat.h:66
L1Analysis::L1AnalysisDTTFDataFormat::phBandAng
std::vector< float > phBandAng
Definition: L1AnalysisDTTFDataFormat.h:72
L1MuDTTrackContainer::TrackContainer
std::vector< L1MuDTTrackCand > TrackContainer
Definition: L1MuDTTrackContainer.h:35
L1MuDTTrackContainer::getContainer
TrackContainer const * getContainer() const
Definition: L1MuDTTrackContainer.cc:46
L1Analysis::L1AnalysisDTTFDataFormat::phGlobPhi
std::vector< double > phGlobPhi
Definition: L1AnalysisDTTFDataFormat.h:71
L1MuDTTrackContainer
Definition: L1MuDTTrackContainer.h:33
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
L1Analysis::L1AnalysisDTTF::dttf_
L1AnalysisDTTFDataFormat dttf_
Definition: L1AnalysisDTTF.h:33
L1MuDTChambThContainer
Definition: L1MuDTChambThContainer.h:33
L1Analysis::L1AnalysisDTTFDataFormat::trPtVal
std::vector< float > trPtVal
Definition: L1AnalysisDTTFDataFormat.h:93
L1Analysis::L1AnalysisDTTFDataFormat::trPhiVal
std::vector< float > trPhiVal
Definition: L1AnalysisDTTFDataFormat.h:95
L1Analysis::L1AnalysisDTTFDataFormat::phAng
std::vector< float > phAng
Definition: L1AnalysisDTTFDataFormat.h:70
L1Analysis::L1AnalysisDTTFDataFormat::thSt
std::vector< int > thSt
Definition: L1AnalysisDTTFDataFormat.h:81