CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
CSCGEMMotherboard Class Reference

#include <CSCGEMMotherboard.h>

Inheritance diagram for CSCGEMMotherboard:
CSCMotherboard CSCBaseboard

Public Types

typedef std::vector< GEMInternalClusterGEMInternalClusters
 

Public Member Functions

void clear ()
 
std::shared_ptr< GEMClusterProcessorclusterProc () const
 
 CSCGEMMotherboard (unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)
 
void run (const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc, const GEMPadDigiClusterCollection *gemPads)
 
void setGEMGeometry (const GEMGeometry *g)
 
 ~CSCGEMMotherboard () override
 
- Public Member Functions inherited from CSCMotherboard
void clear ()
 
 CSCMotherboard (unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)
 
virtual std::vector< CSCCorrelatedLCTDigireadoutLCTs () const
 
CSCShowerDigi readoutShower () const
 
void run (const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc)
 
void selectLCTs ()
 
void setConfigParameters (const CSCDBL1TPParameters *conf)
 
 ~CSCMotherboard () override=default
 
- Public Member Functions inherited from CSCBaseboard
 CSCBaseboard ()
 
 CSCBaseboard (unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)
 
std::string getCSCName () const
 
void setCSCGeometry (const CSCGeometry *g)
 
virtual ~CSCBaseboard ()=default
 

Private Member Functions

void constructLCTsGEM (const CSCALCTDigi &alct, const CSCCLCTDigi &clct, const GEMInternalCluster &gem, CSCCorrelatedLCTDigi &lct) const
 
void constructLCTsGEM (const CSCALCTDigi &alct, const GEMInternalCluster &gem, int trackNumber, CSCCorrelatedLCTDigi &lct) const
 
void constructLCTsGEM (const CSCCLCTDigi &clct, const GEMInternalCluster &gem, int trackNumber, CSCCorrelatedLCTDigi &lct) const
 
void correlateLCTsGEM (const CSCALCTDigi &bestALCT, const CSCALCTDigi &secondALCT, const CSCCLCTDigi &bestCLCT, const CSCCLCTDigi &secondCLCT, const GEMInternalClusters &clusters, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2) const
 
void correlateLCTsGEM (const CSCALCTDigi &bestALCT, const CSCALCTDigi &secondALCT, const GEMInternalClusters &clusters, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2) const
 
void correlateLCTsGEM (const CSCCLCTDigi &bestCLCT, const CSCCLCTDigi &secondCLCT, const GEMInternalClusters &clusters, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2) const
 
void dropLowQualityALCTNoClusters (CSCALCTDigi &alct, const GEMInternalCluster &cluster) const
 
void dropLowQualityCLCTNoClusters (CSCCLCTDigi &clct, const GEMInternalCluster &cluster) const
 
void matchALCT2GEM (bool bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS])
 
void matchALCTCLCTGEM (bool bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS])
 
void matchCLCT2GEM (bool bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS])
 
void sortLCTsByBending (std::vector< CSCCorrelatedLCTDigi > &lcts) const
 

Private Attributes

bool assign_gem_csc_bending_
 
bool build_lct_from_alct_gem_
 
bool build_lct_from_clct_gem_
 
bool build_lct_from_clct_gem_me1a_
 
std::shared_ptr< GEMClusterProcessorclusterProc_
 
std::map< int, GEMInternalClustersclusters_
 
std::unique_ptr< CSCGEMMatchercscGEMMatcher_
 
bool drop_low_quality_alct_no_gems_
 
bool drop_low_quality_clct_no_gems_
 
bool drop_low_quality_clct_no_gems_me1a_
 
bool drop_used_gems_
 
const GEMGeometrygem_g
 
unsigned gemId
 
bool hasGE21Geometry16Partitions_
 
bool match_earliest_gem_only_
 
unsigned max_delta_bx_alct_gem_
 
unsigned max_delta_bx_clct_gem_
 

Additional Inherited Members

- Public Attributes inherited from CSCMotherboard
std::unique_ptr< CSCAnodeLCTProcessoralctProc
 
std::unique_ptr< CSCCathodeLCTProcessorclctProc
 
- Protected Member Functions inherited from CSCMotherboard
void checkConfigParameters ()
 
void constructLCTs (const CSCALCTDigi &aLCT, const CSCCLCTDigi &cLCT, int type, int trknmb, CSCCorrelatedLCTDigi &lct) const
 
void copyValidToInValid (CSCALCTDigi &, CSCALCTDigi &, CSCCLCTDigi &, CSCCLCTDigi &) const
 
void correlateLCTs (const CSCALCTDigi &bestALCT, const CSCALCTDigi &secondALCT, const CSCCLCTDigi &bestCLCT, const CSCCLCTDigi &secondCLCT, CSCCorrelatedLCTDigi &bLCT, CSCCorrelatedLCTDigi &sLCT, int type) const
 
void dumpConfigParams () const
 
void encodeHighMultiplicityBits ()
 
unsigned int encodePattern (const int clctPattern) const
 
CSCALCTDigi getBXShiftedALCT (const CSCALCTDigi &) const
 
CSCCLCTDigi getBXShiftedCLCT (const CSCCLCTDigi &) const
 
- Protected Member Functions inherited from CSCBaseboard
void checkConfigParameters (unsigned int &var, const unsigned int var_max, const unsigned int var_def, const std::string &var_str)
 
- Protected Attributes inherited from CSCMotherboard
unsigned int alct_trig_enable
 
std::vector< CSCALCTDigialctV
 
LCTContainer allLCTs_
 
unsigned int clct_trig_enable
 
std::vector< CSCCLCTDigiclctV
 
std::unique_ptr< CSCALCTCrossCLCTcscOverlap_
 
bool drop_used_clcts
 
int early_tbins
 
std::vector< CSCCorrelatedLCTDigilctV
 
bool match_earliest_clct_only_
 
unsigned int match_trig_enable
 
unsigned int match_trig_window_size
 
unsigned int mpc_block_me1a
 
std::vector< int > preferred_bx_match_
 
std::unique_ptr< LCTQualityAssignmentqualityAssignment_
 
std::unique_ptr< LCTQualityControlqualityControl_
 
bool readout_earliest_2
 
CSCShowerDigi shower_
 
unsigned showerSource_
 
unsigned int tmb_l1a_window_size
 
- Protected Attributes inherited from CSCBaseboard
edm::ParameterSet alctParams_
 
edm::ParameterSet clctParams_
 
edm::ParameterSet commonParams_
 
const CSCChambercscChamber_
 
const CSCGeometrycscGeometry_
 
CSCDetId cscId_
 
bool disableME1a_
 
bool enableAlctPhase2_
 
bool gangedME1a_
 
int infoV
 
bool isME11_
 
bool isME21_
 
bool isME31_
 
bool isME41_
 
bool runCCLUT_
 
bool runME11ILT_
 
bool runME11Up_
 
bool runME21ILT_
 
bool runME21Up_
 
bool runME31Up_
 
bool runME41Up_
 
bool runPhase2_
 
edm::ParameterSet showerParams_
 
unsigned theChamber
 
std::string theCSCName_
 
const unsigned theEndcap
 
int theRegion
 
unsigned theRing
 
const unsigned theSector
 
const unsigned theStation
 
const unsigned theSubsector
 
const unsigned theTrigChamber
 
edm::ParameterSet tmbParams_
 
- Static Protected Attributes inherited from CSCMotherboard
static const unsigned int def_alct_trig_enable = 0
 
static const unsigned int def_clct_trig_enable = 0
 
static const unsigned int def_match_trig_enable = 1
 
static const unsigned int def_match_trig_window_size = 7
 
static const unsigned int def_mpc_block_me1a = 1
 
static const unsigned int def_tmb_l1a_window_size = 7
 

Detailed Description

Class for TMBs for the GEM-CSC integrated local trigger. Inherits from CSCMotherboard. Provides functionality to match ALCT/CLCT to GEM single clusters or coincidences of clusters

Author
Sven Dildick (Rice University)

Definition at line 21 of file CSCGEMMotherboard.h.

Member Typedef Documentation

◆ GEMInternalClusters

Definition at line 23 of file CSCGEMMotherboard.h.

Constructor & Destructor Documentation

◆ CSCGEMMotherboard()

CSCGEMMotherboard::CSCGEMMotherboard ( unsigned  endcap,
unsigned  station,
unsigned  sector,
unsigned  subsector,
unsigned  chamber,
const edm::ParameterSet conf 
)

