CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes
CSCCathodeLCTProcessor Class Reference

#include <CSCCathodeLCTProcessor.h>

Inheritance diagram for CSCCathodeLCTProcessor:
CSCBaseboard CSCUpgradeCathodeLCTProcessor

Public Member Functions

void clear ()
 
 CSCCathodeLCTProcessor ()
 
 CSCCathodeLCTProcessor (unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)
 
CSCCLCTDigi getBestCLCT (int bx) const
 
std::vector< CSCCLCTDigigetCLCTs () const
 
CSCCLCTDigi getSecondCLCT (int bx) const
 
std::vector< int > preTriggerBXs () const
 
std::vector< CSCCLCTPreTriggerDigipreTriggerDigis () const
 
std::vector< CSCCLCTPreTriggerDigipreTriggerDigisME1a () const
 
std::vector< CSCCLCTPreTriggerDigipreTriggerDigisME1b () const
 
std::vector< CSCCLCTDigireadoutCLCTs (int nMaxCLCTs=CSCConstants::MAX_CLCTS_READOUT) const
 
std::vector< CSCCLCTDigireadoutCLCTsME1a (int nMaxCLCTs=CSCConstants::MAX_CLCTS_READOUT) const
 
std::vector< CSCCLCTDigireadoutCLCTsME1b (int nMaxCLCTs=CSCConstants::MAX_CLCTS_READOUT) const
 
std::vector< CSCCLCTDigirun (const CSCComparatorDigiCollection *compdc)
 
void run (const std::vector< int > halfstrip[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS])
 
void setConfigParameters (const CSCDBL1TPParameters *conf)
 
- Public Member Functions inherited from CSCBaseboard
 CSCBaseboard ()
 
 CSCBaseboard (unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)
 
std::string getCSCName () const
 
void setCSCGeometry (const CSCGeometry *g)
 
virtual ~CSCBaseboard ()=default
 

Protected Types

enum  CLCT_CompCode { INVALID_HALFSTRIP = 65535 }
 
enum  CLCT_INDICES {
  CLCT_PATTERN, CLCT_BEND, CLCT_STRIP, CLCT_BX,
  CLCT_STRIP_TYPE, CLCT_QUALITY, CLCT_CFEB, CLCT_NUM_QUANTITIES = 7
}
 
typedef unsigned int PulseArray[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS]
 

Protected Member Functions

void checkConfigParameters ()
 
void cleanComparatorContainer (CSCCLCTDigi::ComparatorContainer &compHits) const
 
void dumpConfigParams () const
 
void dumpDigis (const std::vector< int > strip[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS], const int nStrips) const
 
virtual std::vector< CSCCLCTDigifindLCTs (const std::vector< int > halfstrip[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS])
 
bool getDigis (const CSCComparatorDigiCollection *compdc)
 
void getDigis (const CSCComparatorDigiCollection *compdc, const CSCDetId &id)
 
void markBusyKeys (const int best_hstrip, const int best_patid, int quality[CSCConstants::NUM_HALF_STRIPS_7CFEBS])
 
bool patternFinding (const PulseArray pulse, const int nStrips, const unsigned int bx_time, std::map< int, std::map< int, CSCCLCTDigi::ComparatorContainer > > &hits_in_patterns)
 
virtual bool preTrigger (const PulseArray pulse, const int start_bx, int &first_bx)
 
void pulseExtension (const std::vector< int > time[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS], const int nStrips, PulseArray pulse)
 
void readComparatorDigis (std::vector< int > halfstrip[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS])
 
void setDefaultConfigParameters ()
 
- Protected Member Functions inherited from CSCBaseboard
void checkConfigParameters (unsigned int &var, const unsigned int var_max, const unsigned int var_def, const std::string &var_str)
 

Protected Attributes

unsigned int best_pid [CSCConstants::NUM_HALF_STRIPS_7CFEBS]
 
CSCPatternBank::CLCTPatterns clct_pattern_ = {}
 
CSCCLCTDigi CLCTContainer_ [CSCConstants::MAX_CLCT_TBINS][CSCConstants::MAX_CLCTS_PER_PROCESSOR]
 
std::vector< CSCComparatorDigidigiV [CSCConstants::NUM_LAYERS]
 
unsigned int drift_delay
 
int early_tbins
 
unsigned int fifo_pretrig
 
unsigned int fifo_tbins
 
int first_bx_corrected [CSCConstants::NUM_HALF_STRIPS_7CFEBS]
 
unsigned int hit_persist
 
PulseArray hitsCLCT [99]
 
bool ispretrig [CSCConstants::NUM_HALF_STRIPS_7CFEBS]
 
unsigned int min_separation
 
unsigned int nhits [CSCConstants::NUM_HALF_STRIPS_7CFEBS]
 
unsigned int nplanes_hit_pattern
 
unsigned int nplanes_hit_pretrig
 
int numStrips
 
unsigned int pid_thresh_pretrig
 
bool readout_earliest_2
 
int stagger [CSCConstants::NUM_LAYERS]
 
int start_bx_shift
 
std::vector< int > thePreTriggerBXs
 
std::vector< CSCCLCTPreTriggerDigithePreTriggerDigis
 
unsigned int tmb_l1a_window_size
 
bool use_comparator_codes_
 
bool use_run3_patterns_
 
- Protected Attributes inherited from CSCBaseboard
unsigned int alctClctOffset_
 
edm::ParameterSet alctParams_
 
edm::ParameterSet clctParams_
 
edm::ParameterSet commonParams_
 
const CSCChambercscChamber_
 
const CSCGeometrycscGeometry_
 
CSCDetId cscId_
 
bool disableME1a_
 
bool enableAlctSLHC_
 
bool gangedME1a_
 
int infoV
 
bool isME11_
 
bool isSLHC_
 
bool runME11ILT_
 
bool runME11Up_
 
bool runME21ILT_
 
bool runME21Up_
 
bool runME31Up_
 
bool runME41Up_
 
unsigned theChamber
 
std::string theCSCName_
 
const unsigned theEndcap
 
unsigned theRegion
 
unsigned theRing
 
const unsigned theSector
 
const unsigned theStation
 
const unsigned theSubsector
 
const unsigned theTrigChamber
 
edm::ParameterSet tmbParams_
 

Static Protected Attributes

static const unsigned int def_drift_delay = 2
 
static const unsigned int def_fifo_pretrig = 7
 
static const unsigned int def_fifo_tbins = 12
 
static const unsigned int def_hit_persist = 6
 
static const unsigned int def_min_separation = 10
 
static const unsigned int def_nplanes_hit_pattern = 4
 
static const unsigned int def_nplanes_hit_pretrig = 2
 
static const unsigned int def_pid_thresh_pretrig = 2
 
static const unsigned int def_tmb_l1a_window_size = 7
 

Detailed Description

This class simulates the functionality of the cathode LCT card. It is run by the MotherBoard and returns up to two CathodeLCTs. It can be run either in a test mode, where it is passed arrays of halfstrip times, or in normal mode where it determines the time and comparator information from the comparator digis.

The CathodeLCTs only come halfstrip flavors

Date
May 2001 Removed the card boundaries. Changed the Pretrigger to emulate the hardware electronic logic. Also changed the keylayer to be the 4th layer in a chamber instead of the 3rd layer from the interaction region. The code is a more realistic simulation of hardware LCT logic now. -Jason Mumford.
Author
Benn Tannenbaum UCLA 13 July 1999 benn@.nosp@m.phys.nosp@m.ics.u.nosp@m.cla..nosp@m.edu Numerous later improvements by Jason Mumford and Slava Valuev (see cvs in ORCA). Porting from ORCA by S. Valuev (Slava.nosp@m..Val.nosp@m.uev@c.nosp@m.ern..nosp@m.ch), May 2006.

Updates for high pileup running by Vadim Khotilovich (TAMU), December 2012

Updates for integrated local trigger with GEMs by Sven Dildick (TAMU) and Tao Huang (TAMU), April 2015

Removing usage of outdated class CSCTriggerGeometry by Sven Dildick (TAMU)

Definition at line 40 of file CSCCathodeLCTProcessor.h.

Member Typedef Documentation

◆ PulseArray

typedef unsigned int CSCCathodeLCTProcessor::PulseArray[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS]
protected

Definition at line 101 of file CSCCathodeLCTProcessor.h.

Member Enumeration Documentation

◆ CLCT_CompCode

Enumerator
INVALID_HALFSTRIP 

Definition at line 126 of file CSCCathodeLCTProcessor.h.

126 { INVALID_HALFSTRIP = 65535 };

◆ CLCT_INDICES

Enumerator
CLCT_PATTERN 
CLCT_BEND 
CLCT_STRIP 
CLCT_BX 
CLCT_STRIP_TYPE 
CLCT_QUALITY 
CLCT_CFEB 
CLCT_NUM_QUANTITIES 

Definition at line 159 of file CSCCathodeLCTProcessor.h.

159  {
160  CLCT_PATTERN,
161  CLCT_BEND,
162  CLCT_STRIP,
163  CLCT_BX,
165  CLCT_QUALITY,
166  CLCT_CFEB,
168  };

Constructor & Destructor Documentation

◆ CSCCathodeLCTProcessor() [1/2]

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

Normal constructor.

Definition at line 21 of file CSCCathodeLCTProcessor.cc.

27  : CSCBaseboard(endcap, station, sector, subsector, chamber, conf) {
28  static std::atomic<bool> config_dumped{false};
29 
30  // CLCT configuration parameters.
31  fifo_tbins = clctParams_.getParameter<unsigned int>("clctFifoTbins");
32  hit_persist = clctParams_.getParameter<unsigned int>("clctHitPersist");
33  drift_delay = clctParams_.getParameter<unsigned int>("clctDriftDelay");
34  nplanes_hit_pretrig = clctParams_.getParameter<unsigned int>("clctNplanesHitPretrig");
35  nplanes_hit_pattern = clctParams_.getParameter<unsigned int>("clctNplanesHitPattern");
36 
37  // Not used yet.
38  fifo_pretrig = clctParams_.getParameter<unsigned int>("clctFifoPretrig");
39 
40  pid_thresh_pretrig = clctParams_.getParameter<unsigned int>("clctPidThreshPretrig");
41  min_separation = clctParams_.getParameter<unsigned int>("clctMinSeparation");
42 
43  start_bx_shift = clctParams_.getParameter<int>("clctStartBxShift");
44 
45  // Motherboard parameters: common for all configurations.
46  tmb_l1a_window_size = // Common to CLCT and TMB
47  tmbParams_.getParameter<unsigned int>("tmbL1aWindowSize");
48 
49  // separate handle for early time bins
50  early_tbins = tmbParams_.getParameter<int>("tmbEarlyTbins");
51  if (early_tbins < 0)
53 
54  // wether to readout only the earliest two LCTs in readout window
55  readout_earliest_2 = tmbParams_.getParameter<bool>("tmbReadoutEarliest2");
56 
57  // Verbosity level, set to 0 (no print) by default.
58  infoV = clctParams_.getParameter<int>("verbosity");
59 
60  use_run3_patterns_ = clctParams_.getParameter<bool>("useRun3Patterns");
61 
62  use_comparator_codes_ = clctParams_.getParameter<bool>("useComparatorCodes");
63 
64  // Check and print configuration parameters.
66  if ((infoV > 0) && !config_dumped) {
68  config_dumped = true;
69  }
70 
71  numStrips = 0; // Will be set later.
72  // Provisional, but should be OK for all stations except ME1.
73  for (int i_layer = 0; i_layer < CSCConstants::NUM_LAYERS; i_layer++) {
74  if ((i_layer + 1) % 2 == 0)
75  stagger[i_layer] = 0;
76  else
77  stagger[i_layer] = 1;
78  }
79 
80  // which patterns should we use?
81  if (use_run3_patterns_) {
83  } else {
85  }
86 
87  thePreTriggerDigis.clear();
88 }

References checkConfigParameters(), CSCConstants::CLCT_EMUL_TIME_OFFSET, clct_pattern_, CSCPatternBank::clct_pattern_legacy_, CSCPatternBank::clct_pattern_run3_, CSCBaseboard::clctParams_, drift_delay, dumpConfigParams(), early_tbins, fifo_pretrig, fifo_tbins, edm::ParameterSet::getParameter(), hit_persist, CSCBaseboard::infoV, min_separation, nplanes_hit_pattern, nplanes_hit_pretrig, CSCConstants::NUM_LAYERS, numStrips, pid_thresh_pretrig, readout_earliest_2, stagger, start_bx_shift, thePreTriggerDigis, tmb_l1a_window_size, CSCBaseboard::tmbParams_, use_comparator_codes_, and use_run3_patterns_.

◆ CSCCathodeLCTProcessor() [2/2]

CSCCathodeLCTProcessor::CSCCathodeLCTProcessor ( )

Default constructor. Used for testing.

Definition at line 90 of file CSCCathodeLCTProcessor.cc.

