Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:31:03

0001 //-------------------------------------------------
0002 //
0003 /**  \class DTConfigLUTs
0004  *
0005  *   Configurable parameters and constants 
0006  *   for Level-1 Muon DT Trigger - LUTs
0007  *
0008  *
0009  *   \author S. Vanini
0010  *
0011  */
0012 //
0013 //--------------------------------------------------
0014 #ifndef DT_CONFIG_LUTs_H
0015 #define DT_CONFIG_LUTs_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 "L1TriggerConfig/DTTPGConfig/interface/DTConfig.h"
0031 
0032 //              ---------------------
0033 //              -- Class Interface --
0034 //              ---------------------
0035 
0036 class DTConfigLUTs : public DTConfig {
0037 public:
0038   //! Constructor
0039   DTConfigLUTs(const edm::ParameterSet& ps);
0040 
0041   //! Empty Constructor
0042   DTConfigLUTs(){};
0043 
0044   //! Constructor from string
0045   DTConfigLUTs(bool debug, unsigned short int* buffer);
0046 
0047   //! Destructor
0048   ~DTConfigLUTs() override;
0049 
0050   //! Debug flag
0051   inline bool debug() const { return m_debug; }
0052 
0053   //! BTIC parameter
0054   inline int BTIC() const { return m_btic; }
0055 
0056   //! d: distance vertex to normal, unit cm.
0057   inline float D() const { return m_d; }
0058 
0059   //! Xcn: distance vertex to normal, unit cm.
0060   inline float Xcn() const { return m_Xcn; }
0061 
0062   //! wheel sign (-1 or +1)
0063   inline int Wheel() const { return m_wheel; }
0064 
0065   //! Set single parameter functions
0066   inline void setDebug(bool debug) { m_debug = debug; }
0067   inline void setBTIC(int btic) { m_btic = btic; }
0068   inline void setD(float d) { m_d = d; }
0069   inline void setXCN(float Xcn) { m_Xcn = Xcn; }
0070   inline void setWHEEL(int wheel) { m_wheel = wheel; }
0071 
0072   //! Print the setup
0073   void print() const;
0074 
0075   //!  DSP to IEEE32 conversion
0076   void DSPtoIEEE32(short DSPmantissa, short DSPexp, float* f) const;
0077 
0078   //!  IEEE32 to DSP conversion
0079   void IEEE32toDSP(float f, short int& DSPmantissa, short int& DSPexp) const;
0080 
0081   /*  //! Return pointer to parameter set */
0082   /*   const edm::ParameterSet* getParameterSet() { return m_ps; } */
0083 
0084 private:
0085   //! Load pset values into class variables
0086   void setDefaults(const edm::ParameterSet& m_ps);
0087 
0088   bool m_debug;
0089   int m_btic;
0090   float m_d;
0091   float m_Xcn;
0092   int m_wheel;
0093 };
0094 
0095 #endif