Definition at line 4 of file CSCGEMMotherboard.cc.

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_gem_(tmbParams_.getParameter<bool>("buildLCTfromALCTandGEM")),
14  build_lct_from_clct_gem_(tmbParams_.getParameter<bool>("buildLCTfromCLCTandGEM")) {
15  // case for ME1/1
16  if (isME11_) {
17  drop_low_quality_clct_no_gems_me1a_ = tmbParams_.getParameter<bool>("dropLowQualityCLCTsNoGEMs_ME1a");
18  build_lct_from_clct_gem_me1a_ = tmbParams_.getParameter<bool>("buildLCTfromCLCTandGEM_ME1a");
19  }
20 
21  max_delta_bx_alct_gem_ = tmbParams_.getParameter<unsigned>("maxDeltaBXALCTGEM");
22  max_delta_bx_clct_gem_ = tmbParams_.getParameter<unsigned>("maxDeltaBXCLCTGEM");
23 
24  assign_gem_csc_bending_ = tmbParams_.getParameter<bool>("assignGEMCSCBending");
26 
27  drop_used_gems_ = tmbParams_.getParameter<bool>("tmbDropUsedGems");
28  match_earliest_gem_only_ = tmbParams_.getParameter<bool>("matchEarliestGemsOnly");
29 
30  // These LogErrors are sanity checks and should not be printed
31  if (isME11_ and !runME11ILT_) {
32  edm::LogError("CSCGEMMotherboard") << "TMB constructed while runME11ILT_ is not set!";
33  };
34 
35  if (isME21_ and !runME21ILT_) {
36  edm::LogError("CSCGEMMotherboard") << "TMB constructed while runME21ILT_ is not set!";
37  };
38 
39  // super chamber has layer=0!
41 
42  clusterProc_ = std::make_shared<GEMClusterProcessor>(theRegion, theStation, theChamber, conf);
43 
44  cscGEMMatcher_ = std::make_unique<CSCGEMMatcher>(theRegion, theStation, theChamber, tmbParams_, conf);
45 }

References assign_gem_csc_bending_, build_lct_from_clct_gem_me1a_, clusterProc_, cscGEMMatcher_, drop_low_quality_clct_no_gems_me1a_, drop_used_gems_, gemId, edm::ParameterSet::getParameter(), CSCBaseboard::isME11_, CSCBaseboard::isME21_, match_earliest_gem_only_, max_delta_bx_alct_gem_, max_delta_bx_clct_gem_, CSCMotherboard::qualityAssignment_, DetId::rawId(), CSCBaseboard::runME11ILT_, CSCBaseboard::runME21ILT_, CSCBaseboard::theChamber, CSCBaseboard::theRegion, CSCBaseboard::theStation, and CSCBaseboard::tmbParams_.

◆ ~CSCGEMMotherboard()

CSCGEMMotherboard::~CSCGEMMotherboard ( )
override

Definition at line 47 of file CSCGEMMotherboard.cc.

47 {}

Member Function Documentation

◆ clear()

void CSCGEMMotherboard::clear ( void  )

Definition at line 49 of file CSCGEMMotherboard.cc.

49  {
51  clusterProc_->clear();
52 }

References CSCMotherboard::clear(), and clusterProc_.

Referenced by run().

◆ clusterProc()

std::shared_ptr<GEMClusterProcessor> CSCGEMMotherboard::clusterProc ( ) const
inline

Definition at line 52 of file CSCGEMMotherboard.h.

52 { return clusterProc_; }

References clusterProc_.

Referenced by CSCTriggerPrimitivesBuilder::build().

◆ constructLCTsGEM() [1/3]

void CSCGEMMotherboard::constructLCTsGEM ( const CSCALCTDigi alct,
const CSCCLCTDigi clct,
const GEMInternalCluster gem,
CSCCorrelatedLCTDigi lct 
) const
private

Definition at line 465 of file CSCGEMMotherboard.cc.

468  {
469  thisLCT.setValid(true);
470  if (gem.isCoincidence()) {
471  thisLCT.setType(CSCCorrelatedLCTDigi::ALCTCLCT2GEM);
472  } else if (gem.isValid()) {
473  thisLCT.setType(CSCCorrelatedLCTDigi::ALCTCLCTGEM);
474  } else {
475  thisLCT.setType(CSCCorrelatedLCTDigi::ALCTCLCT);
476  }
477  thisLCT.setQuality(qualityAssignment_->findQuality(alct, clct, gem));
478  thisLCT.setALCT(getBXShiftedALCT(alct));
479  thisLCT.setCLCT(getBXShiftedCLCT(clct));
480  // set pads if there are any
481  thisLCT.setGEM1(gem.mid1());
482  thisLCT.setGEM2(gem.mid2());
483  thisLCT.setPattern(encodePattern(clct.getPattern()));
484  thisLCT.setMPCLink(0);
485  thisLCT.setBX0(0);
486  thisLCT.setSyncErr(0);
487  thisLCT.setCSCID(theTrigChamber);
488  // track number to be set later in final sorting stage
489  thisLCT.setTrknmb(0);
490  thisLCT.setWireGroup(alct.getKeyWG());
491  thisLCT.setStrip(clct.getKeyStrip());
492  thisLCT.setBend(clct.getBend());
493  thisLCT.setBX(alct.getBX());
494  if (runCCLUT_) {
495  thisLCT.setRun3(true);
497  thisLCT.setSlope(cscGEMMatcher_->calculateGEMCSCBending(clct, gem));
498  else
499  thisLCT.setSlope(clct.getSlope());
500  thisLCT.setQuartStripBit(clct.getQuartStripBit());
501  thisLCT.setEighthStripBit(clct.getEighthStripBit());
502  thisLCT.setRun3Pattern(clct.getRun3Pattern());
503  }
504 }

References CSCCorrelatedLCTDigi::ALCTCLCT, CSCCorrelatedLCTDigi::ALCTCLCT2GEM, CSCCorrelatedLCTDigi::ALCTCLCTGEM, assign_gem_csc_bending_, cscGEMMatcher_, CSCMotherboard::encodePattern(), CSCCLCTDigi::getBend(), CSCALCTDigi::getBX(), CSCMotherboard::getBXShiftedALCT(), CSCMotherboard::getBXShiftedCLCT(), CSCCLCTDigi::getEighthStripBit(), CSCCLCTDigi::getKeyStrip(), CSCALCTDigi::getKeyWG(), CSCCLCTDigi::getPattern(), CSCCLCTDigi::getQuartStripBit(), CSCCLCTDigi::getRun3Pattern(), CSCCLCTDigi::getSlope(), CSCMotherboard::qualityAssignment_, CSCBaseboard::runCCLUT_, CSCCorrelatedLCTDigi::setALCT(), CSCCorrelatedLCTDigi::setBend(), CSCCorrelatedLCTDigi::setBX(), CSCCorrelatedLCTDigi::setBX0(), CSCCorrelatedLCTDigi::setCLCT(), CSCCorrelatedLCTDigi::setCSCID(), CSCCorrelatedLCTDigi::setEighthStripBit(), CSCCorrelatedLCTDigi::setGEM1(), CSCCorrelatedLCTDigi::setGEM2(), CSCCorrelatedLCTDigi::setMPCLink(), CSCCorrelatedLCTDigi::setPattern(), CSCCorrelatedLCTDigi::setQuality(), CSCCorrelatedLCTDigi::setQuartStripBit(), CSCCorrelatedLCTDigi::setRun3(), CSCCorrelatedLCTDigi::setRun3Pattern(), CSCCorrelatedLCTDigi::setSlope(), CSCCorrelatedLCTDigi::setStrip(), CSCCorrelatedLCTDigi::setSyncErr(), CSCCorrelatedLCTDigi::setTrknmb(), CSCCorrelatedLCTDigi::setType(), CSCCorrelatedLCTDigi::setValid(), CSCCorrelatedLCTDigi::setWireGroup(), and CSCBaseboard::theTrigChamber.

Referenced by correlateLCTsGEM().

◆ constructLCTsGEM() [2/3]

void CSCGEMMotherboard::constructLCTsGEM ( const CSCALCTDigi alct,
const GEMInternalCluster gem,
int  trackNumber,
CSCCorrelatedLCTDigi lct 
) const
private

Definition at line 540 of file CSCGEMMotherboard.cc.

