CMS 3D CMS Logo

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

#include <L1AnalysisGMT.h>

Public Member Functions

L1AnalysisGMTDataFormatgetData ()
 
 L1AnalysisGMT ()
 
void Reset ()
 
void Set (const L1MuGMTReadoutCollection *gmtrc, unsigned maxDTBX, unsigned maxCSC, unsigned maxRPC, unsigned maxGMT, bool physVal)
 
 ~L1AnalysisGMT ()
 

Private Attributes

L1AnalysisGMTDataFormat gmt_
 

Detailed Description

Definition at line 15 of file L1AnalysisGMT.h.

Constructor & Destructor Documentation

◆ L1AnalysisGMT()

L1Analysis::L1AnalysisGMT::L1AnalysisGMT ( )

Definition at line 3 of file L1AnalysisGMT.cc.

3 {}

◆ ~L1AnalysisGMT()

L1Analysis::L1AnalysisGMT::~L1AnalysisGMT ( )

Definition at line 5 of file L1AnalysisGMT.cc.

5 {}

Member Function Documentation

◆ getData()

L1AnalysisGMTDataFormat* L1Analysis::L1AnalysisGMT::getData ( void  )
inline

Definition at line 26 of file L1AnalysisGMT.h.

26 { return &gmt_; }

References gmt_.

◆ Reset()

void L1Analysis::L1AnalysisGMT::Reset ( )
inline

Definition at line 27 of file L1AnalysisGMT.h.

27 { gmt_.Reset(); }

References gmt_, and L1Analysis::L1AnalysisGMTDataFormat::Reset().

◆ Set()

void L1Analysis::L1AnalysisGMT::Set ( const L1MuGMTReadoutCollection gmtrc,
unsigned  maxDTBX,
unsigned  maxCSC,
unsigned  maxRPC,
unsigned  maxGMT,
bool  physVal 
)

Definition at line 7 of file L1AnalysisGMT.cc.

