CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Public Attributes | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
CSCMotherboardME11GEM Class Reference

#include <CSCMotherboardME11GEM.h>

Inheritance diagram for CSCMotherboardME11GEM:
CSCMotherboard

Public Types

enum  ME11Part { ME1B = 1, ME1A =4 }
 

Public Member Functions

void clear ()
 
 CSCMotherboardME11GEM (unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)
 
 CSCMotherboardME11GEM ()
 
std::vector< CSCALCTDigigetALCTs1b ()
 
std::vector< CSCCLCTDigigetCLCTs1a ()
 
std::vector< CSCCLCTDigigetCLCTs1b ()
 
std::vector< CSCCorrelatedLCTDigigetLCTs1a ()
 
std::vector< CSCCorrelatedLCTDigigetLCTs1b ()
 
std::vector< GEMCoPadDigireadoutCoPads ()
 
std::vector< CSCCorrelatedLCTDigireadoutLCTs (enum ME11Part me1ab)
 
std::vector< CSCCorrelatedLCTDigireadoutLCTs1a ()
 
std::vector< CSCCorrelatedLCTDigireadoutLCTs1b ()
 
void run (const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc, const GEMPadDigiCollection *gemPads)
 
void setConfigParameters (const CSCDBL1TPParameters *conf)
 
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, enum ME11Part=ME1B)
 
std::vector< CSCCorrelatedLCTDigisortLCTsByGEMDPhi (enum ME11Part=ME1B)
 
std::vector< CSCCorrelatedLCTDigisortLCTsByGEMDPhi (std::vector< CSCCorrelatedLCTDigi >)
 
std::vector< CSCCorrelatedLCTDigisortLCTsByQuality (int bx, enum ME11Part=ME1B)
 
std::vector< CSCCorrelatedLCTDigisortLCTsByQuality (enum ME11Part=ME1B)
 
std::vector< CSCCorrelatedLCTDigisortLCTsByQuality (std::vector< CSCCorrelatedLCTDigi >)
 
 ~CSCMotherboardME11GEM ()
 
- 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 ()
 

Public Attributes

std::unique_ptr
< CSCCathodeLCTProcessor
clct1a
 
- Public Attributes inherited from CSCMotherboard
std::unique_ptr
< CSCAnodeLCTProcessor
alct
 
std::unique_ptr
< CSCCathodeLCTProcessor
clct
 

Private Types

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

Private Member Functions

int assignGEMRoll (double eta)
 
void buildCoincidencePads (const GEMPadDigiCollection *out_pads, GEMCoPadDigiCollection &out_co_pads, CSCDetId csc_id)
 
CSCCorrelatedLCTDigi constructLCTsGEM (const CSCALCTDigi &alct, const GEMPadDigi &gem, int me, bool oldDataFormat=false)
 
CSCCorrelatedLCTDigi constructLCTsGEM (const CSCCLCTDigi &clct, const GEMPadDigi &gem, int roll, int me, 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)
 
void correlateLCTsGEM (CSCALCTDigi bestALCT, CSCALCTDigi secondALCT, CSCCLCTDigi bestCLCT, CSCCLCTDigi secondCLCT, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2, int me, const GEMPadsBX &pads=GEMPadsBX(), const GEMPadsBX &copads=GEMPadsBX())
 
void correlateLCTsGEM (CSCALCTDigi bestALCT, CSCALCTDigi secondALCT, GEMPadDigi gemPad, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2, int me)
 
void correlateLCTsGEM (CSCCLCTDigi bestCLCT, CSCCLCTDigi secondCLCT, GEMPadDigi gemPad, int roll, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2, int me)
 
void createGEMRollEtaLUT (bool isEven)
 
int deltaPad (int hs, int pad)
 
int deltaRoll (int wg, int roll)
 
bool doesALCTCrossCLCT (CSCALCTDigi &a, CSCCLCTDigi &c, int me)
 
unsigned int encodePatternGEM (const int ptn, const int highPt)
 
unsigned int findQualityGEM (const CSCALCTDigi &aLCT, const GEMPadDigi &gem)
 
unsigned int findQualityGEM (const CSCCLCTDigi &cLCT, const GEMPadDigi &gem)
 
unsigned int findQualityGEM (const CSCALCTDigi &aLCT, const CSCCLCTDigi &cLCT, bool hasPad, bool hasCoPad)
 
bool isPadInOverlap (int roll)
 
void matchGEMPads (enum ME11Part=ME1B)
 
GEMPadsBX matchingGEMPads (const CSCCLCTDigi &cLCT, const GEMPadsBX &pads=GEMPadsBX(), enum ME11Part=ME1B, bool isCopad=false, bool first=true)
 
GEMPadsBX matchingGEMPads (const CSCALCTDigi &aLCT, const GEMPadsBX &pads=GEMPadsBX(), enum ME11Part=ME1B, bool isCopad=false, bool first=true)
 
GEMPadsBX matchingGEMPads (const CSCCLCTDigi &cLCT, const CSCALCTDigi &aLCT, const GEMPadsBX &pads=GEMPadsBX(), enum ME11Part=ME1B, bool isCopad=false, bool first=true)
 
void printGEMTriggerPads (int minBX, int maxBx, bool iscopad=false)
 
void retrieveGEMCoPads (const GEMCoPadDigiCollection *pads, unsigned id)
 
void retrieveGEMPads (const GEMPadDigiCollection *pads, unsigned id)
 

Private Attributes

std::vector< CSCALCTDigialctV
 
CSCCorrelatedLCTDigi allLCTs1a [MAX_LCT_BINS][15][2]
 
CSCCorrelatedLCTDigi allLCTs1b [MAX_LCT_BINS][15][2]
 
bool buildLCTfromALCTandGEM_ME1a_
 
bool buildLCTfromALCTandGEM_ME1b_
 
bool buildLCTfromCLCTandGEM_ME1a_
 
bool buildLCTfromCLCTandGEM_ME1b_
 
bool clct_to_alct
 
std::vector< CSCCLCTDigiclctV1a
 
std::vector< CSCCLCTDigiclctV1b
 
GEMPads coPads_
 
bool correctLCTtimingWithGEM_
 
const CSCGeometrycsc_g
 
std::map< int, std::pair< int,
int > > 
cscHsToGemPadME1a_
 
std::map< int, std::pair< int,
int > > 
cscHsToGemPadME1b_
 
std::map< int, std::pair< int,
int > > 
cscWgToGemRoll_
 
bool debug_gem_dphi
 
bool debug_gem_matching
 
bool debug_luts
 
bool disableME1a
 
bool do_gem_matching
 Do GEM matching? More...
 
bool doLCTGhostBustingWithGEMs_
 
bool drop_used_clcts
 
bool dropLowQualityALCTsNoGEMs_ME1a_
 
bool dropLowQualityALCTsNoGEMs_ME1b_
 
bool dropLowQualityCLCTsNoGEMs_ME1a_
 
bool dropLowQualityCLCTsNoGEMs_ME1b_
 
bool firstTwoLCTsInChamber_
 
bool gangedME1a
 
bool gem_clear_nomatch_lcts
 whether to throw out GEM-fiducial LCTs that have no gem match More...
 
const GEMGeometrygem_g
 
int gem_match_delta_bx
 delta BX for GEM pads matching More...
 
double gem_match_delta_eta
 
double gem_match_delta_phi_even
 
double gem_match_delta_phi_odd
 GEM matching dphi and deta. More...
 
double gem_match_max_eta
 