543  {
544  thisLCT.setValid(true);
545  thisLCT.setType(CSCCorrelatedLCTDigi::ALCT2GEM);
546  thisLCT.setQuality(qualityAssignment_->findQuality(alct, gem));
547  thisLCT.setALCT(getBXShiftedALCT(alct));
548  thisLCT.setGEM1(gem.mid1());
549  thisLCT.setGEM2(gem.mid2());
550  thisLCT.setPattern(10);
551  thisLCT.setMPCLink(0);
552  thisLCT.setBX0(0);
553  thisLCT.setSyncErr(0);
554  thisLCT.setCSCID(theTrigChamber);
555  thisLCT.setTrknmb(trackNumber);
556  thisLCT.setWireGroup(alct.getKeyWG());
557  thisLCT.setStrip(gem.getKeyStrip());
558  thisLCT.setBend(0);
559  thisLCT.setBX(alct.getBX());
560  if (runCCLUT_) {
561  thisLCT.setRun3(true);
562  thisLCT.setSlope(0);
563  thisLCT.setQuartStripBit(false);
564  thisLCT.setEighthStripBit(false);
565  // ALCT-2GEM type LCTs do not bend in the chamber
566  thisLCT.setRun3Pattern(4);
567  }
568 }

References CSCCorrelatedLCTDigi::ALCT2GEM, CSCALCTDigi::getBX(), CSCMotherboard::getBXShiftedALCT(), CSCALCTDigi::getKeyWG(), CSCMotherboard::qualityAssignment_, CSCBaseboard::runCCLUT_, CSCCorrelatedLCTDigi::setALCT(), CSCCorrelatedLCTDigi::setBend(), CSCCorrelatedLCTDigi::setBX(), CSCCorrelatedLCTDigi::setBX0(), CSCCorrelatedLCTDigi::setCSCID(), CSCCorrelatedLCTDigi::setEighthStripBit(), CSCCorrelatedLCTDigi::setGEM1(), CSCCorrelatedLCTDigi::setGEM2(), CSCCorrelatedLCTDigi::setMPCLink(), CSCCorrelatedLCTDigi::setPattern(), CSCCorrelatedLCTDigi::setQuality(), CSCCorrelatedLCTDigi::setQuartStripBit(), CSCCorrelatedLCTDigi::setRun3(), CSCCorrelatedLCTDigi::setRun3Pattern(), CSCCorrelatedLCTDigi::setSlope(), CSCCorrelatedLCTDigi::setStrip(), CSCCorrelatedLCTDigi::setSyncErr(), CSCCorrelatedLCTDigi::setTrknmb(), CSCCorrelatedLCTDigi::setType(), CSCCorrelatedLCTDigi::setValid(), CSCCorrelatedLCTDigi::setWireGroup(), and CSCBaseboard::theTrigChamber.

◆ constructLCTsGEM() [3/3]

void CSCGEMMotherboard::constructLCTsGEM ( const CSCCLCTDigi clct,
const GEMInternalCluster gem,
int  trackNumber,
CSCCorrelatedLCTDigi lct 
) const
private

Definition at line 507 of file CSCGEMMotherboard.cc.

510  {
511  thisLCT.setValid(true);
512  thisLCT.setType(CSCCorrelatedLCTDigi::CLCT2GEM);
513  thisLCT.setQuality(qualityAssignment_->findQuality(clct, gem));
514  thisLCT.setCLCT(getBXShiftedCLCT(clct));
515  thisLCT.setGEM1(gem.mid1());
516  thisLCT.setGEM2(gem.mid2());
517  thisLCT.setPattern(encodePattern(clct.getPattern()));
518  thisLCT.setMPCLink(0);
519  thisLCT.setBX0(0);
520  thisLCT.setSyncErr(0);
521  thisLCT.setCSCID(theTrigChamber);
522  thisLCT.setTrknmb(trackNumber);
523  thisLCT.setWireGroup(gem.getKeyWG());
524  thisLCT.setStrip(clct.getKeyStrip());
525  thisLCT.setBend(clct.getBend());
526  thisLCT.setBX(gem.bx());
527  if (runCCLUT_) {
528  thisLCT.setRun3(true);
530  thisLCT.setSlope(cscGEMMatcher_->calculateGEMCSCBending(clct, gem));
531  else
532  thisLCT.setSlope(clct.getSlope());
533  thisLCT.setQuartStripBit(clct.getQuartStripBit());
534  thisLCT.setEighthStripBit(clct.getEighthStripBit());
535  thisLCT.setRun3Pattern(clct.getRun3Pattern());
536  }
537 }

References assign_gem_csc_bending_, CSCCorrelatedLCTDigi::CLCT2GEM, cscGEMMatcher_, CSCMotherboard::encodePattern(), CSCCLCTDigi::getBend(), CSCMotherboard::getBXShiftedCLCT(), CSCCLCTDigi::getEighthStripBit(), CSCCLCTDigi::getKeyStrip(), CSCCLCTDigi::getPattern(), CSCCLCTDigi::getQuartStripBit(), CSCCLCTDigi::getRun3Pattern(), CSCCLCTDigi::getSlope(), CSCMotherboard::qualityAssignment_, CSCBaseboard::runCCLUT_, CSCCorrelatedLCTDigi::setBend(), CSCCorrelatedLCTDigi::setBX(), CSCCorrelatedLCTDigi::setBX0(), CSCCorrelatedLCTDigi::setCLCT(), CSCCorrelatedLCTDigi::setCSCID(), CSCCorrelatedLCTDigi::setEighthStripBit(), CSCCorrelatedLCTDigi::setGEM1(), CSCCorrelatedLCTDigi::setGEM2(), CSCCorrelatedLCTDigi::setMPCLink(), CSCCorrelatedLCTDigi::setPattern(), CSCCorrelatedLCTDigi::setQuality(), CSCCorrelatedLCTDigi::setQuartStripBit(), CSCCorrelatedLCTDigi::setRun3(), CSCCorrelatedLCTDigi::setRun3Pattern(), CSCCorrelatedLCTDigi::setSlope(), CSCCorrelatedLCTDigi::setStrip(), CSCCorrelatedLCTDigi::setSyncErr(), CSCCorrelatedLCTDigi::setTrknmb(), CSCCorrelatedLCTDigi::setType(), CSCCorrelatedLCTDigi::setValid(), CSCCorrelatedLCTDigi::setWireGroup(), and CSCBaseboard::theTrigChamber.

◆ correlateLCTsGEM() [1/3]

void CSCGEMMotherboard::correlateLCTsGEM ( const CSCALCTDigi bestALCT,
const CSCALCTDigi secondALCT,
const CSCCLCTDigi bestCLCT,
const CSCCLCTDigi secondCLCT,
const GEMInternalClusters clusters,
CSCCorrelatedLCTDigi lct1,
CSCCorrelatedLCTDigi lct2 
) const
private

Definition at line 273 of file CSCGEMMotherboard.cc.

