#include <CSCMotherboard.h>
Public Member Functions | |
void | clear () |
CSCMotherboard (unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf) | |
CSCMotherboard () | |
std::vector< CSCCorrelatedLCTDigi > | getLCTs () |
std::vector< CSCCorrelatedLCTDigi > | readoutLCTs () |
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], const std::vector< int > ds_times[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS]) |
std::vector< CSCCorrelatedLCTDigi > | run (const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc) |
void | setConfigParameters (const CSCDBL1TPParameters *conf) |
~CSCMotherboard () | |
Public Attributes | |
CSCAnodeLCTProcessor * | alct |
CSCCathodeLCTProcessor * | clct |
Private Types | |
enum | { MAX_LCT_BINS = 16 } |
Private Member Functions | |
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 () |
Private Attributes | |
unsigned int | alct_trig_enable |
unsigned int | clct_trig_enable |
CSCCorrelatedLCTDigi | firstLCT [MAX_LCT_BINS] |
int | infoV |
bool | isMTCC |
bool | isTMB07 |
unsigned int | match_trig_enable |
unsigned int | match_trig_window_size |
unsigned int | mpc_block_me1a |
CSCCorrelatedLCTDigi | secondLCT [MAX_LCT_BINS] |
const unsigned | theEndcap |
const unsigned | theSector |
const unsigned | theStation |
const unsigned | theSubsector |
const unsigned | theTrigChamber |
unsigned int | tmb_l1a_window_size |
Static Private Attributes | |
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 |
Correlates anode and cathode LCTs from the same chamber.
When the Trigger MotherBoard (TMB) is instantiated it instantiates an ALCT and CLCT board. The MotherBoard takes up to two LCTs from each anode and cathode LCT card and combines them into a single Correlated LCT. The output is up to two Correlated LCTs.
It can be run in either a test mode, where the arguments are a collection of wire times and arrays of halfstrip and distrip times, or for general use, with wire digi and comparator digi collections as arguments. In the latter mode, the wire & strip info is passed on the LCTProcessors, where it is decoded and converted into a convenient form. After running the anode and cathode LCTProcessors, TMB correlates the anode and cathode LCTs. At present, it simply matches the best CLCT with the best ALCT; perhaps a better algorithm will be determined in the future. The MotherBoard then determines a few more numbers (such as quality and pattern) from the ALCT and CLCT information, and constructs two correlated LCT "digis".
Based on code by Nick Wisniewski (nw@it) and a framework by Darin Acosta ( s.ca ltech .eduacost). a@ph ys.uf l.ed u
Numerous later improvements by Jason Mumford and Slava Valuev (see cvs in ORCA). Porting from ORCA by S. Valuev (Slava), May 2006. .Val uev@c ern. ch
Definition at line 43 of file CSCMotherboard.h.
|
private |
Maximum number of time bins.
Enumerator | |
---|---|
MAX_LCT_BINS |
Definition at line 116 of file CSCMotherboard.h.
CSCMotherboard::CSCMotherboard | ( | unsigned | endcap, |
unsigned | station, | ||
unsigned | sector, | ||
unsigned | subsector, | ||
unsigned | chamber, | ||
const edm::ParameterSet & | conf | ||
) |
Normal constructor.
Definition at line 51 of file CSCMotherboard.cc.
References alct, alct_trig_enable, checkConfigParameters(), clct, clct_trig_enable, dumpConfigParams(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), infoV, isMTCC, isTMB07, match_trig_enable, match_trig_window_size, mpc_block_me1a, and tmb_l1a_window_size.
CSCMotherboard::CSCMotherboard | ( | ) |
Constructor for use during testing.
Definition at line 120 of file CSCMotherboard.cc.
References alct, alct_trig_enable, checkConfigParameters(), clct, clct_trig_enable, def_alct_trig_enable, def_clct_trig_enable, def_match_trig_enable, def_match_trig_window_size, def_mpc_block_me1a, def_tmb_l1a_window_size, dumpConfigParams(), infoV, isMTCC, isTMB07, match_trig_enable, match_trig_window_size, mpc_block_me1a, and tmb_l1a_window_size.
CSCMotherboard::~CSCMotherboard | ( | ) |
|
private |
Make sure that the parameter values are within the allowed range.
Definition at line 186 of file CSCMotherboard.cc.
References alct_trig_enable, clct_trig_enable, def_alct_trig_enable, def_clct_trig_enable, def_match_trig_enable, def_match_trig_window_size, def_mpc_block_me1a, def_tmb_l1a_window_size, infoV, match_trig_enable, match_trig_window_size, mpc_block_me1a, and tmb_l1a_window_size.
Referenced by CSCMotherboard(), and setConfigParameters().
void CSCMotherboard::clear | ( | void | ) |
Clears correlated LCT and passes clear signal on to cathode and anode LCT processors.
Definition at line 153 of file CSCMotherboard.cc.
References alct, clct, CSCCorrelatedLCTDigi::clear(), CSCAnodeLCTProcessor::clear(), CSCCathodeLCTProcessor::clear(), firstLCT, MAX_LCT_BINS, and secondLCT.
Referenced by python.Vispa.Views.BoxDecayView.BoxDecayView::closeEvent(), run(), python.Vispa.Views.LineDecayView.LineDecayView::setDataObjects(), and python.Vispa.Views.BoxDecayView.BoxDecayView::updateContent().
|
private |
Definition at line 547 of file CSCMotherboard.cc.
References encodePattern(), findQuality(), CSCCLCTDigi::getBend(), CSCALCTDigi::getBX(), CSCCLCTDigi::getBX(), CSCCLCTDigi::getKeyStrip(), CSCALCTDigi::getKeyWG(), CSCCLCTDigi::getPattern(), CSCCLCTDigi::getStripType(), CSCALCTDigi::isValid(), listBenchmarks::pattern, and theTrigChamber.
Referenced by correlateLCTs().
|
private |
Definition at line 492 of file CSCMotherboard.cc.
References alct_trig_enable, clct_trig_enable, constructLCTs(), firstLCT, CSCCorrelatedLCTDigi::getBX(), infoV, CSCCLCTDigi::isValid(), CSCALCTDigi::isValid(), match_trig_enable, MAX_LCT_BINS, secondLCT, and CSCCorrelatedLCTDigi::setTrknmb().
Referenced by run().
|
private |
Dump TMB/MPC configuration parameters.
Definition at line 767 of file CSCMotherboard.cc.
References alct_trig_enable, clct_trig_enable, LogDebug, match_trig_enable, match_trig_window_size, mpc_block_me1a, and tmb_l1a_window_size.
Referenced by CSCMotherboard(), and setConfigParameters().
|
private |
Definition at line 568 of file CSCMotherboard.cc.
References abs, isTMB07, and listBenchmarks::pattern.
Referenced by constructLCTs(), and testLCT().
|
private |
Definition at line 594 of file CSCMotherboard.cc.
References CSCALCTDigi::getAccelerator(), CSCCLCTDigi::getPattern(), CSCALCTDigi::getQuality(), CSCCLCTDigi::getQuality(), CSCCLCTDigi::getStripType(), infoV, isTMB07, CSCCLCTDigi::isValid(), CSCALCTDigi::isValid(), evf::evtn::offset(), and listBenchmarks::pattern.
Referenced by constructLCTs(), and testLCT().
std::vector< CSCCorrelatedLCTDigi > CSCMotherboard::getLCTs | ( | ) |
Returns vector of all found correlated LCTs, if any.
Definition at line 473 of file CSCMotherboard.cc.
References firstLCT, MAX_LCT_BINS, mpc_block_me1a, CSCTriggerNumbering::ringFromTriggerLabels(), secondLCT, theStation, and theTrigChamber.
Referenced by readoutLCTs().
std::vector< CSCCorrelatedLCTDigi > CSCMotherboard::readoutLCTs | ( | ) |
Returns vector of correlated LCTs in the read-out time window, if any.
Definition at line 397 of file CSCMotherboard.cc.
References getLCTs(), infoV, LogDebug, MAX_LCT_BINS, and tmb_l1a_window_size.
Referenced by run().
void CSCMotherboard::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], | ||
const std::vector< int > | ds_times[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS] | ||
) |
Test version of run function.
Definition at line 248 of file CSCMotherboard.cc.
References alct, CSCAnodeLCTProcessor::bestALCT, CSCCathodeLCTProcessor::bestCLCT, clct, clear(), correlateLCTs(), CSCCLCTDigi::isValid(), CSCALCTDigi::isValid(), match_trig_window_size, CSCAnodeLCTProcessor::MAX_ALCT_BINS, CSCCathodeLCTProcessor::MAX_CLCT_BINS, CSCAnodeLCTProcessor::run(), CSCCathodeLCTProcessor::run(), CSCAnodeLCTProcessor::secondALCT, and CSCCathodeLCTProcessor::secondCLCT.
Referenced by CSCTriggerPrimitivesBuilder::build().
std::vector< CSCCorrelatedLCTDigi > CSCMotherboard::run | ( | const CSCWireDigiCollection * | wiredc, |
const CSCComparatorDigiCollection * | compdc | ||
) |
Run function for normal usage. Runs cathode and anode LCT processors, takes results and correlates into CorrelatedLCT.
Definition at line 299 of file CSCMotherboard.cc.
References alct, CSCAnodeLCTProcessor::bestALCT, CSCCathodeLCTProcessor::bestCLCT, clct, clear(), correlateLCTs(), firstLCT, infoV, CSCCLCTDigi::isValid(), CSCALCTDigi::isValid(), LogDebug, LogTrace, match_trig_window_size, CSCAnodeLCTProcessor::MAX_ALCT_BINS, CSCCathodeLCTProcessor::MAX_CLCT_BINS, MAX_LCT_BINS, readoutLCTs(), CSCAnodeLCTProcessor::run(), CSCCathodeLCTProcessor::run(), CSCAnodeLCTProcessor::secondALCT, CSCCathodeLCTProcessor::secondCLCT, and secondLCT.
void CSCMotherboard::setConfigParameters | ( | const CSCDBL1TPParameters * | conf | ) |
Set configuration parameters obtained via EventSetup mechanism.
Definition at line 163 of file CSCMotherboard.cc.
References alct, alct_trig_enable, checkConfigParameters(), clct, clct_trig_enable, dumpConfigParams(), match_trig_enable, match_trig_window_size, mpc_block_me1a, CSCAnodeLCTProcessor::setConfigParameters(), CSCCathodeLCTProcessor::setConfigParameters(), tmb_l1a_window_size, CSCDBL1TPParameters::tmbAlctTrigEnable(), CSCDBL1TPParameters::tmbClctTrigEnable(), CSCDBL1TPParameters::tmbMatchTrigEnable(), CSCDBL1TPParameters::tmbMatchTrigWindowSize(), CSCDBL1TPParameters::tmbMpcBlockMe1a(), and CSCDBL1TPParameters::tmbTmbL1aWindowSize().
Referenced by CSCTriggerPrimitivesBuilder::setConfigParameters().
|
private |
Definition at line 709 of file CSCMotherboard.cc.
References encodePattern(), findQuality(), CSCCLCTDigi::getBend(), CSCALCTDigi::getBX(), CSCCLCTDigi::getKeyStrip(), CSCALCTDigi::getKeyWG(), CSCCLCTDigi::getPattern(), CSCCLCTDigi::getStripType(), LogTrace, listBenchmarks::pattern, and strip().
CSCAnodeLCTProcessor* CSCMotherboard::alct |
Anode LCT processor.
Definition at line 81 of file CSCMotherboard.h.
Referenced by CSCTriggerPrimitivesBuilder::build(), clear(), CSCMotherboard(), run(), setConfigParameters(), and ~CSCMotherboard().
|
private |
Definition at line 106 of file CSCMotherboard.h.
Referenced by checkConfigParameters(), correlateLCTs(), CSCMotherboard(), dumpConfigParams(), and setConfigParameters().
CSCCathodeLCTProcessor* CSCMotherboard::clct |
Cathode LCT processor.
Definition at line 84 of file CSCMotherboard.h.
Referenced by CSCTriggerPrimitivesBuilder::build(), clear(), CSCMotherboard(), run(), setConfigParameters(), and ~CSCMotherboard().
|
private |
Definition at line 106 of file CSCMotherboard.h.
Referenced by checkConfigParameters(), correlateLCTs(), CSCMotherboard(), dumpConfigParams(), and setConfigParameters().
|
staticprivate |
Definition at line 111 of file CSCMotherboard.h.
Referenced by checkConfigParameters(), and CSCMotherboard().
|
staticprivate |
Definition at line 111 of file CSCMotherboard.h.
Referenced by checkConfigParameters(), and CSCMotherboard().
|
staticprivate |
Definition at line 112 of file CSCMotherboard.h.
Referenced by checkConfigParameters(), and CSCMotherboard().
|
staticprivate |
Definition at line 112 of file CSCMotherboard.h.
Referenced by checkConfigParameters(), and CSCMotherboard().
|
staticprivate |
Default values of configuration parameters.
Definition at line 110 of file CSCMotherboard.h.
Referenced by checkConfigParameters(), and CSCMotherboard().
|
staticprivate |
Definition at line 113 of file CSCMotherboard.h.
Referenced by checkConfigParameters(), and CSCMotherboard().
|
private |
Container for first correlated LCT.
Definition at line 119 of file CSCMotherboard.h.
Referenced by clear(), correlateLCTs(), getLCTs(), and run().
|
private |
Verbosity level: 0: no print (default). 1: print LCTs found.
Definition at line 89 of file CSCMotherboard.h.
Referenced by checkConfigParameters(), correlateLCTs(), CSCMotherboard(), findQuality(), readoutLCTs(), and run().
|
private |
|
private |
Flag for new (2007) version of TMB firmware.
Definition at line 102 of file CSCMotherboard.h.
Referenced by CSCMotherboard(), encodePattern(), and findQuality().
|
private |
Definition at line 106 of file CSCMotherboard.h.
Referenced by checkConfigParameters(), correlateLCTs(), CSCMotherboard(), dumpConfigParams(), and setConfigParameters().
|
private |
Definition at line 107 of file CSCMotherboard.h.
Referenced by checkConfigParameters(), CSCMotherboard(), dumpConfigParams(), run(), and setConfigParameters().
|
private |
Configuration parameters.
Definition at line 105 of file CSCMotherboard.h.
Referenced by checkConfigParameters(), CSCMotherboard(), dumpConfigParams(), getLCTs(), and setConfigParameters().
|
private |
Container for second correlated LCT.
Definition at line 122 of file CSCMotherboard.h.
Referenced by clear(), correlateLCTs(), getLCTs(), and run().
|
private |
Chamber id (trigger-type labels).
Definition at line 92 of file CSCMotherboard.h.
|
private |
Definition at line 94 of file CSCMotherboard.h.
|
private |
Definition at line 93 of file CSCMotherboard.h.
Referenced by getLCTs().
|
private |
Definition at line 95 of file CSCMotherboard.h.
|
private |
Definition at line 96 of file CSCMotherboard.h.
Referenced by constructLCTs(), and getLCTs().
|
private |
Definition at line 107 of file CSCMotherboard.h.
Referenced by checkConfigParameters(), CSCMotherboard(), dumpConfigParams(), readoutLCTs(), and setConfigParameters().