double gem_match_min_eta
 min eta of LCT for which we require GEM match (we don't throw out LCTs below this min eta) More...
 
std::vector< GEMCoPadDigigemCoPadV
 
std::map< int, int > gemPadToCscHsME1a_
 
std::map< int, int > gemPadToCscHsME1b_
 
std::map< int, std::pair
< double, double > > 
gemRollToEtaLimits_
 
bool match_earliest_alct_me11_only
 
bool match_earliest_clct_me11_only
 
unsigned int max_me11_lcts
 
int maxDeltaBXCoPad_
 
int maxDeltaBXCoPadEven_
 
int maxDeltaBXCoPadOdd_
 
int maxDeltaBXInCoPad_
 
int maxDeltaBXPad_
 
int maxDeltaBXPadEven_
 
int maxDeltaBXPadOdd_
 
int maxDeltaPadCoPad_
 
int maxDeltaPadCoPadEven_
 
int maxDeltaPadCoPadOdd_
 
int maxDeltaPadInCoPad_
 
int maxDeltaPadPad_
 
int maxDeltaPadPadEven_
 
int maxDeltaPadPadOdd_
 
GEMPads pads_
 
int pref [MAX_LCT_BINS]
 
bool promoteALCTGEMpattern_
 
bool promoteALCTGEMquality_
 
bool promoteCLCTGEMquality_ME1a_
 
bool promoteCLCTGEMquality_ME1b_
 
bool runME11ILT_
 GEM-CSC integrated local algorithm. More...
 
bool smartME1aME1b
 
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_etaMin_etaMax_even [48][3]
 
static const double lut_wg_etaMin_etaMax_odd [48][3]
 
static const int lut_wg_vs_hs_me1a [48][2]
 
static const int lut_wg_vs_hs_me1ag [48][2]
 
static const int lut_wg_vs_hs_me1b [48][2]
 

Additional Inherited Members

- 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 ME11 TMB upgrade

Author
Sven Dildick March 2014

Based on CSCMotherboard code

Definition at line 23 of file CSCMotherboardME11GEM.h.

Member Typedef Documentation

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

Definition at line 25 of file CSCMotherboardME11GEM.h.

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

Definition at line 27 of file CSCMotherboardME11GEM.h.

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

Definition at line 26 of file CSCMotherboardME11GEM.h.

Member Enumeration Documentation

labels for ME1a and ME1B

Enumerator
ME1B 
ME1A 

Definition at line 52 of file CSCMotherboardME11GEM.h.

Constructor & Destructor Documentation

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

Normal constructor.

Do GEM matching?

GEM matching dphi and deta

delta BX for GEM pads matching

min eta of LCT for which we require GEM match (we don't throw out LCTs below this min eta)

whether to throw out GEM-fiducial LCTs that have no gem match

Definition at line 181 of file CSCMotherboardME11GEM.cc.

References buildLCTfromALCTandGEM_ME1a_, buildLCTfromALCTandGEM_ME1b_, buildLCTfromCLCTandGEM_ME1a_, buildLCTfromCLCTandGEM_ME1b_, clct1a, clct_to_alct, correctLCTtimingWithGEM_, debug_gem_dphi, debug_gem_matching, debug_luts, disableME1a, do_gem_matching, doLCTGhostBustingWithGEMs_, drop_used_clcts, dropLowQualityALCTsNoGEMs_ME1a_, dropLowQualityALCTsNoGEMs_ME1b_, dropLowQualityCLCTsNoGEMs_ME1a_, dropLowQualityCLCTsNoGEMs_ME1b_, firstTwoLCTsInChamber_, gangedME1a, gem_clear_nomatch_lcts, gem_match_delta_bx, gem_match_delta_eta, gem_match_delta_phi_even, gem_match_delta_phi_odd, gem_match_max_eta, gem_match_min_eta, edm::ParameterSet::getParameter(), CSCMotherboard::isSLHC, visualization-live-secondInstance_cfg::m, match_earliest_alct_me11_only, match_earliest_clct_me11_only, CSCMotherboard::match_trig_window_size, max_me11_lcts, maxDeltaBXCoPadEven_, maxDeltaBXCoPadOdd_, maxDeltaBXInCoPad_, maxDeltaBXPadEven_, maxDeltaBXPadOdd_, maxDeltaPadCoPadEven_, maxDeltaPadCoPadOdd_, maxDeltaPadInCoPad_, maxDeltaPadPadEven_, maxDeltaPadPadOdd_, pref, promoteALCTGEMpattern_, promoteALCTGEMquality_, promoteCLCTGEMquality_ME1a_, promoteCLCTGEMquality_ME1b_, runME11ILT_, smartME1aME1b, tmb_cross_bx_algo, and useOldLCTDataFormat_.

184  :
185  CSCMotherboard(endcap, station, sector, subsector, chamber, conf)
186 {
187  const edm::ParameterSet commonParams(conf.getParameter<edm::ParameterSet>("commonParam"));
188 
189  // special configuration parameters for ME11 treatment
190  smartME1aME1b = commonParams.getParameter<bool>("smartME1aME1b");
191  disableME1a = commonParams.getParameter<bool>("disableME1a");
192  gangedME1a = commonParams.getParameter<bool>("gangedME1a");
193  runME11ILT_ = commonParams.getParameter<bool>("runME11ILT");
194 
195  if (!isSLHC) edm::LogError("L1CSCTPEmulatorConfigError")
196  << "+++ Upgrade CSCMotherboardME11GEM constructed while isSLHC is not set! +++\n";
197  if (!smartME1aME1b) edm::LogError("L1CSCTPEmulatorConfigError")
198  << "+++ Upgrade CSCMotherboardME11GEM constructed while smartME1aME1b is not set! +++\n";
199 
200  const edm::ParameterSet alctParams(conf.getParameter<edm::ParameterSet>("alctSLHC"));
201  const edm::ParameterSet clctParams(conf.getParameter<edm::ParameterSet>("clctSLHC"));
202  const edm::ParameterSet me11tmbParams(conf.getParameter<edm::ParameterSet>("me11tmbSLHCGEM"));
203 
204  clct1a.reset( new CSCCathodeLCTProcessor(endcap, station, sector, subsector, chamber, clctParams, commonParams, me11tmbParams) );
205  clct1a->setRing(4);
206 
207  match_earliest_alct_me11_only = me11tmbParams.getParameter<bool>("matchEarliestAlctME11Only");
208  match_earliest_clct_me11_only = me11tmbParams.getParameter<bool>("matchEarliestClctME11Only");
209 
210  // if true: use regular CLCT-to-ALCT matching in TMB
211  // if false: do ALCT-to-CLCT matching
212  clct_to_alct = me11tmbParams.getParameter<bool>("clctToAlct");
213 
214  // whether to not reuse CLCTs that were used by previous matching ALCTs
215  // in ALCT-to-CLCT algorithm
216  drop_used_clcts = me11tmbParams.getParameter<bool>("tmbDropUsedClcts");
217 
218  tmb_cross_bx_algo = me11tmbParams.getParameter<unsigned int>("tmbCrossBxAlgorithm");
219 
220  // maximum lcts per BX in ME11: 2, 3, 4 or 999
221  max_me11_lcts = me11tmbParams.getParameter<unsigned int>("maxME11LCTs");
222 
224  for (unsigned int m=2; m<match_trig_window_size; m+=2)
225  {
226  pref[m-1] = pref[0] - m/2;
227  pref[m] = pref[0] + m/2;
228  }
229 
230  //----------------------------------------------------------------------------------------//
231 
232  // 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
233 
234  //----------------------------------------------------------------------------------------//
235 
237  do_gem_matching = me11tmbParams.getParameter<bool>("doGemMatching");
238 
240  gem_match_delta_phi_odd = me11tmbParams.getParameter<double>("gemMatchDeltaPhiOdd");
241  gem_match_delta_phi_even = me11tmbParams.getParameter<double>("gemMatchDeltaPhiEven");
242  gem_match_delta_eta = me11tmbParams.getParameter<double>("gemMatchDeltaEta");
243 
245  gem_match_delta_bx = me11tmbParams.getParameter<int>("gemMatchDeltaBX");
246 
248  gem_match_min_eta = me11tmbParams.getParameter<double>("gemMatchMinEta");
249  gem_match_max_eta = me11tmbParams.getParameter<double>("gemMatchMaxEta");
250 
252  gem_clear_nomatch_lcts = me11tmbParams.getParameter<bool>("gemClearNomatchLCTs");
253 
254  // debug gem matching
255  debug_gem_matching = me11tmbParams.getParameter<bool>("debugMatching");
256  debug_luts = me11tmbParams.getParameter<bool>("debugLUTs");
257  debug_gem_dphi = me11tmbParams.getParameter<bool>("debugGEMDphi");
258 
259  // deltas used to construct GEM coincidence pads
260  maxDeltaBXInCoPad_ = me11tmbParams.getParameter<int>("maxDeltaBXInCoPad");
261  maxDeltaPadInCoPad_ = me11tmbParams.getParameter<int>("maxDeltaPadInCoPad");
262 
263  // deltas used to match to GEM pads
264  maxDeltaBXPadEven_ = me11tmbParams.getParameter<int>("maxDeltaBXPadEven");
265  maxDeltaPadPadEven_ = me11tmbParams.getParameter<int>("maxDeltaPadPadEven");
266  maxDeltaBXPadOdd_ = me11tmbParams.getParameter<int>("maxDeltaBXPadOdd");
267  maxDeltaPadPadOdd_ = me11tmbParams.getParameter<int>("maxDeltaPadPadOdd");
268 
269  // deltas used to match to GEM coincidence pads
270  maxDeltaBXCoPadEven_ = me11tmbParams.getParameter<int>("maxDeltaBXCoPadEven");
271  maxDeltaPadCoPadEven_ = me11tmbParams.getParameter<int>("maxDeltaPadCoPadEven");
272  maxDeltaBXCoPadOdd_ = me11tmbParams.getParameter<int>("maxDeltaBXCoPadOdd");
273  maxDeltaPadCoPadOdd_ = me11tmbParams.getParameter<int>("maxDeltaPadCoPadOdd");
274 
275  // drop low quality stubs if they don't have GEMs
276  dropLowQualityCLCTsNoGEMs_ME1a_ = me11tmbParams.getParameter<bool>("dropLowQualityCLCTsNoGEMs_ME1a");
277  dropLowQualityCLCTsNoGEMs_ME1b_ = me11tmbParams.getParameter<bool>("dropLowQualityCLCTsNoGEMs_ME1b");
278  dropLowQualityALCTsNoGEMs_ME1a_ = me11tmbParams.getParameter<bool>("dropLowQualityALCTsNoGEMs_ME1a");
279  dropLowQualityALCTsNoGEMs_ME1b_ = me11tmbParams.getParameter<bool>("dropLowQualityALCTsNoGEMs_ME1b");
280 
281  // build LCT from ALCT and GEM
282  buildLCTfromALCTandGEM_ME1a_ = me11tmbParams.getParameter<bool>("buildLCTfromALCTandGEM_ME1a");
283  buildLCTfromALCTandGEM_ME1b_ = me11tmbParams.getParameter<bool>("buildLCTfromALCTandGEM_ME1b");
284  buildLCTfromCLCTandGEM_ME1a_ = me11tmbParams.getParameter<bool>("buildLCTfromCLCTandGEM_ME1a");
285  buildLCTfromCLCTandGEM_ME1b_ = me11tmbParams.getParameter<bool>("buildLCTfromCLCTandGEM_ME1b");
286 
287  // LCT ghostbusting
288  doLCTGhostBustingWithGEMs_ = me11tmbParams.getParameter<bool>("doLCTGhostBustingWithGEMs");
289 
290  // correct LCT timing with GEMs
291  correctLCTtimingWithGEM_ = me11tmbParams.getParameter<bool>("correctLCTtimingWithGEM");
292 
293  // use "old" or "new" dataformat for integrated LCTs?
294  useOldLCTDataFormat_ = me11tmbParams.getParameter<bool>("useOldLCTDataFormat");
295 
296  // promote ALCT-GEM pattern
297  promoteALCTGEMpattern_ = me11tmbParams.getParameter<bool>("promoteALCTGEMpattern");
298 
299  // promote ALCT-GEM quality
300  promoteALCTGEMquality_ = me11tmbParams.getParameter<bool>("promoteALCTGEMquality");
301  promoteCLCTGEMquality_ME1a_ = me11tmbParams.getParameter<bool>("promoteCLCTGEMquality_ME1a");
302  promoteCLCTGEMquality_ME1b_ = me11tmbParams.getParameter<bool>("promoteCLCTGEMquality_ME1b");
303 
304  // send first 2 LCTs
305  firstTwoLCTsInChamber_ = me11tmbParams.getParameter<bool>("firstTwoLCTsInChamber");
306 }
T getParameter(std::string const &) const
bool do_gem_matching
Do GEM matching?
bool gem_clear_nomatch_lcts
whether to throw out GEM-fiducial LCTs that have no gem match
double gem_match_delta_phi_odd
GEM matching dphi and deta.
unsigned int match_trig_window_size
bool runME11ILT_
GEM-CSC integrated local algorithm.
int gem_match_delta_bx
delta BX for GEM pads matching
double gem_match_min_eta
min eta of LCT for which we require GEM match (we don&#39;t throw out LCTs below this min eta) ...
std::unique_ptr< CSCCathodeLCTProcessor > clct1a
CSCMotherboardME11GEM::CSCMotherboardME11GEM ( )

Constructor for use during testing.

Definition at line 309 of file CSCMotherboardME11GEM.cc.

References clct1a, visualization-live-secondInstance_cfg::m, CSCMotherboard::match_trig_window_size, and pref.

309  : CSCMotherboard()
310 {
311  // Constructor used only for testing.
312 
313  clct1a.reset( new CSCCathodeLCTProcessor() );
314  clct1a->setRing(4);
315 
317  for (unsigned int m=2; m<match_trig_window_size; m+=2)
318  {
319  pref[m-1] = pref[0] - m/2;
320  pref[m] = pref[0] + m/2;
321  }
322 }
unsigned int match_trig_window_size
std::unique_ptr< CSCCathodeLCTProcessor > clct1a
CSCMotherboardME11GEM::~CSCMotherboardME11GEM ( )

Default destructor.

Definition at line 325 of file CSCMotherboardME11GEM.cc.

326 {
327 }

Member Function Documentation

int CSCMotherboardME11GEM::assignGEMRoll ( double  eta)
private

Definition at line 1809 of file CSCMotherboardME11GEM.cc.

References gemRollToEtaLimits_, maxEta, benchmark_cfg::minEta, AlCaHLTBitMon_ParallelJobs::p, and query::result.

Referenced by run().

1810 {
1811  int result = -99;
1812  for(auto p : gemRollToEtaLimits_) {
1813  const float minEta((p.second).first);
1814  const float maxEta((p.second).second);
1815  if (minEta <= eta and eta <= maxEta) {
1816  result = p.first;
1817  break;
1818  }
1819  }
1820  return result;
1821 }
double maxEta
tuple result
Definition: query.py:137
std::map< int, std::pair< double, double > > gemRollToEtaLimits_
void CSCMotherboardME11GEM::buildCoincidencePads ( const GEMPadDigiCollection out_pads,
GEMCoPadDigiCollection out_co_pads,
CSCDetId  csc_id 
)
private

Definition at line 1748 of file CSCMotherboardME11GEM.cc.

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

Referenced by run().

1751 {
1752  gemCoPadV.clear();
1753 
1754  // Build coincidences
1755  for (auto det_range = out_pads->begin(); det_range != out_pads->end(); ++det_range) {
1756  const GEMDetId& id = (*det_range).first;
1757  // same chamber
1758  if (id.region() != csc_id.zendcap() or id.station() != csc_id.station() or
1759  id.ring() != csc_id.ring() or id.chamber() != csc_id.chamber()) continue;
1760 
1761  // all coincidences detIDs will have layer=1
1762  if (id.layer() != 1) continue;
1763 
1764  // find the corresponding id with layer=2
1765  GEMDetId co_id(id.region(), id.ring(), id.station(), 2, id.chamber(), id.roll());
1766 
1767  auto co_pads_range = out_pads->get(co_id);
1768  // empty range = no possible coincidence pads
1769  if (co_pads_range.first == co_pads_range.second) continue;
1770 
1771  // now let's correlate the pads in two layers of this partition
1772  const auto& pads_range = (*det_range).second;
1773  for (auto p = pads_range.first; p != pads_range.second; ++p) {
1774  for (auto co_p = co_pads_range.first; co_p != co_pads_range.second; ++co_p) {
1775  // check the match in pad
1776  if (std::abs(p->pad() - co_p->pad()) > maxDeltaPadInCoPad_) continue;
1777  // check the match in BX
1778  if (std::abs(p->bx() - co_p->bx()) > maxDeltaBXInCoPad_ ) continue;
1779 
1780  // make a new coincidence pad digi
1781  gemCoPadV.push_back(GEMCoPadDigi(id.roll(),*p,*co_p));
1782  out_co_pads.insertDigi(id, GEMCoPadDigi(id.roll(),*p,*co_p));
1783  }
1784  }
1785  }
1786 }
int chamber() const
Definition: CSCDetId.h:81
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::EventIDconst &, edm::Timestampconst & > 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:88
short int zendcap() const
Definition: CSCDetId.h:113
std::vector< GEMCoPadDigi > gemCoPadV
int station() const
Definition: CSCDetId.h:99
void CSCMotherboardME11GEM::clear ( void  )

Clears correlated LCT and passes clear signal on to cathode and anode LCT processors.

Definition at line 330 of file CSCMotherboardME11GEM.cc.

References allLCTs1a, allLCTs1b, clct1a, CSCCorrelatedLCTDigi::clear(), CSCMotherboard::clear(), coPads_, cscHsToGemPadME1a_, cscHsToGemPadME1b_, cscWgToGemRoll_, gemPadToCscHsME1a_, gemPadToCscHsME1b_, gemRollToEtaLimits_, i, CSCMotherboard::match_trig_window_size, CSCMotherboard::MAX_LCT_BINS, and pads_.

Referenced by run().

331 {
333  if (clct1a) clct1a->clear();
334  for (int bx = 0; bx < MAX_LCT_BINS; bx++)
335  {
336  //firstLCT1a[bx].clear();
337  //secondLCT1a[bx].clear();
338  for (unsigned int mbx = 0; mbx < match_trig_window_size; mbx++)
339  for (int i=0;i<2;i++)
340  {
341  allLCTs1b[bx][mbx][i].clear();
342  allLCTs1a[bx][mbx][i].clear();
343  }
344  }
345  gemRollToEtaLimits_.clear();
346  cscWgToGemRoll_.clear();
347 
348  gemPadToCscHsME1a_.clear();
349  gemPadToCscHsME1b_.clear();
350 
351  cscHsToGemPadME1a_.clear();
352  cscHsToGemPadME1b_.clear();
353 
354  pads_.clear();
355  coPads_.clear();
356 }
std::map< int, std::pair< int, int > > cscHsToGemPadME1a_
int i
Definition: DBlmapReader.cc:9
unsigned int match_trig_window_size
std::map< int, std::pair< int, int > > cscHsToGemPadME1b_
CSCCorrelatedLCTDigi allLCTs1a[MAX_LCT_BINS][15][2]
std::map< int, std::pair< double, double > > gemRollToEtaLimits_
std::map< int, int > gemPadToCscHsME1a_
std::map< int, std::pair< int, int > > cscWgToGemRoll_
CSCCorrelatedLCTDigi allLCTs1b[MAX_LCT_BINS][15][2]
std::map< int, int > gemPadToCscHsME1b_
std::unique_ptr< CSCCathodeLCTProcessor > clct1a
CSCCorrelatedLCTDigi CSCMotherboardME11GEM::constructLCTsGEM ( const CSCALCTDigi alct,
const GEMPadDigi gem,
int  me,
bool  oldDataFormat = false 
)
private

Definition at line 1824 of file CSCMotherboardME11GEM.cc.

References GEMPadDigi::bx(), gemPadToCscHsME1a_, gemPadToCscHsME1b_, CSCALCTDigi::getBX(), CSCALCTDigi::getKeyWG(), CSCMotherboard::lct_central_bx, lut_wg_vs_hs_me1a, lut_wg_vs_hs_me1b, ME1A, GEMPadDigi::pad(), chain::pattern, promoteALCTGEMpattern_, promoteALCTGEMquality_, HLT_25ns14e33_v1_cff::quality, and CSCMotherboard::theTrigChamber.

Referenced by correlateLCTsGEM().

1827 {
1828  auto mymap(ME==ME1A ? gemPadToCscHsME1a_ : gemPadToCscHsME1b_);
1829  auto wgvshs(ME==ME1A ? lut_wg_vs_hs_me1a : lut_wg_vs_hs_me1b);
1830  if (oldDataFormat){
1831  // CLCT pattern number - set it to a highest value
1832  // hack to get LCTs in the CSCTF
1833  unsigned int pattern = promoteALCTGEMpattern_ ? 10 : 0;
1834 
1835  // LCT quality number - set it to a very high value
1836  // hack to get LCTs in the CSCTF
1837  unsigned int quality = promoteALCTGEMquality_ ? 14 : 11;
1838 
1839  // Bunch crossing
1840  int bx = alct.getBX();
1841 
1842  // get keyStrip from LUT
1843  int keyStrip = mymap[gem.pad()];
1844 
1845  // get wiregroup from ALCT
1846  int wg = alct.getKeyWG();
1847 
1848  if (keyStrip>wgvshs[wg][0] && keyStrip<wgvshs[wg][1])
1849  { // construct correlated LCT; temporarily assign track number of 0.
1850  return CSCCorrelatedLCTDigi(0, 1, quality, wg, keyStrip, pattern, 0, bx, 0, 0, 0, theTrigChamber);
1851  }
1852  else return CSCCorrelatedLCTDigi(0,0,0,0,0,0,0,0,0,0,0,0);
1853  }
1854  else {
1855 
1856  // CLCT pattern number - no pattern
1857  unsigned int pattern = 0;
1858 
1859  // LCT quality number
1860  unsigned int quality = 1;
1861 
1862  // Bunch crossing
1863  int bx = gem.bx() + lct_central_bx;
1864 
1865  // get keyStrip from LUT
1866  int keyStrip = mymap[gem.pad()];
1867 
1868  // get wiregroup from ALCT
1869  int wg = alct.getKeyWG();
1870 
1871  if (keyStrip>wgvshs[wg][0] && keyStrip<wgvshs[wg][1])
1872  { // construct correlated LCT; temporarily assign track number of 0.
1873  return CSCCorrelatedLCTDigi(0, 1, quality, wg, keyStrip, pattern, 0, bx, 0, 0, 0, theTrigChamber);
1874  }
1875  else return CSCCorrelatedLCTDigi(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
1876  }
1877 }
const unsigned theTrigChamber
list pattern
Definition: chain.py:104
static const int lut_wg_vs_hs_me1b[48][2]
Definition: ME.h:11
int pad() const
Definition: GEMPadDigi.h:25
int getBX() const
return BX - five low bits of BXN counter tagged by the ALCT
Definition: CSCALCTDigi.h:48
static const int lut_wg_vs_hs_me1a[48][2]
int bx() const
Definition: GEMPadDigi.h:26
std::map< int, int > gemPadToCscHsME1a_
std::map< int, int > gemPadToCscHsME1b_
int getKeyWG() const
return key wire group
Definition: CSCALCTDigi.h:45
CSCCorrelatedLCTDigi CSCMotherboardME11GEM::constructLCTsGEM ( const CSCCLCTDigi clct,
const GEMPadDigi gem,
int  roll,
int  me,
bool  oldDataFormat = true 
)
private

Definition at line 1879 of file CSCMotherboardME11GEM.cc.

References GEMPadDigi::bx(), encodePatternGEM(), CSCCLCTDigi::getBend(), CSCCLCTDigi::getKeyStrip(), CSCCLCTDigi::getPattern(), CSCCLCTDigi::getStripType(), CSCMotherboard::lct_central_bx, ME1A, chain::pattern, promoteCLCTGEMquality_ME1a_, promoteCLCTGEMquality_ME1b_, HLT_25ns14e33_v1_cff::quality, and CSCMotherboard::theTrigChamber.

1882 {
1883 // auto mymap(ME==ME1A ? gemPadToCscHsME1a_ : gemPadToCscHsME1b_);
1884  if (oldDataFormat){
1885  // CLCT pattern number - no pattern
1886  unsigned int pattern = encodePatternGEM(clct.getPattern(), clct.getStripType());
1887 
1888  // LCT quality number - dummy quality
1889  const bool promoteCLCTGEMquality(ME == ME1A ? promoteCLCTGEMquality_ME1a_:promoteCLCTGEMquality_ME1b_);
1890  unsigned int quality = promoteCLCTGEMquality ? 14 : 11;
1891 
1892  // Bunch crossing: get it from cathode LCT if anode LCT is not there.
1893  int bx = gem.bx() + lct_central_bx;;
1894 
1895  // pick a random WG in the roll range
1896  int wg(5);
1897 
1898  // construct correlated LCT; temporarily assign track number of 0.
1899  return CSCCorrelatedLCTDigi(0, 1, quality, wg, clct.getKeyStrip(), pattern, clct.getBend(), bx, 0, 0, 0, theTrigChamber);
1900  }
1901  else {
1902  // CLCT pattern number - no pattern
1903  unsigned int pattern = encodePatternGEM(clct.getPattern(), clct.getStripType());
1904 
1905  // LCT quality number - dummy quality
1906  unsigned int quality = 5;//findQualityGEM(alct, gem);
1907 
1908  // Bunch crossing: get it from cathode LCT if anode LCT is not there.
1909  int bx = gem.bx() + lct_central_bx;;
1910 
1911  // ALCT WG
1912  int wg();
1913 
1914  // construct correlated LCT; temporarily assign track number of 0.
1915  return CSCCorrelatedLCTDigi(0, 1, quality, 0, 0, pattern, 0, bx, 0, 0, 0, theTrigChamber);
1916  }
1917 }
const unsigned theTrigChamber
unsigned int encodePatternGEM(const int ptn, const int highPt)
list pattern
Definition: chain.py:104
int getStripType() const
return striptype
Definition: CSCCLCTDigi.h:39
int getBend() const
return bend
Definition: CSCCLCTDigi.h:42
Definition: ME.h:11
int bx() const
Definition: GEMPadDigi.h:26
int getPattern() const
return pattern
Definition: CSCCLCTDigi.h:36
int getKeyStrip() const
Definition: CSCCLCTDigi.h:65
CSCCorrelatedLCTDigi CSCMotherboardME11GEM::constructLCTsGEM ( const CSCALCTDigi alct,
const CSCCLCTDigi clct,
bool  hasPad,
bool  hasCoPad 
)
private

Definition at line 1920 of file CSCMotherboardME11GEM.cc.

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

1922 {
1923  // CLCT pattern number
1924  unsigned int pattern = encodePattern(cLCT.getPattern(), cLCT.getStripType());
1925 
1926  // LCT quality number
1927  unsigned int quality = findQualityGEM(aLCT, cLCT, hasPad, hasCoPad);
1928 
1929  // Bunch crossing: get it from cathode LCT if anode LCT is not there.
1930  int bx = aLCT.isValid() ? aLCT.getBX() : cLCT.getBX();
1931 
1932  // construct correlated LCT; temporarily assign track number of 0.
1933  int trknmb = 0;
1934  CSCCorrelatedLCTDigi thisLCT(trknmb, 1, quality, aLCT.getKeyWG(),
1935  cLCT.getKeyStrip(), pattern, cLCT.getBend(),
1936  bx, 0, 0, 0, theTrigChamber);
1937  return thisLCT;
1938 }
const unsigned theTrigChamber
list pattern
Definition: chain.py:104
unsigned int encodePattern(const int ptn, const int highPt)
unsigned int findQualityGEM(const CSCALCTDigi &aLCT, const GEMPadDigi &gem)
void CSCMotherboardME11GEM::correlateLCTs ( CSCALCTDigi  bestALCT,
CSCALCTDigi  secondALCT,
CSCCLCTDigi  bestCLCT,
CSCCLCTDigi  secondCLCT,
CSCCorrelatedLCTDigi lct1,
CSCCorrelatedLCTDigi lct2 
)
private

Definition at line 1288 of file CSCMotherboardME11GEM.cc.

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

1294 {
1295  bool anodeBestValid = bestALCT.isValid();
1296  bool anodeSecondValid = secondALCT.isValid();
1297  bool cathodeBestValid = bestCLCT.isValid();
1298  bool cathodeSecondValid = secondCLCT.isValid();
1299 
1300  if (anodeBestValid and !anodeSecondValid) secondALCT = bestALCT;
1301  if (!anodeBestValid and anodeSecondValid) bestALCT = secondALCT;
1302  if (cathodeBestValid and !cathodeSecondValid) secondCLCT = bestCLCT;
1303  if (!cathodeBestValid and cathodeSecondValid) bestCLCT = secondCLCT;
1304 
1305  // ALCT-CLCT matching conditions are defined by "trig_enable" configuration
1306  // parameters.
1307  if ((alct_trig_enable and bestALCT.isValid()) or
1308  (clct_trig_enable and bestCLCT.isValid()) or
1309  (match_trig_enable and bestALCT.isValid() and bestCLCT.isValid()))
1310  {
1311  lct1 = constructLCTs(bestALCT, bestCLCT);
1312  lct1.setTrknmb(1);
1313  }
1314 
1315  if (((secondALCT != bestALCT) or (secondCLCT != bestCLCT)) and
1316  ((alct_trig_enable and secondALCT.isValid()) or
1317  (clct_trig_enable and secondCLCT.isValid()) or
1318  (match_trig_enable and secondALCT.isValid() and secondCLCT.isValid())))
1319  {
1320  lct2 = constructLCTs(secondALCT, secondCLCT);
1321  lct2.setTrknmb(2);
1322  }
1323 }
CSCCorrelatedLCTDigi constructLCTs(const CSCALCTDigi &aLCT, const CSCCLCTDigi &cLCT)
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
bool isValid() const
check ALCT validity (1 - valid ALCT)
Definition: CSCALCTDigi.h:30
bool isValid() const
check CLCT validity (1 - valid CLCT)
Definition: CSCCLCTDigi.h:30
unsigned int match_trig_enable
unsigned int alct_trig_enable
void setTrknmb(const uint16_t number)
Set track number (1,2) after sorting LCTs.
void CSCMotherboardME11GEM::correlateLCTsGEM ( CSCALCTDigi  bestALCT,
CSCALCTDigi  secondALCT,
CSCCLCTDigi  bestCLCT,
CSCCLCTDigi  secondCLCT,
CSCCorrelatedLCTDigi lct1,
CSCCorrelatedLCTDigi lct2,
int  me,
const GEMPadsBX pads = GEMPadsBX(),
const GEMPadsBX copads = GEMPadsBX() 
)
private

Definition at line 1383 of file CSCMotherboardME11GEM.cc.

References EnergyCorrector::c, CSCTriggerNumbering::chamberFromTriggerLabels(), CSCALCTDigi::clear(), CSCCLCTDigi::clear(), constructLCTsGEM(), gather_cfg::cout, debug_gem_matching, deltaPad(), deltaRoll(), doesALCTCrossCLCT(), doLCTGhostBustingWithGEMs_, plotBeamSpotDB::first, CSCCLCTDigi::getKeyStrip(), CSCALCTDigi::getKeyWG(), i, LogTrace, lumiPlot::lut, ME1B, AlCaHLTBitMon_ParallelJobs::p, relativeConstraints::ring, GEMDetId::roll(), CSCCorrelatedLCTDigi::setTrknmb(), CSCMotherboard::theEndcap, CSCMotherboard::theSector, CSCMotherboard::theStation, CSCMotherboard::theSubsector, and CSCMotherboard::theTrigChamber.

Referenced by run().

1392 {
1393  // assume that always anodeBestValid and cathodeBestValid
1394 
1395  if (secondALCT == bestALCT) secondALCT.clear();
1396  if (secondCLCT == bestCLCT) secondCLCT.clear();
1397 
1398  int ok11 = doesALCTCrossCLCT( bestALCT, bestCLCT, me);
1399  int ok12 = doesALCTCrossCLCT( bestALCT, secondCLCT, me);
1400  int ok21 = doesALCTCrossCLCT( secondALCT, bestCLCT, me);
1401  int ok22 = doesALCTCrossCLCT( secondALCT, secondCLCT, me);
1402  int code = (ok11<<3) | (ok12<<2) | (ok21<<1) | (ok22);
1403 
1404  int dbg=0;
1405  int ring = me;
1407  CSCDetId did(theEndcap, theStation, ring, chamb, 0);
1408  if (dbg) LogTrace("CSCMotherboardME11GEM")<<"debug correlateLCTs in "<<did<<std::endl
1409  <<"ALCT1: "<<bestALCT<<std::endl
1410  <<"ALCT2: "<<secondALCT<<std::endl
1411  <<"CLCT1: "<<bestCLCT<<std::endl
1412  <<"CLCT2: "<<secondCLCT<<std::endl
1413  <<"ok 11 12 21 22 code = "<<ok11<<" "<<ok12<<" "<<ok21<<" "<<ok22<<" "<<code<<std::endl;
1414 
1415  if ( code==0 ) return;
1416 
1417  // LUT defines correspondence between possible ok## combinations
1418  // and resulting lct1 and lct2
1419  int lut[16][2] = {
1420  //ok: 11 12 21 22
1421  {0 ,0 }, // 0 0 0 0
1422  {22,0 }, // 0 0 0 1
1423  {21,0 }, // 0 0 1 0
1424  {21,22}, // 0 0 1 1
1425  {12,0 }, // 0 1 0 0
1426  {12,22}, // 0 1 0 1
1427  {12,21}, // 0 1 1 0
1428  {12,21}, // 0 1 1 1
1429  {11,0 }, // 1 0 0 0
1430  {11,22}, // 1 0 0 1
1431  {11,21}, // 1 0 1 0
1432  {11,22}, // 1 0 1 1
1433  {11,12}, // 1 1 0 0
1434  {11,22}, // 1 1 0 1
1435  {11,12}, // 1 1 1 0
1436  {11,22}, // 1 1 1 1
1437  };
1438 
1439  if (dbg) LogTrace("CSCMotherboardME11GEM")<<"lut 0 1 = "<<lut[code][0]<<" "<<lut[code][1]<<std::endl;
1440 
1441  // first check the special case (11,22) where we have an ambiguity
1442  const int nPads(pads.size());
1443  const int nCoPads(copads.size());
1444  const bool hasPads(nPads!=0);
1445  const bool hasCoPads(nCoPads!=0);
1446 
1447  if (doLCTGhostBustingWithGEMs_ and (lut[code][0] == 11) and (lut[code][0] == 22) and hasPads and (me==ME1B)){
1448 
1449  if (debug_gem_matching) std::cout << "++Info: 2 valid ALCTs-CLCTs pairs with trigger pads. Call the GHOSTBUSTERS!!!" << std::endl;
1450  // first check if there are any copads
1451  typedef std::pair<int,int> mypair;
1452  // for each trigger pad, store (deltaRoll,deltaHS) for 11,22,12 and 21.
1453  std::vector<std::tuple<mypair,mypair,mypair,mypair>> deltas;
1454  deltas.clear();
1455 
1456  if (hasCoPads){
1457  for (auto p : copads) {
1458  const GEMDetId detId(p.first);
1459  const int rollN(detId.roll());
1460  const int padN((p.second)->pad());
1461 
1462  auto t11(std::make_pair(deltaRoll( bestALCT.getKeyWG(), rollN), deltaPad( bestCLCT.getKeyStrip(), padN)));
1463  auto t22(std::make_pair(deltaRoll(secondALCT.getKeyWG(), rollN), deltaPad(secondCLCT.getKeyStrip(), padN)));
1464  auto t12(std::make_pair(deltaRoll( bestALCT.getKeyWG(), rollN), deltaPad(secondCLCT.getKeyStrip(), padN)));
1465  auto t21(std::make_pair(deltaRoll(secondALCT.getKeyWG(), rollN), deltaPad( bestCLCT.getKeyStrip(), padN)));
1466 
1467  deltas.push_back(std::make_tuple(t11,t22,t12,t21));
1468  }
1469  if (debug_gem_matching){
1470  std::cout << "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " << std::endl;
1471  std::cout << "Printing (deltaRoll, deltaPad) for each (ALCT,CLCT) pair and for each trigger copad" << std::endl;
1472  for (unsigned i =0; i < deltas.size(); ++i){
1473  auto c(deltas.at(i));
1474  std::cout << "\tCoPad " << i << std::endl;
1475  std::cout << "\t11: " << "(" << std::get<0>(c).first << "," << std::get<0>(c).second << "); "
1476  << "22: " << "(" << std::get<1>(c).first << "," << std::get<1>(c).second << "); "
1477  << "12: " << "(" << std::get<2>(c).first << "," << std::get<2>(c).second << "); "
1478  << "21: " << "(" << std::get<3>(c).first << "," << std::get<3>(c).second << ")" << std::endl << std::endl;
1479  }
1480  std::cout << "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " << std::endl;
1481  }
1482 
1483 
1484 // lct1 = constructLCTs(bestALCT, bestCLCT);
1485 // lct1.setTrknmb(1);
1486 // lct2 = constructLCTs(secondALCT, secondCLCT);
1487 // lct2.setTrknmb(2);
1488 
1489 // lct1 = constructLCTs(bestALCT, secondCLCT);
1490 // lct1.setTrknmb(1);
1491 // lct2 = constructLCTs(secondLCT, bestCLCT);
1492 // lct2.setTrknmb(2);
1493  return;
1494  }
1495 
1496  // if no copads were found, do the same with pads...
1497  if (hasPads){
1498  for (auto p : pads) {
1499  const GEMDetId detId(p.first);
1500  const int rollN(detId.roll());
1501  const int padN((p.second)->pad());
1502 
1503  auto t11(std::make_pair(deltaRoll( bestALCT.getKeyWG(), rollN), deltaPad( bestCLCT.getKeyStrip(), padN)));
1504  auto t22(std::make_pair(deltaRoll(secondALCT.getKeyWG(), rollN), deltaPad(secondCLCT.getKeyStrip(), padN)));
1505  auto t12(std::make_pair(deltaRoll( bestALCT.getKeyWG(), rollN), deltaPad(secondCLCT.getKeyStrip(), padN)));
1506  auto t21(std::make_pair(deltaRoll(secondALCT.getKeyWG(), rollN), deltaPad( bestCLCT.getKeyStrip(), padN)));
1507 
1508  deltas.push_back(std::make_tuple(t11,t22,t12,t21));
1509  }
1510  if (debug_gem_matching){
1511  std::cout << "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " << std::endl;
1512  std::cout << "Printing (deltaRoll, deltaPad) for each (ALCT,CLCT) pair and for each trigger pad" << std::endl;
1513  for (unsigned i =0; i < deltas.size(); ++i){
1514  auto c(deltas.at(i));
1515  std::cout << "\tPad " << i << std::endl;
1516  std::cout << "\t11: " << "(" << std::get<0>(c).first << "," << std::get<0>(c).second << "); "
1517  << "22: " << "(" << std::get<1>(c).first << "," << std::get<1>(c).second << "); "
1518  << "12: " << "(" << std::get<2>(c).first << "," << std::get<2>(c).second << "); "
1519  << "21: " << "(" << std::get<3>(c).first << "," << std::get<3>(c).second << ")" << std::endl << std::endl;
1520  }
1521  std::cout << "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " << std::endl;
1522  }
1523 
1524  return;
1525  }
1526  }
1527 
1528  switch (lut[code][0]) {
1529  case 11:
1530  lct1 = constructLCTsGEM(bestALCT, bestCLCT, hasPads, hasCoPads);
1531  break;
1532  case 12:
1533  lct1 = constructLCTsGEM(bestALCT, secondCLCT, hasPads, hasCoPads);
1534  break;
1535  case 21:
1536  lct1 = constructLCTsGEM(secondALCT, bestCLCT, hasPads, hasCoPads);
1537  break;
1538  case 22:
1539  lct1 = constructLCTsGEM(secondALCT, secondCLCT, hasPads, hasCoPads);
1540  break;
1541  default:
1542  return;
1543  }
1544  lct1.setTrknmb(1);
1545 
1546  if (dbg) LogTrace("CSCMotherboardME11GEM")<<"lct1: "<<lct1<<std::endl;
1547 
1548  switch (lut[code][1])
1549  {
1550  case 12:
1551  lct2 = constructLCTsGEM(bestALCT, secondCLCT, hasPads, hasCoPads);
1552  lct2.setTrknmb(2);
1553  if (dbg) LogTrace("CSCMotherboardME11GEM")<<"lct2: "<<lct2<<std::endl;
1554  return;
1555  case 21:
1556  lct2 = constructLCTsGEM(secondALCT, bestCLCT, hasPads, hasCoPads);
1557  lct2.setTrknmb(2);
1558  if (dbg) LogTrace("CSCMotherboardME11GEM")<<"lct2: "<<lct2<<std::endl;
1559  return;
1560  case 22:
1561  lct2 = constructLCTsGEM(secondALCT, secondCLCT, hasPads, hasCoPads);
1562  lct2.setTrknmb(2);
1563  if (dbg) LogTrace("CSCMotherboardME11GEM")<<"lct2: "<<lct2<<std::endl;
1564  return;
1565  default:
1566  return;
1567  }
1568  if (dbg) LogTrace("CSCMotherboardME11GEM")<<"out of correlateLCTs"<<std::endl;
1569 
1570  return;
1571 }
const unsigned theSector
int i
Definition: DBlmapReader.cc:9
const unsigned theTrigChamber
const unsigned theEndcap
void clear()
clear this ALCT
Definition: CSCALCTDigi.cc:35
int deltaPad(int hs, int pad)
const unsigned theStation
const unsigned theSubsector
CSCCorrelatedLCTDigi constructLCTsGEM(const CSCALCTDigi &alct, const GEMPadDigi &gem, int me, bool oldDataFormat=false)
tuple lut
Definition: lumiPlot.py:244
int deltaRoll(int wg, int roll)
#define LogTrace(id)
bool doesALCTCrossCLCT(CSCALCTDigi &a, CSCCLCTDigi &c, int me)
void clear()
clear this CLCT
Definition: CSCCLCTDigi.cc:58
tuple cout
Definition: gather_cfg.py:121
int getKeyStrip() const
Definition: CSCCLCTDigi.h:65
void setTrknmb(const uint16_t number)
Set track number (1,2) after sorting LCTs.
int getKeyWG() const
return key wire group
Definition: CSCALCTDigi.h:45
static int chamberFromTriggerLabels(int TriggerSector, int TriggerSubSector, int station, int TriggerCSCID)
void CSCMotherboardME11GEM::correlateLCTsGEM ( CSCALCTDigi  bestALCT,
CSCALCTDigi  secondALCT,
GEMPadDigi  gemPad,
CSCCorrelatedLCTDigi lct1,
CSCCorrelatedLCTDigi lct2,
int  me 
)
private

Definition at line 1326 of file CSCMotherboardME11GEM.cc.

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

1331 {
1332  bool anodeBestValid = bestALCT.isValid();
1333  bool anodeSecondValid = secondALCT.isValid();
1334 
1335  if (anodeBestValid and !anodeSecondValid) secondALCT = bestALCT;
1336  if (!anodeBestValid and anodeSecondValid) bestALCT = secondALCT;
1337 
1338  if ((alct_trig_enable and bestALCT.isValid()) or
1339  (match_trig_enable and bestALCT.isValid()))
1340  {
1341  lct1 = constructLCTsGEM(bestALCT, gemPad, ME, useOldLCTDataFormat_);
1342  lct1.setTrknmb(1);
1343  // lct1.setGEMDPhi(0.0);
1344  }
1345 
1346  if ((alct_trig_enable and secondALCT.isValid()) or
1347  (match_trig_enable and secondALCT.isValid() and secondALCT != bestALCT))
1348  {
1349  lct2 = constructLCTsGEM(secondALCT, gemPad, ME, useOldLCTDataFormat_);
1350  lct2.setTrknmb(2);
1351  // lct2.setGEMDPhi(0.0);
1352  }
1353 }
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
bool isValid() const
check ALCT validity (1 - valid ALCT)
Definition: CSCALCTDigi.h:30
Definition: ME.h:11
unsigned int match_trig_enable
CSCCorrelatedLCTDigi constructLCTsGEM(const CSCALCTDigi &alct, const GEMPadDigi &gem, int me, bool oldDataFormat=false)
unsigned int alct_trig_enable
void setTrknmb(const uint16_t number)
Set track number (1,2) after sorting LCTs.
void CSCMotherboardME11GEM::correlateLCTsGEM ( CSCCLCTDigi  bestCLCT,
CSCCLCTDigi  secondCLCT,
GEMPadDigi  gemPad,
int  roll,
CSCCorrelatedLCTDigi lct1,
CSCCorrelatedLCTDigi lct2,
int  me 
)
private

Definition at line 1356 of file CSCMotherboardME11GEM.cc.

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

1361 {
1362  bool cathodeBestValid = bestCLCT.isValid();
1363  bool cathodeSecondValid = secondCLCT.isValid();
1364 
1365  if (cathodeBestValid and !cathodeSecondValid) secondCLCT = bestCLCT;
1366  if (!cathodeBestValid and cathodeSecondValid) bestCLCT = secondCLCT;
1367 
1368  if ((clct_trig_enable and bestCLCT.isValid()) or
1369  (match_trig_enable and bestCLCT.isValid()))
1370  {
1371  lct1 = constructLCTsGEM(bestCLCT, gemPad, roll, ME, useOldLCTDataFormat_);
1372  lct1.setTrknmb(1);
1373  }
1374 
1375  if ((clct_trig_enable and secondCLCT.isValid()) or
1376  (match_trig_enable and secondCLCT.isValid() and secondCLCT != bestCLCT))
1377  {
1378  lct2 = constructLCTsGEM(secondCLCT, gemPad, roll, ME, useOldLCTDataFormat_);
1379  lct2.setTrknmb(2);
1380  }
1381 }
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
Definition: ME.h:11
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, int me, bool oldDataFormat=false)
void setTrknmb(const uint16_t number)
Set track number (1,2) after sorting LCTs.
void CSCMotherboardME11GEM::createGEMRollEtaLUT ( bool  isEven)
private

Definition at line 1789 of file CSCMotherboardME11GEM.cc.

References GEMGeometry::chamber(), gem_g, gemRollToEtaLimits_, and gen::n.

Referenced by run().

1790 {
1791  int ch(isEven ? 2 : 1);
1792  auto chamber(gem_g->chamber(GEMDetId(1,1,1,1,ch,0)));
1793  if (chamber==nullptr) return;
1794 
1795  int n = 1;
1796  if (isEven) n = 2; // this only works for the 9-10 partition geometry!!! FIXME
1797  for(auto roll : chamber->etaPartitions()) {
1798  const float half_striplength(roll->specs()->specificTopology().stripLength()/2.);
1799  const LocalPoint lp_top(0., half_striplength, 0.);
1800  const LocalPoint lp_bottom(0., -half_striplength, 0.);
1801  const GlobalPoint gp_top(roll->toGlobal(lp_top));
1802  const GlobalPoint gp_bottom(roll->toGlobal(lp_bottom));
1803  gemRollToEtaLimits_[n] = std::make_pair(gp_top.eta(), gp_bottom.eta());
1804  ++n;
1805  }
1806 }
std::map< int, std::pair< double, double > > gemRollToEtaLimits_
const GEMGeometry * gem_g
const GEMChamber * chamber(GEMDetId id) const
Definition: GEMGeometry.cc:99
int CSCMotherboardME11GEM::deltaPad ( int  hs,
int  pad 
)
private

Definition at line 2168 of file CSCMotherboardME11GEM.cc.

References funct::abs(), cscHsToGemPadME1b_, min(), and AlCaHLTBitMon_ParallelJobs::p.

Referenced by correlateLCTsGEM(), and matchingGEMPads().

2169 {
2170  const auto p(cscHsToGemPadME1b_[hs]);
2171  return std::min(std::abs(p.first - pad), std::abs(p.second - pad));
2172 }
std::map< int, std::pair< int, int > > cscHsToGemPadME1b_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
T min(T a, T b)
Definition: MathUtil.h:58
int CSCMotherboardME11GEM::deltaRoll ( int  wg,
int  roll 
)
private

Definition at line 2161 of file CSCMotherboardME11GEM.cc.

References funct::abs(), cscWgToGemRoll_, min(), and AlCaHLTBitMon_ParallelJobs::p.

Referenced by correlateLCTsGEM().

2162 {
2163  const auto p(cscWgToGemRoll_[wg]);
2164  return std::min(std::abs(p.first - pad), std::abs(p.second - pad));
2165 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
T min(T a, T b)
Definition: MathUtil.h:58
std::map< int, std::pair< int, int > > cscWgToGemRoll_
bool CSCMotherboardME11GEM::doesALCTCrossCLCT ( CSCALCTDigi a,
CSCCLCTDigi c,
int  me 
)
private

Definition at line 1256 of file CSCMotherboardME11GEM.cc.

References gangedME1a, CSCCLCTDigi::getKeyStrip(), CSCALCTDigi::getKeyWG(), CSCCLCTDigi::isValid(), CSCALCTDigi::isValid(), lut_wg_vs_hs_me1a, lut_wg_vs_hs_me1ag, lut_wg_vs_hs_me1b, ME1A, ME1B, or, and CSCMotherboard::theEndcap.

Referenced by correlateLCTsGEM().

1257 {
1258  if ( !c.isValid() or !a.isValid() ) return false;
1259  int key_hs = c.getKeyStrip();
1260  int key_wg = a.getKeyWG();
1261  if ( me == ME1A )
1262  {
1263  if ( !gangedME1a )
1264  {
1265  // wrap around ME11 HS number for -z endcap
1266  if (theEndcap==2) key_hs = 95 - key_hs;
1267  if ( key_hs >= lut_wg_vs_hs_me1a[key_wg][0] and
1268  key_hs <= lut_wg_vs_hs_me1a[key_wg][1] ) return true;
1269  return false;
1270  }
1271  else
1272  {
1273  if (theEndcap==2) key_hs = 31 - key_hs;
1274  if ( key_hs >= lut_wg_vs_hs_me1ag[key_wg][0] and
1275  key_hs <= lut_wg_vs_hs_me1ag[key_wg][1] ) return true;
1276  return false;
1277  }
1278  }
1279  if ( me == ME1B)
1280  {
1281  if (theEndcap==2) key_hs = 127 - key_hs;
1282  if ( key_hs >= lut_wg_vs_hs_me1b[key_wg][0] and
1283  key_hs <= lut_wg_vs_hs_me1b[key_wg][1] ) return true;
1284  }
1285  return false;
1286 }
static const int lut_wg_vs_hs_me1ag[48][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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
bool isValid() const
check ALCT validity (1 - valid ALCT)
Definition: CSCALCTDigi.h:30
const unsigned theEndcap
static const int lut_wg_vs_hs_me1b[48][2]
bool isValid() const
check CLCT validity (1 - valid CLCT)
Definition: CSCCLCTDigi.h:30
static const int lut_wg_vs_hs_me1a[48][2]
int getKeyStrip() const
Definition: CSCCLCTDigi.h:65
int getKeyWG() const
return key wire group
Definition: CSCALCTDigi.h:45
unsigned int CSCMotherboardME11GEM::encodePatternGEM ( const int  ptn,
const int  highPt 
)
private

Definition at line 1941 of file CSCMotherboardME11GEM.cc.

Referenced by constructLCTsGEM().

1942 {
1943  return 0;
1944 }
unsigned int CSCMotherboardME11GEM::findQualityGEM ( const CSCALCTDigi aLCT,
const GEMPadDigi gem 
)
private

Referenced by constructLCTsGEM().

unsigned int CSCMotherboardME11GEM::findQualityGEM ( const CSCCLCTDigi cLCT,
const GEMPadDigi gem 
)
private

Definition at line 2074 of file CSCMotherboardME11GEM.cc.

2075 {
2076  return 0;
2077 }
unsigned int CSCMotherboardME11GEM::findQualityGEM ( const CSCALCTDigi aLCT,
const CSCCLCTDigi cLCT,
bool  hasPad,
bool  hasCoPad 
)
private

Definition at line 1947 of file CSCMotherboardME11GEM.cc.

References CSCALCTDigi::getAccelerator(), CSCCLCTDigi::getPattern(), CSCCLCTDigi::getQuality(), CSCALCTDigi::getQuality(), CSCCLCTDigi::getStripType(), CSCMotherboard::infoV, CSCMotherboard::isTMB07, CSCALCTDigi::isValid(), CSCCLCTDigi::isValid(), hltrates_dqm_sourceclient-live_cfg::offset, or, chain::pattern, and HLT_25ns14e33_v1_cff::quality.

1949 {
1950 
1951  /*
1952  Same LCT quality definition as standard LCTs
1953  c4 takes GEMs into account!!!
1954  */
1955 
1956  unsigned int quality = 0;
1957 
1958  if (!isTMB07) {
1959  bool isDistrip = (cLCT.getStripType() == 0);
1960 
1961  if (aLCT.isValid() && !(cLCT.isValid())) { // no CLCT
1962  if (aLCT.getAccelerator()) {quality = 1;}
1963  else {quality = 3;}
1964  }
1965  else if (!(aLCT.isValid()) && cLCT.isValid()) { // no ALCT
1966  if (isDistrip) {quality = 4;}
1967  else {quality = 5;}
1968  }
1969  else if (aLCT.isValid() && cLCT.isValid()) { // both ALCT and CLCT
1970  if (aLCT.getAccelerator()) {quality = 2;} // accelerator muon
1971  else { // collision muon
1972  // CLCT quality is, in fact, the number of layers hit, so subtract 3
1973  // to get quality analogous to ALCT one.
1974  int sumQual = aLCT.getQuality() + (cLCT.getQuality()-3);
1975  if (sumQual < 1 || sumQual > 6) {
1976  if (infoV >= 0) edm::LogWarning("L1CSCTPEmulatorWrongValues")
1977  << "+++ findQuality: sumQual = " << sumQual << "+++ \n";
1978  }
1979  if (isDistrip) { // distrip pattern
1980  if (sumQual == 2) {quality = 6;}
1981  else if (sumQual == 3) {quality = 7;}
1982  else if (sumQual == 4) {quality = 8;}
1983  else if (sumQual == 5) {quality = 9;}
1984  else if (sumQual == 6) {quality = 10;}
1985  }
1986  else { // halfstrip pattern
1987  if (sumQual == 2) {quality = 11;}
1988  else if (sumQual == 3) {quality = 12;}
1989  else if (sumQual == 4) {quality = 13;}
1990  else if (sumQual == 5) {quality = 14;}
1991  else if (sumQual == 6) {quality = 15;}
1992  }
1993  }
1994  }
1995  }
1996 #ifdef OLD
1997  else {
1998  // Temporary definition, used until July 2008.
1999  // First if statement is fictitious, just to help the CSC TF emulator
2000  // handle such cases (one needs to make sure they will be accounted for
2001  // in the new quality definition.
2002  if (!(aLCT.isValid()) || !(cLCT.isValid())) {
2003  if (aLCT.isValid() && !(cLCT.isValid())) quality = 1; // no CLCT
2004  else if (!(aLCT.isValid()) && cLCT.isValid()) quality = 2; // no ALCT
2005  else quality = 0; // both absent; should never happen.
2006  }
2007  else {
2008  // Sum of ALCT and CLCT quality bits. CLCT quality is, in fact, the
2009  // number of layers hit, so subtract 3 to put it to the same footing as
2010  // the ALCT quality.
2011  int sumQual = aLCT.getQuality() + (cLCT.getQuality()-3);
2012  if (sumQual < 1 || sumQual > 6) {
2013  if (infoV >= 0) edm::LogWarning("L1CSCTPEmulatorWrongValues")
2014  << "+++ findQuality: Unexpected sumQual = " << sumQual << "+++\n";
2015  }
2016 
2017  // LCT quality is basically the sum of ALCT and CLCT qualities, but split
2018  // in two groups depending on the CLCT pattern id (higher quality for
2019  // straighter patterns).
2020  int offset = 0;
2021  if (cLCT.getPattern() <= 7) offset = 4;
2022  else offset = 9;
2023  quality = offset + sumQual;
2024  }
2025  }
2026 #endif
2027  else {
2028  // 2008 definition.
2029  if (!(aLCT.isValid()) || !(cLCT.isValid())) {
2030  if (aLCT.isValid() && !(cLCT.isValid())) quality = 1; // no CLCT
2031  else if (!(aLCT.isValid()) && cLCT.isValid()) quality = 2; // no ALCT
2032  else quality = 0; // both absent; should never happen.
2033  }
2034  else {
2035  int pattern = cLCT.getPattern();
2036  if (pattern == 1) quality = 3; // layer-trigger in CLCT
2037  else {
2038  // CLCT quality is the number of layers hit minus 3.
2039  // CLCT quality is the number of layers hit.
2040  // const int n_gem((pad!=NULL and 1) or (copad!=NULL and 2));
2041  int n_gem = 0;
2042  if (hasPad) n_gem = 1;
2043  if (hasCoPad) n_gem = 2;
2044  const bool a4(aLCT.getQuality() >= 1);
2045  const bool c4((cLCT.getQuality() >= 4) or (cLCT.getQuality() >= 3 and n_gem>=1));
2046  // quality = 4; "reserved for low-quality muons in future"
2047  if (!a4 && !c4) quality = 5; // marginal anode and cathode
2048  else if ( a4 && !c4) quality = 6; // HQ anode, but marginal cathode
2049  else if (!a4 && c4) quality = 7; // HQ cathode, but marginal anode
2050  else if ( a4 && c4) {
2051  if (aLCT.getAccelerator()) quality = 8; // HQ muon, but accel ALCT
2052  else {
2053  // quality = 9; "reserved for HQ muons with future patterns
2054  // quality = 10; "reserved for HQ muons with future patterns
2055  if (pattern == 2 || pattern == 3) quality = 11;
2056  else if (pattern == 4 || pattern == 5) quality = 12;
2057  else if (pattern == 6 || pattern == 7) quality = 13;
2058  else if (pattern == 8 || pattern == 9) quality = 14;
2059  else if (pattern == 10) quality = 15;
2060  else {
2061  if (infoV >= 0) edm::LogWarning("L1CSCTPEmulatorWrongValues")
2062  << "+++ findQuality: Unexpected CLCT pattern id = "
2063  << pattern << "+++\n";
2064  }
2065  }
2066  }
2067  }
2068  }
2069  }
2070  return quality;
2071 }
int getQuality() const
return quality of a pattern (number of layers hit!)
Definition: CSCCLCTDigi.h:33
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
bool isValid() const
check ALCT validity (1 - valid ALCT)
Definition: CSCALCTDigi.h:30
list pattern
Definition: chain.py:104
int getStripType() const
return striptype
Definition: CSCCLCTDigi.h:39
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<CSCALCTDigi> CSCMotherboardME11GEM::getALCTs1b ( )
inline

Returns vectors of found ALCTs in ME1a and ME1b, if any.

Definition at line 63 of file CSCMotherboardME11GEM.h.

References alctV.

63 {return alctV;}
std::vector< CSCALCTDigi > alctV
std::vector<CSCCLCTDigi> CSCMotherboardME11GEM::getCLCTs1a ( )
inline

Returns vectors of found CLCTs in ME1a and ME1b, if any.

Definition at line 66 of file CSCMotherboardME11GEM.h.

References clctV1a.

66 {return clctV1a;}
std::vector< CSCCLCTDigi > clctV1a
std::vector<CSCCLCTDigi> CSCMotherboardME11GEM::getCLCTs1b ( )
inline

Definition at line 67 of file CSCMotherboardME11GEM.h.

References clctV1b.

67 {return clctV1b;}
std::vector< CSCCLCTDigi > clctV1b
std::vector< CSCCorrelatedLCTDigi > CSCMotherboardME11GEM::getLCTs1a ( )

Returns vectors of found correlated LCTs in ME1a and ME1b, if any.

Definition at line 1078 of file CSCMotherboardME11GEM.cc.

References allLCTs1a, disableME1a, i, CSCMotherboard::match_trig_window_size, CSCMotherboard::MAX_LCT_BINS, CSCMotherboard::mpc_block_me1a, and or.

Referenced by readoutLCTs().

1079 {
1080  std::vector<CSCCorrelatedLCTDigi> tmpV;
1081 
1082  // disabled ME1a
1083  if (mpc_block_me1a or disableME1a) return tmpV;
1084 
1085  // Report all LCTs found.
1086  for (int bx = 0; bx < MAX_LCT_BINS; bx++)
1087  for (unsigned int mbx = 0; mbx < match_trig_window_size; mbx++)
1088  for (int i=0;i<2;i++)
1089  if (allLCTs1a[bx][mbx][i].isValid()) tmpV.push_back(allLCTs1a[bx][mbx][i]);
1090  return tmpV;
1091 }
int i
Definition: DBlmapReader.cc:9
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
unsigned int match_trig_window_size
unsigned int mpc_block_me1a
CSCCorrelatedLCTDigi allLCTs1a[MAX_LCT_BINS][15][2]
std::vector< CSCCorrelatedLCTDigi > CSCMotherboardME11GEM::getLCTs1b ( )

Definition at line 1065 of file CSCMotherboardME11GEM.cc.

References allLCTs1b, i, CSCMotherboard::match_trig_window_size, and CSCMotherboard::MAX_LCT_BINS.

Referenced by readoutLCTs().

1066 {
1067  std::vector<CSCCorrelatedLCTDigi> tmpV;
1068 
1069  for (int bx = 0; bx < MAX_LCT_BINS; bx++)
1070  for (unsigned int mbx = 0; mbx < match_trig_window_size; mbx++)
1071  for (int i=0;i<2;i++)
1072  if (allLCTs1b[bx][mbx][i].isValid()) tmpV.push_back(allLCTs1b[bx][mbx][i]);
1073  return tmpV;
1074 }
int i
Definition: DBlmapReader.cc:9
unsigned int match_trig_window_size
CSCCorrelatedLCTDigi allLCTs1b[MAX_LCT_BINS][15][2]
bool CSCMotherboardME11GEM::isPadInOverlap ( int  roll)
private

Definition at line 2150 of file CSCMotherboardME11GEM.cc.

References cscWgToGemRoll_, or, and AlCaHLTBitMon_ParallelJobs::p.

Referenced by matchingGEMPads(), and printGEMTriggerPads().

2151 {
2152  for (auto& p : cscWgToGemRoll_) {
2153  // overlap region are WGs 10-15
2154  if ((p.first < 10) or (p.first > 15)) continue;
2155  if (((p.second).first <= roll) and (roll <= (p.second).second)) return true;
2156  }
2157  return false;
2158 }
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
std::map< int, std::pair< int, int > > cscWgToGemRoll_
void CSCMotherboardME11GEM::matchGEMPads ( enum ME11Part  ME = ME1B)
private

Definition at line 1574 of file CSCMotherboardME11GEM.cc.

Referenced by run().

1575 {
1576  /*
1577  using namespace std;
1578 
1579  auto allLCTs(ME==ME1A ? allLCTs1a : allLCTs1b);
1580  // check if we have any LCTs at all
1581  int nlct = 0;
1582  for (int bx = 0; bx < MAX_LCT_BINS; bx++)
1583  for (unsigned int mbx = 0; mbx < match_trig_window_size; mbx++)
1584  for (int i=0;i<2;i++)
1585  {
1586  CSCCorrelatedLCTDigi& lct = allLCTs[bx][mbx][i];
1587  if (lct.isValid()) nlct++;
1588  }
1589  if (nlct == 0) return;
1590 
1591  // retrieve CSCChamber geometry
1592  CSCTriggerGeomManager* geo_manager = CSCTriggerGeometry::get();
1593  const CSCChamber* cscChamberME1b(geo_manager->chamber(theEndcap, theStation, theSector, theSubsector, theTrigChamber));
1594 
1595  const CSCDetId me1bId(cscChamberME1b->id());
1596  const CSCDetId me1aId(me1bId.endcap(), 1, 4, me1bId.chamber());
1597  const CSCDetId me1abId(ME==ME1A ? me1aId : me1bId);
1598  const int chamber(me1abId.chamber());
1599  const bool is_odd(chamber%2==1);
1600  auto cscChamber = csc_g->chamber(me1abId);
1601 
1602  if (debug_gem_dphi) std::cout<<"++++++++ matchGEMPads "<< me1abId <<" +++++++++ "<<std::endl;
1603 
1604  // "key" layer id is used to calculate global position of stub
1605  CSCDetId key_id(me1abId.endcap(), me1abId.station(), me1abId.ring(), me1abId.chamber(), CSCConstants::KEY_CLCT_LAYER);
1606 
1607  // check if there are any pads
1608  if (pads_.empty()) {
1609  if (debug_gem_dphi) std::cout<<"igotnopads"<<std::endl;
1610  return;
1611  }
1612 
1613  // walk over BXs
1614  for (int bx = 0; bx < MAX_LCT_BINS; ++bx)
1615  {
1616  auto in_pads = pads_.find(bx);
1617 
1618  // walk over potential LCTs in this BX
1619  for (unsigned int mbx = 0; mbx < match_trig_window_size; ++mbx)
1620  for (int i=0; i<2; ++i)
1621  {
1622  CSCCorrelatedLCTDigi& lct = allLCTs[bx][mbx][i];
1623  if (!lct.isValid() or fabs(lct.getGEMDPhi()) < 0.000001) continue;
1624  if (debug_gem_dphi) std::cout<<"LCTbefore "<<bx<<" "<<mbx<<" "<<i<<" "<<lct;
1625 
1626  // use -99 as default value whe we don't know if there could have been a gem match
1627  lct.setGEMDPhi(-99.);
1628 
1629  // "strip" here is actually a half-strip in geometry's terms
1630  // note that LCT::getStrip() starts from 0
1631  float fractional_strip = 0.5 * (lct.getStrip() + 1) - 0.25;
1632  auto layer_geo = cscChamber->layer(CSCConstants::KEY_CLCT_LAYER)->geometry();
1633  // LCT::getKeyWG() also starts from 0
1634  float wire = layer_geo->middleWireOfGroup(lct.getKeyWG() + 1);
1635 
1636  LocalPoint csc_intersect = layer_geo->intersectionOfStripAndWire(fractional_strip, wire);
1637  GlobalPoint csc_gp = csc_g->idToDet(key_id)->surface().toGlobal(csc_intersect);
1638 
1639  if (debug_gem_dphi)
1640  std::cout<<"CSC det id"<<key_id <<" strip:"<<fractional_strip<<" wire:"<<wire<<" layer_geo " <<*layer_geo
1641  <<" global position phi:"<<csc_gp.phi()<<std::endl;
1642 
1643  // is LCT located in the high efficiency GEM eta range?
1644  if (is_odd){
1645  gem_match_min_eta = 1.55;
1646  gem_match_max_eta = 2.15;
1647  }else{
1648  gem_match_min_eta = 1.59;
1649  gem_match_max_eta = 2.08;
1650  }
1651 
1652  bool gem_fid = ( std::abs(csc_gp.eta()) >= gem_match_min_eta and
1653  std::abs(csc_gp.eta()) <= gem_match_max_eta);
1654 
1655  if (debug_gem_dphi) std::cout<<" lct eta "<<csc_gp.eta()<<" phi "<<csc_gp.phi()<<std::endl;
1656 
1657  if (!gem_fid)
1658  {
1659  if (debug_gem_dphi) std::cout<<" -- lct pass no gem req"<<std::endl;
1660  continue;
1661  }
1662  // use 100 ad default value when within gem fiducial region
1663  lct.setGEMDPhi(100.);
1664 
1665  if (in_pads == pads_.end()) // has no potential GEM hits with similar BX -> zap it
1666  {
1667  if (gem_clear_nomatch_lcts) lct.clear();
1668  if (debug_gem_dphi) std::cout<<" -- no gem"<<std::endl;
1669  continue;
1670  }
1671  if (debug_gem_dphi) std::cout<<" -- gem possible"<<std::endl;
1672  // use 99 ad default value when we expect there to be a gem match
1673  lct.setGEMDPhi(99.);
1674 
1675  // to consider a GEM pad as "matched" it has to be
1676  // within specified delta_eta and delta_phi ranges
1677  // and if there are multiple ones, only the min|delta_phi| is considered as matched
1678  bool gem_matched = false;
1679  //int gem_bx = 99;
1680  float min_dphi = 99.;
1681  for (auto& id_pad: in_pads->second)
1682  {
1683  GEMDetId gem_id(id_pad.first);
1684  LocalPoint gem_lp = gem_g->etaPartition(gem_id)->centreOfPad(id_pad.second->pad());
1685  GlobalPoint gem_gp = gem_g->idToDet(gem_id)->surface().toGlobal(gem_lp);
1686  float dphi = deltaPhi(csc_gp.phi(), gem_gp.phi());
1687  float deta = csc_gp.eta() - gem_gp.eta();
1688  if (debug_gem_dphi) std::cout<<"pad"<< id_pad.second->pad()<<" phi:"<<gem_gp.phi()
1689  <<" gem with dphi "<< std::abs(dphi) <<" deta "<< std::abs(deta) <<std::endl;
1690 
1691  if( ( std::abs(deta) <= gem_match_delta_eta ) and // within delta_eta
1692  ( ( is_odd and std::abs(dphi) <= gem_match_delta_phi_odd ) or
1693  ( !is_odd and std::abs(dphi) <= gem_match_delta_phi_even ) ) and // within delta_phi
1694  ( std::abs(dphi) < std::abs(min_dphi) ) // minimal delta phi
1695  )
1696  {
1697  gem_matched = true;
1698  min_dphi = dphi;
1699  //gem_bx = id_pad.second->bx();
1700  }
1701  }
1702  if (gem_matched)
1703  {
1704  if (debug_gem_dphi) std::cout<<" GOT MATCHED GEM!"<<std::endl;
1705  lct.setGEMDPhi(min_dphi);
1706  // assing the bit value
1707  int oddEven = int(not is_odd) + 1;
1708  int numberOfBendAngles(sizeof lut_pt_vs_dphi_gemcsc / sizeof *lut_pt_vs_dphi_gemcsc);
1709  int iFound = 0;
1710  if (abs(min_dphi) < lut_pt_vs_dphi_gemcsc[numberOfBendAngles-1][oddEven]) iFound = numberOfBendAngles;
1711  else {
1712  for (int i=0; i< numberOfBendAngles-1; ++i) {
1713  if (debug_gem_dphi) std::cout<<"is_odd "<<is_odd <<" min_dphi "<<abs(min_dphi)<<" bend angle lib "<<i<<" "<<lut_pt_vs_dphi_gemcsc[i][oddEven]<< std::endl;
1714  if (abs(min_dphi) < lut_pt_vs_dphi_gemcsc[i][oddEven] and abs(min_dphi) > lut_pt_vs_dphi_gemcsc[i+1][oddEven])
1715  iFound = i+1;
1716  }
1717  }
1718  lct.setGEMDPhiBits(iFound);
1719  if (debug_gem_dphi) std::cout<<"found bend angle "<<abs(min_dphi)<<" "<<lct.getGEMDPhiBits()<<" "<<lut_pt_vs_dphi_gemcsc[iFound][oddEven]<<" "<<iFound << std::endl;
1720  }
1721  else
1722  {
1723  if (debug_gem_dphi) std::cout<<" no gem match";
1724  if (gem_clear_nomatch_lcts)
1725  {
1726  lct.clear();
1727  if (debug_gem_dphi) std::cout<<" - cleared lct";
1728  }
1729  if (debug_gem_dphi) std::cout<<std::endl;
1730  }
1731  if (debug_gem_dphi) std::cout<<"LCTafter "<<bx<<" "<<mbx<<" "<<i<<" "<<lct;
1732  }
1733  }
1734 
1735  // final count
1736  int nlct_after = 0;
1737  for (int bx = 0; bx < MAX_LCT_BINS; bx++)
1738  for (unsigned int mbx = 0; mbx < match_trig_window_size; mbx++)
1739  for (int i=0;i<2;i++)
1740  {
1741  if (allLCTs[bx][mbx][i].isValid()) nlct_after++;
1742  }
1743  if (debug_gem_dphi) std::cout<<"before "<<nlct<<" after "<<nlct_after<<std::endl;
1744  */
1745 }
CSCMotherboardME11GEM::GEMPadsBX CSCMotherboardME11GEM::matchingGEMPads ( const CSCCLCTDigi cLCT,
const GEMPadsBX pads = GEMPadsBX(),
enum ME11Part  part = ME1B,
bool  isCopad = false,
bool  first = true 
)
private

Definition at line 2176 of file CSCMotherboardME11GEM.cc.

References funct::abs(), gather_cfg::cout, cscHsToGemPadME1a_, cscHsToGemPadME1b_, debug, deltaPad(), CSCCLCTDigi::getKeyStrip(), maxDeltaPadCoPad_, maxDeltaPadPad_, ME1A, or, AlCaHLTBitMon_ParallelJobs::p, and query::result.

Referenced by matchingGEMPads(), and run().

2177 {
2179 
2180  // fetch the low and high pad edges
2182  int deltaPad(isCoPad ? maxDeltaPadCoPad_ : maxDeltaPadPad_);
2183  const int lowPad(mymap[clct.getKeyStrip()].first);
2184  const int highPad(mymap[clct.getKeyStrip()].second);
2185  const bool debug(false);
2186  if (debug) std::cout << "lowpad " << lowPad << " highpad " << highPad << " delta pad " << deltaPad <<std::endl;
2187  for (auto p: pads){
2188  auto padRoll((p.second)->pad());
2189  if (debug) std::cout << "padRoll " << padRoll << std::endl;
2190  if (std::abs(lowPad - padRoll) <= deltaPad or std::abs(padRoll - highPad) <= deltaPad){
2191  if (debug) std::cout << "++Matches! " << std::endl;
2192  result.push_back(p);
2193  if (first) return result;
2194  }
2195  }
2196  return result;
2197 }
std::map< int, std::pair< int, int > > cscHsToGemPadME1a_
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
std::map< int, std::pair< int, int > > cscHsToGemPadME1b_
int deltaPad(int hs, int pad)
tuple result
Definition: query.py:137
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
#define debug
Definition: HDRShower.cc:19
part
Definition: HCALResponse.h:20
std::unique_ptr< CSCCathodeLCTProcessor > clct
tuple cout
Definition: gather_cfg.py:121
std::vector< GEMPadBX > GEMPadsBX
CSCMotherboardME11GEM::GEMPadsBX CSCMotherboardME11GEM::matchingGEMPads ( const CSCALCTDigi aLCT,
const GEMPadsBX pads = GEMPadsBX(),
enum ME11Part  part = ME1B,
bool  isCopad = false,
bool  first = true 
)
private

Definition at line 2201 of file CSCMotherboardME11GEM.cc.

References gather_cfg::cout, cscWgToGemRoll_, debug, CSCALCTDigi::getKeyWG(), isPadInOverlap(), ME1A, or, AlCaHLTBitMon_ParallelJobs::p, query::result, and GEMDetId::roll().

2202 {
2204 
2205  auto alctRoll(cscWgToGemRoll_[alct.getKeyWG()]);
2206  const bool debug(false);
2207  if (debug) std::cout << "ALCT keyWG " << alct.getKeyWG() << ", rolls " << alctRoll.first << " " << alctRoll.second << std::endl;
2208  for (auto p: pads){
2209  auto padRoll(GEMDetId(p.first).roll());
2210  if (debug) std::cout << "Candidate ALCT: " << padRoll << std::endl;
2211  // only pads in overlap are good for ME1A
2212  if (part==ME1A and !isPadInOverlap(padRoll)) continue;
2213  if (alctRoll.first == -99 and alctRoll.second == -99) continue; //invalid region
2214  else if (alctRoll.first == -99 and !(padRoll <= alctRoll.second)) continue; // top of the chamber
2215  else if (alctRoll.second == -99 and !(padRoll >= alctRoll.first)) continue; // bottom of the chamber
2216  else if ((alctRoll.first != -99 and alctRoll.second != -99) and // center
2217  (alctRoll.first > padRoll or padRoll > alctRoll.second)) continue;
2218  if (debug) std::cout << "++Matches! " << std::endl;
2219  result.push_back(p);
2220  if (first) return result;
2221  }
2222  return result;
2223 }
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
int roll() const
Definition: GEMDetId.h:80
tuple result
Definition: query.py:137
#define debug
Definition: HDRShower.cc:19
part
Definition: HCALResponse.h:20
std::map< int, std::pair< int, int > > cscWgToGemRoll_
std::unique_ptr< CSCAnodeLCTProcessor > alct
tuple cout
Definition: gather_cfg.py:121
std::vector< GEMPadBX > GEMPadsBX
CSCMotherboardME11GEM::GEMPadsBX CSCMotherboardME11GEM::matchingGEMPads ( const CSCCLCTDigi cLCT,
const CSCALCTDigi aLCT,
const GEMPadsBX pads = GEMPadsBX(),
enum ME11Part  part = ME1B,
bool  isCopad = false,
bool  first = true 
)
private

Definition at line 2227 of file CSCMotherboardME11GEM.cc.

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

2229 {
2231 
2232  // Fetch all (!) pads matching to ALCTs and CLCTs
2233  auto padsClct(matchingGEMPads(clct, pads, part, isCoPad, false));
2234  auto padsAlct(matchingGEMPads(alct, pads, part, isCoPad, false));
2235 
2236  const bool debug(false);
2237  if (debug) std::cout << "-----------------------------------------------------------------------"<<std::endl;
2238  // Check if the pads overlap
2239  for (auto p : padsAlct){
2240  if (debug) std::cout<< "Candidate ALCT: " << p.first << " " << *(p.second) << std::endl;
2241  for (auto q: padsClct){
2242  if (debug) std::cout<< "++Candidate CLCT: " << q.first << " " << *(q.second) << std::endl;
2243  // look for exactly the same pads
2244  if ((p.first != q.first) or GEMPadDigi(*(p.second)) != *(q.second)) continue;
2245  if (debug) std::cout << "++Matches! " << std::endl;
2246  result.push_back(p);
2247  if (first) return result;
2248  }
2249  }
2250  if (debug) std::cout << "-----------------------------------------------------------------------"<<std::endl;
2251  return result;
2252 }
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
GEMPadsBX matchingGEMPads(const CSCCLCTDigi &cLCT, const GEMPadsBX &pads=GEMPadsBX(), enum ME11Part=ME1B, bool isCopad=false, bool first=true)
tuple result
Definition: query.py:137
#define debug
Definition: HDRShower.cc:19
part
Definition: HCALResponse.h:20
std::unique_ptr< CSCAnodeLCTProcessor > alct
std::unique_ptr< CSCCathodeLCTProcessor > clct
tuple cout
Definition: gather_cfg.py:121
std::vector< GEMPadBX > GEMPadsBX
void CSCMotherboardME11GEM::printGEMTriggerPads ( int  minBX,
int  maxBx,
bool  iscopad = false 
)
private

Definition at line 2080 of file CSCMotherboardME11GEM.cc.

References coPads_, gather_cfg::cout, plotBeamSpotDB::first, isPadInOverlap(), CSCMotherboard::lct_central_bx, and pads_.

Referenced by run().

2081 {
2082  // pads or copads?
2083  auto thePads(!iscopad ? pads_ : coPads_);
2084  const bool hasPads(thePads.size()!=0);
2085 
2086  std::cout << "------------------------------------------------------------------------" << std::endl;
2087  bool first = true;
2088  for (int bx = bx_start; bx <= bx_stop; bx++) {
2089  // print only the pads for the central BX
2090  if (bx!=lct_central_bx and iscopad) continue;
2091  std::vector<std::pair<unsigned int, const GEMPadDigi*> > in_pads = thePads[bx];
2092  if (first) {
2093  if (!iscopad) std::cout << "* GEM trigger pads: " << std::endl;
2094  else std::cout << "* GEM trigger coincidence pads: " << std::endl;
2095  }
2096  first = false;
2097  if (!iscopad) std::cout << "N(pads) BX " << bx << " : " << in_pads.size() << std::endl;
2098  else std::cout << "N(copads) BX " << bx << " : " << in_pads.size() << std::endl;
2099  if (hasPads){
2100  for (auto pad : in_pads){
2101  auto roll_id(GEMDetId(pad.first));
2102  std::cout << "\tdetId " << pad.first << " " << roll_id << ", pad = " << pad.second->pad() << ", BX = " << pad.second->bx() + 6;
2103  if (isPadInOverlap(roll_id.roll())) std::cout << " (in overlap)" << std::endl;
2104  else std::cout << std::endl;
2105  }
2106  }
2107  else
2108  break;
2109  }
2110 }
tuple cout
Definition: gather_cfg.py:121
std::vector< GEMCoPadDigi > CSCMotherboardME11GEM::readoutCoPads ( )

Definition at line 2255 of file CSCMotherboardME11GEM.cc.

References gemCoPadV.

Referenced by CSCTriggerPrimitivesBuilder::build().

2256 {
2257  return gemCoPadV;
2258 }
std::vector< GEMCoPadDigi > gemCoPadV
std::vector< CSCCorrelatedLCTDigi > CSCMotherboardME11GEM::readoutLCTs ( enum ME11Part  me1ab)

Definition at line 1003 of file CSCMotherboardME11GEM.cc.

References gather_cfg::cout, CSCMotherboard::early_tbins, getLCTs1a(), getLCTs1b(), ME1A, ME1B, or, CSCMotherboard::readout_earliest_2, sortLCTsByGEMDPhi(), sortLCTsByQuality(), tmb_cross_bx_algo, and CSCMotherboard::tmb_l1a_window_size.

1004 {
1005  std::vector<CSCCorrelatedLCTDigi> tmpV;
1006 
1007  // The start time of the L1A*LCT coincidence window should be related
1008  // to the fifo_pretrig parameter, but I am not completely sure how.
1009  // Just choose it such that the window is centered at bx=7. This may
1010  // need further tweaking if the value of tmb_l1a_window_size changes.
1011  //static int early_tbins = 4;
1012  // The number of LCT bins in the read-out is given by the
1013  // tmb_l1a_window_size parameter, forced to be odd
1014  static int lct_bins =
1016  static int late_tbins = early_tbins + lct_bins;
1017 
1018 
1019  // Start from the vector of all found correlated LCTs and select
1020  // those within the LCT*L1A coincidence window.
1021  int bx_readout = -1;
1022  std::vector<CSCCorrelatedLCTDigi> tmp_lcts;
1023  std::vector<CSCCorrelatedLCTDigi> all_lcts;
1024  if (me1ab == ME1A) tmp_lcts = getLCTs1a();
1025  if (me1ab == ME1B) tmp_lcts = getLCTs1b();
1026  switch(tmb_cross_bx_algo){
1027  case 0: all_lcts = tmp_lcts;
1028  break;
1029  case 1: all_lcts = tmp_lcts;
1030  break;
1031  case 2: all_lcts = sortLCTsByQuality(me1ab);
1032  break;
1033  case 3: all_lcts = sortLCTsByGEMDPhi(me1ab);
1034  break;
1035  default: std::cout<<"tmb_cross_bx_algo error" <<std::endl;
1036  break;
1037  }
1038  std::vector <CSCCorrelatedLCTDigi>::const_iterator plct = all_lcts.begin();
1039  for (; plct != all_lcts.end(); plct++)
1040  {
1041  if (!plct->isValid()) continue;
1042 
1043  int bx = (*plct).getBX();
1044  // Skip LCTs found too early relative to L1Accept.
1045  if (bx <= early_tbins) continue;
1046 
1047  // Skip LCTs found too late relative to L1Accept.
1048  if (bx > late_tbins) continue;
1049 
1050  // If (readout_earliest_2) take only LCTs in the earliest bx in the read-out window:
1051  // in digi->raw step, LCTs have to be packed into the TMB header, and
1052  // currently there is room just for two.
1053  if (readout_earliest_2 and (bx_readout == -1 or bx == bx_readout) )
1054  {
1055  tmpV.push_back(*plct);
1056  if (bx_readout == -1) bx_readout = bx;
1057  }
1058  else tmpV.push_back(*plct);
1059  }
1060  return tmpV;
1061 }
std::vector< CSCCorrelatedLCTDigi > sortLCTsByQuality(int bx, enum ME11Part=ME1B)
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
unsigned int tmb_l1a_window_size
std::vector< CSCCorrelatedLCTDigi > getLCTs1b()
std::vector< CSCCorrelatedLCTDigi > getLCTs1a()
tuple cout
Definition: gather_cfg.py:121
std::vector< CSCCorrelatedLCTDigi > sortLCTsByGEMDPhi(int bx, enum ME11Part=ME1B)
std::vector< CSCCorrelatedLCTDigi > CSCMotherboardME11GEM::readoutLCTs1a ( )

Definition at line 988 of file CSCMotherboardME11GEM.cc.

References ME1A, and CSCMotherboard::readoutLCTs().

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

989 {
990  return readoutLCTs(ME1A);
991 }
std::vector< CSCCorrelatedLCTDigi > readoutLCTs()
std::vector< CSCCorrelatedLCTDigi > CSCMotherboardME11GEM::readoutLCTs1b ( )

Definition at line 994 of file CSCMotherboardME11GEM.cc.

References ME1B, and CSCMotherboard::readoutLCTs().

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

995 {
996  return readoutLCTs(ME1B);
997 }
std::vector< CSCCorrelatedLCTDigi > readoutLCTs()
void CSCMotherboardME11GEM::retrieveGEMCoPads ( const GEMCoPadDigiCollection pads,
unsigned  id 
)
private

Definition at line 2130 of file CSCMotherboardME11GEM.cc.

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

Referenced by run().

2131 {
2132  auto superChamber(gem_g->superChamber(id));
2133  for (auto ch : superChamber->chambers()) {
2134  for (auto roll : ch->etaPartitions()) {
2135  GEMDetId roll_id(roll->id());
2136  auto pads_in_det = gemPads->get(roll_id);
2137  for (auto pad = pads_in_det.first; pad != pads_in_det.second; ++pad) {
2138  GEMPadDigi gfirst((*pad).first());
2139  auto id_pad = std::make_pair(roll_id, &gfirst);
2140  const int bx_shifted(lct_central_bx + (pad->first()).bx());
2141  for (int bx = bx_shifted - maxDeltaBXPad_;bx <= bx_shifted + maxDeltaBXPad_; ++bx) {
2142  if(bx != lct_central_bx) continue;
2143  coPads_[bx].push_back(id_pad);
2144  }
2145  }
2146  }
2147  }
2148 }
const GEMSuperChamber * superChamber(GEMDetId id) const
Definition: GEMGeometry.cc:91
const GEMGeometry * gem_g
void CSCMotherboardME11GEM::retrieveGEMPads ( const GEMPadDigiCollection pads,
unsigned  id 
)
private

Definition at line 2112 of file CSCMotherboardME11GEM.cc.

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

Referenced by run().

2113 {
2114  auto superChamber(gem_g->superChamber(id));
2115  for (auto ch : superChamber->chambers()) {
2116  for (auto roll : ch->etaPartitions()) {
2117  GEMDetId roll_id(roll->id());
2118  auto pads_in_det = gemPads->get(roll_id);
2119  for (auto pad = pads_in_det.first; pad != pads_in_det.second; ++pad) {
2120  auto id_pad = std::make_pair(roll_id, &(*pad));
2121  const int bx_shifted(lct_central_bx + pad->bx());
2122  for (int bx = bx_shifted - maxDeltaBXPad_;bx <= bx_shifted + maxDeltaBXPad_; ++bx) {
2123  pads_[bx].push_back(id_pad);
2124  }
2125  }
2126  }
2127  }
2128 }
const GEMSuperChamber * superChamber(GEMDetId id) const
Definition: GEMGeometry.cc:91
const GEMGeometry * gem_g
void CSCMotherboardME11GEM::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 368 of file CSCMotherboardME11GEM.cc.

References CSCMotherboard::alct, alctV, allLCTs1a, allLCTs1b, assignGEMRoll(), b, buildCoincidencePads(), buildLCTfromALCTandGEM_ME1a_, buildLCTfromALCTandGEM_ME1b_, buildLCTfromCLCTandGEM_ME1a_, buildLCTfromCLCTandGEM_ME1b_, CSCTriggerGeomManager::chamber(), CSCGeometry::chamber(), GEMGeometry::chamber(), CSCMotherboard::clct, clct1a, clctV1a, clctV1b, CSCCorrelatedLCTDigi::clear(), clear(), coPads_, correctLCTtimingWithGEM_, correlateLCTsGEM(), gather_cfg::cout, createGEMRollEtaLUT(), csc_g, cscHsToGemPadME1a_, cscHsToGemPadME1b_, cscWgToGemRoll_, debug_gem_matching, debug_luts, do_gem_matching, drop_used_clcts, dropLowQualityCLCTsNoGEMs_ME1a_, dropLowQualityCLCTsNoGEMs_ME1b_, prof2calltree::edge, HLT_25ns14e33_v1_cff::etaMax, HLT_25ns14e33_v1_cff::etaMin, plotBeamSpotDB::first, gem_g, gemPadToCscHsME1a_, gemPadToCscHsME1b_, gemRollToEtaLimits_, CSCTriggerGeometry::get(), i, CSCMotherboard::infoV, LogDebug, lut_wg_etaMin_etaMax_even, lut_wg_etaMin_etaMax_odd, match_earliest_clct_me11_only, CSCMotherboard::match_trig_window_size, matchGEMPads(), matchingGEMPads(), CSCAnodeLCTProcessor::MAX_ALCT_BINS, CSCCathodeLCTProcessor::MAX_CLCT_BINS, CSCMotherboard::MAX_LCT_BINS, max_me11_lcts, maxDeltaBXCoPad_, maxDeltaBXCoPadEven_, maxDeltaBXCoPadOdd_, maxDeltaBXPad_, maxDeltaBXPadEven_, maxDeltaBXPadOdd_, maxDeltaPadCoPad_, maxDeltaPadCoPadEven_, maxDeltaPadCoPadOdd_, maxDeltaPadPad_, maxDeltaPadPadEven_, maxDeltaPadPadOdd_, ME1A, ME1B, or, AlCaHLTBitMon_ParallelJobs::p, pads_, pref, printGEMTriggerPads(), HLT_25ns14e33_v1_cff::quality, readoutLCTs1a(), readoutLCTs1b(), HLT_25ns14e33_v3_cff::region, retrieveGEMCoPads(), retrieveGEMPads(), runME11ILT_, edm::second(), smartME1aME1b, CSCMotherboard::theEndcap, CSCMotherboard::theSector, CSCMotherboard::theStation, CSCMotherboard::theSubsector, CSCMotherboard::theTrigChamber, and tmb_cross_bx_algo.

Referenced by CSCTriggerPrimitivesBuilder::build().

371 {
372  clear();
373 
374  if (!( alct and clct and clct1a and smartME1aME1b))
375  {
376  if (infoV >= 0) edm::LogError("L1CSCTPEmulatorSetupError")
377  << "+++ run() called for non-existing ALCT/CLCT processor! +++ \n";
378  return;
379  }
380 
381  alctV = alct->run(wiredc); // run anodeLCT
382  clctV1b = clct->run(compdc); // run cathodeLCT in ME1/b
383  clctV1a = clct1a->run(compdc); // run cathodeLCT in ME1/a
384 
385  bool gemGeometryAvailable(false);
386  if (gem_g != nullptr) {
387  if (infoV >= 0) edm::LogInfo("L1CSCTPEmulatorSetupInfo")
388  << "+++ run() called for GEM-CSC integrated trigger! +++ \n";
389  gemGeometryAvailable = true;
390  }
391 
392  int used_clct_mask[20], used_clct_mask_1a[20];
393  for (int b=0;b<20;b++)
394  used_clct_mask[b] = used_clct_mask_1a[b] = 0;
395 
396  // retrieve CSCChamber geometry
398  const CSCChamber* cscChamberME1b(geo_manager->chamber(theEndcap, theStation, theSector, theSubsector, theTrigChamber));
399  const CSCDetId me1bId(cscChamberME1b->id());
400  const CSCDetId me1aId(me1bId.endcap(), 1, 4, me1bId.chamber());
401  const CSCChamber* cscChamberME1a(csc_g->chamber(me1aId));
402 
403  if (runME11ILT_){
404 
405  // check for GEM geometry
406  if (not gemGeometryAvailable){
407  if (infoV >= 0) edm::LogError("L1CSCTPEmulatorSetupError")
408  << "+++ run() called for GEM-CSC integrated trigger without valid GEM geometry! +++ \n";
409  return;
410  }
411 
412  // trigger geometry
413  const CSCLayer* keyLayerME1b(cscChamberME1b->layer(3));
414  const CSCLayerGeometry* keyLayerGeometryME1b(keyLayerME1b->geometry());
415  const CSCLayer* keyLayerME1a(cscChamberME1a->layer(3));
416  const CSCLayerGeometry* keyLayerGeometryME1a(keyLayerME1a->geometry());
417 
418  const bool isEven(me1bId.chamber()%2==0);
419  const int region((theEndcap == 1) ? 1: -1);
420  const GEMDetId gem_id(region, 1, theStation, 1, me1bId.chamber(), 0);
421  const GEMChamber* gemChamber(gem_g->chamber(gem_id));
422 
423  // initialize depending on whether even or odd
428 
429  // LUT<roll,<etaMin,etaMax> >
430  createGEMRollEtaLUT(isEven);
431  if (debug_luts){
432  LogDebug("CSCMotherboardME11GEM") << "me1b Det "<< me1bId<<" "<< me1bId.rawId() <<" "
433  << (isEven ? "Even":"odd") <<" chamber "<< me1bId.chamber()<<std::endl;
434  if (gemRollToEtaLimits_.size())
435  for(auto p : gemRollToEtaLimits_)
436  LogDebug("CSCMotherboardME11GEM") << "pad "<< p.first << " min eta " << (p.second).first << " max eta " << (p.second).second << std::endl;
437  }
438 
439  // loop on all wiregroups to create a LUT <WG,rollMin,rollMax>
440  const int numberOfWG(keyLayerGeometryME1b->numberOfWireGroups());
441  for (int i = 0; i< numberOfWG; ++i){
442  auto etaMin(isEven ? lut_wg_etaMin_etaMax_even[i][1] : lut_wg_etaMin_etaMax_odd[i][1]);
443  auto etaMax(isEven ? lut_wg_etaMin_etaMax_even[i][2] : lut_wg_etaMin_etaMax_odd[i][2]);
445  }
446  if (debug_luts){
447  for(auto p : cscWgToGemRoll_) {
448  LogDebug("CSCMotherboardME11GEM") << "WG "<< p.first << " GEM pads " << (p.second).first << " " << (p.second).second << std::endl;
449  }
450  }
451 
452  // pick any roll
453  auto randRoll(gemChamber->etaPartition(2));
454 
455  // ME1a
456  auto nStripsME1a(keyLayerGeometryME1a->numberOfStrips());
457  for (float i = 0; i< nStripsME1a; i = i+0.5){
458  const LocalPoint lpCSC(keyLayerGeometryME1a->topology()->localPosition(i));
459  const GlobalPoint gp(keyLayerME1a->toGlobal(lpCSC));
460  const LocalPoint lpGEM(randRoll->toLocal(gp));
461  const int HS(i/0.5);
462  const bool edge(HS < 4 or HS > 93);
463  const float pad(edge ? -99 : randRoll->pad(lpGEM));
464  // HS are wrapped-around
465  cscHsToGemPadME1a_[HS] = std::make_pair(std::floor(pad),std::ceil(pad));
466  }
467  // ME1b
468  auto nStripsME1b(keyLayerGeometryME1b->numberOfStrips());
469  for (float i = 0; i< nStripsME1b; i = i+0.5){
470  const LocalPoint lpCSC(keyLayerGeometryME1b->topology()->localPosition(i));
471  const GlobalPoint gp(keyLayerME1b->toGlobal(lpCSC));
472  const LocalPoint lpGEM(randRoll->toLocal(gp));
473  const int HS(i/0.5);
474  const bool edge(HS < 5 or HS > 124);
475  const float pad(edge ? -99 : randRoll->pad(lpGEM));
476  // HS are wrapped-around
477  cscHsToGemPadME1b_[HS] = std::make_pair(std::floor(pad),std::ceil(pad));
478  }
479  if (debug_luts){
480  LogDebug("CSCMotherboardME11GEM") << "detId " << me1bId;
481  LogDebug("CSCMotherboardME11GEM") << "CSCHSToGEMPad LUT in ME1a";
482  for(auto p : cscHsToGemPadME1a_) {
483  LogDebug("CSCMotherboardME11GEM") << "CSC HS "<< p.first << " GEM Pad low " << (p.second).first << " GEM Pad high " << (p.second).second;
484  }
485  LogDebug("CSCMotherboardME11GEM") << "CSCHSToGEMPad LUT in ME1b";
486  for(auto p : cscHsToGemPadME1b_) {
487  LogDebug("CSCMotherboardME11GEM") << "CSC HS "<< p.first << " GEM Pad low " << (p.second).first << " GEM Pad high " << (p.second).second;
488  }
489  }
490 
491  const int nGEMPads(randRoll->npads());
492  for (int i = 0; i< nGEMPads; ++i){
493  const LocalPoint lpGEM(randRoll->centreOfPad(i));
494  const GlobalPoint gp(randRoll->toGlobal(lpGEM));
495  const LocalPoint lpCSCME1a(keyLayerME1a->toLocal(gp));
496  const LocalPoint lpCSCME1b(keyLayerME1b->toLocal(gp));
497  const float stripME1a(keyLayerGeometryME1a->strip(lpCSCME1a));
498  const float stripME1b(keyLayerGeometryME1b->strip(lpCSCME1b));
499  // HS are wrapped-around
500  gemPadToCscHsME1a_[i] = (int) (stripME1a - 0.25)/0.5;
501  gemPadToCscHsME1b_[i] = (int) (stripME1b - 0.25)/0.5;
502  }
503  if (debug_luts){
504  LogDebug("CSCMotherboardME11GEM") << "detId " << me1bId;
505  LogDebug("CSCMotherboardME11GEM") << "GEMPadToCSCHs LUT in ME1a";
506  for(auto p : gemPadToCscHsME1a_) {
507  LogDebug("CSCMotherboardME11GEM") << "GEM Pad "<< p.first << " CSC HS: " << p.second;
508  }
509  LogDebug("CSCMotherboardME11GEM") << "GEMPadToCSCHs LUT in ME1b";
510  for(auto p : gemPadToCscHsME1b_) {
511  LogDebug("CSCMotherboardME11GEM") << "GEM Pad "<< p.first << " CSC HS: " << p.second;
512  }
513  }
514 
515  // build coincidence pads
516  std::auto_ptr<GEMCoPadDigiCollection> pCoPads(new GEMCoPadDigiCollection());
517  buildCoincidencePads(gemPads, *pCoPads, me1bId);
518 
519  // retrieve pads and copads in a certain BX window for this CSC
520  pads_.clear();
521  coPads_.clear();
522  retrieveGEMPads(gemPads, gem_id);
523  retrieveGEMCoPads(pCoPads.get(), gem_id);
524  }
525 
526  const bool hasPads(pads_.size()!=0);
527  const bool hasCoPads(hasPads and coPads_.size()!=0);
528  bool hasLCTs(false);
529 
530  // ALCT-centric matching
531  for (int bx_alct = 0; bx_alct < CSCAnodeLCTProcessor::MAX_ALCT_BINS; bx_alct++)
532  {
533  if (alct->bestALCT[bx_alct].isValid())
534  {
535  const int bx_clct_start(bx_alct - match_trig_window_size/2);
536  const int bx_clct_stop(bx_alct + match_trig_window_size/2);
537  const int bx_copad_start(bx_alct - maxDeltaBXCoPad_);
538  const int bx_copad_stop(bx_alct + maxDeltaBXCoPad_);
539 
540  if (debug_gem_matching){
541  std::cout << "========================================================================" << std::endl;
542  std::cout << "ALCT-CLCT matching in ME1/1 chamber: " << cscChamberME1b->id() << std::endl;
543  std::cout << "------------------------------------------------------------------------" << std::endl;
544  std::cout << "+++ Best ALCT Details: ";
545  alct->bestALCT[bx_alct].print();
546  std::cout << "+++ Second ALCT Details: ";
547  alct->secondALCT[bx_alct].print();
548 
549  printGEMTriggerPads(bx_clct_start, bx_clct_stop);
550  printGEMTriggerPads(bx_clct_start, bx_clct_stop, true);
551 
552  std::cout << "------------------------------------------------------------------------" << std::endl;
553  std::cout << "Attempt ALCT-CLCT matching in ME1/b in bx range: [" << bx_clct_start << "," << bx_clct_stop << "]" << std::endl;
554  }
555 
556  // ALCT-to-CLCT matching in ME1b
557  int nSuccesFulMatches = 0;
558  for (int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++)
559  {
560  if (bx_clct < 0 or bx_clct >= CSCCathodeLCTProcessor::MAX_CLCT_BINS) continue;
561  if (drop_used_clcts and used_clct_mask[bx_clct]) continue;
562  if (clct->bestCLCT[bx_clct].isValid())
563  {
564  const int quality(clct->bestCLCT[bx_clct].getQuality());
565  if (debug_gem_matching) std::cout << "++Valid ME1b CLCT: " << clct->bestCLCT[bx_clct] << std::endl;
566 
567  // pick the pad that corresponds
568  auto matchingPads(matchingGEMPads(clct->bestCLCT[bx_clct], alct->bestALCT[bx_alct], pads_[bx_clct], ME1B, false));
569  auto matchingCoPads(matchingGEMPads(clct->bestCLCT[bx_clct], alct->bestALCT[bx_alct], coPads_[bx_clct], ME1B, true));
570  if (runME11ILT_ and dropLowQualityCLCTsNoGEMs_ME1b_ and quality < 4 and hasPads){
571  int nFound(matchingPads.size());
572  const bool clctInEdge(clct->bestCLCT[bx_clct].getKeyStrip() < 5 or clct->bestCLCT[bx_clct].getKeyStrip() > 124);
573  if (clctInEdge){
574  if (debug_gem_matching) std::cout << "\tInfo: low quality CLCT in CSC chamber edge, don't care about GEM pads" << std::endl;
575  }
576  else {
577  if (nFound != 0){
578  if (debug_gem_matching) std::cout << "\tInfo: low quality CLCT with " << nFound << " matching GEM trigger pads" << std::endl;
579  }
580  else {
581  if (debug_gem_matching) std::cout << "\tWarning: low quality CLCT without matching GEM trigger pad" << std::endl;
582  continue;
583  }
584  }
585  }
586 
587  // check timing
589  int nFound(matchingCoPads.size());
590  if (nFound != 0 and bx_alct == 6 and bx_clct != 6){
591  if (debug_gem_matching) std::cout << "\tInfo: CLCT with incorrect timing" << std::endl;
592  continue;
593  }
594  }
595 
596  ++nSuccesFulMatches;
597 
598  hasLCTs = true;
599  // if (infoV > 1) LogTrace("CSCMotherboard")
600  int mbx = bx_clct-bx_clct_start;
601  correlateLCTsGEM(alct->bestALCT[bx_alct], alct->secondALCT[bx_alct],
602  clct->bestCLCT[bx_clct], clct->secondCLCT[bx_clct],
603  allLCTs1b[bx_alct][mbx][0], allLCTs1b[bx_alct][mbx][1], ME1B, matchingPads, matchingCoPads);
604  if (debug_gem_matching) {
605  std::cout << "Successful ALCT-CLCT match in ME1b: bx_alct = " << bx_alct
606  << "; match window: [" << bx_clct_start << "; " << bx_clct_stop
607  << "]; bx_clct = " << bx_clct << std::endl;
608  std::cout << "+++ Best CLCT Details: ";
609  clct->bestCLCT[bx_clct].print();
610  std::cout << "+++ Second CLCT Details: ";
611  clct->secondCLCT[bx_clct].print();
612  }
613 
614  if (allLCTs1b[bx_alct][mbx][0].isValid()) {
615  used_clct_mask[bx_clct] += 1;
617  }
618  }
619  }
620 
621  // ALCT-to-GEM matching in ME1b
622  int nSuccesFulGEMMatches = 0;
623  if (runME11ILT_ and nSuccesFulMatches==0 and buildLCTfromALCTandGEM_ME1b_){
624  if (debug_gem_matching) std::cout << "++No valid ALCT-CLCT matches in ME1b" << std::endl;
625  for (int bx_gem = bx_copad_start; bx_gem <= bx_copad_stop; bx_gem++) {
626  if (not hasCoPads) {
627  continue;
628  }
629 
630  // find the best matching copad - first one
631  auto copads(matchingGEMPads(alct->bestALCT[bx_alct], coPads_[bx_gem], ME1B, true));
632  if (debug_gem_matching) std::cout << "\t++Number of matching GEM CoPads in BX " << bx_alct << " : "<< copads.size() << std::endl;
633  if (copads.size()==0) {
634  continue;
635  }
636 
637  correlateLCTsGEM(alct->bestALCT[bx_alct], alct->secondALCT[bx_alct],
638  *(copads.at(0)).second, allLCTs1b[bx_alct][0][0], allLCTs1b[bx_alct][0][1], ME1B);
639  if (allLCTs1b[bx_alct][0][0].isValid()) {
640  ++nSuccesFulGEMMatches;
642  }
643  if (debug_gem_matching) {
644  std::cout << "Successful ALCT-GEM CoPad match in ME1b: bx_alct = " << bx_alct << std::endl << std::endl;
645  std::cout << "------------------------------------------------------------------------" << std::endl << std::endl;
646  }
647  }
648  }
649 
650  if (debug_gem_matching) {
651  std::cout << "========================================================================" << std::endl;
652  std::cout << "Summary: " << std::endl;
653  if (nSuccesFulMatches>1)
654  std::cout << "Too many successful ALCT-CLCT matches in ME1b: " << nSuccesFulMatches
655  << ", CSCDetId " << cscChamberME1b->id()
656  << ", bx_alct = " << bx_alct
657  << "; match window: [" << bx_clct_start << "; " << bx_clct_stop << "]" << std::endl;
658  else if (nSuccesFulMatches==1)
659  std::cout << "1 successful ALCT-CLCT match in ME1b: "
660  << " CSCDetId " << cscChamberME1b->id()
661  << ", bx_alct = " << bx_alct
662  << "; match window: [" << bx_clct_start << "; " << bx_clct_stop << "]" << std::endl;
663  else if (nSuccesFulGEMMatches==1)
664  std::cout << "1 successful ALCT-GEM match in ME1b: "
665  << " CSCDetId " << cscChamberME1b->id()
666  << ", bx_alct = " << bx_alct
667  << "; match window: [" << bx_clct_start << "; " << bx_clct_stop << "]" << std::endl;
668  else
669  std::cout << "Unsuccessful ALCT-CLCT match in ME1b: "
670  << "CSCDetId " << cscChamberME1b->id()
671  << ", bx_alct = " << bx_alct
672  << "; match window: [" << bx_clct_start << "; " << bx_clct_stop << "]" << std::endl;
673 
674  std::cout << "------------------------------------------------------------------------" << std::endl;
675  std::cout << "Attempt ALCT-CLCT matching in ME1/a in bx range: [" << bx_clct_start << "," << bx_clct_stop << "]" << std::endl;
676  }
677 
678  // ALCT-to-CLCT matching in ME1a
679  nSuccesFulMatches = 0;
680  for (int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++)
681  {
682  if (bx_clct < 0 or bx_clct >= CSCCathodeLCTProcessor::MAX_CLCT_BINS) continue;
683  if (drop_used_clcts and used_clct_mask_1a[bx_clct]) continue;
684  if (clct1a->bestCLCT[bx_clct].isValid())
685  {
686  const int quality(clct1a->bestCLCT[bx_clct].getQuality());
687  if (debug_gem_matching) std::cout << "++Valid ME1a CLCT: " << clct1a->bestCLCT[bx_clct] << std::endl;
688 
689  // pick the pad that corresponds
690  auto matchingPads(matchingGEMPads(clct1a->bestCLCT[bx_clct], alct->bestALCT[bx_alct], pads_[bx_clct], ME1A, false));
691  auto matchingCoPads(matchingGEMPads(clct1a->bestCLCT[bx_clct], alct->bestALCT[bx_alct], coPads_[bx_clct], ME1A, true));
692  if (runME11ILT_ and dropLowQualityCLCTsNoGEMs_ME1a_ and quality < 4 and hasPads){
693  int nFound(matchingPads.size());
694  const bool clctInEdge(clct1a->bestCLCT[bx_clct].getKeyStrip() < 4 or clct1a->bestCLCT[bx_clct].getKeyStrip() > 93);
695  if (clctInEdge){
696  if (debug_gem_matching) std::cout << "\tInfo: low quality CLCT in CSC chamber edge, don't care about GEM pads" << std::endl;
697  }
698  else {
699  if (nFound != 0){
700  if (debug_gem_matching) std::cout << "\tInfo: low quality CLCT with " << nFound << " matching GEM trigger pads" << std::endl;
701  }
702  else {
703  if (debug_gem_matching) std::cout << "\tWarning: low quality CLCT without matching GEM trigger pad" << std::endl;
704  continue;
705  }
706  }
707  }
708  ++nSuccesFulMatches;
709  int mbx = bx_clct-bx_clct_start;
710  correlateLCTsGEM(alct->bestALCT[bx_alct], alct->secondALCT[bx_alct],
711  clct1a->bestCLCT[bx_clct], clct1a->secondCLCT[bx_clct],
712  allLCTs1a[bx_alct][mbx][0], allLCTs1a[bx_alct][mbx][1], ME1A, matchingPads, matchingCoPads);
713  if (debug_gem_matching) {
714  std::cout << "Successful ALCT-CLCT match in ME1a: bx_alct = " << bx_alct
715  << "; match window: [" << bx_clct_start << "; " << bx_clct_stop
716  << "]; bx_clct = " << bx_clct << std::endl;
717  std::cout << "+++ Best CLCT Details: ";
718  clct1a->bestCLCT[bx_clct].print();
719  std::cout << "+++ Second CLCT Details: ";
720  clct1a->secondCLCT[bx_clct].print();
721  }
722  if (allLCTs1a[bx_alct][mbx][0].isValid()){
723  used_clct_mask_1a[bx_clct] += 1;
725  }
726  }
727  }
728 
729  // ALCT-to-GEM matching in ME1a
730  nSuccesFulGEMMatches = 0;
731  if (runME11ILT_ and nSuccesFulMatches==0 and buildLCTfromALCTandGEM_ME1a_){
732  if (debug_gem_matching) std::cout << "++No valid ALCT-CLCT matches in ME1a" << std::endl;
733  for (int bx_gem = bx_copad_start; bx_gem <= bx_copad_stop; bx_gem++) {
734  if (not hasCoPads) {
735  continue;
736  }
737 
738  // find the best matching copad - first one
739  auto copads(matchingGEMPads(alct->bestALCT[bx_alct], coPads_[bx_gem], ME1A, true));
740  if (debug_gem_matching) std::cout << "\t++Number of matching GEM CoPads in BX " << bx_alct << " : "<< copads.size() << std::endl;
741  if (copads.size()==0) {
742  continue;
743  }
744 
745  correlateLCTsGEM(alct->bestALCT[bx_alct], alct->secondALCT[bx_alct],
746  *(copads.at(0)).second, allLCTs1a[bx_alct][0][0], allLCTs1a[bx_alct][0][1], ME1A);
747  if (allLCTs1a[bx_alct][0][0].isValid()) {
748  ++nSuccesFulGEMMatches;
750  }
751  if (debug_gem_matching) {
752  std::cout << "Successful ALCT-GEM CoPad match in ME1a: bx_alct = " << bx_alct << std::endl << std::endl;
753  std::cout << "------------------------------------------------------------------------" << std::endl << std::endl;
754  }
755  }
756  }
757 
758  if (debug_gem_matching) {
759  std::cout << "========================================================================" << std::endl;
760  std::cout << "Summary: " << std::endl;
761  if (nSuccesFulMatches>1)
762  std::cout << "Too many successful ALCT-CLCT matches in ME1a: " << nSuccesFulMatches
763  << ", CSCDetId " << cscChamberME1a->id()
764  << ", bx_alct = " << bx_alct
765  << "; match window: [" << bx_clct_start << "; " << bx_clct_stop << "]" << std::endl;
766  else if (nSuccesFulMatches==1)
767  std::cout << "1 successful ALCT-CLCT match in ME1a: "
768  << " CSCDetId " << cscChamberME1a->id()
769  << ", bx_alct = " << bx_alct
770  << "; match window: [" << bx_clct_start << "; " << bx_clct_stop << "]" << std::endl;
771  else if (nSuccesFulGEMMatches==1)
772  std::cout << "1 successful ALCT-GEM match in ME1a: "
773  << " CSCDetId " << cscChamberME1a->id()
774  << ", bx_alct = " << bx_alct
775  << "; match window: [" << bx_clct_start << "; " << bx_clct_stop << "]" << std::endl;
776  else
777  std::cout << "Unsuccessful ALCT-CLCT match in ME1a: "
778  << "CSCDetId " << cscChamberME1a->id()
779  << ", bx_alct = " << bx_alct
780  << "; match window: [" << bx_clct_start << "; " << bx_clct_stop << "]" << std::endl;
781  }
782 
783  } // end of ALCT valid block
784  else {
785  auto coPads(coPads_[bx_alct]);
786  if (runME11ILT_ and coPads.size()!=0) {
787  // keep it simple for the time being, only consider the first copad
788  const int bx_clct_start(bx_alct - match_trig_window_size/2);
789  const int bx_clct_stop(bx_alct + match_trig_window_size/2);
790 
791  // matching in ME1b
793  for (int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++) {
794  if (bx_clct < 0 or bx_clct >= CSCCathodeLCTProcessor::MAX_CLCT_BINS) continue;
795  if (drop_used_clcts and used_clct_mask[bx_clct]) continue;
796  if (clct->bestCLCT[bx_clct].isValid()) {
797  const int quality(clct->bestCLCT[bx_clct].getQuality());
798  // only use high-Q stubs for the time being
799  if (quality < 4) continue;
800  int mbx = bx_clct-bx_clct_start;
801  correlateLCTsGEM(clct->bestCLCT[bx_clct], clct->secondCLCT[bx_clct], *(coPads[0].second), GEMDetId(coPads[0].first).roll(),
802  allLCTs1b[bx_alct][mbx][0], allLCTs1b[bx_alct][mbx][1], ME1B);
803  if (debug_gem_matching) {
804  // if (infoV > 1) LogTrace("CSCMotherboard")
805  std::cout << "Successful GEM-CLCT match in ME1b: bx_alct = " << bx_alct
806  << "; match window: [" << bx_clct_start << "; " << bx_clct_stop
807  << "]; bx_clct = " << bx_clct << std::endl;
808  std::cout << "+++ Best CLCT Details: ";
809  clct->bestCLCT[bx_clct].print();
810  std::cout << "+++ Second CLCT Details: ";
811  clct->secondCLCT[bx_clct].print();
812  }
813  if (allLCTs1b[bx_alct][mbx][0].isValid()) {
814  used_clct_mask[bx_clct] += 1;
816  }
817  }
818  }
819  }
820 
821  // matching in ME1a
823  for (int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++) {
824  if (bx_clct < 0 || bx_clct >= CSCCathodeLCTProcessor::MAX_CLCT_BINS) continue;
825  if (drop_used_clcts && used_clct_mask_1a[bx_clct]) continue;
826  if (clct1a->bestCLCT[bx_clct].isValid()){
827  const int quality(clct1a->bestCLCT[bx_clct].getQuality());
828  // only use high-Q stubs for the time being
829  if (quality < 4) continue;
830  int mbx = bx_clct-bx_clct_start;
831  correlateLCTsGEM(clct1a->bestCLCT[bx_clct], clct1a->secondCLCT[bx_clct], *(coPads[0].second), GEMDetId(coPads[0].first).roll(),
832  allLCTs1a[bx_alct][mbx][0], allLCTs1a[bx_alct][mbx][1], ME1A);
833  if (debug_gem_matching) {
834  // if (infoV > 1) LogTrace("CSCMotherboard")
835  std::cout << "Successful GEM-CLCT match in ME1a: bx_alct = " << bx_alct
836  << "; match window: [" << bx_clct_start << "; " << bx_clct_stop
837  << "]; bx_clct = " << bx_clct << std::endl;
838  std::cout << "+++ Best CLCT Details: ";
839  clct1a->bestCLCT[bx_clct].print();
840  std::cout << "+++ Second CLCT Details: ";
841  clct1a->secondCLCT[bx_clct].print();
842  }
843  if (allLCTs1a[bx_alct][mbx][0].isValid()){
844  used_clct_mask_1a[bx_clct] += 1;
846  }
847  }
848  }
849  }
850  }
851  }
852  } // end of ALCT-centric matching
853 
854  // possibly use some discrimination from GEMs
855  if (gemGeometryAvailable and runME11ILT_ and do_gem_matching) {
858  }
859 
860  if (hasLCTs and debug_gem_matching){
861  std::cout << "========================================================================" << std::endl;
862  std::cout << "Counting the LCTs" << std::endl;
863  std::cout << "========================================================================" << std::endl;
864  }
865 
866  // reduction of nLCTs per each BX
867  for (int bx = 0; bx < MAX_LCT_BINS; bx++)
868  {
869  // counting
870  unsigned int n1a=0, n1b=0;
871  for (unsigned int mbx = 0; mbx < match_trig_window_size; mbx++)
872  for (int i=0;i<2;i++)
873  {
874  int cbx = bx + mbx - match_trig_window_size/2;
875  if (allLCTs1b[bx][mbx][i].isValid())
876  {
877  n1b++;
878  if (infoV > 0) LogDebug("CSCMotherboard")
879  << "1b LCT"<<i+1<<" "<<bx<<"/"<<cbx<<": "<<allLCTs1b[bx][mbx][i]<<std::endl;
880  }
881  if (allLCTs1a[bx][mbx][i].isValid())
882  {
883  n1a++;
884  if (infoV > 0) LogDebug("CSCMotherboard")
885  << "1a LCT"<<i+1<<" "<<bx<<"/"<<cbx<<": "<<allLCTs1a[bx][mbx][i]<<std::endl;
886  }
887  }
888  if (infoV > 0 and n1a+n1b>0) LogDebug("CSCMotherboard")
889  <<"bx "<<bx<<" nLCT:"<<n1a<<" "<<n1b<<" "<<n1a+n1b<<std::endl;
890 
891  // some simple cross-bx sorting algorithms
892  if (tmb_cross_bx_algo == 1 and (n1a>2 or n1b>2) )
893  {
894  n1a=0, n1b=0;
895  for (unsigned int mbx = 0; mbx < match_trig_window_size; mbx++)
896  for (int i=0;i<2;i++)
897  {
898  if (allLCTs1b[bx][pref[mbx]][i].isValid())
899  {
900  n1b++;
901  if (n1b>2) allLCTs1b[bx][pref[mbx]][i].clear();
902  }
903  if (allLCTs1a[bx][pref[mbx]][i].isValid())
904  {
905  n1a++;
906  if (n1a>2) allLCTs1a[bx][pref[mbx]][i].clear();
907  }
908  }
909 
910  n1a=0, n1b=0;
911  for (unsigned int mbx = 0; mbx < match_trig_window_size; mbx++)
912  for (int i=0;i<2;i++)
913  {
914  int cbx = bx + mbx - match_trig_window_size/2;
915  if (allLCTs1b[bx][mbx][i].isValid())
916  {
917  n1b++;
918  if (infoV > 0) LogDebug("CSCMotherboard")
919  << "1b LCT"<<i+1<<" "<<bx<<"/"<<cbx<<": "<<allLCTs1b[bx][mbx][i]<<std::cout;
920  }
921  if (allLCTs1a[bx][mbx][i].isValid())
922  {
923  n1a++;
924  if (infoV > 0) LogDebug("CSCMotherboard")
925  << "1a LCT"<<i+1<<" "<<bx<<"/"<<cbx<<": "<<allLCTs1a[bx][mbx][i]<<std::cout;
926  }
927  }
928  if (infoV > 0 and n1a+n1b>0) LogDebug("CSCMotherboard")
929  <<"bx "<<bx<<" nnLCT:"<<n1a<<" "<<n1b<<" "<<n1a+n1b<<std::endl;
930  } // x-bx sorting
931 
932  // Maximum 2 per whole ME11 per BX case:
933  // (supposedly, now we should have max 2 per bx in each 1a and 1b)
934  if (n1a+n1b > max_me11_lcts and tmb_cross_bx_algo == 1)
935  {
936  // do it simple so far: take all low eta 1/b stubs
937  unsigned int nLCT=n1b;
938  n1a=0;
939  // right now nLCT<=2; cut 1a if necessary
940  for (unsigned int mbx=0; mbx<match_trig_window_size; mbx++)
941  for (int i=0;i<2;i++)
942  if (allLCTs1a[bx][mbx][i].isValid()) {
943  nLCT++;
944  if (nLCT>max_me11_lcts) allLCTs1a[bx][mbx][i].clear();
945  else n1a++;
946  }
947  // if (infoV > 0 and nLCT>0) LogDebug("CSCMotherboard")
948 // std::cout <<"bx "<<bx<<" nnnLCT: "<<n1a<<" "<<n1b<<" "<<n1a+n1b<<std::cout;
949  }
950  }// reduction per bx
951 
952  bool first = true;
953  unsigned int n1b=0, n1a=0;
954  for (auto p : readoutLCTs1b())
955  {
956  if (debug_gem_matching and first){
957  std::cout << "========================================================================" << std::endl;
958  std::cout << "Counting the final LCTs" << std::endl;
959  std::cout << "========================================================================" << std::endl;
960  first = false;
961  std::cout << "tmb_cross_bx_algo: " << tmb_cross_bx_algo << std::endl;
962 
963  }
964  n1b++;
965  if (debug_gem_matching)
966  std::cout << "1b LCT "<<n1b<<" " << p <<std::endl;
967  }
968 
969  for (auto p : readoutLCTs1a())
970  {
971  if (debug_gem_matching and first){
972  std::cout << "========================================================================" << std::endl;
973  std::cout << "Counting the final LCTs" << std::endl;
974  std::cout << "========================================================================" << std::endl;
975  first = false;
976  std::cout << "tmb_cross_bx_algo: " << tmb_cross_bx_algo << std::endl;
977  }
978  n1a++;
979  if (debug_gem_matching)
980  std::cout << "1a LCT "<<n1a<<" " << p <<std::endl;
981  }
982 
983  // if (infoV > 1) LogTrace("CSCMotherboardME11GEM")<<"clct_count E:"<<theEndcap<<"S:"<<theStation<<"R:"<<1<<"C:"
984  // <<CSCTriggerNumbering::chamberFromTriggerLabels(theSector,theSubsector, theStation, theTrigChamber)
985  // <<" a "<<n_clct_a<<" b "<<n_clct_b<<" ab "<<n_clct_a+n_clct_b;
986 }
#define LogDebug(id)
void retrieveGEMCoPads(const GEMCoPadDigiCollection *pads, unsigned id)
const unsigned theSector
std::map< int, std::pair< int, int > > cscHsToGemPadME1a_
int i
Definition: DBlmapReader.cc:9
bool do_gem_matching
Do GEM matching?
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
std::vector< CSCCorrelatedLCTDigi > readoutLCTs1a()
unsigned int match_trig_window_size
const unsigned theTrigChamber
void buildCoincidencePads(const GEMPadDigiCollection *out_pads, GEMCoPadDigiCollection &out_co_pads, CSCDetId csc_id)
bool runME11ILT_
GEM-CSC integrated local algorithm.
const unsigned theEndcap
std::map< int, std::pair< int, int > > cscHsToGemPadME1b_
U second(std::pair< T, U > const &p)
GEMPadsBX matchingGEMPads(const CSCCLCTDigi &cLCT, const GEMPadsBX &pads=GEMPadsBX(), enum ME11Part=ME1B, bool isCopad=false, bool first=true)
CSCCorrelatedLCTDigi allLCTs1a[MAX_LCT_BINS][15][2]
const unsigned theStation
static CSCTriggerGeomManager * get()
void correlateLCTsGEM(CSCALCTDigi bestALCT, CSCALCTDigi secondALCT, CSCCLCTDigi bestCLCT, CSCCLCTDigi secondCLCT, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2, int me, const GEMPadsBX &pads=GEMPadsBX(), const GEMPadsBX &copads=GEMPadsBX())
const unsigned theSubsector
std::map< int, std::pair< double, double > > gemRollToEtaLimits_
MuonDigiCollection< GEMDetId, GEMCoPadDigi > GEMCoPadDigiCollection
void printGEMTriggerPads(int minBX, int maxBx, bool iscopad=false)
std::vector< CSCALCTDigi > alctV
void matchGEMPads(enum ME11Part=ME1B)
void retrieveGEMPads(const GEMPadDigiCollection *pads, unsigned id)
const GEMGeometry * gem_g
const GEMChamber * chamber(GEMDetId id) const
Definition: GEMGeometry.cc:99
const CSCChamber * chamber(CSCDetId id) const
Return the chamber corresponding to given DetId.
Definition: CSCGeometry.cc:118
double b
Definition: hdecay.h:120
std::map< int, int > gemPadToCscHsME1a_
std::map< int, std::pair< int, int > > cscWgToGemRoll_
std::vector< CSCCorrelatedLCTDigi > readoutLCTs1b()
void createGEMRollEtaLUT(bool isEven)
std::unique_ptr< CSCAnodeLCTProcessor > alct
std::vector< CSCCLCTDigi > clctV1b
std::vector< CSCCLCTDigi > clctV1a
std::unique_ptr< CSCCathodeLCTProcessor > clct
CSCCorrelatedLCTDigi allLCTs1b[MAX_LCT_BINS][15][2]
std::map< int, int > gemPadToCscHsME1b_
tuple cout
Definition: gather_cfg.py:121
std::unique_ptr< CSCCathodeLCTProcessor > clct1a
const CSCGeometry * csc_g
static const double lut_wg_etaMin_etaMax_even[48][3]
static const double lut_wg_etaMin_etaMax_odd[48][3]
void CSCMotherboardME11GEM::setConfigParameters ( const CSCDBL1TPParameters conf)

Set configuration parameters obtained via EventSetup mechanism.

Definition at line 359 of file CSCMotherboardME11GEM.cc.

References CSCMotherboard::alct, CSCMotherboard::clct, and clct1a.

360 {
361  alct->setConfigParameters(conf);
362  clct->setConfigParameters(conf);
363  clct1a->setConfigParameters(conf);
364  // No config. parameters in DB for the TMB itself yet.
365 }
std::unique_ptr< CSCAnodeLCTProcessor > alct
std::unique_ptr< CSCCathodeLCTProcessor > clct
std::unique_ptr< CSCCathodeLCTProcessor > clct1a
void CSCMotherboardME11GEM::setCSCGeometry ( const CSCGeometry g)
inline

set CSC and GEM geometries for the matching needs

Definition at line 85 of file CSCMotherboardME11GEM.h.

References csc_g, and g.

Referenced by CSCTriggerPrimitivesBuilder::build().

85 { csc_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 CSCGeometry * csc_g
void CSCMotherboardME11GEM::setGEMGeometry ( const GEMGeometry g)
inline

Definition at line 86 of file CSCMotherboardME11GEM.h.

References g, and gem_g.

Referenced by CSCTriggerPrimitivesBuilder::build().

86 { 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 > CSCMotherboardME11GEM::sortLCTsByGEMDPhi ( int  bx,
enum ME11Part  me = ME1B 
)

Definition at line 1175 of file CSCMotherboardME11GEM.cc.

References allLCTs1a, allLCTs1b, i, CSCMotherboard::match_trig_window_size, max_me11_lcts, ME1A, python.multivaluedict::sort(), and CSCMotherboard::sortByGEMDphi().

Referenced by readoutLCTs(), and sortLCTsByGEMDPhi().

1176 {
1177 
1178  auto allLCTs(me==ME1A ? allLCTs1a : allLCTs1b);
1179  std::vector<CSCCorrelatedLCTDigi> LCTs;
1180  std::vector<CSCCorrelatedLCTDigi> tmpV;
1181  tmpV.clear();
1182  LCTs.clear();
1183  for (unsigned int mbx = 0; mbx < match_trig_window_size; mbx++)
1184  for (int i=0;i<2;i++)
1185  if (allLCTs[bx][mbx][i].isValid())
1186  LCTs.push_back(allLCTs[bx][mbx][i]);
1187 
1188  std::sort(LCTs.begin(), LCTs.end(), CSCMotherboard::sortByGEMDphi);
1189  tmpV = LCTs;
1190  if (tmpV.size() > max_me11_lcts) tmpV.erase(tmpV.begin()+max_me11_lcts, tmpV.end());
1191  return tmpV;
1192 }
int i
Definition: DBlmapReader.cc:9
static bool sortByGEMDphi(const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &)
unsigned int match_trig_window_size
CSCCorrelatedLCTDigi allLCTs1a[MAX_LCT_BINS][15][2]
CSCCorrelatedLCTDigi allLCTs1b[MAX_LCT_BINS][15][2]
std::vector< CSCCorrelatedLCTDigi > CSCMotherboardME11GEM::sortLCTsByGEMDPhi ( enum ME11Part  me = ME1B)

Definition at line 1206 of file CSCMotherboardME11GEM.cc.

References firstTwoLCTsInChamber_, CSCMotherboard::MAX_LCT_BINS, ME1A, ME1B, and sortLCTsByGEMDPhi().

1207 {
1208  std::vector<CSCCorrelatedLCTDigi> LCTs_final;
1209  LCTs_final.clear();
1210  for (int bx = 0; bx < MAX_LCT_BINS; bx++)
1211  {
1212  std::vector<CSCCorrelatedLCTDigi> LCTs1a;
1213  std::vector<CSCCorrelatedLCTDigi> LCTs1b;
1214  std::vector<CSCCorrelatedLCTDigi> LCTs_tmp;
1215  std::vector<CSCCorrelatedLCTDigi> LCTs_tmp1;
1216  LCTs1a = sortLCTsByGEMDPhi(bx, ME1A);
1217  LCTs1b = sortLCTsByGEMDPhi(bx, ME1B);
1218  std::vector<CSCCorrelatedLCTDigi>::iterator it1a = LCTs1a.begin();
1219  std::vector<CSCCorrelatedLCTDigi>::iterator it1b = LCTs1b.begin();
1220  LCTs_tmp.insert(LCTs_tmp.begin(), LCTs1b.begin(), LCTs1b.end());
1221  LCTs_tmp.insert(LCTs_tmp.end(), LCTs1a.begin(), LCTs1a.end());
1222  LCTs_tmp1 = sortLCTsByGEMDPhi(LCTs_tmp);//LCTs reduction per BX
1224  {
1225  std::vector<CSCCorrelatedLCTDigi>::iterator itp = LCTs_tmp1.begin();
1226  while (itp != LCTs_tmp1.end())
1227  {
1228  if (me==ME1B and it1b != LCTs1b.end() and *itp==*it1b)
1229  {
1230  LCTs_final.push_back(*it1b);
1231  it1b++;
1232  }
1233  if (me==ME1A and it1a != LCTs1a.end() and *itp==*it1a)
1234  {
1235  LCTs_final.push_back(*it1a);
1236  it1a++;
1237  }
1238  itp++;
1239  }
1240  }
1241  else {
1242  if (LCTs1a.size() and LCTs1b.size() and me==ME1A)
1243  LCTs_final.push_back(*LCTs1a.begin());
1244  else if (LCTs1a.size() and LCTs1b.size() and me==ME1B)
1245  LCTs_final.push_back(*LCTs1b.begin());
1246  else if (LCTs1a.size() and LCTs1b.size()==0 and me==ME1A)
1247  LCTs_final.insert(LCTs_final.end(), LCTs1a.begin(), LCTs1a.end());
1248  else if (LCTs1b.size() and LCTs1a.size()==0 and me==ME1B)
1249  LCTs_final.insert(LCTs_final.end(), LCTs1b.begin(), LCTs1b.end());
1250  }
1251  }
1252  return LCTs_final;
1253 }
std::vector< CSCCorrelatedLCTDigi > sortLCTsByGEMDPhi(int bx, enum ME11Part=ME1B)
std::vector< CSCCorrelatedLCTDigi > CSCMotherboardME11GEM::sortLCTsByGEMDPhi ( std::vector< CSCCorrelatedLCTDigi LCTs)

Definition at line 1194 of file CSCMotherboardME11GEM.cc.

References max_me11_lcts, python.multivaluedict::sort(), and CSCMotherboard::sortByGEMDphi().

1195 {
1196  std::vector<CSCCorrelatedLCTDigi> tmpV;
1197  tmpV.clear();
1198  std::sort(LCTs.begin(), LCTs.end(), CSCMotherboard::sortByGEMDphi);
1199  tmpV = LCTs;
1200  if (tmpV.size() > max_me11_lcts) tmpV.erase(tmpV.begin()+max_me11_lcts, tmpV.end());
1201  return tmpV;
1202 }
static bool sortByGEMDphi(const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &)
std::vector< CSCCorrelatedLCTDigi > CSCMotherboardME11GEM::sortLCTsByQuality ( int  bx,
enum ME11Part  me = ME1B 
)

Methods to sort the LCTs

Definition at line 1095 of file CSCMotherboardME11GEM.cc.

References allLCTs1a, allLCTs1b, i, CSCMotherboard::match_trig_window_size, max_me11_lcts, ME1A, python.multivaluedict::sort(), and CSCMotherboard::sortByQuality().

Referenced by readoutLCTs(), and sortLCTsByQuality().

1096 {
1097  auto allLCTs(me==ME1A ? allLCTs1a : allLCTs1b);
1098  std::vector<CSCCorrelatedLCTDigi> LCTs;
1099  std::vector<CSCCorrelatedLCTDigi> tmpV;
1100  tmpV.clear();
1101  LCTs.clear();
1102  for (unsigned int mbx = 0; mbx < match_trig_window_size; mbx++)
1103  for (int i=0;i<2;i++)
1104  if (allLCTs[bx][mbx][i].isValid())
1105  LCTs.push_back(allLCTs[bx][mbx][i]);
1106 
1107  std::sort(LCTs.begin(), LCTs.end(), CSCMotherboard::sortByQuality);
1108  tmpV = LCTs;
1109  if (tmpV.size()> max_me11_lcts) tmpV.erase(tmpV.begin()+max_me11_lcts, tmpV.end());
1110  return tmpV;
1111 }
int i
Definition: DBlmapReader.cc:9
unsigned int match_trig_window_size
CSCCorrelatedLCTDigi allLCTs1a[MAX_LCT_BINS][15][2]
CSCCorrelatedLCTDigi allLCTs1b[MAX_LCT_BINS][15][2]
static bool sortByQuality(const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &)
std::vector< CSCCorrelatedLCTDigi > CSCMotherboardME11GEM::sortLCTsByQuality ( enum ME11Part  me = ME1B)

Definition at line 1125 of file CSCMotherboardME11GEM.cc.

References firstTwoLCTsInChamber_, CSCMotherboard::MAX_LCT_BINS, ME1A, ME1B, and sortLCTsByQuality().

1126 {
1127  std::vector<CSCCorrelatedLCTDigi> LCTs_final;
1128  LCTs_final.clear();
1129  for (int bx = 0; bx < MAX_LCT_BINS; bx++)
1130  {
1131  std::vector<CSCCorrelatedLCTDigi> LCTs1a;
1132  std::vector<CSCCorrelatedLCTDigi> LCTs1b;
1133  std::vector<CSCCorrelatedLCTDigi> LCTs_tmp;
1134  std::vector<CSCCorrelatedLCTDigi> LCTs_tmp1;
1135  LCTs1a = sortLCTsByQuality(bx, ME1A);
1136  LCTs1b = sortLCTsByQuality(bx, ME1B);
1137  std::vector<CSCCorrelatedLCTDigi>::iterator it1a = LCTs1a.begin();
1138  std::vector<CSCCorrelatedLCTDigi>::iterator it1b = LCTs1b.begin();
1139  LCTs_tmp.insert(LCTs_tmp.begin(), LCTs1b.begin(), LCTs1b.end());
1140  LCTs_tmp.insert(LCTs_tmp.end(), LCTs1a.begin(), LCTs1a.end());
1141  LCTs_tmp1 = sortLCTsByQuality(LCTs_tmp);//LCTs reduction per BX
1143  {
1144  std::vector<CSCCorrelatedLCTDigi>::iterator itp = LCTs_tmp1.begin();
1145  for ( ; itp != LCTs_tmp1.end(); itp++)
1146  {
1147  if (me==ME1A and it1a != LCTs1a.end() and *itp==*it1a )
1148  {
1149  LCTs_final.push_back(*it1a);
1150  it1a++;
1151  }
1152  if (me==ME1B and it1b != LCTs1b.end() and *itp==*it1b)
1153  {
1154  LCTs_final.push_back(*it1b);
1155  it1b++;
1156  }
1157  }
1158  }
1159  else {
1160  if (LCTs1a.size() and LCTs1b.size() and me==ME1A)
1161  LCTs_final.push_back(*LCTs1a.begin());
1162  else if (LCTs1a.size() and LCTs1b.size() and me==ME1B)
1163  LCTs_final.push_back(*LCTs1b.begin());
1164  else if (LCTs1a.size() and LCTs1b.size()==0 and me==ME1A)
1165  LCTs_final.insert(LCTs_final.end(), LCTs1a.begin(), LCTs1a.end());
1166  else if (LCTs1b.size() and LCTs1a.size()==0 and me==ME1B)
1167  LCTs_final.insert(LCTs_final.end(), LCTs1b.begin(), LCTs1b.end());
1168  }
1169  }
1170  return LCTs_final;
1171 }
std::vector< CSCCorrelatedLCTDigi > sortLCTsByQuality(int bx, enum ME11Part=ME1B)
std::vector< CSCCorrelatedLCTDigi > CSCMotherboardME11GEM::sortLCTsByQuality ( std::vector< CSCCorrelatedLCTDigi LCTs)

Definition at line 1113 of file CSCMotherboardME11GEM.cc.

References max_me11_lcts, python.multivaluedict::sort(), and CSCMotherboard::sortByQuality().

1114 {
1115  std::vector<CSCCorrelatedLCTDigi> tmpV;
1116  tmpV.clear();
1117  std::sort(LCTs.begin(), LCTs.end(), CSCMotherboard::sortByQuality);
1118  tmpV = LCTs;
1119  if (tmpV.size()> max_me11_lcts) tmpV.erase(tmpV.begin()+max_me11_lcts, tmpV.end());
1120  return tmpV;
1121 }
static bool sortByQuality(const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &)

Member Data Documentation

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

Definition at line 167 of file CSCMotherboardME11GEM.h.

Referenced by getALCTs1b(), and run().

CSCCorrelatedLCTDigi CSCMotherboardME11GEM::allLCTs1a[MAX_LCT_BINS][15][2]
private

Definition at line 111 of file CSCMotherboardME11GEM.h.

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

CSCCorrelatedLCTDigi CSCMotherboardME11GEM::allLCTs1b[MAX_LCT_BINS][15][2]
private

Container for first correlated LCT in ME1a. Container for second correlated LCT in ME1a. for the case when more than 2 LCTs/BX are allowed; maximum match window = 15

Definition at line 110 of file CSCMotherboardME11GEM.h.

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

bool CSCMotherboardME11GEM::buildLCTfromALCTandGEM_ME1a_
private

Definition at line 247 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM(), and run().

bool CSCMotherboardME11GEM::buildLCTfromALCTandGEM_ME1b_
private

Definition at line 248 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM(), and run().

bool CSCMotherboardME11GEM::buildLCTfromCLCTandGEM_ME1a_
private

Definition at line 249 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM(), and run().

bool CSCMotherboardME11GEM::buildLCTfromCLCTandGEM_ME1b_
private

Definition at line 250 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM(), and run().

std::unique_ptr<CSCCathodeLCTProcessor> CSCMotherboardME11GEM::clct1a

additional Cathode LCT processor for ME1a

Definition at line 77 of file CSCMotherboardME11GEM.h.

Referenced by CSCTriggerPrimitivesBuilder::build(), clear(), CSCMotherboardME11GEM(), run(), and setConfigParameters().

bool CSCMotherboardME11GEM::clct_to_alct
private

if true: use regular CLCT-to-ALCT matching in TMB if false: do ALCT-to-CLCT matching

Definition at line 180 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM().

std::vector<CSCCLCTDigi> CSCMotherboardME11GEM::clctV1a
private

Definition at line 169 of file CSCMotherboardME11GEM.h.

Referenced by getCLCTs1a(), and run().

std::vector<CSCCLCTDigi> CSCMotherboardME11GEM::clctV1b
private

Definition at line 168 of file CSCMotherboardME11GEM.h.

Referenced by getCLCTs1b(), and run().

GEMPads CSCMotherboardME11GEM::coPads_
private

Definition at line 284 of file CSCMotherboardME11GEM.h.

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

bool CSCMotherboardME11GEM::correctLCTtimingWithGEM_
private

Definition at line 256 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM(), and run().

const CSCGeometry* CSCMotherboardME11GEM::csc_g
private

Definition at line 212 of file CSCMotherboardME11GEM.h.

Referenced by run(), and setCSCGeometry().

std::map<int,std::pair<int,int> > CSCMotherboardME11GEM::cscHsToGemPadME1a_
private

Definition at line 279 of file CSCMotherboardME11GEM.h.

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

std::map<int,std::pair<int,int> > CSCMotherboardME11GEM::cscHsToGemPadME1b_
private

Definition at line 280 of file CSCMotherboardME11GEM.h.

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

std::map<int,std::pair<int,int> > CSCMotherboardME11GEM::cscWgToGemRoll_
private

Definition at line 274 of file CSCMotherboardME11GEM.h.

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

bool CSCMotherboardME11GEM::debug_gem_dphi
private

Definition at line 218 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM().

bool CSCMotherboardME11GEM::debug_gem_matching
private

Definition at line 216 of file CSCMotherboardME11GEM.h.

Referenced by correlateLCTsGEM(), CSCMotherboardME11GEM(), and run().

bool CSCMotherboardME11GEM::debug_luts
private

Definition at line 217 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM(), and run().

bool CSCMotherboardME11GEM::disableME1a
private

Definition at line 98 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM(), and getLCTs1a().

bool CSCMotherboardME11GEM::do_gem_matching
private

Do GEM matching?

Definition at line 195 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM(), and run().

bool CSCMotherboardME11GEM::doLCTGhostBustingWithGEMs_
private

Definition at line 253 of file CSCMotherboardME11GEM.h.

Referenced by correlateLCTsGEM(), and CSCMotherboardME11GEM().

bool CSCMotherboardME11GEM::drop_used_clcts
private

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

Definition at line 184 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM(), and run().

bool CSCMotherboardME11GEM::dropLowQualityALCTsNoGEMs_ME1a_
private

Definition at line 243 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM().

bool CSCMotherboardME11GEM::dropLowQualityALCTsNoGEMs_ME1b_
private

Definition at line 244 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM().

bool CSCMotherboardME11GEM::dropLowQualityCLCTsNoGEMs_ME1a_
private

Definition at line 241 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM(), and run().

bool CSCMotherboardME11GEM::dropLowQualityCLCTsNoGEMs_ME1b_
private

Definition at line 242 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM(), and run().

bool CSCMotherboardME11GEM::firstTwoLCTsInChamber_
private
bool CSCMotherboardME11GEM::gangedME1a
private

Definition at line 98 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM(), and doesALCTCrossCLCT().

bool CSCMotherboardME11GEM::gem_clear_nomatch_lcts
private

whether to throw out GEM-fiducial LCTs that have no gem match

Definition at line 210 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM().

const GEMGeometry* CSCMotherboardME11GEM::gem_g
private
int CSCMotherboardME11GEM::gem_match_delta_bx
private

delta BX for GEM pads matching

Definition at line 203 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM().

double CSCMotherboardME11GEM::gem_match_delta_eta
private

Definition at line 200 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM().

double CSCMotherboardME11GEM::gem_match_delta_phi_even
private

Definition at line 199 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM().

double CSCMotherboardME11GEM::gem_match_delta_phi_odd
private

GEM matching dphi and deta.

Definition at line 198 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM().

double CSCMotherboardME11GEM::gem_match_max_eta
private

Definition at line 207 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM().

double CSCMotherboardME11GEM::gem_match_min_eta
private

min eta of LCT for which we require GEM match (we don't throw out LCTs below this min eta)

Definition at line 206 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM().

std::vector<GEMCoPadDigi> CSCMotherboardME11GEM::gemCoPadV
private

Definition at line 170 of file CSCMotherboardME11GEM.h.

Referenced by buildCoincidencePads(), and readoutCoPads().

std::map<int,int> CSCMotherboardME11GEM::gemPadToCscHsME1a_
private

Definition at line 277 of file CSCMotherboardME11GEM.h.

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

std::map<int,int> CSCMotherboardME11GEM::gemPadToCscHsME1b_
private

Definition at line 278 of file CSCMotherboardME11GEM.h.

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

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

Definition at line 273 of file CSCMotherboardME11GEM.h.

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

const double CSCMotherboardME11GEM::lut_pt_vs_dphi_gemcsc
staticprivate
Initial value:
= {
{3, 0.03971647, 0.01710244},
{5, 0.02123785, 0.00928431},
{7, 0.01475524, 0.00650928},
{10, 0.01023299, 0.00458796},
{15, 0.00689220, 0.00331313},
{20, 0.00535176, 0.00276152},
{30, 0.00389050, 0.00224959},
{40, 0.00329539, 0.00204670}}

Definition at line 93 of file CSCMotherboardME11GEM.h.

const double CSCMotherboardME11GEM::lut_wg_etaMin_etaMax_even
staticprivate

Definition at line 95 of file CSCMotherboardME11GEM.h.

Referenced by run().

const double CSCMotherboardME11GEM::lut_wg_etaMin_etaMax_odd
staticprivate

Definition at line 94 of file CSCMotherboardME11GEM.h.

Referenced by run().

const int CSCMotherboardME11GEM::lut_wg_vs_hs_me1a
staticprivate
Initial value:
= {
{0, 95},{0, 95},{0, 95},{0, 95},{0, 95},
{0, 95},{0, 95},{0, 95},{0, 95},{0, 95},
{0, 95},{0, 95},{0, 77},{0, 61},{0, 39},
{0, 22},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
{-1,-1},{-1,-1},{-1,-1} }

Definition at line 91 of file CSCMotherboardME11GEM.h.

Referenced by constructLCTsGEM(), and doesALCTCrossCLCT().

const int CSCMotherboardME11GEM::lut_wg_vs_hs_me1ag
staticprivate
Initial value:
= {
{0, 31},{0, 31},{0, 31},{0, 31},{0, 31},
{0, 31},{0, 31},{0, 31},{0, 31},{0, 31},
{0, 31},{0, 31},{0, 31},{0, 31},{0, 31},
{0, 22},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
{-1,-1},{-1,-1},{-1,-1} }

Definition at line 92 of file CSCMotherboardME11GEM.h.

Referenced by doesALCTCrossCLCT().

const int CSCMotherboardME11GEM::lut_wg_vs_hs_me1b
staticprivate
Initial value:
= {
{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
{100, 127},{73, 127},{47, 127},{22, 127},{0, 127},
{0, 127},{0, 127},{0, 127},{0, 127},{0, 127},
{0, 127},{0, 127},{0, 127},{0, 127},{0, 127},
{0, 127},{0, 127},{0, 127},{0, 127},{0, 127},
{0, 127},{0, 127},{0, 127},{0, 127},{0, 127},
{0, 127},{0, 127},{0, 127},{0, 127},{0, 127},
{0, 127},{0, 127},{0, 127},{0, 127},{0, 105},
{0, 93},{0, 78},{0, 63} }

Definition at line 90 of file CSCMotherboardME11GEM.h.

Referenced by constructLCTsGEM(), and doesALCTCrossCLCT().

bool CSCMotherboardME11GEM::match_earliest_alct_me11_only
private

Definition at line 175 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM().

bool CSCMotherboardME11GEM::match_earliest_clct_me11_only
private

Definition at line 176 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM(), and run().

unsigned int CSCMotherboardME11GEM::max_me11_lcts
private

maximum lcts per BX in ME11: 2, 3, 4 or 999

Definition at line 189 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM(), run(), sortLCTsByGEMDPhi(), and sortLCTsByQuality().

int CSCMotherboardME11GEM::maxDeltaBXCoPad_
private

Definition at line 233 of file CSCMotherboardME11GEM.h.

Referenced by run().

int CSCMotherboardME11GEM::maxDeltaBXCoPadEven_
private

Definition at line 235 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM(), and run().

int CSCMotherboardME11GEM::maxDeltaBXCoPadOdd_
private

Definition at line 237 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM(), and run().

int CSCMotherboardME11GEM::maxDeltaBXInCoPad_
private

Definition at line 221 of file CSCMotherboardME11GEM.h.

Referenced by buildCoincidencePads(), and CSCMotherboardME11GEM().

int CSCMotherboardME11GEM::maxDeltaBXPad_
private

Definition at line 225 of file CSCMotherboardME11GEM.h.

Referenced by retrieveGEMCoPads(), retrieveGEMPads(), and run().

int CSCMotherboardME11GEM::maxDeltaBXPadEven_
private

Definition at line 227 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM(), and run().

int CSCMotherboardME11GEM::maxDeltaBXPadOdd_
private

Definition at line 229 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM(), and run().

int CSCMotherboardME11GEM::maxDeltaPadCoPad_
private

Definition at line 234 of file CSCMotherboardME11GEM.h.

Referenced by matchingGEMPads(), and run().

int CSCMotherboardME11GEM::maxDeltaPadCoPadEven_
private

Definition at line 236 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM(), and run().

int CSCMotherboardME11GEM::maxDeltaPadCoPadOdd_
private

Definition at line 238 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM(), and run().

int CSCMotherboardME11GEM::maxDeltaPadInCoPad_
private

Definition at line 222 of file CSCMotherboardME11GEM.h.

Referenced by buildCoincidencePads(), and CSCMotherboardME11GEM().

int CSCMotherboardME11GEM::maxDeltaPadPad_
private

Definition at line 226 of file CSCMotherboardME11GEM.h.

Referenced by matchingGEMPads(), and run().

int CSCMotherboardME11GEM::maxDeltaPadPadEven_
private

Definition at line 228 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM(), and run().

int CSCMotherboardME11GEM::maxDeltaPadPadOdd_
private

Definition at line 230 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM(), and run().

GEMPads CSCMotherboardME11GEM::pads_
private

Definition at line 283 of file CSCMotherboardME11GEM.h.

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

int CSCMotherboardME11GEM::pref[MAX_LCT_BINS]
private

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

Definition at line 173 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM(), and run().

bool CSCMotherboardME11GEM::promoteALCTGEMpattern_
private

Definition at line 265 of file CSCMotherboardME11GEM.h.

Referenced by constructLCTsGEM(), and CSCMotherboardME11GEM().

bool CSCMotherboardME11GEM::promoteALCTGEMquality_
private

Definition at line 268 of file CSCMotherboardME11GEM.h.

Referenced by constructLCTsGEM(), and CSCMotherboardME11GEM().

bool CSCMotherboardME11GEM::promoteCLCTGEMquality_ME1a_
private

Definition at line 269 of file CSCMotherboardME11GEM.h.

Referenced by constructLCTsGEM(), and CSCMotherboardME11GEM().

bool CSCMotherboardME11GEM::promoteCLCTGEMquality_ME1b_
private

Definition at line 270 of file CSCMotherboardME11GEM.h.

Referenced by constructLCTsGEM(), and CSCMotherboardME11GEM().

bool CSCMotherboardME11GEM::runME11ILT_
private

GEM-CSC integrated local algorithm.

Definition at line 192 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM(), and run().

bool CSCMotherboardME11GEM::smartME1aME1b
private

SLHC: special configuration parameters for ME11 treatment.

Definition at line 98 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM(), and run().

unsigned int CSCMotherboardME11GEM::tmb_cross_bx_algo
private

Definition at line 186 of file CSCMotherboardME11GEM.h.

Referenced by CSCMotherboardME11GEM(), readoutLCTs(), and run().

bool CSCMotherboardME11GEM::useOldLCTDataFormat_
private

Definition at line 259 of file CSCMotherboardME11GEM.h.

Referenced by correlateLCTsGEM(), and CSCMotherboardME11GEM().