90  : CSCBaseboard() {
91  // constructor for debugging.
92  static std::atomic<bool> config_dumped{false};
93 
94  // CLCT configuration parameters.
96  infoV = 2;
97 
98  early_tbins = 4;
99 
100  start_bx_shift = 0;
101 
102  // Check and print configuration parameters.
104  if (!config_dumped) {
106  config_dumped = true;
107  }
108 
110  // Should be OK for all stations except ME1.
111  for (int i_layer = 0; i_layer < CSCConstants::NUM_LAYERS; i_layer++) {
112  if ((i_layer + 1) % 2 == 0)
113  stagger[i_layer] = 0;
114  else
115  stagger[i_layer] = 1;
116  }
117 
118  thePreTriggerDigis.clear();
119 }

References checkConfigParameters(), dumpConfigParams(), early_tbins, CSCBaseboard::infoV, CSCConstants::MAX_NUM_STRIPS, CSCConstants::NUM_LAYERS, numStrips, setDefaultConfigParameters(), stagger, start_bx_shift, and thePreTriggerDigis.

Member Function Documentation

◆ checkConfigParameters()

void CSCCathodeLCTProcessor::checkConfigParameters ( )
protected

Make sure that the parameter values are within the allowed range.

Definition at line 155 of file CSCCathodeLCTProcessor.cc.

155  {
156  // Make sure that the parameter values are within the allowed range.
157 
158  // Max expected values.
159  static const unsigned int max_fifo_tbins = 1 << 5;
160  static const unsigned int max_fifo_pretrig = 1 << 5;
161  static const unsigned int max_hit_persist = 1 << 4;
162  static const unsigned int max_drift_delay = 1 << 2;
163  static const unsigned int max_nplanes_hit_pretrig = 1 << 3;
164  static const unsigned int max_nplanes_hit_pattern = 1 << 3;
165  static const unsigned int max_pid_thresh_pretrig = 1 << 4;
166  static const unsigned int max_min_separation = CSCConstants::NUM_HALF_STRIPS_7CFEBS;
167  static const unsigned int max_tmb_l1a_window_size = 1 << 4;
168 
169  // Checks.
170  CSCBaseboard::checkConfigParameters(fifo_tbins, max_fifo_tbins, def_fifo_tbins, "fifo_tbins");
171  CSCBaseboard::checkConfigParameters(fifo_pretrig, max_fifo_pretrig, def_fifo_pretrig, "fifo_pretrig");
172  CSCBaseboard::checkConfigParameters(hit_persist, max_hit_persist, def_hit_persist, "hit_persist");
173  CSCBaseboard::checkConfigParameters(drift_delay, max_drift_delay, def_drift_delay, "drift_delay");
175  nplanes_hit_pretrig, max_nplanes_hit_pretrig, def_nplanes_hit_pretrig, "nplanes_hit_pretrig");
177  nplanes_hit_pattern, max_nplanes_hit_pattern, def_nplanes_hit_pattern, "nplanes_hit_pattern");
179  pid_thresh_pretrig, max_pid_thresh_pretrig, def_pid_thresh_pretrig, "pid_thresh_pretrig");
180  CSCBaseboard::checkConfigParameters(min_separation, max_min_separation, def_min_separation, "min_separation");
182  tmb_l1a_window_size, max_tmb_l1a_window_size, def_tmb_l1a_window_size, "tmb_l1a_window_size");
183 }

References CSCBaseboard::checkConfigParameters(), def_drift_delay, def_fifo_pretrig, def_fifo_tbins, def_hit_persist, def_min_separation, def_nplanes_hit_pattern, def_nplanes_hit_pretrig, def_pid_thresh_pretrig, def_tmb_l1a_window_size, drift_delay, fifo_pretrig, fifo_tbins, hit_persist, min_separation, nplanes_hit_pattern, nplanes_hit_pretrig, CSCConstants::NUM_HALF_STRIPS_7CFEBS, pid_thresh_pretrig, and tmb_l1a_window_size.

Referenced by CSCCathodeLCTProcessor(), and setConfigParameters().

◆ cleanComparatorContainer()

void CSCCathodeLCTProcessor::cleanComparatorContainer ( CSCCLCTDigi::ComparatorContainer compHits) const
protected

Definition at line 992 of file CSCCathodeLCTProcessor.cc.

992  {
993  for (auto& p : compHits) {
994  p.erase(std::remove_if(
995  p.begin(), p.end(), [](unsigned i) -> bool { return i == CSCCathodeLCTProcessor::INVALID_HALFSTRIP; }),
996  p.end());
997  }
998 }

References mps_fire::i, INVALID_HALFSTRIP, and AlCaHLTBitMon_ParallelJobs::p.

Referenced by CSCUpgradeCathodeLCTProcessor::findLCTs(), and findLCTs().

◆ clear()

void CSCCathodeLCTProcessor::clear ( void  )

Clears the LCT containers.

Definition at line 185 of file CSCCathodeLCTProcessor.cc.

185  {
186  thePreTriggerDigis.clear();
187  thePreTriggerBXs.clear();
188  for (int bx = 0; bx < CSCConstants::MAX_CLCT_TBINS; bx++) {
189  for (int iCLCT = 0; iCLCT < CSCConstants::MAX_CLCTS_PER_PROCESSOR; iCLCT++) {
190  CLCTContainer_[bx][iCLCT].clear();
191  }
192  }
193 }

References l1GtPatternGenerator_cfi::bx, CLCTContainer_, CSCCLCTDigi::clear(), CSCConstants::MAX_CLCT_TBINS, CSCConstants::MAX_CLCTS_PER_PROCESSOR, thePreTriggerBXs, and thePreTriggerDigis.

◆ dumpConfigParams()

void CSCCathodeLCTProcessor::dumpConfigParams ( ) const
protected

Dump CLCT configuration parameters.

Definition at line 1004 of file CSCCathodeLCTProcessor.cc.

1004  {
1005  std::ostringstream strm;
1006  strm << "\n";
1007  strm << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n";
1008  strm << "+ CLCT configuration parameters: +\n";
1009  strm << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n";
1010  strm << " fifo_tbins [total number of time bins in DAQ readout] = " << fifo_tbins << "\n";
1011  strm << " fifo_pretrig [start time of cathode raw hits in DAQ readout] = " << fifo_pretrig << "\n";
1012  strm << " hit_persist [duration of signal pulse, in 25 ns bins] = " << hit_persist << "\n";
1013  strm << " drift_delay [time after pre-trigger before TMB latches LCTs] = " << drift_delay << "\n";
1014  strm << " nplanes_hit_pretrig [min. number of layers hit for pre-trigger] = " << nplanes_hit_pretrig << "\n";
1015  strm << " nplanes_hit_pattern [min. number of layers hit for trigger] = " << nplanes_hit_pattern << "\n";
1016  strm << " pid_thresh_pretrig [lower threshold on pattern id] = " << pid_thresh_pretrig << "\n";
1017  strm << " min_separation [region of busy key strips] = " << min_separation << "\n";
1018  strm << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n";
1019  LogDebug("CSCCathodeLCTProcessor") << strm.str();
1020 }

References drift_delay, fifo_pretrig, fifo_tbins, hit_persist, LogDebug, min_separation, nplanes_hit_pattern, nplanes_hit_pretrig, and pid_thresh_pretrig.

Referenced by CSCCathodeLCTProcessor(), run(), and setConfigParameters().

◆ dumpDigis()

void CSCCathodeLCTProcessor::dumpDigis ( const std::vector< int >  strip[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS],
const int  nStrips 
) const
protected

Dump half-strip digis

Definition at line 1023 of file CSCCathodeLCTProcessor.cc.

1025  {
1026  LogDebug("CSCCathodeLCTProcessor") << CSCDetId::chamberName(theEndcap, theStation, theRing, theChamber)
1027  << " strip type: half-strip, nStrips " << nStrips;
1028 
1029  std::ostringstream strstrm;
1030  for (int i_strip = 0; i_strip < nStrips; i_strip++) {
1031  if (i_strip % 10 == 0) {
1032  if (i_strip < 100)
1033  strstrm << i_strip / 10;
1034  else
1035  strstrm << (i_strip - 100) / 10;
1036  } else
1037  strstrm << " ";
1038  if ((i_strip + 1) % CSCConstants::NUM_HALF_STRIPS_PER_CFEB == 0)
1039  strstrm << " ";
1040  }
1041  strstrm << "\n";
1042  for (int i_strip = 0; i_strip < nStrips; i_strip++) {
1043  strstrm << i_strip % 10;
1044  if ((i_strip + 1) % CSCConstants::NUM_HALF_STRIPS_PER_CFEB == 0)
1045  strstrm << " ";
1046  }
1047  for (int i_layer = 0; i_layer < CSCConstants::NUM_LAYERS; i_layer++) {
1048  strstrm << "\n";
1049  for (int i_strip = 0; i_strip < nStrips; i_strip++) {
1050  if (!strip[i_layer][i_strip].empty()) {
1051  std::vector<int> bx_times = strip[i_layer][i_strip];
1052  // Dump only the first in time.
1053  strstrm << std::hex << bx_times[0] << std::dec;
1054  } else {
1055  strstrm << "-";
1056  }
1057  if ((i_strip + 1) % CSCConstants::NUM_HALF_STRIPS_PER_CFEB == 0)
1058  strstrm << " ";
1059  }
1060  }
1061  LogTrace("CSCCathodeLCTProcessor") << strstrm.str();
1062 }

References CSCDetId::chamberName(), TauDecayModes::dec, relativeConstraints::empty, LogDebug, LogTrace, me0TriggerPseudoDigis_cff::nStrips, CSCConstants::NUM_HALF_STRIPS_PER_CFEB, CSCConstants::NUM_LAYERS, digitizers_cfi::strip, CSCBaseboard::theChamber, CSCBaseboard::theEndcap, CSCBaseboard::theRing, and CSCBaseboard::theStation.

Referenced by CSCUpgradeCathodeLCTProcessor::findLCTs(), and findLCTs().

◆ findLCTs()

std::vector< CSCCLCTDigi > CSCCathodeLCTProcessor::findLCTs ( const std::vector< int >  halfstrip[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS])
protectedvirtual

Reimplemented in CSCUpgradeCathodeLCTProcessor.

Definition at line 517 of file CSCCathodeLCTProcessor.cc.

