Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 //-------------------------------------------------
0002 //
0003 /**  \class DTConfigBti
0004  *
0005  *   Configurable parameters and constants 
0006  *   for Level-1 Muon DT Trigger - Bti chip 
0007  *
0008  *   \author  S. Vanini
0009  *
0010  */
0011 //
0012 //--------------------------------------------------
0013 #ifndef DT_CONFIG_BTI_H
0014 #define DT_CONFIG_BTI_H
0015 
0016 //---------------
0017 // C++ Headers --
0018 //---------------
0019 
0020 //----------------------
0021 // Base Class Headers --
0022 //----------------------
0023 
0024 //------------------------------------
0025 // Collaborating Class Declarations --
0026 //------------------------------------
0027 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0028 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfig.h"
0029 #include "L1TriggerConfig/DTTPGConfig/interface/BitArray.h"
0030 #include <cstdint>
0031 
0032 //              ---------------------
0033 //              -- Class Interface --
0034 //              ---------------------
0035 
0036 class DTConfigBti : DTConfig {
0037 public:
0038   /*  //! constants: first and last step to start trigger finding
0039   static const unsigned int NSTEPL=24, NSTEPF=9;
0040   */
0041 
0042   //! Constructor
0043   DTConfigBti(const edm::ParameterSet& ps);
0044 
0045   //! Empty Constructor
0046   DTConfigBti() { ; }
0047 
0048   //! Constructor from string
0049   DTConfigBti(int debug, unsigned short int* buffer);
0050 
0051   //! Destructor
0052   ~DTConfigBti() override;
0053 
0054   //! Set default parameters
0055   void setDefaults(const edm::ParameterSet& ps);
0056 
0057   //! Debug flag
0058   inline int debug() const { return m_debug; }
0059 
0060   //! Max drift time in 12.5 ns steps
0061   inline float ST() const { return (float)(0.75 * ST43() + 0.25 * RE43()); }
0062 
0063   //! Max K param accepted: max bit number
0064   inline int KCut() const { return m_kcut; }
0065 
0066   //! BTI angular acceptance in theta view
0067   inline int KAccTheta() const { return m_kacctheta; }
0068 
0069   //! X-patterns flag XON: activates tracks passing on the same side of 3 wires
0070   inline bool XON() const { return m_xon; }
0071 
0072   //! LTS
0073   inline int LTS() const { return m_lts; }
0074 
0075   //! SET
0076   inline int SET() const { return m_set; }
0077 
0078   //! Acceptance pattern AC1
0079   inline int AccPattAC1() const { return m_ac1; }
0080 
0081   //! Acceptance pattern AC2
0082   inline int AccPattAC2() const { return m_ac2; }
0083 
0084   //! Acceptance pattern ACH
0085   inline int AccPattACH() const { return m_ach; }
0086 
0087   //! Acceptance pattern ACL
0088   inline int AccPattACL() const { return m_acl; }
0089 
0090   //! Redundant patterns flag RONDTBti/src/DTBtiChipEquations.cc:
0091   inline bool RONflag() const { return m_ron; }
0092 
0093   //! Pattern mask flag
0094   inline int PTMSflag(int patt) const { return m_pattmask.element(patt); }
0095 
0096   //! Wire mask flag
0097   inline int WENflag(int wire) const { return m_wiremask.element(wire - 1); }
0098 
0099   //! K left limit for left traco
0100   inline int LL() const { return m_ll; }
0101 
0102   //! K right limit for left traco
0103   inline int LH() const { return m_lh; }
0104 
0105   //! K left limit for center traco
0106   inline int CL() const { return m_cl; }
0107 
0108   //! K right limit for center traco
0109   inline int CH() const { return m_ch; }
0110 
0111   //! K left limit for right traco
0112   inline int RL() const { return m_rl; }
0113 
0114   //! K right limit for right traco
0115   inline int RH() const { return m_rh; }
0116 
0117   //! ST and RE parameters for drift velocity
0118   inline int ST43() const { return m_4st3; }
0119   inline int RE43() const { return m_4re3; }
0120 
0121   //! Wire DEAD time parameter
0122   inline int DEADpar() const { return m_dead; }
0123 
0124   //! Set single parameter functions
0125   //! Set debug flag
0126   inline void setDebug(int debug) { m_debug = debug; }
0127 
0128   //! Set Max K param accepted: max bit number
0129   inline void setKCut(int KCut) { m_kcut = KCut; }
0130 
0131   //! Set BTI angular acceptance in theta view
0132   inline void setKAccTheta(int KAccTh) { m_kacctheta = KAccTh; }
0133 
0134   //! Set X-patterns flag XON: activates tracks passing on the same side of 3 wires
0135   inline void setXON(bool XON) { m_xon = XON; }
0136 
0137   //! Set LTS
0138   inline void setLTS(int LTS) { m_lts = LTS; }
0139 
0140   //! Set SET
0141   inline void setSET(int SET) { m_set = SET; }
0142 
0143   //! Set Acceptance pattern AC1
0144   inline void setAccPattAC1(int AC1) { m_ac1 = AC1; }
0145 
0146   //! Set Acceptance pattern AC2
0147   inline void setAccPattAC2(int AC2) { m_ac2 = AC2; }
0148 
0149   //! Set Acceptance pattern ACH
0150   inline void setAccPattACH(int ACH) { m_ach = ACH; }
0151 
0152   //! Set Acceptance pattern ACL
0153   inline void setAccPattACL(int ACL) { m_acl = ACL; }
0154 
0155   //! Set Redundant patterns flag RONDTBti/src/DTBtiChipEquations.cc:
0156   inline void setRONflag(bool RON) { m_ron = RON; }
0157 
0158   //! Set Pattern mask flag
0159   inline void setPTMSflag(int mask, int patt) { m_pattmask.set(patt, mask); }
0160 
0161   //! Set Wire mask flag
0162   inline void setWENflag(int mask, int wire) { m_wiremask.set(wire - 1, mask); }
0163 
0164   //! Set K left limit for left traco
0165   inline void setLL(int LL) { m_ll = LL; }
0166 
0167   //! Set K right limit for left traco
0168   inline void setLH(int LH) { m_lh = LH; }
0169 
0170   //! Set K left limit for center traco
0171   inline void setCL(int CL) { m_cl = CL; }
0172 
0173   //! Set K right limit for center traco
0174   inline void setCH(int CH) { m_ch = CH; }
0175 
0176   //! Set K left limit for right traco
0177   inline void setRL(int RL) { m_rl = RL; }
0178 
0179   //! Set K right limit for right traco
0180   inline void setRH(int RH) { m_rh = RH; }
0181 
0182   //! Set ST and RE parameters for drift velocity
0183   inline void setST43(int ST43) { m_4st3 = ST43; }
0184   inline void setRE43(int RE43) { m_4re3 = RE43; }
0185 
0186   //! Wire DEAD time parameter
0187   inline void setDEADpar(int DEAD) { m_dead = DEAD; }
0188 
0189   //! Print the setup
0190   void print() const;
0191 
0192   /*   //! Return pointer to parameter set  */
0193   /*   const edm::ParameterSet* getParameterSet() { return m_ps; } */
0194 
0195 private:
0196   //  const edm::ParameterSet* m_ps;
0197 
0198   int8_t m_debug;
0199   int8_t m_kcut;
0200   int8_t m_kacctheta;
0201   bool m_xon;
0202   int8_t m_lts;
0203   int8_t m_set;
0204   int8_t m_ac1;
0205   int8_t m_ac2;
0206   int8_t m_ach;
0207   int8_t m_acl;
0208   bool m_ron;
0209   BitArray<32> m_pattmask;
0210   BitArray<9> m_wiremask;
0211   int8_t m_ll;
0212   int8_t m_lh;
0213   int8_t m_cl;
0214   int8_t m_ch;
0215   int8_t m_rl;
0216   int8_t m_rh;
0217   int8_t m_4st3;
0218   int8_t m_4re3;
0219   int8_t m_dead;
0220 };
0221 
0222 #endif