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 
17 
19 public:
20  // constructor
21  GEMInternalCluster(const GEMDetId& id, const GEMPadDigiCluster& cluster1, const GEMPadDigiCluster& cluster2);
22 
23  // empty object
25 
26  GEMDetId id() const { return id_; }
27  GEMPadDigiCluster cl1() const { return cl1_; }
28  GEMPadDigiCluster cl2() const { return cl2_; }
29 
30  // an internal cluster is valid if at least one is valid
31  bool isValid() const { return isValid_; }
32 
33  // return the centers of the pads
34  GEMPadDigi mid1() const;
35  GEMPadDigi mid2() const;
36 
37  // return the coincidence pad
38  GEMCoPadDigi copad() const;
39 
40  int bx() const { return bx_; }
41  int roll() const { return id_.roll(); }
42  int layer1_pad() const { return layer1_pad_; }
43  int layer1_size() const { return layer1_size_; }
44  int layer2_pad() const { return layer2_pad_; }
45  int layer2_size() const { return layer2_size_; }
46  int layer1_min_wg() const { return layer1_min_wg_; }
47  int layer1_max_wg() const { return layer1_max_wg_; }
48  int layer2_min_wg() const { return layer2_min_wg_; }
49  int layer2_max_wg() const { return layer2_max_wg_; }
50  int min_wg() const;
51  int max_wg() const;
52  bool isCoincidence() const { return isCoincidence_; }
53 
54  // return "key wiregroup" and "key half-strip" for a cluster
55  // these are approximate numbers obviously for LCTs with lower quality
56  unsigned getKeyWG() const { return (min_wg() + max_wg()) / 2.; }
57  uint16_t getKeyStrip(int n = 2) const;
58  uint16_t getKeyStripME1a(int n = 2) const;
59 
60  // first and last 1/2-strips
61  int layer1_first_hs() const { return layer1_first_hs_; }
62  int layer2_first_hs() const { return layer2_first_hs_; }
63  int layer1_last_hs() const { return layer1_last_hs_; }
64  int layer2_last_hs() const { return layer2_last_hs_; }
65 
68  int layer1_last_hs_me1a() const { return layer1_last_hs_me1a_; }
69  int layer2_last_hs_me1a() const { return layer2_last_hs_me1a_; }
70 
71  // middle 1/2-strips (sum divided by two)
72  int layer1_middle_hs() const { return layer1_middle_hs_; }
73  int layer2_middle_hs() const { return layer2_middle_hs_; }
74 
77 
78  // first and last 1/8-strips
79  int layer1_first_es() const { return layer1_first_es_; }
80  int layer2_first_es() const { return layer2_first_es_; }
81  int layer1_last_es() const { return layer1_last_es_; }
82  int layer2_last_es() const { return layer2_last_es_; }
83 
86  int layer1_last_es_me1a() const { return layer1_last_es_me1a_; }
87  int layer2_last_es_me1a() const { return layer2_last_es_me1a_; }
88 
89  // middle 1/8-strips (sum divided by two)
90  int layer1_middle_es() const { return layer1_middle_es_; }
91  int layer2_middle_es() const { return layer2_middle_es_; }
92 
95 
96  // setters for first/last 1/2-strip
97  void set_layer1_first_hs(const int hs) { layer1_first_hs_ = hs; }
98  void set_layer2_first_hs(const int hs) { layer2_first_hs_ = hs; }
99  void set_layer1_last_hs(const int hs) { layer1_last_hs_ = hs; }
100  void set_layer2_last_hs(const int hs) { layer2_last_hs_ = hs; }
101 
102  void set_layer1_first_hs_me1a(const int hs) { layer1_first_hs_me1a_ = hs; }
103  void set_layer2_first_hs_me1a(const int hs) { layer2_first_hs_me1a_ = hs; }
104  void set_layer1_last_hs_me1a(const int hs) { layer1_last_hs_me1a_ = hs; }
105  void set_layer2_last_hs_me1a(const int hs) { layer2_last_hs_me1a_ = hs; }
106 
107  // setters for middle 1/2-strip
108  void set_layer1_middle_hs(const int hs) { layer1_middle_hs_ = hs; }
109  void set_layer2_middle_hs(const int hs) { layer2_middle_hs_ = hs; }
112 
113  // setters for first/last 1/8-strip
114  void set_layer1_first_es(const int es) { layer1_first_es_ = es; }
115  void set_layer2_first_es(const int es) { layer2_first_es_ = es; }
116  void set_layer1_last_es(const int es) { layer1_last_es_ = es; }
117  void set_layer2_last_es(const int es) { layer2_last_es_ = es; }
118 
119  void set_layer1_first_es_me1a(const int es) { layer1_first_es_me1a_ = es; }
120  void set_layer2_first_es_me1a(const int es) { layer2_first_es_me1a_ = es; }
121  void set_layer1_last_es_me1a(const int es) { layer1_last_es_me1a_ = es; }
122  void set_layer2_last_es_me1a(const int es) { layer2_last_es_me1a_ = es; }
123 
124  // setters for middle 1/8-strip
125  void set_layer1_middle_es(const int es) { layer1_middle_es_ = es; }
126  void set_layer2_middle_es(const int es) { layer2_middle_es_ = es; }
129 
130  // set the corresponding wiregroup numbers
131  void set_layer1_min_wg(const int wg) { layer1_min_wg_ = wg; }
132  void set_layer1_max_wg(const int wg) { layer1_max_wg_ = wg; }
133  void set_layer2_min_wg(const int wg) { layer2_min_wg_ = wg; }
134  void set_layer2_max_wg(const int wg) { layer2_max_wg_ = wg; }
135 
136  bool has_cluster(const GEMPadDigiCluster& cluster) const;
137 
138  // equality operator: detid, cluster 1 and cluster 2
139  bool operator==(const GEMInternalCluster& cluster) const;
140 
141 private:
142  /*
143  Detector id. There are three cases. For single clusters in layer 1
144  the GEMDetId in layer 1 is stored. Similarly, for single clusters in
145  layer 2 the GEMDetId in layer 2 is stored. For coincidences the GEMDetId
146  in layer 1 is stored
147  */
151 
152  bool isValid_;
153 
154  // bunch crossing
155  int bx_;
156 
157  // starting pads and sizes of the clusters in each layer
158  // depending on the presence of a coincidence, layer 1, layer2, or both
159  // can be filled
164 
165  // corresponding CSC 1/2-strip coordinates (es) of the cluster
166  // in each layer (if applicable)
171  // for ME1/a
176 
177  // middle CSC 1/2-strip
180  // for ME1/a
183 
184  // corresponding CSC 1/8-strip coordinates (es) of the cluster
185  // in each layer (if applicable)
190  // for ME1/a
195 
196  // middle CSC 1/8-strip
199  // for ME1/a
202 
203  // corresponding min and max wiregroup
208 
209  // flag to signal if it is a coincidence
211 };
212 
213 std::ostream& operator<<(std::ostream& os, const GEMInternalCluster& cl);
214 
215 #endif
bool isCoincidence() const
void set_layer1_middle_es_me1a(const int es)
int layer2_middle_es_me1a() const
void set_layer2_middle_hs_me1a(const int hs)
void set_layer2_last_hs_me1a(const int hs)
void set_layer1_last_hs_me1a(const int hs)
void set_layer2_middle_es(const int es)
void set_layer2_last_es(const int es)
int layer2_last_es_me1a() const
void set_layer2_last_hs(const int hs)
void set_layer1_first_hs(const int hs)
int layer1_first_es() const
void set_layer1_last_es_me1a(const int es)
GEMPadDigi mid1() const
int layer1_last_hs_me1a() const
void set_layer1_last_hs(const int hs)
int layer2_first_es() const
int layer1_middle_hs_me1a() const
void set_layer2_first_hs_me1a(const int hs)
int layer2_last_es() const
void set_layer1_last_es(const int es)
GEMPadDigiCluster cl1() const
void set_layer1_first_es(const int es)
bool operator==(const GEMInternalCluster &cluster) const
int layer2_last_hs() const
uint16_t getKeyStripME1a(int n=2) const
void set_layer1_min_wg(const int wg)
int layer1_first_hs() const
int layer1_last_es() 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)
uint16_t getKeyStrip(int n=2) const
int layer1_last_hs() const
void set_layer1_middle_hs_me1a(const int hs)
std::ostream & operator<<(std::ostream &os, const GEMInternalCluster &cl)
int layer2_middle_es() const
GEMPadDigi mid2() const
void set_layer1_middle_hs(const int hs)
GEMCoPadDigi copad() const
void set_layer2_middle_hs(const int hs)
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
int layer2_middle_hs_me1a() const
int layer2_last_hs_me1a() const
void set_layer2_middle_es_me1a(const int es)
void set_layer2_first_es(const int es)
GEMPadDigiCluster cl1_
int layer1_first_hs_me1a() const
int layer1_last_es_me1a() const
int layer2_middle_hs() const
constexpr int roll() const
Definition: GEMDetId.h:194
GEMDetId id() const
int layer1_middle_hs() const
void set_layer2_first_hs(const int hs)
void set_layer2_last_es_me1a(const int es)
void set_layer1_middle_es(const int es)
int layer2_first_hs_me1a() const
GEMPadDigiCluster cl2() const
void set_layer1_first_hs_me1a(const int hs)
int layer2_first_hs() const
unsigned getKeyWG() const
GEMPadDigiCluster cl2_
void set_layer2_min_wg(const int wg)