CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
HcalTriggerPrimitiveAlgo.cc File Reference
#include "SimCalorimetry/HcalTrigPrimAlgos/interface/HcalTriggerPrimitiveAlgo.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include <iostream>
#include "DataFormats/HcalDetId/interface/HcalDetId.h"
#include "Geometry/HcalTowerAlgo/interface/HcalTrigTowerGeometry.h"
#include "DataFormats/HcalDetId/interface/HcalTrigTowerDetId.h"
#include "DataFormats/FEDRawData/interface/FEDNumbering.h"
#include "DataFormats/HcalDetId/interface/HcalElectronicsId.h"
#include "EventFilter/HcalRawToDigi/interface/HcalDCCHeader.h"
#include "EventFilter/HcalRawToDigi/interface/HcalHTRData.h"

Go to the source code of this file.

Functions

int converttoGCTeta (int &eta)
 
int converttoGCTetaFromTPG (int &etaTPG)
 
int converttoGCTphi (int &phi)
 
int converttoGCTphiFromTPG (int &phiTPG)
 
int converttoTPGeta (int &GCTeta)
 
int converttoTPGphi (int &GCTphi)
 

Function Documentation

int converttoGCTeta ( int &  eta)

Definition at line 46 of file HcalTriggerPrimitiveAlgo.cc.

Referenced by HcalTriggerPrimitiveAlgo::run().

47  {
48  int GCTeta = 0;
49 
50  if (eta == 29 || eta == 30 || eta == 31)
51  {
52  GCTeta = 18;
53  }
54  else if (eta == 32 || eta == 33 || eta == 34)
55  {
56  GCTeta = 19;
57  }
58  else if (eta == 35 || eta == 36 || eta == 37)
59  {
60  GCTeta = 20;
61  }
62  else if (eta == 38 || eta == 39 || eta == 40 || eta == 41)
63  {
64  GCTeta = 21;
65  }
66  else if (eta == -29 || eta == -30 || eta == -31)
67  {
68  GCTeta = 3;
69  }
70  else if (eta == -32 || eta == -33 || eta == -34)
71  {
72  GCTeta = 2;
73  }
74  else if (eta == -35 || eta == -36 || eta == -37)
75  {
76  GCTeta = 1;
77  }
78  else if (eta == -38 || eta == -39 || eta == -40 || eta == -41)
79  {
80  GCTeta = 0;
81  }
82  return GCTeta;
83  }
int converttoGCTetaFromTPG ( int &  etaTPG)

Definition at line 284 of file HcalTriggerPrimitiveAlgo.cc.

Referenced by HcalTriggerPrimitiveAlgo::analyzeHF().

285 {
286  int neweta = 0;
287 
288  if (etaTPG == -32)
289  {
290  neweta = 0;
291  }
292  if (etaTPG == -31)
293  {
294  neweta = 1;
295  }
296  if (etaTPG == -30)
297  {
298  neweta = 2;
299  }
300  if (etaTPG == -29)
301  {
302  neweta = 3;
303  }
304 
305  if (etaTPG == 29)
306  {
307  neweta = 18;
308  }
309  if (etaTPG == 30)
310  {
311  neweta = 19;
312  }
313  if (etaTPG == 31)
314  {
315  neweta = 20;
316  }
317  if (etaTPG == 32)
318  {
319  neweta = 21;
320  }
321  return neweta;
322 }
int converttoGCTphi ( int &  phi)

Definition at line 85 of file HcalTriggerPrimitiveAlgo.cc.

Referenced by HcalTriggerPrimitiveAlgo::run().

86  {
87 
88  int GCTphi = 0;
89 
90  if (phi == 1 || phi == 71)
91  {
92  GCTphi = 0;
93  }
94  else if (phi == 3 || phi == 5)
95  {
96  GCTphi = 1;
97  }
98  else if (phi == 7 || phi == 9)
99  {
100  GCTphi = 2;
101  }
102  else if (phi == 11 || phi == 13)
103  {
104  GCTphi = 3;
105  }
106  else if (phi == 15 || phi == 17)
107  {
108  GCTphi = 4;
109  }
110  else if (phi == 19 || phi == 21)
111  {
112  GCTphi = 5;
113  }
114  else if (phi == 23 || phi == 25)
115  {
116  GCTphi = 6;
117  }
118  else if (phi == 27 || phi == 29)
119  {
120  GCTphi = 7;
121  }
122  else if (phi == 31 || phi == 33)
123  {
124  GCTphi = 8;
125  }
126  else if (phi == 35 || phi == 37)
127  {
128  GCTphi = 9;
129  }
130  else if (phi == 39 || phi == 41)
131  {
132  GCTphi = 10;
133  }
134  else if (phi == 43 || phi == 45)
135  {
136  GCTphi = 11;
137  }
138  else if (phi == 47 || phi == 49)
139  {
140  GCTphi = 12;
141  }
142  else if (phi == 51 || phi == 53)
143  {
144  GCTphi = 13;
145  }
146  else if (phi == 55 || phi == 57)
147  {
148  GCTphi = 14;
149  }
150  else if (phi == 59 || phi == 61)
151  {
152  GCTphi = 15;
153  }
154  else if (phi == 63 || phi == 65)
155  {
156  GCTphi = 16;
157  }
158  else if (phi == 67 || phi == 69)
159  {
160  GCTphi = 17;
161  }
162  return GCTphi;
163  }
Geom::Phi< T > phi() const
int converttoGCTphiFromTPG ( int &  phiTPG)