12  {
13  std::vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->getRecords();
14  std::vector<L1MuGMTReadoutRecord>::const_iterator igmtrr;
15  for (igmtrr = gmt_records.begin(); igmtrr != gmt_records.end(); igmtrr++) {
16  std::vector<L1MuRegionalCand>::const_iterator iter1;
17  std::vector<L1MuRegionalCand> rmc;
18 
19  if (igmtrr->getBxInEvent() == 0) {
20  gmt_.EvBx = igmtrr->getBxNr();
21  }
22 
23  //
24  // DTBX Trigger
25  //
26 
27  int iidt = 0;
28  rmc = igmtrr->getDTBXCands();
29  for (iter1 = rmc.begin(); iter1 != rmc.end(); iter1++) {
30  if ((unsigned)gmt_.Ndt < maxDTBX && !(*iter1).empty()) {
31  gmt_.Bxdt.push_back((*iter1).bx());
32  if (physVal) {
33  gmt_.Etadt.push_back(float((*iter1).etaValue()));
34  gmt_.Phidt.push_back(float((*iter1).phiValue()));
35  gmt_.Ptdt.push_back(float((*iter1).ptValue()));
36  } else {
37  gmt_.Etadt.push_back(float((*iter1).eta_packed()));
38  gmt_.Phidt.push_back(float((*iter1).phi_packed()));
39  gmt_.Ptdt.push_back(float((*iter1).pt_packed()));
40  }
41  gmt_.Chadt.push_back((*iter1).chargeValue());
42  if (!(*iter1).chargeValid())
43  gmt_.Chadt.push_back(0);
44  gmt_.FineEtadt.push_back((*iter1).isFineHalo());
45  gmt_.Qualdt.push_back((*iter1).quality());
46  gmt_.Dwdt.push_back((*iter1).getDataWord());
47  gmt_.Chdt.push_back(iidt);
48 
49  gmt_.Ndt++;
50  }
51  iidt++;
52  }
53 
54  //
55  // CSC Trigger
56  //
57 
58  rmc = igmtrr->getCSCCands();
59  for (iter1 = rmc.begin(); iter1 != rmc.end(); iter1++) {
60  if ((unsigned)gmt_.Ncsc < maxCSC && !(*iter1).empty()) {
61  gmt_.Bxcsc.push_back((*iter1).bx());
62  if (physVal) {
63  gmt_.Etacsc.push_back((*iter1).etaValue());
64  gmt_.Phicsc.push_back((*iter1).phiValue());
65  gmt_.Ptcsc.push_back((*iter1).ptValue());
66  } else {
67  gmt_.Etacsc.push_back((*iter1).eta_packed());
68  gmt_.Phicsc.push_back((*iter1).phi_packed());
69  gmt_.Ptcsc.push_back((*iter1).pt_packed());
70  }
71  gmt_.Chacsc.push_back((*iter1).chargeValue());
72  if (!(*iter1).chargeValid())
73  gmt_.Chacsc.push_back(0);
74  gmt_.Qualcsc.push_back((*iter1).quality());
75  gmt_.Dwcsc.push_back((*iter1).getDataWord());
76 
77  gmt_.Ncsc++;
78  }
79  }
80 
81  //
82  // RPCb Trigger
83  //
84 
85  rmc = igmtrr->getBrlRPCCands();
86  for (iter1 = rmc.begin(); iter1 != rmc.end(); iter1++) {
87  if ((unsigned)gmt_.Nrpcb < maxRPC && !(*iter1).empty()) {
88  gmt_.Bxrpcb.push_back((*iter1).bx());
89  if (physVal) {
90  gmt_.Etarpcb.push_back((*iter1).etaValue());
91  gmt_.Phirpcb.push_back((*iter1).phiValue());
92  gmt_.Ptrpcb.push_back((*iter1).ptValue());
93  } else {
94  gmt_.Etarpcb.push_back((*iter1).eta_packed());
95  gmt_.Phirpcb.push_back((*iter1).phi_packed());
96  gmt_.Ptrpcb.push_back((*iter1).pt_packed());
97  }
98  gmt_.Charpcb.push_back((*iter1).chargeValue());
99  if (!(*iter1).chargeValid())
100  gmt_.Charpcb.push_back(0);
101  gmt_.Qualrpcb.push_back((*iter1).quality());
102  gmt_.Dwrpcb.push_back((*iter1).getDataWord());
103 
104  gmt_.Nrpcb++;
105  }
106  }
107 
108  //
109  // RPCf Trigger
110  //
111 
112  rmc = igmtrr->getFwdRPCCands();
113  for (iter1 = rmc.begin(); iter1 != rmc.end(); iter1++) {
114  if ((unsigned)gmt_.Nrpcf < maxRPC && !(*iter1).empty()) {
115  gmt_.Bxrpcf.push_back((*iter1).bx());
116  if (physVal) {
117  gmt_.Etarpcf.push_back((*iter1).etaValue());
118  gmt_.Phirpcf.push_back((*iter1).phiValue());
119  gmt_.Ptrpcf.push_back((*iter1).ptValue());
120  } else {
121  gmt_.Etarpcf.push_back((*iter1).eta_packed());
122  gmt_.Phirpcf.push_back((*iter1).phi_packed());
123  gmt_.Ptrpcf.push_back((*iter1).pt_packed());
124  }
125  gmt_.Charpcf.push_back((*iter1).chargeValue());
126  if (!(*iter1).chargeValid())
127  gmt_.Charpcf.push_back(0);
128  gmt_.Qualrpcf.push_back((*iter1).quality());
129  gmt_.Dwrpcf.push_back((*iter1).getDataWord());
130 
131  gmt_.Nrpcf++;
132  }
133  }
134 
135  //
136  // GMT_. Trigger
137  //
138 
139  std::vector<L1MuGMTExtendedCand>::const_iterator gmt_iter;
140  std::vector<L1MuGMTExtendedCand> exc = igmtrr->getGMTCands();
141  for (gmt_iter = exc.begin(); gmt_iter != exc.end(); gmt_iter++) {
142  if ((unsigned)gmt_.N < maxGMT && !(*gmt_iter).empty()) {
143  gmt_.CandBx.push_back((*gmt_iter).bx());
144  if (physVal) {
145  gmt_.Eta.push_back((*gmt_iter).etaValue());
146  gmt_.Phi.push_back((*gmt_iter).phiValue());
147  gmt_.Pt.push_back((*gmt_iter).ptValue());
148  } else {
149  gmt_.Eta.push_back((*gmt_iter).etaIndex());
150  gmt_.Phi.push_back((*gmt_iter).phiIndex());
151  gmt_.Pt.push_back((*gmt_iter).ptIndex());
152  }
153  gmt_.Cha.push_back((*gmt_iter).charge());
154  if (!(*gmt_iter).charge_valid())
155  gmt_.Cha.push_back(0);
156  gmt_.Qual.push_back((*gmt_iter).quality());
157  gmt_.Det.push_back((*gmt_iter).detector());
158  gmt_.Rank.push_back((*gmt_iter).rank());
159  gmt_.Isol.push_back((*gmt_iter).isol());
160  gmt_.Mip.push_back((*gmt_iter).mip());
161  gmt_.Dw.push_back((*gmt_iter).getDataWord());
162 
163  gmt_.IdxRPCb.push_back(-1);
164  gmt_.IdxRPCf.push_back(-1);
165  gmt_.IdxDTBX.push_back(-1);
166  gmt_.IdxCSC.push_back(-1);
167 
168  if ((*gmt_iter).isMatchedCand() || (*gmt_iter).isRPC()) {
169  if ((*gmt_iter).isFwd()) {
170  gmt_.IdxRPCf.back() = (*gmt_iter).getRPCIndex();
171  } else {
172  gmt_.IdxRPCb.back() = (*gmt_iter).getRPCIndex();
173  }
174  }
175 
176  if ((*gmt_iter).isMatchedCand() || (!(*gmt_iter).isRPC())) {
177  if ((*gmt_iter).isFwd()) {
178  gmt_.IdxCSC.back() = (*gmt_iter).getDTCSCIndex();
179  } else {
180  gmt_.IdxDTBX.back() = (*gmt_iter).getDTCSCIndex();
181  }
182  }
183  gmt_.N++;
184  }
185  }
186  }
187 }

