CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Protected Attributes
CSCUpgradeMotherboard Class Reference

#include <CSCUpgradeMotherboard.h>

Inheritance diagram for CSCUpgradeMotherboard:
CSCMotherboard CSCGEMMotherboard CSCMotherboardME3141 CSCGEMMotherboardME11 CSCGEMMotherboardME21

Classes

class  LCTContainer
 

Public Member Functions

template<class S >
bool compare (const S &p, const S &q) const
 
 CSCUpgradeMotherboard (unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)
 
 CSCUpgradeMotherboard ()
 
void debugLUTs ()
 
template<class S >
void intersection (const S &d1, const S &d2, S &result) const
 
void setCSCGeometry (const CSCGeometry *g)
 
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 (unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)
 
 CSCMotherboard ()
 
std::vector< CSCCorrelatedLCTDigigetLCTs () const
 
std::vector< CSCCorrelatedLCTDigireadoutLCTs () const
 
void run (const std::vector< int > w_time[CSCConstants::NUM_LAYERS][CSCConstants::MAX_NUM_WIRES], const std::vector< int > hs_times[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS], const std::vector< int > ds_times[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS])
 
void run (const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc)
 
void setConfigParameters (const CSCDBL1TPParameters *conf)
 
void setCSCGeometry (const CSCGeometry *g)
 
virtual ~CSCMotherboard ()=default
 

Static Public Member Functions

static bool sortLCTsByGEMDphi (const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &)
 
static bool sortLCTsByQuality (const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &)
 

Protected Attributes

std::vector< CSCALCTDigialctV
 
bool clct_to_alct
 
edm::ParameterSet commonParams_
 
const CSCGeometrycsc_g
 
const CSCChambercscChamber
 
bool debug_luts
 
bool debug_matching
 
bool drop_used_clcts
 
std::unique_ptr< CSCUpgradeMotherboardLUTGeneratorgenerator_
 
bool match_earliest_alct_only
 
bool match_earliest_clct_only
 
unsigned int max_lcts
 
Parity par
 
int pref [CSCConstants::MAX_LCT_TBINS]
 
unsigned theChamber
 
unsigned theRegion
 
unsigned int tmb_cross_bx_algo
 
edm::ParameterSet tmbParams_
 
- Protected Attributes inherited from CSCMotherboard
unsigned int alct_trig_enable
 
bool clct_to_alct
 
unsigned int clct_trig_enable
 
const CSCGeometrycsc_g
 
bool drop_used_alcts
 
bool drop_used_clcts
 
int early_tbins
 
CSCCorrelatedLCTDigi firstLCT [CSCConstants::MAX_LCT_TBINS]
 
int infoV
 
bool isMTCC
 
bool isSLHC
 
bool isTMB07
 
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]
 
const unsigned theEndcap
 
unsigned theRing
 
const unsigned theSector
 
const unsigned theStation
 
const unsigned theSubsector
 
const unsigned theTrigChamber
 
unsigned int tmb_l1a_window_size
 

Additional Inherited Members

- Public Attributes inherited from CSCMotherboard
std::unique_ptr< CSCAnodeLCTProcessoralct
 
std::unique_ptr< CSCCathodeLCTProcessorclct
 
- 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
}
 
- Protected Member Functions inherited from CSCMotherboard
void checkConfigParameters ()
 
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
 
unsigned int encodePattern (const int ptn, const int highPt) const
 
unsigned int findQuality (const CSCALCTDigi &aLCT, const CSCCLCTDigi &cLCT) const
 
CSCALCTDigi getBXShiftedALCT (const CSCALCTDigi &) const
 
void testLCT ()
 
- 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 upgrade TMBs (MEX/1) chambers, that either run the upgrade CSC-only TMB algorithm or the CSC-GEM algorithm

Author
Sven Dildick (TAMU)

Definition at line 38 of file CSCUpgradeMotherboard.h.

Constructor & Destructor Documentation

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

Definition at line 35 of file CSCUpgradeMotherboard.cc.

References CSCTriggerNumbering::chamberFromTriggerLabels(), clct_to_alct, commonParams_, debug_luts, debug_matching, drop_used_clcts, Even, generator_, edm::ParameterSet::getParameter(), CSCMotherboard::isSLHC, funct::m, match_earliest_alct_only, match_earliest_clct_only, CSCMotherboard::match_trig_window_size, max_lcts, Odd, or, par, pref, theChamber, CSCMotherboard::theEndcap, theRegion, CSCMotherboard::theSector, CSCMotherboard::theStation, CSCMotherboard::theSubsector, CSCMotherboard::theTrigChamber, tmb_cross_bx_algo, and tmbParams_.

