CMS 3D CMS Logo

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

#include <CSCUpgradeMotherboard.h>

Inheritance diagram for CSCUpgradeMotherboard:
CSCMotherboard CSCGEMMotherboard CSCMotherboardME11 CSCMotherboardME3141 CSCGEMMotherboardME11 CSCGEMMotherboardME21

Classes

class  LCTContainer
 

Public Member Functions

void clear ()
 
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 ()
 
enum CSCPart getCSCPart (int keystrip) const
 
template<class S >
void intersection (const S &d1, const S &d2, S &result) const
 
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 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 Member Functions

void setPrefIndex ()
 
- 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 clctPattern) const
 
unsigned int findQuality (const CSCALCTDigi &aLCT, const CSCCLCTDigi &cLCT) const
 
CSCALCTDigi getBXShiftedALCT (const CSCALCTDigi &) const
 

Protected Attributes

LCTContainer allLCTs
 
const CSCChambercscChamber
 
bool debug_luts
 
bool debug_matching
 
bool disableME1a
 
bool gangedME1a
 
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
 
- Protected Attributes inherited from CSCMotherboard
unsigned int alct_trig_enable
 
unsigned int alctClctOffset
 
edm::ParameterSet alctParams_
 
std::vector< CSCALCTDigialctV
 
bool clct_to_alct
 
unsigned int clct_trig_enable
 
edm::ParameterSet clctParams_
 
std::vector< CSCCLCTDigiclctV
 
edm::ParameterSet commonParams_
 
const CSCGeometrycsc_g
 
bool drop_used_alcts
 
bool drop_used_clcts
 
int early_tbins
 
CSCCorrelatedLCTDigi firstLCT [CSCConstants::MAX_LCT_TBINS]
 
int infoV
 
bool isSLHC_
 
unsigned int match_trig_enable
 
unsigned int match_trig_window_size
 
unsigned int mpc_block_me1a
 
bool readout_earliest_2
 
bool runME11ILT_
 
bool runME21ILT_
 
bool runME3141ILT_
 
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
 
edm::ParameterSet tmbParams_
 

Additional Inherited Members

- Public Attributes inherited from CSCMotherboard
std::unique_ptr< CSCAnodeLCTProcessoralctProc
 
std::unique_ptr< CSCCathodeLCTProcessorclctProc
 
- 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 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 57 of file CSCUpgradeMotherboard.cc.

References CSCTriggerNumbering::chamberFromTriggerLabels(), CSCMotherboard::clct_to_alct, debug_luts, debug_matching, CSCMotherboard::drop_used_clcts, Even, generator_, edm::ParameterSet::getParameter(), CSCMotherboard::isSLHC_, match_earliest_alct_only, match_earliest_clct_only, max_lcts, Odd, par, setPrefIndex(), theChamber, CSCMotherboard::theEndcap, theRegion, CSCMotherboard::theSector, CSCMotherboard::theStation, CSCMotherboard::theSubsector, CSCMotherboard::theTrigChamber, tmb_cross_bx_algo, and CSCMotherboard::tmbParams_.

