File indexing completed on 2024-04-06 12:19:27
0001 #ifndef L1Trigger_CSCSectorReceiverLUT_h
0002 #define L1Trigger_CSCSectorReceiverLUT_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include <L1Trigger/CSCTrackFinder/interface/CSCTrackFinderDataTypes.h>
0013 #include <FWCore/ParameterSet/interface/ParameterSet.h>
0014 #include <FWCore/ParameterSet/interface/FileInPath.h>
0015 #include "Geometry/CSCGeometry/interface/CSCGeometry.h"
0016
0017 class CSCLayer;
0018
0019 class CSCSectorReceiverLUT {
0020 public:
0021 CSCSectorReceiverLUT(int endcap, int sector, int subsector, int station, const edm::ParameterSet& pset, bool TMB07);
0022 CSCSectorReceiverLUT(const CSCSectorReceiverLUT&);
0023 ~CSCSectorReceiverLUT();
0024
0025 CSCSectorReceiverLUT& operator=(const CSCSectorReceiverLUT&);
0026
0027
0028
0029
0030
0031 lclphidat localPhi(int strip, int pattern, int quality, int lr, const bool gangedME1a = false) const;
0032 lclphidat localPhi(unsigned address, const bool gangedME1a = false) const;
0033 lclphidat localPhi(lclphiadd address, const bool gangedME1a = false) const;
0034
0035 gblphidat globalPhiME(int phi_local, int wire_group, int cscid, const bool gangedME1a = false) const;
0036 gblphidat globalPhiME(unsigned address, const bool gangedME1a = false) const;
0037 gblphidat globalPhiME(gblphiadd address, const bool gangedME1a = false) const;
0038
0039 gblphidat globalPhiMB(int phi_local, int wire_group, int cscid, const bool gangedME1a = false) const;
0040 gblphidat globalPhiMB(unsigned address, const bool gangedME1a = false) const;
0041 gblphidat globalPhiMB(gblphiadd address, const bool gangedME1a = false) const;
0042
0043 gbletadat globalEtaME(int phi_bend, int phi_local, int wire_group, int cscid, const bool gangedME1a = false) const;
0044 gbletadat globalEtaME(unsigned address, const bool gangedME1a = false) const;
0045 gbletadat globalEtaME(gbletaadd address, const bool gangedME1a = false) const;
0046
0047
0048 std::string encodeFileIndex() const;
0049
0050 void setCSCGeometry(const CSCGeometry* g) { csc_g = g; }
0051
0052 private:
0053 int _endcap, _sector, _subsector, _station;
0054
0055
0056 lclphidat calcLocalPhi(const lclphiadd& address) const;
0057
0058
0059 gblphidat calcGlobalPhiME(const gblphiadd& address) const;
0060 gblphidat calcGlobalPhiMB(const gblphidat& me_gphi_data) const;
0061 double getGlobalPhiValue(const CSCLayer* thelayer, const unsigned& strip, const unsigned& wire_group) const;
0062
0063
0064 gbletadat calcGlobalEtaME(const gbletaadd& address) const;
0065 double getGlobalEtaValue(const unsigned& cscid, const unsigned& wire_group, const unsigned& phi_local) const;
0066
0067 void fillLocalPhiLUT();
0068
0069 edm::FileInPath me_lcl_phi_file;
0070 edm::FileInPath me_gbl_phi_file;
0071 edm::FileInPath mb_gbl_phi_file;
0072 edm::FileInPath me_gbl_eta_file;
0073 bool LUTsFromFile;
0074 bool useMiniLUTs;
0075 bool isBinary;
0076
0077 bool isTMB07;
0078
0079
0080
0081 void readLUTsFromFile();
0082
0083 static bool me_lcl_phi_loaded;
0084 static lclphidat* me_lcl_phi;
0085 gblphidat *me_global_phi, *mb_global_phi;
0086 gbletadat* me_global_eta;
0087
0088 const CSCGeometry* csc_g;
0089 };
0090
0091 #endif