CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Attributes | Static Private Attributes
CSCMotherboardME21GEM Class Reference

#include <CSCMotherboardME21GEM.h>

Inheritance diagram for CSCMotherboardME21GEM:
CSCMotherboard

Public Member Functions

int assignGEMRoll (double eta)
 
void buildCoincidencePads (const GEMPadDigiCollection *out_pads, GEMCoPadDigiCollection &out_co_pads, CSCDetId csc_id)
 
void clear ()
 
CSCCorrelatedLCTDigi constructLCTsGEM (const CSCALCTDigi &alct, const GEMPadDigi &gem, bool oldDataFormat=false)
 
CSCCorrelatedLCTDigi constructLCTsGEM (const CSCCLCTDigi &clct, const GEMPadDigi &gem, int roll, bool oldDataFormat=true)
 
CSCCorrelatedLCTDigi constructLCTsGEM (const CSCALCTDigi &alct, const CSCCLCTDigi &clct, bool hasPad, bool hasCoPad)
 
void correlateLCTs (CSCALCTDigi bestALCT, CSCALCTDigi secondALCT, CSCCLCTDigi bestCLCT, CSCCLCTDigi secondCLCT, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2, const GEMPadsBX &pads=GEMPadsBX(), const GEMPadsBX &copads=GEMPadsBX())
 
void correlateLCTsGEM (CSCALCTDigi bestALCT, CSCALCTDigi secondALCT, GEMPadDigi gemPad, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2)
 
void correlateLCTsGEM (CSCCLCTDigi bestCLCT, CSCCLCTDigi secondCLCT, GEMPadDigi gemPad, int roll, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2)
 
void correlateLCTsGEM (CSCALCTDigi bestALCT, CSCALCTDigi secondALCT, CSCCLCTDigi bestCLCT, CSCCLCTDigi secondCLCT, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2, const GEMPadsBX &pads=GEMPadsBX(), const GEMPadsBX &copads=GEMPadsBX())
 
std::map< int, std::pair< double, double > > createGEMRollEtaLUT ()
 
 CSCMotherboardME21GEM (unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)
 
int deltaPad (int hs, int pad)
 
int deltaRoll (int wg, int roll)
 
unsigned int findQualityGEM (const CSCALCTDigi &aLCT, const CSCCLCTDigi &cLCT, bool hasPad, bool hasCoPad)
 
std::vector< CSCCorrelatedLCTDigigetLCTs ()
 
GEMPadsBX matchingGEMPads (const CSCCLCTDigi &cLCT, const GEMPadsBX &pads=GEMPadsBX(), bool isCopad=false, bool first=true)
 
GEMPadsBX matchingGEMPads (const CSCALCTDigi &aLCT, const GEMPadsBX &pads=GEMPadsBX(), bool isCopad=false, bool first=true)
 
GEMPadsBX matchingGEMPads (const CSCCLCTDigi &cLCT, const CSCALCTDigi &aLCT, const GEMPadsBX &pads=GEMPadsBX(), bool isCopad=false, bool first=true)
 
void printGEMTriggerPads (int minBX, int maxBx, bool iscopad=false)
 
std::vector< GEMCoPadDigireadoutCoPads ()
 
std::vector< CSCCorrelatedLCTDigireadoutLCTs ()
 
void retrieveGEMCoPads (const GEMCoPadDigiCollection *pads, unsigned id)
 
void retrieveGEMPads (const GEMPadDigiCollection *pads, unsigned id)
 
void run (const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc, const GEMPadDigiCollection *gemPads)
 
void setCSCGeometry (const CSCGeometry *g)
 set CSC and GEM geometries for the matching needs More...
 
void setGEMGeometry (const GEMGeometry *g)
 
std::vector< CSCCorrelatedLCTDigisortLCTsByGEMDPhi (int bx)
 
std::vector< CSCCorrelatedLCTDigisortLCTsByGEMDPhi (std::vector< CSCCorrelatedLCTDigi >)
 
std::vector< CSCCorrelatedLCTDigisortLCTsByQuality (int bx)
 
std::vector< CSCCorrelatedLCTDigisortLCTsByQuality (std::vector< CSCCorrelatedLCTDigi >)
 
 ~CSCMotherboardME21GEM ()
 
- 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)
 
 ~CSCMotherboard ()
 

Private Types

typedef std::pair< unsigned int, const GEMPadDigi * > GEMPadBX
 
typedef std::map< int, GEMPadsBXGEMPads
 
typedef std::vector< GEMPadBXGEMPadsBX
 

Private Attributes

std::vector< CSCALCTDigialctV
 
CSCCorrelatedLCTDigi allLCTs [MAX_LCT_BINS][15][2]
 
bool buildLCTfromALCTandGEM_
 
bool buildLCTfromCLCTandGEM_
 
std::vector< CSCCLCTDigiclctV
 
GEMPads coPads_
 
bool correctLCTtimingWithGEM_
 
const CSCGeometrycsc_g
 
std::map< int, std::pair< int, int > > cscHsToGemPad_
 
std::map< int, int > cscWgToGemRoll_
 
bool debug_gem_dphi
 
bool debug_gem_matching
 
bool debug_luts
 
bool doLCTGhostBustingWithGEMs_
 
bool drop_used_clcts
 
bool dropLowQualityALCTsNoGEMs_
 
bool dropLowQualityCLCTsNoGEMs_
 
const GEMGeometrygem_g
 
std::vector< GEMCoPadDigigemCoPadV
 
std::map< int, int > gemPadToCscHs_
 
std::map< int, std::pair< double, double > > gemRollToEtaLimits_
 
bool match_earliest_clct_me21_only
 
unsigned int max_me21_lcts
 
int maxDeltaBXCoPad_
 
int maxDeltaBXInCoPad_
 
int maxDeltaBXPad_
 
int maxDeltaPadCoPad_
 
int maxDeltaPadInCoPad_
 
int maxDeltaPadPad_
 
int maxDeltaPadPadEven_
 
int maxDeltaPadPadOdd_
 
int maxDeltaWg_
 
GEMPads pads_
 
int pref [MAX_LCT_BINS]
 
bool promoteALCTGEMpattern_
 
bool promoteALCTGEMquality_
 
bool promoteCLCTGEMquality_
 
bool runME21ILT_
 
unsigned int tmb_cross_bx_algo
 
bool useOldLCTDataFormat_
 

Static Private Attributes

static const double lut_pt_vs_dphi_gemcsc [8][3]
 
static const double lut_wg_eta_even [112][2]
 
static const double lut_wg_eta_odd [112][2]
 

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 &)
 
- 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
 
- 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

Extended CSCMotherboard for ME21 TMB upgrade

Author
Sven Dildick March 2014

Based on CSCMotherboard code

Definition at line 23 of file CSCMotherboardME21GEM.h.

Member Typedef Documentation

typedef std::pair<unsigned int, const GEMPadDigi*> CSCMotherboardME21GEM::GEMPadBX
private

Definition at line 25 of file CSCMotherboardME21GEM.h.

typedef std::map<int, GEMPadsBX> CSCMotherboardME21GEM::GEMPads
private

Definition at line 27 of file CSCMotherboardME21GEM.h.

typedef std::vector<GEMPadBX> CSCMotherboardME21GEM::GEMPadsBX
private

Definition at line 26 of file CSCMotherboardME21GEM.h.

Constructor & Destructor Documentation

CSCMotherboardME21GEM::CSCMotherboardME21GEM ( unsigned  endcap,
unsigned  station,
unsigned  sector,
unsigned  subsector,
unsigned  chamber,
const edm::ParameterSet conf 
)

Normal constructor.

Definition at line 60 of file CSCMotherboardME21GEM.cc.

References buildLCTfromALCTandGEM_, buildLCTfromCLCTandGEM_, correctLCTtimingWithGEM_, debug_gem_dphi, debug_gem_matching, debug_luts, doLCTGhostBustingWithGEMs_, drop_used_clcts, dropLowQualityALCTsNoGEMs_, dropLowQualityCLCTsNoGEMs_, edm::ParameterSet::getParameter(), CSCMotherboard::isSLHC, funct::m, match_earliest_clct_me21_only, CSCMotherboard::match_trig_window_size, max_me21_lcts, maxDeltaBXCoPad_, maxDeltaBXInCoPad_, maxDeltaBXPad_, maxDeltaPadCoPad_, maxDeltaPadInCoPad_, maxDeltaPadPadEven_, maxDeltaPadPadOdd_, maxDeltaWg_, pref, promoteALCTGEMpattern_, promoteALCTGEMquality_, promoteCLCTGEMquality_, runME21ILT_, tmb_cross_bx_algo, and useOldLCTDataFormat_.

63  :
64  CSCMotherboard(endcap, station, sector, subsector, chamber, conf)
65 {
66  const edm::ParameterSet commonParams(conf.getParameter<edm::ParameterSet>("commonParam"));
67  runME21ILT_ = commonParams.getParameter<bool>("runME21ILT");
68 
69  if (!isSLHC) edm::LogError("L1CSCTPEmulatorConfigError")
70  << "+++ Upgrade CSCMotherboardME21GEM constructed while isSLHC is not set! +++\n";
71 
72  const edm::ParameterSet me21tmbParams(conf.getParameter<edm::ParameterSet>("me21tmbSLHCGEM"));
73 
74  // whether to not reuse CLCTs that were used by previous matching ALCTs
75  // in ALCT-to-CLCT algorithm
76  drop_used_clcts = me21tmbParams.getParameter<bool>("tmbDropUsedClcts");
77 
78  match_earliest_clct_me21_only = me21tmbParams.getParameter<bool>("matchEarliestClctME21Only");
79 
80  tmb_cross_bx_algo = me21tmbParams.getParameter<unsigned int>("tmbCrossBxAlgorithm");
81 
82  // maximum lcts per BX in ME2
83  max_me21_lcts = me21tmbParams.getParameter<unsigned int>("maxME21LCTs");
84 
86  for (unsigned int m=2; m<match_trig_window_size; m+=2)
87  {
88  pref[m-1] = pref[0] - m/2;
89  pref[m] = pref[0] + m/2;
90  }
91 
92  //----------------------------------------------------------------------------------------//
93 
94  // G E M - C S C I N T E G R A T E D L O C A L A L G O R I T H M
95 
96  //----------------------------------------------------------------------------------------//
97 
98  // debug gem matching
99  debug_gem_matching = me21tmbParams.getParameter<bool>("debugMatching");
100  debug_luts = me21tmbParams.getParameter<bool>("debugLUTs");
101  debug_gem_dphi = me21tmbParams.getParameter<bool>("debugGEMDphi");
102 
103  // deltas used to construct GEM coincidence pads
104  maxDeltaBXInCoPad_ = me21tmbParams.getParameter<int>("maxDeltaBXInCoPad");
105  maxDeltaPadInCoPad_ = me21tmbParams.getParameter<int>("maxDeltaPadInCoPad");
106 
107  // deltas used to match to GEM pads
108  maxDeltaBXPad_ = me21tmbParams.getParameter<int>("maxDeltaBXPad");
109  maxDeltaPadPadOdd_ = me21tmbParams.getParameter<int>("maxDeltaPadPadOdd");
110  maxDeltaPadPadEven_ = me21tmbParams.getParameter<int>("maxDeltaPadPadEven");
111  maxDeltaWg_ = me21tmbParams.getParameter<int>("maxDeltaWg");
112 
113  // deltas used to match to GEM coincidence pads
114  maxDeltaBXCoPad_ = me21tmbParams.getParameter<int>("maxDeltaBXCoPad");
115  maxDeltaPadCoPad_ = me21tmbParams.getParameter<int>("maxDeltaPadCoPad");
116 
117  // drop low quality stubs if they don't have GEMs
118  dropLowQualityCLCTsNoGEMs_ = me21tmbParams.getParameter<bool>("dropLowQualityCLCTsNoGEMs");
119  dropLowQualityALCTsNoGEMs_ = me21tmbParams.getParameter<bool>("dropLowQualityALCTsNoGEMs");
120 
121  // correct LCT timing with GEMs
122  correctLCTtimingWithGEM_ = me21tmbParams.getParameter<bool>("correctLCTtimingWithGEM");
123 
124  // build LCT from ALCT and GEM
125  buildLCTfromALCTandGEM_ = me21tmbParams.getParameter<bool>("buildLCTfromALCTandGEM");
126  buildLCTfromCLCTandGEM_ = me21tmbParams.getParameter<bool>("buildLCTfromCLCTandGEM");
127 
128  // LCT ghostbusting
129  doLCTGhostBustingWithGEMs_ = me21tmbParams.getParameter<bool>("doLCTGhostBustingWithGEMs");
130 
131  // use "old" or "new" dataformat for integrated LCTs?
132  useOldLCTDataFormat_ = me21tmbParams.getParameter<bool>("useOldLCTDataFormat");
133 
134  // promote ALCT-GEM pattern
135  promoteALCTGEMpattern_ = me21tmbParams.getParameter<bool>("promoteALCTGEMpattern");
136 
137  // promote ALCT-GEM quality
138  promoteALCTGEMquality_ = me21tmbParams.getParameter<bool>("promoteALCTGEMquality");
139  promoteCLCTGEMquality_ = me21tmbParams.getParameter<bool>("promoteCLCTGEMquality");
140 }
T getParameter(std::string const &) const
unsigned int match_trig_window_size
CSCMotherboardME21GEM::~CSCMotherboardME21GEM ( )