518  {
519  std::vector<CSCCLCTDigi> lctList;
520 
521  // Max. number of half-strips for this chamber.
522  const int maxHalfStrips = 2 * numStrips + 1;
523 
524  if (infoV > 1)
525  dumpDigis(halfstrip, maxHalfStrips);
526 
527  // 2 possible LCTs per CSC x 7 LCT quantities
530 
531  // Fire half-strip one-shots for hit_persist bx's (4 bx's by default).
532  pulseExtension(halfstrip, maxHalfStrips, pulse);
533 
534  unsigned int start_bx = start_bx_shift;
535  // Stop drift_delay bx's short of fifo_tbins since at later bx's we will
536  // not have a full set of hits to start pattern search anyway.
537  unsigned int stop_bx = fifo_tbins - drift_delay;
538  // Allow for more than one pass over the hits in the time window.
539  while (start_bx < stop_bx) {
540  // All half-strip pattern envelopes are evaluated simultaneously, on every
541  // clock cycle.
542  int first_bx = 999;
543  bool pre_trig = preTrigger(pulse, start_bx, first_bx);
544 
545  // If any of half-strip envelopes has enough layers hit in it, TMB
546  // will pre-trigger.
547  if (pre_trig) {
548  thePreTriggerBXs.push_back(first_bx);
549  if (infoV > 1)
550  LogTrace("CSCCathodeLCTProcessor") << "..... pretrigger at bx = " << first_bx << "; waiting drift delay .....";
551 
552  // TMB latches LCTs drift_delay clocks after pretrigger.
553  // in the configuration the drift_delay is set to 2bx by default
554  // this is the time that is required for the electrons to drift to the
555  // cathode strips. 15ns drift time --> 45 ns is 3 sigma for the delay
556  // this corresponds to 2bx
557  int latch_bx = first_bx + drift_delay;
558 
559  // define a new pattern map
560  // for each key half strip, and for each pattern, store the 2D collection of fired comparator digis
561  std::map<int, std::map<int, CSCCLCTDigi::ComparatorContainer>> hits_in_patterns;
562  hits_in_patterns.clear();
563 
564  // We check if there is at least one key half strip for which at least
565  // one pattern id has at least the minimum number of hits
566  bool hits_in_time = patternFinding(pulse, maxHalfStrips, latch_bx, hits_in_patterns);
567  if (infoV > 1) {
568  if (hits_in_time) {
569  for (int hstrip = stagger[CSCConstants::KEY_CLCT_LAYER - 1]; hstrip < maxHalfStrips; hstrip++) {
570  if (nhits[hstrip] > 0) {
571  LogTrace("CSCCathodeLCTProcessor")
572  << " bx = " << std::setw(2) << latch_bx << " --->"
573  << " halfstrip = " << std::setw(3) << hstrip << " best pid = " << std::setw(2) << best_pid[hstrip]
574  << " nhits = " << nhits[hstrip];
575  }
576  }
577  }
578  }
579  // This trigger emulator does not have an active CFEB flag for DAQ (csc trigger hardware: AFF)
580  // This is a fundamental difference with the firmware where the TMB prepares the DAQ to
581  // read out the chamber
582 
583  // The pattern finder runs continuously, so another pre-trigger
584  // could occur already at the next bx.
585 
586  // Quality for sorting.
588  int best_halfstrip[CSCConstants::MAX_CLCTS_PER_PROCESSOR];
589  int best_quality[CSCConstants::MAX_CLCTS_PER_PROCESSOR];
590 
591  for (int ilct = 0; ilct < CSCConstants::MAX_CLCTS_PER_PROCESSOR; ilct++) {
592  best_halfstrip[ilct] = -1;
593  best_quality[ilct] = 0;
594  }
595 
596  // Calculate quality from pattern id and number of hits, and
597  // simultaneously select best-quality LCT.
598  if (hits_in_time) {
599  for (int hstrip = stagger[CSCConstants::KEY_CLCT_LAYER - 1]; hstrip < maxHalfStrips; hstrip++) {
600  // The bend-direction bit pid[0] is ignored (left and right
601  // bends have equal quality).
602  quality[hstrip] = (best_pid[hstrip] & 14) | (nhits[hstrip] << 5);
603  if (quality[hstrip] > best_quality[0]) {
604  best_halfstrip[0] = hstrip;
605  best_quality[0] = quality[hstrip];
606  }
607  if (infoV > 1 && quality[hstrip] > 0) {
608  LogTrace("CSCCathodeLCTProcessor")
609  << " 1st CLCT: halfstrip = " << std::setw(3) << hstrip << " quality = " << std::setw(3)
610  << quality[hstrip] << " nhits = " << std::setw(3) << nhits[hstrip] << " pid = " << std::setw(3)
611  << best_pid[hstrip] << " best halfstrip = " << std::setw(3) << best_halfstrip[0]
612  << " best quality = " << std::setw(3) << best_quality[0];
613  }
614  }
615  }
616 
617  // If 1st best CLCT is found, look for other CLCTs!
618  if (best_halfstrip[0] >= 0) {
619  for (int ilct = 1; ilct < CSCConstants::MAX_CLCTS_PER_PROCESSOR; ilct++) {
620  // Mark keys near best CLCT as busy by setting their quality to zero, and repeat the search.
621  markBusyKeys(best_halfstrip[ilct - 1], best_pid[best_halfstrip[ilct - 1]], quality);
622 
623  for (int hstrip = stagger[CSCConstants::KEY_CLCT_LAYER - 1]; hstrip < maxHalfStrips; hstrip++) {
624  if (quality[hstrip] > best_quality[ilct]) {
625  best_halfstrip[ilct] = hstrip;
626  best_quality[ilct] = quality[hstrip];
627  }
628  if (infoV > 1 && quality[hstrip] > 0) {
629  LogTrace("CSCCathodeLCTProcessor")
630  << "CLCT " << ilct + 1 << ": halfstrip = " << std::setw(3) << hstrip << " quality = " << std::setw(3)
631  << quality[hstrip] << " nhits = " << std::setw(3) << nhits[hstrip] << " pid = " << std::setw(3)
632  << best_pid[hstrip] << " best halfstrip = " << std::setw(3) << best_halfstrip[1]
633  << " best quality = " << std::setw(3) << best_quality[1];
634  }
635  }
636  }
637 
638  // Pattern finder.
639  for (int ilct = 0; ilct < CSCConstants::MAX_CLCTS_PER_PROCESSOR; ilct++) {
640  int best_hs = best_halfstrip[ilct];
641  if (best_hs >= 0 && nhits[best_hs] >= nplanes_hit_pattern) {
642  keystrip_data[ilct][CLCT_PATTERN] = best_pid[best_hs];
643  keystrip_data[ilct][CLCT_BEND] =
645  // Remove stagger if any.
646  keystrip_data[ilct][CLCT_STRIP] = best_hs - stagger[CSCConstants::KEY_CLCT_LAYER - 1];
647  keystrip_data[ilct][CLCT_BX] = first_bx;
648  keystrip_data[ilct][CLCT_STRIP_TYPE] = 1; // obsolete
649  keystrip_data[ilct][CLCT_QUALITY] = nhits[best_hs];
650  keystrip_data[ilct][CLCT_CFEB] = keystrip_data[ilct][CLCT_STRIP] / CSCConstants::NUM_HALF_STRIPS_PER_CFEB;
651  const uint16_t halfstrip_in_cfeb = keystrip_data[ilct][CLCT_STRIP] -
652  CSCConstants::NUM_HALF_STRIPS_PER_CFEB * keystrip_data[ilct][CLCT_CFEB];
653 
654  CSCCLCTDigi thisLCT(1,
655  keystrip_data[ilct][CLCT_QUALITY],
656  keystrip_data[ilct][CLCT_PATTERN],
657  keystrip_data[ilct][CLCT_STRIP_TYPE],
658  keystrip_data[ilct][CLCT_BEND],
659  halfstrip_in_cfeb,
660  keystrip_data[ilct][CLCT_CFEB],
661  keystrip_data[ilct][CLCT_BX]);
662 
663  // get the comparator hits for this pattern
664  auto compHits = hits_in_patterns[best_hs][keystrip_data[ilct][CLCT_PATTERN]];
665 
666  // purge the comparator digi collection from the obsolete "65535" entries...
667  cleanComparatorContainer(compHits);
668 
669  // set the hit collection
670  thisLCT.setHits(compHits);
671 
672  // useful debugging
673  if (infoV > 1) {
674  LogTrace("CSCCathodeLCTProcessor") << " Final selection: ilct " << ilct << " " << thisLCT << std::endl;
675  }
676 
677  // put the CLCT into the collection
678  lctList.push_back(thisLCT);
679  }
680  }
681  } //find CLCT, end of best_halfstrip[0] >= 0
682 
683  // If there is a trigger, CLCT pre-trigger state machine
684  // checks the number of hits that lie within a pattern template
685  // at every bx, and waits for it to drop below threshold.
686  // The search for CLCTs resumes only when the number of hits
687  // drops below threshold.
688  start_bx = fifo_tbins;
689  // Stop checking drift_delay bx's short of fifo_tbins since
690  // at later bx's we won't have a full set of hits for a
691  // pattern search anyway.
692  unsigned int stop_time = fifo_tbins - drift_delay;
693  for (unsigned int bx = latch_bx + 1; bx < stop_time; bx++) {
694  bool return_to_idle = true;
695  bool hits_in_time = patternFinding(pulse, maxHalfStrips, bx, hits_in_patterns);
696  if (hits_in_time) {
697  for (int hstrip = stagger[CSCConstants::KEY_CLCT_LAYER - 1]; hstrip < maxHalfStrips; hstrip++) {
698  // the dead-time is done at the pre-trigger, not at the trigger
699  if (nhits[hstrip] >= nplanes_hit_pretrig) {
700  if (infoV > 1)
701  LogTrace("CSCCathodeLCTProcessor") << " State machine busy at bx = " << bx;
702  return_to_idle = false;
703  break;
704  }
705  }
706  }
707  if (return_to_idle) {
708  if (infoV > 1)
709  LogTrace("CSCCathodeLCTProcessor") << " State machine returns to idle state at bx = " << bx;
710  start_bx = bx;
711  break;
712  }
713  }
714  } //pre_trig
715  else {
716  start_bx = first_bx + 1; // no dead time
717  }
718  }
719 
720  return lctList;
721 } // findLCTs -- TMB-07 version.

References best_pid, l1GtPatternGenerator_cfi::bx, CLCT_BEND, CLCT_BX, CLCT_CFEB, CLCT_NUM_QUANTITIES, CLCT_PATTERN, clct_pattern_, CSCConstants::CLCT_PATTERN_WIDTH, CLCT_QUALITY, CLCT_STRIP, CLCT_STRIP_TYPE, cleanComparatorContainer(), drift_delay, dumpDigis(), fifo_tbins, CSCBaseboard::infoV, CSCConstants::KEY_CLCT_LAYER, LogTrace, markBusyKeys(), CSCConstants::MAX_CLCTS_PER_PROCESSOR, nhits, nplanes_hit_pattern, nplanes_hit_pretrig, CSCConstants::NUM_HALF_STRIPS_7CFEBS, CSCConstants::NUM_HALF_STRIPS_PER_CFEB, CSCConstants::NUM_LAYERS, numStrips, patternFinding(), preTrigger(), pulse(), pulseExtension(), qcdUeDQM_cfi::quality, CSCCLCTDigi::setHits(), stagger, start_bx_shift, and thePreTriggerBXs.

Referenced by CSCUpgradeCathodeLCTProcessor::findLCTs(), and run().

◆ getBestCLCT()

CSCCLCTDigi CSCCathodeLCTProcessor::getBestCLCT ( int  bx) const

get best/second best CLCT Note: CLCT has BX shifted

Definition at line 1218 of file CSCCathodeLCTProcessor.cc.

1218  {
1219  CSCCLCTDigi lct = CLCTContainer_[bx][0];
1220  lct.setBX(lct.getBX() + alctClctOffset_);
1221  return lct;
1222 }

References CSCBaseboard::alctClctOffset_, l1GtPatternGenerator_cfi::bx, CLCTContainer_, CSCCLCTDigi::getBX(), and CSCCLCTDigi::setBX().

◆ getCLCTs()

std::vector< CSCCLCTDigi > CSCCathodeLCTProcessor::getCLCTs ( ) const

Returns vector of all found CLCTs, if any.

Definition at line 1201 of file CSCCathodeLCTProcessor.cc.

1201  {
1202  std::vector<CSCCLCTDigi> tmpV;
1203  for (int bx = 0; bx < CSCConstants::MAX_CLCT_TBINS; bx++) {
1204  for (int iCLCT = 0; iCLCT < CSCConstants::MAX_CLCTS_PER_PROCESSOR; iCLCT++) {
1205  if (CLCTContainer_[bx][iCLCT].isValid()) {
1206  tmpV.push_back(CLCTContainer_[bx][iCLCT]);
1207  }
1208  }
1209  }
1210  return tmpV;
1211 }

References l1GtPatternGenerator_cfi::bx, CLCTContainer_, CSCConstants::MAX_CLCT_TBINS, and CSCConstants::MAX_CLCTS_PER_PROCESSOR.

Referenced by readoutCLCTs(), and run().

◆ getDigis() [1/2]

bool CSCCathodeLCTProcessor::getDigis ( const CSCComparatorDigiCollection compdc)
protected

Access routines to comparator digis.

Definition at line 376 of file CSCCathodeLCTProcessor.cc.

376  {
377  bool noDigis = true;
378 
379  // Loop over layers and save comparator digis on each one into digiV[layer].
380  for (int i_layer = 0; i_layer < CSCConstants::NUM_LAYERS; i_layer++) {
381  digiV[i_layer].clear();
382 
383  CSCDetId detid(theEndcap, theStation, theRing, theChamber, i_layer + 1);
384  getDigis(compdc, detid);
385 
386  if (isME11_ && !disableME1a_) {
387  CSCDetId detid_me1a(theEndcap, theStation, 4, theChamber, i_layer + 1);
388  getDigis(compdc, detid_me1a);
389  }
390 
391  if (!digiV[i_layer].empty()) {
392  noDigis = false;
393  if (infoV > 1) {
394  LogTrace("CSCCathodeLCTProcessor") << "found " << digiV[i_layer].size() << " comparator digi(s) in layer "
395  << i_layer << " of " << detid.chamberName() << " (trig. sector " << theSector
396  << " subsector " << theSubsector << " id " << theTrigChamber << ")";
397  }
398  }
399  }
400 
401  return noDigis;
402 }

References CSCDetId::chamberName(), digiV, CSCBaseboard::disableME1a_, relativeConstraints::empty, CSCBaseboard::infoV, CSCBaseboard::isME11_, LogTrace, CSCConstants::NUM_LAYERS, CSCBaseboard::theChamber, CSCBaseboard::theEndcap, CSCBaseboard::theRing, CSCBaseboard::theSector, CSCBaseboard::theStation, CSCBaseboard::theSubsector, and CSCBaseboard::theTrigChamber.

Referenced by run().

◆ getDigis() [2/2]

void CSCCathodeLCTProcessor::getDigis ( const CSCComparatorDigiCollection compdc,
const CSCDetId id 
)
protected

Definition at line 404 of file CSCCathodeLCTProcessor.cc.

404  {
405  const bool me1a = (id.station() == 1) && (id.ring() == 4);
406  const CSCComparatorDigiCollection::Range rcompd = compdc->get(id);
407  for (CSCComparatorDigiCollection::const_iterator digiIt = rcompd.first; digiIt != rcompd.second; ++digiIt) {
408  const unsigned int origStrip = digiIt->getStrip();
409  const unsigned int maxStripsME1a =
411  // this special case can only be reached in MC
412  // in real data, the comparator digis have always ring==1
413  if (me1a && origStrip <= maxStripsME1a && !disableME1a_) {
414  // Move ME1/A comparators from CFEB=0 to CFEB=4 if this has not
415  // been done already.
416  CSCComparatorDigi digi_corr(
417  origStrip + CSCConstants::MAX_NUM_STRIPS_ME1B, digiIt->getComparator(), digiIt->getTimeBinWord());
418  digiV[id.layer() - 1].push_back(digi_corr);
419  } else {
420  digiV[id.layer() - 1].push_back(*digiIt);
421  }
422  }
423 }

