Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-07-22 22:47:08

0001 #ifndef L1Trigger_CSCTriggerPrimitives_LCTQualityAssignment_h
0002 #define L1Trigger_CSCTriggerPrimitives_LCTQualityAssignment_h
0003 
0004 /** \class LCTQualityAssignment
0005  *
0006  * Helper class to calculate the quality of an LCT. There
0007  * is a Run-2 quality (also used for Run-1) based on the
0008  * pattern Id and the number of layers. There are two Run-3
0009  * LCTs qualities. One for the non-GEM TMBs and one for OTMBs
0010  * which receive GEM information.
0011  *
0012  * \author Sven Dildick (Rice University)
0013  * \updates by Giovanni Mocellin (UC Davis)
0014  *
0015  */
0016 
0017 #include "L1Trigger/CSCTriggerPrimitives/interface/CSCBaseboard.h"
0018 #include "DataFormats/CSCDigi/interface/CSCCLCTDigi.h"
0019 #include "DataFormats/CSCDigi/interface/CSCALCTDigi.h"
0020 #include "L1Trigger/CSCTriggerPrimitives/interface/GEMInternalCluster.h"
0021 
0022 class LCTQualityAssignment : public CSCBaseboard {
0023 public:
0024   // 4-bit LCT quality number. Made by TMB lookup tables and used for MPC sorting.
0025   enum class LCT_QualityRun2 : unsigned int {
0026     INVALID = 0,
0027     NO_CLCT = 1,
0028     NO_ALCT = 2,
0029     CLCT_LAYER_TRIGGER = 3,
0030     LOW_QUALITY = 4,
0031     MARGINAL_ANODE_CATHODE = 5,
0032     HQ_ANODE_MARGINAL_CATHODE = 6,
0033     HQ_CATHODE_MARGINAL_ANODE = 7,
0034     HQ_ACCEL_ALCT = 8,
0035     HQ_RESERVED_1 = 9,
0036     HQ_RESERVED_2 = 10,
0037     HQ_PATTERN_2_3 = 11,
0038     HQ_PATTERN_4_5 = 12,
0039     HQ_PATTERN_6_7 = 13,
0040     HQ_PATTERN_8_9 = 14,
0041     HQ_PATTERN_10 = 15
0042   };
0043 
0044   // See DN-20-016
0045   enum class LCT_QualityRun3 : unsigned int { INVALID = 0, LowQ = 1, MedQ = 2, HighQ = 3 };
0046 
0047   // See DN-20-016
0048   enum class LCT_QualityRun3GEM : unsigned int {
0049     INVALID = 0,
0050     CLCT_2GEM = 1,
0051     ALCT_2GEM = 2,
0052     ALCT_CLCT = 3,
0053     ALCT_CLCT_1GEM_CSCBend = 4,
0054     ALCT_CLCT_1GEM_GEMCSCBend = 5,
0055     ALCT_CLCT_2GEM_CSCBend = 6,
0056     ALCT_CLCT_2GEM_GEMCSCBend = 7
0057   };
0058 
0059   // constructor
0060   LCTQualityAssignment(unsigned endcap,
0061                        unsigned station,
0062                        unsigned sector,
0063                        unsigned subsector,
0064                        unsigned chamber,
0065                        const edm::ParameterSet& conf);
0066 
0067   /** Default destructor. */
0068   ~LCTQualityAssignment() override {}
0069 
0070   // setter
0071   void setGEMCSCBending(const bool setBend) { assignGEMCSCBending_ = setBend; }
0072 
0073   // quality for all LCTs in Run-1/2 or Run-3
0074   unsigned findQuality(const CSCALCTDigi& aLCT, const CSCCLCTDigi& cLCT) const;
0075   unsigned findQuality(const CSCALCTDigi& aLCT, const CSCCLCTDigi& cLCT, const GEMInternalCluster& cl) const;
0076   unsigned findQuality(const CSCALCTDigi& aLCT, const GEMInternalCluster& cl) const;
0077   unsigned findQuality(const CSCCLCTDigi& cLCT, const GEMInternalCluster& cl) const;
0078 
0079 private:
0080   // quality for all LCTs in Run-1 and Run-2 (run-3 mode off)
0081   unsigned findQualityRun2(const CSCALCTDigi& aLCT, const CSCCLCTDigi& cLCT) const;
0082 
0083   // quality for non-ME1/1 LCTs in Run-3 without GEMs (run-3 mode on)
0084   unsigned findQualityRun3(const CSCALCTDigi& aLCT, const CSCCLCTDigi& cLCT) const;
0085 
0086   // quality for LCTs in Run-3 with GEMs (CCLUT off)
0087   // old-style to be compatible with EMTF Run-2
0088   unsigned findQualityGEMv1(const CSCCLCTDigi&, const GEMInternalCluster& cl) const;
0089   unsigned findQualityGEMv1(const CSCALCTDigi&, const CSCCLCTDigi&, const GEMInternalCluster& cl) const;
0090 
0091   // quality for LCTs in Run-3 with GEMs (CCLUT on)
0092   unsigned findQualityGEMv2(const CSCALCTDigi&, const CSCCLCTDigi&, const GEMInternalCluster& cl) const;
0093 
0094   bool assignGEMCSCBending_;
0095   bool runILT_;
0096 };
0097 
0098 #endif