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())
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
l1t::EMTFHit::bend
int bend
Definition: EMTFHit.h:272
l1t::EMTFHit::pattern
int pattern
Definition: EMTFHit.h:271
l1t::EMTFHit::sector_RPC
int sector_RPC
Definition: EMTFHit.h:251
RPCDetId
Definition: RPCDetId.h:16
l1t::EMTFHit::sector_idx
int sector_idx
Definition: EMTFHit.h:252
CSCConstants::LCT_CENTRAL_BX
Definition: CSCConstants.h:77
l1t::EMTFHit::csc_ID
int csc_ID
Definition: EMTFHit.h:256
l1t::EMTFHit::valid
int valid
Definition: EMTFHit.h:273
l1t::EMTFHit::CreateRPCDetId
RPCDetId CreateRPCDetId() const
Definition: EMTFHit.cc:12
l1t::EMTFHit::chamber
int chamber
Definition: EMTFHit.h:255
l1t::EMTFHit::RPC_DetId
RPCDetId RPC_DetId() const
Definition: EMTFHit.h:118
l1t::EMTFHit::CreateCSCDetId
CSCDetId CreateCSCDetId() const
Definition: EMTFHit.cc:6
l1t::EMTFHit::quality
int quality
Definition: EMTFHit.h:270
l1t::EMTFHit::strip_low
int strip_low
Definition: EMTFHit.h:268
CSCConstants.h
l1t::EMTFHit::sync_err
int sync_err
Definition: EMTFHit.h:274
l1t::EMTFHit::CreateCPPFDigi
CPPFDigi CreateCPPFDigi() const
Definition: EMTFHit.cc:44
l1t::EMTFHit::endcap
int endcap
Definition: EMTFHit.h:247
l1t::EMTFHit::subsector_RPC
int subsector_RPC
Definition: EMTFHit.h:254
l1t
delete x;
Definition: CaloConfig.h:22
CSCDetId
Definition: CSCDetId.h:26
l1t::EMTFHit::neighbor
int neighbor
Definition: EMTFHit.h:259
l1t::EMTFHit::Is_RPC
bool Is_RPC() const
Definition: EMTFHit.h:232
l1t::EMTFHit::phi_glob
float phi_glob
Definition: EMTFHit.h:287
EMTFHit.h
l1t::EMTFHit::theta_fp
int theta_fp
Definition: EMTFHit.h:279
l1t::EMTFHit::wire
int wire
Definition: EMTFHit.h:265
l1t::EMTFHit::station
int station
Definition: EMTFHit.h:248
l1t::CPPFDigi
Definition: CPPFDigi.h:12
l1t::EMTFHit::CreateCSCCorrelatedLCTDigi
CSCCorrelatedLCTDigi CreateCSCCorrelatedLCTDigi() const
Definition: EMTFHit.cc:69
l1t::EMTFHit::theta
float theta
Definition: EMTFHit.h:288
l1t::EMTFHit::strip
int strip
Definition: EMTFHit.h:266
l1t::EMTFHit::strip_hi
int strip_hi
Definition: EMTFHit.h:267
l1t::EMTFHit::ring
int ring
Definition: EMTFHit.h:249
l1t::EMTFHit::phi_fp
int phi_fp
Definition: EMTFHit.h:278
l1t::EMTFHit::roll
int roll
Definition: EMTFHit.h:258
CSCCorrelatedLCTDigi
Definition: CSCCorrelatedLCTDigi.h:19
l1t::EMTFHit::bx
int bx
Definition: EMTFHit.h:276