|
|
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>
236 const matchesBX<T>&
getPads()
const;
256 const matchesBX<T>& lut = getPads<T>();
259 if (lut.count(alct.
getBX()) == 0)
262 for (
const auto&
p : lut.at(alct.
getBX())) {
288 (alctRoll.first -
delta > padRoll
or padRoll > alctRoll.second))
308 const int lowPad(mymap[keyStrip].
first);
309 const int highPad(mymap[keyStrip].
second);
312 const matchesBX<T>& lut = getPads<T>();
315 if (lut.count(clct.
getBX()) == 0)
318 for (
const auto&
p : lut.at(clct.
getBX())) {
325 int padNumber(
getPad(
p.second));
332 template <
class S,
class T>
337 matchingPads<T>(
d1,
p1);
340 matchingPads<T>(d2,
p2);
350 matches<T> padsClct, padsAlct;
353 matchingPads<T>(clct1, padsClct);
356 matchingPads<T>(alct1, padsAlct);
367 matches<T>&
result)
const {
368 matches<T> padsClct, padsAlct;
371 matchingPads<CSCCLCTDigi, T>(clct1, clct2, padsClct);
374 matchingPads<CSCALCTDigi, T>(alct1, alct2, padsAlct);
377 result.reserve(padsClct.size() + padsAlct.size());
390 for (
const auto&
p : pads) {
413 float averagePadNumberCSC =
getPad(clct,
part);
414 float minDeltaPad = 999;
415 for (
const auto&
p : pads) {
421 float averagePadNumberGEM =
getPad(
p.second);
422 if (
std::abs(averagePadNumberCSC - averagePadNumberGEM) < minDeltaPad) {
423 minDeltaPad =
std::abs(averagePadNumberCSC - averagePadNumberGEM);
441 float averagePadNumberCSC =
getPad(clct1,
part);
442 float minDeltaPad = 999;
443 for (
const auto&
p : pads) {
448 float averagePadNumberGEM =
getPad(
p.second);
455 if (
std::abs(averagePadNumberCSC - averagePadNumberGEM) < minDeltaPad and
457 minDeltaPad =
std::abs(averagePadNumberCSC - averagePadNumberGEM);
474 bool bestValid = bestLCT.
isValid();
479 if (bestValid and !secondValid)
481 if (!bestValid and secondValid)
485 const GEMCoPadDigi& bestCoPad = bestMatchingPad<GEMCoPadDigi>(bestLCT, coPads);
499 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