CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions
CSCUpgradeAnodeLCTProcessor Class Reference

#include <CSCUpgradeAnodeLCTProcessor.h>

Inheritance diagram for CSCUpgradeAnodeLCTProcessor:
CSCAnodeLCTProcessor CSCBaseboard

Public Member Functions

 CSCUpgradeAnodeLCTProcessor (unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)
 
 ~CSCUpgradeAnodeLCTProcessor () override
 
- Public Member Functions inherited from CSCAnodeLCTProcessor
void clear ()
 
 CSCAnodeLCTProcessor (unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)
 
std::vector< CSCALCTDigigetALCTs () const
 
CSCALCTDigi getBestALCT (int bx) const
 
unsigned getInTimeHMT () const
 
unsigned getOutTimeHMT () const
 
CSCALCTDigi getSecondALCT (int bx) const
 
std::vector< CSCALCTPreTriggerDigipreTriggerDigis () const
 
std::vector< CSCALCTDigireadoutALCTs () const
 
CSCShowerDigi readoutShower () const
 
std::vector< CSCALCTDigirun (const CSCWireDigiCollection *wiredc)
 
void run (const std::vector< int > wire[CSCConstants::NUM_LAYERS][CSCConstants::MAX_NUM_WIREGROUPS])
 
void setConfigParameters (const CSCDBL1TPParameters *conf)
 
 ~CSCAnodeLCTProcessor () override=default
 
- Public Member Functions inherited from CSCBaseboard
 CSCBaseboard (unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)
 
 CSCBaseboard ()
 
std::string getCSCName () const
 
CSCDetId id () const
 
void setCSCGeometry (const CSCGeometry *g)
 
virtual ~CSCBaseboard ()=default
 

Private Member Functions

int getTempALCTQuality (int temp_quality) const override
 
void ghostCancellationLogicOneWire (const int key_wire, int *ghost_cleared) override
 

Additional Inherited Members

- Protected Member Functions inherited from CSCAnodeLCTProcessor
void accelMode (const int key_wire)
 
std::vector< CSCALCTDigibestTrackSelector (const std::vector< CSCALCTDigi > &all_alcts)
 
void checkConfigParameters ()
 
void cleanWireContainer (CSCALCTDigi::WireContainer &wireHits) const
 
void clear (const int wire, const int pattern)
 
void dumpConfigParams () const
 
void dumpDigis (const std::vector< int > wire[CSCConstants::NUM_LAYERS][CSCConstants::MAX_NUM_WIREGROUPS]) const
 
void encodeHighMultiplicityBits (const std::vector< int > wire[CSCConstants::NUM_LAYERS][CSCConstants::MAX_NUM_WIREGROUPS])
 
bool getDigis (const CSCWireDigiCollection *wiredc)
 
void getDigis (const CSCWireDigiCollection *wiredc, const CSCDetId &id)
 
bool isBetterALCT (const CSCALCTDigi &lhsALCT, const CSCALCTDigi &rhsALCT) const
 
void lctSearch ()
 
void loadPatternMask ()
 
bool patternDetection (const int key_wire, std::map< int, std::map< int, CSCALCTDigi::WireContainer > > &hits_in_patterns)
 
bool preTrigger (const int key_wire, const int start_bx)
 
bool pulseExtension (const std::vector< int > wire[CSCConstants::NUM_LAYERS][CSCConstants::MAX_NUM_WIREGROUPS])
 
void readWireDigis (std::vector< int > wire[CSCConstants::NUM_LAYERS][CSCConstants::MAX_NUM_WIREGROUPS])
 
void setDefaultConfigParameters ()
 
void setWireContainer (CSCALCTDigi &, CSCALCTDigi::WireContainer &wireHits) const
 
void showPatterns (const int key_wire)
 
void trigMode (const int key_wire)
 
- 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 inherited from CSCAnodeLCTProcessor
unsigned int accel_mode
 
