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

Classes

class  LCTContainer
 

Public Member Functions

template<class S >
bool compare (const S &p, const S &q)
 
 CSCUpgradeMotherboard (unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)
 
 CSCUpgradeMotherboard ()
 
void debugLUTs ()
 
template<class S >
S intersection (const S &d1, const S &d2)
 
void setCSCGeometry (const CSCGeometry *g)
 
void setupGeometry ()
 
void sortLCTs (std::vector< CSCCorrelatedLCTDigi > &lcts, bool(*sorter)(const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &))
 
virtual ~CSCUpgradeMotherboard ()
 
- 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 ()
 
std::vector< CSCCorrelatedLCTDigireadoutLCTs ()
 
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)
 
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 [MAX_LCT_BINS]
 
unsigned theChamber
 
unsigned theRegion
 
unsigned int tmb_cross_bx_algo
 
edm::ParameterSet tmbParams_
 
- Protected Attributes inherited from CSCMotherboard
unsigned int alct_trig_enable
 
unsigned int clct_trig_enable
 
bool drop_used_alcts
 
int early_tbins
 
CSCCorrelatedLCTDigi firstLCT [MAX_LCT_BINS]
 
int infoV
 
bool isMTCC
 
bool isSLHC
 
bool isTMB07
 
int lct_central_bx
 
unsigned int match_trig_enable
 
unsigned int match_trig_window_size
 
unsigned int mpc_block_me1a
 
bool readout_earliest_2
 
CSCCorrelatedLCTDigi secondLCT [MAX_LCT_BINS]
 
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  { MAX_LCT_BINS = 16 }
 
- Protected Member Functions inherited from CSCMotherboard
void checkConfigParameters ()
 
CSCCorrelatedLCTDigi constructLCTs (const CSCALCTDigi &aLCT, const CSCCLCTDigi &cLCT)
 
void correlateLCTs (CSCALCTDigi bestALCT, CSCALCTDigi secondALCT, CSCCLCTDigi bestCLCT, CSCCLCTDigi secondCLCT)
 
void dumpConfigParams () const
 
unsigned int encodePattern (const int ptn, const int highPt)
 
unsigned int findQuality (const CSCALCTDigi &aLCT, const CSCCLCTDigi &cLCT)
 
void testLCT ()
 
- Static Protected Member Functions inherited from CSCMotherboard
static bool sortByGEMDphi (const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &)
 
static bool sortByQuality (const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &)
 
- 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

Definition at line 26 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 21 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_.

24  :
25  CSCMotherboard(endcap, station, sector, subsector, chamber, conf)
26 {
27  if (!isSLHC) edm::LogError("L1CSCTPEmulatorConfigError")
28  << "+++ Upgrade CSCUpgradeMotherboard constructed while isSLHC is not set! +++\n";
29 
30  theRegion = (theEndcap == 1) ? 1: -1;
33 
34  commonParams_ = conf.getParameter<edm::ParameterSet>("commonParam");
35  if (theStation==1) tmbParams_ = conf.getParameter<edm::ParameterSet>("me11tmbSLHCGEM");
36  else if (theStation==2) tmbParams_ = conf.getParameter<edm::ParameterSet>("me21tmbSLHCGEM");
37  else if (theStation==3 or theStation==4) tmbParams_ = conf.getParameter<edm::ParameterSet>("me3141tmbSLHCRPC");
38 
40 
41  match_earliest_alct_only = tmbParams_.getParameter<bool>("matchEarliestAlctOnly");
42  match_earliest_clct_only = tmbParams_.getParameter<bool>("matchEarliestClctOnly");
43  clct_to_alct = tmbParams_.getParameter<bool>("clctToAlct");
44  drop_used_clcts = tmbParams_.getParameter<bool>("tmbDropUsedClcts");
45  tmb_cross_bx_algo = tmbParams_.getParameter<unsigned int>("tmbCrossBxAlgorithm");
46  max_lcts = tmbParams_.getParameter<unsigned int>("maxLCTs");
47  debug_matching = tmbParams_.getParameter<bool>("debugMatching");
48  debug_luts = tmbParams_.getParameter<bool>("debugLUTs");
49 
51  for (unsigned int m=2; m<match_trig_window_size; m+=2)
52  {
53  pref[m-1] = pref[0] - m/2;
54  pref[m] = pref[0] + m/2;
55  }
56 }
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
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 58 of file CSCUpgradeMotherboard.cc.

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

58  : CSCMotherboard()
59 {
61  for (unsigned int m=2; m<match_trig_window_size; m+=2)
62  {
63  pref[m-1] = pref[0] - m/2;
64  pref[m] = pref[0] + m/2;
65  }
66 }
unsigned int match_trig_window_size
CSCUpgradeMotherboard::~CSCUpgradeMotherboard ( )
virtual

Definition at line 68 of file CSCUpgradeMotherboard.cc.

69 {
70 }

Member Function Documentation

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

Definition at line 110 of file CSCUpgradeMotherboard.h.

Referenced by intersection().

111 {
112  return (p.first == q.first) and (p.second == q.second);
113 }
void CSCUpgradeMotherboard::debugLUTs ( )