60  :
61  // special configuration parameters for ME11 treatment
62  CSCMotherboard(endcap, station, sector, subsector, chamber, conf)
64  // special configuration parameters for ME11 treatment
65  , disableME1a(commonParams_.getParameter<bool>("disableME1a"))
66  , gangedME1a(commonParams_.getParameter<bool>("gangedME1a"))
67 {
68  if (!isSLHC_) edm::LogError("CSCUpgradeMotherboard|ConfigError")
69  << "+++ Upgrade CSCUpgradeMotherboard constructed while isSLHC_ is not set! +++\n";
70 
71  theRegion = (theEndcap == 1) ? 1: -1;
74 
75  // generate the LUTs
77 
78  match_earliest_alct_only = tmbParams_.getParameter<bool>("matchEarliestAlctOnly");
79  match_earliest_clct_only = tmbParams_.getParameter<bool>("matchEarliestClctOnly");
80  clct_to_alct = tmbParams_.getParameter<bool>("clctToAlct");
81  drop_used_clcts = tmbParams_.getParameter<bool>("tmbDropUsedClcts");
82  tmb_cross_bx_algo = tmbParams_.getParameter<unsigned int>("tmbCrossBxAlgorithm");
83  max_lcts = tmbParams_.getParameter<unsigned int>("maxLCTs");
84  debug_matching = tmbParams_.getParameter<bool>("debugMatching");
85  debug_luts = tmbParams_.getParameter<bool>("debugLUTs");
86 
87  setPrefIndex();
88 }
const unsigned theSector
T getParameter(std::string const &) const
unsigned int match_trig_window_size
std::unique_ptr< CSCUpgradeMotherboardLUTGenerator > generator_
const unsigned theTrigChamber
const unsigned theEndcap
edm::ParameterSet tmbParams_
const unsigned theStation
edm::ParameterSet commonParams_
const unsigned theSubsector
static int chamberFromTriggerLabels(int TriggerSector, int TriggerSubSector, int station, int TriggerCSCID)
CSCUpgradeMotherboard::CSCUpgradeMotherboard ( )

Definition at line 90 of file CSCUpgradeMotherboard.cc.

References CSCMotherboard::isSLHC_, and setPrefIndex().

91  : CSCMotherboard()
93 {
94  if (!isSLHC_) edm::LogError("CSCUpgradeMotherboard|ConfigError")
95  << "+++ Upgrade CSCUpgradeMotherboard constructed while isSLHC_ is not set! +++\n";
96 
97  setPrefIndex();
98 }
unsigned int match_trig_window_size
CSCUpgradeMotherboard::~CSCUpgradeMotherboard ( )
override

Definition at line 100 of file CSCUpgradeMotherboard.cc.

101 {
102 }

Member Function Documentation

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

Definition at line 150 of file CSCUpgradeMotherboard.h.

Referenced by intersection().

151 {
152  return (p.first == q.first) and (p.second == q.second);
153 }
void CSCUpgradeMotherboard::debugLUTs ( )
enum CSCPart CSCUpgradeMotherboard::getCSCPart ( int  keystrip) const

get CSCPart from HS, station, ring number

Definition at line 104 of file CSCUpgradeMotherboard.cc.

References gangedME1a, CSCConstants::MAX_HALF_STRIP_ME1B, ME11, ME1A, ME1Ag, ME1B, ME21, ME31, ME41, or, CSCMotherboard::theRing, and CSCMotherboard::theStation.

Referenced by CSCGEMMotherboard::bestMatchingPad(), CSCGEMMotherboard::constructLCTsGEM(), and CSCGEMMotherboard::matchingPads().

105 {
106  if (theStation == 1 and (theRing ==1 or theRing == 4)){
107  if (keystrip > CSCConstants::MAX_HALF_STRIP_ME1B){
108  if ( !gangedME1a )
109  return CSCPart::ME1Ag;
110  else
111  return CSCPart::ME1A;
112  }else if (keystrip <= CSCConstants::MAX_HALF_STRIP_ME1B and keystrip >= 0)
113  return CSCPart::ME1B;
114  else
115  return CSCPart::ME11;
116  }else if (theStation == 2 and theRing == 1 )
117  return CSCPart::ME21;
118  else if (theStation == 3 and theRing == 1 )
119  return CSCPart::ME31;
120  else if (theStation == 4 and theRing == 1 )
121  return CSCPart::ME41;
122  else{
123  edm::LogError("CSCUpgradeMotherboard|Error") <<" ++ getCSCPart() failed to find the CSC chamber for in case ";
124  return CSCPart::ME11;// return ME11 by default
125  }
126 }
const unsigned theStation
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
template<class S >
void CSCUpgradeMotherboard::intersection ( const S d1,
const S d2,
S result 
) const

Definition at line 156 of file CSCUpgradeMotherboard.h.

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

Referenced by CSCGEMMotherboard::matchingPads().