CSCPatternBank::LCTPatterns alct_pattern_ = {}
 
CSCALCTDigi bestALCT [CSCConstants::MAX_ALCT_TBINS]
 
std::vector< CSCWireDigidigiV [CSCConstants::NUM_LAYERS]
 
unsigned int drift_delay
 
int early_tbins
 
unsigned int fifo_pretrig
 
unsigned int fifo_tbins
 
int first_bx [CSCConstants::MAX_NUM_WIREGROUPS]
 
int first_bx_corrected [CSCConstants::MAX_NUM_WIREGROUPS]
 
int ghost_cancellation_bx_depth
 
bool ghost_cancellation_side_quality
 
unsigned int hit_persist
 
unsigned inTimeHMT_
 
unsigned int l1a_window_width
 
std::vector< CSCALCTDigilct_list
 
int MESelection
 
unsigned minLayersCentralTBin_
 
bool narrow_mask_r1
 
unsigned int nplanes_hit_accel_pattern
 
unsigned int nplanes_hit_accel_pretrig
 
unsigned int nplanes_hit_pattern
 
unsigned int nplanes_hit_pretrig
 
int numWireGroups
 
unsigned outTimeHMT_
 
unsigned int pretrig_extra_deadtime
 
PulseArray pulse_
 
int quality [CSCConstants::MAX_NUM_WIREGROUPS][CSCConstants::NUM_ALCT_PATTERNS]
 
std::unique_ptr< LCTQualityControlqualityControl_
 
CSCALCTDigi secondALCT [CSCConstants::MAX_ALCT_TBINS]
 
CSCShowerDigi shower_
 
unsigned showerMaxInTBin_
 
unsigned showerMaxOutTBin_
 
unsigned showerMinInTBin_
 
unsigned showerMinOutTBin_
 
std::vector< CSCALCTPreTriggerDigithePreTriggerDigis
 
std::vector< unsigned > thresholds_
 
unsigned int trig_mode
 
bool use_corrected_bx
 
- Protected Attributes inherited from CSCBaseboard
edm::ParameterSet alctParams_
 
edm::ParameterSet clctParams_
 
edm::ParameterSet commonParams_
 
const CSCChambercscChamber_
 
const CSCGeometrycscGeometry_
 
CSCDetId cscId_
 
bool disableME1a_
 
bool enableAlctPhase2_
 
bool gangedME1a_
 
int infoV
 
bool isME11_
 
bool isME12_
 
bool isME13_
 
bool isME21_
 
bool isME22_
 
bool isME31_
 
bool isME32_
 
bool isME41_
 
bool isME42_
 
bool run3_
 
bool runCCLUT_
 
bool runCCLUT_OTMB_
 
bool runCCLUT_TMB_
 
bool runME11ILT_
 
bool runME11Up_
 
bool runME21ILT_
 
bool runME21Up_
 
bool runME31Up_
 
bool runME41Up_
 
bool runPhase2_
 
edm::ParameterSet showerParams_
 
unsigned theChamber
 
std::string theCSCName_
 
const unsigned theEndcap
 
int theRegion
 
unsigned theRing
 
const unsigned theSector
 
const unsigned theStation
 
const unsigned theSubsector
 
const unsigned theTrigChamber
 
edm::ParameterSet tmbParams_
 
- Static Protected Attributes inherited from CSCAnodeLCTProcessor
static const unsigned int def_accel_mode = 0
 
static const unsigned int def_drift_delay = 2
 
static const unsigned int def_fifo_pretrig = 10
 
static const unsigned int def_fifo_tbins = 16
 
static const unsigned int def_l1a_window_width = 7
 
static const unsigned int def_nplanes_hit_accel_pattern = 4
 
static const unsigned int def_nplanes_hit_accel_pretrig = 2
 
static const unsigned int def_nplanes_hit_pattern = 4
 
static const unsigned int def_nplanes_hit_pretrig = 2
 