Definition at line 324 of file HcalTriggerPrimitiveAlgo.cc.

Referenced by HcalTriggerPrimitiveAlgo::analyzeHF().

325 {
326  int newphi = 0;
327 
328  if (phiTPG == 1)
329  {
330  newphi = 0;
331  }
332  else if (phiTPG == 5 )
333  {
334  newphi = 1;
335  }
336  else if (phiTPG == 9)
337  {
338  newphi = 2;
339  }
340  else if (phiTPG == 13)
341  {
342  newphi = 3;
343  }
344  else if (phiTPG == 17)
345  {
346  newphi = 4;
347  }
348  else if (phiTPG == 21)
349  {
350  newphi = 5;
351  }
352  else if (phiTPG == 25)
353  {
354  newphi = 6;
355  }
356  else if (phiTPG == 29)
357  {
358  newphi = 7;
359  }
360  else if (phiTPG == 33)
361  {
362  newphi = 8;
363  }
364  else if (phiTPG == 37)
365  {
366  newphi = 9;
367  }
368  else if (phiTPG == 41)
369  {
370  newphi = 10;
371  }
372  else if (phiTPG == 45)
373  {
374  newphi = 11;
375  }
376  else if (phiTPG == 49)
377  {
378  newphi = 12;
379  }
380  else if (phiTPG == 53)
381  {
382  newphi = 13;
383  }
384  else if (phiTPG == 57)
385  {
386  newphi = 14;
387  }
388  else if (phiTPG == 61)
389  {
390  newphi = 15;
391  }
392  else if (phiTPG == 65)
393  {
394  newphi = 16;
395  }
396  else if (phiTPG == 69)
397  {
398  newphi = 17;
399  }
400  return newphi;
401 }
int converttoTPGeta ( int &  GCTeta)

Definition at line 165 of file HcalTriggerPrimitiveAlgo.cc.

166 {
167  int TPGeta = 0;
168 
169  if (GCTeta == 0)
170  {
171  TPGeta = -32;
172  }
173  if (GCTeta == 1)
174  {
175  TPGeta = -31;
176  }
177  if (GCTeta == 2)
178  {
179  TPGeta = -30;
180  }
181  if (GCTeta == 3)
182  {
183  TPGeta = -29;
184  }
185  if (GCTeta == 18)
186  {
187  TPGeta = 29;
188  }
189  if (GCTeta == 19)
190  {
191  TPGeta = 30;
192  }
193  if (GCTeta == 20)
194  {
195  TPGeta = 31;
196  }
197  if (GCTeta == 21)
198  {
199  TPGeta = 32;
200  }
201 
202  return TPGeta;
203 }
int converttoTPGphi ( int &  GCTphi)

Definition at line 205 of file HcalTriggerPrimitiveAlgo.cc.

206 {
207  int TPGphi = 0;
208 
209  if (GCTphi == 0)
210  {
211  TPGphi = 1;
212  }
213  if (GCTphi == 1)
214  {
215  TPGphi = 5;
216  }
217  if (GCTphi == 2)
218  {
219  TPGphi = 9;
220  }
221  if (GCTphi == 3)
222  {
223  TPGphi = 13;
224  }
225  if (GCTphi == 4)
226  {
227  TPGphi = 17;
228  }
229  if (GCTphi == 5)
230  {
231  TPGphi = 21;
232  }
233  if (GCTphi == 6)
234  {
235  TPGphi = 25;
236  }
237  if (GCTphi == 7)
238  {
239  TPGphi = 29;
240  }
241  if (GCTphi == 8)
242  {
243  TPGphi = 33;
244  }
245  if (GCTphi == 9)
246  {
247  TPGphi = 37;
248  }
249  if (GCTphi == 10)
250  {
251  TPGphi = 41;
252  }
253  if (GCTphi == 11)
254  {
255  TPGphi = 45;
256  }
257  if (GCTphi == 12)
258  {
259  TPGphi = 49;
260  }
261  if (GCTphi == 13)
262  {
263  TPGphi = 53;
264  }
265  if (GCTphi == 14)
266  {
267  TPGphi = 57;
268  }
269  if (GCTphi == 15)
270  {
271  TPGphi = 61;
272  }
273  if (GCTphi == 16)
274  {
275  TPGphi = 65;
276  }
277  if (GCTphi == 17)
278  {
279  TPGphi = 69;
280  }
281 return TPGphi;
282 }