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!";
43 edm::LogError(
"CSCGEMMotherboard") <<
"GEM-CSC OTMB constructed for a non-ME1/1 or a non-ME2/1 chamber!";
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())
93 bool validClustersAndGeometry =
true;
96 if (
gem_g ==
nullptr) {
97 edm::LogWarning(
"CSCGEMMotherboard") <<
"run() called for GEM-CSC integrated trigger"
98 <<
" without valid GEM geometry! Running CSC-only"
100 validClustersAndGeometry =
false;
104 if (gemClusters ==
nullptr) {
105 edm::LogWarning(
"CSCGEMMotherboard") <<
"run() called for GEM-CSC integrated trigger"
106 <<
" without valid GEM clusters! Running CSC-only"
108 validClustersAndGeometry =
false;
111 if (validClustersAndGeometry) {
175 if (
alctProc->getBestALCT(bx_alct).isValid()) {
187 if (
clctProc->getBestCLCT(bx_clct).isValid()) {
188 LogTrace(
"CSCMotherboard") <<
"Successful ALCT-CLCT match: bx_alct = " << bx_alct <<
"; bx_clct = " << bx_clct
189 <<
"; mbx = " << mbx;
201 if (
allLCTs_(bx_alct, mbx, 0).isValid()) {
203 used_clct_mask[bx_clct] =
true;
205 bunch_crossing_mask[bx_alct] =
true;
227 if (bunch_crossing_mask[bx_gem])
231 if (!
clusterProc_->getCoincidenceClusters(bx_gem).empty()) {
245 if (
clctProc->getBestCLCT(bx_clct).isValid()) {
259 if (
allLCTs_(bx_gem, mbx, 0).isValid()) {
261 used_clct_mask[bx_clct] =
true;
263 bunch_crossing_mask[bx_gem] =
true;
288 if (bunch_crossing_mask[bx_alct])
291 if (
alctProc->getBestALCT(bx_alct).isValid()) {
296 if (bx_gem < 0 or bx_gem >= CSCConstants::MAX_ALCT_TBINS)
302 if (!
clusterProc_->getCoincidenceClusters(bx_gem).empty()) {
311 if (
allLCTs_(bx_alct, mbx, 0).isValid()) {
313 used_gem_mask[bx_gem] =
true;
315 bunch_crossing_mask[bx_alct] =
true;
335 if (clusters.empty())
339 std::vector<CSCCorrelatedLCTDigi> lcts;
348 edm::LogError(
"CSCGEMMotherboard") <<
"Best ALCT invalid in correlateLCTsGEM!";
353 edm::LogError(
"CSCGEMMotherboard") <<
"Best CLCT invalid in correlateLCTsGEM!";
365 cscGEMMatcher_->bestClusterBXLoc(bestALCT, clusters, bestALCTCluster);
366 cscGEMMatcher_->bestClusterBXLoc(secondALCT, clusters, secondALCTCluster);
367 cscGEMMatcher_->bestClusterBXLoc(bestCLCT, clusters, bestCLCTCluster);
368 cscGEMMatcher_->bestClusterBXLoc(secondCLCT, clusters, secondCLCTCluster);
381 cscGEMMatcher_->bestClusterBXLoc(bestALCT, bestCLCT, clusters, bbCluster);
382 cscGEMMatcher_->bestClusterBXLoc(bestALCT, secondCLCT, clusters, bsCluster);
383 cscGEMMatcher_->bestClusterBXLoc(secondALCT, bestCLCT, clusters, sbCluster);
384 cscGEMMatcher_->bestClusterBXLoc(secondALCT, secondCLCT, clusters, ssCluster);
396 lcts.push_back(lctbb);
398 if (bestALCT.
isValid() and secondCLCT.
isValid() and (secondCLCT != bestCLCT)) {
400 lcts.push_back(lctbs);
402 if (bestCLCT.
isValid() and secondALCT.
isValid() and (secondALCT != bestALCT)) {
404 lcts.push_back(lctsb);
406 if (secondALCT.
isValid() and secondCLCT.
isValid() and (secondALCT != bestALCT) and (secondCLCT != bestCLCT)) {
408 lcts.push_back(lctss);
442 edm::LogError(
"CSCGEMMotherboard") <<
"Best CLCT invalid in correlateLCTsGEM!";
447 if (secondCLCT == bestCLCT)
453 cscGEMMatcher_->bestClusterBXLoc(bestCLCT, clusters, bestCluster);
454 cscGEMMatcher_->bestClusterBXLoc(secondCLCT, clusters, secondCluster);
478 edm::LogError(
"CSCGEMMotherboard") <<
"Best ALCT invalid in correlateLCTsGEM!";
483 if (secondALCT == bestALCT)
489 cscGEMMatcher_->bestClusterBXLoc(bestALCT, clusters, bestCluster);
490 cscGEMMatcher_->bestClusterBXLoc(secondALCT, clusters, secondCluster);
646 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)
Log< level::Warning, false > LogWarning
~CSCGEMMotherboard() override
const GEMGeometry * gem_g
bool isCoincidence() const
bool getQuartStripBit() const
get single quart strip bit
std::unique_ptr< LCTQualityAssignment > qualityAssignment_