48 if (!clustersLoc.empty())
49 best = clustersLoc[0];
59 bool ignoreALCTGEMmatch =
true;
64 if (!clustersLoc.empty())
65 best = clustersLoc[0];
80 if (!clustersLoc.empty()) {
81 best = clustersLoc[0];
109 bool isMatchedLayer1 =
false;
110 bool isMatchedLayer2 =
false;
112 if (
cl.id1().layer() == 1) {
116 isMatchedLayer1 =
true;
118 if (
cl.id2().layer() == 2) {
122 isMatchedLayer2 =
true;
127 if (isMatchedLayer1
or isMatchedLayer2) {
130 output.back().set_matchingLayer1(
true);
132 output.back().set_matchingLayer2(
true);
141 bool ignoreALCTGEMmatch)
const {
157 bool isMatchedLayer1 =
false;
158 bool isMatchedLayer2 =
false;
160 if (
cl.id1().layer() == 1) {
162 ((isME1a and
cl.roll1() == 8)
or (!isME1a and
cl.roll1() < 8)))
or 164 constexpr
bool isLayer2 =
false;
166 if (distanceES <= eighthStripCut)
167 isMatchedLayer1 =
true;
170 if (
cl.id2().layer() == 2) {
172 ((isME1a and
cl.roll2() == 8)
or (!isME1a and
cl.roll2() < 8)))
or 174 constexpr
bool isLayer2 =
true;
176 if (distanceES <= eighthStripCut)
177 isMatchedLayer2 =
true;
183 if (((ignoreALCTGEMmatch
or cl.isMatchingLayer1()) and isMatchedLayer1)
or 184 ((ignoreALCTGEMmatch
or cl.isMatchingLayer2()) and isMatchedLayer2)) {
186 output.back().set_matchingLayer1(
false);
187 output.back().set_matchingLayer2(
false);
188 if ((ignoreALCTGEMmatch
or cl.isMatchingLayer1()) and isMatchedLayer1)
189 output.back().set_matchingLayer1(
true);
190 if ((ignoreALCTGEMmatch
or cl.isMatchingLayer2()) and isMatchedLayer2)
191 output.back().set_matchingLayer2(
true);
198 if (cl1.isCoincidence() and !
cl2.isCoincidence())
199 return cl1.isCoincidence();
200 else if ((cl1.isCoincidence() and
cl2.isCoincidence())
or (!cl1.isCoincidence() and !
cl2.isCoincidence())) {
201 bool cl1_isLayer2 = !cl1.isMatchingLayer1() and cl1.isMatchingLayer2();
202 bool cl2_isLayer2 = !
cl2.isMatchingLayer1() and
cl2.isMatchingLayer2();
205 return cl1_distanceES < cl2_distanceES;
220 bool ignoreALCTGEMmatch =
false;
234 const bool ForceTotal)
const {
237 int cl_es = isME1a ?
cl.getKeyStripME1a(8, isLayer2) :
cl.getKeyStrip(8, isLayer2);
243 uint16_t baseSlope = -1;
246 int clctSlope =
pow(-1, clct.
getBend()) * baseSlope;
249 eighthStripDiff -= SlopeShift;
252 return eighthStripDiff;
264 std::vector<std::vector<uint16_t>> CLCTHitMatrix = clct.
getHits();
265 int CLCTHits[6] = {-1, -1, -1, -1, -1, -1};
281 float MinMaxPairDifferences[2] = {999., -999.};
282 for (
unsigned First = 0; First < 5; ++First) {
284 if (CLCTHits[First] == -1)
286 for (
unsigned Second = First + 1; Second < 6; ++Second) {
288 if (CLCTHits[Second] == -1)
290 float PairDifference = (CLCTHits[First] - CLCTHits[Second]) / (
float)(Second - First);
291 if (PairDifference < MinMaxPairDifferences[0])
292 MinMaxPairDifferences[0] = PairDifference;
293 if (PairDifference > MinMaxPairDifferences[1])
294 MinMaxPairDifferences[1] = PairDifference;
299 uint16_t cosi =
std::ceil(
std::abs(MinMaxPairDifferences[1] - MinMaxPairDifferences[0]));
312 else if (cosi == 2) {
333 else if (cosi == 3) {
366 int SlopeSign =
pow(-1, std::signbit(cscSlope));
414 return std::round(SlopeShift * SlopeSign);
425 bool isLayer2 =
false;
431 const unsigned eighthStripDiff =
abs(SignedEighthStripDiff);
476 slopeShift *=
pow(-1, std::signbit(SignedEighthStripDiff));
bool isCoincidence() const
bool isValid() const
check ALCT validity (1 - valid ALCT)
constexpr int32_t ceil(float num)
unsigned CSC_slope_cosi_2to1_L1_ME21_odd(unsigned slope) const
unsigned CSC_slope_cosi_2to1_L1_ME21_even(unsigned slope) const
unsigned es_diff_slope_L1_ME21_odd(unsigned es_diff) const
bool mitigateSlopeByCosi_
unsigned CSC_slope_cosi_3to1_L1_ME11b_odd(unsigned channel) const
void set_coincidence(const bool isCoincidence)
unsigned CSC_slope_corr_L1_ME11a_even(unsigned channel) const
unsigned es_diff_slope_L1_ME11a_even(unsigned es_diff) const
unsigned CSC_slope_corr_L2_ME11b_even(unsigned channel) const
bool isMatchingLayer1() const
int matchedClusterDistES(const CSCCLCTDigi &clct, const GEMInternalCluster &cluster, const bool isLayer2, const bool ForceTotal) const
uint16_t getKeyStrip(const uint16_t n=2) const
unsigned es_diff_slope_L1_ME11b_even(unsigned es_diff) const
unsigned es_diff_slope_L2_ME11b_odd(unsigned es_diff) const
bool assign_gem_csc_bending_
unsigned CSC_slope_corr_L2_ME21_even(unsigned slope) const
unsigned CSC_slope_cosi_3to1_L1_ME11a_even(unsigned channel) const
bool isMatchingLayer2() const
unsigned CSC_slope_corr_L2_ME11a_even(unsigned channel) const
unsigned CSC_slope_cosi_corr_L1_ME11b_even(unsigned channel) const
void setESLookupTables(const CSCL1TPLookupTableME11ILT *conf)
unsigned CSC_slope_cosi_corr_L1_ME11a_even(unsigned channel) const
unsigned CSC_slope_corr_L2_ME11a_odd(unsigned channel) const
unsigned CSC_slope_cosi_2to1_L1_ME11b_even(unsigned channel) const
unsigned CSC_slope_corr_L1_ME21_even(unsigned slope) const
unsigned CSC_slope_cosi_2to1_L1_ME11b_odd(unsigned channel) const
CSCGEMMatcher(int endcap, unsigned station, unsigned chamber, const edm::ParameterSet &tmbParams, const edm::ParameterSet &luts)
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer
unsigned CSC_slope_corr_L1_ME11b_odd(unsigned channel) const
void matchingClustersLoc(const CSCALCTDigi &alct, const GEMInternalClusters &clusters, GEMInternalClusters &output) const
unsigned es_diff_slope_L1_ME11b_odd(unsigned es_diff) const
bool enable_match_gem_me1b_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
unsigned CSC_slope_cosi_2to1_L1_ME11a_even(unsigned channel) const
const CSCL1TPLookupTableME11ILT * lookupTableME11ILT_
uint16_t getKeyWG() const
return key wire group
unsigned CSC_slope_cosi_corr_L1_ME11a_odd(unsigned channel) const
Abs< T >::type abs(const T &t)
bool isValid() const
check CLCT validity (1 - valid CLCT)
bool enable_match_gem_me1a_
unsigned CSC_slope_corr_L1_ME11a_odd(unsigned channel) const
unsigned CSC_slope_cosi_corr_L1_ME21_odd(unsigned slope) const
unsigned CSC_slope_corr_L1_ME21_odd(unsigned slope) const
unsigned CSC_slope_cosi_3to1_L1_ME21_odd(unsigned slope) const
unsigned CSC_slope_corr_L2_ME21_odd(unsigned slope) const
int CSCGEMSlopeCorrector(const bool isME1a, const int cscSlope, bool isLayer2) const
unsigned CSC_slope_cosi_3to1_L1_ME11a_odd(unsigned channel) const
unsigned CSC_slope_cosi_2to1_L1_ME11a_odd(unsigned channel) const
unsigned es_diff_slope_L2_ME11a_even(unsigned es_diff) const
unsigned CSC_slope_cosi_corr_L1_ME21_even(unsigned slope) const
unsigned es_diff_slope_L2_ME21_odd(unsigned es_diff) const
void bestClusterLoc(const CSCALCTDigi &alct, const GEMInternalClusters &clusters, GEMInternalCluster &best) const
unsigned es_diff_slope_L1_ME21_even(unsigned es_diff) const
const ComparatorContainer & getHits() const
unsigned es_diff_slope_L2_ME11b_even(unsigned es_diff) const
static int position[264][3]
unsigned es_diff_slope_L2_ME21_even(unsigned es_diff) const
unsigned es_diff_slope_L1_ME11a_odd(unsigned es_diff) const
uint16_t getSlope() const
return the slope
std::vector< GEMInternalCluster > GEMInternalClusters
const CSCL1TPLookupTableME21ILT * lookupTableME21ILT_
unsigned CSC_slope_corr_L1_ME11b_even(unsigned channel) const
bool matchCLCTpropagation_
unsigned CSC_slope_corr_L2_ME11b_odd(unsigned channel) const
unsigned es_diff_slope_L2_ME11a_odd(unsigned es_diff) const
unsigned CSC_slope_cosi_3to1_L1_ME21_even(unsigned slope) const
Power< A, B >::type pow(const A &a, const B &b)
int calculateGEMCSCBending(const CSCCLCTDigi &clct, const GEMInternalCluster &cluster) const
uint16_t mitigatedSlopeByConsistency(const CSCCLCTDigi &clct) const
unsigned CSC_slope_cosi_corr_L1_ME11b_odd(unsigned channel) const
unsigned CSC_slope_cosi_3to1_L1_ME11b_even(unsigned channel) const