|
|
Go to the documentation of this file. 1 #ifndef L1Trigger_CSCTriggerPrimitives_CSCGEMMotherboard_h
2 #define L1Trigger_CSCTriggerPrimitives_CSCGEMMotherboard_h
101 template <
class S,
class T>
235 const matchesBX<T>&
getPads()
const;
255 const matchesBX<T>& lut = getPads<T>();
258 if (lut.count(alct.
getBX()) == 0)
261 for (
const auto&
p : lut.at(alct.
getBX())) {
287 (alctRoll.first -
delta > padRoll
or padRoll > alctRoll.second))
307 const int lowPad(mymap[keyStrip].
first);
308 const int highPad(mymap[keyStrip].
second);
311 const matchesBX<T>& lut = getPads<T>();
314 if (lut.count(clct.
getBX()) == 0)
317 for (
const auto&
p : lut.at(clct.
getBX())) {
324 int padNumber(
getPad(
p.second));
331 template <
class S,
class T>
336 matchingPads<T>(
d1,
p1);
339 matchingPads<T>(d2,
p2);
349 matches<T> padsClct, padsAlct;
352 matchingPads<T>(clct1, padsClct);
355 matchingPads<T>(alct1, padsAlct);
366 matches<T>&
result)
const {
367 matches<T> padsClct, padsAlct;
370 matchingPads<CSCCLCTDigi, T>(clct1, clct2, padsClct);
373 matchingPads<CSCALCTDigi, T>(alct1, alct2, padsAlct);
376 result.reserve(padsClct.size() + padsAlct.size());
389 for (
const auto&
p : pads) {
412 float averagePadNumberCSC =
getPad(clct,
part);
413 float minDeltaPad = 999;
414 for (
const auto&
p : pads) {
420 float averagePadNumberGEM =
getPad(
p.second);
421 if (
std::abs(averagePadNumberCSC - averagePadNumberGEM) < minDeltaPad) {
422 minDeltaPad =
std::abs(averagePadNumberCSC - averagePadNumberGEM);
440 float averagePadNumberCSC =
getPad(clct1,
part);
441 float minDeltaPad = 999;
442 for (
const auto&
p : pads) {
447 float averagePadNumberGEM =
getPad(
p.second);
454 if (
std::abs(averagePadNumberCSC - averagePadNumberGEM) < minDeltaPad and
456 minDeltaPad =
std::abs(averagePadNumberCSC - averagePadNumberGEM);
473 bool bestValid = bestLCT.
isValid();
478 if (bestValid and !secondValid)
480 if (!bestValid and secondValid)
484 const GEMCoPadDigi& bestCoPad = bestMatchingPad<GEMCoPadDigi>(bestLCT, coPads);
498 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]
virtual const CSCGEMMotherboardLUT * getLUT() const =0
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
bool useOldLCTDataFormat_
int getMaxDeltaBX() const
GEMCoPadDigiIdsBX coPads_
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
uint16_t getKeyStrip(uint16_t n=2) const
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
virtual void run(const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc, const GEMPadDigiCollection *gemPads)=0
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
unsigned int findQualityGEM(const CSCALCTDigi &, const CSCCLCTDigi &, int gemlayer) const
std::vector< std::pair< int, int > > get_csc_wg_to_gem_roll(Parity par, int layer=1) const
match< GEMPadDigi > GEMPadDigiId
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
bool doLCTGhostBustingWithGEMs_
matchesBX< GEMCoPadDigi > GEMCoPadDigiIdsBX
bool isValid() const
check ALCT validity (1 - valid ALCT)
void retrieveGEMPads(const GEMPadDigiCollection *pads, unsigned id)
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