18 edm::LogError(
"CSCGEMMatcher") <<
"Class constructed for a chamber in ME3 or ME4!";
137 for (
const auto&
p : alctClusters) {
138 for (
const auto&
q : clctClusters) {
156 unsigned deltaWG(
station_ == 1 ? 10 : 20);
188 unsigned halfStripCut;
212 return halfStripDiff <= halfStripCut;
222 uint16_t baseSlope = 0;
227 int clctSlope =
pow(-1, clct.
getBend()) * baseSlope;
230 if (
cl.isCoincidence()
or cl.id().layer() == 1) {
231 key_es =
cl.layer1_middle_es();
233 key_es =
cl.layer1_middle_es_me1a();
241 else if (
cl.id().layer() == 2) {
242 key_es =
cl.layer2_middle_es();
244 key_es =
cl.layer2_middle_es_me1a();
253 edm::LogWarning(
"CSCGEMMatcher") <<
"cluster.id().layer =" <<
cl.id().layer() <<
" out of acceptable range 1-2!";
276 for (
const auto&
p : alctClusters) {
277 for (
const auto&
q : clctClusters) {
339 if (!clustersBXLoc.empty())
340 best = clustersBXLoc[0];
354 if (!clustersBXLoc.empty())
355 best = clustersBXLoc[0];
367 if (!clustersBXLoc.empty())
368 best = clustersBXLoc[0];
373 std::vector<std::vector<uint16_t>> CLCTHitMatrix = clct.
getHits();
374 int CLCTHits[6] = {-1, -1, -1, -1, -1, -1};
387 float MinMaxPairDifferences[2] = {999., -999.};
388 for (
unsigned First = 0; First < 5; ++First) {
390 if (CLCTHits[First] == -1)
392 for (
unsigned Second = First + 1; Second < 6; ++Second) {
394 if (CLCTHits[Second] == -1)
396 float PairDifference = (CLCTHits[First] - CLCTHits[Second]) / (
float)(Second - First);
397 if (PairDifference < MinMaxPairDifferences[0])
398 MinMaxPairDifferences[0] = PairDifference;
399 if (PairDifference > MinMaxPairDifferences[1])
400 MinMaxPairDifferences[1] = PairDifference;
405 uint16_t cosi =
std::ceil(
std::abs(MinMaxPairDifferences[1] - MinMaxPairDifferences[0]));
416 else if (cosi == 2) {
423 else if (cosi == 3) {
437 int SlopeSign = cscSlope /
std::abs(cscSlope);
442 if (isL1orCoincidence)
447 if (isL1orCoincidence)
455 if (isL1orCoincidence)
460 if (isL1orCoincidence)
466 return std::round(SlopeShift * SlopeSign *
endcap_);
bool isValid() const
check ALCT validity (1 - valid ALCT)
unsigned es_diff_slope_L1_ME1b_even(unsigned es_diff) const
constexpr int32_t ceil(float num)
unsigned maxDeltaBXALCTGEM_
uint16_t getBX() const
return BX - five low bits of BXN counter tagged by the ALCT
unsigned CSC_slope_cosi_2to1_L1_ME11_odd(unsigned channel) const
unsigned es_diff_slope_L1_ME21_odd(unsigned es_diff) const
bool mitigateSlopeByCosi_
bool matchedClusterLocHS(const CSCCLCTDigi &clct, const GEMInternalCluster &cluster) const
unsigned maxDeltaHsEvenME1a_
unsigned CSC_slope_corr_L1_ME11_odd(unsigned channel) const
static const double slope[3]
unsigned es_diff_slope_L1_ME1a_even(unsigned es_diff) const
unsigned CSC_slope_corr_L1_ME11_even(unsigned channel) const
uint16_t getKeyStrip(const uint16_t n=2) const
bool assign_gem_csc_bending_
unsigned CSC_slope_cosi_2to1_L1_ME11_even(unsigned channel) const
Log< level::Error, false > LogError
constexpr int layer() const
void setESLookupTables(const CSCL1TPLookupTableME11ILT *conf)
unsigned CSC_slope_corr_L2_ME11_odd(unsigned channel) const
void matchingClustersLoc(const CSCALCTDigi &alct, const GEMInternalClusters &clusters, GEMInternalClusters &selected) const
constexpr std::array< uint8_t, layerIndexSize > layer
uint16_t getKeyStripME1a(int n=2) const
CSCGEMMatcher(int endcap, unsigned station, unsigned chamber, const edm::ParameterSet &tmbParams, const edm::ParameterSet &luts)
unsigned calculateGEMCSCBending(const CSCCLCTDigi &clct, const GEMInternalCluster &cluster) const
unsigned maxDeltaBXCLCTGEM_
unsigned CSC_slope_cosi_3to1_L1_ME11_odd(unsigned channel) const
unsigned CSC_slope_cosi_3to1_L1_ME11_even(unsigned channel) const
unsigned es_diff_slope_L2_ME1a_even(unsigned es_diff) const
uint16_t getKeyStrip(int n=2) const
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
const CSCL1TPLookupTableME11ILT * lookupTableME11ILT_
uint16_t getKeyWG() const
return key wire group
unsigned es_diff_slope_L2_ME1b_odd(unsigned es_diff) const
Abs< T >::type abs(const T &t)
bool isMatched(TrackingRecHit const &hit)
unsigned es_diff_slope_L1_ME1b_odd(unsigned es_diff) const
def window(xmin, xmax, ymin, ymax, x=0, y=0, width=100, height=100, xlogbase=None, ylogbase=None, minusInfinity=-1000, flipx=False, flipy=True)
void matchingClustersBXLoc(const CSCALCTDigi &alct, const GEMInternalClusters &clusters, GEMInternalClusters &selected) const
bool isValid() const
check CLCT validity (1 - valid CLCT)
bool matchedClusterLocES(const CSCCLCTDigi &clct, const GEMInternalCluster &cluster) const
unsigned es_diff_slope_L2_ME1b_even(unsigned es_diff) const
uint16_t getBX() const
return BX
unsigned CSC_slope_corr_L2_ME11_even(unsigned channel) const
void matchingClustersBX(const CSCALCTDigi &alct, const GEMInternalClusters &clusters, GEMInternalClusters &selected) const
unsigned es_diff_slope_L2_ME21_odd(unsigned es_diff) const
unsigned CSC_slope_cosi_corr_L1_ME11_odd(unsigned channel) const
unsigned es_diff_slope_L1_ME21_even(unsigned es_diff) const
unsigned es_diff_slope_L1_ME1a_odd(unsigned es_diff) const
const ComparatorContainer & getHits() const
static int position[264][3]
unsigned es_diff_slope_L2_ME21_even(unsigned es_diff) const
uint16_t getSlope() const
return the slope
std::vector< GEMInternalCluster > GEMInternalClusters
const CSCL1TPLookupTableME21ILT * lookupTableME21ILT_
unsigned CSC_slope_cosi_corr_L2_ME11_odd(unsigned channel) const
Log< level::Warning, false > LogWarning
void bestClusterBXLoc(const CSCALCTDigi &alct, const GEMInternalClusters &clusters, GEMInternalCluster &best) const
unsigned CSC_slope_cosi_corr_L1_ME11_even(unsigned channel) const
unsigned maxDeltaHsOddME1a_
unsigned es_diff_slope_L2_ME1a_odd(unsigned es_diff) const
Power< A, B >::type pow(const A &a, const B &b)
uint16_t mitigatedSlopeByConsistency(const CSCCLCTDigi &clct) const
int CSCGEMSlopeCorrector(const bool isL1orCopad, const int cscSlope) const
unsigned CSC_slope_cosi_corr_L2_ME11_even(unsigned channel) const