diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TGCTriggerData.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TGCTriggerData.h
index 2f926924555d63e59d30ffac5764a291b92946f2..e423319aacce0ed8ff1861ac61bf7035b4a3d4f5 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TGCTriggerData.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TGCTriggerData.h
@@ -11,11 +11,72 @@
 #include <map>
 #include <vector>
 
+
+/** Contents of Run-2 BW-CW LUT
+ *  ===========================
+ *   std::unordered_map<GLOBALADDR, PTVALUE>
+ *  where
+ *   GLOBALADDR | 27 bits | unsigned int  | side, octant, type, phimod2, module, roi,
+ *                                        | DR(0...0x1f for -15...15)<<4 & DPhi(0...0xf for -7...7)
+ *   PTVALUE    |  3 bits | unsigned char | pT value (0x0 and 0x7 is no cand.)
+ *
+ *  for GLOBALADDR
+ *  | 29 |28|27|26|25|24|23|   22  |21|20|19|18|17|16|15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0|
+ *  |side| octant | 0|type |phimod2|  module   |          RoI          | 0|   delta R    | delta Phi |
+ *  where side   = 0x0 (A-side), 0x1 (C-side).
+ *        octant = 0x(0...7)
+ *        type   = 0x0 (HH), 0x1 (HL), 0x2 (LH), 0x3 (LL): HL means 3-station-wire and 2-station-strip.
+ */
+
 class TGCTriggerData
 {
  friend class TGCTriggerDbAlg;
 
  public:
+  /// Mask for extracting the side from the GLOBALADDR
+  static constexpr uint8_t SIDE_MASK = 0x1;
+  /// Bit position of the side bit in the GLOBALADDR
+  static constexpr uint8_t SIDE_SHIFT = 29;
+  /// Mask for extracting the octant from the GLOBALADDR
+  static constexpr uint8_t OCTANT_MASK = 0x7;
+  /// Bit position of the octant bits in the GLOBALADDR
+  static constexpr uint8_t OCTANT_SHIFT = 26;
+  /// Mask for extracting the octant from the GLOBALADDR
+  static constexpr uint8_t TYPE_MASK = 0x7;
+  /// Bit position of the octant bits in the GLOBALADDR
+  static constexpr uint8_t TYPE_SHIFT = 26;
+  /// Mask for extracting the phi(F or B) from the GLOBALADDR
+  static constexpr uint8_t PHIMOD2_MASK = 0x1;
+  /// Bit position of the module number bits in the GLOBALADDR
+  static constexpr uint8_t PHIMOD2_SHIFT = 22;
+  /// Mask for extracting the module number from the GLOBALADDR
+  static constexpr uint8_t MODULE_MASK = 0xf;
+  /// Bit position of the module number bits in the GLOBALADDR
+  static constexpr uint8_t MODULE_SHIFT = 18;
+  /// Mask for extracting the module number from the GLOBALADDR
+  static constexpr uint8_t ROI_MASK = 0xff;
+  /// Bit position of the module number bits in the GLOBALADDR
+  static constexpr uint8_t ROI_SHIFT = 10;
+  /// Mask for extracting the deltaR from the GLOBALADDR
+  static constexpr uint8_t DR_MASK = 0x1f;
+  /// Bit position of the deltaR bits in the GLOBALADDR
+  static constexpr uint8_t DR_SHIFT = 4;
+  /// Mask for extracting the deltaPhi from the GLOBALADDR
+  static constexpr uint8_t DPHI_MASK = 0xf;
+  /// Bit position of the deltaPhi bits in the GLOBALADDR
+  static constexpr uint8_t DPHI_SHIFT = 0;
+  /// Mask for pT value for Run-2
+  static constexpr uint8_t PT_MASK = 0x7;
+
+  /// Range of DR in the BW coincidence window for 3-station
+  static constexpr uint8_t DR_HIGH_RANGE = 15;
+  /// Range of DR in the BW coincidence window for 2-station
+  static constexpr uint8_t DR_LOW_RANGE = 7;
+  /// Range of DPhi in the BW coincidence window for 3-station
+  static constexpr uint8_t DPHI_HIGH_RANGE = 7;
+  /// Range of DPhi in the BW coincidence window for 2-station
+  static constexpr uint8_t DPHI_LOW_RANGE = 3;
+
   enum {CW_BW=0, CW_EIFI=1, CW_TILE=2, CW_NUM=3};
   enum {N_PT_THRESH=6,
         N_SIDE=2,
@@ -40,7 +101,9 @@ class TGCTriggerData
   std::string getType(int cwtype, int channel = 0) const;
   bool isActive(int cwtype, int channel = 0) const;
 
-  const std::map<unsigned short, std::map<unsigned short, unsigned char>>& getPtMapBw(const unsigned char side, const unsigned char octant) const;
+  int8_t getTYPE(const int16_t lDR, const int16_t hDR, const int16_t lDPhi, const int16_t hDPhi) const;
+
+  uint8_t getBigWheelPt(const uint32_t addr) const;
 
   unsigned short getTrigBitEifi(int side, int slot, int ssc, int sectorId) const;
   unsigned char getFlagPtEifi(int side, int ssc, int sectorId) const;
@@ -58,24 +121,8 @@ class TGCTriggerData
   std::vector<std::string> m_type[CW_NUM];
   std::vector<bool>        m_active[CW_NUM];
 
-  /** Contents of Run-2 BW-CW LUT
-   *  ===========================
-   *     map<OCTANT, map<SUBSECADDR, map<DELTAADDR, PTVALUE> > >
-   *  where
-   *   OCTANT     |  4 bits | unsigned char  | side(A=0, C=1)<<3 & octant(0...7)
-   *   SUBSECADDR | 16 bits | unsigned short | consists of type, phimod2, module, and roi
-   *   DELTAADDR  |  9 bits | unsigned short | DR(0...0x1f for -15...15)<<4 & DPhi(0...0xf for -7...7)
-   *   PTVALUE    |  3 bits | unsigned char  | pT value (0x0 and 0x7 is no cand.)
-   *
-   *  for SUBSECADDR
-   *  | 15 | 14 | 13 |    12   | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
-   *  |  0 |  type   | phimod2 |      module     |              RoI              |
-   *  where type = 0x0 (HH), 0x1 (HL), 0x2 (LH), 0x3 (LL): HL means 3-station-wire and 2-station-strip.
-   *  This may reduce the malloc size when the fullCW option is not used.
-   */
-  std::map<unsigned char, std::map<unsigned short, std::map<unsigned short, unsigned char>>> m_ptmap_bw;
-
-//  std::map<int, std::map<int,int> > m_readmap_bw[N_SIDE][N_OCTANT][N_PT_THRESH];
+  /// Run-2 BW-CW LUT map
+  std::unordered_map<uint32_t, uint8_t> m_ptmap_bw;
 
   /** Bit information of Run-2 EIFI-LUT
    *  =================================
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TGCTriggerDbAlg.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TGCTriggerDbAlg.h
index 9b0625987b5a7a6ddbeae0332c5b4144b07dbfb7..dc273c4a02551787b34ad950816f75ebc39c5cd9 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TGCTriggerDbAlg.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TGCTriggerDbAlg.h
@@ -21,11 +21,6 @@ class TGCTriggerDbAlg: public AthAlgorithm
     virtual StatusCode execute() override;
     virtual StatusCode finalize() override;
  
-  protected:
-    char getTYPE(const short lDR, const short hDR, const short lDPhi, const short hDPhi) const;
-    unsigned short getRoIAddr(const char type, const unsigned char phimod2, 
-                              const unsigned short module, const unsigned short roi) const;
- 
   private:
     void loadParameters(TGCTriggerData* writeCdo,
                         const CondAttrListCollection* readKey,
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/TGCTriggerData.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/TGCTriggerData.cxx
index 6a015fcbe01bf5736d67724005fa61ed45186cb7..a2780baf183c6fa156f9c3f9fb128b2c710519c9 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/TGCTriggerData.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/TGCTriggerData.cxx
@@ -43,12 +43,23 @@ bool TGCTriggerData::isActive(int cwtype, int channel) const {
   return m_active[cwtype][channel];
 }
 
-const std::map<unsigned short, std::map<unsigned short, unsigned char>>& TGCTriggerData::getPtMapBw(const unsigned char side, const unsigned char octant) const
+int8_t TGCTriggerData::getTYPE(const int16_t lDR, const int16_t hDR, const int16_t lDPhi, const int16_t hDPhi) const
 {
-  unsigned char octantbit = (side<<3) + octant;
-  std::map<unsigned char, std::map<unsigned short, std::map<unsigned short, unsigned char>>>::const_iterator it = m_ptmap_bw.find(octantbit);
-  if(it == m_ptmap_bw.end()) return m_ptmap_bw.find(0)->second;  // also for non-full-CW
-  return it->second;
+  if((lDR == -DR_HIGH_RANGE) && (hDR == DR_HIGH_RANGE)) {
+    if     ((lDPhi == -DPHI_HIGH_RANGE) && (hDPhi == DPHI_HIGH_RANGE)) return COIN_HH;
+    else if((lDPhi == -DPHI_LOW_RANGE) && (hDPhi == DPHI_LOW_RANGE))   return COIN_HL;
+  } else if((lDR == -DR_LOW_RANGE) && (hDR == DR_LOW_RANGE)) {
+    if     ((lDPhi == -DPHI_HIGH_RANGE) && (hDPhi == DPHI_HIGH_RANGE)) return COIN_LH;
+    else if((lDPhi == -DPHI_LOW_RANGE) && (hDPhi == DPHI_LOW_RANGE))   return COIN_LL;
+  }
+  return -1;
+}
+
+uint8_t TGCTriggerData::getBigWheelPt(const uint32_t addr) const
+{
+  std::unordered_map<uint32_t, uint8_t>::const_iterator it = m_ptmap_bw.find(addr);
+  if(it == m_ptmap_bw.end()) return 0x0;        // outside from defined window, i.e. pT=0
+  else                       return it->second;
 }
 
 unsigned short TGCTriggerData::getTrigBitEifi(int side, int slot, int ssc, int sectorId) const
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/TGCTriggerDbAlg.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/TGCTriggerDbAlg.cxx
index 90ce64629775056d15027bc3d2c4765a9fd83723..a40a3adb2c7e8dd504f94a73a515219785934484 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/TGCTriggerDbAlg.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/TGCTriggerDbAlg.cxx
@@ -182,10 +182,6 @@ void TGCTriggerDbAlg::loadParameters(TGCTriggerData* writeCdo,
 
 void TGCTriggerDbAlg::fillReadMapBw(TGCTriggerData* writeCdo)
 {
-  for(auto peroctant : writeCdo->m_ptmap_bw) {
-    for(auto persubsec : peroctant.second) persubsec.second.clear();
-  }
-
   if (!writeCdo->isActive(TGCTriggerData::CW_BW)) {
     return;
   }
@@ -193,18 +189,18 @@ void TGCTriggerDbAlg::fillReadMapBw(TGCTriggerData* writeCdo)
   bool fullCW = (writeCdo->getType(TGCTriggerData::CW_BW) == "full");
   std::string vername = writeCdo->getVersion(TGCTriggerData::CW_BW);
 
-  const int kNMODULETYPE = 12;
-  const unsigned short modulenumber[kNMODULETYPE]    = {0, 1, 2, 2, 3, 4, 5, 5, 6, 7, 8, 8};
+  const uint8_t kNMODULETYPE = 12;
+  const uint8_t modulenumber[kNMODULETYPE]    = {0, 1, 2, 2, 3, 4, 5, 5, 6, 7, 8, 8};
   const std::string modulename[kNMODULETYPE]         = {"0","1","2a","2b","3","4","5a","5b","6","7","8a","8b"};
   const std::string sidename[TGCTriggerData::N_SIDE] = {"A","C"};
 
   for(size_t iSide = 0; iSide < TGCTriggerData::N_SIDE; iSide++) {
     for(size_t iOctant = 0; iOctant < TGCTriggerData::N_OCTANT; iOctant++) {
 
-      std::map<unsigned short, std::map<unsigned short, unsigned char>> per_octant;
-      //   SUBSECADDR | 16 bits | unsigned int  |
+      uint32_t octaddr = (iSide<<TGCTriggerData::SIDE_SHIFT) +
+                         ((iOctant & TGCTriggerData::OCTANT_MASK)<<TGCTriggerData::OCTANT_SHIFT);
 
-      for(int iModule = 0; iModule < kNMODULETYPE; iModule++) {
+      for(size_t iModule = 0; iModule < kNMODULETYPE; iModule++) {
 
         std::ostringstream dbname;
         dbname << "RPhiCoincidenceMap.";
@@ -216,79 +212,62 @@ void TGCTriggerDbAlg::fillReadMapBw(TGCTriggerData* writeCdo)
 
         char delimiter = '\n';
         std::string field, tag;
-        unsigned char phimod2 = modulename[iModule].find("b") != std::string::npos ? 1 : 0;
+        uint32_t phimod2 = modulename[iModule].find("b") != std::string::npos ? 1 : 0;
 
-        std::map<unsigned short, unsigned char> pt_by_delta;
+        uint32_t modaddr = ((modulenumber[iModule] & TGCTriggerData::MODULE_MASK)<<TGCTriggerData::MODULE_SHIFT) +
+                           ((phimod2 & TGCTriggerData::PHIMOD2_MASK)<<TGCTriggerData::PHIMOD2_SHIFT);
 
         while (std::getline(stream, field, delimiter)) {
 
           std::istringstream header(field);
-          header>>tag;
+          header >> tag;
 
           if (tag == "#") { // read header part.
-            unsigned short ssId, mod;
-            short lDR, hDR, lDPhi, hDPhi;
-            unsigned short ptLevel;
-            header>>ptLevel>>ssId>>mod>>lDR>>hDR>>lDPhi>>hDPhi;
+            uint16_t ptLevel, roi, mod;
+            int16_t lDR, hDR, lDPhi, hDPhi;
+            header >> ptLevel >> roi >> mod >> lDR >> hDR >> lDPhi >> hDPhi;
 
-            char type = getTYPE( lDR, hDR, lDPhi, hDPhi );
+            int16_t type = writeCdo->getTYPE( lDR, hDR, lDPhi, hDPhi );
 
             // check moduleNumber and ptLevel
-            if (mod != modulenumber[iModule] || ptLevel > TGCTriggerData::N_PT_THRESH || type < 0 ) {
-              ATH_MSG_WARNING("Invalid configuration of DB file.");
+            if( mod != modulenumber[iModule] ||
+                ptLevel > TGCTriggerData::N_PT_THRESH || type < 0 ) {
+              ATH_MSG_WARNING("Invalid configuration of DB file! - Nothing to load this DB file");
               break;
             }
 
-            unsigned short roiaddr = getRoIAddr(type, phimod2, mod, ssId);
+            uint32_t cwaddr = ((uint8_t(type) & TGCTriggerData::TYPE_MASK)<<TGCTriggerData::TYPE_SHIFT) + 
+                              ((roi & TGCTriggerData::ROI_MASK)<<TGCTriggerData::ROI_SHIFT);
 
             // get window data
             std::getline(stream, field, delimiter);
             std::istringstream cont(field);
 
-            for (unsigned short ir = 0; ir < 31; ir++) {
-              unsigned int bit;
-              cont>>bit;
+            for (uint8_t ir = 0; ir < 31; ir++) {  // ir=0, 15 and 30 point to -15, 0 and +15 of dR, respectively.
+              uint32_t draddr = (ir & TGCTriggerData::DR_MASK)<<TGCTriggerData::DR_SHIFT;
+
+              uint32_t bit;
+              cont >> bit;
               if (bit == 0) continue; // none of window is opened in this dR
 
-              for(unsigned short iphi=0; iphi<15; iphi++) {
-                unsigned short delta = (ir<<4) + iphi;
-                if(bit>>iphi & 0x1) pt_by_delta[delta] = (unsigned char)(ptLevel & 0x7);
+              for(uint8_t iphi=0; iphi<15; iphi++) {  // iphi=0, 7 and 14 point to -7, 0 and +7 of dPhi, respectively.
+                if(bit>>iphi & 0x1) {
+                  uint32_t theaddr = octaddr + modaddr + cwaddr + draddr + iphi;
+                  writeCdo->m_ptmap_bw[theaddr] = (uint8_t)(ptLevel & TGCTriggerData::PT_MASK);
+                }
               }
             }
-            if((ptLevel&0x7) == 0x6) {
-              per_octant[roiaddr] = pt_by_delta;
-              pt_by_delta.clear();
-            }
 
           }   // end of if(tag)...
         }   // end of while(getline...)
       }   // end of for(iModule)
 
-      unsigned char octantbit = iSide<<3 & iOctant;
-      writeCdo->m_ptmap_bw[octantbit] = per_octant;
-
       if(!fullCW) break;
     }   // end of for(iOctant)
     if(!fullCW) break;
   }   // end of for(iSide)
 }
 
-char TGCTriggerDbAlg::getTYPE(const short lDR, const short hDR, const short lDPhi, const short hDPhi) const
-{
-  char type = -1;
-  if ( (lDR==-15) && (hDR==15) && (lDPhi==-7) && (hDPhi==7))      type = TGCTriggerData::COIN_HH;
-  else if ( (lDR==-15) && (hDR==15) && (lDPhi==-3) && (hDPhi==3)) type = TGCTriggerData::COIN_HL;
-  else if ( (lDR==-7) && (hDR==7) && (lDPhi==-7) && (hDPhi==7))   type = TGCTriggerData::COIN_LH;
-  else if ( (lDR==-7) && (hDR==7) && (lDPhi==-3) && (hDPhi==3))   type = TGCTriggerData::COIN_LL;
-  return type;
-}
-
-unsigned short TGCTriggerDbAlg::getRoIAddr(const char type, const unsigned char phimod2,
-                                           const unsigned short module, const unsigned short roi) const
-{
-  return (type<<13) + ((phimod2&0x1)<<12) + ((module&0xf)<<8) + roi;
-}
-
 void TGCTriggerDbAlg::fillTrigBitEifi(TGCTriggerData* writeCdo)
 {
   // remove all entries
diff --git a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCRPhiCoincidenceMap.h b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCRPhiCoincidenceMap.h
index e36fc2f90f069212e85d1685751839569ec31fa0..ac26c9bc229ad81cdba0d1d079d7ee3e2e4b08c2 100644
--- a/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCRPhiCoincidenceMap.h
+++ b/Trigger/TrigT1/TrigT1TGC/TrigT1TGC/TGCRPhiCoincidenceMap.h
@@ -17,11 +17,27 @@
 
 namespace LVL1TGCTrigger {
 
-class TGCRPhiCoincidenceMap {
-public:
-  bool test(int octantId, int moduleId, int subsector, 
-            int type, int pt, 
-            int dr, int dphi) const;// for Run2
+/** Contents of Run-2 BW-CW LUT
+ *  ===========================
+ *   std::unordered_map<GLOBALADDR, PTVALUE>
+ *  where
+ *   GLOBALADDR | 27 bits | unsigned int  | side, octant, type, phimod2, module, roi,
+ *                                        | DR(0...0x1f for -15...15)<<4 & DPhi(0...0xf for -7...7)
+ *   PTVALUE    |  3 bits | unsigned char | pT value (0x0 and 0x7 is no cand.)
+ *
+ *  for GLOBALADDR
+ *  | 29 |28|27|26|25|24|23|   22  |21|20|19|18|17|16|15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0|
+ *  |side| octant | 0|type |phimod2|  module   |          RoI          | 0|   delta R    | delta Phi |
+ *  where side   = 0x0 (A-side), 0x1 (C-side).
+ *        octant = 0x(0...7)
+ *        type   = 0x0 (HH), 0x1 (HL), 0x2 (LH), 0x3 (LL): HL means 3-station-wire and 2-station-strip.
+ */
+
+class TGCRPhiCoincidenceMap
+{
+ public:
+  uint8_t test(int octantId, int moduleId, int subsector, 
+               int type, int dr, int dphi) const;// for Run2
 
   int test_Run3(int octantId, int moduleId, int subsector, 
                 int type, int dr, int dphi) const; //for Run3
@@ -58,8 +74,6 @@ public:
   bool checkVersion();
   int PHIPOS(int iphi, int type) const;
   int SUBSECTORADD(int ssid, int modid, int phimod2, int type) const;
-  unsigned short getRoIAddr(const char type, const unsigned char phimod2,
-                            const unsigned short module, const unsigned short roi) const;
 
   int getMODID(int addr) const;
   int getSSID(int addr) const;
@@ -78,8 +92,8 @@ public:
               {'a',-1},{'b',-2},{'c',-3},{'d',-4},{'e',-5},{'f',-6},{'g',-7},{'h',-8},{'i',-9},{'j',-10},{'k',-11},{'l',-12},{'m',-13},{'n',-14},{'o',-15} };
 
 
-private:
-  std::map<int, std::map<int,int> > m_mapDB[N_PT_THRESH];//for Run2 [ptLevel]< RoI(&type),<RNumber,RWindow> >
+ private:
+  std::unordered_map<uint32_t, uint8_t> m_ptmap;
   std::map<int, std::map<int, std::map<int, char> > > m_mapDB_Run3;//for Run3 <RoI(&type),<R,<Phi,pT(char)> > >
 
 
@@ -133,15 +147,16 @@ inline
   m_fullCW = val;
 }
 
-inline
- int TGCRPhiCoincidenceMap::getTYPE(int lDR, int hDR, int lDPhi, int hDPhi ) const
- {
-   int type = -1;
-   if ( (lDR==-15) && (hDR==15) && (lDPhi==-7) && (hDPhi==7))      type = TMap_HH;
-   else if ( (lDR==-15) && (hDR==15) && (lDPhi==-3) && (hDPhi==3)) type = TMap_HL;
-   else if ( (lDR==-7) && (hDR==7) && (lDPhi==-7) && (hDPhi==7))   type = TMap_LH;
-   else if ( (lDR==-7) && (hDR==7) && (lDPhi==-3) && (hDPhi==3))   type = TMap_LL; 
-   return type; 
+inline int TGCRPhiCoincidenceMap::getTYPE(int lDR, int hDR, int lDPhi, int hDPhi) const
+{
+  if((lDR == -TGCTriggerData::DR_HIGH_RANGE) && (hDR == TGCTriggerData::DR_HIGH_RANGE)) {
+    if     ((lDPhi == -TGCTriggerData::DPHI_HIGH_RANGE) && (hDPhi == TGCTriggerData::DPHI_HIGH_RANGE)) return TGCTriggerData::COIN_HH;
+    else if((lDPhi == -TGCTriggerData::DPHI_LOW_RANGE) && (hDPhi == TGCTriggerData::DPHI_LOW_RANGE))   return TGCTriggerData::COIN_HL;
+  } else if((lDR == -TGCTriggerData::DR_LOW_RANGE) && (hDR == TGCTriggerData::DR_LOW_RANGE)) {
+    if     ((lDPhi == -TGCTriggerData::DPHI_HIGH_RANGE) && (hDPhi == TGCTriggerData::DPHI_HIGH_RANGE)) return TGCTriggerData::COIN_LH;
+    else if((lDPhi == -TGCTriggerData::DPHI_LOW_RANGE) && (hDPhi == TGCTriggerData::DPHI_LOW_RANGE))   return TGCTriggerData::COIN_LL;
+  }
+  return -1;
 }
 
 inline
@@ -171,12 +186,6 @@ inline
  int TGCRPhiCoincidenceMap::getTYPE(int addr) const
  { return ((addr>>16)&0x0003); }
 
-inline
- unsigned short TGCRPhiCoincidenceMap::getRoIAddr(const char type, const unsigned char phimod2,
-                                                  const unsigned short module, const unsigned short roi) const
-{
-  return ((type & 0x3)<<13) + ((phimod2&0x1)<<12) + (module<<8) + roi;
-}
 
 } //end of namespace bracket
 
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceMap.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceMap.cxx
index 628fda4087eb0469ea975f2d268285899526285d..71a19563d22194ca48f1ad1be3bae2223c42ba7b 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceMap.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceMap.cxx
@@ -24,54 +24,44 @@
 
 namespace LVL1TGCTrigger {
 
-bool TGCRPhiCoincidenceMap::test(int octantId, int moduleId, int subsector, 
-				 int type, int pt, 
-				 int dr, int dphi) const
-{  
-  // check pt range
-  if (pt<0 || pt>=N_PT_THRESH) return false;
-  if (type<0 || type>=N_TMap ) return false; 
+uint8_t TGCRPhiCoincidenceMap::test(int octantId, int moduleId, int subsector, 
+                                    int type, int dr, int dphi) const
+{
+  if (type<0 || type>=N_TMap) return 0;  // check the range of coincidence type
 
-  int sector=(moduleId-2)/3+octantId*3;
-  int phimod2 = (moduleId==2||moduleId==5||moduleId==8)&&(sector%2==1) ? 1 : 0;
+  uint16_t sector = (moduleId-2)/3 + octantId*3;  // sector number in the forward region (0...23)
+  // calculate whether the front or back side of the forward chamber
+  uint8_t phimod2 = (moduleId==2||moduleId==5||moduleId==8)&&(sector%2==1) ? 1 : 0;
+
+  uint32_t addr = ((type & TGCTriggerData::TYPE_MASK)<<TGCTriggerData::TYPE_SHIFT) +
+                  ((phimod2 & TGCTriggerData::PHIMOD2_MASK)<<TGCTriggerData::PHIMOD2_SHIFT) +
+                  ((moduleId & TGCTriggerData::MODULE_MASK)<<TGCTriggerData::MODULE_SHIFT) +
+                  ((subsector & TGCTriggerData::ROI_MASK)<<TGCTriggerData::ROI_SHIFT) +
+                  (((dr-DR_offset) & TGCTriggerData::DR_MASK)<<TGCTriggerData::DR_SHIFT) +
+                  (((dphi-DPhi_offset) & TGCTriggerData::DPHI_MASK)<<TGCTriggerData::DPHI_SHIFT);
+
+  uint8_t content = 0x0;   // outside from defined window, i.e. pT=0
 
   if(tgcArgs()->USE_CONDDB()) {
     SG::ReadCondHandle<TGCTriggerData> readHandle{m_readCondKey};
     const TGCTriggerData* readCdo{*readHandle};
 
-    std::map<unsigned short, std::map<unsigned short, unsigned char>> roiMap = readCdo->getPtMapBw(m_side, m_octant);
-
-    unsigned short addr = getRoIAddr((char)type, (unsigned char)phimod2, (unsigned short)moduleId, (unsigned short)subsector);
-    std::map<unsigned short, std::map<unsigned short, unsigned char> >::const_iterator it = roiMap.find(addr);
-    if(it == roiMap.end()) return false;
-
-    std::map<unsigned short, unsigned char> ptMap = it->second;
-    std::map<unsigned short, unsigned char>::const_iterator itWindow = ptMap.find( (((dr+15)&0x1f)<<4) + ((dphi+7)&0xf) );
-
-    if (itWindow == ptMap.end()) return false;
-
-    if ( (itWindow->second) == (pt+1) ) return true;
-    else return false;
-
+    bool fullCW = (readCdo->getType(TGCTriggerData::CW_BW) == "full");
+    if(fullCW) addr += (m_side<<TGCTriggerData::SIDE_SHIFT) +
+                       ((m_octant & TGCTriggerData::OCTANT_MASK)<<TGCTriggerData::OCTANT_SHIFT);
+    content = readCdo->getBigWheelPt(addr);
   } else {
-    int addr=SUBSECTORADD(subsector, moduleId, phimod2,type);
-    std::map<int, std::map<int, int> > readMap = m_mapDB[pt];
-
-    std::map<int, std::map<int, int> >::const_iterator it = readMap.find(addr);
-    if (it==(readMap.end())) return false;
+    if(m_fullCW) addr += (m_side<<TGCTriggerData::SIDE_SHIFT) +
+                         ((m_octant & TGCTriggerData::OCTANT_MASK)<<TGCTriggerData::OCTANT_SHIFT);
 
-    std::map<int, int> aMap = it->second;
-    std::map<int, int>::const_iterator itWindow= aMap.find( dr );
-    if (itWindow==aMap.end()) return false;
-
-    if ( (itWindow->second) & ( 1<<(PHIPOS(dphi,type)) ) ) return true;
-    else return false;
+    std::unordered_map<uint32_t, uint8_t>::const_iterator it = m_ptmap.find(addr);
+    if(it != m_ptmap.end()) content = it->second;
   }
 
+  return content;
 }
 
 
-
 int TGCRPhiCoincidenceMap::test_Run3(int octantId, int moduleId, int subsector, 
                                      int type, int dr, int dphi) const
 {  
@@ -112,15 +102,12 @@ int TGCRPhiCoincidenceMap::test_Run3(int octantId, int moduleId, int subsector,
 
 
 
-
-
 TGCRPhiCoincidenceMap::TGCRPhiCoincidenceMap(TGCArguments* tgcargs,
 					     const SG::ReadCondHandleKey<TGCTriggerData>& readCondKey,
 					     const SG::ReadCondHandleKey<TGCTriggerLUTs>& readLUTsCondKey,
-
                                              const std::string& version,
 					     int   sideId, int octantId)
-  :m_numberOfDR(0), m_numberOfDPhi(0),
+ : m_numberOfDR(0), m_numberOfDPhi(0),
    m_verName(version),
    m_side(sideId),
    m_octant(octantId),
@@ -132,13 +119,12 @@ TGCRPhiCoincidenceMap::TGCRPhiCoincidenceMap(TGCArguments* tgcargs,
   if (!tgcArgs()->USE_CONDDB()) {
     if(!tgcArgs()->useRun3Config()){
       if (!checkVersion()){
-      m_verName = "NA";
-      return;
+        m_verName = "NA";
+        return;
       }
       this->readMap();  // read Coincidence Map for Run2 (6 thresholds)
-    }
-    else{
-      this -> readMap_Run3();// read Coincidence Map for Run3 (15 thresholds)
+    } else {
+      this->readMap_Run3();// read Coincidence Map for Run3 (15 thresholds)
     }
   } 
 }
@@ -248,16 +234,11 @@ TGCRPhiCoincidenceMap& TGCRPhiCoincidenceMap::operator=(const TGCRPhiCoincidence
 
 bool TGCRPhiCoincidenceMap::readMap() 
 {
-  const int NumberOfModuleType=12;
-  const int ModuleNumber[NumberOfModuleType]  =
-    {  0,  1,   2,   2,  3,  4,   5,   5,  6,  7,   8,  8 };
-  const std::string ModuleName[NumberOfModuleType]=
-    {"0","1","2a","2b","3","4","5a","5b","6","7","8a","8b"};
-  const std::string SideName[NumberOfSide] = {"A","C"};
-  const std::string OctantName[NumberOfOctant] = 
-    {  "0", "1", "2", "3", "4", "5", "6", "7"};
+  const uint8_t kNMODULETYPE = 12;
+  const uint8_t modulenumber[kNMODULETYPE] = {0, 1, 2, 2, 3, 4, 5, 5, 6, 7, 8, 8};
+  const std::string modulename[kNMODULETYPE] = {"0","1","2a","2b","3","4","5a","5b","6","7","8a","8b"};
+  const std::string sidename[NumberOfSide] = {"A","C"};
 
-  
   IMessageSvc* msgSvc = 0;
   ISvcLocator* svcLocator = Gaudi::svcLocator();
   if (svcLocator->service("MessageSvc", msgSvc) == StatusCode::FAILURE) {
@@ -265,83 +246,82 @@ bool TGCRPhiCoincidenceMap::readMap()
   }
   MsgStream log(msgSvc, "TGCRPhiCoincidenceMap::TGCRPhiCoincidenceMap");
 
-  // initialize
-  enum{BufferSize=1024};
-  char buf[BufferSize];
-  std::string fn, fullName, tag;
-  int ssId,ptLevel,bit,mod;
+  uint32_t octaddr = (m_side<<TGCTriggerData::SIDE_SHIFT) +
+                     ((m_octant & TGCTriggerData::OCTANT_MASK)<<TGCTriggerData::OCTANT_SHIFT);
 
   // loop over all files...
-  for(int iModule=0; iModule<NumberOfModuleType; iModule+=1) {
-    int phimod2=ModuleName[iModule].find("b")!=std::string::npos ? 1 : 0;
-    std::ostringstream modName;
-    std::string fn = "RPhiCoincidenceMap.mod" 
-                      + ModuleName[iModule] + "." + m_verName +"._12.db";
-    if (m_fullCW) {
-      if ( (m_side>=0) && (m_side<NumberOfSide) && 
-	   (m_octant>=0) && (m_octant<NumberOfOctant)) {
-	fn = "RPhiCoincidenceMap." 
-	              + SideName[m_side] + OctantName[m_octant]  
-                      + ".mod" + ModuleName[iModule] 
-                      + "." + m_verName +"._12.db";
-      } 
+  for(int iModule=0; iModule<kNMODULETYPE; iModule+=1) {
+
+    std::ostringstream fn;
+    fn << "RPhiCoincidenceMap.";
+    if(m_fullCW) {
+      if( (m_side>=0) && (m_side<NumberOfSide) &&
+          (m_octant>=0) && (m_octant<NumberOfOctant)) {
+        fn << sidename[m_side] << m_octant << ".";
+      }
+    }
+    fn << "mod" << modulename[iModule] << "." << m_verName  << "._12.db";
+
+    std::string fullname = PathResolver::find_file(fn.str().c_str(), "DATAPATH");
+    if( fullname.length() == 0 ) {
+      log << MSG::ERROR
+          << " Could not found "
+          << fn.str().c_str() << endmsg;
+      return false ;
     }
 
-    int type = -1;
-    int lDR, hDR, lDPhi, hDPhi;
+    uint32_t phimod2 = (modulename[iModule].find("b") != std::string::npos) ? 1 : 0;
+    uint32_t modaddr = ((modulenumber[iModule] & TGCTriggerData::MODULE_MASK)<<TGCTriggerData::MODULE_SHIFT) +
+                       ((phimod2 & TGCTriggerData::PHIMOD2_MASK)<<TGCTriggerData::PHIMOD2_SHIFT);
 
-    fullName = PathResolver::find_file( fn.c_str(), "DATAPATH" );
-    if( fullName.length() == 0 ) { 
-      log << MSG::ERROR 
-	  << " Could not found " 
-	  << fn.c_str() << endmsg;
-      return false ;  
-    } 
+    std::ifstream file(fullname.c_str(),std::ios::in);
+    enum{BufferSize=1024};
+    char buf[BufferSize];
+
+    while(file.getline(buf,BufferSize)) {
 
-    std::ifstream file(fullName.c_str(),std::ios::in);    
-    while(file.getline(buf,BufferSize)){
       std::istringstream header(buf);
+      std::string tag;
+
       header>>tag;
-      if(tag=="#"){ // read header part.     
-	header>>ptLevel>>ssId>>mod>>lDR>>hDR>>lDPhi>>hDPhi;
-	type = getTYPE( lDR, hDR, lDPhi, hDPhi );
-	// check moduleNumber and ptLevel
-	if(mod!=ModuleNumber[iModule] || ptLevel>N_PT_THRESH || type<0 ) {
-	  log << MSG::WARNING 
-	      << " illegal parameter in database header : "
-	      << header.str()
-	      << " in file " << fn 
-	      << endmsg;
-	  break;
-	}
+      if(tag=="#") { // read header part.
+
+        uint16_t ptLevel, roi, mod;
+        int16_t lDR, hDR, lDPhi, hDPhi;
+        header >> ptLevel >> roi >> mod >> lDR >> hDR >> lDPhi >> hDPhi;
+
+        int16_t type = getTYPE( lDR, hDR, lDPhi, hDPhi );
+
+        // check moduleNumber and ptLevel
+        if(mod != modulenumber[iModule] || ptLevel > N_PT_THRESH || type<0 ) {
+          log << MSG::WARNING
+              << " illegal parameter in database header : "
+              << header.str()
+              << " in file " << fn.str()
+              << endmsg;
+          break;
+        }
 
-	// get window data
-	file.getline(buf,BufferSize);
-	std::istringstream cont(buf);
-	std::map<int, int> aWindow;
-	for(int ir=0; ir<=hDR-DR_offset; ir++) {
-	  cont>>bit;
-	  if (bit==0) continue; // none of window is opened in this dR
-	  aWindow[ir+DR_offset] = bit;
-	}
-	// Warning : no window 
-	if (aWindow.size()==0) {
-	  if (tgcArgs()->MSGLEVEL() <= MSG::DEBUG) {
-	    log << MSG::DEBUG
-		<< " No window is opened for (ptLevel,ssId,mod) = (" 
-		<< ptLevel << ", " << ssId << ", " << mod << ")" 
-		<<endmsg;
-	  }
-	}
-	int addr = SUBSECTORADD(ssId,mod,phimod2,type);
-	if (m_mapDB[ptLevel-1].find(addr)!=m_mapDB[ptLevel-1].end()) {
-	  if (tgcArgs()->MSGLEVEL() <= MSG::DEBUG) {
-	    log << MSG::DEBUG
-		<< "This subsector was already reserved." 
-		<< endmsg;
-	  }
-	} else {
-	  m_mapDB[ptLevel-1][addr]=aWindow;
+        uint32_t cwaddr = ((uint8_t(type) & TGCTriggerData::TYPE_MASK)<<TGCTriggerData::TYPE_SHIFT) + 
+                          ((roi & TGCTriggerData::ROI_MASK)<<TGCTriggerData::ROI_SHIFT);
+
+        // get window data
+        file.getline(buf,BufferSize);
+        std::istringstream cont(buf);
+
+        for(uint8_t ir=0; ir<=hDR-DR_offset; ir++) {
+          uint32_t draddr = (ir & TGCTriggerData::DR_MASK)<<TGCTriggerData::DR_SHIFT;
+
+          uint32_t bit;
+	  cont >> bit;
+	  if (bit == 0) continue;   // none of window is opened in this dR
+
+          for(uint8_t iphi=0; iphi<hDPhi-DPhi_offset; iphi++) {
+            if(bit>>iphi & 0x1) {
+              uint32_t theaddr = octaddr + modaddr + cwaddr + draddr + iphi;
+              m_ptmap[theaddr] = (uint8_t)(ptLevel & TGCTriggerData::PT_MASK);
+            }
+          }
 	}
       }
     }
diff --git a/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceMatrix.cxx b/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceMatrix.cxx
index b52714bd86b90db5cb60f6d59295fdf68ef9d258..419b91ffbf60ff2cad33b364c7588b9e3abb65b9 100644
--- a/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceMatrix.cxx
+++ b/Trigger/TrigT1/TrigT1TGC/src/TGCRPhiCoincidenceMatrix.cxx
@@ -67,10 +67,9 @@ TGCRPhiCoincidenceOut* TGCRPhiCoincidenceMatrix::doCoincidence()
   out->setIdSSC(m_SSCId);
 
   int j0 = -1;
-  int ptMax=-1;
+  int ptMax = 1;
   for( int j=m_nPhiHit-1; j>=0; j-=1){     // left half-SSC has priority when both output same pT
     int subsector;
-    int ptOut = -99;
     int chargeOut = 2;
     int CoincidenceTypeOut=-1;
 
@@ -80,9 +79,10 @@ TGCRPhiCoincidenceOut* TGCRPhiCoincidenceMatrix::doCoincidence()
       subsector = 4*(2*m_SSCId+m_r)+m_phi[j];
     }
     
-
     int type = m_map->getMapType(m_ptR, m_ptPhi[j]);
+
     // calculate pT of muon candidate
+    uint8_t ptOut = 0;   // 0 is no candidate.
     if(tgcArgs()->useRun3Config()){
       //Algorithm for Run3
       int pt=m_map->test_Run3(m_sectorLogic->getOctantID(),m_sectorLogic->getModuleID(),
@@ -91,25 +91,22 @@ TGCRPhiCoincidenceOut* TGCRPhiCoincidenceMatrix::doCoincidence()
       chargeOut = pt<0 ? 0:1;
       
       CoincidenceTypeOut=(type==0);
-    }
-    else{
-      for( int pt=NumberOfPtLevel-1; pt>=0; pt-=1){
-	if(m_map->test(m_sectorLogic->getOctantID(),m_sectorLogic->getModuleID(),subsector,
-		       type, pt,
-		       m_dR,m_dPhi[j])) {
-	  ptOut = pt;
-	  break;
-	}
-      } // loop pt
+
+    } else {    // for Run-2
+      ptOut = m_map->test(m_sectorLogic->getOctantID(),
+                          m_sectorLogic->getModuleID(), subsector,
+                          type, m_dR, m_dPhi[j]);
     }
 
-    // Trigger Out
-    if( ptOut >= ptMax ){
+    // Trigger Out (only pT>0 candidate
+    if(ptOut >= ptMax) {
       ptMax = ptOut;
       out->clear();    
       out->setIdSSC(m_SSCId);
-      if(!tgcArgs()->useRun3Config()){out->setHit(ptMax+1);}// for Run2 Algo
-      else{out->setpT(ptMax);}// for Run3 Algo
+
+      if(!tgcArgs()->useRun3Config()) out->setHit(ptMax);  // for Run2 Algo
+      else                            out->setpT(ptMax);   // for Run3 Algo
+
       out->setR(m_r);
       out->setPhi(m_phi[j]);
       out->setDR(m_dR);