References digiV, CSCBaseboard::disableME1a_, CSCBaseboard::gangedME1a_, CSCConstants::MAX_NUM_STRIPS_ME1A_GANGED, CSCConstants::MAX_NUM_STRIPS_ME1A_UNGANGED, CSCConstants::MAX_NUM_STRIPS_ME1B, and relativeConstraints::ring.

◆ getSecondCLCT()

CSCCLCTDigi CSCCathodeLCTProcessor::getSecondCLCT ( int  bx) const

Definition at line 1224 of file CSCCathodeLCTProcessor.cc.

1224  {
1225  CSCCLCTDigi lct = CLCTContainer_[bx][1];
1226  lct.setBX(lct.getBX() + alctClctOffset_);
1227  return lct;
1228 }

References CSCBaseboard::alctClctOffset_, l1GtPatternGenerator_cfi::bx, CLCTContainer_, CSCCLCTDigi::getBX(), and CSCCLCTDigi::setBX().

◆ markBusyKeys()

void CSCCathodeLCTProcessor::markBusyKeys ( const int  best_hstrip,
const int  best_patid,
int  quality[CSCConstants::NUM_HALF_STRIPS_7CFEBS] 
)
protected

Definition at line 979 of file CSCCathodeLCTProcessor.cc.

981  {
982  int nspan = min_separation;
983  int pspan = min_separation;
984 
985  for (int hstrip = best_hstrip - nspan; hstrip <= best_hstrip + pspan; hstrip++) {
986  if (hstrip >= 0 && hstrip < CSCConstants::NUM_HALF_STRIPS_7CFEBS) {
987  quality[hstrip] = 0;
988  }
989  }
990 } // markBusyKeys -- TMB-07 version.

References min_separation, CSCConstants::NUM_HALF_STRIPS_7CFEBS, and qcdUeDQM_cfi::quality.

Referenced by CSCUpgradeCathodeLCTProcessor::findLCTs(), and findLCTs().

◆ patternFinding()

bool CSCCathodeLCTProcessor::patternFinding ( const PulseArray  pulse,
const int  nStrips,
const unsigned int  bx_time,
std::map< int, std::map< int, CSCCLCTDigi::ComparatorContainer > > &  hits_in_patterns 
)
protected

Definition at line 832 of file CSCCathodeLCTProcessor.cc.

836  {
837  if (bx_time >= fifo_tbins)
838  return false;
839 
840  // This loop is a quick check of a number of layers hit at bx_time: since
841  // most of the time it is 0, this check helps to speed-up the execution
842  // substantially.
843  unsigned int layers_hit = 0;
844  for (int i_layer = 0; i_layer < CSCConstants::NUM_LAYERS; i_layer++) {
845  for (int i_hstrip = 0; i_hstrip < nStrips; i_hstrip++) {
846  if (((pulse[i_layer][i_hstrip] >> bx_time) & 1) == 1) {
847  layers_hit++;
848  break;
849  }
850  }
851  }
852  if (layers_hit < nplanes_hit_pretrig)
853  return false;
854 
855  for (int key_hstrip = 0; key_hstrip < nStrips; key_hstrip++) {
856  best_pid[key_hstrip] = 0;
857  nhits[key_hstrip] = 0;
858  first_bx_corrected[key_hstrip] = -999;
859  }
860 
861  bool hit_layer[CSCConstants::NUM_LAYERS];
862 
863  // Loop over candidate key strips.
864  for (int key_hstrip = stagger[CSCConstants::KEY_CLCT_LAYER - 1]; key_hstrip < nStrips; key_hstrip++) {
865  // Loop over patterns and look for hits matching each pattern.
866  for (unsigned int pid = clct_pattern_.size() - 1; pid >= pid_thresh_pretrig; pid--) {
867  layers_hit = 0;
868  // clear all layers
869  for (int ilayer = 0; ilayer < CSCConstants::NUM_LAYERS; ilayer++) {
870  hit_layer[ilayer] = false;
871  }
872 
873  // clear a single pattern!
874  CSCCLCTDigi::ComparatorContainer hits_single_pattern;
875  hits_single_pattern.resize(6);
876  for (auto& p : hits_single_pattern) {
878  }
879 
880  // clear all medians
881  double num_pattern_hits = 0., times_sum = 0.;
882  std::multiset<int> mset_for_median;
883  mset_for_median.clear();
884 
885  // Loop over halfstrips in trigger pattern mask and calculate the
886  // "absolute" halfstrip number for each.
887  for (int this_layer = 0; this_layer < CSCConstants::NUM_LAYERS; this_layer++) {
888  for (int strip_num = 0; strip_num < CSCConstants::CLCT_PATTERN_WIDTH; strip_num++) {
889  // ignore "0" half-strips in the pattern
890  if (clct_pattern_[pid][this_layer][strip_num] == 0)
891  continue;
892 
893  // the current strip is the key half-strip plus the offset (can be negative or positive)
894  int this_strip = CSCPatternBank::clct_pattern_offset_[strip_num] + key_hstrip;
895 
896  // current strip should be valid of course
897  if (this_strip >= 0 && this_strip < nStrips) {
898  if (infoV > 3) {
899  LogTrace("CSCCathodeLCTProcessor") << " In patternFinding: key_strip = " << key_hstrip << " pid = " << pid
900  << " layer = " << this_layer << " strip = " << this_strip << std::endl;
901  }
902  // Determine if "one shot" is high at this bx_time
903  if (((pulse[this_layer][this_strip] >> bx_time) & 1) == 1) {
904  if (hit_layer[this_layer] == false) {
905  hit_layer[this_layer] = true;
906  layers_hit++; // determines number of layers hit
907  // add this strip in this layer to the pattern we are currently considering
908  hits_single_pattern[this_layer][strip_num] = this_strip;
909  }
910 
911  // find at what bx did pulse on this halsfstrip & layer have started
912  // use hit_persist constraint on how far back we can go
913  int first_bx_layer = bx_time;
914  for (unsigned int dbx = 0; dbx < hit_persist; dbx++) {
915  if (((pulse[this_layer][this_strip] >> (first_bx_layer - 1)) & 1) == 1)
916  first_bx_layer--;
917  else
918  break;
919  }
920  times_sum += (double)first_bx_layer;
921  num_pattern_hits += 1.;
922  mset_for_median.insert(first_bx_layer);
923  if (infoV > 2)
924  LogTrace("CSCCathodeLCTProcessor") << " 1st bx in layer: " << first_bx_layer << " sum bx: " << times_sum
925  << " #pat. hits: " << num_pattern_hits;
926  }
927  }
928  } // end loop over strips in pretrigger pattern
929  } // end loop over layers
930 
931  // save the pattern information when a trigger was formed!
932  if (layers_hit >= nplanes_hit_pattern) {
933  hits_in_patterns[key_hstrip][pid] = hits_single_pattern;
934  }
935 
936  // determine the current best pattern!
937  if (layers_hit > nhits[key_hstrip]) {
938  best_pid[key_hstrip] = pid;
939  nhits[key_hstrip] = layers_hit;
940 
941  // calculate median
942  const int sz = mset_for_median.size();
943  if (sz > 0) {
944  std::multiset<int>::iterator im = mset_for_median.begin();
945  if (sz > 1)
946  std::advance(im, sz / 2 - 1);
947  if (sz == 1)
948  first_bx_corrected[key_hstrip] = *im;
949  else if ((sz % 2) == 1)
950  first_bx_corrected[key_hstrip] = *(++im);
951  else
952  first_bx_corrected[key_hstrip] = ((*im) + (*(++im))) / 2;
953 
954 #if defined(EDM_ML_DEBUG)
955  //LogTrace only ever prints if EDM_ML_DEBUG is defined
956  if (infoV > 1) {
957  auto lt = LogTrace("CSCCathodeLCTProcessor")
958  << "bx=" << bx_time << " bx_cor=" << first_bx_corrected[key_hstrip] << " bxset=";
959  for (im = mset_for_median.begin(); im != mset_for_median.end(); im++) {
960  lt << " " << *im;
961  }
962  }
963 #endif
964  }
965  // Do not loop over the other (worse) patterns if max. numbers of
966  // hits is found.
967  if (nhits[key_hstrip] == CSCConstants::NUM_LAYERS)
968  break;
969  }
970  } // end loop over pid
971  } // end loop over candidate key strips
972 
973  // At this point there exists at least one halfstrip for which at least one pattern
974  // has at least 3 layers --> definition of a pre-trigger
975  return true;
976 } // patternFinding -- TMB-07 version.

References best_pid, clct_pattern_, CSCPatternBank::clct_pattern_offset_, CSCConstants::CLCT_PATTERN_WIDTH, fifo_tbins, first_bx_corrected, hit_persist, CSCBaseboard::infoV, INVALID_HALFSTRIP, CSCConstants::KEY_CLCT_LAYER, LogTrace, nhits, nplanes_hit_pattern, nplanes_hit_pretrig, me0TriggerPseudoDigis_cff::nStrips, CSCConstants::NUM_LAYERS, AlCaHLTBitMon_ParallelJobs::p, pid_thresh_pretrig, pulse(), and stagger.

Referenced by CSCUpgradeCathodeLCTProcessor::findLCTs(), findLCTs(), CSCUpgradeCathodeLCTProcessor::preTrigger(), and preTrigger().

◆ preTrigger()

bool CSCCathodeLCTProcessor::preTrigger ( const PulseArray  pulse,
const int  start_bx,
int &  first_bx 
)
protectedvirtual

Reimplemented in CSCUpgradeCathodeLCTProcessor.

Definition at line 770 of file CSCCathodeLCTProcessor.cc.

770  {
771  if (infoV > 1)
772  LogTrace("CSCCathodeLCTProcessor") << "....................PreTrigger...........................";
773 
774  // Max. number of half-strips for this chamber.
775  const int nStrips = 2 * numStrips + 1;
776 
777  int nPreTriggers = 0;
778 
779  bool pre_trig = false;
780  // Now do a loop over bx times to see (if/when) track goes over threshold
781  for (unsigned int bx_time = start_bx; bx_time < fifo_tbins; bx_time++) {
782  // For any given bunch-crossing, start at the lowest keystrip and look for
783  // the number of separate layers in the pattern for that keystrip that have
784  // pulses at that bunch-crossing time. Do the same for the next keystrip,
785  // etc. Then do the entire process again for the next bunch-crossing, etc
786  // until you find a pre-trigger.
787 
788  std::map<int, std::map<int, CSCCLCTDigi::ComparatorContainer>> hits_in_patterns;
789  hits_in_patterns.clear();
790 
791  bool hits_in_time = patternFinding(pulse, nStrips, bx_time, hits_in_patterns);
792  if (hits_in_time) {
793  for (int hstrip = stagger[CSCConstants::KEY_CLCT_LAYER - 1]; hstrip < nStrips; hstrip++) {
794  if (infoV > 1) {
795  if (nhits[hstrip] > 0) {
796  LogTrace("CSCCathodeLCTProcessor")
797  << " bx = " << std::setw(2) << bx_time << " --->"
798  << " halfstrip = " << std::setw(3) << hstrip << " best pid = " << std::setw(2) << best_pid[hstrip]
799  << " nhits = " << nhits[hstrip];
800  }
801  }
802  ispretrig[hstrip] = false;
803  if (nhits[hstrip] >= nplanes_hit_pretrig && best_pid[hstrip] >= pid_thresh_pretrig) {
804  pre_trig = true;
805  ispretrig[hstrip] = true;
806 
807  // write each pre-trigger to output
808  nPreTriggers++;
809  const int bend =
811  const int halfstrip = hstrip % CSCConstants::NUM_HALF_STRIPS_PER_CFEB;
812  const int cfeb = hstrip / CSCConstants::NUM_HALF_STRIPS_PER_CFEB;
814  1, nhits[hstrip], best_pid[hstrip], 1, bend, halfstrip, cfeb, bx_time, nPreTriggers, 0));
815  }
816  }
817 
818  if (pre_trig) {
819  first_bx = bx_time; // bx at time of pretrigger
820  return true;
821  }
822  }
823  } // end loop over bx times
824 
825  if (infoV > 1)
826  LogTrace("CSCCathodeLCTProcessor") << "no pretrigger, returning \n";
827  first_bx = fifo_tbins;
828  return false;
829 } // preTrigger -- TMB-07 version.

References trklet::bend(), best_pid, clct_pattern_, CSCConstants::CLCT_PATTERN_WIDTH, fifo_tbins, CSCBaseboard::infoV, ispretrig, CSCConstants::KEY_CLCT_LAYER, LogTrace, nhits, nplanes_hit_pretrig, me0TriggerPseudoDigis_cff::nStrips, CSCConstants::NUM_HALF_STRIPS_PER_CFEB, CSCConstants::NUM_LAYERS, numStrips, patternFinding(), pid_thresh_pretrig, pulse(), stagger, and thePreTriggerDigis.

Referenced by findLCTs(), and CSCUpgradeCathodeLCTProcessor::preTrigger().

◆ preTriggerBXs()

std::vector<int> CSCCathodeLCTProcessor::preTriggerBXs ( ) const
inline

Definition at line 80 of file CSCCathodeLCTProcessor.h.

80 { return thePreTriggerBXs; }

References thePreTriggerBXs.