38  :
39  CSCMotherboard(endcap, station, sector, subsector, chamber, conf)
40 {
41  if (!isSLHC) edm::LogError("L1CSCTPEmulatorConfigError")
42  << "+++ Upgrade CSCUpgradeMotherboard constructed while isSLHC is not set! +++\n";
43 
44  theRegion = (theEndcap == 1) ? 1: -1;
47 
48  commonParams_ = conf.getParameter<edm::ParameterSet>("commonParam");
49  if (theStation==1) tmbParams_ = conf.getParameter<edm::ParameterSet>("me11tmbSLHCGEM");
50  else if (theStation==2) tmbParams_ = conf.getParameter<edm::ParameterSet>("me21tmbSLHCGEM");
51  else if (theStation==3 or theStation==4) tmbParams_ = conf.getParameter<edm::ParameterSet>("me3141tmbSLHC");
52 
54 
55  match_earliest_alct_only = tmbParams_.getParameter<bool>("matchEarliestAlctOnly");
56  match_earliest_clct_only = tmbParams_.getParameter<bool>("matchEarliestClctOnly");
57  clct_to_alct = tmbParams_.getParameter<bool>("clctToAlct");
58  drop_used_clcts = tmbParams_.getParameter<bool>("tmbDropUsedClcts");
59  tmb_cross_bx_algo = tmbParams_.getParameter<unsigned int>("tmbCrossBxAlgorithm");
60  max_lcts = tmbParams_.getParameter<unsigned int>("maxLCTs");
61  debug_matching = tmbParams_.getParameter<bool>("debugMatching");
62  debug_luts = tmbParams_.getParameter<bool>("debugLUTs");
63 
65  for (unsigned int m=2; m<match_trig_window_size; m+=2)
66  {
67  pref[m-1] = pref[0] - m/2;
68  pref[m] = pref[0] + m/2;
69  }
70 }
T getParameter(std::string const &) const
const unsigned theSector
unsigned int match_trig_window_size
std::unique_ptr< CSCUpgradeMotherboardLUTGenerator > generator_
const unsigned theTrigChamber
const unsigned theEndcap
int pref[CSCConstants::MAX_LCT_TBINS]
const unsigned theStation
edm::ParameterSet commonParams_
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
const unsigned theSubsector
edm::ParameterSet tmbParams_
static int chamberFromTriggerLabels(int TriggerSector, int TriggerSubSector, int station, int TriggerCSCID)
CSCUpgradeMotherboard::CSCUpgradeMotherboard ( )

Definition at line 72 of file CSCUpgradeMotherboard.cc.

References funct::m, CSCMotherboard::match_trig_window_size, and pref.

72  : CSCMotherboard()
73 {
75  for (unsigned int m=2; m<match_trig_window_size; m+=2)
76  {
77  pref[m-1] = pref[0] - m/2;
78  pref[m] = pref[0] + m/2;
79  }
80 }
unsigned int match_trig_window_size
int pref[CSCConstants::MAX_LCT_TBINS]
CSCUpgradeMotherboard::~CSCUpgradeMotherboard ( )
override

Definition at line 82 of file CSCUpgradeMotherboard.cc.

83 {
84 }

Member Function Documentation

template<class S >
bool CSCUpgradeMotherboard::compare ( const S p,
const S q 
) const

Definition at line 146 of file CSCUpgradeMotherboard.h.

Referenced by intersection().

147 {
148  return (p.first == q.first) and (p.second == q.second);
149 }
void CSCUpgradeMotherboard::debugLUTs ( )
template<class S >
void CSCUpgradeMotherboard::intersection ( const S d1,
const S d2,
S result 
) const

Definition at line 152 of file CSCUpgradeMotherboard.h.

References compare(), AlCaHLTBitMon_ParallelJobs::p, and lumiQueryAPI::q.

Referenced by CSCGEMMotherboard::matchingPads().

153 {
154  for (const auto& p: d1){
155  for (const auto& q: d2){
156  if (compare(p,q)){
157  result.push_back(p);
158  }
159  }
160  }
161  }
bool compare(const S &p, const S &q) const
void CSCUpgradeMotherboard::setCSCGeometry ( const CSCGeometry g)
inline

Definition at line 98 of file CSCUpgradeMotherboard.h.

References csc_g, debugLUTs(), g, and setupGeometry().

Referenced by CSCTriggerPrimitivesBuilder::build().

