44 if (!clustersLoc.empty())
45 best = clustersLoc[0];
57 bool ignoreALCTGEMmatch =
true;
62 if (!clustersLoc.empty())
63 best = clustersLoc[0];
80 if (!clustersLoc.empty()) {
81 best = clustersLoc[0];
82 if (best.isCoincidence() and !best.isMatchingLayer1() and best.isMatchingLayer2())
83 best.set_coincidence(
false);
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,
159 bool isMatchedLayer1 =
false;
160 bool isMatchedLayer2 =
false;
162 if (
cl.id1().layer() == 1) {
164 ((isME1a and
cl.roll1() == 8)
or (!isME1a and
cl.roll1() < 8)))
or 166 constexpr
bool isLayer2 =
false;
167 unsigned distanceES =
169 if (distanceES <= eighthStripCut)
170 isMatchedLayer1 =
true;
173 if (
cl.id2().layer() == 2) {
175 ((isME1a and
cl.roll2() == 8)
or (!isME1a and
cl.roll2() < 8)))
or 177 constexpr
bool isLayer2 =
true;
178 unsigned distanceES =
180 if (distanceES <= eighthStripCut)
181 isMatchedLayer2 =
true;
187 if (((ignoreALCTGEMmatch
or cl.isMatchingLayer1()) and isMatchedLayer1)
or 188 ((ignoreALCTGEMmatch
or cl.isMatchingLayer2()) and isMatchedLayer2)) {
190 output.back().set_matchingLayer1(
false);
191 output.back().set_matchingLayer2(
false);
192 if ((ignoreALCTGEMmatch
or cl.isMatchingLayer1()) and isMatchedLayer1)
193 output.back().set_matchingLayer1(
true);
194 if ((ignoreALCTGEMmatch
or cl.isMatchingLayer2()) and isMatchedLayer2)
195 output.back().set_matchingLayer2(
true);
205 if (cl1.isCoincidence() and !
cl2.isCoincidence())
206 return cl1.isCoincidence();
207 else if ((cl1.isCoincidence() and
cl2.isCoincidence())
or (!cl1.isCoincidence() and !
cl2.isCoincidence())) {
208 bool cl1_isLayer2 = !cl1.isMatchingLayer1() and cl1.isMatchingLayer2();
209 bool cl2_isLayer2 = !
cl2.isMatchingLayer1() and
cl2.isMatchingLayer2();
210 unsigned cl1_distanceES =
212 unsigned cl2_distanceES =
214 return cl1_distanceES < cl2_distanceES;
231 bool ignoreALCTGEMmatch =
false;
245 const bool ForceTotal,
250 int cl_es = isME1a ?
cl.getKeyStripME1a(8, isLayer2) :
cl.getKeyStrip(8, isLayer2);
256 uint16_t baseSlope = -1;
260 int clctSlope =
pow(-1, clct.
getBend()) * baseSlope;
262 SlopeShift =
CSCGEMSlopeCorrector(isME1a, clctSlope, isLayer2, lookupTableME11ILT, lookupTableME21ILT);
263 eighthStripDiff -= SlopeShift;
266 return eighthStripDiff;
280 std::vector<std::vector<uint16_t>> CLCTHitMatrix = clct.
getHits();
281 int CLCTHits[6] = {-1, -1, -1, -1, -1, -1};
297 float MinMaxPairDifferences[2] = {999., -999.};
298 for (
unsigned First = 0; First < 5; ++First) {
300 if (CLCTHits[First] == -1)
302 for (
unsigned Second = First + 1; Second < 6; ++Second) {
304 if (CLCTHits[Second] == -1)
306 float PairDifference = (CLCTHits[First] - CLCTHits[Second]) / (
float)(Second - First);
307 if (PairDifference < MinMaxPairDifferences[0])
308 MinMaxPairDifferences[0] = PairDifference;
309 if (PairDifference > MinMaxPairDifferences[1])
310 MinMaxPairDifferences[1] = PairDifference;
315 uint16_t cosi =
std::ceil(
std::abs(MinMaxPairDifferences[1] - MinMaxPairDifferences[0]));
328 else if (cosi == 2) {
349 else if (cosi == 3) {
386 int SlopeSign =
pow(-1, std::signbit(cscSlope));
434 return std::round(SlopeShift * SlopeSign);
448 bool isLayer2 =
false;
453 const int SignedEighthStripDiff =
455 const unsigned eighthStripDiff =
abs(SignedEighthStripDiff);
500 slopeShift *=
pow(-1, std::signbit(SignedEighthStripDiff));
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
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
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
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)
unsigned CSC_slope_corr_L1_ME11b_odd(unsigned channel) const
uint16_t mitigatedSlopeByConsistency(const CSCCLCTDigi &clct, const CSCL1TPLookupTableME11ILT *lookupTableME11ILT, const CSCL1TPLookupTableME21ILT *lookupTableME21ILT) 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
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
int CSCGEMSlopeCorrector(const bool isME1a, const int cscSlope, bool isLayer2, const CSCL1TPLookupTableME11ILT *lookupTableME11ILT, const CSCL1TPLookupTableME21ILT *lookupTableME21ILT) const
unsigned CSC_slope_cosi_corr_L1_ME21_odd(unsigned slope) const
unsigned CSC_slope_corr_L1_ME21_odd(unsigned slope) const
int matchedClusterDistES(const CSCCLCTDigi &clct, const GEMInternalCluster &cluster, const bool isLayer2, const bool ForceTotal, const CSCL1TPLookupTableME11ILT *lookupTableME11ILT, const CSCL1TPLookupTableME21ILT *lookupTableME21ILT) const
unsigned CSC_slope_cosi_3to1_L1_ME21_odd(unsigned slope) const
unsigned CSC_slope_corr_L2_ME21_odd(unsigned slope) const
unsigned CSC_slope_cosi_3to1_L1_ME11a_odd(unsigned channel) const
unsigned CSC_slope_cosi_2to1_L1_ME11a_odd(unsigned channel) const
int calculateGEMCSCBending(const CSCCLCTDigi &clct, const GEMInternalCluster &cluster, const CSCL1TPLookupTableME11ILT *lookupTableME11ILT, const CSCL1TPLookupTableME21ILT *lookupTableME21ILT) 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
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
unsigned CSC_slope_cosi_corr_L1_ME11b_odd(unsigned channel) const
unsigned CSC_slope_cosi_3to1_L1_ME11b_even(unsigned channel) const