Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 //-------------------------------------------------
0002 //
0003 /**  \class L1MuDTExtrapolationUnit
0004  *
0005  *   Extrapolation Unit:
0006  *
0007  *   The Extrapolation Unit attempts to join
0008  *   track segment pairs of different stations.
0009  *   it contains 12 Single Extrapolation Units
0010  *   to perform all extrapolations in its 
0011  *   own wheel and 6 Single Extrapolation Units
0012  *   to perform all extrapolations
0013  *   in the adjacent wheel (next wheel neighbour)
0014  *
0015  *
0016  *
0017  *   N. Neumeister            CERN EP
0018  */
0019 //
0020 //--------------------------------------------------
0021 #ifndef L1MUDT_EXTRAPOLATION_UNIT_H
0022 #define L1MUDT_EXTRAPOLATION_UNIT_H
0023 
0024 //---------------
0025 // C++ Headers --
0026 //---------------
0027 
0028 #include <utility>
0029 #include <map>
0030 #include <bitset>
0031 
0032 //----------------------
0033 // Base Class Headers --
0034 //----------------------
0035 
0036 //------------------------------------
0037 // Collaborating Class Declarations --
0038 //------------------------------------
0039 
0040 #include "CondFormats/L1TObjects/interface/L1MuDTExtParam.h"
0041 #include "FWCore/Framework/interface/Frameworkfwd.h"
0042 #include "FWCore/Framework/interface/ESHandle.h"
0043 #include "FWCore/Framework/interface/ConsumesCollector.h"
0044 class L1MuDTSectorProcessor;
0045 class L1MuDTSEU;
0046 class L1MuDTTFParameters;
0047 class L1MuDTTFParametersRcd;
0048 class L1MuDTExtLut;
0049 class L1MuDTExtLutRcd;
0050 //              ---------------------
0051 //              -- Class Interface --
0052 //              ---------------------
0053 
0054 class L1MuDTExtrapolationUnit {
0055 public:
0056   typedef std::pair<Extrapolation, unsigned int> SEUId;
0057   typedef std::map<SEUId, L1MuDTSEU*, std::less<SEUId> > SEUmap;
0058 
0059   /// constructor
0060   L1MuDTExtrapolationUnit(const L1MuDTSectorProcessor&, edm::ConsumesCollector);
0061 
0062   /// destructor
0063   ~L1MuDTExtrapolationUnit();
0064 
0065   /// run Extrapolation Unit
0066   void run(const edm::EventSetup& c);
0067 
0068   /// reset Extrapolation Unit
0069   void reset();
0070 
0071   /// reset a single extrapolation
0072   void reset(Extrapolation ext, unsigned int startAdr, unsigned int relAdr);
0073 
0074   /// get extrapolation address from a given ERS
0075   unsigned short int getAddress(Extrapolation ext, unsigned int startAdr, int id) const;
0076 
0077   /// get extrapolation quality from a given ERS
0078   unsigned short int getQuality(Extrapolation ext, unsigned int startAdr, int id) const;
0079 
0080   /// get Extrapolator table for a given SEU
0081   const std::bitset<12>& getEXTable(Extrapolation ext, unsigned int startAdr) const;
0082 
0083   /// get Quality Sorter table for a given SEU
0084   const std::bitset<12>& getQSTable(Extrapolation ext, unsigned int startAdr) const;
0085 
0086   /// return number of successful extrapolations
0087   int numberOfExt() const;
0088 
0089   /// print all successful extrapolations
0090   void print(int level = 0) const;
0091 
0092   /// return station of start and target track segment for a given extrapolation
0093   static std::pair<int, int> which_ext(Extrapolation ext);
0094 
0095 private:
0096   const L1MuDTSectorProcessor& m_sp;  // reference to Sector Processor
0097 
0098   SEUmap m_SEUs;  // Single Extrapolation Units
0099 
0100   const edm::ESGetToken<L1MuDTTFParameters, L1MuDTTFParametersRcd> m_parsToken;
0101   const edm::ESGetToken<L1MuDTExtLut, L1MuDTExtLutRcd> m_extLUTsToken;
0102 };
0103 
0104 #endif