Default destructor.

Definition at line 142 of file CSCMotherboardME21GEM.cc.

143 {
144 }

Member Function Documentation

int CSCMotherboardME21GEM::assignGEMRoll ( double  eta)

Definition at line 1188 of file CSCMotherboardME21GEM.cc.

References gemRollToEtaLimits_, maxEta, cutBasedElectronID_CSA14_50ns_V0_cff::minEta, AlCaHLTBitMon_ParallelJobs::p, and mps_fire::result.

Referenced by run(), and setGEMGeometry().

1189 {
1190  int result = -99;
1191  for(auto p : gemRollToEtaLimits_) {
1192  const float minEta((p.second).first);
1193  const float maxEta((p.second).second);
1194  if (minEta <= eta and eta <= maxEta) {
1195  result = p.first;
1196  break;
1197  }
1198  }
1199  return result;
1200 }
std::map< int, std::pair< double, double > > gemRollToEtaLimits_
double maxEta
void CSCMotherboardME21GEM::buildCoincidencePads ( const GEMPadDigiCollection out_pads,
GEMCoPadDigiCollection out_co_pads,
CSCDetId  csc_id 
)

Definition at line 959 of file CSCMotherboardME21GEM.cc.

References funct::abs(), relativeConstraints::chamber, CSCDetId::chamber(), gemCoPadV, maxDeltaBXInCoPad_, maxDeltaPadInCoPad_, or, AlCaHLTBitMon_ParallelJobs::p, relativeConstraints::ring, CSCDetId::ring(), relativeConstraints::station, and CSCDetId::zendcap().

Referenced by run(), and setGEMGeometry().

962 {
963  gemCoPadV.clear();
964 
965  // build coincidences
966  for (auto det_range = out_pads->begin(); det_range != out_pads->end(); ++det_range) {
967  const GEMDetId& id = (*det_range).first;
968 
969  // same chamber
970  if (id.region() != csc_id.zendcap() or
971  id.ring() != csc_id.ring() or id.chamber() != csc_id.chamber()) continue;
972 
973  // build coincidences only for long superchamber pads
974  if (id.station() != 2) continue;
975 
976  // all coincidences detIDs will have layer=1
977  if (id.layer() != 1) continue;
978 
979  // find the corresponding id with layer=2
980  GEMDetId co_id(id.region(), id.ring(), id.station(), 2, id.chamber(), id.roll());
981 
982  auto co_pads_range = out_pads->get(co_id);
983  // empty range = no possible coincidence pads
984  if (co_pads_range.first == co_pads_range.second) continue;
985 
986  // now let's correlate the pads in two layers of this partition
987  const auto& pads_range = (*det_range).second;
988  for (auto p = pads_range.first; p != pads_range.second; ++p) {
989  for (auto co_p = co_pads_range.first; co_p != co_pads_range.second; ++co_p) {
990  // check the match in pad
991  if (std::abs(p->pad() - co_p->pad()) > maxDeltaPadInCoPad_) continue;
992  // check the match in BX
993  if (std::abs(p->bx() - co_p->bx()) > maxDeltaBXInCoPad_ ) continue;
994 
995  // make a new coincidence pad digi
996  gemCoPadV.push_back(GEMCoPadDigi(id.roll(),*p,*co_p));
997  out_co_pads.insertDigi(id, GEMCoPadDigi(id.roll(),*p,*co_p));
998  }
999  }
1000  }
1001 }
int chamber() const
Definition: CSCDetId.h:68
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
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int ring() const
Definition: CSCDetId.h:75
short int zendcap() const
Definition: CSCDetId.h:100
std::vector< GEMCoPadDigi > gemCoPadV
void CSCMotherboardME21GEM::clear ( void  )

Definition at line 146 of file CSCMotherboardME21GEM.cc.

References allLCTs, CSCMotherboard::clear(), coPads_, cscHsToGemPad_, cscWgToGemRoll_, gemPadToCscHs_, gemRollToEtaLimits_, i, CSCMotherboard::match_trig_window_size, CSCMotherboard::MAX_LCT_BINS, and pads_.

Referenced by run().

147 {
149 
150  for (int bx = 0; bx < MAX_LCT_BINS; bx++)
151  for (unsigned int mbx = 0; mbx < match_trig_window_size; mbx++)
152  for (int i=0;i<2;i++)
153  allLCTs[bx][mbx][i].clear();
154 
155  gemRollToEtaLimits_.clear();
156  cscWgToGemRoll_.clear();
157  gemPadToCscHs_.clear();
158  cscHsToGemPad_.clear();
159  pads_.clear();
160  coPads_.clear();
161 }
int i
Definition: DBlmapReader.cc:9
unsigned int match_trig_window_size
std::map< int, std::pair< double, double > > gemRollToEtaLimits_
std::map< int, std::pair< int, int > > cscHsToGemPad_
std::map< int, int > gemPadToCscHs_
CSCCorrelatedLCTDigi allLCTs[MAX_LCT_BINS][15][2]
std::map< int, int > cscWgToGemRoll_
CSCCorrelatedLCTDigi CSCMotherboardME21GEM::constructLCTsGEM ( const CSCALCTDigi alct,
const GEMPadDigi gem,
bool  oldDataFormat = false 
)

Definition at line 728 of file CSCMotherboardME21GEM.cc.

References GEMPadDigi::bx(), gemPadToCscHs_, CSCALCTDigi::getBX(), CSCALCTDigi::getKeyWG(), CSCMotherboard::lct_central_bx, GEMPadDigi::pad(), listBenchmarks::pattern, promoteALCTGEMpattern_, promoteALCTGEMquality_, btvTracks_cfi::quality, and CSCMotherboard::theTrigChamber.

Referenced by correlateLCTsGEM(), and setGEMGeometry().

731 {
732  if (oldDataFormat){
733  // CLCT pattern number - set it to a highest value
734  // hack to get LCTs in the CSCTF
735  unsigned int pattern = promoteALCTGEMpattern_ ? 10 : 0;
736 
737  // LCT quality number - set it to a very high value
738  // hack to get LCTs in the CSCTF
739  unsigned int quality = promoteALCTGEMquality_ ? 14 : 11;
740 
741  // Bunch crossing
742  int bx = alct.getBX();
743 
744  // get keyStrip from LUT
745  int keyStrip = gemPadToCscHs_[gem.pad()];
746 
747  // get wiregroup from ALCT
748  int wg = alct.getKeyWG();
749 
750  // construct correlated LCT; temporarily assign track number of 0.
751  return CSCCorrelatedLCTDigi(0, 1, quality, wg, keyStrip, pattern, 0, bx, 0, 0, 0, theTrigChamber);
752  }
753  else {
754  // CLCT pattern number - no pattern
755  unsigned int pattern = 0;
756 
757  // LCT quality number
758  unsigned int quality = 1;
759 
760  // Bunch crossing
761  int bx = gem.bx() + lct_central_bx;
762 
763  // get keyStrip from LUT
764  int keyStrip = gemPadToCscHs_[gem.pad()];
765  // get wiregroup from ALCT
766  int wg = alct.getKeyWG();
767 
768  // construct correlated LCT; temporarily assign track number of 0.
769  return CSCCorrelatedLCTDigi(0, 1, quality, wg, keyStrip, pattern, 0, bx, 0, 0, 0, theTrigChamber);
770  }
771 }
const unsigned theTrigChamber
int pad() const
Definition: GEMPadDigi.h:26
int getBX() const
return BX - five low bits of BXN counter tagged by the ALCT
Definition: CSCALCTDigi.h:48
int bx() const
Definition: GEMPadDigi.h:27
std::map< int, int > gemPadToCscHs_
int getKeyWG() const
return key wire group
Definition: CSCALCTDigi.h:45
CSCCorrelatedLCTDigi CSCMotherboardME21GEM::constructLCTsGEM ( const CSCCLCTDigi clct,
const GEMPadDigi gem,
int  roll,
bool  oldDataFormat = true 
)

Definition at line 773 of file CSCMotherboardME21GEM.cc.

References GEMPadDigi::bx(), CSCMotherboard::encodePattern(), CSCCLCTDigi::getBend(), CSCCLCTDigi::getKeyStrip(), CSCCLCTDigi::getPattern(), CSCCLCTDigi::getStripType(), CSCMotherboard::lct_central_bx, listBenchmarks::pattern, promoteCLCTGEMquality_, btvTracks_cfi::quality, and CSCMotherboard::theTrigChamber.

776 {
777  if (oldDataFormat){
778  // CLCT pattern number - for the time being, do not include GEMs in the pattern
779  unsigned int pattern = encodePattern(clct.getPattern(), clct.getStripType());
780 
781  // LCT quality number - dummy quality
782  unsigned int quality = promoteCLCTGEMquality_ ? 14 : 11;
783 
784  // Bunch crossing: pick GEM bx
785  int bx = gem.bx() + lct_central_bx;
786 
787  // pick a random WG in the roll range
788  int wg(20);
789 
790  // construct correlated LCT; temporarily assign track number of 0.
791  return CSCCorrelatedLCTDigi(0, 1, quality, wg, clct.getKeyStrip(), pattern, clct.getBend(), bx, 0, 0, 0, theTrigChamber);
792  }
793  else {
794  // CLCT pattern number - no pattern
795  unsigned int pattern = 0;//encodePatternGEM(clct.getPattern(), clct.getStripType());
796 
797  // LCT quality number - dummy quality
798  unsigned int quality = 5;//findQualityGEM(alct, gem);
799 
800  // Bunch crossing: get it from cathode LCT if anode LCT is not there.
801  int bx = gem.bx() + lct_central_bx;;
802 
803  // ALCT WG
804  int wg(0);
805 
806  // construct correlated LCT; temporarily assign track number of 0.
807  return CSCCorrelatedLCTDigi(0, 1, quality, wg, 0, pattern, 0, bx, 0, 0, 0, theTrigChamber);
808  }
809 }
const unsigned theTrigChamber
int getStripType() const
return striptype
Definition: CSCCLCTDigi.h:39
int getBend() const
return bend
Definition: CSCCLCTDigi.h:42
unsigned int encodePattern(const int ptn, const int highPt)
int bx() const
Definition: GEMPadDigi.h:27
int getPattern() const
return pattern
Definition: CSCCLCTDigi.h:36
int getKeyStrip() const
Definition: CSCCLCTDigi.h:65
CSCCorrelatedLCTDigi CSCMotherboardME21GEM::constructLCTsGEM ( const CSCALCTDigi alct,
const CSCCLCTDigi clct,
bool  hasPad,
bool  hasCoPad 
)

Definition at line 812 of file CSCMotherboardME21GEM.cc.

References CSCMotherboard::encodePattern(), findQualityGEM(), CSCCLCTDigi::getBend(), CSCALCTDigi::getBX(), CSCCLCTDigi::getBX(), CSCCLCTDigi::getKeyStrip(), CSCALCTDigi::getKeyWG(), CSCCLCTDigi::getPattern(), CSCCLCTDigi::getStripType(), CSCALCTDigi::isValid(), listBenchmarks::pattern, btvTracks_cfi::quality, and CSCMotherboard::theTrigChamber.