◆ preTriggerDigis()

std::vector<CSCCLCTPreTriggerDigi> CSCCathodeLCTProcessor::preTriggerDigis ( ) const
inline

read out CLCTs in ME1a , ME1b

Definition at line 83 of file CSCCathodeLCTProcessor.h.

83 { return thePreTriggerDigis; }

References thePreTriggerDigis.

Referenced by preTriggerDigisME1a(), and preTriggerDigisME1b().

◆ preTriggerDigisME1a()

std::vector< CSCCLCTPreTriggerDigi > CSCCathodeLCTProcessor::preTriggerDigisME1a ( ) const

Definition at line 1178 of file CSCCathodeLCTProcessor.cc.

1178  {
1179  std::vector<CSCCLCTPreTriggerDigi> tmpV;
1180  if (not(theStation == 1 and (theRing == 1 or theRing == 4)))
1181  return tmpV;
1182  const std::vector<CSCCLCTPreTriggerDigi>& allPretriggerdigis = preTriggerDigis();
1183  for (const auto& preclct : allPretriggerdigis)
1184  if (preclct.getCFEB() >= 4)
1185  tmpV.push_back(preclct);
1186  return tmpV;
1187 }

References or, preTriggerDigis(), CSCBaseboard::theRing, and CSCBaseboard::theStation.

◆ preTriggerDigisME1b()

std::vector< CSCCLCTPreTriggerDigi > CSCCathodeLCTProcessor::preTriggerDigisME1b ( ) const

Definition at line 1189 of file CSCCathodeLCTProcessor.cc.

1189  {
1190  std::vector<CSCCLCTPreTriggerDigi> tmpV;
1191  if (not(theStation == 1 and (theRing == 1 or theRing == 4)))
1192  return tmpV;
1193  const std::vector<CSCCLCTPreTriggerDigi>& allPretriggerdigis = preTriggerDigis();
1194  for (const auto& preclct : allPretriggerdigis)
1195  if (preclct.getCFEB() < 4)
1196  tmpV.push_back(preclct);
1197  return tmpV;
1198 }

References or, preTriggerDigis(), CSCBaseboard::theRing, and CSCBaseboard::theStation.

◆ pulseExtension()

void CSCCathodeLCTProcessor::pulseExtension ( const std::vector< int >  time[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS],
const int  nStrips,
PulseArray  pulse 
)
protected

Definition at line 724 of file CSCCathodeLCTProcessor.cc.

727  {
728  static const unsigned int bits_in_pulse = 8 * sizeof(pulse[0][0]);
729 
730  // Clear pulse array. This array will be used as a bit representation of
731  // hit times. For example: if strip[1][2] has a value of 3, then 1 shifted
732  // left 3 will be bit pattern of pulse[1][2]. This would make the pattern
733  // look like 0000000000001000. Then add on additional bits to signify
734  // the duration of a signal (hit_persist, formerly bx_width) to simulate
735  // the TMB's drift delay. So for the same pulse[1][2] with a hit_persist
736  // of 3 would look like 0000000000111000. This is similating the digital
737  // one-shot in the TMB.
738  for (int i_layer = 0; i_layer < CSCConstants::NUM_LAYERS; i_layer++)
739  for (int i_strip = 0; i_strip < nStrips; i_strip++)
740  pulse[i_layer][i_strip] = 0;
741 
742  // Loop over all layers and halfstrips.
743  for (int i_layer = 0; i_layer < CSCConstants::NUM_LAYERS; i_layer++) {
744  for (int i_strip = 0; i_strip < nStrips; i_strip++) {
745  // If there is a hit, simulate digital one-shot persistence starting
746  // in the bx of the initial hit. Fill this into pulse[][].
747  if (!time[i_layer][i_strip].empty()) {
748  std::vector<int> bx_times = time[i_layer][i_strip];
749  for (unsigned int i = 0; i < bx_times.size(); i++) {
750  // Check that min and max times are within the allowed range.
751  if (bx_times[i] < 0 || bx_times[i] + hit_persist >= bits_in_pulse) {
752  if (infoV > 0)
753  edm::LogWarning("L1CSCTPEmulatorOutOfTimeDigi")
754  << "+++ BX time of comparator digi (halfstrip = " << i_strip << " layer = " << i_layer
755  << ") bx = " << bx_times[i] << " is not within the range (0-" << bits_in_pulse
756  << "] allowed for pulse extension. Skip this digi! +++\n";
757  continue;
758  }
759  if (bx_times[i] >= start_bx_shift) {
760  for (unsigned int bx = bx_times[i]; bx < bx_times[i] + hit_persist; ++bx)
761  pulse[i_layer][i_strip] = pulse[i_layer][i_strip] | (1 << bx);
762  }
763  }
764  }
765  }
766  }
767 } // pulseExtension.

References l1GtPatternGenerator_cfi::bx, relativeConstraints::empty, hit_persist, mps_fire::i, CSCBaseboard::infoV, me0TriggerPseudoDigis_cff::nStrips, CSCConstants::NUM_LAYERS, pulse(), start_bx_shift, and ntuplemaker::time.

Referenced by CSCUpgradeCathodeLCTProcessor::findLCTs(), and findLCTs().

◆ readComparatorDigis()

void CSCCathodeLCTProcessor::readComparatorDigis ( std::vector< int >  halfstrip[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS])
protected

Definition at line 425 of file CSCCathodeLCTProcessor.cc.

426  {
427  for (int i_layer = 0; i_layer < CSCConstants::NUM_LAYERS; i_layer++) {
428  int i_digi = 0; // digi counter, for dumps.
429  for (std::vector<CSCComparatorDigi>::iterator pld = digiV[i_layer].begin(); pld != digiV[i_layer].end();
430  pld++, i_digi++) {
431  // Dump raw digi info.
432  if (infoV > 1) {
433  std::ostringstream strstrm;
434  strstrm << "Comparator digi: comparator = " << pld->getComparator() << " strip #" << pld->getStrip()
435  << " time bins on:";
436  std::vector<int> bx_times = pld->getTimeBinsOn();
437  for (unsigned int tbin = 0; tbin < bx_times.size(); tbin++)
438  strstrm << " " << bx_times[tbin];
439  LogTrace("CSCCathodeLCTProcessor") << strstrm.str();
440  }
441 
442  // Get comparator: 0/1 for left/right halfstrip for each comparator
443  // that fired.
444  int thisComparator = pld->getComparator();
445  if (thisComparator != 0 && thisComparator != 1) {
446  if (infoV >= 0)
447  edm::LogWarning("L1CSCTPEmulatorWrongInput")
448  << "+++ station " << theStation << " ring " << theRing << " chamber " << theChamber
449  << " Found comparator digi with wrong comparator value = " << thisComparator << "; skipping it... +++\n";
450  continue;
451  }
452 
453  // Get strip number.
454  int thisStrip = pld->getStrip() - 1; // count from 0
455  if (thisStrip < 0 || thisStrip >= numStrips) {
456  if (infoV >= 0)
457  edm::LogWarning("L1CSCTPEmulatorWrongInput")
458  << "+++ station " << theStation << " ring " << theRing << " chamber " << theChamber
459  << " Found comparator digi with wrong strip number = " << thisStrip << " (max strips = " << numStrips
460  << "); skipping it... +++\n";
461  continue;
462  }
463  // 2*strip: convert strip to 1/2 strip
464  // comp : comparator output
465  // stagger: stagger for this layer
466  int thisHalfstrip = 2 * thisStrip + thisComparator + stagger[i_layer];
467  if (thisHalfstrip >= 2 * numStrips + 1) {
468  if (infoV >= 0)
469  edm::LogWarning("L1CSCTPEmulatorWrongInput")
470  << "+++ station " << theStation << " ring " << theRing << " chamber " << theChamber
471  << " Found wrong halfstrip number = " << thisHalfstrip << "; skipping this digi... +++\n";
472  continue;
473  }
474 
475  // Get bx times on this digi and check that they are within the bounds.
476  std::vector<int> bx_times = pld->getTimeBinsOn();
477  for (unsigned int i = 0; i < bx_times.size(); i++) {
478  // Total number of time bins in DAQ readout is given by fifo_tbins,
479  // which thus determines the maximum length of time interval.
480  //
481  // In data, only the CLCT in the time bin that was matched with L1A are read out
482  // while comparator digi is read out by 12 time bin, which includes 12 time bin info
483  // in other word, CLCTs emulated from comparator digis usually showed the OTMB behavior in 12 time bin
484  // while CLCT from data only showed 1 time bin OTMB behavior
485  // the CLCT emulated from comparator digis usually is centering at time bin 7 (BX7) and
486  // it is definitly safe to ignore any CLCTs in bx 0 or 1 and those CLCTs will never impacts on any triggers
487  if (bx_times[i] > 1 && bx_times[i] < static_cast<int>(fifo_tbins)) {
488  if (i == 0 || (i > 0 && bx_times[i] - bx_times[i - 1] >= static_cast<int>(hit_persist))) {
489  // A later hit on the same strip is ignored during the
490  // number of clocks defined by the "hit_persist" parameter
491  // (i.e., 6 bx's by default).
492  if (infoV > 1)
493  LogTrace("CSCCathodeLCTProcessor")
494  << "Comp digi: layer " << i_layer + 1 << " digi #" << i_digi + 1 << " strip " << thisStrip
495  << " halfstrip " << thisHalfstrip << " time " << bx_times[i] << " comparator " << thisComparator
496  << " stagger " << stagger[i_layer];
497  halfstrip[i_layer][thisHalfstrip].push_back(bx_times[i]);
498  } else if (i > 0) {
499  if (infoV > 1)
500  LogTrace("CSCCathodeLCTProcessor")
501  << "+++ station " << theStation << " ring " << theRing << " chamber " << theChamber
502  << " Skipping comparator digi: strip = " << thisStrip << ", layer = " << i_layer + 1
503  << ", bx = " << bx_times[i] << ", bx of previous hit = " << bx_times[i - 1];
504  }
505  } else {
506  if (infoV > 1)
507  LogTrace("CSCCathodeLCTProcessor") << "+++ station " << theStation << " ring " << theRing << " chamber "
508  << theChamber << "+++ Skipping comparator digi: strip = " << thisStrip
509  << ", layer = " << i_layer + 1 << ", bx = " << bx_times[i] << " +++";
510  }
511  }
512  }
513  }
514 }

References begin, digiV, fifo_tbins, hit_persist, mps_fire::i, CSCBaseboard::infoV, LogTrace, CSCConstants::NUM_LAYERS, numStrips, stagger, CSCBaseboard::theChamber, CSCBaseboard::theRing, and CSCBaseboard::theStation.

Referenced by run().

◆ readoutCLCTs()

std::vector< CSCCLCTDigi > CSCCathodeLCTProcessor::readoutCLCTs ( int  nMaxCLCTs = CSCConstants::MAX_CLCTS_READOUT) const

Returns vector of CLCTs in the read-out time window, if any.

Definition at line 1066 of file CSCCathodeLCTProcessor.cc.

1066  {
1067  std::vector<CSCCLCTDigi> tmpV;
1068 
1069  // The start time of the L1A*CLCT coincidence window should be
1070  // related to the fifo_pretrig parameter, but I am not completely
1071  // sure how. For now, just choose it such that the window is
1072  // centered at bx=7. This may need further tweaking if the value of
1073  // tmb_l1a_window_size changes.
1074 
1075  // The number of CLCT bins in the read-out is given by the
1076  // tmb_l1a_window_size parameter, but made even by setting the LSB
1077  // of tmb_l1a_window_size to 0.
1078  //
1079  static std::atomic<int> lct_bins;
1080  lct_bins = (tmb_l1a_window_size % 2 == 0) ? tmb_l1a_window_size : tmb_l1a_window_size - 1;
1081  static std::atomic<int> late_tbins;
1082  late_tbins = early_tbins + lct_bins;
1083 
1084  static std::atomic<int> ifois{0};
1085  if (ifois == 0) {
1086  if (infoV >= 0 && early_tbins < 0) {
1087  edm::LogWarning("L1CSCTPEmulatorSuspiciousParameters")
1088  << "+++ early_tbins = " << early_tbins << "; in-time CLCTs are not getting read-out!!! +++"
1089  << "\n";
1090  }
1091 
1092  if (late_tbins > CSCConstants::MAX_CLCT_TBINS - 1) {
1093  if (infoV >= 0)
1094  edm::LogWarning("L1CSCTPEmulatorSuspiciousParameters")
1095  << "+++ Allowed range of time bins, [0-" << late_tbins << "] exceeds max allowed, "
1096  << CSCConstants::MAX_CLCT_TBINS - 1 << " +++\n"
1097  << "+++ Set late_tbins to max allowed +++\n";
1098  late_tbins = CSCConstants::MAX_CLCT_TBINS - 1;
1099  }
1100  ifois = 1;
1101  }
1102 
1103  // Start from the vector of all found CLCTs and select those within
1104  // the CLCT*L1A coincidence window.
1105  int bx_readout = -1;
1106  const std::vector<CSCCLCTDigi>& all_lcts = getCLCTs();
1107  for (const auto& p : all_lcts) {
1108  // only consider valid CLCTs
1109  if (!p.isValid())
1110  continue;
1111 
1112  const int bx = p.getBX();
1113  // Skip CLCTs found too early relative to L1Accept.
1114  if (bx <= early_tbins) {
1115  if (infoV > 1)
1116  LogDebug("CSCCathodeLCTProcessor")
1117  << " Do not report CLCT on key halfstrip " << p.getKeyStrip() << ": found at bx " << bx
1118  << ", whereas the earliest allowed bx is " << early_tbins + 1;
1119  continue;
1120  }
1121 
1122  // Skip CLCTs found too late relative to L1Accept.
1123  if (bx > late_tbins) {
1124  if (infoV > 1)
1125  LogDebug("CSCCathodeLCTProcessor")
1126  << " Do not report CLCT on key halfstrip " << p.getKeyStrip() << ": found at bx " << bx
1127  << ", whereas the latest allowed bx is " << late_tbins;
1128  continue;
1129  }
1130 
1131  // If (readout_earliest_2) take only CLCTs in the earliest bx in the read-out window:
1132  // in digi->raw step, LCTs have to be packed into the TMB header, and
1133  // currently there is room just for two.
1134  if (readout_earliest_2) {
1135  if (bx_readout == -1 || bx == bx_readout) {
1136  tmpV.push_back(p);
1137  if (bx_readout == -1)
1138  bx_readout = bx;
1139  }
1140  } else
1141  tmpV.push_back(p);
1142  }
1143 
1144  // remove the CLCTs with an index larger than nMaxCLCTs
1145  if (tmpV.size() > unsigned(nMaxCLCTs)) {
1146  tmpV.erase(tmpV.begin() + nMaxCLCTs, tmpV.end());
1147  }
1148 
1149  return tmpV;
1150 }