279  {
281  // This is an 8-eta partition GE2/1 geometry for which the GE2/1-ME2/1 integrated
282  // local trigger is not configured. Matching only ALCTs with CLCTs in ME2/1.
283 
284  // do regular ALCT-CLCT correlation
285  CSCMotherboard::correlateLCTs(bALCT, sALCT, bCLCT, sCLCT, lct1, lct2, CSCCorrelatedLCTDigi::ALCTCLCT);
286  } else {
287  // temporary container
288  std::vector<CSCCorrelatedLCTDigi> lcts;
289 
290  CSCALCTDigi bestALCT = bALCT;
291  CSCALCTDigi secondALCT = sALCT;
292  CSCCLCTDigi bestCLCT = bCLCT;
293  CSCCLCTDigi secondCLCT = sCLCT;
294 
295  if (!bestALCT.isValid()) {
296  edm::LogError("CSCGEMMotherboard") << "Best ALCT invalid in correlateLCTsGEM!";
297  return;
298  }
299 
300  if (!bestCLCT.isValid()) {
301  edm::LogError("CSCGEMMotherboard") << "Best CLCT invalid in correlateLCTsGEM!";
302  return;
303  }
304 
305  // case where there no valid clusters
306  if (clusters.empty()) {
307  // drop the low-quality ALCTs and CLCTs
312 
313  // do regular ALCT-CLCT correlation
314  CSCMotherboard::correlateLCTs(bALCT, sALCT, bCLCT, sCLCT, lct1, lct2, CSCCorrelatedLCTDigi::ALCTCLCT);
315  }
316  // case with at least one valid cluster
317  else {
318  // before matching ALCT-CLCT pairs with clusters, we check if we need
319  // to drop particular low quality ALCTs or CLCTs without matching clusters
320  // drop low quality CLCTs if no clusters and flags are set
321  GEMInternalCluster bestALCTCluster, secondALCTCluster;
322  GEMInternalCluster bestCLCTCluster, secondCLCTCluster;
323  cscGEMMatcher_->bestClusterBXLoc(bestALCT, clusters, bestALCTCluster);
324  cscGEMMatcher_->bestClusterBXLoc(secondALCT, clusters, secondALCTCluster);
325  cscGEMMatcher_->bestClusterBXLoc(bestCLCT, clusters, bestCLCTCluster);
326  cscGEMMatcher_->bestClusterBXLoc(secondCLCT, clusters, secondCLCTCluster);
327 
328  dropLowQualityALCTNoClusters(bestALCT, bestALCTCluster);
329  dropLowQualityALCTNoClusters(secondALCT, secondALCTCluster);
330  dropLowQualityCLCTNoClusters(bestCLCT, bestCLCTCluster);
331  dropLowQualityCLCTNoClusters(secondCLCT, secondCLCTCluster);
332 
333  // check which ALCTs and CLCTs are valid after dropping the low-quality ones
334  copyValidToInValid(bestALCT, secondALCT, bestCLCT, secondCLCT);
335 
336  // We can now check possible triplets and construct all LCTs with
337  // valid ALCT, valid CLCTs and coincidence clusters
338  GEMInternalCluster bbCluster, bsCluster, sbCluster, ssCluster;
339  cscGEMMatcher_->bestClusterBXLoc(bestALCT, bestCLCT, clusters, bbCluster);
340  cscGEMMatcher_->bestClusterBXLoc(bestALCT, secondCLCT, clusters, bsCluster);
341  cscGEMMatcher_->bestClusterBXLoc(secondALCT, bestCLCT, clusters, sbCluster);
342  cscGEMMatcher_->bestClusterBXLoc(secondALCT, secondCLCT, clusters, ssCluster);
343 
344  // At this point it is still possible that certain pairs with high-quality
345  // ALCTs and CLCTs do not have matching clusters. In that case we construct
346  // a regular ALCT-CLCT type LCT. For instance, it could be that two muons went
347  // through the chamber, produced 2 ALCTs, 2 CLCTs, but only 1 GEM cluster - because
348  // GEM cluster efficiency is not 100% (closer to 95%). So we don't require
349  // all clusters to be valid. If they are valid, the LCTs is constructed accordingly.
350  // But we do require that the ALCT and CLCT are valid for each pair.
351  CSCCorrelatedLCTDigi lctbb, lctbs, lctsb, lctss;
352  if (bestALCT.isValid() and bestCLCT.isValid()) {
353  constructLCTsGEM(bestALCT, bestCLCT, bbCluster, lctbb);
354  lcts.push_back(lctbb);
355  }
356  if (bestALCT.isValid() and secondCLCT.isValid() and (secondCLCT != bestCLCT)) {
357  constructLCTsGEM(bestALCT, secondCLCT, bsCluster, lctbs);
358  lcts.push_back(lctbs);
359  }
360  if (bestCLCT.isValid() and secondALCT.isValid() and (secondALCT != bestALCT)) {
361  constructLCTsGEM(secondALCT, bestCLCT, sbCluster, lctsb);
362  lcts.push_back(lctsb);
363  }
364  if (secondALCT.isValid() and secondCLCT.isValid() and (secondALCT != bestALCT) and (secondCLCT != bestCLCT)) {
365  constructLCTsGEM(secondALCT, secondCLCT, ssCluster, lctss);
366  lcts.push_back(lctss);
367  }
368 
369  // no LCTs
370  if (lcts.empty())
371  return;
372 
373  // sort by bending angle
374  sortLCTsByBending(lcts);
375 
376  // retain best two
377  lcts.resize(CSCConstants::MAX_LCTS_PER_CSC);
378 
379  // assign and set the track number
380  if (lcts[0].isValid()) {
381  lct1 = lcts[0];
382  lct1.setTrknmb(1);
383  }
384 
385  if (lcts[1].isValid()) {
386  lct2 = lcts[1];
387  lct2.setTrknmb(2);
388  }
389  }
390  }
391 }

References CSCCorrelatedLCTDigi::ALCTCLCT, bsc_activity_cfg::clusters, constructLCTsGEM(), CSCMotherboard::copyValidToInValid(), CSCMotherboard::correlateLCTs(), cscGEMMatcher_, dropLowQualityALCTNoClusters(), dropLowQualityCLCTNoClusters(), hasGE21Geometry16Partitions_, CSCBaseboard::isME21_, CSCALCTDigi::isValid(), sistrip::SpyUtilities::isValid(), CSCCLCTDigi::isValid(), CSCConstants::MAX_LCTS_PER_CSC, CSCCorrelatedLCTDigi::setTrknmb(), and sortLCTsByBending().

Referenced by matchALCT2GEM(), matchALCTCLCTGEM(), and matchCLCT2GEM().

◆ correlateLCTsGEM() [2/3]

void CSCGEMMotherboard::correlateLCTsGEM ( const CSCALCTDigi bestALCT,
const CSCALCTDigi secondALCT,
const GEMInternalClusters clusters,
CSCCorrelatedLCTDigi lct1,
CSCCorrelatedLCTDigi lct2 
) const
private

Definition at line 429 of file CSCGEMMotherboard.cc.

433  {
434  CSCALCTDigi bestALCT = bALCT;
435  CSCALCTDigi secondALCT = sALCT;
436 
437  if (!bestALCT.isValid()) {
438  edm::LogError("CSCGEMMotherboard") << "Best ALCT invalid in correlateLCTsGEM!";
439  return;
440  }
441 
442  // if the second best ALCT equals the best ALCT, clear it
443  if (secondALCT == bestALCT)
444  secondALCT.clear();
445 
446  // get the best matching cluster
447  GEMInternalCluster bestCluster;
448  GEMInternalCluster secondCluster;
449  cscGEMMatcher_->bestClusterBXLoc(bestALCT, clusters, bestCluster);
450  cscGEMMatcher_->bestClusterBXLoc(secondALCT, clusters, secondCluster);
451 
452  // drop low quality ALCTs if no clusters and flags are set
453  dropLowQualityALCTNoClusters(bestALCT, bestCluster);
454  dropLowQualityALCTNoClusters(secondALCT, secondCluster);
455 
456  // construct all LCTs with valid ALCTs and coincidence clusters
457  if (bestALCT.isValid() and bestCluster.isCoincidence()) {
458  constructLCTsGEM(bestALCT, bestCluster, 1, lct1);
459  }
460  if (secondALCT.isValid() and secondCluster.isCoincidence()) {
461  constructLCTsGEM(secondALCT, secondCluster, 2, lct2);
462  }
463 }

References CSCALCTDigi::clear(), bsc_activity_cfg::clusters, constructLCTsGEM(), cscGEMMatcher_, dropLowQualityALCTNoClusters(), GEMInternalCluster::isCoincidence(), and CSCALCTDigi::isValid().

◆ correlateLCTsGEM() [3/3]

void CSCGEMMotherboard::correlateLCTsGEM ( const CSCCLCTDigi bestCLCT,
const CSCCLCTDigi secondCLCT,
const GEMInternalClusters clusters,
CSCCorrelatedLCTDigi lct1,
CSCCorrelatedLCTDigi lct2 
) const
private

Definition at line 393 of file CSCGEMMotherboard.cc.

397  {
398  CSCCLCTDigi bestCLCT = bCLCT;
399  CSCCLCTDigi secondCLCT = sCLCT;
400 
401  if (!bestCLCT.isValid()) {
402  edm::LogError("CSCGEMMotherboard") << "Best CLCT invalid in correlateLCTsGEM!";
403  return;
404  }
405 
406  // if the second best CLCT equals the best CLCT, clear it
407  if (secondCLCT == bestCLCT)
408  secondCLCT.clear();
409 
410  // get the best matching cluster
411  GEMInternalCluster bestCluster;
412  GEMInternalCluster secondCluster;
413  cscGEMMatcher_->bestClusterBXLoc(bestCLCT, clusters, bestCluster);
414  cscGEMMatcher_->bestClusterBXLoc(secondCLCT, clusters, secondCluster);
415 
416  // drop low quality CLCTs if no clusters and flags are set
417  dropLowQualityCLCTNoClusters(bestCLCT, bestCluster);
418  dropLowQualityCLCTNoClusters(secondCLCT, secondCluster);
419 
420  // construct all LCTs with valid CLCTs and coincidence clusters
421  if (bestCLCT.isValid() and bestCluster.isCoincidence()) {
422  constructLCTsGEM(bestCLCT, bestCluster, 1, lct1);
423  }
424  if (secondCLCT.isValid() and secondCluster.isCoincidence()) {
425  constructLCTsGEM(secondCLCT, secondCluster, 2, lct2);
426  }
427 }

