CMS 3D CMS Logo

/data/git/CMSSW_5_3_11_patch5/src/L1Trigger/CSCTrackFinder/interface/CSCSectorReceiverLUT.h

Go to the documentation of this file.
00001 #ifndef L1Trigger_CSCSectorReceiverLUT_h
00002 #define L1Trigger_CSCSectorReceiverLUT_h
00003 
00012 #include <L1Trigger/CSCTrackFinder/interface/CSCTrackFinderDataTypes.h>
00013 #include <FWCore/ParameterSet/interface/ParameterSet.h>
00014 #include <FWCore/ParameterSet/interface/FileInPath.h>
00015 
00016 class CSCLayer;
00017 
00018 class CSCSectorReceiverLUT
00019 {
00020  public:
00021 
00022   CSCSectorReceiverLUT(int endcap, int sector, int subsector, int station, const edm::ParameterSet &pset, bool TMB07);
00023   CSCSectorReceiverLUT(const CSCSectorReceiverLUT&);
00024   ~CSCSectorReceiverLUT();
00025 
00026   CSCSectorReceiverLUT& operator=(const CSCSectorReceiverLUT&);
00027 
00029 
00032   lclphidat localPhi(int strip, int pattern, int quality, int lr) const;
00033   lclphidat localPhi(unsigned address) const;
00034   lclphidat localPhi(lclphiadd address) const;
00035 
00036   gblphidat globalPhiME(int phi_local, int wire_group, int cscid) const;
00037   gblphidat globalPhiME(unsigned address) const;
00038   gblphidat globalPhiME(gblphiadd address) const;
00039 
00040   gblphidat globalPhiMB(int phi_local,int wire_group, int cscid) const;
00041   gblphidat globalPhiMB(unsigned address) const;
00042   gblphidat globalPhiMB(gblphiadd address) const;
00043 
00044   gbletadat globalEtaME(int phi_bend, int phi_local, int wire_group, int cscid) const;
00045   gbletadat globalEtaME(unsigned address) const;
00046   gbletadat globalEtaME(gbletaadd address) const;
00047 
00049   std::string encodeFileIndex() const;
00050 
00051  private:
00052   int _endcap, _sector, _subsector, _station;
00053 
00055   lclphidat calcLocalPhi(const lclphiadd& address) const;
00056 
00058   gblphidat calcGlobalPhiME(const gblphiadd& address) const;
00059   gblphidat calcGlobalPhiMB(const gblphidat& me_gphi_data) const;
00060   double getGlobalPhiValue(const CSCLayer* thelayer, const unsigned& strip, const unsigned& wire_group) const;
00061 
00063   gbletadat calcGlobalEtaME(const gbletaadd& address) const;
00064   double getGlobalEtaValue(const unsigned& cscid, const unsigned& wire_group, const unsigned& phi_local) const;
00065 
00066   void fillLocalPhiLUT();
00067 
00068   edm::FileInPath me_lcl_phi_file;
00069   edm::FileInPath me_gbl_phi_file;
00070   edm::FileInPath mb_gbl_phi_file;
00071   edm::FileInPath me_gbl_eta_file;
00072   bool LUTsFromFile; // readLUTs from file or generate on the fly
00073   bool useMiniLUTs;  // if useMiniLUTs is set to true, the code will generate LUTs using the CSCSectorReceiverMiniLUTs class -- BJ
00074   bool isBinary;     // if readLUTs is set to true, are the LUT files binary or ascii format
00075 
00076   bool isTMB07;       // use the TMB 2007 patterns or the older set of parameters
00077 
00080   void readLUTsFromFile();
00081 
00082   static bool me_lcl_phi_loaded;
00083   static lclphidat* me_lcl_phi;
00084   gblphidat* me_global_phi, *mb_global_phi;
00085   gbletadat* me_global_eta;
00086 };
00087 
00088 #endif