CMS 3D CMS Logo

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

#include <CSCGEMMotherboard.h>

Inheritance diagram for CSCGEMMotherboard:
CSCUpgradeMotherboard CSCMotherboard CSCBaseboard CSCGEMMotherboardME11 CSCGEMMotherboardME21

Public Types

enum  Default_values { DEFAULT_MATCHING_VALUE = -99 }
 

Public Member Functions

void clear ()
 
 CSCGEMMotherboard ()
 
 CSCGEMMotherboard (unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)
 
std::vector< CSCCorrelatedLCTDigireadoutLCTs () const override
 
void run (const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc) override
 
virtual void run (const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc, const GEMPadDigiClusterCollection *gemPads)=0
 
virtual void run (const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc, const GEMPadDigiCollection *gemPads)=0
 
void setGEMGeometry (const GEMGeometry *g)
 set CSC and GEM geometries for the matching needs More...
 
 ~CSCGEMMotherboard () override
 
- Public Member Functions inherited from CSCUpgradeMotherboard
void clear ()
 
template<class S >
bool compare (const S &p, const S &q) const
 
 CSCUpgradeMotherboard ()
 
 CSCUpgradeMotherboard (unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)
 
void debugLUTs ()
 
enum CSCPart getCSCPart (int keystrip) const
 
template<class S >
void intersection (const S &d1, const S &d2, S &result) const
 
std::vector< CSCCorrelatedLCTDigireadoutLCTs () const override
 
void run (const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc) override
 
void setupGeometry ()
 
void sortLCTs (std::vector< CSCCorrelatedLCTDigi > &lcts, bool(*sorter)(const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &)) const
 
 ~CSCUpgradeMotherboard () override
 
- Public Member Functions inherited from CSCMotherboard
void clear ()
 
 CSCMotherboard ()
 
 CSCMotherboard (unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)
 
std::vector< CSCCorrelatedLCTDigigetLCTs () const
 
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
 

Public Attributes

std::unique_ptr< GEMCoPadProcessorcoPadProcessor
 
- Public Attributes inherited from CSCMotherboard
std::unique_ptr< CSCAnodeLCTProcessoralctProc
 
std::unique_ptr< CSCCathodeLCTProcessorclctProc
 

Protected Member Functions

template<class T >
T bestMatchingPad (const CSCALCTDigi &, const CSCCLCTDigi &, const matches< T > &) const
 
template<class T >
T bestMatchingPad (const CSCALCTDigi &, const matches< T > &) const
 
template<class S >
S bestMatchingPad (const CSCALCTDigi &alct1, const CSCCLCTDigi &clct1, const matches< S > &pads) const
 
template<class S >
S bestMatchingPad (const CSCALCTDigi &alct1, const matches< S > &pads) const
 
template<class T >
T bestMatchingPad (const CSCCLCTDigi &, const matches< T > &) const
 
template<class S >
S bestMatchingPad (const CSCCLCTDigi &clct, const matches< S > &pads) const
 
CSCCorrelatedLCTDigi constructLCTsGEM (const CSCALCTDigi &alct, const CSCCLCTDigi &clct, const GEMCoPadDigi &gem, int i) const
 
CSCCorrelatedLCTDigi constructLCTsGEM (const CSCALCTDigi &alct, const CSCCLCTDigi &clct, const GEMPadDigi &gem, int i) const
 
CSCCorrelatedLCTDigi constructLCTsGEM (const CSCALCTDigi &alct, const CSCCLCTDigi &clct, const GEMPadDigi &gem1, const GEMCoPadDigi &gem2, int i) const
 
CSCCorrelatedLCTDigi constructLCTsGEM (const CSCALCTDigi &alct, const GEMCoPadDigi &gem, int i) const
 
CSCCorrelatedLCTDigi constructLCTsGEM (const CSCCLCTDigi &clct, const GEMCoPadDigi &gem, int i) const
 
template<class T >
void correlateLCTsGEM (const T &best, const T &second, const GEMCoPadDigi &, const GEMCoPadDigi &, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2) const
 
template<class T >
void correlateLCTsGEM (const T &best, const T &second, const GEMCoPadDigiIds &coPads, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2) const
 
virtual bool doesWiregroupCrossStrip (int key_wg, int key_strip) const
 
unsigned int findQualityGEM (const CSCALCTDigi &, const CSCCLCTDigi &, int gemlayer) const
 
int getBX (const GEMCoPadDigi &p) const
 
int getBX (const GEMPadDigi &p) const
 
virtual const CSCGEMMotherboardLUTgetLUT () const =0
 
float getPad (const CSCCLCTDigi &, enum CSCPart par) const
 
float getPad (const GEMCoPadDigi &) const
 
float getPad (const GEMPadDigi &) const
 
int getRoll (const GEMCoPadDigiId &p) const
 
int getRoll (const GEMPadDigiId &p) const
 
std::pair< int, int > getRolls (const CSCALCTDigi &) const
 
bool isGEMDetId (unsigned int) const
 
bool isPadInOverlap (int roll) const
 
template<class T >
void matchingPads (const CSCALCTDigi &alct, matches< T > &) const
 
template<class T >
void matchingPads (const CSCCLCTDigi &alct, matches< T > &) const
 
template<class T >
void matchingPads (const CSCCLCTDigi &clct1, const CSCALCTDigi &alct1, matches< T > &) const
 
template<class T >
void matchingPads (const CSCCLCTDigi &clct1, const CSCCLCTDigi &clct2, const CSCALCTDigi &alct1, const CSCALCTDigi &alct2, matches< T > &) const
 
template<class S , class T >
void matchingPads (const S &d1, const S &d2, matches< T > &) const
 
int maxPads () const
 
int maxRolls () const
 
void printGEMTriggerCoPads (int bx_start, int bx_stop, enum CSCPart)
 
void printGEMTriggerPads (int bx_start, int bx_stop, enum CSCPart)
 
void retrieveGEMCoPads ()
 
void retrieveGEMPads (const GEMPadDigiCollection *pads, unsigned id)
 
void setupGeometry ()
 
- Protected Member Functions inherited from CSCUpgradeMotherboard
void correlateLCTs (const CSCALCTDigi &bestALCT, const CSCALCTDigi &secondALCT, const CSCCLCTDigi &bestCLCT, const CSCCLCTDigi &secondCLCT, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2) const
 
void setPrefIndex ()
 
- Protected Member Functions inherited from CSCMotherboard
void checkConfigParameters ()
 
void checkValid (const CSCCorrelatedLCTDigi &lct) const
 
CSCCorrelatedLCTDigi constructLCTs (const CSCALCTDigi &aLCT, const CSCCLCTDigi &cLCT, int type, int trknmb) const
 
void correlateLCTs (const CSCALCTDigi &bestALCT, const CSCALCTDigi &secondALCT, const CSCCLCTDigi &bestCLCT, const CSCCLCTDigi &secondCLCT, int type)
 
void dumpConfigParams () const
 
void encodeHighMultiplicityBits (unsigned alctBits)
 
unsigned int encodePattern (const int clctPattern) const
 
unsigned int findQuality (const CSCALCTDigi &aLCT, const CSCCLCTDigi &cLCT) 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

GEMCoPadDigiIdsBX coPads_
 
bool doLCTGhostBustingWithGEMs_
 
const GEMGeometrygem_g
 
std::vector< GEMCoPadDigigemCoPadV
 
bool gemGeometryAvailable
 
unsigned gemId
 
int maxDeltaBXCoPad_
 
int maxDeltaBXPad_
 
int maxDeltaPadL1_
 
int maxDeltaPadL2_
 
GEMPadDigiIdsBX pads_
 
bool promoteALCTGEMpattern_
 
bool promoteALCTGEMquality_
 
bool promoteCLCTGEMquality_
 
bool useOldLCTDataFormat_
 
- Protected Attributes inherited from CSCUpgradeMotherboard
LCTContainer allLCTs
 
bool debug_luts
 
bool debug_matching
 
std::unique_ptr< CSCUpgradeMotherboardLUTGeneratorgenerator_
 
bool match_earliest_alct_only
 
bool match_earliest_clct_only
 
unsigned int max_lcts
 
int pref [CSCConstants::MAX_LCT_TBINS]
 
Parity theParity
 
unsigned int tmb_cross_bx_algo
 
- Protected Attributes inherited from CSCMotherboard
unsigned int alct_trig_enable
 
std::vector< CSCALCTDigialctV
 
bool clct_to_alct
 
unsigned int clct_trig_enable
 
std::vector< CSCCLCTDigiclctV
 
bool drop_used_alcts
 
bool drop_used_clcts
 
int early_tbins
 
CSCCorrelatedLCTDigi firstLCT [CSCConstants::MAX_LCT_TBINS]
 
unsigned int highMultiplicityBits_
 
unsigned int match_trig_enable
 
unsigned int match_trig_window_size
 
unsigned int mpc_block_me1a
 
bool readout_earliest_2
 
CSCCorrelatedLCTDigi secondLCT [CSCConstants::MAX_LCT_TBINS]
 
unsigned int tmb_l1a_window_size
 
bool use_run3_patterns_
 
bool useHighMultiplicityBits_
 
- Protected Attributes inherited from CSCBaseboard
unsigned int alctClctOffset_
 
edm::ParameterSet alctParams_
 
edm::ParameterSet clctParams_
 
edm::ParameterSet commonParams_
 
const CSCChambercscChamber_
 
const CSCGeometrycscGeometry_
 
CSCDetId cscId_
 
bool disableME1a_
 
bool enableAlctSLHC_
 
bool gangedME1a_
 
int infoV
 
bool isME11_
 
bool isME21_
 
bool isSLHC_
 
bool runME11ILT_
 
bool runME11Up_
 
bool runME21ILT_
 
bool runME21Up_
 
bool runME31Up_
 
bool runME41Up_
 
unsigned theChamber
 
std::string theCSCName_
 
const unsigned theEndcap
 
unsigned theRegion
 
unsigned theRing
 
const unsigned theSector
 
const unsigned theStation
 
const unsigned theSubsector
 
const unsigned theTrigChamber
 
edm::ParameterSet tmbParams_
 

Private Member Functions

template<class T >
int getLctTrigEnable () const
 
template<>
int getLctTrigEnable () const
 
template<>
int getLctTrigEnable () const
 
template<class T >
int getMaxDeltaBX () const
 
template<>
int getMaxDeltaBX () const
 
template<>
int getMaxDeltaBX () const
 
template<class T >
const matchesBX< T > & getPads () const
 
template<>
const matchesBX< GEMCoPadDigi > & getPads () const
 
template<>
const matchesBX< GEMPadDigi > & getPads () const
 

Additional Inherited Members

- Static Public Member Functions inherited from CSCUpgradeMotherboard
static bool sortLCTsByGEMDphi (const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &)
 
static bool sortLCTsByQuality (const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &)
 
- Protected Types inherited from CSCMotherboard
enum  LCT_Quality {
  INVALID = 0, NO_CLCT = 1, NO_ALCT = 2, CLCT_LAYER_TRIGGER = 3,
  LOW_QUALITY = 4, MARGINAL_ANODE_CATHODE = 5, HQ_ANODE_MARGINAL_CATHODE = 6, HQ_CATHODE_MARGINAL_ANODE = 7,
  HQ_ACCEL_ALCT = 8, HQ_RESERVED_1 = 9, HQ_RESERVED_2 = 10, HQ_PATTERN_2_3 = 11,
  HQ_PATTERN_4_5 = 12, HQ_PATTERN_6_7 = 13, HQ_PATTERN_8_9 = 14, HQ_PATTERN_10 = 15
}
 
