|
![CMS Logo](/cmsdoxygen/common/rightImage.jpg) |
Go to the documentation of this file. 1 #ifndef L1Trigger_CSCTriggerPrimitives_CSCGEMMotherboard_h
2 #define L1Trigger_CSCTriggerPrimitives_CSCGEMMotherboard_h
97 template <
class S,
class T>
234 const matchesBX<T>&
getPads()
const;
254 const matchesBX<T>& lut = getPads<T>();
257 if (lut.count(alct.
getBX()) == 0)
260 for (
const auto&
p : lut.at(alct.
getBX())) {
286 (alctRoll.first -
delta > padRoll
or padRoll > alctRoll.second))
306 const int lowPad(mymap[keyStrip].
first);
307 const int highPad(mymap[keyStrip].
second);
310 const matchesBX<T>& lut = getPads<T>();
313 if (lut.count(clct.
getBX()) == 0)
316 for (
const auto&
p : lut.at(clct.
getBX())) {
323 int padNumber(
getPad(
p.second));
330 template <
class S,
class T>
335 matchingPads<T>(
d1,
p1);
338 matchingPads<T>(d2,
p2);
348 matches<T> padsClct, padsAlct;
351 matchingPads<T>(clct1, padsClct);
354 matchingPads<T>(alct1, padsAlct);
365 matches<T>&
result)
const {
366 matches<T> padsClct, padsAlct;
369 matchingPads<CSCCLCTDigi, T>(clct1, clct2, padsClct);
372 matchingPads<CSCALCTDigi, T>(alct1, alct2, padsAlct);
375 result.reserve(padsClct.size() + padsAlct.size());
388 for (
const auto&
p : pads) {
411 float averagePadNumberCSC =
getPad(clct,
part);
412 float minDeltaPad = 999;
413 for (
const auto&
p : pads) {
419 float averagePadNumberGEM =
getPad(
p.second);
420 if (
std::abs(averagePadNumberCSC - averagePadNumberGEM) < minDeltaPad) {
421 minDeltaPad =
std::abs(averagePadNumberCSC - averagePadNumberGEM);
439 float averagePadNumberCSC =
getPad(clct1,
part);
440 float minDeltaPad = 999;
441 for (
const auto&
p : pads) {
446 float averagePadNumberGEM =
getPad(
p.second);
453 if (
std::abs(averagePadNumberCSC - averagePadNumberGEM) < minDeltaPad and
455 minDeltaPad =
std::abs(averagePadNumberCSC - averagePadNumberGEM);
472 bool bestValid = bestLCT.
isValid();
477 if (bestValid and !secondValid)
479 if (!bestValid and secondValid)
483 const GEMCoPadDigi& bestCoPad = bestMatchingPad<GEMCoPadDigi>(bestLCT, coPads);
497 if ((getLctTrigEnable<T>() and bestLCT.isValid())
or (
match_trig_enable and bestLCT.isValid())) {
virtual bool doesWiregroupCrossStrip(int key_wg, int key_strip) const
uint16_t getBX() const
return BX - five low bits of BXN counter tagged by the ALCT
bool isPadInOverlap(int roll) const
void matchingPads(const CSCALCTDigi &alct, matches< T > &) const
CSCCorrelatedLCTDigi secondLCT[CSCConstants::MAX_LCT_TBINS]
CSCMotherboard::LCT_Quality findQualityGEMv1(const CSCALCTDigi &, const CSCCLCTDigi &, int gemlayer) const
virtual const CSCGEMMotherboardLUT * getLUT() const =0
LCT_QualityRun3 findQualityGEMv2(const CSCALCTDigi &, const CSCCLCTDigi &, int gemlayer) const
bool gemGeometryAvailable
void intersection(const S &d1, const S &d2, S &result) const
const matchesBX< T > & getPads() const
CSCCorrelatedLCTDigi constructLCTsGEM(const CSCALCTDigi &alct, const GEMCoPadDigi &gem, int i) const
U second(std::pair< T, U > const &p)
bool promoteALCTGEMquality_
void setGEMGeometry(const GEMGeometry *g)
set CSC and GEM geometries for the matching needs
int getMaxDeltaBX() const
GEMCoPadDigiIdsBX coPads_
uint16_t getKeyStrip(const uint16_t n=2) const
virtual void run(const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc, const GEMPadDigiClusterCollection *gemPads)=0
matchesBX< GEMPadDigi > GEMPadDigiIdsBX
uint16_t getKeyWG() const
return key wire group
std::vector< CSCCorrelatedLCTDigi > readoutLCTs() const override
void correlateLCTsGEM(const T &best, const T &second, const GEMCoPadDigiIds &coPads, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2) const
enum CSCPart getCSCPart(int keystrip) const
void processGEMClusters(const GEMPadDigiClusterCollection *pads)
virtual std::vector< std::pair< int, int > > get_csc_hs_to_gem_pad(Parity par, enum CSCPart) const =0
int getLctTrigEnable() const
void printGEMTriggerCoPads(int bx_start, int bx_stop, enum CSCPart)
bool promoteCLCTGEMquality_
std::unique_ptr< GEMCoPadProcessor > coPadProcessor
match< GEMCoPadDigi > GEMCoPadDigiId
std::vector< GEMCoPadDigi > gemCoPadV
bool promoteALCTGEMpattern_
matches< GEMCoPadDigi > GEMCoPadDigiIds
bool isGEMDetId(unsigned int) const
int getRoll(const GEMPadDigiId &p) const
T bestMatchingPad(const CSCALCTDigi &, const matches< T > &) const
bool isValid() const
check CLCT validity (1 - valid CLCT)
std::pair< int, int > getRolls(const CSCALCTDigi &) const
uint16_t getBX() const
return BX
std::vector< std::pair< int, int > > get_csc_wg_to_gem_roll(Parity par, int layer=1) const
match< GEMPadDigi > GEMPadDigiId
void processGEMPads(const GEMPadDigiCollection *pads)
void printGEMTriggerPads(int bx_start, int bx_stop, enum CSCPart)
void run(const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc) override
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
matchesBX< GEMCoPadDigi > GEMCoPadDigiIdsBX
bool isValid() const
check ALCT validity (1 - valid ALCT)
float getPad(const GEMPadDigi &) const
constexpr int station() const
Abs< T >::type abs(const T &t)
unsigned int match_trig_enable
int getBX(const GEMPadDigi &p) const
~CSCGEMMotherboard() override
matches< GEMPadDigi > GEMPadDigiIds
static constexpr float d1
const GEMGeometry * gem_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