814 {
815  // CLCT pattern number
816  unsigned int pattern = encodePattern(cLCT.getPattern(), cLCT.getStripType());
817 
818  // LCT quality number
819  unsigned int quality = findQualityGEM(aLCT, cLCT, hasPad, hasCoPad);
820 
821  // Bunch crossing: get it from cathode LCT if anode LCT is not there.
822  int bx = aLCT.isValid() ? aLCT.getBX() : cLCT.getBX();
823 
824  // construct correlated LCT; temporarily assign track number of 0.
825  int trknmb = 0;
826  CSCCorrelatedLCTDigi thisLCT(trknmb, 1, quality, aLCT.getKeyWG(),
827  cLCT.getKeyStrip(), pattern, cLCT.getBend(),
828  bx, 0, 0, 0, theTrigChamber);
829  return thisLCT;
830 }
unsigned int findQualityGEM(const CSCALCTDigi &aLCT, const CSCCLCTDigi &cLCT, bool hasPad, bool hasCoPad)
const unsigned theTrigChamber
unsigned int encodePattern(const int ptn, const int highPt)
void CSCMotherboardME21GEM::correlateLCTs ( CSCALCTDigi  bestALCT,
CSCALCTDigi  secondALCT,
CSCCLCTDigi  bestCLCT,
CSCCLCTDigi  secondCLCT,
CSCCorrelatedLCTDigi lct1,
CSCCorrelatedLCTDigi lct2,
const GEMPadsBX pads = GEMPadsBX(),
const GEMPadsBX copads = GEMPadsBX() 
)

Referenced by setGEMGeometry().

void CSCMotherboardME21GEM::correlateLCTsGEM ( CSCALCTDigi  bestALCT,
CSCALCTDigi  secondALCT,
GEMPadDigi  gemPad,
CSCCorrelatedLCTDigi lct1,
CSCCorrelatedLCTDigi lct2 
)

Definition at line 670 of file CSCMotherboardME21GEM.cc.

References CSCMotherboard::alct_trig_enable, constructLCTsGEM(), CSCALCTDigi::isValid(), CSCMotherboard::match_trig_enable, or, CSCCorrelatedLCTDigi::setTrknmb(), and useOldLCTDataFormat_.

Referenced by run(), and setGEMGeometry().

675 {
676  bool anodeBestValid = bestALCT.isValid();
677  bool anodeSecondValid = secondALCT.isValid();
678 
679  if (anodeBestValid and !anodeSecondValid) secondALCT = bestALCT;
680  if (!anodeBestValid and anodeSecondValid) bestALCT = secondALCT;
681 
682  if ((alct_trig_enable and bestALCT.isValid()) or
683  (match_trig_enable and bestALCT.isValid()))
684  {
685  lct1 = constructLCTsGEM(bestALCT, gemPad, useOldLCTDataFormat_);
686  lct1.setTrknmb(1);
687  // lct1.setGEMDPhi(0.0);
688  }
689 
690  if ((alct_trig_enable and secondALCT.isValid()) or
691  (match_trig_enable and secondALCT.isValid() and secondALCT != bestALCT))
692  {
693  lct2 = constructLCTsGEM(secondALCT, gemPad, useOldLCTDataFormat_);
694  lct2.setTrknmb(2);
695  // lct2.setGEMDPhi(0.0);
696  }
697 }
bool isValid() const
check ALCT validity (1 - valid ALCT)
Definition: CSCALCTDigi.h:30
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
unsigned int match_trig_enable
unsigned int alct_trig_enable
CSCCorrelatedLCTDigi constructLCTsGEM(const CSCALCTDigi &alct, const GEMPadDigi &gem, bool oldDataFormat=false)
void setTrknmb(const uint16_t number)
Set track number (1,2) after sorting LCTs.
void CSCMotherboardME21GEM::correlateLCTsGEM ( CSCCLCTDigi  bestCLCT,
CSCCLCTDigi  secondCLCT,
GEMPadDigi  gemPad,
int  roll,
CSCCorrelatedLCTDigi lct1,
CSCCorrelatedLCTDigi lct2 
)

Definition at line 700 of file CSCMotherboardME21GEM.cc.

References CSCMotherboard::clct_trig_enable, constructLCTsGEM(), CSCCLCTDigi::isValid(), CSCMotherboard::match_trig_enable, or, CSCCorrelatedLCTDigi::setTrknmb(), and useOldLCTDataFormat_.

705 {
706  bool cathodeBestValid = bestCLCT.isValid();
707  bool cathodeSecondValid = secondCLCT.isValid();
708 
709  if (cathodeBestValid and !cathodeSecondValid) secondCLCT = bestCLCT;
710  if (!cathodeBestValid and cathodeSecondValid) bestCLCT = secondCLCT;
711 
712  if ((clct_trig_enable and bestCLCT.isValid()) or
713  (match_trig_enable and bestCLCT.isValid()))
714  {
715  lct1 = constructLCTsGEM(bestCLCT, gemPad, roll, useOldLCTDataFormat_);
716  lct1.setTrknmb(1);
717  }
718 
719  if ((clct_trig_enable and secondCLCT.isValid()) or
720  (match_trig_enable and secondCLCT.isValid() and secondCLCT != bestCLCT))
721  {
722  lct2 = constructLCTsGEM(secondCLCT, gemPad, roll, useOldLCTDataFormat_);
723  lct2.setTrknmb(2);
724  }
725 }
unsigned int clct_trig_enable
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
bool isValid() const
check CLCT validity (1 - valid CLCT)
Definition: CSCCLCTDigi.h:30
unsigned int match_trig_enable
CSCCorrelatedLCTDigi constructLCTsGEM(const CSCALCTDigi &alct, const GEMPadDigi &gem, bool oldDataFormat=false)
void setTrknmb(const uint16_t number)
Set track number (1,2) after sorting LCTs.
void CSCMotherboardME21GEM::correlateLCTsGEM ( CSCALCTDigi  bestALCT,
CSCALCTDigi  secondALCT,
CSCCLCTDigi  bestCLCT,
CSCCLCTDigi  secondCLCT,
CSCCorrelatedLCTDigi lct1,
CSCCorrelatedLCTDigi lct2,
const GEMPadsBX pads = GEMPadsBX(),
const GEMPadsBX copads = GEMPadsBX() 
)

Definition at line 624 of file CSCMotherboardME21GEM.cc.

References CSCMotherboard::alct_trig_enable, CSCMotherboard::clct_trig_enable, constructLCTsGEM(), CSCCLCTDigi::isValid(), CSCALCTDigi::isValid(), CSCMotherboard::match_trig_enable, or, and CSCCorrelatedLCTDigi::setTrknmb().

632 {
633  // check for pads
634  const int nPads(pads.size());
635  const int nCoPads(copads.size());
636  const bool hasPads(nPads!=0);
637  const bool hasCoPads(nCoPads!=0);
638 
639  bool anodeBestValid = bestALCT.isValid();
640  bool anodeSecondValid = secondALCT.isValid();
641  bool cathodeBestValid = bestCLCT.isValid();
642  bool cathodeSecondValid = secondCLCT.isValid();
643 
644  if (anodeBestValid and !anodeSecondValid) secondALCT = bestALCT;
645  if (!anodeBestValid and anodeSecondValid) bestALCT = secondALCT;
646  if (cathodeBestValid and !cathodeSecondValid) secondCLCT = bestCLCT;
647  if (!cathodeBestValid and cathodeSecondValid) bestCLCT = secondCLCT;
648 
649  // ALCT-CLCT matching conditions are defined by "trig_enable" configuration
650  // parameters.
651  if ((alct_trig_enable and bestALCT.isValid()) or
652  (clct_trig_enable and bestCLCT.isValid()) or
653  (match_trig_enable and bestALCT.isValid() and bestCLCT.isValid()))
654  {
655  lct1 = constructLCTsGEM(bestALCT, bestCLCT, hasPads, hasCoPads);
656  lct1.setTrknmb(1);
657  }
658 
659  if (((secondALCT != bestALCT) or (secondCLCT != bestCLCT)) and
660  ((alct_trig_enable and secondALCT.isValid()) or
661  (clct_trig_enable and secondCLCT.isValid()) or
662  (match_trig_enable and secondALCT.isValid() and secondCLCT.isValid())))
663  {
664  lct2 = constructLCTsGEM(secondALCT, secondCLCT, hasPads, hasCoPads);
665  lct2.setTrknmb(2);
666  }
667 }
unsigned int clct_trig_enable
bool isValid() const
check ALCT validity (1 - valid ALCT)
Definition: CSCALCTDigi.h:30
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
bool isValid() const
check CLCT validity (1 - valid CLCT)
Definition: CSCCLCTDigi.h:30
unsigned int match_trig_enable
unsigned int alct_trig_enable
CSCCorrelatedLCTDigi constructLCTsGEM(const CSCALCTDigi &alct, const GEMPadDigi &gem, bool oldDataFormat=false)
void setTrknmb(const uint16_t number)
Set track number (1,2) after sorting LCTs.
std::map< int, std::pair< double, double > > CSCMotherboardME21GEM::createGEMRollEtaLUT ( )

Definition at line 1005 of file CSCMotherboardME21GEM.cc.

References relativeConstraints::chamber, GEMGeometry::chamber(), gem_g, i, and mps_fire::result.

Referenced by run(), and setGEMGeometry().

1006 {
1007  std::map<int,std::pair<double,double> > result;
1008 
1009  auto chamber(gem_g->chamber(GEMDetId(1,1,2,1,1,0)));
1010  if (chamber==nullptr) return result;
1011 
1012  for(int i = 1; i<= chamber->nEtaPartitions(); ++i){
1013  auto roll(chamber->etaPartition(i));
1014  if (roll==nullptr) continue;
1015  const float half_striplength(roll->specs()->specificTopology().stripLength()/2.);
1016  const LocalPoint lp_top(0., half_striplength, 0.);
1017  const LocalPoint lp_bottom(0., -half_striplength, 0.);
1018  const GlobalPoint gp_top(roll->toGlobal(lp_top));
1019  const GlobalPoint gp_bottom(roll->toGlobal(lp_bottom));
1020  //result[i] = std::make_pair(floorf(gp_top.eta() * 100) / 100, ceilf(gp_bottom.eta() * 100) / 100);
1021  result[i] = std::make_pair(gp_top.eta(), gp_bottom.eta());
1022  }
1023  return result;
1024 }
int i
Definition: DBlmapReader.cc:9
const GEMChamber * chamber(GEMDetId id) const
Definition: GEMGeometry.cc:95
const GEMGeometry * gem_g
int CSCMotherboardME21GEM::deltaPad ( int  hs,
int  pad 
)

Referenced by matchingGEMPads(), and setGEMGeometry().

int CSCMotherboardME21GEM::deltaRoll ( int  wg,
int  roll 
)

Referenced by setGEMGeometry().

unsigned int CSCMotherboardME21GEM::findQualityGEM ( const CSCALCTDigi aLCT,
const CSCCLCTDigi cLCT,
bool  hasPad,
bool  hasCoPad 
)

Definition at line 833 of file CSCMotherboardME21GEM.cc.

References CSCALCTDigi::getAccelerator(), CSCCLCTDigi::getPattern(), CSCCLCTDigi::getQuality(), CSCALCTDigi::getQuality(), CSCCLCTDigi::getStripType(), CSCMotherboard::infoV, CSCMotherboard::isTMB07, CSCALCTDigi::isValid(), CSCCLCTDigi::isValid(), PFRecoTauDiscriminationByIsolation_cfi::offset, or, listBenchmarks::pattern, and btvTracks_cfi::quality.

Referenced by constructLCTsGEM(), and setGEMGeometry().