- 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

Base class for TMBs for the GEM-CSC integrated local trigger. Inherits from CSCUpgradeMotherboard. Provides common functionality to match ALCT/CLCT to GEM pads or copads. Matching functions are templated so they work both for GEMPadDigi and GEMCoPadDigi

Author
Sven Dildick (TAMU)

Definition at line 29 of file CSCGEMMotherboard.h.

Member Enumeration Documentation

◆ Default_values

Enumerator
DEFAULT_MATCHING_VALUE 

Definition at line 31 of file CSCGEMMotherboard.h.

31 { DEFAULT_MATCHING_VALUE = -99 };

Constructor & Destructor Documentation

◆ CSCGEMMotherboard() [1/2]

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  : CSCUpgradeMotherboard(endcap, station, sector, subsector, chamber, conf),
11  maxDeltaBXPad_(tmbParams_.getParameter<int>("maxDeltaBXPad")),
12  maxDeltaBXCoPad_(tmbParams_.getParameter<int>("maxDeltaBXCoPad")),
13  useOldLCTDataFormat_(tmbParams_.getParameter<bool>("useOldLCTDataFormat")),
14  promoteALCTGEMpattern_(tmbParams_.getParameter<bool>("promoteALCTGEMpattern")),
15  promoteALCTGEMquality_(tmbParams_.getParameter<bool>("promoteALCTGEMquality")),
16  doLCTGhostBustingWithGEMs_(tmbParams_.getParameter<bool>("doLCTGhostBustingWithGEMs")) {
17  // super chamber has layer=0!
19 
20  const edm::ParameterSet coPadParams(station == 1 ? conf.getParameter<edm::ParameterSet>("copadParamGE11")
21  : conf.getParameter<edm::ParameterSet>("copadParamGE21"));
23 
24  maxDeltaPadL1_ = (theParity ? tmbParams_.getParameter<int>("maxDeltaPadL1Even")
25  : tmbParams_.getParameter<int>("maxDeltaPadL1Odd"));
26  maxDeltaPadL2_ = (theParity ? tmbParams_.getParameter<int>("maxDeltaPadL2Even")
27  : tmbParams_.getParameter<int>("maxDeltaPadL2Odd"));
28 }

References coPadProcessor, gemId, edm::ParameterSet::getParameter(), maxDeltaPadL1_, maxDeltaPadL2_, DetId::rawId(), relativeConstraints::station, CSCBaseboard::theChamber, CSCUpgradeMotherboard::theParity, CSCBaseboard::theRegion, CSCBaseboard::theStation, and CSCBaseboard::tmbParams_.

◆ CSCGEMMotherboard() [2/2]

CSCGEMMotherboard::CSCGEMMotherboard ( )

Definition at line 30 of file CSCGEMMotherboard.cc.

◆ ~CSCGEMMotherboard()

CSCGEMMotherboard::~CSCGEMMotherboard ( )
override

Definition at line 32 of file CSCGEMMotherboard.cc.

32 {}

Member Function Documentation

◆ bestMatchingPad() [1/6]

template<class T >
T CSCGEMMotherboard::bestMatchingPad ( const CSCALCTDigi ,
const CSCCLCTDigi ,
const matches< T > &   
) const
protected

◆ bestMatchingPad() [2/6]

template<class T >
T CSCGEMMotherboard::bestMatchingPad ( const CSCALCTDigi ,
const matches< T > &   
) const
protected

◆ bestMatchingPad() [3/6]

template<class S >
S CSCGEMMotherboard::bestMatchingPad ( const CSCALCTDigi alct1,
const CSCCLCTDigi clct1,
const matches< S > &  pads 
) const
protected

Definition at line 430 of file CSCGEMMotherboard.h.

430  {
431  S result;
432  // no matching pads for invalid stub
433  if (not alct1.isValid() or not clct1.isValid()) {
434  return result;
435  }
436 
437  auto part(getCSCPart(clct1.getKeyStrip()));
438 
439  // return the pad with the smallest bending angle
440  float averagePadNumberCSC = getPad(clct1, part);
441  float minDeltaPad = 999;
442  for (const auto& p : pads) {
443  // protection against corrupted DetIds
444  if (not isGEMDetId(p.first))
445  continue;
446 
447  float averagePadNumberGEM = getPad(p.second);
448 
449  int delta;
450  if (GEMDetId(p.first).station() == 2)
451  delta = 1;
452 
453  // add another safety to make sure that the deltaPad is not larger than max value!!!
454  if (std::abs(averagePadNumberCSC - averagePadNumberGEM) < minDeltaPad and
455  getRolls(alct1).first - delta <= getRoll(p) and getRoll(p) <= getRolls(alct1).second) {
456  minDeltaPad = std::abs(averagePadNumberCSC - averagePadNumberGEM);
457  result = p.second;
458  }
459  }
460  return result;
461 }

References funct::abs(), dumpMFGeometry_cfg::delta, CSCUpgradeMotherboard::getCSCPart(), CSCCLCTDigi::getKeyStrip(), getPad(), getRoll(), getRolls(), isGEMDetId(), CSCALCTDigi::isValid(), CSCCLCTDigi::isValid(), or, AlCaHLTBitMon_ParallelJobs::p, mps_fire::result, and GEMDetId::station().

◆ bestMatchingPad() [4/6]

template<class S >
S CSCGEMMotherboard::bestMatchingPad ( const CSCALCTDigi alct1,
const matches< S > &  pads 
) const
protected

Definition at line 382 of file CSCGEMMotherboard.h.

382  {
383  S result;
384  // no matching pads for invalid stub
385  if (not alct1.isValid()) {
386  return result;
387  }
388  // return the first one with the same roll number
389  for (const auto& p : pads) {
390  // protection against corrupted DetIds
391  if (not isGEMDetId(p.first))
392  continue;
393 
394  // roll number of pad and ALCT must match
395  if (getRolls(alct1).first <= getRoll(p) and getRoll(p) <= getRolls(alct1).second) {
396  return p.second;
397  }
398  }
399  return result;
400 }

References getRoll(), getRolls(), isGEMDetId(), CSCALCTDigi::isValid(), AlCaHLTBitMon_ParallelJobs::p, and mps_fire::result.

◆ bestMatchingPad() [5/6]

template<class T >
T CSCGEMMotherboard::bestMatchingPad ( const CSCCLCTDigi ,
const matches< T > &   
) const
protected

◆ bestMatchingPad() [6/6]

template<class S >
S CSCGEMMotherboard::bestMatchingPad ( const CSCCLCTDigi clct,
const matches< S > &  pads 
) const
protected

Definition at line 403 of file CSCGEMMotherboard.h.

403  {
404  S result;
405  // no matching pads for invalid stub
406  if (not clct.isValid())
407  return result;
408 
409  auto part(getCSCPart(clct.getKeyStrip()));
410 
411  // return the pad with the smallest bending angle
412  float averagePadNumberCSC = getPad(clct, part);
413  float minDeltaPad = 999;
414  for (const auto& p : pads) {
415  // protection against corrupted DetIds
416  if (not isGEMDetId(p.first))
417  continue;
418 
419  // best pad is closest to CLCT in number of halfstrips
420  float averagePadNumberGEM = getPad(p.second);
421  if (std::abs(averagePadNumberCSC - averagePadNumberGEM) < minDeltaPad) {
422  minDeltaPad = std::abs(averagePadNumberCSC - averagePadNumberGEM);
423  result = p.second;
424  }
425  }
426  return result;
427 }

References funct::abs(), CSCUpgradeMotherboard::getCSCPart(), CSCCLCTDigi::getKeyStrip(), getPad(), isGEMDetId(), CSCCLCTDigi::isValid(), AlCaHLTBitMon_ParallelJobs::p, and mps_fire::result.

◆ clear()

void CSCGEMMotherboard::clear ( void  )

Definition at line 34 of file CSCGEMMotherboard.cc.

34  {
36  pads_.clear();
37  coPads_.clear();
38 }

References CSCUpgradeMotherboard::clear(), coPads_, and pads_.

Referenced by CSCGEMMotherboardME11::run(), and CSCGEMMotherboardME21::run().

◆ constructLCTsGEM() [1/5]

CSCCorrelatedLCTDigi CSCGEMMotherboard::constructLCTsGEM ( const CSCALCTDigi alct,
const CSCCLCTDigi clct,
const GEMCoPadDigi gem,
int  i 
) const
protected

Definition at line 83 of file CSCGEMMotherboard.cc.

86  {
87  return constructLCTsGEM(alct, clct, GEMPadDigi(), gem, trknmb);
88 }

References constructLCTsGEM().

◆ constructLCTsGEM() [2/5]

CSCCorrelatedLCTDigi CSCGEMMotherboard::constructLCTsGEM ( const CSCALCTDigi alct,
const CSCCLCTDigi clct,
const GEMPadDigi gem,
int  i 
) const
protected

Definition at line 90 of file CSCGEMMotherboard.cc.

93  {
94  return constructLCTsGEM(alct, clct, gem, GEMCoPadDigi(), trknmb);
95 }

References constructLCTsGEM().

◆ constructLCTsGEM() [3/5]

CSCCorrelatedLCTDigi CSCGEMMotherboard::constructLCTsGEM ( const CSCALCTDigi alct,
const CSCCLCTDigi clct,
const GEMPadDigi gem1,
const GEMCoPadDigi gem2,
int  i 
) const
protected

Definition at line 97 of file CSCGEMMotherboard.cc.