Definition at line 72 of file CSCUpgradeMotherboard.cc.

References debug_luts, generator_, CSCMotherboard::theEndcap, CSCMotherboard::theSector, CSCMotherboard::theStation, CSCMotherboard::theSubsector, and CSCMotherboard::theTrigChamber.

Referenced by setCSCGeometry().

73 {
75 }
const unsigned theSector
std::unique_ptr< CSCUpgradeMotherboardLUTGenerator > generator_
const unsigned theTrigChamber
const unsigned theEndcap
const unsigned theStation
const unsigned theSubsector
template<class S >
S CSCUpgradeMotherboard::intersection ( const S d1,
const S d2 
)

Definition at line 116 of file CSCUpgradeMotherboard.h.

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

Referenced by CSCGEMMotherboard::matchingPads().

117 {
118  S result;
119  for (const auto& p: d1){
120  for (const auto& q: d2){
121  if (compare(p,q)){
122  result.push_back(p);
123  break;
124  }
125  }
126  }
127  return result;
128  }
bool compare(const S &p, const S &q)
double S(const TLorentzVector &, const TLorentzVector &)
Definition: Particle.cc:99
void CSCUpgradeMotherboard::setCSCGeometry ( const CSCGeometry g)
inline

Definition at line 62 of file CSCUpgradeMotherboard.h.

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

62 { 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 93 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().

94 {
95  // check whether chamber is even or odd
97  const CSCDetId csc_id(theEndcap, theStation, theStation, chid, 0);
98  cscChamber = csc_g->chamber(csc_id);
99  generator_->setCSCGeometry(csc_g);
100 }
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 
)

Definition at line 87 of file CSCUpgradeMotherboard.cc.

References max_lcts, and MCScenario_CRAFT1_22X::sorter().

87  {
88  std::sort(lcts.begin(), lcts.end(), *sorter);
89  if (lcts.size() > max_lcts) lcts.erase(lcts.begin()+max_lcts, lcts.end());
90 }
bool CSCUpgradeMotherboard::sortLCTsByGEMDphi ( const CSCCorrelatedLCTDigi lct1,
const CSCCorrelatedLCTDigi lct2 
)
static

Definition at line 82 of file CSCUpgradeMotherboard.cc.

83 {
84  return true;
85 }
bool CSCUpgradeMotherboard::sortLCTsByQuality ( const CSCCorrelatedLCTDigi lct1,
const CSCCorrelatedLCTDigi lct2 
)
static

Methods to sort the LCTs

Definition at line 77 of file CSCUpgradeMotherboard.cc.

References CSCCorrelatedLCTDigi::getQuality().

78 {
79  return lct1.getQuality() > lct2.getQuality();
80 }
int getQuality() const
return the 4 bit Correlated LCT Quality

Member Data Documentation

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

Definition at line 79 of file CSCUpgradeMotherboard.h.

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

Referenced by CSCUpgradeMotherboard().

edm::ParameterSet CSCUpgradeMotherboard::commonParams_
protected

Definition at line 74 of file CSCUpgradeMotherboard.h.

Referenced by CSCUpgradeMotherboard().

const CSCGeometry* CSCUpgradeMotherboard::csc_g
protected

Definition at line 76 of file CSCUpgradeMotherboard.h.

Referenced by setCSCGeometry(), and setupGeometry().

const CSCChamber* CSCUpgradeMotherboard::cscChamber
protected

Definition at line 77 of file CSCUpgradeMotherboard.h.

Referenced by setupGeometry().

bool CSCUpgradeMotherboard::debug_luts
protected

Definition at line 106 of file CSCUpgradeMotherboard.h.

Referenced by CSCUpgradeMotherboard(), and debugLUTs().

bool CSCUpgradeMotherboard::debug_matching
protected

Definition at line 103 of file CSCUpgradeMotherboard.h.

Referenced by CSCUpgradeMotherboard().

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

Referenced by CSCUpgradeMotherboard().

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

Definition at line 86 of file CSCUpgradeMotherboard.h.

Referenced by CSCUpgradeMotherboard().

bool CSCUpgradeMotherboard::match_earliest_clct_only
protected

Definition at line 87 of file CSCUpgradeMotherboard.h.

Referenced by CSCUpgradeMotherboard().

unsigned int CSCUpgradeMotherboard::max_lcts
protected

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

Definition at line 100 of file CSCUpgradeMotherboard.h.

Referenced by CSCUpgradeMotherboard(), and sortLCTs().

Parity CSCUpgradeMotherboard::par
protected
int CSCUpgradeMotherboard::pref[MAX_LCT_BINS]
protected

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

Definition at line 84 of file CSCUpgradeMotherboard.h.

Referenced by CSCUpgradeMotherboard().

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

Chamber id (trigger-type labels).

Definition at line 69 of file CSCUpgradeMotherboard.h.

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

unsigned int CSCUpgradeMotherboard::tmb_cross_bx_algo
protected

Definition at line 97 of file CSCUpgradeMotherboard.h.

Referenced by CSCUpgradeMotherboard().

edm::ParameterSet CSCUpgradeMotherboard::tmbParams_
protected