Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:14

0001 //-------------------------------------------------
0002 //
0003 /**  \class DTConfigSectColl
0004  *
0005  *   Configurable parameters and constants 
0006  *   for Level-1 Muon DT Trigger - SectorCollector
0007  *
0008  *
0009  *   \author c. Battilana
0010  *
0011  */
0012 //
0013 //--------------------------------------------------
0014 #ifndef DT_CONFIG_SECTCOLL_H
0015 #define DT_CONFIG_SECTCOLL_H
0016 
0017 //---------------
0018 // C++ Headers --
0019 //---------------
0020 #include <iostream>
0021 
0022 //----------------------
0023 // Base Class Headers --
0024 //----------------------
0025 
0026 //------------------------------------
0027 // Collaborating Class Declarations --
0028 //------------------------------------
0029 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0030 #include "FWCore/Utilities/interface/Exception.h"
0031 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfig.h"
0032 
0033 //              ---------------------
0034 //              -- Class Interface --
0035 //              ---------------------
0036 
0037 class DTConfigSectColl : public DTConfig {
0038 public:
0039   //! Constants: number of TSTheta/TSPhi in input to Sector Collector
0040   static const int NTSTSC = 3, NTSPSC = 5;
0041 
0042   //! Constant: maximum number of Sector Collector sorting Chip in input to Sector Collector
0043   static const int NDTSC = 4;
0044 
0045   //! Constructor
0046   DTConfigSectColl(const edm::ParameterSet& ps);
0047 
0048   //! Constructor
0049   DTConfigSectColl();
0050 
0051   //! Destructor
0052   ~DTConfigSectColl() override;
0053 
0054   //! Return the debug flag
0055   inline bool debug() const { return m_debug; }
0056 
0057   //! Return carry in Sector Collector for station istat (1 means enabled, 0 disabled)
0058   inline bool SCGetCarryFlag(int istat) const {
0059     if (istat < 1 || istat > 4) {
0060       throw cms::Exception("DTTPG") << "DTConfigSectColl::SCGetCarryFlag: station number out of range: istat=" << istat
0061                                     << std::endl;
0062     }
0063     return m_scecf[istat - 1];
0064   }
0065 
0066   //! Return coarsesync parameter in Sector Collector for station istat (5 is second MB4 station)
0067   inline int CoarseSync(int istat) const {
0068     if (istat < 1 || istat > 5) {
0069       throw cms::Exception("DTTPG") << "DTConfigSectColl::CoarseSync: station number out of range: istat=" << istat
0070                                     << std::endl;
0071     }
0072     return m_sccsp[istat - 1];
0073   }
0074 
0075   // Set Methods
0076   //! Set debug flag
0077   inline void setDebug(bool debug) { m_debug = debug; }
0078 
0079   //! Set carry in Sector Collector for station istat (1 means enabled, 0 disabled)
0080   void setSCCarryFlag(bool scecf, int istat);
0081 
0082   //! Return coarsesync parameter in Sector Collector for station istat (5 is second MB4 station)
0083   void setCoarseSync(int sccsp, int istat);
0084 
0085   //! Print the setup
0086   void print() const;
0087 
0088 private:
0089   //! Load pset values into class variables
0090   void setDefaults(const edm::ParameterSet& ps);
0091 
0092   bool m_debug;
0093   bool m_scecf[4];
0094   int m_sccsp[5];
0095 };
0096 
0097 #endif