CMS 3D CMS Logo

EMTFHit.cc
Go to the documentation of this file.
3 
4 namespace l1t {
5 
7  return CSCDetId((endcap == 1) ? 1 : 2, station, (ring == 4) ? 1 : ring, chamber, 0);
8  // Layer always filled as 0 (indicates "whole chamber")
9  // See http://cmslxr.fnal.gov/source/L1Trigger/CSCTriggerPrimitives/src/CSCTriggerPrimitivesBuilder.cc#0198
10  }
11 
13  int roll_ = roll;
14  int theta_ = theta_fp / 4;
15  if (roll < 1 || roll > 3) {
16  switch (station * 2 + ring) { // Infer roll from integer theta value, by station / ring
17  case 4:
18  roll_ = (theta_ < 17 ? 3 : (theta_ > 18 ? 1 : 2));
19  break; // RE1/2
20  case 6:
21  roll_ = (theta_ < 16 ? 3 : (theta_ > 17 ? 1 : 2));
22  break; // RE2/2
23  case 8:
24  roll_ = (theta_ < 12 ? 3 : (theta_ > 13 ? 1 : 2));
25  break; // RE3/2
26  case 9:
27  roll_ = (theta_ < 20 ? 3 : (theta_ > 21 ? 1 : 2));
28  break; // RE3/3
29  case 10:
30  roll_ = (theta_ < 11 ? 3 : (theta_ > 11 ? 1 : 2));
31  break; // RE4/2
32  case 11:
33  roll_ = (theta_ < 18 ? 3 : (theta_ > 19 ? 1 : 2));
34  break; // RE4/3
35  default:
36  roll_ = 2; // Default to 2 if no valid value found
37  }
38  }
39 
40  return RPCDetId(endcap, ring, station, sector_RPC, 1, subsector_RPC, roll_);
41  // Layer always filled as 1, as layer 2 is only used in the barrel
42  }
43 
45  if (is_RPC != 1)
46  return CPPFDigi();
47 
48  int board_ = 1 + ((chamber % 36) / 9); // RPC chamber to CPPF board mapping
49  int channel_ = (chamber % 9); // RPC chamber to CPPF output link mapping
50  int sector_ = (sector_idx + 1) - 6 * (endcap == -1);
51  int link_ = (neighbor ? 0 : 1 + (((chamber + 33) % 36) % 6)); // RPC chamber to EMTF input link mapping
52  int nStrips_ = (strip_low < 0 ? -99 : 1 + strip_hi - strip_low); // Cluster size in number of strips
53 
54  return CPPFDigi(RPC_DetId(),
55  bx,
56  phi_fp / 4,
57  theta_fp / 4,
58  valid,
59  board_,
60  channel_,
61  sector_,
62  link_,
63  strip_low,
64  nStrips_,
65  phi_glob,
66  theta);
67  }
68 
70  return CSCCorrelatedLCTDigi(1,
71  valid,
72  quality,
73  wire,
74  strip,
75  pattern,
76  (bend == 1) ? 1 : 0,
78  0,
79  0,
80  sync_err,
81  csc_ID);
82  // Filling "trknmb" with 1 and "bx0" with 0 (as in MC).
83  // May consider filling "trknmb" with 2 for 2nd LCT in the same chamber. - AWB 24.05.17
84  // trknmb and bx0 are unused in the EMTF emulator code. mpclink = 0 (after bx) indicates unsorted.
85  }
86 
87  // // Not yet implemented - AWB 15.03.17
88  // RPCDigi EMTFHit::CreateRPCDigi() const {
89  // return RPCDigi( (strip_hi + strip_lo) / 2, bx + CSCConstants::LCT_CENTRAL_BX );
90  // }
91 
92 } // End namespace l1t
RPCDetId RPC_DetId() const
Definition: EMTFHit.h:126
int station
Definition: EMTFHit.h:258
int neighbor
Definition: EMTFHit.h:269
int is_RPC
Definition: EMTFHit.h:311
int sector_idx
Definition: EMTFHit.h:262
delete x;
Definition: CaloConfig.h:22
int sync_err
Definition: EMTFHit.h:284
int subsector_RPC
Definition: EMTFHit.h:264
int sector_RPC
Definition: EMTFHit.h:261
float theta
Definition: EMTFHit.h:300
RPCDetId CreateRPCDetId() const
Definition: EMTFHit.cc:12
CPPFDigi CreateCPPFDigi() const
Definition: EMTFHit.cc:44
CSCDetId CreateCSCDetId() const
Definition: EMTFHit.cc:6
CSCCorrelatedLCTDigi CreateCSCCorrelatedLCTDigi() const
Definition: EMTFHit.cc:69
int pattern
Definition: EMTFHit.h:281
int endcap
Definition: EMTFHit.h:257
int strip_low
Definition: EMTFHit.h:278
int quality
Definition: EMTFHit.h:280
int phi_fp
Definition: EMTFHit.h:288
int theta_fp
Definition: EMTFHit.h:289
int strip_hi
Definition: EMTFHit.h:277
float phi_glob
Definition: EMTFHit.h:299
int chamber
Definition: EMTFHit.h:265
int csc_ID
Definition: EMTFHit.h:266