File indexing completed on 2024-11-15 23:40:40
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #ifndef L1MUBM_ASSIGNMENT_UNIT_H
0019 #define L1MUBM_ASSIGNMENT_UNIT_H
0020
0021
0022
0023
0024
0025 #include <vector>
0026 #include <iosfwd>
0027
0028
0029
0030
0031
0032
0033
0034
0035 #include "L1Trigger/L1TMuonBarrel/interface/L1MuBMLUTHandler.h"
0036 #include "CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h"
0037 #include "CondFormats/DataRecord/interface/L1TMuonBarrelParamsRcd.h"
0038
0039 #include "FWCore/Framework/interface/ESHandle.h"
0040 #include "FWCore/Framework/interface/EventSetup.h"
0041 #include "DataFormats/L1TMuon/interface/BMTF/L1MuBMAddressArray.h"
0042
0043 class L1MuBMTrackSegPhi;
0044 class L1MuBMSectorProcessor;
0045 class L1MuBMLUTHandler;
0046
0047
0048
0049
0050 class L1MuBMAssignmentUnit {
0051 public:
0052
0053 L1MuBMAssignmentUnit(L1MuBMSectorProcessor& sp, int id);
0054
0055
0056 ~L1MuBMAssignmentUnit();
0057
0058
0059 void run(const L1TMuonBarrelParams& mbtfParams);
0060
0061
0062 void reset();
0063
0064
0065 void PhiAU(const L1TMuonBarrelParams&);
0066
0067
0068 void PtAU(const L1TMuonBarrelParams&);
0069
0070
0071 void QuaAU();
0072 unsigned int Quality();
0073
0074
0075 void setPrecision();
0076
0077 private:
0078
0079 void TSR();
0080
0081
0082 const L1MuBMTrackSegPhi* getTSphi(int station) const;
0083
0084
0085 static int convertSector(int);
0086
0087
0088 static int getCharge(L1MuBMLUTHandler::PtAssMethod);
0089
0090
0091 L1MuBMLUTHandler::PtAssMethod getPtMethod() const;
0092 L1MuBMLUTHandler::PtAssMethod getPt1Method(L1MuBMLUTHandler::PtAssMethod) const;
0093 L1MuBMLUTHandler::PtAssMethod getPt2Method(L1MuBMLUTHandler::PtAssMethod) const;
0094
0095
0096 int getPtAddress(L1MuBMLUTHandler::PtAssMethod, int bendcharge = 0) const;
0097 int getPt1Address(L1MuBMLUTHandler::PtAssMethod) const;
0098 int getPt2Address(L1MuBMLUTHandler::PtAssMethod) const;
0099
0100
0101 int phiDiff(int stat1, int stat2) const;
0102
0103 private:
0104 L1MuBMSectorProcessor& m_sp;
0105 int m_id;
0106
0107 L1MuBMAddressArray m_addArray;
0108 std::vector<const L1MuBMTrackSegPhi*> m_TSphi;
0109 L1MuBMLUTHandler::PtAssMethod m_ptAssMethod;
0110
0111 L1MuBMLUTHandler* thePtaLUTs;
0112 L1MuBMLUTHandler* thePhiLUTs;
0113 unsigned short nbit_phi = 12;
0114 unsigned short nbit_phib = 10;
0115 };
0116
0117 #endif