References CSCCLCTDigi::clear(), bsc_activity_cfg::clusters, constructLCTsGEM(), cscGEMMatcher_, dropLowQualityCLCTNoClusters(), GEMInternalCluster::isCoincidence(), and CSCCLCTDigi::isValid().

◆ dropLowQualityALCTNoClusters()

void CSCGEMMotherboard::dropLowQualityALCTNoClusters ( CSCALCTDigi alct,
const GEMInternalCluster cluster 
) const
private

Definition at line 570 of file CSCGEMMotherboard.cc.

570  {
571  // clear alct if they are of low quality without matching GEM clusters
572  if (alct.getQuality() == 0 and !cluster.isValid() and drop_low_quality_alct_no_gems_)
573  alct.clear();
574 }

References CSCALCTDigi::clear(), drop_low_quality_alct_no_gems_, CSCALCTDigi::getQuality(), and GEMInternalCluster::isValid().

Referenced by correlateLCTsGEM().

◆ dropLowQualityCLCTNoClusters()

void CSCGEMMotherboard::dropLowQualityCLCTNoClusters ( CSCCLCTDigi clct,
const GEMInternalCluster cluster 
) const
private

Definition at line 576 of file CSCGEMMotherboard.cc.

576  {
577  // Here, we need to check which could be an ME1/a LCT
578  bool dropLQCLCTNoGEMs = drop_low_quality_clct_no_gems_;
580  dropLQCLCTNoGEMs = drop_low_quality_clct_no_gems_me1a_;
581 
582  // clear clct if they are of low quality without matching GEM clusters
583  if (clct.getQuality() <= 3 and !cluster.isValid() and dropLQCLCTNoGEMs)
584  clct.clear();
585 }

References CSCCLCTDigi::clear(), drop_low_quality_clct_no_gems_, drop_low_quality_clct_no_gems_me1a_, CSCCLCTDigi::getKeyStrip(), CSCCLCTDigi::getQuality(), CSCBaseboard::isME11_, GEMInternalCluster::isValid(), and CSCConstants::MAX_HALF_STRIP_ME1B.

Referenced by correlateLCTsGEM().

◆ matchALCT2GEM()

void CSCGEMMotherboard::matchALCT2GEM ( bool  bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS])
private

Definition at line 222 of file CSCGEMMotherboard.cc.

222  {
223  // no matching is done for GE2/1 geometries with 8 eta partitions
225  return;
226 
227  // clear the array to mask GEMs this window is quite wide.
228  // We don't expect GEM coincidence clusters to show up too far
229  // from the central BX (8)
230  bool used_gem_mask[CSCConstants::MAX_ALCT_TBINS] = {false};
231 
232  for (int bx_alct = 0; bx_alct < CSCConstants::MAX_ALCT_TBINS; bx_alct++) {
233  // do not consider LCT building in this BX if the mask was set
234  if (bunch_crossing_mask[bx_alct])
235  continue;
236 
237  if (alctProc->getBestALCT(bx_alct).isValid()) {
238  for (unsigned mbx = 0; mbx < 2 * max_delta_bx_alct_gem_ + 1; mbx++) {
239  // evaluate the preffered GEM BX
240  int bx_gem = bx_alct + preferred_bx_match_[mbx];
241 
242  if (bx_gem < 0 or bx_gem >= CSCConstants::MAX_ALCT_TBINS)
243  continue;
244  // drop GEMs in this BX if one of them was previously matched to an ALCT
245  if (drop_used_gems_ and used_gem_mask[bx_gem])
246  continue;
247  // check for at least one valid GEM cluster
248  if (!clusterProc_->getCoincidenceClusters(bx_gem).empty()) {
249  // now correlate the ALCT and GEM into LCT.
250  // smaller mbx means more preferred!
251  correlateLCTsGEM(alctProc->getBestALCT(bx_alct),
252  alctProc->getSecondALCT(bx_alct),
253  clusterProc_->getCoincidenceClusters(bx_gem),
254  allLCTs_(bx_alct, mbx, 0),
255  allLCTs_(bx_alct, mbx, 1));
256 
257  if (allLCTs_(bx_alct, mbx, 0).isValid()) {
258  // do not consider GEM clusters
259  used_gem_mask[bx_gem] = true;
260  // mask this bunch crossing for future consideration
261  bunch_crossing_mask[bx_alct] = true;
262  // if we only consider the first valid GEM coincidence clusters,
263  // we move on to the next ALCT immediately
265  break;
266  }
267  }
268  }
269  }
270  }
271 }

References CSCMotherboard::alctProc, CSCMotherboard::allLCTs_, clusterProc_, correlateLCTsGEM(), drop_used_gems_, hasGE21Geometry16Partitions_, CSCBaseboard::isME21_, match_earliest_gem_only_, CSCConstants::MAX_ALCT_TBINS, max_delta_bx_alct_gem_, and CSCMotherboard::preferred_bx_match_.

Referenced by run().

◆ matchALCTCLCTGEM()

void CSCGEMMotherboard::matchALCTCLCTGEM ( bool  bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS])
private

Definition at line 117 of file CSCGEMMotherboard.cc.

117  {
118  // array to mask CLCTs
119  bool used_clct_mask[CSCConstants::MAX_CLCT_TBINS] = {false};
120 
121  for (int bx_alct = 0; bx_alct < CSCConstants::MAX_ALCT_TBINS; bx_alct++) {
122  // do not consider invalid ALCTs
123  if (alctProc->getBestALCT(bx_alct).isValid()) {
124  for (unsigned mbx = 0; mbx < match_trig_window_size; mbx++) {
125  // evaluate the preffered CLCT BX, taking into account that there is an offset in the simulation
126  unsigned bx_clct = bx_alct + preferred_bx_match_[mbx] - CSCConstants::ALCT_CLCT_OFFSET;
127 
128  // CLCT BX must be in the time window
129  if (bx_clct >= CSCConstants::MAX_CLCT_TBINS)
130  continue;
131  // drop this CLCT if it was previously matched to an ALCT
132  if (drop_used_clcts and used_clct_mask[bx_clct])
133  continue;
134  // do not consider invalid CLCTs
135  if (clctProc->getBestCLCT(bx_clct).isValid()) {
136  LogTrace("CSCMotherboard") << "Successful ALCT-CLCT match: bx_alct = " << bx_alct << "; bx_clct = " << bx_clct
137  << "; mbx = " << mbx;
138 
139  // now correlate the ALCT and CLCT into LCT.
140  // smaller mbx means more preferred!
141  correlateLCTsGEM(alctProc->getBestALCT(bx_alct),
142  alctProc->getSecondALCT(bx_alct),
143  clctProc->getBestCLCT(bx_clct),
144  clctProc->getSecondCLCT(bx_clct),
145  clusterProc_->getClusters(bx_alct, max_delta_bx_alct_gem_),
146  allLCTs_(bx_alct, mbx, 0),
147  allLCTs_(bx_alct, mbx, 1));
148 
149  if (allLCTs_(bx_alct, mbx, 0).isValid()) {
150  // mask this CLCT as used. If a flag is set, the CLCT may or may not be reused
151  used_clct_mask[bx_clct] = true;
152  // mask this bunch crossing for future considation
153  bunch_crossing_mask[bx_alct] = true;
154  // if we only consider the first valid CLCT, we move on to the next ALCT immediately
156  break;
157  }
158  }
159  }
160  }
161  }
162 }

References CSCConstants::ALCT_CLCT_OFFSET, CSCMotherboard::alctProc, CSCMotherboard::allLCTs_, CSCMotherboard::clctProc, clusterProc_, correlateLCTsGEM(), CSCMotherboard::drop_used_clcts, LogTrace, CSCMotherboard::match_earliest_clct_only_, CSCMotherboard::match_trig_window_size, CSCConstants::MAX_ALCT_TBINS, CSCConstants::MAX_CLCT_TBINS, max_delta_bx_alct_gem_, and CSCMotherboard::preferred_bx_match_.

Referenced by run().

◆ matchCLCT2GEM()

void CSCGEMMotherboard::matchCLCT2GEM ( bool  bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS])
private

Definition at line 164 of file CSCGEMMotherboard.cc.

