File indexing completed on 2024-04-06 12:19:35
0001 #ifndef L1Trigger_CSCTriggerPrimitives_GEMInternalCluster_h
0002 #define L1Trigger_CSCTriggerPrimitives_GEMInternalCluster_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0014 #include "DataFormats/MuonDetId/interface/GEMDetId.h"
0015 #include "DataFormats/GEMDigi/interface/GEMPadDigiCluster.h"
0016 #include "DataFormats/GEMDigi/interface/GEMPadDigi.h"
0017 #include "DataFormats/GEMDigi/interface/GEMCoPadDigi.h"
0018
0019 class GEMInternalCluster {
0020 public:
0021
0022 GEMInternalCluster(const GEMDetId& id1,
0023 const GEMDetId& id2,
0024 const GEMPadDigiCluster& cluster1,
0025 const GEMPadDigiCluster& cluster2,
0026 const unsigned delayGEMinOTMB,
0027 const unsigned tmbL1aWindowSize);
0028
0029
0030 GEMInternalCluster();
0031
0032 GEMDetId id1() const { return id1_; }
0033 GEMDetId id2() const { return id2_; }
0034 GEMPadDigiCluster cl1() const { return cl1_; }
0035 GEMPadDigiCluster cl2() const { return cl2_; }
0036 bool isMatchingLayer1() const { return isMatchingLayer1_; }
0037 bool isMatchingLayer2() const { return isMatchingLayer2_; }
0038
0039
0040 void set_coincidence(const bool isCoincidence) { isCoincidence_ = isCoincidence; }
0041
0042
0043 void set_matchingLayer1(const bool isMatching) { isMatchingLayer1_ = isMatching; }
0044 void set_matchingLayer2(const bool isMatching) { isMatchingLayer2_ = isMatching; }
0045
0046
0047 bool isValid() const { return isValid_; }
0048
0049
0050 GEMPadDigi mid1() const;
0051 GEMPadDigi mid2() const;
0052
0053
0054 GEMCoPadDigi copad() const;
0055
0056 int bx() const { return bx_; }
0057 int roll1() const { return id1_.roll(); }
0058 int roll2() const { return id2_.roll(); }
0059 int layer1_pad() const { return layer1_pad_; }
0060 int layer1_size() const { return layer1_size_; }
0061 int layer2_pad() const { return layer2_pad_; }
0062 int layer2_size() const { return layer2_size_; }
0063 int layer1_min_wg() const { return layer1_min_wg_; }
0064 int layer1_max_wg() const { return layer1_max_wg_; }
0065 int layer2_min_wg() const { return layer2_min_wg_; }
0066 int layer2_max_wg() const { return layer2_max_wg_; }
0067 bool isCoincidence() const { return isCoincidence_; }
0068
0069
0070
0071 unsigned getKeyWG() const { return (layer2_min_wg() + layer2_max_wg()) / 2.; }
0072 uint16_t getKeyStrip(int n = 2, bool isLayer2 = false) const;
0073 uint16_t getKeyStripME1a(int n = 2, bool isLayer2 = false) const;
0074
0075
0076 int layer1_first_es() const { return layer1_first_es_; }
0077 int layer2_first_es() const { return layer2_first_es_; }
0078 int layer1_last_es() const { return layer1_last_es_; }
0079 int layer2_last_es() const { return layer2_last_es_; }
0080
0081 int layer1_first_es_me1a() const { return layer1_first_es_me1a_; }
0082 int layer2_first_es_me1a() const { return layer2_first_es_me1a_; }
0083 int layer1_last_es_me1a() const { return layer1_last_es_me1a_; }
0084 int layer2_last_es_me1a() const { return layer2_last_es_me1a_; }
0085
0086
0087 int layer1_middle_es() const { return layer1_middle_es_; }
0088 int layer2_middle_es() const { return layer2_middle_es_; }
0089
0090 int layer1_middle_es_me1a() const { return layer1_middle_es_me1a_; }
0091 int layer2_middle_es_me1a() const { return layer2_middle_es_me1a_; }
0092
0093
0094 void set_layer1_first_es(const int es) { layer1_first_es_ = es; }
0095 void set_layer2_first_es(const int es) { layer2_first_es_ = es; }
0096 void set_layer1_last_es(const int es) { layer1_last_es_ = es; }
0097 void set_layer2_last_es(const int es) { layer2_last_es_ = es; }
0098
0099 void set_layer1_first_es_me1a(const int es) { layer1_first_es_me1a_ = es; }
0100 void set_layer2_first_es_me1a(const int es) { layer2_first_es_me1a_ = es; }
0101 void set_layer1_last_es_me1a(const int es) { layer1_last_es_me1a_ = es; }
0102 void set_layer2_last_es_me1a(const int es) { layer2_last_es_me1a_ = es; }
0103
0104
0105 void set_layer1_middle_es(const int es) { layer1_middle_es_ = es; }
0106 void set_layer2_middle_es(const int es) { layer2_middle_es_ = es; }
0107 void set_layer1_middle_es_me1a(const int es) { layer1_middle_es_me1a_ = es; }
0108 void set_layer2_middle_es_me1a(const int es) { layer2_middle_es_me1a_ = es; }
0109
0110
0111 void set_layer1_min_wg(const int wg) { layer1_min_wg_ = wg; }
0112 void set_layer1_max_wg(const int wg) { layer1_max_wg_ = wg; }
0113 void set_layer2_min_wg(const int wg) { layer2_min_wg_ = wg; }
0114 void set_layer2_max_wg(const int wg) { layer2_max_wg_ = wg; }
0115
0116 bool has_cluster(const GEMPadDigiCluster& cluster) const;
0117
0118
0119 bool operator==(const GEMInternalCluster& cluster) const;
0120
0121 private:
0122
0123
0124
0125
0126
0127 GEMDetId id1_;
0128 GEMDetId id2_;
0129 GEMPadDigiCluster cl1_;
0130 GEMPadDigiCluster cl2_;
0131
0132
0133 bool isMatchingLayer1_;
0134 bool isMatchingLayer2_;
0135
0136 bool isValid_;
0137
0138
0139 int bx_;
0140
0141
0142
0143
0144 int layer1_pad_;
0145 int layer1_size_;
0146 int layer2_pad_;
0147 int layer2_size_;
0148
0149
0150
0151 int layer1_first_es_;
0152 int layer1_last_es_;
0153 int layer2_first_es_;
0154 int layer2_last_es_;
0155
0156 int layer1_first_es_me1a_;
0157 int layer1_last_es_me1a_;
0158 int layer2_first_es_me1a_;
0159 int layer2_last_es_me1a_;
0160
0161
0162 int layer1_middle_es_;
0163 int layer2_middle_es_;
0164
0165 int layer1_middle_es_me1a_;
0166 int layer2_middle_es_me1a_;
0167
0168
0169 int layer1_min_wg_;
0170 int layer1_max_wg_;
0171 int layer2_min_wg_;
0172 int layer2_max_wg_;
0173
0174
0175 bool isCoincidence_;
0176 };
0177
0178 std::ostream& operator<<(std::ostream& os, const GEMInternalCluster& cl);
0179
0180 #endif