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,
8  (ring == 4) ? 1 : ring, chamber, 0 );
9  // Layer always filled as 0 (indicates "whole chamber")
10  // See http://cmslxr.fnal.gov/source/L1Trigger/CSCTriggerPrimitives/src/CSCTriggerPrimitivesBuilder.cc#0198
11  }
12 
14  int roll_ = roll;
15  int theta_ = theta_fp/4;
16  if (roll < 1 || roll > 3) {
17  switch (station * 2 + ring) { // Infer roll from integer theta value, by station / ring
18  case 4: roll_ = ( theta_ < 17 ? 3 : (theta_ > 18 ? 1 : 2) ); break; // RE1/2
19  case 6: roll_ = ( theta_ < 16 ? 3 : (theta_ > 17 ? 1 : 2) ); break; // RE2/2
20  case 8: roll_ = ( theta_ < 12 ? 3 : (theta_ > 13 ? 1 : 2) ); break; // RE3/2
21  case 9: roll_ = ( theta_ < 20 ? 3 : (theta_ > 21 ? 1 : 2) ); break; // RE3/3
22  case 10: roll_ = ( theta_ < 11 ? 3 : (theta_ > 11 ? 1 : 2) ); break; // RE4/2
23  case 11: roll_ = ( theta_ < 18 ? 3 : (theta_ > 19 ? 1 : 2) ); break; // RE4/3
24  default: roll_ = 2; // Default to 2 if no valid value found
25  }
26  }
27 
28  return RPCDetId( endcap, ring, station, sector_RPC, 1, subsector_RPC, roll_ );
29  // Layer always filled as 1, as layer 2 is only used in the barrel
30  }
31 
33 
34  if (is_RPC != 1) return CPPFDigi();
35 
36  int board_ = 1 + ((chamber % 36) / 9); // RPC chamber to CPPF board mapping
37  int channel_ = (chamber % 9); // RPC chamber to CPPF output link mapping
38  int sector_ = (sector_idx + 1) - 6 * (endcap == -1);
39  int link_ = ( neighbor ? 0 : 1 + ( ((chamber + 33) % 36) % 6) ); // RPC chamber to EMTF input link mapping
40  int nStrips_ = ( strip_low < 0 ? -99 : 1 + strip_hi - strip_low); // Cluster size in number of strips
41 
42  return CPPFDigi( RPC_DetId(), bx, phi_fp/4, theta_fp/4, valid, board_, channel_,
43  sector_, link_, strip_low, nStrips_, phi_glob, theta );
44  }
45 
48  pattern, (bend == 1) ? 1 : 0,
50  // Filling "trknmb" with 1 and "bx0" with 0 (as in MC).
51  // May consider filling "trknmb" with 2 for 2nd LCT in the same chamber. - AWB 24.05.17
52  // trknmb and bx0 are unused in the EMTF emulator code. mpclink = 0 (after bx) indicates unsorted.
53  }
54 
55  // // Not yet implemented - AWB 15.03.17
56  // RPCDigi EMTFHit::CreateRPCDigi() const {
57  // return RPCDigi( (strip_hi + strip_lo) / 2, bx + CSCConstants::LCT_CENTRAL_BX );
58  // }
59 
60 } // End namespace l1t
RPCDetId RPC_DetId() const
Definition: EMTFHit.h:82
int station
Definition: EMTFHit.h:216
int neighbor
Definition: EMTFHit.h:227
int is_RPC
Definition: EMTFHit.h:269
int sector_idx
Definition: EMTFHit.h:220
delete x;
Definition: CaloConfig.h:22
int sync_err
Definition: EMTFHit.h:242
int subsector_RPC
Definition: EMTFHit.h:222
int sector_RPC
Definition: EMTFHit.h:219
float theta
Definition: EMTFHit.h:258
RPCDetId CreateRPCDetId() const
Definition: EMTFHit.cc:13
CPPFDigi CreateCPPFDigi() const
Definition: EMTFHit.cc:32
CSCDetId CreateCSCDetId() const
Definition: EMTFHit.cc:6
CSCCorrelatedLCTDigi CreateCSCCorrelatedLCTDigi() const
Definition: EMTFHit.cc:46
int pattern
Definition: EMTFHit.h:239
int endcap
Definition: EMTFHit.h:215
int strip_low
Definition: EMTFHit.h:236
int quality
Definition: EMTFHit.h:238
int phi_fp
Definition: EMTFHit.h:246
int theta_fp
Definition: EMTFHit.h:247
int strip_hi
Definition: EMTFHit.h:235
float phi_glob
Definition: EMTFHit.h:257
int chamber
Definition: EMTFHit.h:223
int csc_ID
Definition: EMTFHit.h:224