835 {
836 
837  /*
838  Same LCT quality definition as standard LCTs
839  c4 takes GEMs into account!!!
840  */
841 
842  unsigned int quality = 0;
843 
844  if (!isTMB07) {
845  bool isDistrip = (cLCT.getStripType() == 0);
846 
847  if (aLCT.isValid() && !(cLCT.isValid())) { // no CLCT
848  if (aLCT.getAccelerator()) {quality = 1;}
849  else {quality = 3;}
850  }
851  else if (!(aLCT.isValid()) && cLCT.isValid()) { // no ALCT
852  if (isDistrip) {quality = 4;}
853  else {quality = 5;}
854  }
855  else if (aLCT.isValid() && cLCT.isValid()) { // both ALCT and CLCT
856  if (aLCT.getAccelerator()) {quality = 2;} // accelerator muon
857  else { // collision muon
858  // CLCT quality is, in fact, the number of layers hit, so subtract 3
859  // to get quality analogous to ALCT one.
860  int sumQual = aLCT.getQuality() + (cLCT.getQuality()-3);
861  if (sumQual < 1 || sumQual > 6) {
862  if (infoV >= 0) edm::LogWarning("L1CSCTPEmulatorWrongValues")
863  << "+++ findQuality: sumQual = " << sumQual << "+++ \n";
864  }
865  if (isDistrip) { // distrip pattern
866  if (sumQual == 2) {quality = 6;}
867  else if (sumQual == 3) {quality = 7;}
868  else if (sumQual == 4) {quality = 8;}
869  else if (sumQual == 5) {quality = 9;}
870  else if (sumQual == 6) {quality = 10;}
871  }
872  else { // halfstrip pattern
873  if (sumQual == 2) {quality = 11;}
874  else if (sumQual == 3) {quality = 12;}
875  else if (sumQual == 4) {quality = 13;}
876  else if (sumQual == 5) {quality = 14;}
877  else if (sumQual == 6) {quality = 15;}
878  }
879  }
880  }
881  }
882 #ifdef OLD
883  else {
884  // Temporary definition, used until July 2008.
885  // First if statement is fictitious, just to help the CSC TF emulator
886  // handle such cases (one needs to make sure they will be accounted for
887  // in the new quality definition.
888  if (!(aLCT.isValid()) || !(cLCT.isValid())) {
889  if (aLCT.isValid() && !(cLCT.isValid())) quality = 1; // no CLCT
890  else if (!(aLCT.isValid()) && cLCT.isValid()) quality = 2; // no ALCT
891  else quality = 0; // both absent; should never happen.
892  }
893  else {
894  // Sum of ALCT and CLCT quality bits. CLCT quality is, in fact, the
895  // number of layers hit, so subtract 3 to put it to the same footing as
896  // the ALCT quality.
897  int sumQual = aLCT.getQuality() + (cLCT.getQuality()-3);
898  if (sumQual < 1 || sumQual > 6) {
899  if (infoV >= 0) edm::LogWarning("L1CSCTPEmulatorWrongValues")
900  << "+++ findQuality: Unexpected sumQual = " << sumQual << "+++\n";
901  }
902 
903  // LCT quality is basically the sum of ALCT and CLCT qualities, but split
904  // in two groups depending on the CLCT pattern id (higher quality for
905  // straighter patterns).
906  int offset = 0;
907  if (cLCT.getPattern() <= 7) offset = 4;
908  else offset = 9;
909  quality = offset + sumQual;
910  }
911  }
912 #endif
913  else {
914  // 2008 definition.
915  if (!(aLCT.isValid()) || !(cLCT.isValid())) {
916  if (aLCT.isValid() && !(cLCT.isValid())) quality = 1; // no CLCT
917  else if (!(aLCT.isValid()) && cLCT.isValid()) quality = 2; // no ALCT
918  else quality = 0; // both absent; should never happen.
919  }
920  else {
921  const int pattern(cLCT.getPattern());
922  if (pattern == 1) quality = 3; // layer-trigger in CLCT
923  else {
924  // ALCT quality is the number of layers hit minus 3.
925  // CLCT quality is the number of layers hit.
926  int n_gem = 0;
927  if (hasPad) n_gem = 1;
928  if (hasCoPad) n_gem = 2;
929  const bool a4((aLCT.getQuality() >= 1) or (aLCT.getQuality() >= 0 and n_gem >=1));
930  const bool c4((cLCT.getQuality() >= 4) or (cLCT.getQuality() >= 3 and n_gem>=1));
931  // quality = 4; "reserved for low-quality muons in future"
932  if (!a4 && !c4) quality = 5; // marginal anode and cathode
933  else if ( a4 && !c4) quality = 6; // HQ anode, but marginal cathode
934  else if (!a4 && c4) quality = 7; // HQ cathode, but marginal anode
935  else if ( a4 && c4) {
936  if (aLCT.getAccelerator()) quality = 8; // HQ muon, but accel ALCT
937  else {
938  // quality = 9; "reserved for HQ muons with future patterns
939  // quality = 10; "reserved for HQ muons with future patterns
940  if (pattern == 2 || pattern == 3) quality = 11;
941  else if (pattern == 4 || pattern == 5) quality = 12;
942  else if (pattern == 6 || pattern == 7) quality = 13;
943  else if (pattern == 8 || pattern == 9) quality = 14;
944  else if (pattern == 10) quality = 15;
945  else {
946  if (infoV >= 0) edm::LogWarning("L1CSCTPEmulatorWrongValues")
947  << "+++ findQuality: Unexpected CLCT pattern id = "
948  << pattern << "+++\n";
949  }
950  }
951  }
952  }
953  }
954  }
955  return quality;
956 }
int getQuality() const
return quality of a pattern (number of layers hit!)
Definition: CSCCLCTDigi.h:33
bool isValid() const
check ALCT validity (1 - valid ALCT)
Definition: CSCALCTDigi.h:30
int getStripType() const
return striptype
Definition: CSCCLCTDigi.h:39
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
bool isValid() const
check CLCT validity (1 - valid CLCT)
Definition: CSCCLCTDigi.h:30
int getQuality() const
return quality of a pattern
Definition: CSCALCTDigi.h:33
int getAccelerator() const
Definition: CSCALCTDigi.h:37
int getPattern() const
return pattern
Definition: CSCCLCTDigi.h:36
std::vector< CSCCorrelatedLCTDigi > CSCMotherboardME21GEM::getLCTs ( )

Definition at line 559 of file CSCMotherboardME21GEM.cc.

References allLCTs, i, CSCMotherboard::match_trig_window_size, CSCMotherboard::MAX_LCT_BINS, mps_fire::result, sortLCTsByGEMDPhi(), sortLCTsByQuality(), and tmb_cross_bx_algo.

Referenced by readoutLCTs(), and setGEMGeometry().

560 {
561  std::vector<CSCCorrelatedLCTDigi> result;
562  for (int bx = 0; bx < MAX_LCT_BINS; bx++) {
563  std::vector<CSCCorrelatedLCTDigi> tmpV;
564  if (tmb_cross_bx_algo == 2) {
565  tmpV = sortLCTsByQuality(bx);
566  result.insert(result.end(), tmpV.begin(), tmpV.end());
567  }
568  else if (tmb_cross_bx_algo == 3) {
569  tmpV = sortLCTsByGEMDPhi(bx);
570  result.insert(result.end(), tmpV.begin(), tmpV.end());
571  }
572  else {
573  for (unsigned int mbx = 0; mbx < match_trig_window_size; mbx++) {
574  for (int i=0;i<2;i++) {
575  if (allLCTs[bx][mbx][i].isValid()) {
576  result.push_back(allLCTs[bx][mbx][i]);
577  }
578  }
579  }
580  }
581  }
582  return result;
583 }
int i
Definition: DBlmapReader.cc:9
unsigned int match_trig_window_size
std::vector< CSCCorrelatedLCTDigi > sortLCTsByQuality(int bx)
CSCCorrelatedLCTDigi allLCTs[MAX_LCT_BINS][15][2]
std::vector< CSCCorrelatedLCTDigi > sortLCTsByGEMDPhi(int bx)
CSCMotherboardME21GEM::GEMPadsBX CSCMotherboardME21GEM::matchingGEMPads ( const CSCCLCTDigi cLCT,
const GEMPadsBX pads = GEMPadsBX(),
bool  isCopad = false,
bool  first = true 
)

Definition at line 1096 of file CSCMotherboardME21GEM.cc.

References funct::abs(), gather_cfg::cout, cscHsToGemPad_, debug, deltaPad(), CSCCLCTDigi::getBX(), CSCCLCTDigi::getKeyStrip(), CSCMotherboard::lct_central_bx, maxDeltaBXCoPad_, maxDeltaBXPad_, maxDeltaPadCoPad_, maxDeltaPadPad_, or, AlCaHLTBitMon_ParallelJobs::p, and mps_fire::result.

Referenced by matchingGEMPads(), run(), and setGEMGeometry().

1097 {
1099 
1100  // fetch the low and high pad edges for the long superchambers
1101  int deltaPad(isCoPad ? maxDeltaPadCoPad_ : maxDeltaPadPad_);
1102  int deltaBX(isCoPad ? maxDeltaBXCoPad_ : maxDeltaBXPad_);
1103  int clct_bx = clct.getBX();
1104  const int lowPad(cscHsToGemPad_[clct.getKeyStrip()].first);
1105  const int highPad(cscHsToGemPad_[clct.getKeyStrip()].second);
1106  const bool debug(false);
1107  if (debug) std::cout << "lowpad " << lowPad << " highpad " << highPad << " delta pad " << deltaPad <<std::endl;
1108  for (auto p: pads){
1109  if (debug) std::cout<<"DetId"<<GEMDetId(p.first)<<" "<< *(p.second)<<std::endl;
1110  auto padRoll((p.second)->pad());
1111  int pad_bx = (p.second)->bx()+lct_central_bx;
1112  if (debug) std::cout << "padRoll " << padRoll << std::endl;
1113  if (std::abs(clct_bx-pad_bx)>deltaBX) continue;
1114  if (std::abs(lowPad - padRoll) <= deltaPad or std::abs(padRoll - highPad) <= deltaPad){
1115  if (debug) std::cout << "++Matches! " << std::endl;
1116  result.push_back(p);
1117  if (first) return result;
1118  }
1119  }
1120  return result;
1121 }
int deltaPad(int hs, int pad)
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
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< GEMPadBX > GEMPadsBX
#define debug
Definition: HDRShower.cc:19
std::map< int, std::pair< int, int > > cscHsToGemPad_
std::unique_ptr< CSCCathodeLCTProcessor > clct
CSCMotherboardME21GEM::GEMPadsBX CSCMotherboardME21GEM::matchingGEMPads ( const CSCALCTDigi aLCT,
const GEMPadsBX pads = GEMPadsBX(),
bool  isCopad = false,
bool  first = true 
)

Definition at line 1125 of file CSCMotherboardME21GEM.cc.

References funct::abs(), gather_cfg::cout, cscWgToGemRoll_, debug, CSCALCTDigi::getBX(), CSCALCTDigi::getKeyWG(), CSCMotherboard::lct_central_bx, maxDeltaBXCoPad_, maxDeltaBXPad_, maxDeltaWg_, AlCaHLTBitMon_ParallelJobs::p, mps_fire::result, and GEMDetId::roll().

1126 {
1128  int deltaBX(isCoPad ? maxDeltaBXCoPad_ : maxDeltaBXPad_);
1129  int alct_bx = alct.getBX();
1130  int Wg = alct.getKeyWG();
1131  std::vector<int> Rolls;
1132  Rolls.push_back(cscWgToGemRoll_[Wg]);
1133  if (Wg>=maxDeltaWg_ && cscWgToGemRoll_[Wg] != cscWgToGemRoll_[Wg-maxDeltaWg_])
1134  Rolls.push_back(cscWgToGemRoll_[Wg-maxDeltaWg_]);
1135  if ((unsigned int)(Wg+maxDeltaWg_)<cscWgToGemRoll_.size() && cscWgToGemRoll_[Wg] != cscWgToGemRoll_[Wg+maxDeltaWg_])
1136  Rolls.push_back(cscWgToGemRoll_[Wg+maxDeltaWg_]);
1137 
1138  const bool debug(false);
1139  if (debug) std::cout << "ALCT keyWG " << alct.getKeyWG() << std::endl;
1140  for (auto alctRoll : Rolls)
1141  {
1142  if (debug) std::cout <<"roll " << alctRoll << std::endl;
1143  for (auto p: pads){
1144  auto padRoll(GEMDetId(p.first).roll());
1145  int pad_bx = (p.second)->bx()+lct_central_bx;
1146  if (debug) std::cout<<"Detid "<< GEMDetId(p.first) <<" "<< *(p.second)<<std::endl;
1147  if (debug) std::cout << "Candidate ALCT: " << padRoll << std::endl;
1148  if (std::abs(alct_bx-pad_bx)>deltaBX) continue;
1149  if (alctRoll != padRoll) continue;
1150  if (debug) std::cout << "++Matches! " << std::endl;
1151  result.push_back(p);
1152  if (first) return result;
1153  }
1154  }
1155  return result;
1156 }
int roll() const
Definition: GEMDetId.h:80
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< GEMPadBX > GEMPadsBX
#define debug
Definition: HDRShower.cc:19
std::unique_ptr< CSCAnodeLCTProcessor > alct
std::map< int, int > cscWgToGemRoll_
CSCMotherboardME21GEM::GEMPadsBX CSCMotherboardME21GEM::matchingGEMPads ( const CSCCLCTDigi cLCT,
const CSCALCTDigi aLCT,
const GEMPadsBX pads = GEMPadsBX(),
bool  isCopad = false,
bool  first = true 
)