References l1GtPatternGenerator_cfi::bx, early_tbins, getCLCTs(), CSCBaseboard::infoV, LogDebug, CSCConstants::MAX_CLCT_TBINS, AlCaHLTBitMon_ParallelJobs::p, readout_earliest_2, and tmb_l1a_window_size.

Referenced by readoutCLCTsME1a(), and readoutCLCTsME1b().

◆ readoutCLCTsME1a()

std::vector< CSCCLCTDigi > CSCCathodeLCTProcessor::readoutCLCTsME1a ( int  nMaxCLCTs = CSCConstants::MAX_CLCTS_READOUT) const

Definition at line 1154 of file CSCCathodeLCTProcessor.cc.

1154  {
1155  std::vector<CSCCLCTDigi> tmpV;
1156  if (not(theStation == 1 and (theRing == 1 or theRing == 4)))
1157  return tmpV;
1158  const std::vector<CSCCLCTDigi>& allCLCTs = readoutCLCTs(nMaxCLCTs);
1159  for (const auto& clct : allCLCTs)
1160  if (clct.getCFEB() >= 4)
1161  tmpV.push_back(clct);
1162  return tmpV;
1163 }

References or, readoutCLCTs(), CSCBaseboard::theRing, and CSCBaseboard::theStation.

◆ readoutCLCTsME1b()

std::vector< CSCCLCTDigi > CSCCathodeLCTProcessor::readoutCLCTsME1b ( int  nMaxCLCTs = CSCConstants::MAX_CLCTS_READOUT) const

Definition at line 1167 of file CSCCathodeLCTProcessor.cc.

1167  {
1168  std::vector<CSCCLCTDigi> tmpV;
1169  if (not(theStation == 1 and (theRing == 1 or theRing == 4)))
1170  return tmpV;
1171  const std::vector<CSCCLCTDigi>& allCLCTs = readoutCLCTs(nMaxCLCTs);
1172  for (const auto& clct : allCLCTs)
1173  if (clct.getCFEB() < 4)
1174  tmpV.push_back(clct);
1175  return tmpV;
1176 }

References or, readoutCLCTs(), CSCBaseboard::theRing, and CSCBaseboard::theStation.

◆ run() [1/2]

std::vector< CSCCLCTDigi > CSCCathodeLCTProcessor::run ( const CSCComparatorDigiCollection compdc)

Runs the LCT processor code. Called in normal running – gets info from a collection of comparator digis.

Definition at line 195 of file CSCCathodeLCTProcessor.cc.

195  {
196  // This is the version of the run() function that is called when running
197  // over the entire detector. It gets the comparator & timing info from the
198  // comparator digis and then passes them on to another run() function.
199 
200  static std::atomic<bool> config_dumped{false};
201  if ((infoV > 0) && !config_dumped) {
203  config_dumped = true;
204  }
205 
206  // Get the number of strips and stagger of layers for the given chamber.
207  // Do it only once per chamber.
208  if (numStrips == 0) {
209  if (cscChamber_) {
211  // ME1/a is known to the readout hardware as strips 65-80 of ME1/1.
212  // Still need to decide whether we do any special adjustments to
213  // reconstruct LCTs in this region (3:1 ganged strips); for now, we
214  // simply allow for hits in ME1/a and apply standard reconstruction
215  // to them.
216  // For SLHC ME1/1 is set to have 4 CFEBs in ME1/b and 3 CFEBs in ME1/a
217  if (isME11_) {
218  if (theRing == 4) {
219  if (infoV >= 0) {
220  edm::LogError("L1CSCTPEmulatorSetupError")
221  << "+++ Invalid ring number for this processor " << theRing << " was set in the config."
222  << " +++\n"
223  << "+++ CSC geometry looks garbled; no emulation possible +++\n";
224  }
225  }
226  if (!disableME1a_ && theRing == 1 && !gangedME1a_)
228  if (!disableME1a_ && theRing == 1 && gangedME1a_)
230  if (disableME1a_ && theRing == 1)
232  }
233 
235  if (infoV >= 0)
236  edm::LogError("L1CSCTPEmulatorSetupError")
237  << "+++ Number of strips, " << numStrips << " found in "
239  << " subsector " << theSubsector << " trig id. " << theTrigChamber << ")"
240  << " exceeds max expected, " << CSCConstants::MAX_NUM_STRIPS_7CFEBS << " +++\n"
241  << "+++ CSC geometry looks garbled; no emulation possible +++\n";
242  numStrips = -1;
243  }
244  // The strips for a given layer may be offset from the adjacent layers.
245  // This was done in order to improve resolution. We need to find the
246  // 'staggering' for each layer and make necessary conversions in our
247  // arrays. -JM
248  // In the TMB-07 firmware, half-strips in odd layers (layers are
249  // counted as ly0-ly5) are shifted by -1 half-strip, whereas in
250  // the previous firmware versions half-strips in even layers
251  // were shifted by +1 half-strip. This difference is due to a
252  // change from ly3 to ly2 in the choice of the key layer, and
253  // the intention to keep half-strips in the key layer unchanged.
254  // In the emulator, we use the old way for both cases, to avoid
255  // negative half-strip numbers. This will necessitate a
256  // subtraction of 1 half-strip for TMB-07 later on. -SV.
257  for (int i_layer = 0; i_layer < CSCConstants::NUM_LAYERS; i_layer++) {
258  stagger[i_layer] = (cscChamber_->layer(i_layer + 1)->geometry()->stagger() + 1) / 2;
259  }
260  } else {
261  if (infoV >= 0)
262  edm::LogError("L1CSCTPEmulatorConfigError")
263  << " " << CSCDetId::chamberName(theEndcap, theStation, theRing, theChamber) << " (sector " << theSector
264  << " subsector " << theSubsector << " trig id. " << theTrigChamber << ")"
265  << " is not defined in current geometry! +++\n"
266  << "+++ CSC geometry looks garbled; no emulation possible +++\n";
267  numStrips = -1;
268  }
269  }
270 
271  if (numStrips < 0) {
272  if (infoV >= 0)
273  edm::LogError("L1CSCTPEmulatorConfigError")
274  << " " << CSCDetId::chamberName(theEndcap, theStation, theRing, theChamber) << " (sector " << theSector
275  << " subsector " << theSubsector << " trig id. " << theTrigChamber << "):"
276  << " numStrips = " << numStrips << "; CLCT emulation skipped! +++";
277  std::vector<CSCCLCTDigi> emptyV;
278  return emptyV;
279  }
280 
281  // Get comparator digis in this chamber.
282  bool noDigis = getDigis(compdc);
283 
284  if (!noDigis) {
285  // Get halfstrip times from comparator digis.
287  readComparatorDigis(halfstrip);
288 
289  // Pass arrays of halfstrips on to another run() doing the
290  // LCT search.
291  // If the number of layers containing digis is smaller than that
292  // required to trigger, quit right away. (If LCT-based digi suppression
293  // is implemented one day, this condition will have to be changed
294  // to the number of planes required to pre-trigger.)
295  unsigned int layersHit = 0;
296  for (int i_layer = 0; i_layer < CSCConstants::NUM_LAYERS; i_layer++) {
297  for (int i_hstrip = 0; i_hstrip < CSCConstants::NUM_HALF_STRIPS_7CFEBS; i_hstrip++) {
298  if (!halfstrip[i_layer][i_hstrip].empty()) {
299  layersHit++;
300  break;
301  }
302  }
303  }
304  // Run the algorithm only if the probability for the pre-trigger
305  // to fire is not null. (Pre-trigger decisions are used for the
306  // strip read-out conditions in DigiToRaw.)
307  if (layersHit >= nplanes_hit_pretrig)
308  run(halfstrip);
309  }
310 
311  // Return vector of CLCTs.
312  std::vector<CSCCLCTDigi> tmpV = getCLCTs();
313 
314  // shift the BX from 7 to 8
315  // the unpacked real data CLCTs have central BX at bin 7
316  // however in simulation the central BX is bin 8
317  // to make a proper comparison with ALCTs we need
318  // CLCT and ALCT to have the central BX in the same bin
319  // this shift does not affect the readout of the CLCTs
320  // emulated CLCTs put in the event should be centered at bin 7 (as in data)
321  for (auto& p : tmpV) {
322  p.setBX(p.getBX() + alctClctOffset_);
323  }
324 
325  return tmpV;
326 }

References CSCBaseboard::alctClctOffset_, CSCDetId::chamberName(), CSCBaseboard::cscChamber_, CSCBaseboard::disableME1a_, dumpConfigParams(), relativeConstraints::empty, CSCBaseboard::gangedME1a_, CSCLayer::geometry(), getCLCTs(), getDigis(), CSCBaseboard::infoV, CSCBaseboard::isME11_, CSCChamber::layer(), CSCConstants::MAX_NUM_STRIPS, CSCConstants::MAX_NUM_STRIPS_7CFEBS, CSCConstants::MAX_NUM_STRIPS_ME1B, nplanes_hit_pretrig, CSCConstants::NUM_HALF_STRIPS_7CFEBS, CSCConstants::NUM_LAYERS, CSCLayerGeometry::numberOfStrips(), numStrips, AlCaHLTBitMon_ParallelJobs::p, readComparatorDigis(), CSCLayerGeometry::stagger(), stagger, CSCBaseboard::theChamber, CSCBaseboard::theEndcap, CSCBaseboard::theRing, CSCBaseboard::theSector, CSCBaseboard::theStation, CSCBaseboard::theSubsector, and CSCBaseboard::theTrigChamber.

◆ run() [2/2]

void CSCCathodeLCTProcessor::run ( const std::vector< int >  halfstrip[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS])

Called in test mode and by the run(compdc) function; does the actual LCT finding.

Definition at line 328 of file CSCCathodeLCTProcessor.cc.

329  {
330  // This version of the run() function can either be called in a standalone
331  // test, being passed the halfstrip times, or called by the
332  // run() function above. It uses the findLCTs() method to find vectors
333  // of LCT candidates. These candidates are sorted and the best two per bx
334  // are returned.
335  std::vector<CSCCLCTDigi> CLCTlist = findLCTs(halfstrip);
336 
337  // LCT sorting.
338  if (CLCTlist.size() > 1)
339  sort(CLCTlist.begin(), CLCTlist.end(), std::greater<CSCCLCTDigi>());
340 
341  // Take the best MAX_CLCTS_PER_PROCESSOR candidates per bx.
342  int CLCTIndex_[CSCConstants::MAX_CLCT_TBINS] = {};
343 
344  for (const auto& p : CLCTlist) {
345  const int bx = p.getBX();
347  if (infoV > 0)
348  edm::LogWarning("L1CSCTPEmulatorOutOfTimeCLCT")
349  << "+++ Bx of CLCT candidate, " << bx << ", exceeds max allowed, " << CSCConstants::MAX_CLCT_TBINS - 1
350  << "; skipping it... +++\n";
351  continue;
352  }
353 
354  CLCTContainer_[bx][CLCTIndex_[bx]] = p;
355  CLCTIndex_[bx]++;
356  }
357 
358  for (int bx = 0; bx < CSCConstants::MAX_CLCT_TBINS; bx++) {
359  for (int iCLCT = 0; iCLCT < CSCConstants::MAX_CLCTS_PER_PROCESSOR; iCLCT++) {
360  if (CLCTContainer_[bx][iCLCT].isValid()) {
361  CLCTContainer_[bx][iCLCT].setTrknmb(iCLCT + 1);
362  if (infoV > 0) {
363  LogDebug("CSCCathodeLCTProcessor")
364  << CLCTContainer_[bx][iCLCT] << " found in "
366  << " subsector " << theSubsector << " trig id. " << theTrigChamber << ")"
367  << "\n";
368  }
369  }
370  }
371  }
372  // Now that we have our best CLCTs, they get correlated with the best
373  // ALCTs and then get sent to the MotherBoard. -JM
374 }

