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  return GEMDetId((endcap == 1) ? 1 : -1, ring, station, layer, chamber, roll);
46  }
47 
48  ME0DetId EMTFHit::CreateME0DetId() const { return ME0DetId((endcap == 1) ? 1 : -1, layer, chamber, roll); }
49 
51  if (!Is_RPC())
52  return CPPFDigi();
53 
54  int board_ = 1 + ((chamber % 36) / 9); // RPC chamber to CPPF board mapping
55  int channel_ = (chamber % 9); // RPC chamber to CPPF output link mapping
56  int sector_ = (sector_idx + 1) - 6 * (endcap == -1);
57  int link_ = (neighbor ? 0 : 1 + (((chamber + 33) % 36) % 6)); // RPC chamber to EMTF input link mapping
58  int nStrips_ = (strip_low < 0 ? -99 : 1 + strip_hi - strip_low); // Cluster size in number of strips
59 
60  return CPPFDigi(RPC_DetId(),
61  bx,
62  phi_fp / 4,
63  theta_fp / 4,
64  valid,
65  board_,
66  channel_,
67  sector_,
68  link_,
69  strip_low,
70  nStrips_,
71  phi_glob,
72  theta);
73  }
74 
77  valid,
78  quality,
79  wire,
80  strip,
81  pattern,
82  (bend == 1) ? 1 : 0,
84  0,
85  0,
86  sync_err,
87  csc_ID);
88  bool quart_bit = strip_quart_bit == 1;
89  bool eighth_bit = strip_eighth_bit == 1;
90 
91  lct.setQuartStripBit(quart_bit);
92  lct.setEighthStripBit(eighth_bit);
93  lct.setSlope(slope);
95  lct.setRun3(isRun3);
96 
97  return lct;
98  // Added Run 3 parameters - EY 04.07.22
99  // Filling "trknmb" with 1 and "bx0" with 0 (as in MC).
100  // May consider filling "trknmb" with 2 for 2nd LCT in the same chamber. - AWB 24.05.17
101  // trknmb and bx0 are unused in the EMTF emulator code. mpclink = 0 (after bx) indicates unsorted.
102  }
103 
104  // // Not yet implemented - AWB 15.03.17
105  // RPCDigi EMTFHit::CreateRPCDigi() const {
106  // return RPCDigi( (strip_hi + strip_lo) / 2, bx + CSCConstants::LCT_CENTRAL_BX );
107  // }
108 
110  std::vector<uint16_t> pads;
111  for (int i = Pad_low(); i < Pad_hi(); ++i)
112  pads.emplace_back(static_cast<uint16_t>(i));
113  return GEMPadDigiCluster(pads, bx);
114  }
115 
116 } // End namespace l1t
int slope
Run 3 For CSC only.
Definition: EMTFHit.h:333
int station
1 - 4.
Definition: EMTFHit.h:303
int ring
1 - 4. ME1/1a is denoted as "Ring 4". Should check dependence on input CSCDetId convention. - AWB 02.03.17
Definition: EMTFHit.h:304
int strip_eighth_bit
Run 3 CSC parameters.
Definition: EMTFHit.h:327
int neighbor
0 or 1. Filled in EMTFBlock(ME|GEM|RPC).cc
Definition: EMTFHit.h:314
void setSlope(const uint16_t slope)
set the slope
int sector_idx
0 - 11. 0 - 5 for ME+, 6 - 11 for ME-. For neighbor hits, set by EMTF sector that received it...
Definition: EMTFHit.h:307
void setQuartStripBit(const bool quartStripBit)
set single quart strip bit
void setEighthStripBit(const bool eighthStripBit)
set single eighth strip bit
GEMPadDigiCluster CreateGEMPadDigiCluster() const
Definition: EMTFHit.cc:109
delete x;
Definition: CaloConfig.h:22
int sync_err
0 or 1. For CSCs only.
Definition: EMTFHit.h:335
int subsector_RPC
0 - 6. RPC sector convention (in CMSSW): subsector 3 is the first chamber in the EMTF sector...
Definition: EMTFHit.h:309
int sector_RPC
1 - 6. RPC sector convention (in CMSSW): sector 1 starts at -5 degrees
Definition: EMTFHit.h:306
float theta
0 - 90.
Definition: EMTFHit.h:352
CSCCorrelatedLCTDigi CreateCSCCorrelatedLCTDigi(const bool isRun3) const
Definition: EMTFHit.cc:75
int roll
1 - 3. For RPCs only, sub-division of ring. (Range? - AWB 02.03.17)
Definition: EMTFHit.h:313
ME0DetId CreateME0DetId() const
Definition: EMTFHit.cc:48
CPPFDigi CreateCPPFDigi() const
Definition: EMTFHit.cc:50
int pattern_run3
Run 3 For CSC only.
Definition: EMTFHit.h:331
int bend
0 or 1. For CSCs only.
Definition: EMTFHit.h:332
int bx
-3 - +3.
Definition: EMTFHit.h:340
void setRun3Pattern(const uint16_t pattern)
set Run-3 pattern
bool Is_RPC() const
Definition: EMTFHit.h:287
int pattern
0 - 10. For CSCs only.
Definition: EMTFHit.h:330
int endcap
+/-1. For ME+ and ME-.
Definition: EMTFHit.h:302
int strip
0 - 158 For CSCs only.
Definition: EMTFHit.h:321
int strip_low
? - ?. For RPCs only, lowest strip in a cluster. (Range? - AWB 02.03.17)
Definition: EMTFHit.h:323
void setRun3(const bool isRun3)
RPCDetId RPC_DetId() const
Definition: EMTFHit.h:129
int layer
0 - 1. For GEMs only, superchamber detector layer (1 or 2).
Definition: EMTFHit.h:337
int wire
0 - 111 For CSCs only.
Definition: EMTFHit.h:320
int quality
0 - 15. For CSCs only.
Definition: EMTFHit.h:329
int phi_fp
0 - 4920
Definition: EMTFHit.h:342
int theta_fp
0 - 127
Definition: EMTFHit.h:343
int strip_hi
? - ?. For RPCs only, highest strip in a cluster. (Range? - AWB 02.03.17)
Definition: EMTFHit.h:322
int valid
0 or 1. For CSCs only (for now; could use to flag failing clusters? - AWB 02.03.17) ...
Definition: EMTFHit.h:334
float phi_glob
+/-180.
Definition: EMTFHit.h:351
int chamber
1 - 36. Chamber 1 starts at -5 degrees.
Definition: EMTFHit.h:310
int Pad_low() const
Repurpose "strip" as GEM pad for GEM sourced hits.
Definition: EMTFHit.h:252
int strip_quart_bit
Run 3 CSC parameters.
Definition: EMTFHit.h:326
RPCDetId CreateRPCDetId() const
Definition: EMTFHit.cc:12
GEMDetId CreateGEMDetId() const
Definition: EMTFHit.cc:44
int Pad_hi() const
Repurpose "strip" as GEM pad for GEM sourced hits.
Definition: EMTFHit.h:250
CSCDetId CreateCSCDetId() const
Definition: EMTFHit.cc:6
int csc_ID
1 - 9. For CSCs only.
Definition: EMTFHit.h:311