CMS 3D CMS Logo

CSCLCTTools.cc
Go to the documentation of this file.
2 
3 namespace csctp {
4 
5  // Number of halfstrips and wiregroups
6  // +----------------------------+------------+------------+
7  // | Chamber type | Num of | Num of |
8  // | | halfstrips | wiregroups |
9  // +----------------------------+------------+------------+
10  // | ME1/1a | 96 | 48 |
11  // | ME1/1b | 128 | 48 |
12  // | ME1/2 | 160 | 64 |
13  // | ME1/3 | 128 | 32 |
14  // | ME2/1 | 160 | 112 |
15  // | ME3/1, ME4/1 | 160 | 96 |
16  // | ME2/2, ME3/2, ME4/2 | 160 | 64 |
17  // +----------------------------+------------+------------+
18 
19  unsigned get_csc_max_wire(int station, int ring) {
20  unsigned max_wire = 0; // wiregroup
21  if (station == 1 && ring == 4) { // ME1/1a
22  max_wire = 48;
23  } else if (station == 1 && ring == 1) { // ME1/1b
24  max_wire = 48;
25  } else if (station == 1 && ring == 2) { // ME1/2
26  max_wire = 64;
27  } else if (station == 1 && ring == 3) { // ME1/3
28  max_wire = 32;
29  } else if (station == 2 && ring == 1) { // ME2/1
30  max_wire = 112;
31  } else if (station >= 3 && ring == 1) { // ME3/1, ME4/1
32  max_wire = 96;
33  } else if (station >= 2 && ring == 2) { // ME2/2, ME3/2, ME4/2
34  max_wire = 64;
35  }
36  return max_wire;
37  }
38 
39  unsigned get_csc_max_halfstrip(int station, int ring) {
40  int max_strip = 0; // halfstrip
41  if (station == 1 && ring == 4) { // ME1/1a
42  max_strip = 96;
43  } else if (station == 1 && ring == 1) { // ME1/1b
44  // In the CSC local trigger
45  // ME1/a is taken together with ME1/b
46  max_strip = 128 + 96;
47  } else if (station == 1 && ring == 2) { // ME1/2
48  max_strip = 160;
49  } else if (station == 1 && ring == 3) { // ME1/3
50  max_strip = 128;
51  } else if (station == 2 && ring == 1) { // ME2/1
52  max_strip = 160;
53  } else if (station >= 3 && ring == 1) { // ME3/1, ME4/1
54  max_strip = 160;
55  } else if (station >= 2 && ring == 2) { // ME2/2, ME3/2, ME4/2
56  max_strip = 160;
57  }
58  return max_strip;
59  }
60 
62 
64 
65  std::pair<unsigned, unsigned> get_csc_min_max_cfeb(int station, int ring) {
66  // 5 CFEBs [0,4] for non-ME1/1 chambers
67  int min_cfeb = 0;
68  int max_cfeb = CSCConstants::MAX_CFEBS - 1; // 4
69  // 7 CFEBs [0,6] for ME1/1 chambers
70  if (station == 1 and ring == 1) {
71  max_cfeb = 6;
72  }
73  return std::make_pair(min_cfeb, max_cfeb);
74  }
75 
76  std::pair<unsigned, unsigned> get_csc_min_max_pattern(bool isRun3) {
77  int min_pattern, max_pattern;
78  // Run-1 or Run-2 case
79  if (!isRun3) {
80  min_pattern = 2;
81  max_pattern = 10;
82  // Run-3 case
83  } else {
84  min_pattern = 0;
85  max_pattern = 4;
86  }
87  return std::make_pair(min_pattern, max_pattern);
88  }
89 
90  unsigned get_csc_alct_max_quality(int station, int ring, bool runGEMCSC) {
91  int max_quality = 3;
92  // GE2/1-ME2/1 ALCTs are allowed 3-layer ALCTs
93  if (runGEMCSC and station == 2 and ring == 1) {
94  max_quality = 4;
95  }
96  return max_quality;
97  }
98 
100  int max_quality = 6;
101  return max_quality;
102  }
103 
105  int max_quality = 15;
106  return max_quality;
107  }
108 
109 } // namespace csctp
relativeConstraints.station
station
Definition: relativeConstraints.py:67
csctp::get_csc_min_max_pattern
std::pair< unsigned, unsigned > get_csc_min_max_pattern(bool isRun3)
Definition: CSCLCTTools.cc:76
CSCLCTTools.h
csctp::get_csc_min_max_cfeb
std::pair< unsigned, unsigned > get_csc_min_max_cfeb(int station, int ring)
Definition: CSCLCTTools.cc:65
csctp::get_csc_max_wire
unsigned get_csc_max_wire(int station, int ring)
Definition: CSCLCTTools.cc:19
csctp::get_csc_max_quartstrip
unsigned get_csc_max_quartstrip(int station, int ring)
Definition: CSCLCTTools.cc:61
csctp::get_csc_lct_max_quality
unsigned get_csc_lct_max_quality()
Definition: CSCLCTTools.cc:104
csctp
Definition: CSCLCTTools.h:9
csctp::get_csc_max_halfstrip
unsigned get_csc_max_halfstrip(int station, int ring)
Definition: CSCLCTTools.cc:39
csctp::get_csc_alct_max_quality
unsigned get_csc_alct_max_quality(int station, int ring, bool isRun3)
Definition: CSCLCTTools.cc:90
csctp::get_csc_max_eightstrip
unsigned get_csc_max_eightstrip(int station, int ring)
Definition: CSCLCTTools.cc:63
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
csctp::get_csc_clct_max_quality
unsigned get_csc_clct_max_quality()
Definition: CSCLCTTools.cc:99
CSCConstants::MAX_CFEBS
Definition: CSCConstants.h:15