References l1GtPatternGenerator_cfi::bx, CSCDetId::chamberName(), CLCTContainer_, findLCTs(), CSCBaseboard::infoV, LogDebug, CSCConstants::MAX_CLCT_TBINS, CSCConstants::MAX_CLCTS_PER_PROCESSOR, AlCaHLTBitMon_ParallelJobs::p, CSCCLCTDigi::setTrknmb(), CSCBaseboard::theChamber, CSCBaseboard::theEndcap, CSCBaseboard::theRing, CSCBaseboard::theSector, CSCBaseboard::theStation, CSCBaseboard::theSubsector, and CSCBaseboard::theTrigChamber.

◆ setConfigParameters()

void CSCCathodeLCTProcessor::setConfigParameters ( const CSCDBL1TPParameters conf)

◆ setDefaultConfigParameters()

void CSCCathodeLCTProcessor::setDefaultConfigParameters ( )
protected

Member Data Documentation

◆ best_pid

unsigned int CSCCathodeLCTProcessor::best_pid[CSCConstants::NUM_HALF_STRIPS_7CFEBS]
protected

◆ clct_pattern_

CSCPatternBank::CLCTPatterns CSCCathodeLCTProcessor::clct_pattern_ = {}
protected

◆ CLCTContainer_

CSCCLCTDigi CSCCathodeLCTProcessor::CLCTContainer_[CSCConstants::MAX_CLCT_TBINS][CSCConstants::MAX_CLCTS_PER_PROCESSOR]
protected

LCTs in this chamber, as found by the processor.

Definition at line 89 of file CSCCathodeLCTProcessor.h.

Referenced by clear(), getBestCLCT(), getCLCTs(), getSecondCLCT(), and run().

◆ def_drift_delay

const unsigned int CSCCathodeLCTProcessor::def_drift_delay = 2
staticprotected

Definition at line 205 of file CSCCathodeLCTProcessor.h.

Referenced by checkConfigParameters(), and setDefaultConfigParameters().

◆ def_fifo_pretrig

const unsigned int CSCCathodeLCTProcessor::def_fifo_pretrig = 7
staticprotected

Definition at line 204 of file CSCCathodeLCTProcessor.h.

Referenced by checkConfigParameters(), and setDefaultConfigParameters().

◆ def_fifo_tbins

const unsigned int CSCCathodeLCTProcessor::def_fifo_tbins = 12
staticprotected

Default values of configuration parameters.

Definition at line 204 of file CSCCathodeLCTProcessor.h.

Referenced by checkConfigParameters(), and setDefaultConfigParameters().

◆ def_hit_persist

const unsigned int CSCCathodeLCTProcessor::def_hit_persist = 6
staticprotected

Definition at line 205 of file CSCCathodeLCTProcessor.h.

Referenced by checkConfigParameters(), and setDefaultConfigParameters().

◆ def_min_separation

const unsigned int CSCCathodeLCTProcessor::def_min_separation = 10
staticprotected

Definition at line 208 of file CSCCathodeLCTProcessor.h.

Referenced by checkConfigParameters(), and setDefaultConfigParameters().

◆ def_nplanes_hit_pattern

const unsigned int CSCCathodeLCTProcessor::def_nplanes_hit_pattern = 4
staticprotected

Definition at line 207 of file CSCCathodeLCTProcessor.h.

Referenced by checkConfigParameters(), and setDefaultConfigParameters().

◆ def_nplanes_hit_pretrig

const unsigned int CSCCathodeLCTProcessor::def_nplanes_hit_pretrig = 2
staticprotected

Definition at line 206 of file CSCCathodeLCTProcessor.h.

Referenced by checkConfigParameters(), and setDefaultConfigParameters().

◆ def_pid_thresh_pretrig

const unsigned int CSCCathodeLCTProcessor::def_pid_thresh_pretrig = 2
staticprotected

Definition at line 208 of file CSCCathodeLCTProcessor.h.

Referenced by checkConfigParameters(), and setDefaultConfigParameters().

◆ def_tmb_l1a_window_size

const unsigned int CSCCathodeLCTProcessor::def_tmb_l1a_window_size = 7
staticprotected

Definition at line 209 of file CSCCathodeLCTProcessor.h.

Referenced by checkConfigParameters(), and setDefaultConfigParameters().

◆ digiV

std::vector<CSCComparatorDigi> CSCCathodeLCTProcessor::digiV[CSCConstants::NUM_LAYERS]
protected

Definition at line 176 of file CSCCathodeLCTProcessor.h.

Referenced by getDigis(), and readComparatorDigis().

◆ drift_delay

unsigned int CSCCathodeLCTProcessor::drift_delay
protected

◆ early_tbins

int CSCCathodeLCTProcessor::early_tbins
protected

VK: separate handle for early time bins

Definition at line 191 of file CSCCathodeLCTProcessor.h.

Referenced by CSCCathodeLCTProcessor(), and readoutCLCTs().

◆ fifo_pretrig

unsigned int CSCCathodeLCTProcessor::fifo_pretrig
protected

◆ fifo_tbins

unsigned int CSCCathodeLCTProcessor::fifo_tbins
protected

◆ first_bx_corrected

int CSCCathodeLCTProcessor::first_bx_corrected[CSCConstants::NUM_HALF_STRIPS_7CFEBS]
protected

◆ hit_persist

unsigned int CSCCathodeLCTProcessor::hit_persist
protected

◆ hitsCLCT

PulseArray CSCCathodeLCTProcessor::hitsCLCT[99]
protected

Definition at line 201 of file CSCCathodeLCTProcessor.h.

◆ ispretrig

bool CSCCathodeLCTProcessor::ispretrig[CSCConstants::NUM_HALF_STRIPS_7CFEBS]
protected

◆ min_separation

unsigned int CSCCathodeLCTProcessor::min_separation
protected

◆ nhits

unsigned int CSCCathodeLCTProcessor::nhits[CSCConstants::NUM_HALF_STRIPS_7CFEBS]
protected

◆ nplanes_hit_pattern

unsigned int CSCCathodeLCTProcessor::nplanes_hit_pattern
protected

◆ nplanes_hit_pretrig

unsigned int CSCCathodeLCTProcessor::nplanes_hit_pretrig
protected

◆ numStrips

int CSCCathodeLCTProcessor::numStrips
protected

◆ pid_thresh_pretrig

unsigned int CSCCathodeLCTProcessor::pid_thresh_pretrig
protected

◆ readout_earliest_2

bool CSCCathodeLCTProcessor::readout_earliest_2
protected

VK: whether to readout only the earliest two LCTs in readout window

Definition at line 194 of file CSCCathodeLCTProcessor.h.

Referenced by CSCCathodeLCTProcessor(), and readoutCLCTs().

◆ stagger

int CSCCathodeLCTProcessor::stagger[CSCConstants::NUM_LAYERS]
protected

◆ start_bx_shift

int CSCCathodeLCTProcessor::start_bx_shift
protected

VK: some quick and dirty fix to reduce CLCT deadtime

Definition at line 188 of file CSCCathodeLCTProcessor.h.

Referenced by CSCCathodeLCTProcessor(), CSCUpgradeCathodeLCTProcessor::findLCTs(), findLCTs(), and pulseExtension().

◆ thePreTriggerBXs

std::vector<int> CSCCathodeLCTProcessor::thePreTriggerBXs
protected

Definition at line 177 of file CSCCathodeLCTProcessor.h.

Referenced by clear(), findLCTs(), and preTriggerBXs().

◆ thePreTriggerDigis

std::vector<CSCCLCTPreTriggerDigi> CSCCathodeLCTProcessor::thePreTriggerDigis
protected

◆ tmb_l1a_window_size

unsigned int CSCCathodeLCTProcessor::tmb_l1a_window_size
protected

◆ use_comparator_codes_

bool CSCCathodeLCTProcessor::use_comparator_codes_
protected

Definition at line 198 of file CSCCathodeLCTProcessor.h.

Referenced by CSCCathodeLCTProcessor().

◆ use_run3_patterns_

bool CSCCathodeLCTProcessor::use_run3_patterns_
protected

Definition at line 197 of file CSCCathodeLCTProcessor.h.

Referenced by CSCCathodeLCTProcessor().