101  {
102  int pattern = 0, quality = 0, bx = 0, keyStrip = 0, keyWG = 0, bend = 0, valid = 0;
103 
104  // make a new LCT
105  CSCCorrelatedLCTDigi thisLCT;
106  if (!alct.isValid() and !clct.isValid()) {
107  edm::LogError("CSCGEMCMotherboard") << "Warning!!! neither ALCT nor CLCT valid, return invalid LCT";
108  return thisLCT;
109  }
110 
111  // Determine the case and assign properties depending on the LCT dataformat (old/new)
112  if (alct.isValid() and clct.isValid() and gem1.isValid() and not gem2.isValid()) {
113  pattern = encodePattern(clct.getPattern());
114  quality = findQualityGEM(alct, clct, 1);
115  bx = alct.getBX();
116  keyStrip = clct.getKeyStrip();
117  keyWG = alct.getKeyWG();
118  bend = clct.getBend();
119  thisLCT.setALCT(getBXShiftedALCT(alct));
120  thisLCT.setCLCT(getBXShiftedCLCT(clct));
121  thisLCT.setGEM1(gem1);
123  valid = doesWiregroupCrossStrip(keyWG, keyStrip) ? 1 : 0;
124  } else if (alct.isValid() and clct.isValid() and not gem1.isValid() and gem2.isValid()) {
125  pattern = encodePattern(clct.getPattern());
126  quality = findQualityGEM(alct, clct, 2);
127  bx = alct.getBX();
128  keyStrip = clct.getKeyStrip();
129  keyWG = alct.getKeyWG();
130  bend = clct.getBend();
131  thisLCT.setALCT(getBXShiftedALCT(alct));
132  thisLCT.setCLCT(getBXShiftedCLCT(clct));
133  thisLCT.setGEM1(gem2.first());
134  thisLCT.setGEM2(gem2.second());
136  valid = doesWiregroupCrossStrip(keyWG, keyStrip) ? 1 : 0;
137  } else if (alct.isValid() and gem2.isValid() and not clct.isValid()) {
138  //in ME11
139  //ME1b: keyWG >15,
140  //ME1a and ME1b overlap: 10<=keyWG<=15
141  //ME1a: keyWG < 10
142  //in overlap region, firstly try a match in ME1b
143 
144  auto p(getCSCPart(-1)); //use -1 as fake halfstrip, it returns ME11 if station==1 && (ring==1 or ring==4)
145  if (p == CSCPart::ME11) {
146  if (alct.getKeyWG() >= 10)
147  p = CSCPart::ME1B;
148  else
149  p = CSCPart::ME1A;
150  }
151 
152  // min pad number is always 0
153  // max pad number is 191 or 383, depending on the station
154  assert(gem2.pad(1) >= 0);
155  assert(gem2.pad(2) >= 0);
156  assert(gem2.pad(1) < maxPads());
157  assert(gem2.pad(2) < maxPads());
158 
159  const auto& mymap1 = getLUT()->get_gem_pad_to_csc_hs(theParity, p);
160  // GEM pad number is counting from 1
161  // keyStrip from mymap: for ME1b 0-127 and for ME1a 0-95
162  // keyStrip for CLCT: for ME1b 0-127 and for ME1a 128-223
163  keyStrip = mymap1.at(gem2.pad(2));
164  if (p == CSCPart::ME1A and keyStrip <= CSCConstants::MAX_HALF_STRIP_ME1B) {
165  keyStrip += CSCConstants::MAX_HALF_STRIP_ME1B + 1;
166  }
167  keyWG = alct.getKeyWG();
168 
169  if ((not doesWiregroupCrossStrip(keyWG, keyStrip)) and p == CSCPart::ME1B and keyWG <= 15) {
170  //try ME1A as strip and WG do not cross
171  p = CSCPart::ME1A;
172  const auto& mymap2 = getLUT()->get_gem_pad_to_csc_hs(theParity, p);
173  keyStrip = mymap2.at(gem2.pad(2)) + CSCConstants::MAX_HALF_STRIP_ME1B + 1;
174  }
175 
176  pattern = promoteALCTGEMpattern_ ? 10 : 0;
177  quality = promoteALCTGEMquality_ ? 15 : 11;
178  bx = alct.getBX();
179  thisLCT.setALCT(getBXShiftedALCT(alct));
180  thisLCT.setGEM1(gem2.first());
181  thisLCT.setGEM2(gem2.second());
183  valid = true;
184  } else if (clct.isValid() and gem2.isValid() and not alct.isValid()) {
185  // min roll number is always 1
186  // max roll number is 8 or 16, depending on the station
187  assert(gem2.roll() >= GEMDetId::minRollId);
188  assert(gem2.roll() <= maxRolls());
189 
190  const auto& mymap2 = getLUT()->get_gem_roll_to_csc_wg(theParity);
191  pattern = encodePattern(clct.getPattern());
192  quality = promoteCLCTGEMquality_ ? 15 : 11;
193  bx = gem2.bx(1) + CSCConstants::LCT_CENTRAL_BX;
194  keyStrip = clct.getKeyStrip();
195  // choose the corresponding wire-group in the middle of the partition
196  keyWG = mymap2.at(gem2.roll() - 1);
197  bend = clct.getBend();
198  thisLCT.setCLCT(clct);
199  thisLCT.setGEM1(gem2.first());
200  thisLCT.setGEM2(gem2.second());
202  valid = true;
203  }
204 
205  if (valid == 0)
206  LogTrace("CSCGEMCMotherboard") << "Warning!!! wiregroup and strip pair are not crossing each other"
207  << " detid " << cscId_ << " with wiregroup " << keyWG << "keyStrip " << keyStrip
208  << " \n";
209 
210  // in Run-3 we plan to use the synchronization error bit
211  // to denote the presence of exotic signatures in the chamber
212  unsigned int syncErr = useHighMultiplicityBits_ ? highMultiplicityBits_ : 0;
213 
214  // fill the rest of the properties
215  thisLCT.setTrknmb(trknmb);
216  thisLCT.setValid(valid);
217  thisLCT.setQuality(quality);
218  thisLCT.setWireGroup(keyWG);
219  thisLCT.setStrip(keyStrip);
220  thisLCT.setPattern(pattern);
221  thisLCT.setBend(bend);
222  thisLCT.setBX(bx);
223  thisLCT.setMPCLink(0);
224  thisLCT.setBX0(0);
225  thisLCT.setSyncErr(syncErr);
226  thisLCT.setCSCID(theTrigChamber);
227 
228  // future work: add a section that produces LCTs according
229  // to the new LCT dataformat (not yet defined)
230 
231  // return new LCT
232  return thisLCT;
233 }

References CSCCorrelatedLCTDigi::ALCT2GEM, CSCCorrelatedLCTDigi::ALCTCLCT2GEM, CSCCorrelatedLCTDigi::ALCTCLCTGEM, cms::cuda::assert(), trklet::bend(), l1GtPatternGenerator_cfi::bx, GEMCoPadDigi::bx(), CSCCorrelatedLCTDigi::CLCT2GEM, CSCBaseboard::cscId_, doesWiregroupCrossStrip(), CSCMotherboard::encodePattern(), findQualityGEM(), GEMCoPadDigi::first(), CSCGEMMotherboardLUT::get_gem_pad_to_csc_hs(), CSCGEMMotherboardLUT::get_gem_roll_to_csc_wg(), CSCCLCTDigi::getBend(), CSCALCTDigi::getBX(), CSCMotherboard::getBXShiftedALCT(), CSCMotherboard::getBXShiftedCLCT(), CSCUpgradeMotherboard::getCSCPart(), CSCCLCTDigi::getKeyStrip(), CSCALCTDigi::getKeyWG(), getLUT(), CSCCLCTDigi::getPattern(), CSCMotherboard::highMultiplicityBits_, GEMPadDigi::isValid(), GEMCoPadDigi::isValid(), CSCALCTDigi::isValid(), CSCCLCTDigi::isValid(), CSCConstants::LCT_CENTRAL_BX, LogTrace, CSCConstants::MAX_HALF_STRIP_ME1B, maxPads(), maxRolls(), ME11, ME1A, ME1B, GEMDetId::minRollId, AlCaHLTBitMon_ParallelJobs::p, GEMCoPadDigi::pad(), topSingleLeptonDQM_PU_cfi::pattern, promoteALCTGEMpattern_, promoteALCTGEMquality_, promoteCLCTGEMquality_, qcdUeDQM_cfi::quality, GEMCoPadDigi::roll(), GEMCoPadDigi::second(), CSCCorrelatedLCTDigi::setALCT(), CSCCorrelatedLCTDigi::setBend(), CSCCorrelatedLCTDigi::setBX(), CSCCorrelatedLCTDigi::setBX0(), CSCCorrelatedLCTDigi::setCLCT(), CSCCorrelatedLCTDigi::setCSCID(), CSCCorrelatedLCTDigi::setGEM1(), CSCCorrelatedLCTDigi::setGEM2(), CSCCorrelatedLCTDigi::setMPCLink(), CSCCorrelatedLCTDigi::setPattern(), CSCCorrelatedLCTDigi::setQuality(), CSCCorrelatedLCTDigi::setStrip(), CSCCorrelatedLCTDigi::setSyncErr(), CSCCorrelatedLCTDigi::setTrknmb(), CSCCorrelatedLCTDigi::setType(), CSCCorrelatedLCTDigi::setValid(), CSCCorrelatedLCTDigi::setWireGroup(), CSCUpgradeMotherboard::theParity, CSCBaseboard::theTrigChamber, CSCMotherboard::useHighMultiplicityBits_, and validateGeometry_cfg::valid.

◆ constructLCTsGEM() [4/5]

CSCCorrelatedLCTDigi CSCGEMMotherboard::constructLCTsGEM ( const CSCALCTDigi alct,
const GEMCoPadDigi gem,
int  i 
) const
protected

◆ constructLCTsGEM() [5/5]

CSCCorrelatedLCTDigi CSCGEMMotherboard::constructLCTsGEM ( const CSCCLCTDigi clct,
const GEMCoPadDigi gem,
int  i 
) const
protected

Definition at line 77 of file CSCGEMMotherboard.cc.

79  {
80  return constructLCTsGEM(CSCALCTDigi(), clct, GEMPadDigi(), gem, trknmb);
81 }

References constructLCTsGEM().

◆ correlateLCTsGEM() [1/2]

template<class T >
void CSCGEMMotherboard::correlateLCTsGEM ( const T best,
const T second,
const GEMCoPadDigi bestCoPad,
const GEMCoPadDigi secondCoPad,
CSCCorrelatedLCTDigi lct1,
CSCCorrelatedLCTDigi lct2 
) const
protected

Definition at line 491 of file CSCGEMMotherboard.h.

496  {
497  // construct the first LCT from ALCT(CLCT) and a GEM Copad
498  if ((getLctTrigEnable<T>() and bestLCT.isValid()) or (match_trig_enable and bestLCT.isValid())) {
499  lct1 = constructLCTsGEM(bestLCT, bestCoPad, 1);
500  }
501 
502  // construct the second LCT from ALCT(CLCT) and a GEM Copad
503  if ((getLctTrigEnable<T>() and secondLCT.isValid()) or
504  (match_trig_enable and secondLCT.isValid() and secondLCT != bestLCT)) {
505  lct2 = constructLCTsGEM(secondLCT, secondCoPad, 2);
506  }
507 }

References constructLCTsGEM(), CSCCorrelatedLCTDigi::isValid(), CSCMotherboard::match_trig_enable, or, and CSCMotherboard::secondLCT.

◆ correlateLCTsGEM() [2/2]

template<class T >
void CSCGEMMotherboard::correlateLCTsGEM ( const T best,
const T second,
const GEMCoPadDigiIds coPads,
CSCCorrelatedLCTDigi lct1,
CSCCorrelatedLCTDigi lct2 
) const
protected

Definition at line 464 of file CSCGEMMotherboard.h.

468  {
469  T bestLCT = bLCT;
470  T secondLCT = sLCT;
471 
472  // Check which LCTs are valid
473  bool bestValid = bestLCT.isValid();
474  bool secondValid = secondLCT.isValid();
475 
476  // At this point, set both LCTs valid if they are invalid
477  // Duplicate LCTs are taken into account later
478  if (bestValid and !secondValid)
479  secondLCT = bestLCT;
480  if (!bestValid and secondValid)
481  bestLCT = secondLCT;
482 
483  // get best matching copad1
484  const GEMCoPadDigi& bestCoPad = bestMatchingPad<GEMCoPadDigi>(bestLCT, coPads);
485  const GEMCoPadDigi& secondCoPad = bestMatchingPad<GEMCoPadDigi>(secondLCT, coPads);
486 
487  correlateLCTsGEM(bestLCT, secondLCT, bestCoPad, secondCoPad, lct1, lct2);
488 }

References CSCCorrelatedLCTDigi::isValid(), and CSCMotherboard::secondLCT.

Referenced by CSCGEMMotherboardME11::run(), and CSCGEMMotherboardME21::run().

◆ doesWiregroupCrossStrip()

virtual bool CSCGEMMotherboard::doesWiregroupCrossStrip ( int  key_wg,
int  key_strip 
) const
inlineprotectedvirtual

Reimplemented in CSCGEMMotherboardME21, and CSCGEMMotherboardME11.