Definition at line 1160 of file CSCMotherboardME21GEM.cc.

References gather_cfg::cout, debug, matchingGEMPads(), or, AlCaHLTBitMon_ParallelJobs::p, lumiQueryAPI::q, and mps_fire::result.

1162 {
1164 
1165  // Fetch all (!) pads matching to ALCTs and CLCTs
1166  auto padsClct(matchingGEMPads(clct, pads, isCoPad, false));
1167  auto padsAlct(matchingGEMPads(alct, pads, isCoPad, false));
1168 
1169  const bool debug(false);
1170  if (debug) std::cout << "-----------------------------------------------------------------------"<<std::endl;
1171  // Check if the pads overlap
1172  for (auto p : padsAlct){
1173  if (debug) std::cout<< "Candidate ALCT: " << p.first << " " << *(p.second) << std::endl;
1174  for (auto q: padsClct){
1175  if (debug) std::cout<< "++Candidate CLCT: " << q.first << " " << *(q.second) << std::endl;
1176  // look for exactly the same pads
1177  if ((p.first != q.first) or GEMPadDigi(*(p.second)) != *(q.second)) continue;
1178  if (debug) std::cout << "++Matches! " << std::endl;
1179  result.push_back(p);
1180  if (first) return result;
1181  }
1182  }
1183  if (debug) std::cout << "-----------------------------------------------------------------------"<<std::endl;
1184  return result;
1185 }
GEMPadsBX matchingGEMPads(const CSCCLCTDigi &cLCT, const GEMPadsBX &pads=GEMPadsBX(), bool isCopad=false, bool first=true)
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
std::vector< GEMPadBX > GEMPadsBX
#define debug
Definition: HDRShower.cc:19
std::unique_ptr< CSCAnodeLCTProcessor > alct
std::unique_ptr< CSCCathodeLCTProcessor > clct
void CSCMotherboardME21GEM::printGEMTriggerPads ( int  minBX,
int  maxBx,
bool  iscopad = false 
)

Definition at line 1064 of file CSCMotherboardME21GEM.cc.

References coPads_, gather_cfg::cout, plotBeamSpotDB::first, and pads_.

Referenced by run(), and setGEMGeometry().

1065 {
1066  // pads or copads?
1067  auto thePads(!iscopad ? pads_ : coPads_ );
1068  const bool hasPads(thePads.size()!=0);
1069 
1070  std::cout << "------------------------------------------------------------------------" << std::endl;
1071  bool first = true;
1072  for (int bx = bx_start; bx <= bx_stop; bx++) {
1073  // print only the pads for the central BX
1074  //if (bx!=lct_central_bx and iscopad) continue;
1075  std::vector<std::pair<unsigned int, const GEMPadDigi*> > in_pads = thePads[bx];
1076  if (first) {
1077  if (!iscopad) std::cout << "* GEM trigger pads: " << std::endl;
1078  else std::cout << "* GEM trigger coincidence pads: " << std::endl;
1079  }
1080  first = false;
1081  if (!iscopad) std::cout << "N(pads) BX " << bx << " : " << in_pads.size() << std::endl;
1082  else std::cout << "N(copads) BX " << bx << " : " << in_pads.size() << std::endl;
1083  if (hasPads){
1084  for (auto pad : in_pads){
1085  auto roll_id(GEMDetId(pad.first));
1086  std::cout << "\tdetId " << pad.first << " " << roll_id << ", pad = " << pad.second->pad() << ", BX = " << pad.second->bx() + 6 << std::endl;
1087  }
1088  }
1089  else
1090  break;
1091  }
1092 }
std::vector< GEMCoPadDigi > CSCMotherboardME21GEM::readoutCoPads ( )

Definition at line 1203 of file CSCMotherboardME21GEM.cc.

References gemCoPadV.

Referenced by CSCTriggerPrimitivesBuilder::build(), and setGEMGeometry().

1204 {
1205  return gemCoPadV;
1206 }
std::vector< GEMCoPadDigi > gemCoPadV
std::vector< CSCCorrelatedLCTDigi > CSCMotherboardME21GEM::readoutLCTs ( )

Definition at line 553 of file CSCMotherboardME21GEM.cc.

References getLCTs().

Referenced by CSCTriggerPrimitivesBuilder::build(), run(), and setGEMGeometry().

554 {
555  return getLCTs();
556 }
std::vector< CSCCorrelatedLCTDigi > getLCTs()
void CSCMotherboardME21GEM::retrieveGEMCoPads ( const GEMCoPadDigiCollection pads,
unsigned  id 
)

Definition at line 1044 of file CSCMotherboardME21GEM.cc.

References coPads_, gem_g, CSCMotherboard::lct_central_bx, maxDeltaBXPad_, and GEMGeometry::superChamber().

Referenced by run(), and setGEMGeometry().

1045 {
1046  auto superChamber(gem_g->superChamber(id));
1047  for (auto ch : superChamber->chambers()) {
1048  for (auto roll : ch->etaPartitions()) {
1049  GEMDetId roll_id(roll->id());
1050  auto pads_in_det = gemPads->get(roll_id);
1051  for (auto pad = pads_in_det.first; pad != pads_in_det.second; ++pad) {
1052  GEMPadDigi gfirst((*pad).first());
1053  auto id_pad = std::make_pair(roll_id, &gfirst);
1054  const int bx_shifted(lct_central_bx + (pad->first()).bx());
1055  for (int bx = bx_shifted - maxDeltaBXPad_;bx <= bx_shifted + maxDeltaBXPad_; ++bx) {
1056  if(bx != lct_central_bx) continue;
1057  coPads_[bx].push_back(id_pad);
1058  }
1059  }
1060  }
1061  }
1062 }
const GEMSuperChamber * superChamber(GEMDetId id) const
Definition: GEMGeometry.cc:91
const GEMGeometry * gem_g
void CSCMotherboardME21GEM::retrieveGEMPads ( const GEMPadDigiCollection pads,
unsigned  id 
)

Definition at line 1026 of file CSCMotherboardME21GEM.cc.

References gem_g, CSCMotherboard::lct_central_bx, maxDeltaBXPad_, pads_, and GEMGeometry::superChamber().

Referenced by run(), and setGEMGeometry().

1027 {
1028  auto superChamber(gem_g->superChamber(id));
1029  for (auto ch : superChamber->chambers()) {
1030  for (auto roll : ch->etaPartitions()) {
1031  GEMDetId roll_id(roll->id());
1032  auto pads_in_det = gemPads->get(roll_id);
1033  for (auto pad = pads_in_det.first; pad != pads_in_det.second; ++pad) {
1034  auto id_pad = std::make_pair(roll_id, &(*pad));
1035  const int bx_shifted(lct_central_bx + pad->bx());
1036  for (int bx = bx_shifted - maxDeltaBXPad_;bx <= bx_shifted + maxDeltaBXPad_; ++bx) {
1037  pads_[bx].push_back(id_pad);
1038  }
1039  }
1040  }
1041  }
1042 }
const GEMSuperChamber * superChamber(GEMDetId id) const
Definition: GEMGeometry.cc:91
const GEMGeometry * gem_g
void CSCMotherboardME21GEM::run ( const CSCWireDigiCollection wiredc,
const CSCComparatorDigiCollection compdc,
const GEMPadDigiCollection gemPads 
)

Run function for normal usage. Runs cathode and anode LCT processors, takes results and correlates into CorrelatedLCT.

Definition at line 164 of file CSCMotherboardME21GEM.cc.

References funct::abs(), CSCMotherboard::alct, allLCTs, assignGEMRoll(), buildCoincidencePads(), buildLCTfromALCTandGEM_, buildLCTfromCLCTandGEM_, EnergyCorrector::c, CSCTriggerGeomManager::chamber(), GEMGeometry::chamber(), CSCMotherboard::clct, CSCCorrelatedLCTDigi::clear(), clear(), coPads_, correctLCTtimingWithGEM_, correlateLCTsGEM(), gather_cfg::cout, createGEMRollEtaLUT(), cscHsToGemPad_, cscWgToGemRoll_, debug_gem_matching, debug_luts, drop_used_clcts, dropLowQualityCLCTsNoGEMs_, stringResolutionProvider_cfi::eta, plotBeamSpotDB::first, gem_g, gemPadToCscHs_, gemRollToEtaLimits_, CSCTriggerGeometry::get(), runTauDisplay::gp, i, CSCMotherboard::infoV, createfilelist::int, CSCMotherboard::lct_central_bx, LogDebug, lut_wg_eta_even, lut_wg_eta_odd, match_earliest_clct_me21_only, CSCMotherboard::match_trig_window_size, matchingGEMPads(), CSCAnodeLCTProcessor::MAX_ALCT_BINS, CSCCathodeLCTProcessor::MAX_CLCT_BINS, CSCMotherboard::MAX_LCT_BINS, maxDeltaBXCoPad_, maxDeltaPadPad_, maxDeltaPadPadEven_, maxDeltaPadPadOdd_, gen::n, or, AlCaHLTBitMon_ParallelJobs::p, pads_, pref, printGEMTriggerPads(), btvTracks_cfi::quality, readoutLCTs(), retrieveGEMCoPads(), retrieveGEMPads(), runME21ILT_, edm::second(), findQualityFiles::size, GEMGeometry::stations(), digi_MixPreMix_cfi::strip, CSCMotherboard::theEndcap, CSCMotherboard::theSector, CSCMotherboard::theStation, CSCMotherboard::theSubsector, CSCMotherboard::theTrigChamber, and tmb_cross_bx_algo.

Referenced by CSCTriggerPrimitivesBuilder::build().

