13 : endcap_(endcap), station_(station), chamber_(chamber) {
95 for (
const auto&
cl : clusters) {
110 for (
const auto&
cl : clusters) {
113 output.push_back(
cl);
132 for (
const auto&
p : alctClusters) {
133 for (
const auto&
q : clctClusters) {
148 for (
const auto&
cl : clusters) {
151 unsigned deltaWG(
station_ == 1 ? 10 : 20);
153 output.push_back(
cl);
165 for (
const auto&
cl : clusters) {
168 output.push_back(
cl);
183 unsigned halfStripCut;
207 return halfStripDiff <= halfStripCut;
217 uint16_t baseSlope = 0;
222 int clctSlope =
pow(-1, clct.
getBend()) * baseSlope;
236 else if (cl.
id().
layer() == 2) {
248 edm::LogWarning(
"CSCGEMMatcher") <<
"cluster.id().layer =" << cl.
id().
layer() <<
" out of acceptable range 1-2!";
271 for (
const auto&
p : alctClusters) {
272 for (
const auto&
q : clctClusters) {
334 if (!clustersBXLoc.empty())
335 best = clustersBXLoc[0];
349 if (!clustersBXLoc.empty())
350 best = clustersBXLoc[0];
362 if (!clustersBXLoc.empty())
363 best = clustersBXLoc[0];
368 std::vector<std::vector<uint16_t>> CLCTHitMatrix = clct.
getHits();
369 int CLCTHits[6] = {-1, -1, -1, -1, -1, -1};
374 if (value != 0 && value != 65535) {
375 CLCTHits[
layer] = (int)value;
382 float MinMaxPairDifferences[2] = {999., -999.};
383 for (
unsigned First = 0; First < 5; ++First) {
385 if (CLCTHits[First] == -1)
387 for (
unsigned Second = First + 1; Second < 6; ++Second) {
389 if (CLCTHits[Second] == -1)
391 float PairDifference = (CLCTHits[First] - CLCTHits[Second]) / (
float)(Second - First);
392 if (PairDifference < MinMaxPairDifferences[0])
393 MinMaxPairDifferences[0] = PairDifference;
394 if (PairDifference > MinMaxPairDifferences[1])
395 MinMaxPairDifferences[1] = PairDifference;
400 uint16_t cosi =
std::ceil(
std::abs(MinMaxPairDifferences[1] - MinMaxPairDifferences[0]));
411 else if (cosi == 2) {
418 else if (cosi == 3) {
432 int SlopeSign = cscSlope /
std::abs(cscSlope);
437 if (isL1orCoincidence)
442 if (isL1orCoincidence)
450 if (isL1orCoincidence)
455 if (isL1orCoincidence)
461 return std::round(SlopeShift * SlopeSign *
endcap_);
constexpr int32_t ceil(float num)
void matchingClustersBXLoc(const CSCALCTDigi &alct, const GEMInternalClusters &clusters, GEMInternalClusters &selected) const
uint16_t getKeyStrip(int n=2) const
uint16_t getKeyStripME1a(int n=2) const
unsigned CSC_slope_corr_L2_ME11_odd(unsigned channel) const
unsigned maxDeltaBXALCTGEM_
bool mitigateSlopeByCosi_
unsigned CSC_slope_cosi_corr_L2_ME11_even(unsigned channel) const
unsigned CSC_slope_corr_L2_ME11_even(unsigned channel) const
uint16_t getBX() const
return BX
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
unsigned maxDeltaHsEvenME1a_
unsigned es_diff_slope_L2_ME1a_odd(unsigned es_diff) const
bool isValid() const
check ALCT validity (1 - valid ALCT)
static const double slope[3]
int layer1_middle_es_me1a() const
uint16_t getBX() const
return BX - five low bits of BXN counter tagged by the ALCT
bool assign_gem_csc_bending_
unsigned CSC_slope_corr_L1_ME11_odd(unsigned channel) const
unsigned calculateGEMCSCBending(const CSCCLCTDigi &clct, const GEMInternalCluster &cluster) const
int layer1_middle_es() const
bool matchedClusterLocES(const CSCCLCTDigi &clct, const GEMInternalCluster &cluster) const
void setESLookupTables(const CSCL1TPLookupTableME11ILT *conf)
void bestClusterBXLoc(const CSCALCTDigi &alct, const GEMInternalClusters &clusters, GEMInternalCluster &best) const
unsigned es_diff_slope_L1_ME1b_even(unsigned es_diff) const
constexpr std::array< uint8_t, layerIndexSize > layer
unsigned es_diff_slope_L2_ME21_odd(unsigned es_diff) const
CSCGEMMatcher(int endcap, unsigned station, unsigned chamber, const edm::ParameterSet &tmbParams, const edm::ParameterSet &luts)
unsigned es_diff_slope_L1_ME21_even(unsigned es_diff) const
uint16_t getKeyStrip(const uint16_t n=2) const
unsigned maxDeltaBXCLCTGEM_
unsigned CSC_slope_corr_L1_ME11_even(unsigned channel) const
unsigned es_diff_slope_L1_ME1a_odd(unsigned es_diff) const
unsigned es_diff_slope_L1_ME1b_odd(unsigned es_diff) const
int CSCGEMSlopeCorrector(const bool isL1orCopad, const int cscSlope) const
void matchingClustersBX(const CSCALCTDigi &alct, const GEMInternalClusters &clusters, GEMInternalClusters &selected) const
uint16_t mitigatedSlopeByConsistency(const CSCCLCTDigi &clct) const
const CSCL1TPLookupTableME11ILT * lookupTableME11ILT_
Abs< T >::type abs(const T &t)
unsigned es_diff_slope_L2_ME1b_even(unsigned es_diff) const
unsigned CSC_slope_cosi_2to1_L1_ME11_odd(unsigned channel) const
bool isValid() const
check CLCT validity (1 - valid CLCT)
unsigned es_diff_slope_L2_ME1b_odd(unsigned es_diff) const
bool isMatched(TrackingRecHit const &hit)
bool matchedClusterLocHS(const CSCCLCTDigi &clct, const GEMInternalCluster &cluster) const
unsigned CSC_slope_cosi_corr_L1_ME11_odd(unsigned channel) const
unsigned CSC_slope_cosi_2to1_L1_ME11_even(unsigned channel) const
unsigned CSC_slope_cosi_3to1_L1_ME11_odd(unsigned channel) const
int layer2_middle_es() const
unsigned es_diff_slope_L1_ME1a_even(unsigned es_diff) const
int layer2_middle_es_me1a() const
uint16_t getKeyWG() const
return key wire group
constexpr int layer() const
T getParameter(std::string const &) const
const ComparatorContainer & getHits() const
uint16_t getSlope() const
return the slope
void matchingClustersLoc(const CSCALCTDigi &alct, const GEMInternalClusters &clusters, GEMInternalClusters &selected) const
unsigned CSC_slope_cosi_corr_L2_ME11_odd(unsigned channel) const
static int position[264][3]
std::vector< GEMInternalCluster > GEMInternalClusters
unsigned es_diff_slope_L2_ME21_even(unsigned es_diff) const
const CSCL1TPLookupTableME21ILT * lookupTableME21ILT_
unsigned CSC_slope_cosi_corr_L1_ME11_even(unsigned channel) const
Log< level::Warning, false > LogWarning
bool isCoincidence() const
unsigned maxDeltaHsOddME1a_
unsigned es_diff_slope_L1_ME21_odd(unsigned es_diff) const
unsigned CSC_slope_cosi_3to1_L1_ME11_even(unsigned channel) const
Power< A, B >::type pow(const A &a, const B &b)
unsigned es_diff_slope_L2_ME1a_even(unsigned es_diff) const