Definition at line 71 of file CSCGEMMotherboard.h.

71 { return true; }

Referenced by constructLCTsGEM().

◆ findQualityGEM()

unsigned int CSCGEMMotherboard::findQualityGEM ( const CSCALCTDigi aLCT,
const CSCCLCTDigi cLCT,
int  gemlayer 
) const
protected

Definition at line 332 of file CSCGEMMotherboard.cc.

332  {
333  // Either ALCT or CLCT is invalid
334  if (!(aLCT.isValid()) || !(cLCT.isValid())) {
335  // No CLCT
336  if (aLCT.isValid() && !(cLCT.isValid()))
337  return LCT_Quality::NO_CLCT;
338 
339  // No ALCT
340  else if (!(aLCT.isValid()) && cLCT.isValid())
341  return LCT_Quality::NO_ALCT;
342 
343  // No ALCT and no CLCT
344  else
345  return LCT_Quality::INVALID;
346  }
347  // Both ALCT and CLCT are valid
348  else {
349  const int pattern(cLCT.getPattern());
350 
351  // Layer-trigger in CLCT
352  if (pattern == 1)
353  return LCT_Quality::CLCT_LAYER_TRIGGER;
354 
355  // Multi-layer pattern in CLCT
356  else {
357  // ALCT quality is the number of layers hit minus 3.
358  bool a4 = false;
359 
360  // Case of ME11 with GEMs: require 4 layers for ALCT
361  if (theStation == 1)
362  a4 = aLCT.getQuality() >= 1;
363 
364  // Case of ME21 with GEMs: require 4 layers for ALCT+GEM
365  if (theStation == 2)
366  a4 = aLCT.getQuality() + gemlayers >= 1;
367 
368  // CLCT quality is the number of layers hit.
369  const bool c4((cLCT.getQuality() >= 4) or (cLCT.getQuality() >= 3 and gemlayers >= 1));
370 
371  // quality = 4; "reserved for low-quality muons in future"
372 
373  // marginal anode and cathode
374  if (!a4 && !c4)
375  return LCT_Quality::MARGINAL_ANODE_CATHODE;
376 
377  // HQ anode, but marginal cathode
378  else if (a4 && !c4)
379  return LCT_Quality::HQ_ANODE_MARGINAL_CATHODE;
380 
381  // HQ cathode, but marginal anode
382  else if (!a4 && c4)
383  return LCT_Quality::HQ_CATHODE_MARGINAL_ANODE;
384 
385  // HQ muon, but accelerator ALCT
386  else if (a4 && c4) {
387  if (aLCT.getAccelerator())
388  return LCT_Quality::HQ_ACCEL_ALCT;
389 
390  else {
391  // quality = 9; "reserved for HQ muons with future patterns
392  // quality = 10; "reserved for HQ muons with future patterns
393 
394  // High quality muons are determined by their CLCT pattern
395  if (pattern == 2 || pattern == 3)
396  return LCT_Quality::HQ_PATTERN_2_3;
397 
398  else if (pattern == 4 || pattern == 5)
399  return LCT_Quality::HQ_PATTERN_4_5;
400 
401  else if (pattern == 6 || pattern == 7)
402  return LCT_Quality::HQ_PATTERN_6_7;
403 
404  else if (pattern == 8 || pattern == 9)
405  return LCT_Quality::HQ_PATTERN_8_9;
406 
407  else if (pattern == 10)
408  return LCT_Quality::HQ_PATTERN_10;
409 
410  else {
411  if (infoV >= 0)
412  edm::LogWarning("L1CSCTPEmulatorWrongValues")
413  << "+++ findQuality: Unexpected CLCT pattern id = " << pattern << "+++\n";
414  return LCT_Quality::INVALID;
415  }
416  }
417  }
418  }
419  }
420  return LCT_Quality::INVALID;
421 }

References CSCALCTDigi::getAccelerator(), CSCCLCTDigi::getPattern(), CSCALCTDigi::getQuality(), CSCCLCTDigi::getQuality(), CSCBaseboard::infoV, cond::time::INVALID, CSCALCTDigi::isValid(), CSCCLCTDigi::isValid(), or, topSingleLeptonDQM_PU_cfi::pattern, and CSCBaseboard::theStation.

Referenced by constructLCTsGEM().

◆ getBX() [1/2]

int CSCGEMMotherboard::getBX ( const GEMCoPadDigi p) const
protected

Definition at line 254 of file CSCGEMMotherboard.cc.

254 { return p.bx(1); }

References AlCaHLTBitMon_ParallelJobs::p.

◆ getBX() [2/2]

int CSCGEMMotherboard::getBX ( const GEMPadDigi p) const
protected

Definition at line 252 of file CSCGEMMotherboard.cc.

252 { return p.bx(); }

References AlCaHLTBitMon_ParallelJobs::p.

Referenced by matchingPads().

◆ getLctTrigEnable() [1/3]

template<class T >
int CSCGEMMotherboard::getLctTrigEnable ( ) const
private

◆ getLctTrigEnable() [2/3]

template<>
int CSCGEMMotherboard::getLctTrigEnable ( ) const
private

Definition at line 444 of file CSCGEMMotherboard.cc.

444  {
445  return alct_trig_enable;
446 }

References CSCMotherboard::alct_trig_enable.

◆ getLctTrigEnable() [3/3]

template<>
int CSCGEMMotherboard::getLctTrigEnable ( ) const
private

Definition at line 449 of file CSCGEMMotherboard.cc.

449  {
450  return clct_trig_enable;
451 }

References CSCMotherboard::clct_trig_enable.

◆ getLUT()

virtual const CSCGEMMotherboardLUT* CSCGEMMotherboard::getLUT ( ) const
protectedpure virtual

◆ getMaxDeltaBX() [1/3]

template<class T >
int CSCGEMMotherboard::getMaxDeltaBX ( ) const
private

◆ getMaxDeltaBX() [2/3]

template<>
int CSCGEMMotherboard::getMaxDeltaBX ( ) const
private

Definition at line 434 of file CSCGEMMotherboard.cc.

434  {
435  return maxDeltaBXPad_;
436 }

References maxDeltaBXPad_.

◆ getMaxDeltaBX() [3/3]

template<>
int CSCGEMMotherboard::getMaxDeltaBX ( ) const
private

Definition at line 439 of file CSCGEMMotherboard.cc.

439  {
440  return maxDeltaBXCoPad_;
441 }

References maxDeltaBXCoPad_.

◆ getPad() [1/3]

float CSCGEMMotherboard::getPad ( const CSCCLCTDigi clct,
enum CSCPart  par 
) const
protected

Definition at line 272 of file CSCGEMMotherboard.cc.

272  {
273  const auto& mymap = (getLUT()->get_csc_hs_to_gem_pad(theParity, part));
274  int keyStrip = clct.getKeyStrip();
275  //ME1A part, convert halfstrip from 128-223 to 0-95
277  keyStrip = keyStrip - CSCConstants::MAX_HALF_STRIP_ME1B - 1;
278  return 0.5 * (mymap.at(keyStrip).first + mymap.at(keyStrip).second);
279 }

References CSCGEMMotherboardLUT::get_csc_hs_to_gem_pad(), CSCCLCTDigi::getKeyStrip(), getLUT(), CSCConstants::MAX_HALF_STRIP_ME1B, ME1A, and CSCUpgradeMotherboard::theParity.

◆ getPad() [2/3]

float CSCGEMMotherboard::getPad ( const GEMCoPadDigi p) const
protected

Definition at line 267 of file CSCGEMMotherboard.cc.

267  {
268  // average pad number for a GEMCoPad
269  return 0.5 * (p.pad(1) + p.pad(2));
270 }

References AlCaHLTBitMon_ParallelJobs::p.

◆ getPad() [3/3]

float CSCGEMMotherboard::getPad ( const GEMPadDigi p) const
protected

Definition at line 265 of file CSCGEMMotherboard.cc.

265 { return p.pad(); }

References AlCaHLTBitMon_ParallelJobs::p.

Referenced by bestMatchingPad(), and matchingPads().

◆ getPads() [1/3]

template<class T >
const matchesBX<T>& CSCGEMMotherboard::getPads ( ) const
private

◆ getPads() [2/3]

template<>
const matchesBX<GEMPadDigi>& CSCGEMMotherboard::getPads ( ) const
private

Definition at line 424 of file CSCGEMMotherboard.cc.

424  {
425  return pads_;
426 }

References pads_.

◆ getPads() [3/3]

template<>
const matchesBX<GEMCoPadDigi>& CSCGEMMotherboard::getPads ( ) const
private

Definition at line 429 of file CSCGEMMotherboard.cc.

429  {
430  return coPads_;
431 }

References coPads_.

◆ getRoll() [1/2]

int CSCGEMMotherboard::getRoll ( const GEMCoPadDigiId p) const
protected

Definition at line 258 of file CSCGEMMotherboard.cc.

258 { return p.second.roll(); }

References AlCaHLTBitMon_ParallelJobs::p.

◆ getRoll() [2/2]

int CSCGEMMotherboard::getRoll ( const GEMPadDigiId p) const
protected

Definition at line 256 of file CSCGEMMotherboard.cc.

256 { return GEMDetId(p.first).roll(); }

References AlCaHLTBitMon_ParallelJobs::p, and GEMDetId::roll().

Referenced by bestMatchingPad(), and matchingPads().

◆ getRolls()

std::pair< int, int > CSCGEMMotherboard::getRolls ( const CSCALCTDigi alct) const
protected

Definition at line 260 of file CSCGEMMotherboard.cc.

260  {
261  const auto& mymap(getLUT()->get_csc_wg_to_gem_roll(theParity));
262  return std::make_pair(mymap.at(alct.getKeyWG()).first, mymap.at(alct.getKeyWG()).second);
263 }

References dqmdumpme::first, CSCALCTDigi::getKeyWG(), getLUT(), edm::second(), and CSCUpgradeMotherboard::theParity.

Referenced by bestMatchingPad().

◆ isGEMDetId()

bool CSCGEMMotherboard::isGEMDetId ( unsigned int  p) const
protected

Definition at line 248 of file CSCGEMMotherboard.cc.

248  {
249  return (DetId(p).subdetId() == MuonSubdetId::GEM and DetId(p).det() == DetId::Muon);
250 }

References MuonSubdetId::GEM, DetId::Muon, and AlCaHLTBitMon_ParallelJobs::p.

Referenced by bestMatchingPad().

◆ isPadInOverlap()

bool CSCGEMMotherboard::isPadInOverlap ( int  roll) const
protected

Definition at line 235 of file CSCGEMMotherboard.cc.

235  {
236  // this only works for ME1A!
237  const auto& mymap = (getLUT()->get_csc_wg_to_gem_roll(theParity));
238  for (unsigned i = 0; i < mymap.size(); i++) {
239  // overlap region are WGs 10-15
240  if ((i < 10) or (i > 15))
241  continue;
242  if ((mymap.at(i).first <= roll) and (roll <= mymap.at(i).second))
243  return true;
244  }
245  return false;
246 }

References CSCGEMMotherboardLUT::get_csc_wg_to_gem_roll(), getLUT(), mps_fire::i, or, and CSCUpgradeMotherboard::theParity.

Referenced by printGEMTriggerCoPads(), and printGEMTriggerPads().

◆ matchingPads() [1/5]

template<class T >
void CSCGEMMotherboard::matchingPads ( const CSCALCTDigi alct,
matches< T > &  result 
) const
protected