167 {
168  clear();
169 
170  if (!( alct and clct and runME21ILT_))
171  {
172  if (infoV >= 0) edm::LogError("L1CSCTPEmulatorSetupError")
173  << "+++ run() called for non-existing ALCT/CLCT processor! +++ \n";
174  return;
175  }
176 
177  alct->run(wiredc); // run anodeLCT
178  clct->run(compdc); // run cathodeLCT
179 
180  bool gemGeometryAvailable(false);
181  if (gem_g != nullptr) {
182  if (infoV >= 0) edm::LogInfo("L1CSCTPEmulatorSetupInfo")
183  << "+++ run() called for GEM-CSC integrated trigger! +++ \n";
184  gemGeometryAvailable = true;
185  }
186 
187  // retrieve CSCChamber geometry
189  const CSCChamber* cscChamber(geo_manager->chamber(theEndcap, theStation, theSector, theSubsector, theTrigChamber));
190  const CSCDetId csc_id(cscChamber->id());
191 
192  if (runME21ILT_){
193 
194  // check for GE2/1 geometry
195  if ((not gemGeometryAvailable) or (gemGeometryAvailable and (gem_g->stations()).size()==2)) {
196  if (infoV >= 0) edm::LogError("L1CSCTPEmulatorSetupError")
197  << "+++ run() called for GEM-CSC integrated trigger without valid GE21 geometry! +++ \n";
198  return;
199  }
200 
201  // trigger geometry
202  const CSCLayer* keyLayer(cscChamber->layer(3));
203  const CSCLayerGeometry* keyLayerGeometry(keyLayer->geometry());
204 
205  // const bool isEven(csc_id%2==0);
206  const int region((theEndcap == 1) ? 1: -1);
207  const bool isEven(csc_id.chamber()%2==0);
208  const GEMDetId gem_id_long(region, 1, 2, 1, csc_id.chamber(), 0);
209  const GEMChamber* gemChamberLong(gem_g->chamber(gem_id_long));
210 
211  // LUT<roll,<etaMin,etaMax> >
213 
214  if (debug_luts){
215  std::cout<<"csc id "<< csc_id <<" "<< csc_id.rawId() << (isEven ? " even" : " odd") << " chamber" << csc_id.chamber()<<std::endl;
216  if (gemRollToEtaLimits_.size())
217  for(auto p : gemRollToEtaLimits_) {
218  std::cout << "pad "<< p.first << " min eta " << (p.second).first << " max eta " << (p.second).second << std::endl;
219  }
220  }
221 
222  // loop on all wiregroups to create a LUT <WG,rollMin,rollMax>
223  const int numberOfWG(keyLayerGeometry->numberOfWireGroups());
224  for (int i = 0; i< numberOfWG; ++i){
225  auto eta(isEven ? lut_wg_eta_even[i][1] : lut_wg_eta_odd[i][1]);
227  }
228  if (debug_luts){
229  for(auto p : cscWgToGemRoll_) {
230  std::cout << "WG "<< p.first << " GEM roll " << p.second << std::endl;
231  }
232  }
233 
234  auto randRoll(gemChamberLong->etaPartition(2));
235  auto nStrips(keyLayerGeometry->numberOfStrips());
236  for (float i = 0; i< nStrips; i = i+0.5){
237  const LocalPoint lpCSC(keyLayerGeometry->topology()->localPosition(i));
238  const GlobalPoint gp(keyLayer->toGlobal(lpCSC));
239  const LocalPoint lpGEM(randRoll->toLocal(gp));
240  const int HS(i/0.5);
241  const bool edge(HS < 5 or HS > 155);
242  const float pad(edge ? -99 : randRoll->pad(lpGEM));
243  // HS are wrapped-around
244  cscHsToGemPad_[HS] = std::make_pair(std::floor(pad),std::ceil(pad));
245  }
246  if (debug_luts){
247  std::cout << "detId " << csc_id << std::endl;
248  for(auto p : cscHsToGemPad_) {
249  std::cout << "CSC HS "<< p.first << " GEM Pad low " << (p.second).first << " GEM Pad high " << (p.second).second << std::endl;
250  }
251  }
252 
253  // pick any roll
254  const int nGEMPads(randRoll->npads());
255  for (int i = 0; i< nGEMPads; ++i){
256  const LocalPoint lpGEM(randRoll->centreOfPad(i));
257  const GlobalPoint gp(randRoll->toGlobal(lpGEM));
258  const LocalPoint lpCSC(keyLayer->toLocal(gp));
259  const float strip(keyLayerGeometry->strip(lpCSC));
260  // HS are wrapped-around
261  gemPadToCscHs_[i] = (int) (strip - 0.25)/0.5;
262  }
263  if (debug_luts){
264  std::cout << "detId " << csc_id << std::endl;
265  for(auto p : gemPadToCscHs_) {
266  std::cout << "GEM Pad "<< p.first << " CSC HS : " << p.second << std::endl;
267  }
268  }
269 
270  //select correct scenario, even or odd
272  // build coincidence pads
273  std::unique_ptr<GEMCoPadDigiCollection> pCoPads(new GEMCoPadDigiCollection());
274  buildCoincidencePads(gemPads, *pCoPads, csc_id);
275 
276  // retrieve pads and copads in a certain BX window for this CSC
277  pads_.clear();
278  coPads_.clear();
279  retrieveGEMPads(gemPads, gem_id_long);
280  retrieveGEMCoPads(pCoPads.get(), gem_id_long);
281  }
282 
283  int used_clct_mask[20];
284  for (int c=0;c<20;++c) used_clct_mask[c]=0;
285 
286  const bool hasPads(pads_.size()!=0);
287  const bool hasCoPads(hasPads and coPads_.size()!=0);
288 
289  // ALCT centric matching
290  for (int bx_alct = 0; bx_alct < CSCAnodeLCTProcessor::MAX_ALCT_BINS; bx_alct++)
291  {
292  if (alct->bestALCT[bx_alct].isValid())
293  {
294  const int bx_clct_start(bx_alct - match_trig_window_size/2);
295  const int bx_clct_stop(bx_alct + match_trig_window_size/2);
296  const int bx_copad_start(bx_alct - maxDeltaBXCoPad_);
297  const int bx_copad_stop(bx_alct + maxDeltaBXCoPad_);
298 
299  if (debug_gem_matching){
300  std::cout << "========================================================================" << std::endl;
301  std::cout << "ALCT-CLCT matching in ME2/1 chamber: " << cscChamber->id() << std::endl;
302  std::cout << "------------------------------------------------------------------------" << std::endl;
303  std::cout << "+++ Best ALCT Details: ";
304  alct->bestALCT[bx_alct].print();
305  std::cout << "+++ Second ALCT Details: ";
306  alct->secondALCT[bx_alct].print();
307 
308  printGEMTriggerPads(bx_clct_start, bx_clct_stop);
309 
310  std::cout << "------------------------------------------------------------------------" << std::endl;
311  std::cout << "Attempt ALCT-CLCT matching in ME2/1 in bx range: [" << bx_clct_start << "," << bx_clct_stop << "]" << std::endl;
312  }
313 
314  // ALCT-to-CLCT
315  int nSuccesFulMatches = 0;
316  for (int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++)
317  {
318  if (bx_clct < 0 or bx_clct >= CSCCathodeLCTProcessor::MAX_CLCT_BINS) continue;
319  if (drop_used_clcts and used_clct_mask[bx_clct]) continue;
320  if (clct->bestCLCT[bx_clct].isValid())
321  {
322  // clct quality
323  const int quality(clct->bestCLCT[bx_clct].getQuality());
324  // low quality ALCT
325  const bool lowQualityALCT(alct->bestALCT[bx_alct].getQuality() == 0);
326  // low quality ALCT or CLCT
327  const bool lowQuality(quality<4 or lowQualityALCT);
328  if (debug_gem_matching) std::cout << "++Valid ME21 CLCT: " << clct->bestCLCT[bx_clct] << std::endl;
329 
330  // pick the pad that corresponds
331  auto matchingPads(matchingGEMPads(clct->bestCLCT[bx_clct], alct->bestALCT[bx_alct], pads_[bx_clct], false));
332  auto matchingCoPads(matchingGEMPads(clct->bestCLCT[bx_clct], alct->bestALCT[bx_alct], coPads_[bx_clct], true));
333  if (runME21ILT_ and dropLowQualityCLCTsNoGEMs_ and lowQuality and hasPads){
334  int nFound(matchingPads.size());
335  const bool clctInEdge(clct->bestCLCT[bx_clct].getKeyStrip() < 5 or clct->bestCLCT[bx_clct].getKeyStrip() > 155);
336  if (clctInEdge){
337  if (debug_gem_matching) std::cout << "\tInfo: low quality CLCT in CSC chamber edge, don't care about GEM pads" << std::endl;
338  }
339  else {
340  if (nFound != 0){
341  if (debug_gem_matching) std::cout << "\tInfo: low quality CLCT with " << nFound << " matching GEM trigger pads" << std::endl;
342  }
343  else {
344  if (debug_gem_matching) std::cout << "\tWarning: low quality CLCT without matching GEM trigger pad" << std::endl;
345  continue;
346  }
347  }
348  }
349 
350  // check timing
351  if (runME21ILT_ and correctLCTtimingWithGEM_){
352  int nFound(matchingCoPads.size());
353  if (nFound != 0 and bx_alct == 6 and bx_clct != 6){
354  if (debug_gem_matching) std::cout << "\tInfo: CLCT with incorrect timing" << std::endl;
355  continue;
356  }
357  }
358 
359  ++nSuccesFulMatches;
360 
361  int mbx = bx_clct-bx_clct_start;
362 
363  correlateLCTsGEM(alct->bestALCT[bx_alct], alct->secondALCT[bx_alct],
364  clct->bestCLCT[bx_clct], clct->secondCLCT[bx_clct],
365  allLCTs[bx_alct][mbx][0], allLCTs[bx_alct][mbx][1], matchingPads, matchingCoPads);
366  if (debug_gem_matching) {
367  // if (infoV > 1) LogTrace("CSCMotherboard")
368  std::cout << "Successful ALCT-CLCT match in ME21: bx_alct = " << bx_alct
369  << "; match window: [" << bx_clct_start << "; " << bx_clct_stop
370  << "]; bx_clct = " << bx_clct << std::endl;
371  std::cout << "+++ Best CLCT Details: ";
372  clct->bestCLCT[bx_clct].print();
373  std::cout << "+++ Second CLCT Details: ";
374  clct->secondCLCT[bx_clct].print();
375  }
376  if (allLCTs[bx_alct][mbx][0].isValid()) {
377  used_clct_mask[bx_clct] += 1;
379  }
380  }
381  }
382 
383  // ALCT-to-GEM matching
384  int nSuccesFulGEMMatches = 0;
385  if (runME21ILT_ and nSuccesFulMatches==0 and buildLCTfromALCTandGEM_){
386  if (debug_gem_matching) std::cout << "++No valid ALCT-CLCT matches in ME21" << std::endl;
387  for (int bx_gem = bx_copad_start; bx_gem <= bx_copad_stop; bx_gem++) {
388  if (not hasCoPads) {
389  continue;
390  }
391 
392  // find the best matching copad - first one
393  auto copads(matchingGEMPads(alct->bestALCT[bx_alct], coPads_[bx_gem], true));
394  if (debug_gem_matching) std::cout << "\t++Number of matching GEM CoPads in BX " << bx_alct << " : "<< copads.size() << std::endl;
395  if (copads.size()==0) {
396  continue;
397  }
398 
399  correlateLCTsGEM(alct->bestALCT[bx_alct], alct->secondALCT[bx_alct],
400  *(copads.at(0)).second, allLCTs[bx_alct][0][0], allLCTs[bx_alct][0][1]);
401  if (allLCTs[bx_alct][0][0].isValid()) {
402  ++nSuccesFulGEMMatches;
404  }
405  if (debug_gem_matching) {
406  std::cout << "Successful ALCT-GEM CoPad match in ME21: bx_alct = " << bx_alct << std::endl << std::endl;
407  std::cout << "------------------------------------------------------------------------" << std::endl << std::endl;
408  }
409  }
410  }
411 
412  if (debug_gem_matching) {
413  std::cout << "========================================================================" << std::endl;
414  std::cout << "Summary: " << std::endl;
415  if (nSuccesFulMatches>1)
416  std::cout << "Too many successful ALCT-CLCT matches in ME21: " << nSuccesFulMatches
417  << ", CSCDetId " << cscChamber->id()
418  << ", bx_alct = " << bx_alct
419  << "; match window: [" << bx_clct_start << "; " << bx_clct_stop << "]" << std::endl;
420  else if (nSuccesFulMatches==1)
421  std::cout << "1 successful ALCT-CLCT match in ME21: "
422  << " CSCDetId " << cscChamber->id()
423  << ", bx_alct = " << bx_alct
424  << "; match window: [" << bx_clct_start << "; " << bx_clct_stop << "]" << std::endl;
425  else if (nSuccesFulGEMMatches==1)
426  std::cout << "1 successful ALCT-GEM match in ME21: "
427  << " CSCDetId " << cscChamber->id()
428  << ", bx_alct = " << bx_alct
429  << "; match window: [" << bx_clct_start << "; " << bx_clct_stop << "]" << std::endl;
430  else
431  std::cout << "Unsuccessful ALCT-CLCT match in ME21: "
432  << "CSCDetId " << cscChamber->id()
433  << ", bx_alct = " << bx_alct
434  << "; match window: [" << bx_clct_start << "; " << bx_clct_stop << "]" << std::endl;
435  }
436  }
437  // at this point we have invalid ALCTs --> try GEM pad matching
438  else{
439  auto coPads(coPads_[bx_alct]);
440  if (runME21ILT_ and coPads.size() and buildLCTfromCLCTandGEM_) {
441  //const int bx_clct_start(bx_alct - match_trig_window_size/2);
442  //const int bx_clct_stop(bx_alct + match_trig_window_size/2);
443 
444  if (debug_gem_matching){
445  std::cout << "========================================================================" << std::endl;
446  // std::cout << "GEM-CLCT matching in ME2/1 chamber: " << cscChamber->id() << " in bx range: [" << bx_clct_start << "," << bx_clct_stop << "]" << std::endl;
447  std::cout <<"GEM-CLCT matching in ME2/1 chamber: "<< cscChamber->id()<< "in bx:"<<bx_alct<<std::endl;
448  std::cout << "------------------------------------------------------------------------" << std::endl;
449  }
450  // GEM-to-CLCT
451  int nSuccesFulMatches = 0;
452  //for (int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++)
453  // {
454  // if (bx_clct < 0 or bx_clct >= CSCCathodeLCTProcessor::MAX_CLCT_BINS) continue;
455  if (drop_used_clcts and used_clct_mask[bx_alct]) continue;
456  if (clct->bestCLCT[bx_alct].isValid())
457  {
458  const int quality(clct->bestCLCT[bx_alct].getQuality());
459  // only use high-Q stubs for the time being
460  if (quality < 4) continue;
461 
462  ++nSuccesFulMatches;
463 
464  int mbx = std::abs(clct->bestCLCT[bx_alct].getBX()-bx_alct);
465  int bx_gem = (coPads[0].second)->bx()+lct_central_bx;
466  correlateLCTsGEM(clct->bestCLCT[bx_alct], clct->secondCLCT[bx_alct], *(coPads[0].second), GEMDetId(coPads[0].first).roll(),
467  allLCTs[bx_gem][mbx][0], allLCTs[bx_gem][mbx][1]);
468  if (debug_gem_matching) {
469  // if (infoV > 1) LogTrace("CSCMotherboard")
470  std::cout << "Successful GEM-CLCT match in ME21: bx_alct = " << bx_alct <<std::endl;
471  //<< "; match window: [" << bx_clct_start << "; " << bx_clct_stop
472  //<< "]; bx_clct = " << bx_clct << std::endl;
473  std::cout << "+++ Best CLCT Details: ";
474  clct->bestCLCT[bx_alct].print();
475  std::cout << "+++ Second CLCT Details: ";
476  clct->secondCLCT[bx_alct].print();
477  }
478  if (allLCTs[bx_gem][mbx][0].isValid()) {
479  used_clct_mask[bx_alct] += 1;
481  }
482  }
483  }
484  }
485  }
486 
487  // reduction of nLCTs per each BX
488  for (int bx = 0; bx < MAX_LCT_BINS; bx++)
489  {
490  // counting
491  unsigned int n=0;
492  for (unsigned int mbx = 0; mbx < match_trig_window_size; mbx++)
493  for (int i=0;i<2;i++)
494  {
495  int cbx = bx + mbx - match_trig_window_size/2;
496  if (allLCTs[bx][mbx][i].isValid())
497  {
498  ++n;
499  if (infoV > 0) LogDebug("CSCMotherboard")
500  << "LCT"<<i+1<<" "<<bx<<"/"<<cbx<<": "<<allLCTs[bx][mbx][i]<<std::endl;
501  }
502  }
503 
504  // some simple cross-bx sorting algorithms
505  if (tmb_cross_bx_algo == 1 and (n>2))
506  {
507  n=0;
508  for (unsigned int mbx = 0; mbx < match_trig_window_size; mbx++)
509  for (int i=0;i<2;i++)
510  {
511  if (allLCTs[bx][pref[mbx]][i].isValid())
512  {
513  n++;
514  if (n>2) allLCTs[bx][pref[mbx]][i].clear();
515  }
516  }
517 
518  n=0;
519  for (unsigned int mbx = 0; mbx < match_trig_window_size; mbx++)
520  for (int i=0;i<2;i++)
521  {
522  int cbx = bx + mbx - match_trig_window_size/2;
523  if (allLCTs[bx][mbx][i].isValid())
524  {
525  n++;
526  if (infoV > 0) LogDebug("CSCMotherboard")
527  << "LCT"<<i+1<<" "<<bx<<"/"<<cbx<<": "<<allLCTs[bx][mbx][i]<<std::cout;
528  }
529  }
530  if (infoV > 0 and n>0) LogDebug("CSCMotherboard")
531  <<"bx "<<bx<<" nnLCT:"<<n<<" "<<n<<std::endl;
532  } // x-bx sorting
533  }
534 
535  bool first = true;
536  unsigned int n=0;
537  for (auto p : readoutLCTs()) {
538  if (debug_gem_matching and first){
539  std::cout << "========================================================================" << std::endl;
540  std::cout << "Counting the final LCTs" << std::endl;
541  std::cout << "========================================================================" << std::endl;
542  first = false;
543  std::cout << "tmb_cross_bx_algo: " << tmb_cross_bx_algo << std::endl;
544  }
545  n++;
546  if (debug_gem_matching)
547  std::cout << "LCT "<<n<<" " << p <<std::endl;
548  }
549 }
#define LogDebug(id)
size
Write out results.
const unsigned theSector
int i
Definition: DBlmapReader.cc:9
GEMPadsBX matchingGEMPads(const CSCCLCTDigi &cLCT, const GEMPadsBX &pads=GEMPadsBX(), bool isCopad=false, bool first=true)
unsigned int match_trig_window_size
const unsigned theTrigChamber
std::map< int, std::pair< double, double > > gemRollToEtaLimits_
const unsigned theEndcap
U second(std::pair< T, U > const &p)
const unsigned theStation
void retrieveGEMPads(const GEMPadDigiCollection *pads, unsigned id)
static CSCTriggerGeomManager * get()
static const double lut_wg_eta_odd[112][2]
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
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
MuonDigiCollection< GEMDetId, GEMCoPadDigi > GEMCoPadDigiCollection
std::map< int, std::pair< double, double > > createGEMRollEtaLUT()
std::map< int, std::pair< int, int > > cscHsToGemPad_
const GEMChamber * chamber(GEMDetId id) const
Definition: GEMGeometry.cc:95
std::map< int, int > gemPadToCscHs_
CSCCorrelatedLCTDigi allLCTs[MAX_LCT_BINS][15][2]
const GEMGeometry * gem_g
std::unique_ptr< CSCAnodeLCTProcessor > alct
void buildCoincidencePads(const GEMPadDigiCollection *out_pads, GEMCoPadDigiCollection &out_co_pads, CSCDetId csc_id)
void printGEMTriggerPads(int minBX, int maxBx, bool iscopad=false)
std::unique_ptr< CSCCathodeLCTProcessor > clct
std::vector< CSCCorrelatedLCTDigi > readoutLCTs()
const std::vector< const GEMStation * > & stations() const
Return a vector of all GEM stations.
Definition: GEMGeometry.cc:47
void retrieveGEMCoPads(const GEMCoPadDigiCollection *pads, unsigned id)
void correlateLCTsGEM(CSCALCTDigi bestALCT, CSCALCTDigi secondALCT, GEMPadDigi gemPad, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2)
std::map< int, int > cscWgToGemRoll_
static const double lut_wg_eta_even[112][2]
void CSCMotherboardME21GEM::setCSCGeometry ( const CSCGeometry g)
inline

