Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:11:08

0001 //-------------------------------------------------
0002 //
0003 /**  \class L1MuDTAssignmentUnit
0004  *
0005  *   Assignment Unit:
0006  *
0007  *   assigns pt, charge, phi
0008  *   and quality to a muon candidate
0009  *   found by the Track Assembler
0010  *
0011  *
0012  *
0013  *   N. Neumeister            CERN EP
0014  *   J. Troconiz              UAM Madrid
0015  */
0016 //
0017 //--------------------------------------------------
0018 #ifndef L1MUDT_ASSIGNMENT_UNIT_H
0019 #define L1MUDT_ASSIGNMENT_UNIT_H
0020 
0021 //---------------
0022 // C++ Headers --
0023 //---------------
0024 
0025 #include <vector>
0026 #include <iosfwd>
0027 
0028 //----------------------
0029 // Base Class Headers --
0030 //----------------------
0031 
0032 //------------------------------------
0033 // Collaborating Class Declarations --
0034 //------------------------------------
0035 
0036 #include "FWCore/Framework/interface/Frameworkfwd.h"
0037 #include "FWCore/Framework/interface/ESHandle.h"
0038 #include "FWCore/Framework/interface/ConsumesCollector.h"
0039 #include "FWCore/Utilities/interface/ESGetToken.h"
0040 #include "CondFormats/L1TObjects/interface/L1MuDTAssParam.h"
0041 #include "L1Trigger/DTTrackFinder/interface/L1MuDTAddressArray.h"
0042 class L1MuDTPhiLut;
0043 class L1MuDTPtaLut;
0044 class L1MuDTPhiLutRcd;
0045 class L1MuDTPtaLutRcd;
0046 class L1MuDTTrackSegPhi;
0047 class L1MuDTSectorProcessor;
0048 
0049 //              ---------------------
0050 //              -- Class Interface --
0051 //              ---------------------
0052 
0053 class L1MuDTAssignmentUnit {
0054 public:
0055   /// constructor
0056   L1MuDTAssignmentUnit(L1MuDTSectorProcessor& sp, int id, edm::ConsumesCollector);
0057 
0058   /// destructor
0059   ~L1MuDTAssignmentUnit();
0060 
0061   /// run Assignment Unit
0062   void run(const edm::EventSetup& c);
0063 
0064   /// reset Assignment Unit
0065   void reset();
0066 
0067   /// assign phi
0068   void PhiAU(const edm::EventSetup& c);
0069 
0070   /// assign pt and charge
0071   void PtAU(const edm::EventSetup& c);
0072 
0073   /// assign quality
0074   void QuaAU();
0075 
0076   /// set precision of phi and phib
0077   void setPrecision();
0078 
0079 private:
0080   /// Track Segment Router
0081   void TSR();
0082 
0083   /// get track segment from a given station
0084   const L1MuDTTrackSegPhi* getTSphi(int station) const;
0085 
0086   /// convert sector Id to 8 bit code (= sector center)
0087   int convertSector(int);
0088 
0089   /// determine charge
0090   int getCharge(PtAssMethod);
0091 
0092   /// determine pt assignment method
0093   PtAssMethod getPtMethod() const;
0094 
0095   /// calculate bend angle
0096   int getPtAddress(PtAssMethod, int bendcharge = 0) const;
0097 
0098   /// build difference of two phi values
0099   int phiDiff(int stat1, int stat2) const;
0100 
0101 private:
0102   L1MuDTSectorProcessor& m_sp;
0103   int m_id;
0104 
0105   L1MuDTAddressArray m_addArray;
0106   std::vector<const L1MuDTTrackSegPhi*> m_TSphi;
0107   PtAssMethod m_ptAssMethod;
0108 
0109   edm::ESGetToken<L1MuDTPhiLut, L1MuDTPhiLutRcd> thePhiToken;
0110   edm::ESGetToken<L1MuDTPtaLut, L1MuDTPtaLutRcd> thePtaToken;
0111   edm::ESHandle<L1MuDTPhiLut> thePhiLUTs;  ///< phi-assignment look-up tables
0112   edm::ESHandle<L1MuDTPtaLut> thePtaLUTs;  ///< pt-assignment look-up tables
0113   unsigned short nbit_phi;                 ///< # of bits used for pt-assignment
0114   unsigned short nbit_phib;                ///< # of bits used for pt-assignment
0115 };
0116 
0117 #endif