Definition at line 245 of file CSCGEMMotherboard.h.

245  {
246  result.clear();
247  // Invalid ALCTs have no matching pads
248  if (not alct.isValid())
249  return;
250 
251  // Get the corresponding roll numbers for a given ALCT
252  std::pair<int, int> alctRoll = (getLUT()->get_csc_wg_to_gem_roll(theParity))[alct.getKeyWG()];
253 
254  // Get the pads in the ALCT bx
255  const matchesBX<T>& lut = getPads<T>();
256 
257  // If no pads in that bx...
258  if (lut.count(alct.getBX()) == 0)
259  return;
260 
261  for (const auto& p : lut.at(alct.getBX())) {
262  auto padRoll(getRoll(p));
263 
264  int delta;
265  if (GEMDetId(p.first).station() == 2)
266  delta = 1;
267 
268  // pad bx needs to match to ALCT bx
269  int pad_bx = getBX(p.second) + CSCConstants::LCT_CENTRAL_BX;
270 
271  if (std::abs(alct.getBX() - pad_bx) > getMaxDeltaBX<T>())
272  continue;
273 
274  // gem roll number if invalid
275  if (alctRoll.first == CSCGEMMotherboard::DEFAULT_MATCHING_VALUE and
277  continue;
278  // ALCTs at the top of the chamber
279  else if (alctRoll.first == CSCGEMMotherboard::DEFAULT_MATCHING_VALUE and padRoll > alctRoll.second)
280  continue;
281  // ALCTs at the bottom of the chamber
282  else if (alctRoll.second == CSCGEMMotherboard::DEFAULT_MATCHING_VALUE and padRoll < alctRoll.first)
283  continue;
284  // ignore pads that are too far away in roll number
285  else if ((alctRoll.first != CSCGEMMotherboard::DEFAULT_MATCHING_VALUE and
286  alctRoll.second != CSCGEMMotherboard::DEFAULT_MATCHING_VALUE) and
287  (alctRoll.first - delta > padRoll or padRoll > alctRoll.second))
288  continue;
289  result.push_back(p);
290  }
291 }

References funct::abs(), DEFAULT_MATCHING_VALUE, dumpMFGeometry_cfg::delta, CSCGEMMotherboardLUT::get_csc_wg_to_gem_roll(), CSCALCTDigi::getBX(), getBX(), CSCALCTDigi::getKeyWG(), getLUT(), getRoll(), CSCALCTDigi::isValid(), CSCConstants::LCT_CENTRAL_BX, or, AlCaHLTBitMon_ParallelJobs::p, mps_fire::result, GEMDetId::station(), and CSCUpgradeMotherboard::theParity.

◆ matchingPads() [2/5]

template<class T >
void CSCGEMMotherboard::matchingPads ( const CSCCLCTDigi alct,
matches< T > &  result 
) const
protected

Definition at line 294 of file CSCGEMMotherboard.h.

294  {
295  result.clear();
296  // Invalid ALCTs have no matching pads
297  if (not clct.isValid())
298  return;
299 
300  auto part(getCSCPart(clct.getKeyStrip()));
301  // Get the corresponding pad numbers for a given CLCT
302  const auto& mymap = (getLUT()->get_csc_hs_to_gem_pad(theParity, part));
303  int keyStrip = clct.getKeyStrip();
304  //ME1A part, convert halfstrip from 128-223 to 0-95
306  keyStrip = keyStrip - CSCConstants::MAX_HALF_STRIP_ME1B - 1;
307  const int lowPad(mymap[keyStrip].first);
308  const int highPad(mymap[keyStrip].second);
309 
310  // Get the pads in the CLCT bx
311  const matchesBX<T>& lut = getPads<T>();
312 
313  // If no pads in that bx...
314  if (lut.count(clct.getBX()) == 0)
315  return;
316 
317  for (const auto& p : lut.at(clct.getBX())) {
318  // pad bx needs to match to CLCT bx
319  int pad_bx = getBX(p.second) + CSCConstants::LCT_CENTRAL_BX;
320  if (std::abs(clct.getBX() - pad_bx) > getMaxDeltaBX<T>())
321  continue;
322 
323  // pad number must match
324  int padNumber(getPad(p.second));
325  if (std::abs(lowPad - padNumber) <= maxDeltaPadL1_ or std::abs(padNumber - highPad) <= maxDeltaPadL1_) {
326  result.push_back(p);
327  }
328  }
329 }

References funct::abs(), dqmdumpme::first, CSCGEMMotherboardLUT::get_csc_hs_to_gem_pad(), getBX(), CSCCLCTDigi::getBX(), CSCUpgradeMotherboard::getCSCPart(), CSCCLCTDigi::getKeyStrip(), getLUT(), getPad(), CSCCLCTDigi::isValid(), CSCConstants::LCT_CENTRAL_BX, CSCConstants::MAX_HALF_STRIP_ME1B, maxDeltaPadL1_, ME1A, or, AlCaHLTBitMon_ParallelJobs::p, mps_fire::result, edm::second(), and CSCUpgradeMotherboard::theParity.

◆ matchingPads() [3/5]

template<class T >
void CSCGEMMotherboard::matchingPads ( const CSCCLCTDigi clct1,
const CSCALCTDigi alct1,
matches< T > &  result 
) const
protected

Definition at line 348 of file CSCGEMMotherboard.h.

348  {
349  matches<T> padsClct, padsAlct;
350 
351  // pads matching to the CLCT
352  matchingPads<T>(clct1, padsClct);
353 
354  // pads matching to the ALCT
355  matchingPads<T>(alct1, padsAlct);
356 
357  // collect all *common* pads
358  intersection(padsClct, padsAlct, result);
359 }

References CSCUpgradeMotherboard::intersection(), and mps_fire::result.

◆ matchingPads() [4/5]

template<class T >
void CSCGEMMotherboard::matchingPads ( const CSCCLCTDigi clct1,
const CSCCLCTDigi clct2,
const CSCALCTDigi alct1,
const CSCALCTDigi alct2,
matches< T > &  result 
) const
protected

Definition at line 362 of file CSCGEMMotherboard.h.

366  {
367  matches<T> padsClct, padsAlct;
368 
369  // pads matching to CLCTs
370  matchingPads<CSCCLCTDigi, T>(clct1, clct2, padsClct);
371 
372  // pads matching to ALCTs
373  matchingPads<CSCALCTDigi, T>(alct1, alct2, padsAlct);
374 
375  // collect *all* matching pads
376  result.reserve(padsClct.size() + padsAlct.size());
377  result.insert(std::end(result), std::begin(padsClct), std::end(padsClct));
378  result.insert(std::end(result), std::begin(padsAlct), std::end(padsAlct));
379 }

References begin, end, and mps_fire::result.

◆ matchingPads() [5/5]

template<class S , class T >
void CSCGEMMotherboard::matchingPads ( const S d1,
const S d2,
matches< T > &  result 
) const
protected

Definition at line 332 of file CSCGEMMotherboard.h.

332  {
333  matches<T> p1, p2;
334 
335  // pads matching to the CLCT/ALCT
336  matchingPads<T>(d1, p1);
337 
338  // pads matching to the CLCT/ALCT
339  matchingPads<T>(d2, p2);
340 
341  // collect *all* matching pads
342  result.reserve(p1.size() + p2.size());
345 }

References begin, d1, end, p1, p2, and mps_fire::result.

◆ maxPads()

int CSCGEMMotherboard::maxPads ( ) const
protected

◆ maxRolls()

int CSCGEMMotherboard::maxRolls ( ) const
protected

◆ printGEMTriggerCoPads()

void CSCGEMMotherboard::printGEMTriggerCoPads ( int  bx_start,
int  bx_stop,
enum CSCPart  part 
)
protected

Definition at line 311 of file CSCGEMMotherboard.cc.

311  {
312  LogTrace("CSCGEMMotherboard") << "------------------------------------------------------------------------"
313  << std::endl;
314  LogTrace("CSCGEMMotherboard") << "* GEM trigger coincidence pads: " << std::endl;
315 
316  for (int bx = bx_start; bx <= bx_stop; bx++) {
317  const auto& in_pads = coPads_[bx];
318  LogTrace("CSCGEMMotherboard") << "N(copads) BX " << bx << " : " << in_pads.size() << std::endl;
319 
320  for (const auto& pad : in_pads) {
321  LogTrace("CSCGEMMotherboard") << "\tdetId " << GEMDetId(pad.first) << ", pad = " << pad.second;
322  const auto& roll_id(GEMDetId(pad.first));
323 
324  if (part == CSCPart::ME11 and isPadInOverlap(GEMDetId(roll_id).roll()))
325  LogTrace("CSCGEMMotherboard") << " (in overlap)" << std::endl;
326  else
327  LogTrace("CSCGEMMotherboard") << std::endl;
328  }
329  }
330 }

References l1GtPatternGenerator_cfi::bx, coPads_, isPadInOverlap(), LogTrace, and ME11.

Referenced by CSCGEMMotherboardME11::run(), and CSCGEMMotherboardME21::run().

◆ printGEMTriggerPads()

void CSCGEMMotherboard::printGEMTriggerPads ( int  bx_start,
int  bx_stop,
enum CSCPart  part 
)
protected

Definition at line 290 of file CSCGEMMotherboard.cc.

290  {
291  LogTrace("CSCGEMMotherboard") << "------------------------------------------------------------------------"
292  << std::endl;
293  LogTrace("CSCGEMMotherboard") << "* GEM trigger pads: " << std::endl;
294 
295  for (int bx = bx_start; bx <= bx_stop; bx++) {
296  const auto& in_pads = pads_[bx];
297  LogTrace("CSCGEMMotherboard") << "N(pads) BX " << bx << " : " << in_pads.size() << std::endl;
298 
299  for (const auto& pad : in_pads) {
300  LogTrace("CSCGEMMotherboard") << "\tdetId " << GEMDetId(pad.first) << ", pad = " << pad.second;
301  const auto& roll_id(GEMDetId(pad.first));
302 
303  if (part == CSCPart::ME11 and isPadInOverlap(GEMDetId(roll_id).roll()))
304  LogTrace("CSCGEMMotherboard") << " (in overlap)" << std::endl;
305  else
306  LogTrace("CSCGEMMotherboard") << std::endl;
307  }
308  }
309 }

References l1GtPatternGenerator_cfi::bx, isPadInOverlap(), LogTrace, ME11, and pads_.

Referenced by CSCGEMMotherboardME11::run(), and CSCGEMMotherboardME21::run().

◆ readoutLCTs()

std::vector< CSCCorrelatedLCTDigi > CSCUpgradeMotherboard::readoutLCTs
override

Definition at line 260 of file CSCUpgradeMotherboard.cc.

260  {
261  std::vector<CSCCorrelatedLCTDigi> result;
263  if (tmb_cross_bx_algo == 2)
265 
266  // do a final check on the LCTs in readout
267  for (const auto& lct : result) {
268  checkValid(lct);
269  }
270 
271  return result;
272 }

◆ retrieveGEMCoPads()

void CSCGEMMotherboard::retrieveGEMCoPads ( )
protected

Definition at line 62 of file CSCGEMMotherboard.cc.

62  {
63  coPads_.clear();
64  for (const auto& copad : gemCoPadV) {
65  GEMDetId detId(theRegion, 1, theStation, 0, theChamber, 0);
66  // only consider matches with same BX
67  coPads_[CSCConstants::LCT_CENTRAL_BX + copad.bx(1)].emplace_back(detId.rawId(), copad);
68  }
69 }

References coPads_, gemCoPadV, CSCConstants::LCT_CENTRAL_BX, DetId::rawId(), CSCBaseboard::theChamber, CSCBaseboard::theRegion, and CSCBaseboard::theStation.

Referenced by CSCGEMMotherboardME11::run(), and CSCGEMMotherboardME21::run().

◆ retrieveGEMPads()

void CSCGEMMotherboard::retrieveGEMPads ( const GEMPadDigiCollection pads,
unsigned  id 
)
protected

Definition at line 40 of file CSCGEMMotherboard.cc.

40  {
41  pads_.clear();
42  const auto& superChamber(gem_g->superChamber(id));
43  for (const auto& ch : superChamber->chambers()) {
44  for (const auto& roll : ch->etaPartitions()) {
45  GEMDetId roll_id(roll->id());
46  auto pads_in_det = gemPads->get(roll_id);
47  for (auto pad = pads_in_det.first; pad != pads_in_det.second; ++pad) {
48  // ignore invalid pads
49  if (!pad->isValid())
50  continue;
51 
52  const int bx_shifted(CSCConstants::LCT_CENTRAL_BX + pad->bx());
53  // consider matches with BX difference +1/0/-1
54  for (int bx = bx_shifted - maxDeltaBXPad_; bx <= bx_shifted + maxDeltaBXPad_; ++bx) {
55  pads_[bx].emplace_back(roll_id.rawId(), *pad);
56  }
57  }
58  }
59  }
60 }

References l1GtPatternGenerator_cfi::bx, gem_g, CSCConstants::LCT_CENTRAL_BX, maxDeltaBXPad_, pads_, and GEMGeometry::superChamber().

Referenced by CSCGEMMotherboardME11::run(), and CSCGEMMotherboardME21::run().

◆ run() [1/3]

void CSCUpgradeMotherboard::run
override

Definition at line 69 of file CSCUpgradeMotherboard.cc.

69  {
70  clear();
71 
72  if (!(alctProc and clctProc)) {
73  edm::LogError("CSCUpgradeMotherboard|SetupError")
74  << "+++ run() called for non-existing ALCT/CLCT processor! +++ \n";
75  return;
76  }
77 
78  alctProc->setCSCGeometry(cscGeometry_);
79  clctProc->setCSCGeometry(cscGeometry_);
80 
81  alctV = alctProc->run(wiredc); // run anodeLCT
82  clctV = clctProc->run(compdc); // run cathodeLCT
83 
84  // if there are no ALCTs and no CLCTs, it does not make sense to run this TMB
85  if (alctV.empty() and clctV.empty())
86  return;
87 
88  // encode high multiplicity bits
89  unsigned alctBits = alctProc->getHighMultiplictyBits();
91 
92  int used_clct_mask[20];
93  for (int c = 0; c < 20; ++c)
94  used_clct_mask[c] = 0;
95 
96  // ALCT centric matching
97  for (int bx_alct = 0; bx_alct < CSCConstants::MAX_ALCT_TBINS; bx_alct++) {
98  if (alctProc->getBestALCT(bx_alct).isValid()) {
99  const int bx_clct_start(bx_alct - match_trig_window_size / 2 - alctClctOffset_);
100  const int bx_clct_stop(bx_alct + match_trig_window_size / 2 - alctClctOffset_);
101 
102  if (debug_matching) {
103  LogTrace("CSCUpgradeMotherboard")
104  << "========================================================================" << std::endl;
105  LogTrace("CSCUpgradeMotherboard") << "ALCT-CLCT matching in ME34/1 chamber: " << cscId_ << std::endl;
106  LogTrace("CSCUpgradeMotherboard")
107  << "------------------------------------------------------------------------" << std::endl;
108  LogTrace("CSCUpgradeMotherboard") << "+++ Best ALCT Details: ";
109  alctProc->getBestALCT(bx_alct).print();
110  LogTrace("CSCUpgradeMotherboard") << "+++ Second ALCT Details: ";
111  alctProc->getSecondALCT(bx_alct).print();
112 
113  LogTrace("CSCUpgradeMotherboard")
114  << "------------------------------------------------------------------------" << std::endl;
115  LogTrace("CSCUpgradeMotherboard") << "Attempt ALCT-CLCT matching in ME34/13 in bx range: [" << bx_clct_start
116  << "," << bx_clct_stop << "]" << std::endl;
117  }
118 
119  // ALCT-to-CLCT
120  for (int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++) {
121  if (bx_clct < 0 or bx_clct >= CSCConstants::MAX_CLCT_TBINS)
122  continue;
123  if (drop_used_clcts and used_clct_mask[bx_clct])
124  continue;
125  if (clctProc->getBestCLCT(bx_clct).isValid()) {
126  if (debug_matching)
127  LogTrace("CSCUpgradeMotherboard") << "++Valid ME21 CLCT: " << clctProc->getBestCLCT(bx_clct) << std::endl;
128 
129  int mbx = bx_clct - bx_clct_start;
130  CSCUpgradeMotherboard::correlateLCTs(alctProc->getBestALCT(bx_alct),
131  alctProc->getSecondALCT(bx_alct),
132  clctProc->getBestCLCT(bx_clct),
133  clctProc->getSecondCLCT(bx_clct),
134  allLCTs(bx_alct, mbx, 0),
135  allLCTs(bx_alct, mbx, 1));
136  if (infoV > 1)
137  LogTrace("CSCUpgradeMotherboard")
138  << "Successful ALCT-CLCT match in ME21: bx_alct = " << bx_alct << "; match window: [" << bx_clct_start
139  << "; " << bx_clct_stop << "]; bx_clct = " << bx_clct << std::endl;
140  LogTrace("CSCUpgradeMotherboard") << "+++ Best CLCT Details: ";
141  clctProc->getBestCLCT(bx_clct).print();
142  LogTrace("CSCUpgradeMotherboard") << "+++ Second CLCT Details: ";
143  clctProc->getSecondCLCT(bx_clct).print();
144  if (allLCTs(bx_alct, mbx, 0).isValid()) {
145  used_clct_mask[bx_clct] += 1;
147  break;
148  }
149  }
150  }
151  }
152  }
153 
154  // reduction of nLCTs per each BX
155  for (int bx = 0; bx < CSCConstants::MAX_LCT_TBINS; bx++) {
156  // counting
157  unsigned int n = 0;
158  for (unsigned int mbx = 0; mbx < match_trig_window_size; mbx++) {
159  for (int i = 0; i < CSCConstants::MAX_LCTS_PER_CSC; i++) {
160  if (allLCTs(bx, mbx, i).isValid()) {
161  ++n;
162  if (infoV > 0) {
163  LogDebug("CSCUpgradeMotherboard")
164  << "LCT" << i + 1 << " " << bx << "/" << bx + mbx - match_trig_window_size / 2 << ": "
165  << allLCTs(bx, mbx, i) << std::endl;
166  }
167  }
168  }
169  }
170 
171  // some simple cross-bx sorting algorithms
172  if (tmb_cross_bx_algo == 1 and (n > 2)) {
173  n = 0;
174  for (unsigned int mbx = 0; mbx < match_trig_window_size; mbx++) {
175  for (int i = 0; i < CSCConstants::MAX_LCTS_PER_CSC; i++) {
176  if (allLCTs(bx, pref[mbx], i).isValid()) {
177  n++;
178  if (n > 2)
179  allLCTs(bx, pref[mbx], i).clear();
180  }
181  }
182  }
183 
184  n = 0;
185  for (unsigned int mbx = 0; mbx < match_trig_window_size; mbx++) {
186  for (int i = 0; i < CSCConstants::MAX_LCTS_PER_CSC; i++) {
187  if (allLCTs(bx, mbx, i).isValid()) {
188  n++;
189  if (infoV > 0) {
190  LogDebug("CSCUpgradeMotherboard")
191  << "LCT" << i + 1 << " " << bx << "/" << bx + mbx - match_trig_window_size / 2 << ": "
192  << allLCTs(bx, mbx, i) << std::endl;
193  }
194  }
195  }
196  }
197  if (infoV > 0 and n > 0)
198  LogDebug("CSCUpgradeMotherboard") << "bx " << bx << " nnLCT:" << n << " " << n << std::endl;
199  } // x-bx sorting
200  }
201 
202  bool first = true;
203  unsigned int n = 0;
204  for (const auto& p : readoutLCTs()) {
205  if (debug_matching and first) {
206  LogTrace("CSCUpgradeMotherboard") << "========================================================================"
207  << std::endl;
208  LogTrace("CSCUpgradeMotherboard") << "Counting the final LCTs" << std::endl;
209  LogTrace("CSCUpgradeMotherboard") << "========================================================================"
210  << std::endl;
211  first = false;
212  LogTrace("CSCUpgradeMotherboard") << "tmb_cross_bx_algo: " << tmb_cross_bx_algo << std::endl;
213  }
214  n++;
215  if (debug_matching)
216  LogTrace("CSCUpgradeMotherboard") << "LCT " << n << " " << p << std::endl;
217  }
218 }

◆ run() [2/3]

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

◆ run() [3/3]

virtual void CSCGEMMotherboard::run ( const CSCWireDigiCollection wiredc,
const CSCComparatorDigiCollection compdc,
const GEMPadDigiCollection gemPads 
)
pure virtual

◆ setGEMGeometry()

void CSCGEMMotherboard::setGEMGeometry ( const GEMGeometry g)
inline

set CSC and GEM geometries for the matching needs

Definition at line 66 of file CSCGEMMotherboard.h.

66 { gem_g = g; }

References g, and gem_g.

Referenced by CSCTriggerPrimitivesBuilder::build().

◆ setupGeometry()

void CSCGEMMotherboard::setupGeometry ( )
protected

Member Data Documentation

◆ coPadProcessor

std::unique_ptr<GEMCoPadProcessor> CSCGEMMotherboard::coPadProcessor

◆ coPads_

GEMCoPadDigiIdsBX CSCGEMMotherboard::coPads_
protected

◆ doLCTGhostBustingWithGEMs_

bool CSCGEMMotherboard::doLCTGhostBustingWithGEMs_
protected

Definition at line 231 of file CSCGEMMotherboard.h.

◆ gem_g

const GEMGeometry* CSCGEMMotherboard::gem_g
protected

◆ gemCoPadV

std::vector<GEMCoPadDigi> CSCGEMMotherboard::gemCoPadV
protected

◆ gemGeometryAvailable

bool CSCGEMMotherboard::gemGeometryAvailable
protected

Definition at line 207 of file CSCGEMMotherboard.h.

Referenced by CSCGEMMotherboardME11::run(), and CSCGEMMotherboardME21::run().

◆ gemId

unsigned CSCGEMMotherboard::gemId
protected

Chamber id (trigger-type labels).

Definition at line 202 of file CSCGEMMotherboard.h.

Referenced by CSCGEMMotherboard(), maxPads(), maxRolls(), CSCGEMMotherboardME11::run(), and CSCGEMMotherboardME21::run().

◆ maxDeltaBXCoPad_

int CSCGEMMotherboard::maxDeltaBXCoPad_
protected

◆ maxDeltaBXPad_

int CSCGEMMotherboard::maxDeltaBXPad_
protected

Definition at line 216 of file CSCGEMMotherboard.h.

Referenced by getMaxDeltaBX(), and retrieveGEMPads().

◆ maxDeltaPadL1_

int CSCGEMMotherboard::maxDeltaPadL1_
protected

Definition at line 218 of file CSCGEMMotherboard.h.

Referenced by CSCGEMMotherboard(), and matchingPads().

◆ maxDeltaPadL2_

int CSCGEMMotherboard::maxDeltaPadL2_
protected

Definition at line 219 of file CSCGEMMotherboard.h.

Referenced by CSCGEMMotherboard().

◆ pads_

GEMPadDigiIdsBX CSCGEMMotherboard::pads_
protected

◆ promoteALCTGEMpattern_

bool CSCGEMMotherboard::promoteALCTGEMpattern_
protected

Definition at line 225 of file CSCGEMMotherboard.h.

Referenced by constructLCTsGEM().

◆ promoteALCTGEMquality_

bool CSCGEMMotherboard::promoteALCTGEMquality_
protected

Definition at line 227 of file CSCGEMMotherboard.h.

Referenced by constructLCTsGEM().

◆ promoteCLCTGEMquality_

bool CSCGEMMotherboard::promoteCLCTGEMquality_
protected

Definition at line 228 of file CSCGEMMotherboard.h.

Referenced by constructLCTsGEM().

◆ useOldLCTDataFormat_

bool CSCGEMMotherboard::useOldLCTDataFormat_
protected

Definition at line 222 of file CSCGEMMotherboard.h.

MuonSubdetId::GEM
static constexpr int GEM
Definition: MuonSubdetId.h:14
CSCGEMMotherboard::doesWiregroupCrossStrip
virtual bool doesWiregroupCrossStrip(int key_wg, int key_strip) const
Definition: CSCGEMMotherboard.h:71
GEMCoPadProcessor
Definition: GEMCoPadProcessor.h:17
CSCALCTDigi::getBX
uint16_t getBX() const
return BX - five low bits of BXN counter tagged by the ALCT
Definition: CSCALCTDigi.h:70
CSCGEMMotherboard::isPadInOverlap
bool isPadInOverlap(int roll) const
Definition: CSCGEMMotherboard.cc:235
ME11
Definition: CSCUpgradeMotherboardLUT.h:12
mps_fire.i
i
Definition: mps_fire.py:355
CSCMotherboard::match_trig_window_size
unsigned int match_trig_window_size
Definition: CSCMotherboard.h:99
GEMCoPadDigi::bx
int bx(int l) const
Definition: GEMCoPadDigi.cc:29
CSCGEMMotherboardLUT::get_gem_pad_to_csc_hs
virtual std::vector< int > get_gem_pad_to_csc_hs(Parity par, enum CSCPart) const =0
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
GEMCoPadDigi::pad
int pad(int l) const
Definition: GEMCoPadDigi.cc:20
CSCCorrelatedLCTDigi::setValid
void setValid(const uint16_t v)
set valid
Definition: CSCCorrelatedLCTDigi.h:126
CSCMotherboard::checkValid
void checkValid(const CSCCorrelatedLCTDigi &lct) const
Definition: CSCMotherboard.cc:647
GEMPadDigi
Definition: GEMPadDigi.h:15
CSCBaseboard::theRegion
unsigned theRegion
Definition: CSCBaseboard.h:47
CSCGEMMotherboard::maxDeltaPadL2_
int maxDeltaPadL2_
Definition: CSCGEMMotherboard.h:219
CSCCorrelatedLCTDigi::ALCT2GEM
Definition: CSCCorrelatedLCTDigi.h:163
CSCBaseboard::cscGeometry_
const CSCGeometry * cscGeometry_
Definition: CSCBaseboard.h:64
CSCMotherboard::secondLCT
CSCCorrelatedLCTDigi secondLCT[CSCConstants::MAX_LCT_TBINS]
Definition: CSCMotherboard.h:90
CSCConstants::MAX_ALCT_TBINS
Definition: CSCConstants.h:62
CSCMotherboard::useHighMultiplicityBits_
bool useHighMultiplicityBits_
Definition: CSCMotherboard.h:119
CSCBaseboard::tmbParams_
edm::ParameterSet tmbParams_
Definition: CSCBaseboard.h:71
relativeConstraints.station
station
Definition: relativeConstraints.py:67
CSCMotherboard::alctProc
std::unique_ptr< CSCAnodeLCTProcessor > alctProc
Definition: CSCMotherboard.h:75
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CSCGEMMotherboard::getLUT
virtual const CSCGEMMotherboardLUT * getLUT() const =0
CSCBaseboard::theStation
const unsigned theStation
Definition: CSCBaseboard.h:43
CSCUpgradeMotherboard::clear
void clear()
Definition: CSCUpgradeMotherboard.cc:329
CSCCorrelatedLCTDigi::setQuality
void setQuality(const uint16_t q)
set quality code
Definition: CSCCorrelatedLCTDigi.h:123
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
CSCUpgradeMotherboard::intersection
void intersection(const S &d1, const S &d2, S &result) const
Definition: CSCUpgradeMotherboard.h:127
CSCConstants::LCT_CENTRAL_BX
Definition: CSCConstants.h:77
cms::cuda::assert
assert(be >=bs)
CSCGEMMotherboard::constructLCTsGEM
CSCCorrelatedLCTDigi constructLCTsGEM(const CSCALCTDigi &alct, const GEMCoPadDigi &gem, int i) const
Definition: CSCGEMMotherboard.cc:71
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:215
GEMSuperChamber::chamber
const GEMChamber * chamber(GEMDetId id) const
Return the chamber corresponding to the given id.
Definition: GEMSuperChamber.cc:27
CSCCorrelatedLCTDigi::setWireGroup
void setWireGroup(const uint16_t wiregroup)
set wiregroup number
Definition: CSCCorrelatedLCTDigi.h:120
CSCGEMMotherboard::promoteALCTGEMquality_
bool promoteALCTGEMquality_
Definition: CSCGEMMotherboard.h:227
CSCGEMMotherboard::useOldLCTDataFormat_
bool useOldLCTDataFormat_
Definition: CSCGEMMotherboard.h:222
CSCGEMMotherboard::coPads_
GEMCoPadDigiIdsBX coPads_
Definition: CSCGEMMotherboard.h:213
CSCUpgradeMotherboard::tmb_cross_bx_algo
unsigned int tmb_cross_bx_algo
Definition: CSCUpgradeMotherboard.h:109
CSCMotherboard::clct_trig_enable
unsigned int clct_trig_enable
Definition: CSCMotherboard.h:98
makeMuonMisalignmentScenario.endcap
endcap
Definition: makeMuonMisalignmentScenario.py:320
CSCCorrelatedLCTDigi::setBX0
void setBX0(const uint16_t b)
set bx0
Definition: CSCCorrelatedLCTDigi.h:141
dqmdumpme.first
first
Definition: dqmdumpme.py:55
CSCCLCTDigi
Definition: CSCCLCTDigi.h:17
validateGeometry_cfg.valid
valid
Definition: validateGeometry_cfg.py:21
end
#define end
Definition: vmac.h:39
CSCCorrelatedLCTDigi::CLCT2GEM
Definition: CSCCorrelatedLCTDigi.h:164
CSCCorrelatedLCTDigi::setCLCT
void setCLCT(const CSCCLCTDigi &clct)
Definition: CSCCorrelatedLCTDigi.h:174
CSCMotherboard::clctV
std::vector< CSCCLCTDigi > clctV
Definition: CSCMotherboard.h:84
CSCMotherboard::clctProc
std::unique_ptr< CSCCathodeLCTProcessor > clctProc
Definition: CSCMotherboard.h:78
DetId
Definition: DetId.h:17
CSCCorrelatedLCTDigi::setALCT
void setALCT(const CSCALCTDigi &alct)
Definition: CSCCorrelatedLCTDigi.h:173
CSCALCTDigi::getKeyWG
uint16_t getKeyWG() const
return key wire group
Definition: CSCALCTDigi.h:64
CSCCLCTDigi::getQuality
uint16_t getQuality() const
return quality of a pattern (number of layers hit!)
Definition: CSCCLCTDigi.h:51
CSCCorrelatedLCTDigi::setStrip
void setStrip(const uint16_t s)
set strip
Definition: CSCCorrelatedLCTDigi.h:129
LCTContainer::getMatched
void getMatched(std::vector< CSCCorrelatedLCTDigi > &) const
Definition: LCTContainer.cc:23
CSCCLCTDigi::getBend
uint16_t getBend() const
return bend
Definition: CSCCLCTDigi.h:69
part
part
Definition: HCALResponse.h:20
CSCMotherboard::alctV
std::vector< CSCALCTDigi > alctV
Definition: CSCMotherboard.h:83
CSCConstants::MAX_LCTS_PER_CSC
Definition: CSCConstants.h:73
CSCUpgradeMotherboard::readoutLCTs
std::vector< CSCCorrelatedLCTDigi > readoutLCTs() const override
Definition: CSCUpgradeMotherboard.cc:260
CSCGEMMotherboard::correlateLCTsGEM
void correlateLCTsGEM(const T &best, const T &second, const GEMCoPadDigiIds &coPads, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2) const
Definition: CSCGEMMotherboard.h:464
CSCUpgradeMotherboard::getCSCPart
enum CSCPart getCSCPart(int keystrip) const
Definition: CSCUpgradeMotherboard.cc:276
CSCCLCTDigi::getKeyStrip
uint16_t getKeyStrip(uint16_t n=2) const
Definition: CSCCLCTDigi.cc:87
CSCUpgradeMotherboard::setupGeometry
void setupGeometry()
Definition: CSCUpgradeMotherboard.cc:319
CSCUpgradeMotherboard::match_earliest_clct_only
bool match_earliest_clct_only
Definition: CSCUpgradeMotherboard.h:106
cond::time::INVALID
static constexpr TimeType INVALID
Definition: Time.h:33
CSCCorrelatedLCTDigi::setMPCLink
void setMPCLink(const uint16_t &link)
Set mpc link number after MPC sorting.
Definition: CSCCorrelatedLCTDigi.h:110
CSCBaseboard::alctClctOffset_
unsigned int alctClctOffset_
Definition: CSCBaseboard.h:96
p2
double p2[4]
Definition: TauolaWrapper.h:90
CSCUpgradeMotherboard::theParity
Parity theParity
Definition: CSCUpgradeMotherboard.h:92
CSCGEMMotherboardLUT::get_csc_hs_to_gem_pad
virtual std::vector< std::pair< int, int > > get_csc_hs_to_gem_pad(Parity par, enum CSCPart) const =0
CSCConstants::MAX_LCT_TBINS
Definition: CSCConstants.h:63
CSCGEMMotherboard::gemId
unsigned gemId
Definition: CSCGEMMotherboard.h:202
CSCGEMMotherboard::promoteCLCTGEMquality_
bool promoteCLCTGEMquality_
Definition: CSCGEMMotherboard.h:228
CSCALCTDigi::getQuality
uint16_t getQuality() const
return quality of a pattern
Definition: CSCALCTDigi.h:43
CSCCorrelatedLCTDigi::ALCTCLCTGEM
Definition: CSCCorrelatedLCTDigi.h:161
CSCGEMMotherboard::coPadProcessor
std::unique_ptr< GEMCoPadProcessor > coPadProcessor
Definition: CSCGEMMotherboard.h:63
CSCGEMMotherboard::gemCoPadV
std::vector< GEMCoPadDigi > gemCoPadV
Definition: CSCGEMMotherboard.h:209
edm::LogWarning
Definition: MessageLogger.h:141
CSCGEMMotherboard::promoteALCTGEMpattern_
bool promoteALCTGEMpattern_
Definition: CSCGEMMotherboard.h:225
CSCCorrelatedLCTDigi::setBend
void setBend(const uint16_t b)
set bend
Definition: CSCCorrelatedLCTDigi.h:135
GEMCoPadDigi
Definition: GEMCoPadDigi.h:16
CSCUpgradeMotherboard::correlateLCTs
void correlateLCTs(const CSCALCTDigi &bestALCT, const CSCALCTDigi &secondALCT, const CSCCLCTDigi &bestCLCT, const CSCCLCTDigi &secondCLCT, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2) const
Definition: CSCUpgradeMotherboard.cc:220
CSCCorrelatedLCTDigi::setGEM1
void setGEM1(const GEMPadDigi &gem)
Definition: CSCCorrelatedLCTDigi.h:175
CSCCorrelatedLCTDigi::ALCTCLCT2GEM
Definition: CSCCorrelatedLCTDigi.h:162
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
CSCCorrelatedLCTDigi::setBX
void setBX(const uint16_t b)
set bx
Definition: CSCCorrelatedLCTDigi.h:138
CSCCorrelatedLCTDigi::setTrknmb
void setTrknmb(const uint16_t number)
Set track number (1,2) after sorting LCTs.
Definition: CSCCorrelatedLCTDigi.h:107
edm::ParameterSet
Definition: ParameterSet.h:36
edm::LogError
Definition: MessageLogger.h:183
ME1A
Definition: CSCUpgradeMotherboardLUT.h:12
LCTContainer::clear
void clear()
Definition: LCTContainer.cc:31
CSCUpgradeMotherboard::debug_matching
bool debug_matching
Definition: CSCUpgradeMotherboard.h:115
CSCGEMMotherboard::isGEMDetId
bool isGEMDetId(unsigned int) const
Definition: CSCGEMMotherboard.cc:248
CSCCorrelatedLCTDigi::setPattern
void setPattern(const uint16_t p)
set pattern
Definition: CSCCorrelatedLCTDigi.h:132
CSCGEMMotherboard::getRoll
int getRoll(const GEMPadDigiId &p) const
Definition: CSCGEMMotherboard.cc:256
GEMDetId::roll
constexpr int roll() const
Definition: GEMDetId.h:188
CSCCorrelatedLCTDigi::setGEM2
void setGEM2(const GEMPadDigi &gem)
Definition: CSCCorrelatedLCTDigi.h:176
CSCConstants::MAX_HALF_STRIP_ME1B
Definition: CSCConstants.h:39
dumpMFGeometry_cfg.delta
delta
Definition: dumpMFGeometry_cfg.py:25
GEMDetId
Definition: GEMDetId.h:17
CSCCorrelatedLCTDigi::setCSCID
void setCSCID(const uint16_t c)
set cscID
Definition: CSCCorrelatedLCTDigi.h:147
CSCGEMMotherboardLUT::get_gem_roll_to_csc_wg
std::vector< int > get_gem_roll_to_csc_wg(Parity par) const
Definition: CSCUpgradeMotherboardLUT.cc:106
CSCCLCTDigi::isValid
bool isValid() const
check CLCT validity (1 - valid CLCT)
Definition: CSCCLCTDigi.h:45
CSCUpgradeMotherboard::sortLCTs
void sortLCTs(std::vector< CSCCorrelatedLCTDigi > &lcts, bool(*sorter)(const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &)) const
Definition: CSCUpgradeMotherboard.cc:312
topSingleLeptonDQM_PU_cfi.pattern
pattern
Definition: topSingleLeptonDQM_PU_cfi.py:39
CSCUpgradeMotherboard::pref
int pref[CSCConstants::MAX_LCT_TBINS]
Definition: CSCUpgradeMotherboard.h:103
p1
double p1[4]
Definition: TauolaWrapper.h:89
GEMCoPadDigi::second
GEMPadDigi second() const
Definition: GEMCoPadDigi.h:30
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
CSCGEMMotherboard::getRolls
std::pair< int, int > getRolls(const CSCALCTDigi &) const
Definition: CSCGEMMotherboard.cc:260
CSCBaseboard::theChamber
unsigned theChamber
Definition: CSCBaseboard.h:49
CSCCorrelatedLCTDigi::setSyncErr
void setSyncErr(const uint16_t s)
set syncErr
Definition: CSCCorrelatedLCTDigi.h:144
CSCUpgradeMotherboard::CSCUpgradeMotherboard
CSCUpgradeMotherboard()
Definition: CSCUpgradeMotherboard.cc:51
gem
Definition: AMC13Event.h:6
GEMChamber::etaPartition
const GEMEtaPartition * etaPartition(GEMDetId id) const
Return the eta partition corresponding to the given id.
Definition: GEMChamber.cc:33
CSCMotherboard::drop_used_clcts
bool drop_used_clcts
Definition: CSCMotherboard.h:105
CSCMotherboard::encodeHighMultiplicityBits
void encodeHighMultiplicityBits(unsigned alctBits)
Definition: CSCMotherboard.cc:638
GEMChamber::nEtaPartitions
int nEtaPartitions() const
Retunr numbers of eta partitions.
Definition: GEMChamber.cc:31
CSCUpgradeMotherboard::sortLCTsByQuality
static bool sortLCTsByQuality(const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &)
Definition: CSCUpgradeMotherboard.cc:304
CSCMotherboard::getBXShiftedCLCT
CSCCLCTDigi getBXShiftedCLCT(const CSCCLCTDigi &) const
Definition: CSCMotherboard.cc:632
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
GEMEtaPartition::npads
int npads() const
number of GEM-CSC trigger readout pads in partition
Definition: GEMEtaPartition.cc:43
CSCGEMMotherboard::findQualityGEM
unsigned int findQualityGEM(const CSCALCTDigi &, const CSCCLCTDigi &, int gemlayer) const
Definition: CSCGEMMotherboard.cc:332
CSCUpgradeMotherboard::allLCTs
LCTContainer allLCTs
Definition: CSCUpgradeMotherboard.h:98
CSCGEMMotherboardLUT::get_csc_wg_to_gem_roll
std::vector< std::pair< int, int > > get_csc_wg_to_gem_roll(Parity par, int layer=1) const
Definition: CSCUpgradeMotherboardLUT.cc:98
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
CSCGEMMotherboard::maxDeltaBXPad_
int maxDeltaBXPad_
Definition: CSCGEMMotherboard.h:216
qcdUeDQM_cfi.quality
quality
Definition: qcdUeDQM_cfi.py:31
CSCALCTDigi::getAccelerator
uint16_t getAccelerator() const
Definition: CSCALCTDigi.h:50
trklet::bend
double bend(double r, double rinv, double stripPitch)
Definition: Util.h:160
T
long double T
Definition: Basic3DVectorLD.h:48
CSCMotherboard::highMultiplicityBits_
unsigned int highMultiplicityBits_
Definition: CSCMotherboard.h:118
CSCGEMMotherboard::maxRolls
int maxRolls() const
Definition: CSCGEMMotherboard.cc:288
CSCALCTDigi
Definition: CSCALCTDigi.h:16
GEMCoPadDigi::roll
int roll() const
Definition: GEMCoPadDigi.h:25
CSCMotherboard::alct_trig_enable
unsigned int alct_trig_enable
Definition: CSCMotherboard.h:98
CSCConstants::MAX_CLCT_TBINS
Definition: CSCConstants.h:61
relativeConstraints.chamber
chamber
Definition: relativeConstraints.py:53
or
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
Definition: Activities.doc:12
CSCGEMMotherboard::clear
void clear()
Definition: CSCGEMMotherboard.cc:34
CSCBaseboard::theTrigChamber
const unsigned theTrigChamber
Definition: CSCBaseboard.h:46
GEMDetId::minRollId
static constexpr int32_t minRollId
Definition: GEMDetId.h:32
CSCMotherboard::encodePattern
unsigned int encodePattern(const int clctPattern) const
Definition: CSCMotherboard.cc:522
CSCGEMMotherboard::DEFAULT_MATCHING_VALUE
Definition: CSCGEMMotherboard.h:31
CSCGEMMotherboard::doLCTGhostBustingWithGEMs_
bool doLCTGhostBustingWithGEMs_
Definition: CSCGEMMotherboard.h:231
CSCGEMMotherboard::pads_
GEMPadDigiIdsBX pads_
Definition: CSCGEMMotherboard.h:212
CSCGEMMotherboard::maxDeltaBXCoPad_
int maxDeltaBXCoPad_
Definition: CSCGEMMotherboard.h:217
CSCBaseboard::cscId_
CSCDetId cscId_
Definition: CSCBaseboard.h:56
S
Definition: CSCDBL1TPParametersExtended.h:16
CSCALCTDigi::isValid
bool isValid() const
check ALCT validity (1 - valid ALCT)
Definition: CSCALCTDigi.h:37
CSCGEMMotherboard::getPad
float getPad(const GEMPadDigi &) const
Definition: CSCGEMMotherboard.cc:265
GEMDetId::station
constexpr int station() const
Definition: GEMDetId.h:173
CSCGEMMotherboard::maxPads
int maxPads() const
Definition: CSCGEMMotherboard.cc:286
mps_fire.result
result
Definition: mps_fire.py:303
DetId::Muon
Definition: DetId.h:26
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
CSCMotherboard::match_trig_enable
unsigned int match_trig_enable
Definition: CSCMotherboard.h:98
GEMPadDigi::isValid
bool isValid() const
Definition: GEMPadDigi.cc:22
GEMGeometry::superChamber
const GEMSuperChamber * superChamber(GEMDetId id) const
Definition: GEMGeometry.cc:69
CSCMotherboard::getBXShiftedALCT
CSCALCTDigi getBXShiftedALCT(const CSCALCTDigi &) const
Definition: CSCMotherboard.cc:626
CSCCLCTDigi::getPattern
uint16_t getPattern() const
return pattern
Definition: CSCCLCTDigi.h:57
CSCUpgradeMotherboard::generator_
std::unique_ptr< CSCUpgradeMotherboardLUTGenerator > generator_
Definition: CSCUpgradeMotherboard.h:100
CSCCorrelatedLCTDigi::setType
void setType(int type)
Definition: CSCCorrelatedLCTDigi.h:171
CSCCorrelatedLCTDigi::isValid
bool isValid() const
return valid pattern bit
Definition: CSCCorrelatedLCTDigi.h:50
CSCGEMMotherboard::getBX
int getBX(const GEMPadDigi &p) const
Definition: CSCGEMMotherboard.cc:252
CSCGEMMotherboard::maxDeltaPadL1_
int maxDeltaPadL1_
Definition: CSCGEMMotherboard.h:218
begin
#define begin
Definition: vmac.h:32
GEMCoPadDigi::first
GEMPadDigi first() const
Definition: GEMCoPadDigi.h:29
d1
static constexpr float d1
Definition: L1EGammaCrystalsEmulatorProducer.cc:84
CSCGEMMotherboard::gem_g
const GEMGeometry * gem_g
Definition: CSCGEMMotherboard.h:206
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
GEMCoPadDigi::isValid
bool isValid() const
Definition: GEMCoPadDigi.cc:18
ME1B
Definition: CSCUpgradeMotherboardLUT.h:12
CSCBaseboard::infoV
int infoV
Definition: CSCBaseboard.h:62