static const unsigned int def_trig_mode = 2
 

Detailed Description

This class simulates the functionality of the anode LCT card. It is run by the MotherBoard and returns up to two AnodeLCTs. It can be run either in a test mode, where it is passed an array of wire times, or in normal mode where it determines the wire times from the wire digis.

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

Definition at line 16 of file CSCUpgradeAnodeLCTProcessor.h.

Constructor & Destructor Documentation

◆ CSCUpgradeAnodeLCTProcessor()

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

Normal constructor.

Definition at line 3 of file CSCUpgradeAnodeLCTProcessor.cc.

References CSCBaseboard::enableAlctPhase2_, and CSCBaseboard::runPhase2_.

9  : CSCAnodeLCTProcessor(endcap, station, sector, subsector, chamber, conf) {
10  if (!runPhase2_)
11  edm::LogError("CSCUpgradeAnodeLCTProcessor|ConfigError")
12  << "+++ Upgrade CSCUpgradeAnodeLCTProcessor constructed while runPhase2_ is not set! +++\n";
13 
14  if (!enableAlctPhase2_)
15  edm::LogError("CSCUpgradeAnodeLCTProcessor|ConfigError")
16  << "+++ Upgrade CSCUpgradeAnodeLCTProcessor constructed while enableAlctPhase2_ is not set! +++\n";
17 }
bool enableAlctPhase2_
Definition: CSCBaseboard.h:94
Log< level::Error, false > LogError
CSCAnodeLCTProcessor(unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)

◆ ~CSCUpgradeAnodeLCTProcessor()

CSCUpgradeAnodeLCTProcessor::~CSCUpgradeAnodeLCTProcessor ( )
inlineoverride

Default destructor.

Definition at line 27 of file CSCUpgradeAnodeLCTProcessor.h.

27 {};

Member Function Documentation

◆ getTempALCTQuality()

int CSCUpgradeAnodeLCTProcessor::getTempALCTQuality ( int  temp_quality) const
overrideprivatevirtual

Reimplemented from CSCAnodeLCTProcessor.

Definition at line 91 of file CSCUpgradeAnodeLCTProcessor.cc.

References CSCBaseboard::isME21_, CSCBaseboard::runME21ILT_, and CSCBaseboard::runPhase2_.

91  {
92  // Quality definition changed on 22 June 2007: it no longer depends
93  // on pattern_thresh.
94  int Q;
95  // hack to run the Phase-II GE2/1-ME2/1 with 3-layer ALCTs
96  if (temp_quality == 3 and runPhase2_ and runME21ILT_ and isME21_)
97  Q = 1;
98  else if (temp_quality > 3)
99  Q = temp_quality - 3;
100  else
101  Q = 0; // quality code 0 is valid!
102 
103  return Q;
104 }

◆ ghostCancellationLogicOneWire()

void CSCUpgradeAnodeLCTProcessor::ghostCancellationLogicOneWire ( const int  key_wire,
int *  ghost_cleared 
)
overrideprivatevirtual

Reimplemented from CSCAnodeLCTProcessor.

Definition at line 19 of file CSCUpgradeAnodeLCTProcessor.cc.

References dt, CSCAnodeLCTProcessor::first_bx, CSCAnodeLCTProcessor::first_bx_corrected, CSCAnodeLCTProcessor::ghost_cancellation_bx_depth, CSCAnodeLCTProcessor::ghost_cancellation_side_quality, CSCBaseboard::infoV, CSCBaseboard::isME21_, CSCAnodeLCTProcessor::lct_list, LogTrace, AlCaHLTBitMon_ParallelJobs::p, CSCAnodeLCTProcessor::quality, CSCBaseboard::runME21ILT_, CSCBaseboard::runPhase2_, and CSCAnodeLCTProcessor::use_corrected_bx.