164  {
165  // no matching is done for GE2/1 geometries with 8 eta partitions
167  return;
168 
169  // array to mask CLCTs
170  bool used_clct_mask[CSCConstants::MAX_CLCT_TBINS] = {false};
171 
172  for (int bx_gem = 0; bx_gem < CSCConstants::MAX_ALCT_TBINS; bx_gem++) {
173  // do not consider LCT building in this BX if the mask was set
174  if (bunch_crossing_mask[bx_gem])
175  continue;
176 
177  // Check that there is at least one valid GEM coincidence cluster in this BX
178  if (!clusterProc_->getCoincidenceClusters(bx_gem).empty()) {
179  // GEM clusters will have central BX 8. So do ALCTs. But! CLCTs still have central BX 7
180  // therefore we need to make a correction. The correction is thus the same as for ALCT-CLCT
181  for (unsigned mbx = 0; mbx < 2 * max_delta_bx_clct_gem_ + 1; mbx++) {
182  // evaluate the preffered CLCT BX, taking into account that there is an offset in the simulation
183  int bx_clct = bx_gem + preferred_bx_match_[mbx] - CSCConstants::ALCT_CLCT_OFFSET;
184 
185  // CLCT BX must be in the time window
186  if (bx_clct < 0 or bx_clct >= CSCConstants::MAX_CLCT_TBINS)
187  continue;
188  // drop this CLCT if it was previously matched to a GEM coincidence cluster
189  if (drop_used_clcts and used_clct_mask[bx_clct])
190  continue;
191  // do not consider invalid CLCTs
192  if (clctProc->getBestCLCT(bx_clct).isValid()) {
193  // if this is an ME1/a CLCT, you could consider not building this LCT
195  clctProc->getBestCLCT(bx_clct).getKeyStrip() > CSCConstants::MAX_HALF_STRIP_ME1B)
196  continue;
197  // mbx is a relative time difference, which is used later in the
198  // cross-bunching sorting algorithm to determine the preferred LCTs
199  // to be sent to the MPC
200  correlateLCTsGEM(clctProc->getBestCLCT(bx_clct),
201  clctProc->getSecondCLCT(bx_clct),
202  clusterProc_->getCoincidenceClusters(bx_gem),
203  allLCTs_(bx_gem, mbx, 0),
204  allLCTs_(bx_gem, mbx, 1));
205 
206  if (allLCTs_(bx_gem, mbx, 0).isValid()) {
207  // do not consider GEM clusters
208  used_clct_mask[bx_clct] = true;
209  // mask this bunch crossing for future consideration
210  bunch_crossing_mask[bx_gem] = true;
211  // if we only consider the first valid GEM coincidence clusters,
212  // we move on to the next ALCT immediately
214  break;
215  }
216  }
217  }
218  }
219  }
220 }

References CSCConstants::ALCT_CLCT_OFFSET, CSCMotherboard::allLCTs_, build_lct_from_clct_gem_me1a_, CSCMotherboard::clctProc, clusterProc_, correlateLCTsGEM(), CSCMotherboard::drop_used_clcts, hasGE21Geometry16Partitions_, CSCBaseboard::isME11_, CSCBaseboard::isME21_, CSCMotherboard::match_earliest_clct_only_, CSCConstants::MAX_ALCT_TBINS, CSCConstants::MAX_CLCT_TBINS, max_delta_bx_clct_gem_, CSCConstants::MAX_HALF_STRIP_ME1B, and CSCMotherboard::preferred_bx_match_.

Referenced by run().

◆ run()

void CSCGEMMotherboard::run ( const CSCWireDigiCollection wiredc,
const CSCComparatorDigiCollection compdc,
const GEMPadDigiClusterCollection gemPads 
)

Definition at line 54 of file CSCGEMMotherboard.cc.

56  {
57  // Step 1: Setup
58  clear();
59 
60  // check for GEM geometry
61  if (gem_g == nullptr) {
62  edm::LogError("CSCGEMMotherboard") << "run() called for GEM-CSC integrated trigger without valid GEM geometry! \n";
63  return;
64  }
65 
66  // Check that the processors can deliver data
67  if (!(alctProc and clctProc)) {
68  edm::LogError("CSCGEMMotherboard") << "run() called for non-existing ALCT/CLCT processor! \n";
69  return;
70  }
71 
72  alctProc->setCSCGeometry(cscGeometry_);
73  clctProc->setCSCGeometry(cscGeometry_);
74 
75  // Step 2: Run the processors
76  const std::vector<CSCALCTDigi>& alctV = alctProc->run(wiredc); // run anodeLCT
77  const std::vector<CSCCLCTDigi>& clctV = clctProc->run(compdc); // run cathodeLCT
78 
79  // Step 2b: encode high multiplicity bits (independent of LCT construction)
81 
82  // if there are no ALCTs and no CLCTs, do not run the ALCT-CLCT correlation
83  if (alctV.empty() and clctV.empty())
84  return;
85 
86  // Step 3: run the GEM cluster processor to get the internal clusters
87  clusterProc_->run(gemClusters);
88  hasGE21Geometry16Partitions_ = clusterProc_->hasGE21Geometry16Partitions();
89 
90  /*
91  Mask for bunch crossings were LCTs were previously found
92  If LCTs were found in BXi for ALCT-CLCT-2GEM, ALCT-CLCT-1GEM
93  or ALCT-CLCT matches, we do not consider BXi in the future. This is
94  because we consider ALCT-CLCT-2GEM, ALCT-CLCT-1GEM, ALCT-CLCT of
95  higher quality than CLCT-2GEM and ALCT-2GEM LCTs. The mask is passsed
96  from one function to the next.
97  */
98  bool bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS] = {false};
99 
100  // Step 4: ALCT-centric matching
101  matchALCTCLCTGEM(bunch_crossing_mask);
102 
103  // Step 5: CLCT-2GEM matching for BX's that were not previously masked
105  matchCLCT2GEM(bunch_crossing_mask);
106  }
107 
108  // Step 6: ALCT-2GEM matching for BX's that were not previously masked
110  matchALCT2GEM(bunch_crossing_mask);
111  }
112 
113  // Step 7: Select at most 2 LCTs per BX
114  selectLCTs();
115 }

References CSCMotherboard::alctProc, CSCMotherboard::alctV, build_lct_from_alct_gem_, build_lct_from_clct_gem_, CSCMotherboard::clctProc, CSCMotherboard::clctV, clear(), clusterProc_, CSCBaseboard::cscGeometry_, CSCMotherboard::encodeHighMultiplicityBits(), gem_g, hasGE21Geometry16Partitions_, matchALCT2GEM(), matchALCTCLCTGEM(), matchCLCT2GEM(), CSCConstants::MAX_ALCT_TBINS, and CSCMotherboard::selectLCTs().

Referenced by CSCTriggerPrimitivesBuilder::build().

◆ setGEMGeometry()

void CSCGEMMotherboard::setGEMGeometry ( const GEMGeometry g)
inline

Definition at line 55 of file CSCGEMMotherboard.h.

55 { gem_g = g; }

References g, and gem_g.

Referenced by CSCTriggerPrimitivesBuilder::build().

◆ sortLCTsByBending()

void CSCGEMMotherboard::sortLCTsByBending ( std::vector< CSCCorrelatedLCTDigi > &  lcts) const
private

Definition at line 587 of file CSCGEMMotherboard.cc.

587  {
588  /*
589  For Run-2 GEM-CSC trigger primitives, which we temporarily have
590  to integrate with the Run-2 EMTF during LS2, we sort by quality.
591  Larger quality means smaller bending
592  */
593  if (!runCCLUT_) {
594  std::sort(lcts.begin(), lcts.end(), [](const CSCCorrelatedLCTDigi& lct1, const CSCCorrelatedLCTDigi& lct2) -> bool {
595  return lct1.getQuality() > lct2.getQuality();
596  });
597  }
598 
599  /*
600  For Run-3 GEM-CSC trigger primitives, which we have
601  to integrate with the Run-3 EMTF, we sort by slope.
602  Smaller slope means smaller bending
603  */
604  else {
605  std::sort(lcts.begin(), lcts.end(), [](const CSCCorrelatedLCTDigi& lct1, const CSCCorrelatedLCTDigi& lct2) -> bool {
606  return lct1.getSlope() < lct2.getSlope();
607  });
608  }
609 }

References CSCCorrelatedLCTDigi::getQuality(), CSCCorrelatedLCTDigi::getSlope(), CSCBaseboard::runCCLUT_, and jetUpdater_cfi::sort.

Referenced by correlateLCTsGEM().

Member Data Documentation

◆ assign_gem_csc_bending_

bool CSCGEMMotherboard::assign_gem_csc_bending_
private

Definition at line 160 of file CSCGEMMotherboard.h.

Referenced by constructLCTsGEM(), and CSCGEMMotherboard().

◆ build_lct_from_alct_gem_

bool CSCGEMMotherboard::build_lct_from_alct_gem_
private

