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 
76  return CSCCorrelatedLCTDigi(1,
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  // Filling "trknmb" with 1 and "bx0" with 0 (as in MC).
89  // May consider filling "trknmb" with 2 for 2nd LCT in the same chamber. - AWB 24.05.17
90  // trknmb and bx0 are unused in the EMTF emulator code. mpclink = 0 (after bx) indicates unsorted.
91  }
92 
93  // // Not yet implemented - AWB 15.03.17
94  // RPCDigi EMTFHit::CreateRPCDigi() const {
95  // return RPCDigi( (strip_hi + strip_lo) / 2, bx + CSCConstants::LCT_CENTRAL_BX );
96  // }
97 
99  std::vector<uint16_t> pads;
100  for (int i = Pad_low(); i < Pad_hi(); ++i)
101  pads.emplace_back(static_cast<uint16_t>(i));
102  return GEMPadDigiCluster(pads, bx);
103  }
104 
105 } // End namespace l1t
mps_fire.i
i
Definition: mps_fire.py:428
l1t::EMTFHit::bend
int bend
0 or 1. For CSCs only.
Definition: EMTFHit.h:309
l1t::EMTFHit::pattern
int pattern
0 - 10. For CSCs only.
Definition: EMTFHit.h:308
l1t::EMTFHit::sector_RPC
int sector_RPC
1 - 6. RPC sector convention (in CMSSW): sector 1 starts at -5 degrees
Definition: EMTFHit.h:288
RPCDetId
Definition: RPCDetId.h:16
GEMPadDigiCluster
Definition: GEMPadDigiCluster.h:19
l1t::EMTFHit::sector_idx
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:289
CSCConstants::LCT_CENTRAL_BX
Definition: CSCConstants.h:79
l1t::EMTFHit::csc_ID
int csc_ID
1 - 9. For CSCs only.
Definition: EMTFHit.h:293
l1t::EMTFHit::valid
int valid
0 or 1. For CSCs only (for now; could use to flag failing clusters? - AWB 02.03.17)
Definition: EMTFHit.h:310
l1t::EMTFHit::CreateRPCDetId
RPCDetId CreateRPCDetId() const
Definition: EMTFHit.cc:12
l1t::EMTFHit::chamber
int chamber
1 - 36. Chamber 1 starts at -5 degrees.
Definition: EMTFHit.h:292
l1t::EMTFHit::RPC_DetId
RPCDetId RPC_DetId() const
Definition: EMTFHit.h:123
l1t::EMTFHit::CreateGEMPadDigiCluster
GEMPadDigiCluster CreateGEMPadDigiCluster() const
Definition: EMTFHit.cc:98
l1t::EMTFHit::CreateCSCDetId
CSCDetId CreateCSCDetId() const
Definition: EMTFHit.cc:6
l1t::EMTFHit::quality
int quality
0 - 15. For CSCs only.
Definition: EMTFHit.h:307
l1t::EMTFHit::strip_low
int strip_low
? - ?. For RPCs only, lowest strip in a cluster. (Range? - AWB 02.03.17)
Definition: EMTFHit.h:305
CSCConstants.h
l1t::EMTFHit::sync_err
int sync_err
0 or 1. For CSCs only.
Definition: EMTFHit.h:311
l1t::EMTFHit::CreateCPPFDigi
CPPFDigi CreateCPPFDigi() const
Definition: EMTFHit.cc:50
l1t::EMTFHit::endcap
int endcap
+/-1. For ME+ and ME-.
Definition: EMTFHit.h:284
l1t::EMTFHit::subsector_RPC
int subsector_RPC
0 - 6. RPC sector convention (in CMSSW): subsector 3 is the first chamber in the EMTF sector.
Definition: EMTFHit.h:291
l1t
delete x;
Definition: CaloConfig.h:22
l1t::EMTFHit::CreateGEMDetId
GEMDetId CreateGEMDetId() const
Definition: EMTFHit.cc:44
GEMDetId
Definition: GEMDetId.h:18
CSCDetId
Definition: CSCDetId.h:26
l1t::EMTFHit::CreateME0DetId
ME0DetId CreateME0DetId() const
Definition: EMTFHit.cc:48
l1t::EMTFHit::layer
int layer
0 - 1. For GEMs only, superchamber detector layer (1 or 2).
Definition: EMTFHit.h:313
l1t::EMTFHit::neighbor
int neighbor
0 or 1. Filled in EMTFBlock(ME|GEM|RPC).cc
Definition: EMTFHit.h:296
l1t::EMTFHit::Is_RPC
bool Is_RPC() const
Definition: EMTFHit.h:269
l1t::EMTFHit::phi_glob
float phi_glob
+/-180.
Definition: EMTFHit.h:327
EMTFHit.h
l1t::EMTFHit::theta_fp
int theta_fp
0 - 127
Definition: EMTFHit.h:319
ME0DetId
Definition: ME0DetId.h:16
l1t::EMTFHit::wire
int wire
0 - 111 For CSCs only.
Definition: EMTFHit.h:302
l1t::EMTFHit::station
int station
1 - 4.
Definition: EMTFHit.h:285
l1t::EMTFHit::Pad_low
int Pad_low() const
Repurpose "strip" as GEM pad for GEM sourced hits.
Definition: EMTFHit.h:234
l1t::CPPFDigi
Definition: CPPFDigi.h:12
l1t::EMTFHit::CreateCSCCorrelatedLCTDigi
CSCCorrelatedLCTDigi CreateCSCCorrelatedLCTDigi() const
Definition: EMTFHit.cc:75
l1t::EMTFHit::theta
float theta
0 - 90.
Definition: EMTFHit.h:328
l1t::EMTFHit::strip
int strip
0 - 158 For CSCs only.
Definition: EMTFHit.h:303
l1t::EMTFHit::strip_hi
int strip_hi
? - ?. For RPCs only, highest strip in a cluster. (Range? - AWB 02.03.17)
Definition: EMTFHit.h:304
l1t::EMTFHit::ring
int ring
1 - 4. ME1/1a is denoted as "Ring 4". Should check dependence on input CSCDetId convention....
Definition: EMTFHit.h:286
l1t::EMTFHit::Pad_hi
int Pad_hi() const
Repurpose "strip" as GEM pad for GEM sourced hits.
Definition: EMTFHit.h:232
l1t::EMTFHit::phi_fp
int phi_fp
0 - 4920
Definition: EMTFHit.h:318
l1t::EMTFHit::roll
int roll
1 - 3. For RPCs only, sub-division of ring. (Range? - AWB 02.03.17)
Definition: EMTFHit.h:295
CSCCorrelatedLCTDigi
Definition: CSCCorrelatedLCTDigi.h:19
l1t::EMTFHit::bx
int bx
-3 - +3.
Definition: EMTFHit.h:316