157 {
158  for (const auto& p: d1){
159  for (const auto& q: d2){
160  if (compare(p,q)){
161  result.push_back(p);
162  }
163  }
164  }
165  }
bool compare(const S &p, const S &q) const
void CSCUpgradeMotherboard::setPrefIndex ( )
protected

Definition at line 161 of file CSCUpgradeMotherboard.cc.

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

Referenced by CSCUpgradeMotherboard().

162 {
164  for (unsigned int m=2; m<match_trig_window_size; m+=2)
165  {
166  pref[m-1] = pref[0] - m/2;
167  pref[m] = pref[0] + m/2;
168  }
169 }
unsigned int match_trig_window_size
int pref[CSCConstants::MAX_LCT_TBINS]
void CSCUpgradeMotherboard::setupGeometry ( )

Definition at line 151 of file CSCUpgradeMotherboard.cc.

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

Referenced by CSCGEMMotherboard::setupGeometry().

152 {
153  // check whether chamber is even or odd
155  const CSCDetId csc_id(theEndcap, theStation, theStation, chid, 0);
156  cscChamber = csc_g->chamber(csc_id);
157  generator_->setCSCGeometry(csc_g);
158 }
const unsigned theSector
std::unique_ptr< CSCUpgradeMotherboardLUTGenerator > generator_
const unsigned theTrigChamber
const unsigned theEndcap
const CSCChamber * cscChamber
const CSCGeometry * csc_g
const unsigned theStation
const unsigned theSubsector
const CSCChamber * chamber(CSCDetId id) const
Return the chamber corresponding to given DetId.
Definition: CSCGeometry.cc:133
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 143 of file CSCUpgradeMotherboard.cc.

References max_lcts, and MCScenario_CRAFT1_22X::sorter().

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

145 {
146  std::sort(lcts.begin(), lcts.end(), *sorter);
147  if (lcts.size() > max_lcts) lcts.erase(lcts.begin()+max_lcts, lcts.end());
148 }
bool CSCUpgradeMotherboard::sortLCTsByGEMDphi ( const CSCCorrelatedLCTDigi lct1,
const CSCCorrelatedLCTDigi lct2 
)
static

Definition at line 138 of file CSCUpgradeMotherboard.cc.

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

139 {
140  return true;
141 }
bool CSCUpgradeMotherboard::sortLCTsByQuality ( const CSCCorrelatedLCTDigi lct1,
const CSCCorrelatedLCTDigi lct2 
)
static

Methods to sort the LCTs

Definition at line 133 of file CSCUpgradeMotherboard.cc.

References CSCCorrelatedLCTDigi::getQuality().

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

134 {
135  return lct1.getQuality() > lct2.getQuality();
136 }
int getQuality() const
return the 4 bit Correlated LCT Quality

Member Data Documentation

LCTContainer CSCUpgradeMotherboard::allLCTs
protected
const CSCChamber* CSCUpgradeMotherboard::cscChamber
protected
bool CSCUpgradeMotherboard::debug_luts
protected

Definition at line 146 of file CSCUpgradeMotherboard.h.

Referenced by CSCUpgradeMotherboard(), and debugLUTs().

bool CSCUpgradeMotherboard::debug_matching
protected
bool CSCUpgradeMotherboard::disableME1a
protected

SLHC: special configuration parameters for ME11 treatment.

Definition at line 124 of file CSCUpgradeMotherboard.h.

Referenced by CSCMotherboardME11::getLCTs1a().

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

Definition at line 133 of file CSCUpgradeMotherboard.h.

Referenced by CSCUpgradeMotherboard(), and CSCMotherboardME11::run().

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 140 of file CSCUpgradeMotherboard.h.

Referenced by CSCUpgradeMotherboard(), 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 131 of file CSCUpgradeMotherboard.h.

Referenced by CSCMotherboardME3141::run(), CSCGEMMotherboardME21::run(), CSCMotherboardME11::run(), and setPrefIndex().

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

Chamber id (trigger-type labels).

Definition at line 119 of file CSCUpgradeMotherboard.h.

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

unsigned int CSCUpgradeMotherboard::tmb_cross_bx_algo
protected