CMS 3D CMS Logo

GEMInternalCluster.h
Go to the documentation of this file.
1 #ifndef L1Trigger_CSCTriggerPrimitives_GEMInternalCluster_h
2 #define L1Trigger_CSCTriggerPrimitives_GEMInternalCluster_h
3 
18 
20 public:
21  // constructor
23  const GEMDetId& id2,
24  const GEMPadDigiCluster& cluster1,
25  const GEMPadDigiCluster& cluster2,
26  const unsigned delayGEMinOTMB,
27  const unsigned tmbL1aWindowSize);
28 
29  // empty object
31 
32  GEMDetId id1() const { return id1_; }
33  GEMDetId id2() const { return id2_; }
34  GEMPadDigiCluster cl1() const { return cl1_; }
35  GEMPadDigiCluster cl2() const { return cl2_; }
36  bool isMatchingLayer1() const { return isMatchingLayer1_; }
37  bool isMatchingLayer2() const { return isMatchingLayer2_; }
38 
39  // setter for coincidence
41 
42  // setter for detIDs
43  void set_matchingLayer1(const bool isMatching) { isMatchingLayer1_ = isMatching; }
44  void set_matchingLayer2(const bool isMatching) { isMatchingLayer2_ = isMatching; }
45 
46  // an internal cluster is valid if at least one is valid
47  bool isValid() const { return isValid_; }
48 
49  // return the centers of the pads
50  GEMPadDigi mid1() const;
51  GEMPadDigi mid2() const;
52 
53  // return the coincidence pad
54  GEMCoPadDigi copad() const;
55 
56  int bx() const { return bx_; }
57  int roll1() const { return id1_.roll(); }
58  int roll2() const { return id2_.roll(); }
59  int layer1_pad() const { return layer1_pad_; }
60  int layer1_size() const { return layer1_size_; }
61  int layer2_pad() const { return layer2_pad_; }
62  int layer2_size() const { return layer2_size_; }
63  int layer1_min_wg() const { return layer1_min_wg_; }
64  int layer1_max_wg() const { return layer1_max_wg_; }
65  int layer2_min_wg() const { return layer2_min_wg_; }
66  int layer2_max_wg() const { return layer2_max_wg_; }
67  bool isCoincidence() const { return isCoincidence_; }
68 
69  // return "key wiregroup" and "key half-strip" for a cluster
70  // these are approximate numbers obviously for LCTs with lower quality
71  unsigned getKeyWG() const { return (layer2_min_wg() + layer2_max_wg()) / 2.; }
72  uint16_t getKeyStrip(int n = 2, bool isLayer2 = false) const;
73  uint16_t getKeyStripME1a(int n = 2, bool isLayer2 = false) const;
74 
75  // first and last 1/8-strips
76  int layer1_first_es() const { return layer1_first_es_; }
77  int layer2_first_es() const { return layer2_first_es_; }
78  int layer1_last_es() const { return layer1_last_es_; }
79  int layer2_last_es() const { return layer2_last_es_; }
80 
83  int layer1_last_es_me1a() const { return layer1_last_es_me1a_; }
84  int layer2_last_es_me1a() const { return layer2_last_es_me1a_; }
85 
86  // middle 1/8-strips (sum divided by two)
87  int layer1_middle_es() const { return layer1_middle_es_; }
88  int layer2_middle_es() const { return layer2_middle_es_; }
89 
92 
93  // setters for first/last 1/8-strip
94  void set_layer1_first_es(const int es) { layer1_first_es_ = es; }
95  void set_layer2_first_es(const int es) { layer2_first_es_ = es; }
96  void set_layer1_last_es(const int es) { layer1_last_es_ = es; }
97  void set_layer2_last_es(const int es) { layer2_last_es_ = es; }
98 
99  void set_layer1_first_es_me1a(const int es) { layer1_first_es_me1a_ = es; }
100  void set_layer2_first_es_me1a(const int es) { layer2_first_es_me1a_ = es; }
101  void set_layer1_last_es_me1a(const int es) { layer1_last_es_me1a_ = es; }
102  void set_layer2_last_es_me1a(const int es) { layer2_last_es_me1a_ = es; }
103 
104  // setters for middle 1/8-strip
105  void set_layer1_middle_es(const int es) { layer1_middle_es_ = es; }
106  void set_layer2_middle_es(const int es) { layer2_middle_es_ = es; }
109 
110  // set the corresponding wiregroup numbers
111  void set_layer1_min_wg(const int wg) { layer1_min_wg_ = wg; }
112  void set_layer1_max_wg(const int wg) { layer1_max_wg_ = wg; }
113  void set_layer2_min_wg(const int wg) { layer2_min_wg_ = wg; }
114  void set_layer2_max_wg(const int wg) { layer2_max_wg_ = wg; }
115 
116  bool has_cluster(const GEMPadDigiCluster& cluster) const;
117 
118  // equality operator: detid, cluster 1 and cluster 2
119  bool operator==(const GEMInternalCluster& cluster) const;
120 
121 private:
122  /*
123  Detector id. For single clusters in layer 1 the GEMDetId in layer 1 is stored.
124  Similarly, for single clusters in layer 2 the GEMDetId in layer 2 is stored.
125  For coincidences the GEMDetId both are stored.
126  */
131 
132  // set matches to false first
135 
136  bool isValid_;
137 
138  // bunch crossing
139  int bx_;
140 
141  // starting pads and sizes of the clusters in each layer
142  // depending on the presence of a coincidence, layer 1, layer2, or both
143  // can be filled
148 
149  // corresponding CSC 1/8-strip coordinates (es) of the cluster
150  // in each layer (if applicable)
155  // for ME1/a
160 
161  // middle CSC 1/8-strip
164  // for ME1/a
167 
168  // corresponding min and max wiregroup
173 
174  // flag to signal if it is a coincidence
176 };
177 
178 std::ostream& operator<<(std::ostream& os, const GEMInternalCluster& cl);
179 
180 #endif
bool isCoincidence() const
void set_layer1_middle_es_me1a(const int es)
int layer2_middle_es_me1a() const
void set_layer2_middle_es(const int es)
void set_coincidence(const bool isCoincidence)
void set_layer2_last_es(const int es)
int layer2_last_es_me1a() const
bool isMatchingLayer1() const
uint16_t getKeyStrip(int n=2, bool isLayer2=false) const
int layer1_first_es() const
void set_layer1_last_es_me1a(const int es)
void set_matchingLayer2(const bool isMatching)
GEMPadDigi mid1() const
bool isMatchingLayer2() const
int layer2_first_es() const
int layer2_last_es() const
void set_layer1_last_es(const int es)
delayGEMinOTMB
Definition: tmbParams.py:95
GEMPadDigiCluster cl1() const
void set_layer1_first_es(const int es)
bool operator==(const GEMInternalCluster &cluster) const
void set_layer1_min_wg(const int wg)
int layer1_last_es() const
GEMDetId id2() const
bool has_cluster(const GEMPadDigiCluster &cluster) const
void set_layer1_first_es_me1a(const int es)
int layer1_middle_es_me1a() const
void set_layer2_max_wg(const int wg)
void set_matchingLayer1(const bool isMatching)
std::ostream & operator<<(std::ostream &os, const GEMInternalCluster &cl)
int layer2_middle_es() const
uint16_t getKeyStripME1a(int n=2, bool isLayer2=false) const
GEMPadDigi mid2() const
GEMCoPadDigi copad() const
void set_layer1_max_wg(const int wg)
int layer1_middle_es() const
void set_layer2_first_es_me1a(const int es)
int layer2_first_es_me1a() const
int layer1_first_es_me1a() const
void set_layer2_middle_es_me1a(const int es)
void set_layer2_first_es(const int es)
GEMPadDigiCluster cl1_
int layer1_last_es_me1a() const
constexpr int roll() const
Definition: GEMDetId.h:194
void set_layer2_last_es_me1a(const int es)
void set_layer1_middle_es(const int es)
GEMDetId id1() const
GEMPadDigiCluster cl2() const
unsigned getKeyWG() const
GEMPadDigiCluster cl2_
void set_layer2_min_wg(const int wg)