References L1MuGMTReadoutCollection::getRecords(), l1Tree_cfi::maxCSC, l1Tree_cfi::maxDTBX, l1Tree_cfi::maxGMT, l1Tree_cfi::maxRPC, and l1Tree_cfi::physVal.

Member Data Documentation

◆ gmt_

L1AnalysisGMTDataFormat L1Analysis::L1AnalysisGMT::gmt_
private

Definition at line 30 of file L1AnalysisGMT.h.

Referenced by getData(), and Reset().

L1Analysis::L1AnalysisGMTDataFormat::Ndt
int Ndt
Definition: L1AnalysisGMTDataFormat.h:117
L1Analysis::L1AnalysisGMTDataFormat::Ptcsc
std::vector< float > Ptcsc
Definition: L1AnalysisGMTDataFormat.h:131
L1Analysis::L1AnalysisGMTDataFormat::Chacsc
std::vector< int > Chacsc
Definition: L1AnalysisGMTDataFormat.h:132
L1Analysis::L1AnalysisGMTDataFormat::Dwdt
std::vector< int > Dwdt
Definition: L1AnalysisGMTDataFormat.h:125
L1Analysis::L1AnalysisGMTDataFormat::Ptrpcf
std::vector< float > Ptrpcf
Definition: L1AnalysisGMTDataFormat.h:151
L1Analysis::L1AnalysisGMTDataFormat::Phidt
std::vector< float > Phidt
Definition: L1AnalysisGMTDataFormat.h:123
L1Analysis::L1AnalysisGMTDataFormat::Etarpcf
std::vector< float > Etarpcf
Definition: L1AnalysisGMTDataFormat.h:153
L1Analysis::L1AnalysisGMTDataFormat::Pt
std::vector< float > Pt
Definition: L1AnalysisGMTDataFormat.h:161
L1Analysis::L1AnalysisGMTDataFormat::Etarpcb
std::vector< float > Etarpcb
Definition: L1AnalysisGMTDataFormat.h:143
L1Analysis::L1AnalysisGMTDataFormat::Cha
std::vector< int > Cha
Definition: L1AnalysisGMTDataFormat.h:162
l1Tree_cfi.maxGMT
maxGMT
Definition: l1Tree_cfi.py:49
L1Analysis::L1AnalysisGMTDataFormat::Isol
std::vector< int > Isol
Definition: L1AnalysisGMTDataFormat.h:168
L1Analysis::L1AnalysisGMTDataFormat::Ptrpcb
std::vector< float > Ptrpcb
Definition: L1AnalysisGMTDataFormat.h:141
L1Analysis::L1AnalysisGMTDataFormat::Nrpcb
int Nrpcb
Definition: L1AnalysisGMTDataFormat.h:139
L1Analysis::L1AnalysisGMTDataFormat::Phirpcf
std::vector< float > Phirpcf
Definition: L1AnalysisGMTDataFormat.h:154
L1Analysis::L1AnalysisGMTDataFormat::Phicsc
std::vector< float > Phicsc
Definition: L1AnalysisGMTDataFormat.h:134
L1Analysis::L1AnalysisGMTDataFormat::Qual
std::vector< int > Qual
Definition: L1AnalysisGMTDataFormat.h:165
L1Analysis::L1AnalysisGMTDataFormat::Qualcsc
std::vector< int > Qualcsc
Definition: L1AnalysisGMTDataFormat.h:135
L1Analysis::L1AnalysisGMTDataFormat::Phirpcb
std::vector< float > Phirpcb
Definition: L1AnalysisGMTDataFormat.h:144
L1Analysis::L1AnalysisGMTDataFormat::Qualdt
std::vector< int > Qualdt
Definition: L1AnalysisGMTDataFormat.h:124
L1Analysis::L1AnalysisGMTDataFormat::Dwrpcf
std::vector< int > Dwrpcf
Definition: L1AnalysisGMTDataFormat.h:156
L1Analysis::L1AnalysisGMTDataFormat::IdxRPCf
std::vector< int > IdxRPCf
Definition: L1AnalysisGMTDataFormat.h:172
L1Analysis::L1AnalysisGMTDataFormat::Det
std::vector< int > Det
Definition: L1AnalysisGMTDataFormat.h:166
L1Analysis::L1AnalysisGMTDataFormat::Phi
std::vector< float > Phi
Definition: L1AnalysisGMTDataFormat.h:164
l1Tree_cfi.maxCSC
maxCSC
Definition: l1Tree_cfi.py:48
L1Analysis::L1AnalysisGMTDataFormat::Ptdt
std::vector< float > Ptdt
Definition: L1AnalysisGMTDataFormat.h:119
L1Analysis::L1AnalysisGMT::gmt_
L1AnalysisGMTDataFormat gmt_
Definition: L1AnalysisGMT.h:30
L1Analysis::L1AnalysisGMTDataFormat::Eta
std::vector< float > Eta
Definition: L1AnalysisGMTDataFormat.h:163
L1Analysis::L1AnalysisGMTDataFormat::Bxdt
std::vector< int > Bxdt
Definition: L1AnalysisGMTDataFormat.h:118
L1Analysis::L1AnalysisGMTDataFormat::Mip
std::vector< int > Mip
Definition: L1AnalysisGMTDataFormat.h:169
l1Tree_cfi.maxDTBX
maxDTBX
Definition: l1Tree_cfi.py:47
L1Analysis::L1AnalysisGMTDataFormat::IdxCSC
std::vector< int > IdxCSC
Definition: L1AnalysisGMTDataFormat.h:174
L1Analysis::L1AnalysisGMTDataFormat::Charpcb
std::vector< int > Charpcb
Definition: L1AnalysisGMTDataFormat.h:142
L1MuGMTReadoutCollection::getRecords
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
Definition: L1MuGMTReadoutCollection.h:52
L1Analysis::L1AnalysisGMTDataFormat::Qualrpcf
std::vector< int > Qualrpcf
Definition: L1AnalysisGMTDataFormat.h:155
L1Analysis::L1AnalysisGMTDataFormat::CandBx
std::vector< int > CandBx
Definition: L1AnalysisGMTDataFormat.h:160
L1Analysis::L1AnalysisGMTDataFormat::Chdt
std::vector< int > Chdt
Definition: L1AnalysisGMTDataFormat.h:126
L1Analysis::L1AnalysisGMTDataFormat::Etadt
std::vector< float > Etadt
Definition: L1AnalysisGMTDataFormat.h:121
L1Analysis::L1AnalysisGMTDataFormat::EvBx
int EvBx
Definition: L1AnalysisGMTDataFormat.h:114
L1Analysis::L1AnalysisGMTDataFormat::Charpcf
std::vector< int > Charpcf
Definition: L1AnalysisGMTDataFormat.h:152
L1Analysis::L1AnalysisGMTDataFormat::Nrpcf
int Nrpcf
Definition: L1AnalysisGMTDataFormat.h:149
L1Analysis::L1AnalysisGMTDataFormat::Ncsc
int Ncsc
Definition: L1AnalysisGMTDataFormat.h:129
L1Analysis::L1AnalysisGMTDataFormat::IdxDTBX
std::vector< int > IdxDTBX
Definition: L1AnalysisGMTDataFormat.h:173
L1Analysis::L1AnalysisGMTDataFormat::Bxrpcb
std::vector< int > Bxrpcb
Definition: L1AnalysisGMTDataFormat.h:140
L1Analysis::L1AnalysisGMTDataFormat::Bxcsc
std::vector< int > Bxcsc
Definition: L1AnalysisGMTDataFormat.h:130
L1Analysis::L1AnalysisGMTDataFormat::Dwrpcb
std::vector< int > Dwrpcb
Definition: L1AnalysisGMTDataFormat.h:146
L1Analysis::L1AnalysisGMTDataFormat::IdxRPCb
std::vector< int > IdxRPCb
Definition: L1AnalysisGMTDataFormat.h:171
L1Analysis::L1AnalysisGMTDataFormat::Reset
void Reset()
Definition: L1AnalysisGMTDataFormat.h:18
L1Analysis::L1AnalysisGMTDataFormat::Dw
std::vector< int > Dw
Definition: L1AnalysisGMTDataFormat.h:170
L1Analysis::L1AnalysisGMTDataFormat::FineEtadt
std::vector< int > FineEtadt
Definition: L1AnalysisGMTDataFormat.h:122
L1Analysis::L1AnalysisGMTDataFormat::Qualrpcb
std::vector< int > Qualrpcb
Definition: L1AnalysisGMTDataFormat.h:145
L1Analysis::L1AnalysisGMTDataFormat::Dwcsc
std::vector< int > Dwcsc
Definition: L1AnalysisGMTDataFormat.h:136
l1Tree_cfi.physVal
physVal
Definition: l1Tree_cfi.py:5
L1Analysis::L1AnalysisGMTDataFormat::Chadt
std::vector< int > Chadt
Definition: L1AnalysisGMTDataFormat.h:120
L1Analysis::L1AnalysisGMTDataFormat::N
int N
Definition: L1AnalysisGMTDataFormat.h:159
L1Analysis::L1AnalysisGMTDataFormat::Bxrpcf
std::vector< int > Bxrpcf
Definition: L1AnalysisGMTDataFormat.h:150
L1Analysis::L1AnalysisGMTDataFormat::Etacsc
std::vector< float > Etacsc
Definition: L1AnalysisGMTDataFormat.h:133
l1Tree_cfi.maxRPC
maxRPC
Definition: l1Tree_cfi.py:46
L1Analysis::L1AnalysisGMTDataFormat::Rank
std::vector< int > Rank
Definition: L1AnalysisGMTDataFormat.h:167