Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:20:50

0001 //-------------------------------------------------
0002 //
0003 /**  \class L1MuBMExtrapolationUnit
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 L1MUBM_EXTRAPOLATION_UNIT_H
0022 #define L1MUBM_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 "CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h"
0042 #include "CondFormats/DataRecord/interface/L1TMuonBarrelParamsRcd.h"
0043 #include "FWCore/Framework/interface/ConsumesCollector.h"
0044 #include "FWCore/Framework/interface/EventSetup.h"
0045 class L1MuBMSectorProcessor;
0046 class L1MuBMSEU;
0047 class L1MuDTTFParameters;
0048 
0049 //              ---------------------
0050 //              -- Class Interface --
0051 //              ---------------------
0052 
0053 class L1MuBMExtrapolationUnit {
0054 public:
0055   typedef std::pair<Extrapolation, unsigned int> SEUId;
0056   typedef std::map<SEUId, L1MuBMSEU*, std::less<SEUId> > SEUmap;
0057 
0058   /// constructor
0059   L1MuBMExtrapolationUnit(const L1MuBMSectorProcessor&, edm::ConsumesCollector iC);
0060 
0061   /// destructor
0062   ~L1MuBMExtrapolationUnit();
0063 
0064   /// run Extrapolation Unit
0065   void run(const edm::EventSetup& c);
0066 
0067   /// reset Extrapolation Unit
0068   void reset();
0069 
0070   /// reset a single extrapolation
0071   void reset(Extrapolation ext, unsigned int startAdr, unsigned int relAdr);
0072 
0073   /// get extrapolation address from a given ERS
0074   unsigned short int getAddress(Extrapolation ext, unsigned int startAdr, int id) const;
0075 
0076   /// get extrapolation quality from a given ERS
0077   unsigned short int getQuality(Extrapolation ext, unsigned int startAdr, int id) const;
0078 
0079   /// get Extrapolator table for a given SEU
0080   const std::bitset<12>& getEXTable(Extrapolation ext, unsigned int startAdr) const;
0081 
0082   /// get Quality Sorter table for a given SEU
0083   const std::bitset<12>& getQSTable(Extrapolation ext, unsigned int startAdr) const;
0084 
0085   /// return number of successful extrapolations
0086   int numberOfExt() const;
0087 
0088   /// print all successful extrapolations
0089   void print(int level = 0) const;
0090 
0091   /// return station of start and target track segment for a given extrapolation
0092   static std::pair<int, int> which_ext(Extrapolation ext);
0093 
0094 private:
0095   const L1MuBMSectorProcessor& m_sp;  // reference to Sector Processor
0096 
0097   mutable SEUmap m_SEUs;  // Single Extrapolation Units
0098 
0099   edm::ESGetToken<L1TMuonBarrelParams, L1TMuonBarrelParamsRcd> m_paramsToken;
0100   L1MuDTTFParameters pars;
0101 };
0102 
0103 #endif