10 :
CSCMotherboard(endcap, station, sector, subsector, chamber, conf),
11 drop_low_quality_alct_no_gems_(tmbParams_.getParameter<bool>(
"dropLowQualityALCTsNoGEMs")),
12 drop_low_quality_clct_no_gems_(tmbParams_.getParameter<bool>(
"dropLowQualityCLCTsNoGEMs")),
13 build_lct_from_alct_clct_2gem_(tmbParams_.getParameter<bool>(
"buildLCTfromALCTCLCTand2GEM")),
14 build_lct_from_alct_clct_1gem_(tmbParams_.getParameter<bool>(
"buildLCTfromALCTCLCTand1GEM")),
15 build_lct_from_alct_gem_(tmbParams_.getParameter<bool>(
"buildLCTfromALCTandGEM")),
16 build_lct_from_clct_gem_(tmbParams_.getParameter<bool>(
"buildLCTfromCLCTandGEM")) {
34 edm::LogError(
"CSCGEMMotherboard") <<
"TMB constructed while runME11ILT_ is not set!";
38 edm::LogError(
"CSCGEMMotherboard") <<
"TMB constructed while runME21ILT_ is not set!";
63 if (
gem_g ==
nullptr) {
64 edm::LogError(
"CSCGEMMotherboard") <<
"run() called for GEM-CSC integrated trigger without valid GEM geometry! \n";
70 edm::LogError(
"CSCGEMMotherboard") <<
"run() called for non-existing ALCT/CLCT processor! \n";
83 const std::vector<CSCALCTDigi>&
alctV =
alctProc->run(wiredc);
84 const std::vector<CSCCLCTDigi>&
clctV = clctProc->run(compdc);
90 if (alctV.empty() and clctV.empty())
155 if (
alctProc->getBestALCT(bx_alct).isValid()) {
167 if (
clctProc->getBestCLCT(bx_clct).isValid()) {
168 LogTrace(
"CSCMotherboard") <<
"Successful ALCT-CLCT match: bx_alct = " << bx_alct <<
"; bx_clct = " << bx_clct
169 <<
"; mbx = " << mbx;
181 if (
allLCTs_(bx_alct, mbx, 0).isValid()) {
183 used_clct_mask[bx_clct] =
true;
185 bunch_crossing_mask[bx_alct] =
true;
207 if (bunch_crossing_mask[bx_gem])
211 if (!
clusterProc_->getCoincidenceClusters(bx_gem).empty()) {
225 if (
clctProc->getBestCLCT(bx_clct).isValid()) {
239 if (
allLCTs_(bx_gem, mbx, 0).isValid()) {
241 used_clct_mask[bx_clct] =
true;
243 bunch_crossing_mask[bx_gem] =
true;
268 if (bunch_crossing_mask[bx_alct])
271 if (
alctProc->getBestALCT(bx_alct).isValid()) {
276 if (bx_gem < 0 or bx_gem >= CSCConstants::MAX_ALCT_TBINS)
282 if (!
clusterProc_->getCoincidenceClusters(bx_gem).empty()) {
291 if (
allLCTs_(bx_alct, mbx, 0).isValid()) {
293 used_gem_mask[bx_gem] =
true;
295 bunch_crossing_mask[bx_alct] =
true;
315 if (clusters.empty())
319 std::vector<CSCCorrelatedLCTDigi> lcts;
328 edm::LogError(
"CSCGEMMotherboard") <<
"Best ALCT invalid in correlateLCTsGEM!";
333 edm::LogError(
"CSCGEMMotherboard") <<
"Best CLCT invalid in correlateLCTsGEM!";
345 cscGEMMatcher_->bestClusterBXLoc(bestALCT, clusters, bestALCTCluster);
346 cscGEMMatcher_->bestClusterBXLoc(secondALCT, clusters, secondALCTCluster);
347 cscGEMMatcher_->bestClusterBXLoc(bestCLCT, clusters, bestCLCTCluster);
348 cscGEMMatcher_->bestClusterBXLoc(secondCLCT, clusters, secondCLCTCluster);
361 cscGEMMatcher_->bestClusterBXLoc(bestALCT, bestCLCT, clusters, bbCluster);
362 cscGEMMatcher_->bestClusterBXLoc(bestALCT, secondCLCT, clusters, bsCluster);
363 cscGEMMatcher_->bestClusterBXLoc(secondALCT, bestCLCT, clusters, sbCluster);
364 cscGEMMatcher_->bestClusterBXLoc(secondALCT, secondCLCT, clusters, ssCluster);
376 lcts.push_back(lctbb);
378 if (bestALCT.
isValid() and secondCLCT.
isValid() and (secondCLCT != bestCLCT)) {
380 lcts.push_back(lctbs);
382 if (bestCLCT.
isValid() and secondALCT.
isValid() and (secondALCT != bestALCT)) {
384 lcts.push_back(lctsb);
386 if (secondALCT.
isValid() and secondCLCT.
isValid() and (secondALCT != bestALCT) and (secondCLCT != bestCLCT)) {
388 lcts.push_back(lctss);
422 edm::LogError(
"CSCGEMMotherboard") <<
"Best CLCT invalid in correlateLCTsGEM!";
427 if (secondCLCT == bestCLCT)
433 cscGEMMatcher_->bestClusterBXLoc(bestCLCT, clusters, bestCluster);
434 cscGEMMatcher_->bestClusterBXLoc(secondCLCT, clusters, secondCluster);
458 edm::LogError(
"CSCGEMMotherboard") <<
"Best ALCT invalid in correlateLCTsGEM!";
463 if (secondALCT == bestALCT)
469 cscGEMMatcher_->bestClusterBXLoc(bestALCT, clusters, bestCluster);
470 cscGEMMatcher_->bestClusterBXLoc(secondALCT, clusters, secondCluster);
626 return lct1.
getSlope() < lct2.getSlope();
bool build_lct_from_alct_clct_1gem_
void matchALCTCLCT(bool bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS])
uint16_t getRun3Pattern() const
return pattern
void correlateLCTsGEM(const CSCALCTDigi &bestALCT, const CSCALCTDigi &secondALCT, const CSCCLCTDigi &bestCLCT, const CSCCLCTDigi &secondCLCT, const GEMInternalClusters &clusters, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2) const
uint16_t getQuality() const
return quality of a pattern
uint16_t getKeyStrip(int n=2) const
bool drop_low_quality_clct_no_gems_
bool build_lct_from_alct_clct_2gem_
std::unique_ptr< CSCGEMMatcher > cscGEMMatcher_
const CSCL1TPLookupTableME11ILT * lookupTableME11ILT_
std::vector< CSCCLCTDigi > clctV
bool match_earliest_gem_only_
bool assign_gem_csc_bending_
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
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 int match_trig_window_size
CSCALCTDigi getBXShiftedALCT(const CSCALCTDigi &) const
CSCCLCTDigi getBXShiftedCLCT(const CSCCLCTDigi &) const
bool isValid() const
check ALCT validity (1 - valid ALCT)
constexpr uint32_t rawId() const
get the raw id
uint16_t getBX() const
return BX - five low bits of BXN counter tagged by the ALCT
void clear()
clear this ALCT
void sortLCTsByBending(std::vector< CSCCorrelatedLCTDigi > &lcts) const
bool build_lct_from_alct_gem_
std::unique_ptr< CSCCathodeLCTProcessor > clctProc
void constructLCTsGEM(const CSCALCTDigi &alct, const CSCCLCTDigi &clct, const GEMInternalCluster &gem, CSCCorrelatedLCTDigi &lct) const
bool drop_low_quality_clct_no_gems_me1a_
Log< level::Error, false > LogError
void copyValidToInValid(CSCALCTDigi &, CSCALCTDigi &, CSCCLCTDigi &, CSCCLCTDigi &) const
void matchALCT2GEM(bool bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS])
bool hasGE21Geometry16Partitions_
uint16_t getKeyStrip(const uint16_t n=2) const
const unsigned theTrigChamber
std::vector< int > preferred_bx_match_
bool match_earliest_clct_only_
unsigned max_delta_bx_clct_gem_
std::vector< CSCALCTDigi > alctV
bool getEighthStripBit() const
get single eighth strip bit
bool build_lct_from_clct_gem_me1a_
std::vector< GEMInternalCluster > GEMInternalClusters
unsigned int encodePattern(const int clctPattern) const
bool isValid() const
check CLCT validity (1 - valid CLCT)
void dropLowQualityALCTNoClusters(CSCALCTDigi &alct, const GEMInternalCluster &cluster) const
void matchCLCT2GEM(bool bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS])
const CSCGeometry * cscGeometry_
edm::ParameterSet tmbParams_
uint16_t getKeyWG() const
return key wire group
T getParameter(std::string const &) const
bool build_lct_from_clct_gem_
const unsigned theStation
uint16_t getSlope() const
return the slope
uint16_t getPattern() const
return pattern
void matchALCTCLCTGEM(bool bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS])
void run(const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc, const GEMPadDigiClusterCollection *gemPads)
std::shared_ptr< GEMClusterProcessor > clusterProc_
unsigned max_delta_bx_alct_gem_
const CSCL1TPLookupTableME21ILT * lookupTableME21ILT_
std::unique_ptr< CSCAnodeLCTProcessor > alctProc
const CSCL1TPLookupTableCCLUT * lookupTableCCLUT_
bool drop_low_quality_alct_no_gems_
void encodeHighMultiplicityBits()
void clear()
clear this CLCT
void dropLowQualityCLCTNoClusters(CSCCLCTDigi &clct, const GEMInternalCluster &cluster) const
unsigned getKeyWG() const
uint16_t getQuality() const
return quality of a pattern (number of layers hit!)
CSCGEMMotherboard(unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)
~CSCGEMMotherboard() override
const GEMGeometry * gem_g
bool isCoincidence() const
bool getQuartStripBit() const
get single quart strip bit
std::unique_ptr< LCTQualityAssignment > qualityAssignment_