13 : endcap_(endcap), station_(station), chamber_(chamber) {
18 edm::LogError(
"CSCGEMMatcher") <<
"Class constructed for a chamber in ME3 or ME4!";
100 for (
const auto&
cl : clusters) {
103 output.push_back(
cl);
115 for (
const auto&
cl : clusters) {
118 output.push_back(
cl);
137 for (
const auto&
p : alctClusters) {
138 for (
const auto&
q : clctClusters) {
153 for (
const auto&
cl : clusters) {
156 unsigned deltaWG(
station_ == 1 ? 10 : 20);
158 output.push_back(
cl);
170 for (
const auto&
cl : clusters) {
173 output.push_back(
cl);
188 unsigned halfStripCut;
212 return halfStripDiff <= halfStripCut;
222 uint16_t baseSlope = 0;
227 int clctSlope =
pow(-1, clct.
getBend()) * baseSlope;
241 else if (cl.
id().
layer() == 2) {
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};
379 if (value != 0 && value != 65535) {
380 CLCTHits[
layer] = (int)value;
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_);
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
Log< level::Error, false > LogError
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