Definition at line 146 of file CSCGEMMotherboard.h.

Referenced by run().

◆ build_lct_from_clct_gem_

bool CSCGEMMotherboard::build_lct_from_clct_gem_
private

Definition at line 147 of file CSCGEMMotherboard.h.

Referenced by run().

◆ build_lct_from_clct_gem_me1a_

bool CSCGEMMotherboard::build_lct_from_clct_gem_me1a_
private

Definition at line 153 of file CSCGEMMotherboard.h.

Referenced by CSCGEMMotherboard(), and matchCLCT2GEM().

◆ clusterProc_

std::shared_ptr<GEMClusterProcessor> CSCGEMMotherboard::clusterProc_
private

◆ clusters_

std::map<int, GEMInternalClusters> CSCGEMMotherboard::clusters_
private

Definition at line 134 of file CSCGEMMotherboard.h.

◆ cscGEMMatcher_

std::unique_ptr<CSCGEMMatcher> CSCGEMMotherboard::cscGEMMatcher_
private

Definition at line 136 of file CSCGEMMotherboard.h.

Referenced by constructLCTsGEM(), correlateLCTsGEM(), and CSCGEMMotherboard().

◆ drop_low_quality_alct_no_gems_

bool CSCGEMMotherboard::drop_low_quality_alct_no_gems_
private

Definition at line 142 of file CSCGEMMotherboard.h.

Referenced by dropLowQualityALCTNoClusters().

◆ drop_low_quality_clct_no_gems_

bool CSCGEMMotherboard::drop_low_quality_clct_no_gems_
private

Definition at line 143 of file CSCGEMMotherboard.h.

Referenced by dropLowQualityCLCTNoClusters().

◆ drop_low_quality_clct_no_gems_me1a_

bool CSCGEMMotherboard::drop_low_quality_clct_no_gems_me1a_
private

Definition at line 150 of file CSCGEMMotherboard.h.

Referenced by CSCGEMMotherboard(), and dropLowQualityCLCTNoClusters().

◆ drop_used_gems_

bool CSCGEMMotherboard::drop_used_gems_
private

Definition at line 162 of file CSCGEMMotherboard.h.

Referenced by CSCGEMMotherboard(), and matchALCT2GEM().

◆ gem_g

const GEMGeometry* CSCGEMMotherboard::gem_g
private

Definition at line 131 of file CSCGEMMotherboard.h.

Referenced by run(), and setGEMGeometry().

◆ gemId

unsigned CSCGEMMotherboard::gemId
private

Chamber id (trigger-type labels).

Definition at line 130 of file CSCGEMMotherboard.h.

Referenced by CSCGEMMotherboard().

◆ hasGE21Geometry16Partitions_

bool CSCGEMMotherboard::hasGE21Geometry16Partitions_
private

Definition at line 167 of file CSCGEMMotherboard.h.

Referenced by correlateLCTsGEM(), matchALCT2GEM(), matchCLCT2GEM(), and run().

◆ match_earliest_gem_only_

bool CSCGEMMotherboard::match_earliest_gem_only_
private

Definition at line 163 of file CSCGEMMotherboard.h.

Referenced by CSCGEMMotherboard(), and matchALCT2GEM().

◆ max_delta_bx_alct_gem_

unsigned CSCGEMMotherboard::max_delta_bx_alct_gem_
private

Definition at line 156 of file CSCGEMMotherboard.h.

Referenced by CSCGEMMotherboard(), matchALCT2GEM(), and matchALCTCLCTGEM().

◆ max_delta_bx_clct_gem_

unsigned CSCGEMMotherboard::max_delta_bx_clct_gem_
private

Definition at line 157 of file CSCGEMMotherboard.h.

Referenced by CSCGEMMotherboard(), and matchCLCT2GEM().