CSCCathodeLCTProcessor::markBusyKeys
void markBusyKeys(const int best_hstrip, const int best_patid, int quality[CSCConstants::NUM_HALF_STRIPS_7CFEBS])
Definition: CSCCathodeLCTProcessor.cc:979
CSCCLCTDigi::setTrknmb
void setTrknmb(const uint16_t number)
Set track number (1,2) after sorting CLCTs.
Definition: CSCCLCTDigi.h:116
mps_fire.i
i
Definition: mps_fire.py:355
CSCBaseboard::theEndcap
const unsigned theEndcap
Definition: CSCBaseboard.h:42
CSCBaseboard::clctParams_
edm::ParameterSet clctParams_
Definition: CSCBaseboard.h:76
CSCChamber::layer
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to the given id.
Definition: CSCChamber.cc:30
CSCCathodeLCTProcessor::stagger
int stagger[CSCConstants::NUM_LAYERS]
Definition: CSCCathodeLCTProcessor.h:174
CSCCathodeLCTProcessor::getCLCTs
std::vector< CSCCLCTDigi > getCLCTs() const
Definition: CSCCathodeLCTProcessor.cc:1201
CSCBaseboard::cscChamber_
const CSCChamber * cscChamber_
Definition: CSCBaseboard.h:64
CSCBaseboard::theSector
const unsigned theSector
Definition: CSCBaseboard.h:44
CSCCathodeLCTProcessor::dumpConfigParams
void dumpConfigParams() const
Definition: CSCCathodeLCTProcessor.cc:1004
CSCBaseboard::tmbParams_
edm::ParameterSet tmbParams_
Definition: CSCBaseboard.h:70
relativeConstraints.station
station
Definition: relativeConstraints.py:67
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
CSCBaseboard::disableME1a_
bool disableME1a_
Definition: CSCBaseboard.h:86
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CSCCathodeLCTProcessor::fifo_tbins
unsigned int fifo_tbins
Definition: CSCCathodeLCTProcessor.h:181
CSCCathodeLCTProcessor::dumpDigis
void dumpDigis(const std::vector< int > strip[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS], const int nStrips) const
Definition: CSCCathodeLCTProcessor.cc:1023
CSCBaseboard::theStation
const unsigned theStation
Definition: CSCBaseboard.h:43
CSCDBL1TPParameters::clctNplanesHitPattern
unsigned int clctNplanesHitPattern() const
Definition: CSCDBL1TPParameters.h:65
CSCDBL1TPParameters::clctPidThreshPretrig
unsigned int clctPidThreshPretrig() const
Definition: CSCDBL1TPParameters.h:68
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
pulse
double pulse(double x, double y, double z, double t)
Definition: SiStripPulseShape.cc:49
CSCPatternBank::clct_pattern_legacy_
static const CLCTPatterns clct_pattern_legacy_
Definition: CSCPatternBank.h:42
CSCCathodeLCTProcessor::readComparatorDigis
void readComparatorDigis(std::vector< int > halfstrip[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS])
Definition: CSCCathodeLCTProcessor.cc:425
CSCCathodeLCTProcessor::use_comparator_codes_
bool use_comparator_codes_
Definition: CSCCathodeLCTProcessor.h:198
CSCCathodeLCTProcessor::readoutCLCTs
std::vector< CSCCLCTDigi > readoutCLCTs(int nMaxCLCTs=CSCConstants::MAX_CLCTS_READOUT) const
Definition: CSCCathodeLCTProcessor.cc:1066
CSCCathodeLCTProcessor::CLCT_PATTERN
Definition: CSCCathodeLCTProcessor.h:160
CSCCathodeLCTProcessor::getDigis
bool getDigis(const CSCComparatorDigiCollection *compdc)
Definition: CSCCathodeLCTProcessor.cc:376
CSCDBL1TPParameters::clctFifoTbins
unsigned int clctFifoTbins() const
Definition: CSCDBL1TPParameters.h:50
CSCBaseboard::checkConfigParameters
void checkConfigParameters(unsigned int &var, const unsigned int var_max, const unsigned int var_def, const std::string &var_str)
Definition: CSCBaseboard.cc:88
CSCCathodeLCTProcessor::def_nplanes_hit_pattern
static const unsigned int def_nplanes_hit_pattern
Definition: CSCCathodeLCTProcessor.h:207
makeMuonMisalignmentScenario.endcap
endcap
Definition: makeMuonMisalignmentScenario.py:320
CSCCathodeLCTProcessor::CLCTContainer_
CSCCLCTDigi CLCTContainer_[CSCConstants::MAX_CLCT_TBINS][CSCConstants::MAX_CLCTS_PER_PROCESSOR]
Definition: CSCCathodeLCTProcessor.h:89
CSCCathodeLCTProcessor::def_drift_delay
static const unsigned int def_drift_delay
Definition: CSCCathodeLCTProcessor.h:205
CSCCLCTDigi
Definition: CSCCLCTDigi.h:17
CSCConstants::MAX_CLCTS_PER_PROCESSOR
Definition: CSCConstants.h:67
CSCCathodeLCTProcessor::early_tbins
int early_tbins
Definition: CSCCathodeLCTProcessor.h:191
MuonDigiCollection::const_iterator
std::vector< DigiType >::const_iterator const_iterator
Definition: MuonDigiCollection.h:94
CSCCathodeLCTProcessor::def_fifo_tbins
static const unsigned int def_fifo_tbins
Definition: CSCCathodeLCTProcessor.h:204
CSCDBL1TPParameters::clctDriftDelay
unsigned int clctDriftDelay() const
Definition: CSCDBL1TPParameters.h:59
CSCCathodeLCTProcessor::thePreTriggerDigis
std::vector< CSCCLCTPreTriggerDigi > thePreTriggerDigis
Definition: CSCCathodeLCTProcessor.h:178
CSCConstants::MAX_NUM_STRIPS
Definition: CSCConstants.h:24
CSCCathodeLCTProcessor::readout_earliest_2
bool readout_earliest_2
Definition: CSCCathodeLCTProcessor.h:194
CSCCathodeLCTProcessor::INVALID_HALFSTRIP
Definition: CSCCathodeLCTProcessor.h:126
CSCCathodeLCTProcessor::pulseExtension
void pulseExtension(const std::vector< int > time[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS], const int nStrips, PulseArray pulse)
Definition: CSCCathodeLCTProcessor.cc:724
CSCCathodeLCTProcessor::ispretrig
bool ispretrig[CSCConstants::NUM_HALF_STRIPS_7CFEBS]
Definition: CSCCathodeLCTProcessor.h:152
CSCCathodeLCTProcessor::findLCTs
virtual std::vector< CSCCLCTDigi > findLCTs(const std::vector< int > halfstrip[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS])
Definition: CSCCathodeLCTProcessor.cc:517
CSCConstants::NUM_LAYERS
Definition: CSCConstants.h:46
CSCBaseboard::alctClctOffset_
unsigned int alctClctOffset_
Definition: CSCBaseboard.h:95
CSCCathodeLCTProcessor::first_bx_corrected
int first_bx_corrected[CSCConstants::NUM_HALF_STRIPS_7CFEBS]
Definition: CSCCathodeLCTProcessor.h:149
CSCDBL1TPParameters::clctMinSeparation
unsigned int clctMinSeparation() const
Definition: CSCDBL1TPParameters.h:71
CSCPatternBank::clct_pattern_run3_
static const CLCTPatterns clct_pattern_run3_
Definition: CSCPatternBank.h:45
CSCDBL1TPParameters::clctHitPersist
unsigned int clctHitPersist() const
Definition: CSCDBL1TPParameters.h:56
CSCConstants::MAX_NUM_STRIPS_ME1B
Definition: CSCConstants.h:40
CSCCLCTPreTriggerDigi
Definition: CSCCLCTPreTriggerDigi.h:15
CSCCathodeLCTProcessor::thePreTriggerBXs
std::vector< int > thePreTriggerBXs
Definition: CSCCathodeLCTProcessor.h:177
CSCComparatorDigi
Definition: CSCComparatorDigi.h:16
CSCCathodeLCTProcessor::def_fifo_pretrig
static const unsigned int def_fifo_pretrig
Definition: CSCCathodeLCTProcessor.h:204
CSCCathodeLCTProcessor::def_hit_persist
static const unsigned int def_hit_persist
Definition: CSCCathodeLCTProcessor.h:205
CSCCathodeLCTProcessor::use_run3_patterns_
bool use_run3_patterns_
Definition: CSCCathodeLCTProcessor.h:197
CSCBaseboard::theSubsector
const unsigned theSubsector
Definition: CSCBaseboard.h:45
CSCLayer::geometry
const CSCLayerGeometry * geometry() const
Definition: CSCLayer.h:44
CSCCathodeLCTProcessor::preTrigger
virtual bool preTrigger(const PulseArray pulse, const int start_bx, int &first_bx)
Definition: CSCCathodeLCTProcessor.cc:770
CSCBaseboard::gangedME1a_
bool gangedME1a_
Definition: CSCBaseboard.h:86
CSCCathodeLCTProcessor::nhits
unsigned int nhits[CSCConstants::NUM_HALF_STRIPS_7CFEBS]
Definition: CSCCathodeLCTProcessor.h:147
CSCCathodeLCTProcessor::def_min_separation
static const unsigned int def_min_separation
Definition: CSCCathodeLCTProcessor.h:208
CSCCathodeLCTProcessor::numStrips
int numStrips
Definition: CSCCathodeLCTProcessor.h:171
edm::LogWarning
Definition: MessageLogger.h:141
CSCCathodeLCTProcessor::CLCT_CFEB
Definition: CSCCathodeLCTProcessor.h:166
CSCCathodeLCTProcessor::run
std::vector< CSCCLCTDigi > run(const CSCComparatorDigiCollection *compdc)
Definition: CSCCathodeLCTProcessor.cc:195
CSCCathodeLCTProcessor::CLCT_STRIP
Definition: CSCCathodeLCTProcessor.h:162
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
CSCCLCTDigi::ComparatorContainer
std::vector< std::vector< uint16_t > > ComparatorContainer
Definition: CSCCLCTDigi.h:19
edm::LogError
Definition: MessageLogger.h:183
CSCCathodeLCTProcessor::preTriggerDigis
std::vector< CSCCLCTPreTriggerDigi > preTriggerDigis() const
Definition: CSCCathodeLCTProcessor.h:83
CSCDBL1TPParameters::clctNplanesHitPretrig
unsigned int clctNplanesHitPretrig() const
Definition: CSCDBL1TPParameters.h:62
CSCCathodeLCTProcessor::CLCT_BEND
Definition: CSCCathodeLCTProcessor.h:161
CSCCathodeLCTProcessor::CLCT_QUALITY
Definition: CSCCathodeLCTProcessor.h:165
CSCBaseboard::CSCBaseboard
CSCBaseboard()
Definition: CSCBaseboard.cc:75
CSCDetId
Definition: CSCDetId.h:26
CSCCathodeLCTProcessor::digiV
std::vector< CSCComparatorDigi > digiV[CSCConstants::NUM_LAYERS]
Definition: CSCCathodeLCTProcessor.h:176
CSCConstants::MAX_NUM_STRIPS_7CFEBS
Definition: CSCConstants.h:25
CSCCathodeLCTProcessor::def_pid_thresh_pretrig
static const unsigned int def_pid_thresh_pretrig
Definition: CSCCathodeLCTProcessor.h:208
CSCCathodeLCTProcessor::tmb_l1a_window_size
unsigned int tmb_l1a_window_size
Definition: CSCCathodeLCTProcessor.h:185
CSCLayerGeometry::stagger
int stagger() const
Definition: CSCLayerGeometry.h:124
CSCCathodeLCTProcessor::def_nplanes_hit_pretrig
static const unsigned int def_nplanes_hit_pretrig
Definition: CSCCathodeLCTProcessor.h:206
CSCCathodeLCTProcessor::hit_persist
unsigned int hit_persist
Definition: CSCCathodeLCTProcessor.h:182
CSCBaseboard::theChamber
unsigned theChamber
Definition: CSCBaseboard.h:49
CSCCathodeLCTProcessor::pid_thresh_pretrig
unsigned int pid_thresh_pretrig
Definition: CSCCathodeLCTProcessor.h:184
CSCCathodeLCTProcessor::PulseArray
unsigned int PulseArray[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS]
Definition: CSCCathodeLCTProcessor.h:101
CSCCathodeLCTProcessor::setDefaultConfigParameters
void setDefaultConfigParameters()
Definition: CSCCathodeLCTProcessor.cc:121
CSCCLCTDigi::getBX
uint16_t getBX() const
return BX
Definition: CSCCLCTDigi.h:99
me0TriggerPseudoDigis_cff.nStrips
nStrips
1.2 is to make the matching window safely the two nearest strips 0.35 is the size of an ME0 chamber i...
Definition: me0TriggerPseudoDigis_cff.py:26
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
CSCCathodeLCTProcessor::def_tmb_l1a_window_size
static const unsigned int def_tmb_l1a_window_size
Definition: CSCCathodeLCTProcessor.h:209
CSCCathodeLCTProcessor::fifo_pretrig
unsigned int fifo_pretrig
Definition: CSCCathodeLCTProcessor.h:181
CSCCathodeLCTProcessor::best_pid
unsigned int best_pid[CSCConstants::NUM_HALF_STRIPS_7CFEBS]
Definition: CSCCathodeLCTProcessor.h:144
CSCCathodeLCTProcessor::start_bx_shift
int start_bx_shift
Definition: CSCCathodeLCTProcessor.h:188
CSCCathodeLCTProcessor::clct_pattern_
CSCPatternBank::CLCTPatterns clct_pattern_
Definition: CSCCathodeLCTProcessor.h:155
qcdUeDQM_cfi.quality
quality
Definition: qcdUeDQM_cfi.py:31
trklet::bend
double bend(double r, double rinv, double stripPitch)
Definition: Util.h:160
CSCConstants::MAX_NUM_STRIPS_ME1A_GANGED
Definition: CSCConstants.h:41
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
CSCCLCTDigi::clear
void clear()
clear this CLCT
Definition: CSCCLCTDigi.cc:68
CSCDetId::chamberName
std::string chamberName() const
Definition: CSCDetId.cc:67
CSCCathodeLCTProcessor::patternFinding
bool patternFinding(const PulseArray pulse, const int nStrips, const unsigned int bx_time, std::map< int, std::map< int, CSCCLCTDigi::ComparatorContainer > > &hits_in_patterns)
Definition: CSCCathodeLCTProcessor.cc:832
CSCCathodeLCTProcessor::nplanes_hit_pretrig
unsigned int nplanes_hit_pretrig
Definition: CSCCathodeLCTProcessor.h:183
CSCConstants::KEY_CLCT_LAYER
Definition: CSCConstants.h:46
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
CSCDBL1TPParameters::clctFifoPretrig
unsigned int clctFifoPretrig() const
Definition: CSCDBL1TPParameters.h:53
CSCConstants::MAX_CLCT_TBINS
Definition: CSCConstants.h:61
relativeConstraints.chamber
chamber
Definition: relativeConstraints.py:53
MuonDigiCollection::Range
std::pair< const_iterator, const_iterator > Range
Definition: MuonDigiCollection.h:95
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
CSCBaseboard::theTrigChamber
const unsigned theTrigChamber
Definition: CSCBaseboard.h:46
CSCCLCTDigi::setBX
void setBX(const uint16_t bx)
set bx
Definition: CSCCLCTDigi.h:102
CSCConstants::MAX_NUM_STRIPS_ME1A_UNGANGED
Definition: CSCConstants.h:42
CSCConstants::NUM_HALF_STRIPS_7CFEBS
Definition: CSCConstants.h:28
CSCCathodeLCTProcessor::min_separation
unsigned int min_separation
Definition: CSCCathodeLCTProcessor.h:184
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
CSCConstants::CLCT_PATTERN_WIDTH
Definition: CSCConstants.h:52
CSCLayerGeometry::numberOfStrips
int numberOfStrips() const
Definition: CSCLayerGeometry.h:66
ntuplemaker.time
time
Definition: ntuplemaker.py:310
CSCConstants::NUM_HALF_STRIPS_PER_CFEB
Definition: CSCConstants.h:32
CSCCathodeLCTProcessor::checkConfigParameters
void checkConfigParameters()
Definition: CSCCathodeLCTProcessor.cc:155
CSCCathodeLCTProcessor::CLCT_STRIP_TYPE
Definition: CSCCathodeLCTProcessor.h:164
CSCCathodeLCTProcessor::drift_delay
unsigned int drift_delay
Definition: CSCCathodeLCTProcessor.h:182
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
CSCCathodeLCTProcessor::nplanes_hit_pattern
unsigned int nplanes_hit_pattern
Definition: CSCCathodeLCTProcessor.h:183
begin
#define begin
Definition: vmac.h:32
CSCBaseboard::isME11_
bool isME11_
Definition: CSCBaseboard.h:52
CSCCathodeLCTProcessor::CLCT_BX
Definition: CSCCathodeLCTProcessor.h:163
CSCPatternBank::clct_pattern_offset_
static const int clct_pattern_offset_[CSCConstants::CLCT_PATTERN_WIDTH]
Definition: CSCPatternBank.h:48
CSCConstants::CLCT_EMUL_TIME_OFFSET
Definition: CSCConstants.h:18
CSCCathodeLCTProcessor::cleanComparatorContainer
void cleanComparatorContainer(CSCCLCTDigi::ComparatorContainer &compHits) const
Definition: CSCCathodeLCTProcessor.cc:992
CSCCathodeLCTProcessor::CLCT_NUM_QUANTITIES
Definition: CSCCathodeLCTProcessor.h:167
CSCBaseboard::infoV
int infoV
Definition: CSCBaseboard.h:61
CSCBaseboard::theRing
unsigned theRing
Definition: CSCBaseboard.h:48