set CSC and GEM geometries for the matching needs

Definition at line 47 of file CSCMotherboardME21GEM.h.

References csc_g, and g.

Referenced by CSCTriggerPrimitivesBuilder::build().

47 { csc_g = g; }
const CSCGeometry * csc_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
void CSCMotherboardME21GEM::setGEMGeometry ( const GEMGeometry g)
inline

Definition at line 48 of file CSCMotherboardME21GEM.h.

References CSCMotherboard::alct, assignGEMRoll(), buildCoincidencePads(), CSCMotherboard::clct, constructLCTsGEM(), correlateLCTs(), correlateLCTsGEM(), createGEMRollEtaLUT(), deltaPad(), deltaRoll(), stringResolutionProvider_cfi::eta, findQualityGEM(), plotBeamSpotDB::first, g, gem_g, getLCTs(), matchingGEMPads(), simTrackMatching_cfi::minBX, printGEMTriggerPads(), readoutCoPads(), readoutLCTs(), retrieveGEMCoPads(), retrieveGEMPads(), sortLCTsByGEMDPhi(), and sortLCTsByQuality().

Referenced by CSCTriggerPrimitivesBuilder::build().

48 { gem_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 GEMGeometry * gem_g
std::vector< CSCCorrelatedLCTDigi > CSCMotherboardME21GEM::sortLCTsByGEMDPhi ( int  bx)

Definition at line 608 of file CSCMotherboardME21GEM.cc.

References allLCTs, i, CSCMotherboard::match_trig_window_size, max_me21_lcts, and CSCMotherboard::sortByGEMDphi().

Referenced by getLCTs(), and setGEMGeometry().

609 {
610  std::vector<CSCCorrelatedLCTDigi> LCTs;
611  LCTs.clear();
612  for (unsigned int mbx = 0; mbx < match_trig_window_size; mbx++)
613  for (int i=0;i<2;i++)
614  if (allLCTs[bx][mbx][i].isValid())
615  LCTs.push_back(allLCTs[bx][mbx][i]);
616 
617  // return sorted vector with 2 highest quality LCTs
618  std::sort(LCTs.begin(), LCTs.end(), CSCMotherboard::sortByGEMDphi);
619  if (LCTs.size()> max_me21_lcts) LCTs.erase(LCTs.begin()+max_me21_lcts, LCTs.end());
620  return LCTs;
621 }
int i
Definition: DBlmapReader.cc:9
static bool sortByGEMDphi(const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &)
unsigned int match_trig_window_size
CSCCorrelatedLCTDigi allLCTs[MAX_LCT_BINS][15][2]
std::vector<CSCCorrelatedLCTDigi> CSCMotherboardME21GEM::sortLCTsByGEMDPhi ( std::vector< CSCCorrelatedLCTDigi )
std::vector< CSCCorrelatedLCTDigi > CSCMotherboardME21GEM::sortLCTsByQuality ( int  bx)

Methods to sort the LCTs

Definition at line 586 of file CSCMotherboardME21GEM.cc.

References allLCTs, i, CSCMotherboard::match_trig_window_size, max_me21_lcts, and CSCMotherboard::sortByQuality().

Referenced by getLCTs(), and setGEMGeometry().

587 {
588  std::vector<CSCCorrelatedLCTDigi> LCTs;
589  LCTs.clear();
590  for (unsigned int mbx = 0; mbx < match_trig_window_size; mbx++)
591  for (int i=0;i<2;i++)
592  if (allLCTs[bx][mbx][i].isValid())
593  LCTs.push_back(allLCTs[bx][mbx][i]);
594 
595  //std::cout<<"LCT before sorting in Bx:"<<bx<<std::endl;
596  //for (auto p : LCTs)
597  // std::cout<< p <<std::endl;
598  // return sorted vector with 2 highest quality LCTs
599  std::sort(LCTs.begin(), LCTs.end(), CSCMotherboard::sortByQuality);
600  if (LCTs.size()> max_me21_lcts) LCTs.erase(LCTs.begin()+max_me21_lcts, LCTs.end());
601  //std::cout<<"LCT after sorting by quality in BX:"<<bx<<std::endl;
602  //for (auto p : LCTs)
603  // std::cout<< p <<std::endl;
604  return LCTs;
605 }
int i
Definition: DBlmapReader.cc:9
unsigned int match_trig_window_size
CSCCorrelatedLCTDigi allLCTs[MAX_LCT_BINS][15][2]
static bool sortByQuality(const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &)
std::vector<CSCCorrelatedLCTDigi> CSCMotherboardME21GEM::sortLCTsByQuality ( std::vector< CSCCorrelatedLCTDigi )

Member Data Documentation

std::vector<CSCALCTDigi> CSCMotherboardME21GEM::alctV
private

Definition at line 124 of file CSCMotherboardME21GEM.h.

CSCCorrelatedLCTDigi CSCMotherboardME21GEM::allLCTs[MAX_LCT_BINS][15][2]
private

for the case when more than 2 LCTs/BX are allowed; maximum match window = 15

Definition at line 114 of file CSCMotherboardME21GEM.h.

Referenced by clear(), getLCTs(), run(), sortLCTsByGEMDPhi(), and sortLCTsByQuality().

bool CSCMotherboardME21GEM::buildLCTfromALCTandGEM_
private

Definition at line 175 of file CSCMotherboardME21GEM.h.

Referenced by CSCMotherboardME21GEM(), and run().

bool CSCMotherboardME21GEM::buildLCTfromCLCTandGEM_
private

Definition at line 176 of file CSCMotherboardME21GEM.h.

Referenced by CSCMotherboardME21GEM(), and run().

std::vector<CSCCLCTDigi> CSCMotherboardME21GEM::clctV
private

Definition at line 125 of file CSCMotherboardME21GEM.h.

GEMPads CSCMotherboardME21GEM::coPads_
private

Definition at line 196 of file CSCMotherboardME21GEM.h.

Referenced by clear(), printGEMTriggerPads(), retrieveGEMCoPads(), and run().

bool CSCMotherboardME21GEM::correctLCTtimingWithGEM_
private

Definition at line 172 of file CSCMotherboardME21GEM.h.

Referenced by CSCMotherboardME21GEM(), and run().

const CSCGeometry* CSCMotherboardME21GEM::csc_g
private

Definition at line 120 of file CSCMotherboardME21GEM.h.

Referenced by setCSCGeometry().

std::map<int,std::pair<int,int> > CSCMotherboardME21GEM::cscHsToGemPad_
private

Definition at line 192 of file CSCMotherboardME21GEM.h.

Referenced by clear(), matchingGEMPads(), and run().

std::map<int,int> CSCMotherboardME21GEM::cscWgToGemRoll_
private

Definition at line 188 of file CSCMotherboardME21GEM.h.

Referenced by clear(), matchingGEMPads(), and run().

bool CSCMotherboardME21GEM::debug_gem_dphi
private

Definition at line 148 of file CSCMotherboardME21GEM.h.

Referenced by CSCMotherboardME21GEM().

bool CSCMotherboardME21GEM::debug_gem_matching
private

Definition at line 146 of file CSCMotherboardME21GEM.h.

Referenced by CSCMotherboardME21GEM(), and run().

bool CSCMotherboardME21GEM::debug_luts
private

Definition at line 147 of file CSCMotherboardME21GEM.h.

Referenced by CSCMotherboardME21GEM(), and run().

bool CSCMotherboardME21GEM::doLCTGhostBustingWithGEMs_
private

Definition at line 165 of file CSCMotherboardME21GEM.h.

Referenced by CSCMotherboardME21GEM().

bool CSCMotherboardME21GEM::drop_used_clcts
private

whether to not reuse CLCTs that were used by previous matching ALCTs in ALCT-to-CLCT algorithm

Definition at line 135 of file CSCMotherboardME21GEM.h.

Referenced by CSCMotherboardME21GEM(), and run().

bool CSCMotherboardME21GEM::dropLowQualityALCTsNoGEMs_
private

Definition at line 169 of file CSCMotherboardME21GEM.h.

Referenced by CSCMotherboardME21GEM().

bool CSCMotherboardME21GEM::dropLowQualityCLCTsNoGEMs_
private

Definition at line 168 of file CSCMotherboardME21GEM.h.

Referenced by CSCMotherboardME21GEM(), and run().

const GEMGeometry* CSCMotherboardME21GEM::gem_g
private
std::vector<GEMCoPadDigi> CSCMotherboardME21GEM::gemCoPadV
private

Definition at line 126 of file CSCMotherboardME21GEM.h.

Referenced by buildCoincidencePads(), and readoutCoPads().

std::map<int,int> CSCMotherboardME21GEM::gemPadToCscHs_
private

Definition at line 191 of file CSCMotherboardME21GEM.h.

Referenced by clear(), constructLCTsGEM(), and run().

std::map<int,std::pair<double,double> > CSCMotherboardME21GEM::gemRollToEtaLimits_
private

Definition at line 187 of file CSCMotherboardME21GEM.h.

Referenced by assignGEMRoll(), clear(), and run().

const double CSCMotherboardME21GEM::lut_pt_vs_dphi_gemcsc
staticprivate
Initial value:
= {
{3, 0.01832829, 0.01003643 },
{5, 0.01095490, 0.00631625 },
{7, 0.00786026, 0.00501017 },
{10, 0.00596349, 0.00414560 },
{15, 0.00462411, 0.00365550 },
{20, 0.00435298, 0.00361550 },
{30, 0.00465160, 0.00335700 },
{40, 0.00372145, 0.00366262 }
}

Definition at line 116 of file CSCMotherboardME21GEM.h.

const double CSCMotherboardME21GEM::lut_wg_eta_even
staticprivate
Initial value:
= {
{ 0,2.412},{ 1,2.405},{ 2,2.395},{ 3,2.385},{ 4,2.375},{ 5,2.365},{ 6,2.355},{ 7,2.345},
{ 8,2.335},{ 9,2.325},{10,2.316},{11,2.306},{12,2.297},{13,2.288},{14,2.279},{15,2.270},
{16,2.261},{17,2.252},{18,2.243},{19,2.234},{20,2.226},{21,2.217},{22,2.209},{23,2.200},
{24,2.192},{25,2.184},{26,2.175},{27,2.167},{28,2.159},{29,2.151},{30,2.143},{31,2.135},
{32,2.128},{33,2.120},{34,2.112},{35,2.105},{36,2.097},{37,2.090},{38,2.082},{39,2.075},
{40,2.068},{41,2.060},{42,2.053},{43,2.046},{44,2.041},{45,2.030},{46,2.025},{47,2.018},
{48,2.011},{49,2.005},{50,1.998},{51,1.991},{52,1.985},{53,1.978},{54,1.971},{55,1.965},
{56,1.958},{57,1.952},{58,1.946},{59,1.939},{60,1.933},{61,1.927},{62,1.921},{63,1.915},
{64,1.909},{65,1.902},{66,1.895},{67,1.887},{68,1.880},{69,1.873},{70,1.866},{71,1.859},
{72,1.853},{73,1.846},{74,1.839},{75,1.832},{76,1.826},{77,1.819},{78,1.812},{79,1.806},
{80,1.801},{81,1.792},{82,1.787},{83,1.780},{84,1.774},{85,1.768},{86,1.762},{87,1.756},
{88,1.750},{89,1.744},{90,1.738},{91,1.732},{92,1.726},{93,1.720},{94,1.714},{95,1.708},
{96,1.702},{97,1.697},{98,1.691},{99,1.685},{100,1.680},{101,1.674},{102,1.669},{103,1.663},
{104,1.658},{105,1.652},{106,1.647},{107,1.642},{108,1.636},{109,1.631},{110,1.626},{111,1.621},
}

Definition at line 118 of file CSCMotherboardME21GEM.h.

Referenced by run().

const double CSCMotherboardME21GEM::lut_wg_eta_odd
staticprivate
Initial value:
= {
{ 0,2.441},{ 1,2.435},{ 2,2.425},{ 3,2.414},{ 4,2.404},{ 5,2.394},{ 6,2.384},{ 7,2.374},
{ 8,2.365},{ 9,2.355},{10,2.346},{11,2.336},{12,2.327},{13,2.317},{14,2.308},{15,2.299},
{16,2.290},{17,2.281},{18,2.273},{19,2.264},{20,2.255},{21,2.247},{22,2.238},{23,2.230},
{24,2.221},{25,2.213},{26,2.205},{27,2.197},{28,2.189},{29,2.181},{30,2.173},{31,2.165},
{32,2.157},{33,2.149},{34,2.142},{35,2.134},{36,2.127},{37,2.119},{38,2.112},{39,2.104},
{40,2.097},{41,2.090},{42,2.083},{43,2.075},{44,2.070},{45,2.059},{46,2.054},{47,2.047},
{48,2.041},{49,2.034},{50,2.027},{51,2.020},{52,2.014},{53,2.007},{54,2.000},{55,1.994},
{56,1.988},{57,1.981},{58,1.975},{59,1.968},{60,1.962},{61,1.956},{62,1.950},{63,1.944},
{64,1.937},{65,1.931},{66,1.924},{67,1.916},{68,1.909},{69,1.902},{70,1.895},{71,1.888},
{72,1.881},{73,1.875},{74,1.868},{75,1.861},{76,1.854},{77,1.848},{78,1.841},{79,1.835},
{80,1.830},{81,1.820},{82,1.815},{83,1.809},{84,1.803},{85,1.796},{86,1.790},{87,1.784},
{88,1.778},{89,1.772},{90,1.766},{91,1.760},{92,1.754},{93,1.748},{94,1.742},{95,1.736},
{96,1.731},{97,1.725},{98,1.719},{99,1.714},{100,1.708},{101,1.702},{102,1.697},{103,1.691},
{104,1.686},{105,1.680},{106,1.675},{107,1.670},{108,1.664},{109,1.659},{110,1.654},{111,1.648},
}

Definition at line 117 of file CSCMotherboardME21GEM.h.

Referenced by run().

bool CSCMotherboardME21GEM::match_earliest_clct_me21_only
private

Definition at line 131 of file CSCMotherboardME21GEM.h.

Referenced by CSCMotherboardME21GEM(), and run().

unsigned int CSCMotherboardME21GEM::max_me21_lcts
private

maximum lcts per BX in ME2

Definition at line 140 of file CSCMotherboardME21GEM.h.

Referenced by CSCMotherboardME21GEM(), sortLCTsByGEMDPhi(), and sortLCTsByQuality().

int CSCMotherboardME21GEM::maxDeltaBXCoPad_
private

Definition at line 162 of file CSCMotherboardME21GEM.h.

Referenced by CSCMotherboardME21GEM(), matchingGEMPads(), and run().

int CSCMotherboardME21GEM::maxDeltaBXInCoPad_
private

Definition at line 151 of file CSCMotherboardME21GEM.h.

Referenced by buildCoincidencePads(), and CSCMotherboardME21GEM().

int CSCMotherboardME21GEM::maxDeltaBXPad_
private
int CSCMotherboardME21GEM::maxDeltaPadCoPad_
private

Definition at line 163 of file CSCMotherboardME21GEM.h.

Referenced by CSCMotherboardME21GEM(), and matchingGEMPads().

int CSCMotherboardME21GEM::maxDeltaPadInCoPad_
private

Definition at line 152 of file CSCMotherboardME21GEM.h.

Referenced by buildCoincidencePads(), and CSCMotherboardME21GEM().

int CSCMotherboardME21GEM::maxDeltaPadPad_
private

Definition at line 156 of file CSCMotherboardME21GEM.h.

Referenced by matchingGEMPads(), and run().

int CSCMotherboardME21GEM::maxDeltaPadPadEven_
private

Definition at line 157 of file CSCMotherboardME21GEM.h.

Referenced by CSCMotherboardME21GEM(), and run().

int CSCMotherboardME21GEM::maxDeltaPadPadOdd_
private

Definition at line 158 of file CSCMotherboardME21GEM.h.

Referenced by CSCMotherboardME21GEM(), and run().

int CSCMotherboardME21GEM::maxDeltaWg_
private

Definition at line 159 of file CSCMotherboardME21GEM.h.

Referenced by CSCMotherboardME21GEM(), and matchingGEMPads().

GEMPads CSCMotherboardME21GEM::pads_
private

Definition at line 195 of file CSCMotherboardME21GEM.h.

Referenced by clear(), printGEMTriggerPads(), retrieveGEMPads(), and run().

int CSCMotherboardME21GEM::pref[MAX_LCT_BINS]
private

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

Definition at line 129 of file CSCMotherboardME21GEM.h.

Referenced by CSCMotherboardME21GEM(), and run().

bool CSCMotherboardME21GEM::promoteALCTGEMpattern_
private

Definition at line 181 of file CSCMotherboardME21GEM.h.

Referenced by constructLCTsGEM(), and CSCMotherboardME21GEM().

bool CSCMotherboardME21GEM::promoteALCTGEMquality_
private

Definition at line 184 of file CSCMotherboardME21GEM.h.

Referenced by constructLCTsGEM(), and CSCMotherboardME21GEM().

bool CSCMotherboardME21GEM::promoteCLCTGEMquality_
private

Definition at line 185 of file CSCMotherboardME21GEM.h.

Referenced by constructLCTsGEM(), and CSCMotherboardME21GEM().

bool CSCMotherboardME21GEM::runME21ILT_
private

Definition at line 143 of file CSCMotherboardME21GEM.h.

Referenced by CSCMotherboardME21GEM(), and run().

unsigned int CSCMotherboardME21GEM::tmb_cross_bx_algo
private

Definition at line 137 of file CSCMotherboardME21GEM.h.

Referenced by CSCMotherboardME21GEM(), getLCTs(), and run().

bool CSCMotherboardME21GEM::useOldLCTDataFormat_
private

Definition at line 178 of file CSCMotherboardME21GEM.h.

Referenced by correlateLCTsGEM(), and CSCMotherboardME21GEM().