Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:34

0001 #ifndef L1Trigger_CSCTriggerPrimitives_CSCPatternBank_h
0002 #define L1Trigger_CSCTriggerPrimitives_CSCPatternBank_h
0003 
0004 #include "DataFormats/CSCDigi/interface/CSCConstants.h"
0005 #include <vector>
0006 
0007 //
0008 // Class with only static members that contains the ALCT and CLCT trigger patterns
0009 //
0010 
0011 class CSCPatternBank {
0012 public:
0013   // typedef used for both ALCT and CLCT
0014   typedef std::vector<std::vector<int> > LCTPattern;
0015   typedef std::vector<LCTPattern> LCTPatterns;
0016 
0017   /** Pre-defined ALCT patterns. */
0018 
0019   // key wire offsets for ME1 and ME2 are the same
0020   // offsets for ME3 and ME4 are the same
0021   static const int alct_keywire_offset_[2][CSCConstants::ALCT_PATTERN_WIDTH];
0022 
0023   // Since the test beams in 2003, both collision patterns are "completely
0024   // open".  This is our current default.
0025   static const LCTPatterns alct_pattern_legacy_;
0026 
0027   // Special option for narrow pattern for ring 1 stations
0028   static const LCTPatterns alct_pattern_r1_;
0029 
0030   /** Pre-defined CLCT patterns. */
0031 
0032   // New set of halfstrip patterns for 2007 version of the algorithm.
0033   // For the given pattern, set the unused parts of the pattern to 0.
0034   // The bend direction is given by the next-to-last number in the the 6th layer
0035   // Bend of 0 is right/straight and bend of 1 is left.
0036   // The pattern maximum width is the last number in the the 6th layer
0037   // Use during Run-1 and Run-2
0038   static const LCTPatterns clct_pattern_legacy_;
0039 
0040   /**
0041    * Fill the pattern lookup table. This table holds the average position
0042    * and bend for each pattern. The position is used to further improve
0043    * the phi resolution, and the bend is passed on to the track finding code
0044    * to allow it to better determine the tracks.
0045    * These were determined from Monte Carlo by running 100,000 events through
0046    * the code and finding the offset for each pattern type.
0047    * Note that the positions are unitless-- they are in "pattern widths"
0048    * meaning that they are in 1/2 strips for high pt patterns and distrips
0049    * for low pt patterns. BHT 26 June 2001
0050    */
0051   static double getLegacyPosition(int pattern);
0052 
0053   // New patterns for Run-3
0054   static const LCTPatterns clct_pattern_run3_;
0055 
0056   // half strip offsets per layer for each half strip in the pattern envelope
0057   static const int clct_pattern_offset_[CSCConstants::CLCT_PATTERN_WIDTH];
0058 
0059   // static function to return the sign of the bending in a CLCT pattern
0060   static int getPatternBend(const LCTPattern& pattern) {
0061     return pattern[CSCConstants::NUM_LAYERS - 1][CSCConstants::CLCT_PATTERN_WIDTH];
0062   }
0063 };
0064 
0065 #endif