Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-13 03:16:00

0001 #ifndef L1Trigger_CSCTriggerPrimitives_CSCUpgradeCathodeLCTProcessor_h
0002 #define L1Trigger_CSCTriggerPrimitives_CSCUpgradeCathodeLCTProcessor_h
0003 
0004 /** \class CSCUpgradeCathodeLCTProcessor
0005  *
0006  * This class simulates the functionality of the cathode LCT card. It is run by
0007  * the MotherBoard and returns up to two CathodeLCTs.  It can be run either in
0008  * a test mode, where it is passed arrays of halfstrip times,
0009  * or in normal mode where it determines the time and comparator
0010  * information from the comparator digis.
0011  *
0012  * Updates for high pileup running by Vadim Khotilovich (TAMU), December 2012
0013  *
0014  * Updates for integrated local trigger with GEMs by
0015  * Sven Dildick (TAMU) and Tao Huang (TAMU), April 2015
0016  *
0017  * Removing usage of outdated class CSCTriggerGeometry by Sven Dildick (TAMU)
0018  */
0019 
0020 #include "L1Trigger/CSCTriggerPrimitives/interface/CSCCathodeLCTProcessor.h"
0021 
0022 #include <vector>
0023 
0024 class CSCUpgradeCathodeLCTProcessor : public CSCCathodeLCTProcessor {
0025 public:
0026   /** Normal constructor. */
0027   CSCUpgradeCathodeLCTProcessor(unsigned endcap,
0028                                 unsigned station,
0029                                 unsigned sector,
0030                                 unsigned subsector,
0031                                 unsigned chamber,
0032                                 const edm::ParameterSet& conf);
0033 
0034 private:
0035   /* Phase2 version. Check all half-strip pattern envelopes simultaneously,
0036      on every clock cycle, for a matching pattern */
0037   bool preTrigger(const int start_bx, int& first_bx) override;
0038 
0039   /* Phase-2 version of the CLCT finder function */
0040   std::vector<CSCCLCTDigi> findLCTs(
0041       const std::vector<int> halfstrip[CSCConstants::NUM_LAYERS][CSCConstants::MAX_NUM_HALF_STRIPS_RUN2_TRIGGER])
0042       override;
0043 
0044   // mark half-strip zones around pretriggers that happened at the current first_bx
0045   void markPreTriggerZone(bool pretrig_zone[CSCConstants::MAX_NUM_HALF_STRIPS_RUN2_TRIGGER]) const;
0046 
0047   // update the deadzone after finding a pretrigger
0048   void markBusyZone(const int bx);
0049 
0050   /* is a given half-strip in a pretrigger dead zone */
0051   bool busyMap_[CSCConstants::MAX_NUM_HALF_STRIPS_RUN2_TRIGGER][CSCConstants::MAX_CLCT_TBINS];
0052 
0053   /** VK: use of localized dead-time zones */
0054   bool use_dead_time_zoning_;
0055 
0056   /* +/- half-strips around a keystrip that are dead
0057      for a few BX after a CLCT was found*/
0058   unsigned int clct_state_machine_zone_;
0059 
0060   /** VK: allow triggers only in +-pretrig_trig_zone around pretriggers */
0061   unsigned int pretrig_trig_zone_;
0062 };
0063 
0064 #endif