19  {
20  for (int i_pattern = 0; i_pattern < 2; i_pattern++) {
21  ghost_cleared[i_pattern] = 0;
22  if (key_wire == 0)
23  continue;
24 
25  // Non-empty wire group.
26  int qual_this = quality[key_wire][i_pattern];
27  if (qual_this > 0) {
28  if (runPhase2_ and runME21ILT_ and isME21_)
29  qual_this = (qual_this & 0x03);
30  // Previous wire.
31  int dt = -1;
32  for (auto& p : lct_list) {
33  if (not(p.isValid() and p.getKeyWG() == key_wire - 1 and 1 - p.getAccelerator() == i_pattern))
34  continue;
35 
36  bool ghost_cleared_prev = false;
37  int qual_prev = p.getQuality();
38  int first_bx_prev = p.getBX();
39  if (infoV > 1)
40  LogTrace("CSCAnodeLCTProcessor")
41  << "ghost concellation logic " << ((i_pattern == 0) ? "Accelerator" : "Collision") << " key_wire "
42  << key_wire << " quality " << qual_this << " bx " << first_bx[key_wire] << " previous key_wire "
43  << key_wire - 1 << " quality " << qual_prev << " bx " << first_bx[key_wire - 1];
44 
45  //int dt = first_bx[key_wire] - first_bx[key_wire-1];
46  if (use_corrected_bx)
47  dt = first_bx_corrected[key_wire] - first_bx_prev;
48  else
49  dt = first_bx[key_wire] - first_bx_prev;
50  // hack to run the Phase-II ME2/1, ME3/1 and ME4/1 ILT
51  if (runPhase2_ and runME21ILT_ and isME21_)
52  qual_prev = (qual_prev & 0x03);
53 
54  // Cancel this wire
55  // 1) If the candidate at the previous wire is at the same bx
56  // clock and has better quality (or equal? quality - this has
57  // been implemented only in 2004).
58  // 2) If the candidate at the previous wire is up to 4 clocks
59  // earlier, regardless of quality.
60  if (dt == 0) {
61  if (qual_prev > qual_this)
62  ghost_cleared[i_pattern] = 1;
63  } else if (dt > 0 && dt <= ghost_cancellation_bx_depth) {
64  if ((!ghost_cancellation_side_quality) || (qual_prev > qual_this))
65  ghost_cleared[i_pattern] = 1;
66  } else if (dt < 0 && dt * (-1) <= ghost_cancellation_bx_depth) {
67  if ((!ghost_cancellation_side_quality) || (qual_prev < qual_this))
68  ghost_cleared_prev = true;
69  }
70 
71  if (ghost_cleared[i_pattern] == 1) {
72  if (infoV > 1)
73  LogTrace("CSCUpgradeAnodeLCTProcessor")
74  << ((i_pattern == 0) ? "Accelerator" : "Collision") << " pattern ghost cancelled on key_wire "
75  << key_wire << " q=" << qual_this << " by wire " << key_wire - 1 << " q=" << qual_prev
76  << " dt=" << dt;
77  //cancellation for key_wire is done when ALCT is created and pushed to lct_list
78  }
79  if (ghost_cleared_prev) {
80  if (infoV > 1)
81  LogTrace("CSCAnodeLCTProcessor")
82  << ((i_pattern == 0) ? "Accelerator" : "Collision") << " pattern ghost cancelled on key_wire "
83  << key_wire - 1 << " q=" << qual_prev << " by wire " << key_wire << " q=" << qual_this;
84  p.setValid(0); //clean prev ALCT
85  }
86  }
87  }
88  }
89 }
float dt
Definition: AMPTWrapper.h:136
int first_bx_corrected[CSCConstants::MAX_NUM_WIREGROUPS]
#define LogTrace(id)
std::vector< CSCALCTDigi > lct_list
int first_bx[CSCConstants::MAX_NUM_WIREGROUPS]
int quality[CSCConstants::MAX_NUM_WIREGROUPS][CSCConstants::NUM_ALCT_PATTERNS]