98 { csc_g = 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
const CSCGeometry * csc_g
void CSCUpgradeMotherboard::setupGeometry ( )

Definition at line 109 of file CSCUpgradeMotherboard.cc.

References CSCGeometry::chamber(), CSCTriggerNumbering::chamberFromTriggerLabels(), csc_g, cscChamber, generator_, CSCMotherboard::theEndcap, CSCMotherboard::theSector, CSCMotherboard::theStation, CSCMotherboard::theSubsector, and CSCMotherboard::theTrigChamber.

Referenced by setCSCGeometry(), and CSCGEMMotherboard::setupGeometry().

110 {
111  // check whether chamber is even or odd
113  const CSCDetId csc_id(theEndcap, theStation, theStation, chid, 0);
114  cscChamber = csc_g->chamber(csc_id);
115  generator_->setCSCGeometry(csc_g);
116 }
const unsigned theSector
std::unique_ptr< CSCUpgradeMotherboardLUTGenerator > generator_
const unsigned theTrigChamber
const unsigned theEndcap
const CSCChamber * cscChamber
const unsigned theStation
const CSCGeometry * csc_g
const unsigned theSubsector
const CSCChamber * chamber(CSCDetId id) const
Return the chamber corresponding to given DetId.
Definition: CSCGeometry.cc:118
static int chamberFromTriggerLabels(int TriggerSector, int TriggerSubSector, int station, int TriggerCSCID)
void CSCUpgradeMotherboard::sortLCTs ( std::vector< CSCCorrelatedLCTDigi > &  lcts,
bool(*)(const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &)  sorter 
) const

Definition at line 101 of file CSCUpgradeMotherboard.cc.

References max_lcts, and MCScenario_CRAFT1_22X::sorter().

Referenced by CSCMotherboardME3141::readoutLCTs(), CSCGEMMotherboardME21::readoutLCTs(), and CSCGEMMotherboardME11::sortLCTs().

103 {
104  std::sort(lcts.begin(), lcts.end(), *sorter);
105  if (lcts.size() > max_lcts) lcts.erase(lcts.begin()+max_lcts, lcts.end());
106 }
bool CSCUpgradeMotherboard::sortLCTsByGEMDphi ( const CSCCorrelatedLCTDigi lct1,
const CSCCorrelatedLCTDigi lct2 
)
static

Definition at line 96 of file CSCUpgradeMotherboard.cc.

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

97 {
98  return true;
99 }
bool CSCUpgradeMotherboard::sortLCTsByQuality ( const CSCCorrelatedLCTDigi lct1,
const CSCCorrelatedLCTDigi lct2 
)
static

Methods to sort the LCTs

Definition at line 91 of file CSCUpgradeMotherboard.cc.

References CSCCorrelatedLCTDigi::getQuality().

Referenced by CSCMotherboardME3141::readoutLCTs(), CSCGEMMotherboardME21::readoutLCTs(), and CSCGEMMotherboardME11::readoutLCTs().

92 {
93  return lct1.getQuality() > lct2.getQuality();
94 }
int getQuality() const
return the 4 bit Correlated LCT Quality

Member Data Documentation

std::vector<CSCALCTDigi> CSCUpgradeMotherboard::alctV
protected
bool CSCUpgradeMotherboard::clct_to_alct
protected

if true: use regular CLCT-to-ALCT matching in TMB if false: do ALCT-to-CLCT matching

Definition at line 127 of file CSCUpgradeMotherboard.h.

Referenced by CSCUpgradeMotherboard().

edm::ParameterSet CSCUpgradeMotherboard::commonParams_
protected
const CSCGeometry* CSCUpgradeMotherboard::csc_g
protected
const CSCChamber* CSCUpgradeMotherboard::cscChamber
protected
bool CSCUpgradeMotherboard::debug_luts
protected

Definition at line 142 of file CSCUpgradeMotherboard.h.

Referenced by CSCUpgradeMotherboard(), and debugLUTs().

bool CSCUpgradeMotherboard::debug_matching
protected
bool CSCUpgradeMotherboard::drop_used_clcts
protected

whether to not reuse CLCTs that were used by previous matching ALCTs in ALCT-to-CLCT algorithm

Definition at line 131 of file CSCUpgradeMotherboard.h.

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

std::unique_ptr<CSCUpgradeMotherboardLUTGenerator> CSCUpgradeMotherboard::generator_
protected
bool CSCUpgradeMotherboard::match_earliest_alct_only
protected

Definition at line 122 of file CSCUpgradeMotherboard.h.

Referenced by CSCUpgradeMotherboard().

bool CSCUpgradeMotherboard::match_earliest_clct_only
protected
unsigned int CSCUpgradeMotherboard::max_lcts
protected

maximum lcts per BX in MEX1: 2, 3, 4 or 999

Definition at line 136 of file CSCUpgradeMotherboard.h.

Referenced by CSCUpgradeMotherboard(), CSCGEMMotherboardME11::run(), CSCGEMMotherboardME11::sortLCTs(), and sortLCTs().

Parity CSCUpgradeMotherboard::par
protected
int CSCUpgradeMotherboard::pref[CSCConstants::MAX_LCT_TBINS]
protected

"preferential" index array in matching window for cross-BX sorting

Definition at line 120 of file CSCUpgradeMotherboard.h.

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

unsigned CSCUpgradeMotherboard::theChamber
protected
unsigned CSCUpgradeMotherboard::theRegion
protected

Chamber id (trigger-type labels).

Definition at line 105 of file CSCUpgradeMotherboard.h.

Referenced by CSCGEMMotherboard::CSCGEMMotherboard(), CSCUpgradeMotherboard(), and CSCGEMMotherboard::retrieveGEMCoPads().

unsigned int CSCUpgradeMotherboard::tmb_cross_bx_algo
protected
edm::ParameterSet CSCUpgradeMotherboard::tmbParams_
protected