CSCALCTDigi::getBX
uint16_t getBX() const
return BX - five low bits of BXN counter tagged by the ALCT
Definition: CSCALCTDigi.h:73
CSCMotherboard::selectLCTs
void selectLCTs()
Definition: CSCMotherboard.cc:468
CSCMotherboard::match_trig_window_size
unsigned int match_trig_window_size
Definition: CSCMotherboard.h:124
CSCMotherboard::copyValidToInValid
void copyValidToInValid(CSCALCTDigi &, CSCALCTDigi &, CSCCLCTDigi &, CSCCLCTDigi &) const
Definition: CSCMotherboard.cc:405
CSCBaseboard::theRegion
int theRegion
Definition: CSCBaseboard.h:46
CSCGEMMotherboard::build_lct_from_alct_gem_
bool build_lct_from_alct_gem_
Definition: CSCGEMMotherboard.h:146
CSCMotherboard::CSCMotherboard
CSCMotherboard(unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)
Definition: CSCMotherboard.cc:13
CSCCorrelatedLCTDigi::ALCT2GEM
Definition: CSCCorrelatedLCTDigi.h:31
CSCBaseboard::cscGeometry_
const CSCGeometry * cscGeometry_
Definition: CSCBaseboard.h:65
CSCGEMMotherboard::cscGEMMatcher_
std::unique_ptr< CSCGEMMatcher > cscGEMMatcher_
Definition: CSCGEMMotherboard.h:136
CSCConstants::MAX_ALCT_TBINS
Definition: CSCConstants.h:127
CSCGEMMotherboard::drop_low_quality_clct_no_gems_me1a_
bool drop_low_quality_clct_no_gems_me1a_
Definition: CSCGEMMotherboard.h:150
CSCBaseboard::tmbParams_
edm::ParameterSet tmbParams_
Definition: CSCBaseboard.h:72
CSCGEMMotherboard::match_earliest_gem_only_
bool match_earliest_gem_only_
Definition: CSCGEMMotherboard.h:163
relativeConstraints.station
station
Definition: relativeConstraints.py:67
CSCMotherboard::alctProc
std::unique_ptr< CSCAnodeLCTProcessor > alctProc
Definition: CSCMotherboard.h:98
CSCBaseboard::theStation
const unsigned theStation
Definition: CSCBaseboard.h:42
CSCGEMMotherboard::drop_used_gems_
bool drop_used_gems_
Definition: CSCGEMMotherboard.h:162
CSCALCTDigi::clear
void clear()
clear this ALCT
Definition: CSCALCTDigi.cc:49
CSCGEMMotherboard::matchALCT2GEM
void matchALCT2GEM(bool bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS])
Definition: CSCGEMMotherboard.cc:222
CSCCLCTDigi::getEighthStripBit
bool getEighthStripBit() const
get single eighth strip bit
Definition: CSCCLCTDigi.h:114
CSCMotherboard::allLCTs_
LCTContainer allLCTs_
Definition: CSCMotherboard.h:110
CSCMotherboard::clear
void clear()
Definition: CSCMotherboard.cc:82
CSCConstants::ALCT_CLCT_OFFSET
Definition: CSCConstants.h:164
makeMuonMisalignmentScenario.endcap
endcap
Definition: makeMuonMisalignmentScenario.py:320
CSCCLCTDigi::getKeyStrip
uint16_t getKeyStrip(const uint16_t n=2) const
Definition: CSCCLCTDigi.cc:99
CSCGEMMotherboard::hasGE21Geometry16Partitions_
bool hasGE21Geometry16Partitions_
Definition: CSCGEMMotherboard.h:167
CSCCLCTDigi
Definition: CSCCLCTDigi.h:17
CSCCorrelatedLCTDigi::ALCTCLCT
Definition: CSCCorrelatedLCTDigi.h:28
CSCBaseboard::runME11ILT_
bool runME11ILT_
Definition: CSCBaseboard.h:94
CSCCorrelatedLCTDigi::CLCT2GEM
Definition: CSCCorrelatedLCTDigi.h:32
CSCMotherboard::clctV
std::vector< CSCCLCTDigi > clctV
Definition: CSCMotherboard.h:107
CSCMotherboard::match_earliest_clct_only_
bool match_earliest_clct_only_
Definition: CSCMotherboard.h:136
CSCMotherboard::clctProc
std::unique_ptr< CSCCathodeLCTProcessor > clctProc
Definition: CSCMotherboard.h:101
CSCGEMMotherboard::constructLCTsGEM
void constructLCTsGEM(const CSCALCTDigi &alct, const CSCCLCTDigi &clct, const GEMInternalCluster &gem, CSCCorrelatedLCTDigi &lct) const
Definition: CSCGEMMotherboard.cc:465
CSCALCTDigi::getKeyWG
uint16_t getKeyWG() const
return key wire group
Definition: CSCALCTDigi.h:67
CSCMotherboard::correlateLCTs
void correlateLCTs(const CSCALCTDigi &bestALCT, const CSCALCTDigi &secondALCT, const CSCCLCTDigi &bestCLCT, const CSCCLCTDigi &secondCLCT, CSCCorrelatedLCTDigi &bLCT, CSCCorrelatedLCTDigi &sLCT, int type) const
Definition: CSCMotherboard.cc:346
CSCCLCTDigi::getQuality
uint16_t getQuality() const
return quality of a pattern (number of layers hit!)
Definition: CSCCLCTDigi.h:56
CSCCLCTDigi::getQuartStripBit
bool getQuartStripBit() const
get single quart strip bit
Definition: CSCCLCTDigi.h:108
CSCCLCTDigi::getBend
uint16_t getBend() const
Definition: CSCCLCTDigi.h:93
CSCMotherboard::alctV
std::vector< CSCALCTDigi > alctV
Definition: CSCMotherboard.h:106
CSCConstants::MAX_LCTS_PER_CSC
Definition: CSCConstants.h:138
CSCConstants::MAX_HALF_STRIP_ME1B
Definition: CSCConstants.h:88
CSCGEMMotherboard::build_lct_from_clct_gem_me1a_
bool build_lct_from_clct_gem_me1a_
Definition: CSCGEMMotherboard.h:153
CSCGEMMotherboard::matchCLCT2GEM
void matchCLCT2GEM(bool bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS])
Definition: CSCGEMMotherboard.cc:164
CSCGEMMotherboard::gemId
unsigned gemId
Definition: CSCGEMMotherboard.h:130
CSCGEMMotherboard::sortLCTsByBending
void sortLCTsByBending(std::vector< CSCCorrelatedLCTDigi > &lcts) const
Definition: CSCGEMMotherboard.cc:587
sistrip::SpyUtilities::isValid
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
Definition: SiStripSpyUtilities.cc:124
CSCALCTDigi::getQuality
uint16_t getQuality() const
return quality of a pattern
Definition: CSCALCTDigi.h:46
CSCCorrelatedLCTDigi::ALCTCLCTGEM
Definition: CSCCorrelatedLCTDigi.h:29
bsc_activity_cfg.clusters
clusters
Definition: bsc_activity_cfg.py:36
CSCCorrelatedLCTDigi::ALCTCLCT2GEM
Definition: CSCCorrelatedLCTDigi.h:30
CSCCorrelatedLCTDigi::setTrknmb
void setTrknmb(const uint16_t number)
Set track number (1,2) after sorting LCTs.
Definition: CSCCorrelatedLCTDigi.h:155
GEMInternalCluster::isCoincidence
bool isCoincidence() const
Definition: GEMInternalCluster.h:52
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
GEMDetId
Definition: GEMDetId.h:18
CSCMotherboard::preferred_bx_match_
std::vector< int > preferred_bx_match_
Definition: CSCMotherboard.h:146
CSCGEMMotherboard::max_delta_bx_clct_gem_
unsigned max_delta_bx_clct_gem_
Definition: CSCGEMMotherboard.h:157
CSCCLCTDigi::isValid
bool isValid() const
check CLCT validity (1 - valid CLCT)
Definition: CSCCLCTDigi.h:50
GEMInternalCluster::isValid
bool isValid() const
Definition: GEMInternalCluster.h:31
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
CSCCLCTDigi::getSlope
uint16_t getSlope() const
return the slope
Definition: CSCCLCTDigi.h:74
CSCBaseboard::theChamber
unsigned theChamber
Definition: CSCBaseboard.h:48
CSCGEMMotherboard::dropLowQualityCLCTNoClusters
void dropLowQualityCLCTNoClusters(CSCCLCTDigi &clct, const GEMInternalCluster &cluster) const
Definition: CSCGEMMotherboard.cc:576
CSCGEMMotherboard::matchALCTCLCTGEM
void matchALCTCLCTGEM(bool bunch_crossing_mask[CSCConstants::MAX_ALCT_TBINS])
Definition: CSCGEMMotherboard.cc:117
gem
Definition: AMC13Event.h:6
CSCMotherboard::drop_used_clcts
bool drop_used_clcts
Definition: CSCMotherboard.h:127
CSCMotherboard::getBXShiftedCLCT
CSCCLCTDigi getBXShiftedCLCT(const CSCCLCTDigi &) const
Definition: CSCMotherboard.cc:543
CSCBaseboard::runME21ILT_
bool runME21ILT_
Definition: CSCBaseboard.h:97
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
CSCBaseboard::isME21_
bool isME21_
Definition: CSCBaseboard.h:52
CSCGEMMotherboard::correlateLCTsGEM
void correlateLCTsGEM(const CSCALCTDigi &bestALCT, const CSCALCTDigi &secondALCT, const CSCCLCTDigi &bestCLCT, const CSCCLCTDigi &secondCLCT, const GEMInternalClusters &clusters, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2) const
Definition: CSCGEMMotherboard.cc:273
CSCCLCTDigi::clear
void clear()
clear this CLCT
Definition: CSCCLCTDigi.cc:61
CSCALCTDigi
Definition: CSCALCTDigi.h:17
CSCGEMMotherboard::max_delta_bx_alct_gem_
unsigned max_delta_bx_alct_gem_
Definition: CSCGEMMotherboard.h:156
CSCConstants::MAX_CLCT_TBINS
Definition: CSCConstants.h:126
relativeConstraints.chamber
chamber
Definition: relativeConstraints.py:53
CSCGEMMotherboard::dropLowQualityALCTNoClusters
void dropLowQualityALCTNoClusters(CSCALCTDigi &alct, const GEMInternalCluster &cluster) const
Definition: CSCGEMMotherboard.cc:570
CSCGEMMotherboard::clear
void clear()
Definition: CSCGEMMotherboard.cc:49
CSCBaseboard::theTrigChamber
const unsigned theTrigChamber
Definition: CSCBaseboard.h:45
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
GEMInternalCluster
Definition: GEMInternalCluster.h:18
CSCMotherboard::encodePattern
unsigned int encodePattern(const int clctPattern) const
Definition: CSCMotherboard.cc:459
CSCALCTDigi::isValid
bool isValid() const
check ALCT validity (1 - valid ALCT)
Definition: CSCALCTDigi.h:40
CSCGEMMotherboard::build_lct_from_clct_gem_
bool build_lct_from_clct_gem_
Definition: CSCGEMMotherboard.h:147
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
CSCMotherboard::getBXShiftedALCT
CSCALCTDigi getBXShiftedALCT(const CSCALCTDigi &) const
Definition: CSCMotherboard.cc:537
CSCCLCTDigi::getPattern
uint16_t getPattern() const
return pattern
Definition: CSCCLCTDigi.h:62
CSCMotherboard::encodeHighMultiplicityBits
void encodeHighMultiplicityBits()
Definition: CSCMotherboard.cc:549
CSCMotherboard::qualityAssignment_
std::unique_ptr< LCTQualityAssignment > qualityAssignment_
Definition: CSCMotherboard.h:155
CSCGEMMotherboard::clusterProc_
std::shared_ptr< GEMClusterProcessor > clusterProc_
Definition: CSCGEMMotherboard.h:139
CSCCorrelatedLCTDigi::getQuality
uint16_t getQuality() const
return the Quality
Definition: CSCCorrelatedLCTDigi.h:70
CSCGEMMotherboard::assign_gem_csc_bending_
bool assign_gem_csc_bending_
Definition: CSCGEMMotherboard.h:160
CSCBaseboard::isME11_
bool isME11_
Definition: CSCBaseboard.h:51
CSCGEMMotherboard::gem_g
const GEMGeometry * gem_g
Definition: CSCGEMMotherboard.h:131
CSCCorrelatedLCTDigi
Definition: CSCCorrelatedLCTDigi.h:19
g
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 g
Definition: Activities.doc:4
CSCBaseboard::runCCLUT_
bool runCCLUT_
Definition: CSCBaseboard.h:105
CSCCorrelatedLCTDigi::getSlope
uint16_t getSlope() const
return the slope
Definition: CSCCorrelatedLCTDigi.h:116
CSCGEMMotherboard::drop_low_quality_alct_no_gems_
bool drop_low_quality_alct_no_gems_
Definition: CSCGEMMotherboard.h:142
CSCGEMMotherboard::drop_low_quality_clct_no_gems_
bool drop_low_quality_clct_no_gems_
Definition: CSCGEMMotherboard.h:143
CSCCLCTDigi::getRun3Pattern
uint16_t getRun3Pattern() const
return pattern
Definition: CSCCLCTDigi.h:68