diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaRSqrIncl1Charge.h b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaRSqrIncl1Charge.h
new file mode 100644
index 0000000000000000000000000000000000000000..89908073ba242c349001f6f07a8c4b147e682ccc
--- /dev/null
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/DeltaRSqrIncl1Charge.h
@@ -0,0 +1,49 @@
+/*
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+*/
+//  DeltaRSqrIncl1Charge.h
+//  TopoCore
+//  Created by Paula Martinez based on DeltaRSqrIncl1 by Joerg Stelzer/V Sorin.
+
+#ifndef L1TOPOALGORITHMS_DELTARSQRINCL1CHARGE_H
+#define L1TOPOALGORITHMS_DELTARSQRINCL1CHARGE_H
+
+#include <iostream>
+#include "L1TopoInterfaces/DecisionAlg.h"
+
+class TH2;
+
+namespace TCS {
+   
+   class DeltaRSqrIncl1Charge : public DecisionAlg {
+   public:
+      DeltaRSqrIncl1Charge(const std::string & name);
+      virtual ~DeltaRSqrIncl1Charge();
+
+      virtual StatusCode initialize();
+
+      virtual StatusCode processBitCorrect( const std::vector<TCS::TOBArray const *> & input,
+                                  const std::vector<TCS::TOBArray *> & output,
+                                  Decision & decison );
+
+      
+      virtual StatusCode process( const std::vector<TCS::TOBArray const *> & input,
+                                  const std::vector<TCS::TOBArray *> & output,
+                                  Decision & decison );
+      
+
+   private:
+
+      parType_t      p_NumberLeading1 = { 0 };
+      parType_t      p_NumberLeading2 = { 0 };
+      parType_t      p_DeltaRMin[3] = {0, 0, 0};
+      parType_t      p_DeltaRMax[3] = {0, 0, 0};
+      parType_t      p_MinET1 = { 0 };
+      parType_t      p_MinET2 = { 0 };
+      parType_t      p_OneBarrel = { 0 };
+     
+   };
+   
+}
+
+#endif
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassDeltaPhiInclusive2Charge.h b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassDeltaPhiInclusive2Charge.h
index dd3bd988d345b1fe192c5472781d289318853885..2343486fae2b3b93f23597d027132a7bd1e1b4ef 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassDeltaPhiInclusive2Charge.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassDeltaPhiInclusive2Charge.h
@@ -6,8 +6,8 @@
 //  Based on InvariantMassInclusive2 and DeltaPhiIncl2 by Paula Martinez on 11/02/2021. For questions contact atlas-trig-l1topo-algcom@cern.ch. 
 //  TO DO size of the input list to be possbly refined 
 
-#ifndef __TopoCore__InvariantMassDeltaPhiInclusive2Charge__
-#define __TopoCore__InvariantMassDeltaPhiInclusive2Charge__
+#ifndef L1TOPOALGORITHMS_INVARIANTMASSDELTAPHIINCLUSIVE2CHARGE_H
+#define L1TOPOALGORITHMS_INVARIANTMASSDELTAPHIINCLUSIVE2CHARGE_H
 
 #include "L1TopoInterfaces/DecisionAlg.h"
 
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassInclusiveDeltaRSqrIncl1Charge.h b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassInclusiveDeltaRSqrIncl1Charge.h
new file mode 100644
index 0000000000000000000000000000000000000000..1a7318869e49b89a90e4bd14e6cd2fafc4e82666
--- /dev/null
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassInclusiveDeltaRSqrIncl1Charge.h
@@ -0,0 +1,50 @@
+/*
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+*/
+//  InvariantMassInclusiveDeltaRSqrIncl1Charge.h
+//  TopoCore
+//  Based on InvariantMassInclusiveDeltaRSqrIncl1, InvariantMassInclusive1 and DeltaRSqrIncl1 created by Joerg Stelzer and V Sorin.
+//  For questions contact atlas-trig-l1topo-algcom@cern.ch. 
+
+#ifndef L1TOPOALGORITHMS_INVARIANTMASSINCLUSIVEDELTARSQRINCL1CHARGE_H
+#define L1TOPOALGORITHMS_INVARIANTMASSINCLUSIVEDELTARSQRINCL1CHARGE_H
+
+#include "L1TopoInterfaces/DecisionAlg.h"
+
+class TH2;
+
+namespace TCS {
+   
+   class InvariantMassInclusiveDeltaRSqrIncl1Charge : public DecisionAlg {
+   public:
+      InvariantMassInclusiveDeltaRSqrIncl1Charge(const std::string & name);
+      virtual ~InvariantMassInclusiveDeltaRSqrIncl1Charge();
+
+      virtual StatusCode initialize() override final;
+
+      virtual StatusCode processBitCorrect( const std::vector<TCS::TOBArray const *> & input,
+                                  const std::vector<TCS::TOBArray *> & output,
+                                  Decision & decison ) override final;
+      
+      virtual StatusCode process( const std::vector<TCS::TOBArray const *> & input,
+                                  const std::vector<TCS::TOBArray *> & output,
+                                  Decision & decison ) override final;
+      
+
+   private:
+
+      parType_t      p_NumberLeading1 = { 0 };
+      parType_t      p_NumberLeading2 = { 0 };
+      parType_t      p_InvMassMin[6] = { 0,0,0,0,0,0 };
+      parType_t      p_InvMassMax[6] = { 0,0,0,0,0,0 };
+      parType_t      p_MinET1[6] = { 0,0,0,0,0,0 };
+      parType_t      p_MinET2[6] = { 0,0,0,0,0,0 };
+      parType_t      p_OneBarrel = { 0 };
+      parType_t      p_DeltaRMin[6] = { 0,0,0,0,0,0 };
+      parType_t      p_DeltaRMax[6] = { 0,0,0,0,0,0 };
+
+   };
+   
+}
+
+#endif
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassThreeTOBsInclCharge.h b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassThreeTOBsInclCharge.h
index 7ed914f1e74247fcbe422987355ae959a8da5fa7..982e30de033e582503ab8ae895d8c7e513159ae8 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassThreeTOBsInclCharge.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/L1TopoAlgorithms/InvariantMassThreeTOBsInclCharge.h
@@ -5,8 +5,8 @@
 //  TopoCore
 //  Created by Paula Martinez based on InvariantMassInclusive1 by Joerg Stelzer on 11/16/12.
 
-#ifndef __TopoCore__InvariantMassThreeTOBsInclCharge__
-#define __TopoCore__InvariantMassThreeTOBsInclCharge__
+#ifndef L1TOPOALGORITHMS_INVARIANTMASSTHREETOBSINCLCHARGE_H
+#define L1TOPOALGORITHMS_INVARIANTMASSTHREETOBSINCLCHARGE_H
 
 #include <iostream>
 #include "L1TopoInterfaces/DecisionAlg.h"
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRSqrIncl1Charge.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRSqrIncl1Charge.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..d8b4cce96290d72add8b82beb942c9f2e074b8d6
--- /dev/null
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRSqrIncl1Charge.cxx
@@ -0,0 +1,216 @@
+/*
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+*/
+/*********************************
+ * DeltaRSqrIncl1Charge.cxx
+ * Created by Paula Martinez based on Joerg Stelzer / V Sorin.
+ *
+ * @brief algorithm calculates the R2-distance between objects in one  list and applies dR criteria
+ * Events containing a pair of TGC muons with same charge are rejected
+ *
+ * @param NumberLeading
+**********************************/
+
+#include <cmath>
+#include "TH1F.h"
+#include "TH2F.h"
+
+#include "L1TopoAlgorithms/DeltaRSqrIncl1Charge.h"
+#include "L1TopoCommon/Exception.h"
+#include "L1TopoInterfaces/Decision.h"
+#include "L1TopoSimulationUtils/Kinematics.h"
+
+REGISTER_ALG_TCS(DeltaRSqrIncl1Charge)
+
+
+// not the best solution but we will move to athena where this comes for free
+#define LOG std::cout << "TCS::DeltaRSqrIncl1Charge:     "
+
+TCS::DeltaRSqrIncl1Charge::DeltaRSqrIncl1Charge(const std::string & name) : DecisionAlg(name)
+{
+   defineParameter("InputWidth", 9);
+   defineParameter("MaxTob", 0); 
+   defineParameter("NumResultBits", 3);
+   defineParameter("RequireOneBarrel", 0);
+   defineParameter("MinET1",1);
+   defineParameter("MinET2",1);
+   defineParameter("DeltaRMin",  0, 0);
+   defineParameter("DeltaRMax",  0, 0);
+   defineParameter("DeltaRMin",  0, 1);
+   defineParameter("DeltaRMax",  0, 1);
+   defineParameter("DeltaRMin",  0, 2);
+   defineParameter("DeltaRMax",  0, 2);
+   setNumberOutputBits(3);
+}
+
+TCS::DeltaRSqrIncl1Charge::~DeltaRSqrIncl1Charge(){}
+
+
+TCS::StatusCode
+TCS::DeltaRSqrIncl1Charge::initialize() {
+   if(parameter("MaxTob").value() > 0) {
+    p_NumberLeading1 = parameter("MaxTob").value();
+    p_NumberLeading2 = parameter("MaxTob").value();
+   } else {
+    p_NumberLeading1 = parameter("InputWidth").value();
+    p_NumberLeading2 = parameter("InputWidth").value();
+   }
+   p_OneBarrel = parameter("RequireOneBarrel").value();
+
+   for(unsigned int i=0; i<numberOutputBits(); ++i) {
+      p_DeltaRMin[i] = parameter("DeltaRMin", i).value();
+      p_DeltaRMax[i] = parameter("DeltaRMax", i).value();
+   }
+   p_MinET1 = parameter("MinET1").value();
+   p_MinET2 = parameter("MinET2").value();
+
+   TRG_MSG_INFO("NumberLeading1 : " << p_NumberLeading1);
+   TRG_MSG_INFO("NumberLeading2 : " << p_NumberLeading2);
+   TRG_MSG_INFO("RequireOneBarrel : " << p_OneBarrel);
+
+   for(unsigned int i=0; i<numberOutputBits(); ++i) {
+    TRG_MSG_INFO("DeltaRMin   : " << p_DeltaRMin[i]);
+    TRG_MSG_INFO("DeltaRMax   : " << p_DeltaRMax[i]);
+   }
+   TRG_MSG_INFO("MinET1          : " << p_MinET1);
+   TRG_MSG_INFO("MinET2          : " << p_MinET2);
+
+   TRG_MSG_INFO("number output : " << numberOutputBits());
+    
+   // book histograms
+   for(unsigned int i=0; i<numberOutputBits(); ++i) {
+       std::string hname_accept = "hDeltaRSqrIncl1Charge_accept_bit"+std::to_string(static_cast<int>(i));
+       std::string hname_reject = "hDeltaRSqrIncl1Charge_reject_bit"+std::to_string(static_cast<int>(i));
+       // dR
+       bookHist(m_histAccept, hname_accept, "DR", 100, std::sqrt(p_DeltaRMin[i]), std::sqrt(p_DeltaRMax[i]));
+       bookHist(m_histReject, hname_reject, "DR", 100, std::sqrt(p_DeltaRMin[i]), std::sqrt(p_DeltaRMax[i]));
+       // eta2 vs. eta1
+       bookHist(m_histAcceptEta1Eta2, hname_accept, "ETA vs ETA", 100, -70, 70, 100, -70, 70);
+       bookHist(m_histRejectEta1Eta2, hname_reject, "ETA vs ETA", 100, -70, 70, 100, -70, 70);
+   }
+   
+   return StatusCode::SUCCESS;
+}
+
+
+
+TCS::StatusCode
+TCS::DeltaRSqrIncl1Charge::processBitCorrect( const std::vector<TCS::TOBArray const *> & input,
+                             const std::vector<TCS::TOBArray *> & output,
+                             Decision & decision )
+{
+
+   if(input.size() == 1) {
+      for( TOBArray::const_iterator tob1 = input[0]->begin(); 
+           tob1 != input[0]->end() && distance( input[0]->begin(), tob1) < p_NumberLeading1;
+           ++tob1) 
+          {
+              if( parType_t((*tob1)->Et()) <= std::min(p_MinET1,p_MinET2)) continue; // ET cut
+              TCS::TOBArray::const_iterator tob2 = tob1; ++tob2;      
+              for( ;
+                   tob2 != input[0]->end() && distance( input[0]->begin(), tob2) < p_NumberLeading2;
+                   ++tob2) {
+                  if( parType_t((*tob2)->Et()) <= std::min(p_MinET1,p_MinET2)) continue; // ET cut
+                  if( (parType_t((*tob1)->Et()) <= std::max(p_MinET1,p_MinET2)) && (parType_t((*tob2)->Et()) <= std::max(p_MinET1,p_MinET2))) continue;
+                  // OneBarrel
+                  if (p_OneBarrel && parType_t(std::abs((*tob1)->eta())) > 10 && parType_t(std::abs((*tob2)->eta())) > 10 ) continue;
+                  // DeltaR2 cuts
+                  unsigned int deltaR2 = TSU::Kinematics::calcDeltaR2BW( *tob1, *tob2 );
+                  // Charge cut ( for TGC muons: 0=negative, 1=positive, as described at ATR-22621 )
+                  // Check the definition of sectorName at MuCTPIL1TopoCandidate.h (for TGC muons: sectorName.at(0)=E or F, for RPC muons: sectorName.at(0)=B)
+                  // If no muon sectorName information is available, sectorName = ""
+                  std::string sector1 = (*tob1)->sectorName();
+                  std::string sector2 = (*tob2)->sectorName();
+                  int charge1 = (*tob1)->charge();
+                  int charge2 = (*tob2)->charge();
+                  int totalCharge = charge1 + charge2;
+                  bool acceptCharge = true;
+                  if ( sector1 != "" && sector2 != "" && sector1.at(0) != 'B' && sector2.at(0) != 'B' ) {
+                     if ( totalCharge == 0 or totalCharge == 2 ) { acceptCharge = false; }
+                  }
+                  for(unsigned int i=0; i<numberOutputBits(); ++i) {
+		    bool accept = false;
+		    accept = deltaR2 >= p_DeltaRMin[i] && deltaR2 <= p_DeltaRMax[i] && acceptCharge;
+		    const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+		    const bool fillReject = fillHistos() and not fillAccept;
+		    const bool alreadyFilled = decision.bit(i);
+		    if( accept ) {
+		      decision.setBit(i, true);  
+		      output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
+		    }
+		    if(fillAccept and not alreadyFilled) {
+		      fillHist1D(m_histAccept[i],std::sqrt(static_cast<float>(deltaR2)));
+                      fillHist2D(m_histAcceptEta1Eta2[i],(*tob1)->eta(),(*tob2)->eta());
+		    } else if(fillReject) {
+		      fillHist1D(m_histReject[i],std::sqrt(static_cast<float>(deltaR2)));
+                      fillHist2D(m_histRejectEta1Eta2[i],(*tob1)->eta(),(*tob2)->eta());
+		    }
+		    TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail") << " deltaR2 = " << deltaR2);
+                  }
+              }
+          }
+   } else {
+      TCS_EXCEPTION("DeltaRSqrIncl1Charge alg must have either 1 input, but got " << input.size());
+   }
+   return TCS::StatusCode::SUCCESS;
+}
+
+TCS::StatusCode
+TCS::DeltaRSqrIncl1Charge::process( const std::vector<TCS::TOBArray const *> & input,
+                             const std::vector<TCS::TOBArray *> & output,
+                             Decision & decision )
+{
+    if(input.size() == 1) {
+        for( TOBArray::const_iterator tob1 = input[0]->begin(); 
+             tob1 != input[0]->end() && distance( input[0]->begin(), tob1) < p_NumberLeading1;
+             ++tob1) 
+            {
+                if( parType_t((*tob1)->Et()) <= std::min(p_MinET1,p_MinET2)) continue; // ET cut
+                TCS::TOBArray::const_iterator tob2 = tob1; ++tob2;      
+                for( ;
+                     tob2 != input[0]->end() && distance( input[0]->begin(), tob2) < p_NumberLeading2;
+                     ++tob2) {
+                    if( parType_t((*tob2)->Et()) <= std::min(p_MinET1,p_MinET2)) continue; // ET cut
+                    if( (parType_t((*tob1)->Et()) <= std::max(p_MinET1,p_MinET2)) && (parType_t((*tob2)->Et()) <= std::max(p_MinET1,p_MinET2))) continue;
+                    // OneBarrel
+                    if (p_OneBarrel && parType_t(std::abs((*tob1)->eta())) > 10 && parType_t(std::abs((*tob2)->eta())) > 10 ) continue;
+                    // DeltaR2 cuts
+                    unsigned int deltaR2 = TSU::Kinematics::calcDeltaR2( *tob1, *tob2 );
+                    // Charge cut ( for TGC muons: 0=negative, 1=positive, as described at ATR-22621 )
+                    // Check the definition of sectorName at MuCTPIL1TopoCandidate.h (for TGC muons: sectorName.at(0)=E or F, for RPC muons: sectorName.at(0)=B)
+                    // If no muon sectorName information is available, sectorName = ""
+                    std::string sector1 = (*tob1)->sectorName();
+                    std::string sector2 = (*tob2)->sectorName();
+                    int charge1 = (*tob1)->charge();
+                    int charge2 = (*tob2)->charge();
+                    int totalCharge = charge1 + charge2;
+                    bool acceptCharge = true;
+                    if ( sector1 != "" && sector2 != "" && sector1.at(0) != 'B' && sector2.at(0) != 'B' ) {
+                       if ( totalCharge == 0 or totalCharge == 2 ) { acceptCharge = false; }
+                    }
+                    for(unsigned int i=0; i<numberOutputBits(); ++i) {
+		      bool accept = false;
+		      accept = deltaR2 >= p_DeltaRMin[i] && deltaR2 <= p_DeltaRMax[i] && acceptCharge;
+		      const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+		      const bool fillReject = fillHistos() and not fillAccept;
+		      const bool alreadyFilled = decision.bit(i);
+		      if( accept ) {
+                        decision.setBit(i, true);  
+                        output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
+		      }
+		      if(fillAccept and not alreadyFilled) {
+			fillHist1D(m_histAccept[i],std::sqrt(static_cast<float>(deltaR2)));
+                        fillHist2D(m_histAcceptEta1Eta2[i],(*tob1)->eta(),(*tob2)->eta());
+		      } else if(fillReject) {
+			fillHist1D(m_histReject[i],std::sqrt(static_cast<float>(deltaR2)));
+                        fillHist2D(m_histRejectEta1Eta2[i],(*tob1)->eta(),(*tob2)->eta());
+		      }
+		      TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail") << " deltaR2 = " << deltaR2);
+                    }
+                }
+            }
+    } else {
+      TCS_EXCEPTION("DeltaRSqrIncl1Charge alg must have either 1 input, but got " << input.size());
+    }
+    return TCS::StatusCode::SUCCESS;
+}
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassDeltaPhiInclusive2Charge.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassDeltaPhiInclusive2Charge.cxx
index b8ad6e87a01e6ec3f8e578e3012c4facf54c63ca..1a2b537e22e8522656620b42a9aac9469d4f4659 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassDeltaPhiInclusive2Charge.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassDeltaPhiInclusive2Charge.cxx
@@ -6,7 +6,8 @@
  * Based on V Sorin 2014 implementation of InvariantMassInclusive2. For questions contact atlas-trig-l1topo-algcom@cern.ch.
  *
  * @brief algorithm calculates the sqr of the INVMASS between two lists and applies invmass criteria. For pairs passing the INVMASS cut a further requirement based on DeltaPhi
- * is applied, addressing ATR-19377. Following ATR-19593, an additional cut in the muon charge is required.
+ * is applied, addressing ATR-19377.
+ * Events containing a pair of TGC muons with same charge are rejected
  *
 **********************************/
 //  TO DO size of the input list to be possbly refined 
@@ -131,8 +132,8 @@ TCS::InvariantMassDeltaPhiInclusive2Charge::initialize() {
        std::string hname_rejectCharge = "hInvariantMassDeltaPhiInclusive2Charge_rejectCharge_bit"+std::to_string(static_cast<int>(i));
        std::string hname_undefCharge  = "hInvariantMassDeltaPhiInclusive2Charge_undefCharge_bit"+std::to_string(static_cast<int>(i));
        // mass
-       bookHist(m_histAcceptM, hname_accept, "INVM vs DPHI", 100, sqrt(p_InvMassMin[i]), sqrt(p_InvMassMax[i]), 100, p_DeltaPhiMin[i], p_DeltaPhiMax[i]);
-       bookHist(m_histRejectM, hname_reject, "INVM vs DPHI", 100, sqrt(p_InvMassMin[i]), sqrt(p_InvMassMax[i]), 100, p_DeltaPhiMin[i], p_DeltaPhiMax[i]);
+       bookHist(m_histAcceptM, hname_accept, "INVM vs DPHI", 100, std::sqrt(p_InvMassMin[i]), std::sqrt(p_InvMassMax[i]), 100, p_DeltaPhiMin[i], p_DeltaPhiMax[i]);
+       bookHist(m_histRejectM, hname_reject, "INVM vs DPHI", 100, std::sqrt(p_InvMassMin[i]), std::sqrt(p_InvMassMax[i]), 100, p_DeltaPhiMin[i], p_DeltaPhiMax[i]);
        // eta2 vs. eta1
        bookHist(m_histAcceptEta1Eta2, hname_accept, "ETA vs ETA", 100, p_MinEta1, p_MaxEta1, 100, p_MinEta2, p_MaxEta2);
        bookHist(m_histRejectEta1Eta2, hname_reject, "ETA vs ETA", 100, p_MinEta1, p_MaxEta1, 100, p_MinEta2, p_MaxEta2);
@@ -171,11 +172,13 @@ TCS::InvariantMassDeltaPhiInclusive2Charge::processBitCorrect( const std::vector
                 const int eta2 = (*tob2)->eta();
                 const unsigned int aeta1 = std::abs(eta1);
                 const unsigned int aeta2 = std::abs(eta2);
+                // Charge cut ( for TGC muons: 0=negative, 1=positive, as described at ATR-22621 )
+                // Check the definition of sectorName at MuCTPIL1TopoCandidate.h (for TGC muons: sectorName.at(0)=E or F, for RPC muons: sectorName.at(0)=B)
+                // If no muon sectorName information is available, sectorName = ""
                 std::string sector1 = (*tob1)->sectorName();
                 std::string sector2 = (*tob2)->sectorName();
                 int charge1 = (*tob1)->charge();
                 int charge2 = (*tob2)->charge();
-                // Charge cut ( for TGC muons: 0=negative, 1=positive, as described at ATR-22621 )
                 std::string totalCharge = "undef";
                 if ( sector1 != "" && sector2 != "" && sector1.at(0) != 'B' && sector2.at(0) != 'B' ) {
                    if ( charge1 + charge2 == 1 ) { totalCharge = "accept"; }
@@ -197,10 +200,10 @@ TCS::InvariantMassDeltaPhiInclusive2Charge::processBitCorrect( const std::vector
                        output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
                    }
                    if(fillAccept and not alreadyFilled) {
-		       fillHist2D(m_histAcceptM[i],sqrt(static_cast<float>(invmass2)),static_cast<float>(deltaPhi));
+		       fillHist2D(m_histAcceptM[i],std::sqrt(static_cast<float>(invmass2)),static_cast<float>(deltaPhi));
 		       fillHist2D(m_histAcceptEta1Eta2[i],eta1, eta2);
                    } else if(fillReject) {
-		       fillHist2D(m_histRejectM[i],sqrt(static_cast<float>(invmass2)),static_cast<float>(deltaPhi));
+		       fillHist2D(m_histRejectM[i],std::sqrt(static_cast<float>(invmass2)),static_cast<float>(deltaPhi));
 		       fillHist2D(m_histRejectEta1Eta2[i],eta1, eta2);
                    }
                    if(fillHistos() and totalCharge == "accept") {
@@ -246,11 +249,13 @@ TCS::InvariantMassDeltaPhiInclusive2Charge::process( const std::vector<TCS::TOBA
                 const int eta2 = (*tob2)->eta();
                 const unsigned int aeta1 = std::abs(eta1);
                 const unsigned int aeta2 = std::abs(eta2);
+                // Charge cut ( for TGC muons: 0=negative, 1=positive, as described at ATR-22621 )
+                // Check the definition of sectorName at MuCTPIL1TopoCandidate.h (for TGC muons: sectorName.at(0)=E or F, for RPC muons: sectorName.at(0)=B)
+                // If no muon sectorName information is available, sectorName = ""
                 std::string sector1 = (*tob1)->sectorName();
                 std::string sector2 = (*tob2)->sectorName();
                 int charge1 = (*tob1)->charge();
                 int charge2 = (*tob2)->charge();
-                // Charge cut ( for TGC muons: 0=negative, 1=positive, as described at ATR-22621 )
                 std::string totalCharge = "undef";
                 if ( sector1 != "" && sector2 != "" && sector1.at(0) != 'B' && sector2.at(0) != 'B' ) {
                    if ( charge1 + charge2 == 1 ) { totalCharge = "accept"; }
@@ -271,10 +276,10 @@ TCS::InvariantMassDeltaPhiInclusive2Charge::process( const std::vector<TCS::TOBA
                        output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
                    }
                    if(fillAccept and not alreadyFilled) {
-		       fillHist2D(m_histAcceptM[i],sqrt(static_cast<float>(invmass2)),static_cast<float>(deltaPhi));
+		       fillHist2D(m_histAcceptM[i],std::sqrt(static_cast<float>(invmass2)),static_cast<float>(deltaPhi));
 		       fillHist2D(m_histAcceptEta1Eta2[i],eta1, eta2);
                    } else if(fillReject) {
-		       fillHist2D(m_histRejectM[i],sqrt(static_cast<float>(invmass2)),static_cast<float>(deltaPhi));
+		       fillHist2D(m_histRejectM[i],std::sqrt(static_cast<float>(invmass2)),static_cast<float>(deltaPhi));
 		       fillHist2D(m_histRejectEta1Eta2[i],eta1, eta2);
                    }
                    if(fillHistos() and totalCharge == "accept") {
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusiveDeltaRSqrIncl1Charge.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusiveDeltaRSqrIncl1Charge.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..921cbc5ec129948bda5586ec5399f40012f48257
--- /dev/null
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusiveDeltaRSqrIncl1Charge.cxx
@@ -0,0 +1,282 @@
+/*
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+*/
+/*********************************
+ * Created by Paula Martinez based on V Sorin and Joerg Stelzer.
+ * 
+ * @brief algorithm calculates the sqr of the INVMASS and DeltaR between one list and applies invmass and deltaR criteria
+ * Events containing a pair of TGC muons with same charge are rejected
+ *
+ * @param NumberLeading
+ * 
+ * For questions contact atlas-trig-l1topo-algcom@cern.ch. 
+**********************************/
+
+#include <cmath>
+#include <string>
+#include <sstream>
+#include <vector>
+#include "TH1F.h"
+#include "TH2F.h"
+
+#include "L1TopoAlgorithms/InvariantMassInclusiveDeltaRSqrIncl1Charge.h"
+#include "L1TopoCommon/Exception.h"
+#include "L1TopoInterfaces/Decision.h"
+// Bitwise implementation utils
+#include "L1TopoSimulationUtils/L1TopoDataTypes.h"
+#include "L1TopoSimulationUtils/Trigo.h"
+#include "L1TopoSimulationUtils/Hyperbolic.h"
+#include "L1TopoSimulationUtils/Kinematics.h"
+
+//
+
+REGISTER_ALG_TCS(InvariantMassInclusiveDeltaRSqrIncl1Charge)
+
+
+TCS::InvariantMassInclusiveDeltaRSqrIncl1Charge::InvariantMassInclusiveDeltaRSqrIncl1Charge(const std::string & name) : DecisionAlg(name)
+{
+   defineParameter("InputWidth", 3);
+   defineParameter("MaxTob", 0); 
+   defineParameter("NumResultBits", 6);
+   defineParameter("RequireOneBarrel", 0);
+   defineParameter("MinMSqr",  0, 0);
+   defineParameter("MaxMSqr", 999, 0);
+   defineParameter("MinMSqr",  0, 1);
+   defineParameter("MaxMSqr",  999, 1);
+   defineParameter("MinMSqr", 0, 2);
+   defineParameter("MaxMSqr", 999, 2);
+   defineParameter("MinMSqr", 0, 3);
+   defineParameter("MaxMSqr", 999, 3);
+   defineParameter("MinMSqr", 0, 4);
+   defineParameter("MaxMSqr", 999, 4);
+   defineParameter("MinMSqr", 0, 5);
+   defineParameter("MaxMSqr", 999, 5);
+   defineParameter("MinET1",0,0);
+   defineParameter("MinET2",0,0);
+   defineParameter("MinET1",0,1);
+   defineParameter("MinET2",0,1);
+   defineParameter("MinET1",0,2);
+   defineParameter("MinET2",0,2);
+   defineParameter("MinET1",0,3);
+   defineParameter("MinET2",0,3);
+   defineParameter("MinET1",0,4);
+   defineParameter("MinET2",0,4);
+   defineParameter("MinET1",0,5);
+   defineParameter("MinET2",0,5);  
+   defineParameter("DeltaRMin", 0, 0);
+   defineParameter("DeltaRMax", 0, 0);
+   defineParameter("DeltaRMin", 0, 1);
+   defineParameter("DeltaRMax", 0, 1);
+   defineParameter("DeltaRMin", 0, 2);
+   defineParameter("DeltaRMax", 0, 2);
+   defineParameter("DeltaRMin", 0, 3);
+   defineParameter("DeltaRMax", 0, 3);
+   defineParameter("DeltaRMin", 0, 4);
+   defineParameter("DeltaRMax", 0, 4);
+   defineParameter("DeltaRMin", 0, 5);
+   defineParameter("DeltaRMax", 0, 5);
+
+ 
+   setNumberOutputBits(6);
+}
+
+TCS::InvariantMassInclusiveDeltaRSqrIncl1Charge::~InvariantMassInclusiveDeltaRSqrIncl1Charge(){}
+
+
+TCS::StatusCode
+TCS::InvariantMassInclusiveDeltaRSqrIncl1Charge::initialize() {
+   if(parameter("MaxTob").value() > 0) {
+      p_NumberLeading1 = parameter("MaxTob").value();
+      p_NumberLeading2 = parameter("MaxTob").value();
+   } else {
+      p_NumberLeading1 = parameter("InputWidth").value();
+      p_NumberLeading2 = parameter("InputWidth").value();
+   }
+
+   p_OneBarrel = parameter("RequireOneBarrel").value();
+
+   TRG_MSG_INFO("NumberLeading1 : " << p_NumberLeading1);
+   TRG_MSG_INFO("NumberLeading2 : " << p_NumberLeading2);
+   TRG_MSG_INFO("RequireOneBarrel : " << p_OneBarrel);
+
+   for(unsigned int i=0; i<numberOutputBits(); ++i) {
+      p_InvMassMin[i] = parameter("MinMSqr", i).value();
+      p_InvMassMax[i] = parameter("MaxMSqr", i).value();
+      p_DeltaRMin[i] = parameter("DeltaRMin", i).value();
+      p_DeltaRMax[i] = parameter("DeltaRMax", i).value();
+      p_MinET1[i] = parameter("MinET1",i).value();
+      p_MinET2[i] = parameter("MinET2",i).value();
+
+      TRG_MSG_INFO("InvMassMin "<< i << "  : " << p_InvMassMin[i]);
+      TRG_MSG_INFO("InvMassMax "<< i << "  : " << p_InvMassMax[i]);
+      TRG_MSG_INFO("MinET1     "<< i << "  : " << p_MinET1[i]);
+      TRG_MSG_INFO("MinET2     "<< i << "  : " << p_MinET2[i]);
+      TRG_MSG_INFO("DeltaRMin  "<< i << "  : " << p_DeltaRMin[i]);
+      TRG_MSG_INFO("DeltaRMax  "<< i << "  : " << p_DeltaRMax[i]);
+   }
+
+   TRG_MSG_INFO("number output : " << numberOutputBits());
+
+   // book histograms
+   for(unsigned int i=0; i<numberOutputBits(); ++i) {
+       std::string hname_accept = "hInvariantMassDeltaRSqrIncl1Charge_accept_bit"+std::to_string(static_cast<int>(i));
+       std::string hname_reject = "hInvariantMassDeltaRSqrIncl1Charge_reject_bit"+std::to_string(static_cast<int>(i));
+       // mass
+       bookHist(m_histAcceptM, hname_accept, "INVM vs DR", 100, std::sqrt(p_InvMassMin[i]), std::sqrt(p_InvMassMax[i]), 100, p_DeltaRMin[i], p_DeltaRMax[i]);
+       bookHist(m_histRejectM, hname_reject, "INVM vs DR", 100, std::sqrt(p_InvMassMin[i]), std::sqrt(p_InvMassMax[i]), 100, p_DeltaRMin[i], p_DeltaRMax[i]);
+       // eta2 vs. eta1
+       bookHist(m_histAcceptEta1Eta2, hname_accept, "ETA vs ETA", 100, -70, 70, 100, -70, 70);
+       bookHist(m_histRejectEta1Eta2, hname_reject, "ETA vs ETA", 100, -70, 70, 100, -70, 70);
+       
+   }
+
+   return StatusCode::SUCCESS;
+}
+
+
+
+TCS::StatusCode
+TCS::InvariantMassInclusiveDeltaRSqrIncl1Charge::processBitCorrect( const std::vector<TCS::TOBArray const *> & input,
+                             const std::vector<TCS::TOBArray *> & output,
+                             Decision & decision )
+{
+
+   if(input.size() == 1) {     
+     
+      for( TOBArray::const_iterator tob1 = input[0]->begin(); 
+           tob1 != input[0]->end() && distance( input[0]->begin(), tob1) < p_NumberLeading1;
+           ++tob1) 
+         {
+            
+
+            TCS::TOBArray::const_iterator tob2 = tob1; ++tob2;      
+            for( ;
+                 tob2 != input[0]->end() && distance( input[0]->begin(), tob2) < p_NumberLeading2;
+                 ++tob2) {
+
+
+               // OneBarrel
+               if (p_OneBarrel && parType_t(std::abs((*tob1)->eta())) > 10 && parType_t(std::abs((*tob2)->eta())) > 10 ) continue;
+               
+               // Inv Mass calculation
+               unsigned int invmass2 = TSU::Kinematics::calcInvMassBW( *tob1, *tob2 );
+	       // test DeltaR2Min, DeltaR2Max                                                                                                
+	       unsigned int deltaR2 = TSU::Kinematics::calcDeltaR2BW( *tob1, *tob2 );
+	       TRG_MSG_DEBUG("Jet1 = " << **tob1 << ", Jet2 = " << **tob2 << ", invmass2 = " << invmass2 << ", deltaR2 = " << deltaR2);
+               // Charge cut ( for TGC muons: 0=negative, 1=positive, as described at ATR-22621 )
+               // Check the definition of sectorName at MuCTPIL1TopoCandidate.h (for TGC muons: sectorName.at(0)=E or F, for RPC muons: sectorName.at(0)=B)
+               // If no muon sectorName information is available, sectorName = ""
+               std::string sector1 = (*tob1)->sectorName();
+               std::string sector2 = (*tob2)->sectorName();
+               int charge1 = (*tob1)->charge();
+               int charge2 = (*tob2)->charge();
+               int totalCharge = charge1 + charge2;
+               bool acceptCharge = true;
+               if ( sector1 != "" && sector2 != "" && sector1.at(0) != 'B' && sector2.at(0) != 'B' ) {
+                  if ( totalCharge == 0 or totalCharge == 2 ) { acceptCharge = false; }
+               }
+               for(unsigned int i=0; i<numberOutputBits(); ++i) {
+                   bool accept = false;
+                   if( parType_t((*tob1)->Et()) <= std::min(p_MinET1[i],p_MinET2[i])) continue; // ET cut
+                   if( parType_t((*tob2)->Et()) <= std::min(p_MinET1[i],p_MinET2[i])) continue; // ET cut
+                   if( (parType_t((*tob1)->Et()) <= std::max(p_MinET1[i],p_MinET2[i])) && (parType_t((*tob2)->Et()) <= std::max(p_MinET1[i],p_MinET2[i]))) continue;
+                   accept = invmass2 >= p_InvMassMin[i] && invmass2 <= p_InvMassMax[i] && deltaR2 >= p_DeltaRMin[i] && deltaR2 <= p_DeltaRMax[i] && acceptCharge;
+                   const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+                   const bool fillReject = fillHistos() and not fillAccept;
+                   const bool alreadyFilled = decision.bit(i);
+                   if( accept ) {
+                       decision.setBit(i, true);
+                       output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
+                   }
+                   if(fillAccept and not alreadyFilled) {
+		     fillHist2D(m_histAcceptM[i],std::sqrt(static_cast<float>(invmass2)),std::sqrt(static_cast<float>(deltaR2)));
+                     fillHist2D(m_histAcceptEta1Eta2[i],(*tob1)->eta(),(*tob2)->eta());
+                   } else if(fillReject) {
+		     fillHist2D(m_histRejectM[i],std::sqrt(static_cast<float>(invmass2)),std::sqrt(static_cast<float>(deltaR2)));
+                     fillHist2D(m_histRejectEta1Eta2[i],(*tob1)->eta(),(*tob2)->eta());
+                   }
+                   TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail") << " invmass2 = " << invmass2 << " deltaR2 = " << deltaR2 );
+               }
+            }
+         }
+   } else {
+
+      TCS_EXCEPTION("InvariantMassInclusiveDeltaRSqrIncl1Charge alg must have either 1  inputs, but got " << input.size());
+
+   }
+
+   return TCS::StatusCode::SUCCESS;
+
+}
+
+TCS::StatusCode
+TCS::InvariantMassInclusiveDeltaRSqrIncl1Charge::process( const std::vector<TCS::TOBArray const *> & input,
+                             const std::vector<TCS::TOBArray *> & output,
+                             Decision & decision )
+{
+
+   if(input.size() == 1) {     
+      for( TOBArray::const_iterator tob1 = input[0]->begin(); 
+           tob1 != input[0]->end() && distance( input[0]->begin(), tob1) < p_NumberLeading1;
+           ++tob1) 
+         {
+            
+
+            TCS::TOBArray::const_iterator tob2 = tob1; ++tob2;      
+            for( ;
+                 tob2 != input[0]->end() && distance( input[0]->begin(), tob2) < p_NumberLeading2;
+                 ++tob2) {
+
+
+               // OneBarrel
+               if (p_OneBarrel && parType_t(std::abs((*tob1)->eta())) > 10 && parType_t(std::abs((*tob2)->eta())) > 10 ) continue;
+               
+               // Inv Mass calculation
+	       unsigned int invmass2 = TSU::Kinematics::calcInvMass( *tob1, *tob2 );
+	       // test DeltaR2Min, DeltaR2Max                                                                                                  
+	       unsigned int deltaR2 = TSU::Kinematics::calcDeltaR2( *tob1, *tob2 );
+	       TRG_MSG_DEBUG("Jet1 = " << **tob1 << ", Jet2 = " << **tob2 << ", invmass2 = " << invmass2 << ", deltaR2 = " << deltaR2);
+               // Charge cut ( for TGC muons: 0=negative, 1=positive, as described at ATR-22621 )
+               // Check the definition of sectorName at MuCTPIL1TopoCandidate.h (for TGC muons: sectorName.at(0)=E or F, for RPC muons: sectorName.at(0)=B)
+               // If no muon sectorName information is available, sectorName = ""
+               std::string sector1 = (*tob1)->sectorName();
+               std::string sector2 = (*tob2)->sectorName();
+               int charge1 = (*tob1)->charge();
+               int charge2 = (*tob2)->charge();
+               int totalCharge = charge1 + charge2;
+               bool acceptCharge = true;
+               if ( sector1 != "" && sector2 != "" && sector1.at(0) != 'B' && sector2.at(0) != 'B' ) {
+                  if ( totalCharge == 0 or totalCharge == 2 ) { acceptCharge = false; }
+               }	       
+               for(unsigned int i=0; i<numberOutputBits(); ++i) {
+                   bool accept = false;
+                  if( parType_t((*tob1)->Et()) <= std::min(p_MinET1[i],p_MinET2[i])) continue; // ET cut
+                  if( parType_t((*tob2)->Et()) <= std::min(p_MinET1[i],p_MinET2[i])) continue; // ET cut
+                  if( (parType_t((*tob1)->Et()) <= std::max(p_MinET1[i],p_MinET2[i])) && (parType_t((*tob2)->Et()) <= std::max(p_MinET1[i],p_MinET2[i]))) continue;
+                  accept = invmass2 >= p_InvMassMin[i] && invmass2 <= p_InvMassMax[i] && deltaR2 >= p_DeltaRMin[i] && deltaR2 <= p_DeltaRMax[i] && acceptCharge; 
+                  const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+                  const bool fillReject = fillHistos() and not fillAccept;
+                  const bool alreadyFilled = decision.bit(i);
+                  if( accept ) {
+                      decision.setBit(i, true);
+                      output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
+                  }
+                   if(fillAccept and not alreadyFilled) {
+		     fillHist2D(m_histAcceptM[i],std::sqrt(static_cast<float>(invmass2)),std::sqrt(static_cast<float>(deltaR2)));
+                     fillHist2D(m_histAcceptEta1Eta2[i],(*tob1)->eta(),(*tob2)->eta());
+                   } else if(fillReject) {
+		     fillHist2D(m_histRejectM[i],std::sqrt(static_cast<float>(invmass2)),std::sqrt(static_cast<float>(deltaR2)));
+                     fillHist2D(m_histRejectEta1Eta2[i],(*tob1)->eta(),(*tob2)->eta());
+                   }
+                  TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail") << " invmass2 = " << invmass2 << " deltaR2 = " << deltaR2 );
+               }
+            }
+         }
+   } else {
+
+      TCS_EXCEPTION("InvariantMassInclusiveDeltaRSqrIncl1Charge alg must have either 1  inputs, but got " << input.size());
+
+   }
+
+   return TCS::StatusCode::SUCCESS;
+}
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassThreeTOBsInclCharge.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassThreeTOBsInclCharge.cxx
index 9b122c72a91787a80da8dad435bd9f695ccb5901..d0fa618d2dc3287bf6f326c24119a52f1e20bc1f 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassThreeTOBsInclCharge.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassThreeTOBsInclCharge.cxx
@@ -7,7 +7,7 @@
  * 
  * For questions contact atlas-trig-l1topo-algcom@cern.ch. 
  * @brief Algorithm calculates the sqr of the INVMASS of three TOBs from one  list and applies invmass criteria.
- * Following ATR-19638, an additional cut in the muon charge is required.
+ * Events containing 3 TGC muons with same charge are rejected
  *
  * @param NumberLeading 
  *
@@ -106,8 +106,8 @@ TCS::InvariantMassThreeTOBsInclCharge::initialize() {
        std::string hname_acceptEta3Eta1 = "hInvariantMassThreeTOBsInclCharge_acceptEta3Eta1_bit"+std::to_string(static_cast<int>(i));
        std::string hname_rejectEta3Eta1 = "hInvariantMassThreeTOBsInclCharge_rejectEta3Eta1_bit"+std::to_string(static_cast<int>(i));
        // mass
-       bookHist(m_histAccept, hname_accept, "INVM", 100, sqrt(p_InvMassMin[i]), sqrt(p_InvMassMax[i]));
-       bookHist(m_histReject, hname_reject, "INVM", 100, sqrt(p_InvMassMin[i]), sqrt(p_InvMassMax[i]));
+       bookHist(m_histAccept, hname_accept, "INVM", 100, std::sqrt(p_InvMassMin[i]), std::sqrt(p_InvMassMax[i]));
+       bookHist(m_histReject, hname_reject, "INVM", 100, std::sqrt(p_InvMassMin[i]), std::sqrt(p_InvMassMax[i]));
        // eta vs eta
        bookHist(m_histAcceptEta1Eta2, hname_acceptEta1Eta2, "ETA vs ETA", 100, -70, 70, 100, -70, 70);
        bookHist(m_histRejectEta1Eta2, hname_rejectEta1Eta2, "ETA vs ETA", 100, -70, 70, 100, -70, 70);
@@ -154,7 +154,9 @@ TCS::InvariantMassThreeTOBsInclCharge::processBitCorrect( const std::vector<TCS:
 		unsigned int invmass2_13 = TSU::Kinematics::calcInvMassBW( *tob1, *tob3 );
 		unsigned int invmass2_23 = TSU::Kinematics::calcInvMassBW( *tob2, *tob3 );
 		unsigned int invmass2 = invmass2_12 + invmass2_13 + invmass2_23;
-                // Muon sector and charge
+                // Charge cut ( for TGC muons: 0=negative, 1=positive, as described at ATR-22621 )
+                // Check the definition of sectorName at MuCTPIL1TopoCandidate.h (for TGC muons: sectorName.at(0)=E or F, for RPC muons: sectorName.at(0)=B)
+                // If no muon sectorName information is available, sectorName = ""
                 std::string sector1 = (*tob1)->sectorName();
                 std::string sector2 = (*tob2)->sectorName();
                 std::string sector3 = (*tob3)->sectorName();
@@ -162,8 +164,6 @@ TCS::InvariantMassThreeTOBsInclCharge::processBitCorrect( const std::vector<TCS:
                 int charge2 = (*tob2)->charge();
                 int charge3 = (*tob3)->charge();
                 int totalCharge = charge1 + charge2 + charge3;
-                // Charge cut ( for TGC muons: 0=negative, 1=positive, as described at ATR-22621 )
-                // Reject if 3 TGC muons with total charge = -3 or 3 ( 0 or 3 in our convention )
                 bool acceptCharge = true;
                 if ( sector1 != "" && sector2 != "" && sector3 != "" && sector1.at(0) != 'B' && sector2.at(0) != 'B' && sector3.at(0) != 'B' ) {
                    if ( totalCharge == 0 or totalCharge == 3 ) { acceptCharge = false; }
@@ -188,12 +188,12 @@ TCS::InvariantMassThreeTOBsInclCharge::processBitCorrect( const std::vector<TCS:
 		    TOBvector.clear();
 		  }
 		  if(fillAccept and not alreadyFilled) {
-		    fillHist1D(m_histAccept[i],sqrt(invmass2));
+		    fillHist1D(m_histAccept[i],std::sqrt(invmass2));
                     fillHist2D(m_histAcceptEta1Eta2[i],(*tob1)->eta(),(*tob2)->eta());
                     fillHist2D(m_histAcceptEta2Eta3[i],(*tob2)->eta(),(*tob3)->eta());
                     fillHist2D(m_histAcceptEta3Eta1[i],(*tob3)->eta(),(*tob1)->eta());
 		  } else if(fillReject) {
-		    fillHist1D(m_histReject[i],sqrt(invmass2));
+		    fillHist1D(m_histReject[i],std::sqrt(invmass2));
                     fillHist2D(m_histRejectEta1Eta2[i],(*tob1)->eta(),(*tob2)->eta());
                     fillHist2D(m_histRejectEta2Eta3[i],(*tob2)->eta(),(*tob3)->eta());
                     fillHist2D(m_histRejectEta3Eta1[i],(*tob3)->eta(),(*tob1)->eta());
@@ -244,7 +244,9 @@ TCS::InvariantMassThreeTOBsInclCharge::process( const std::vector<TCS::TOBArray
 		unsigned int invmass2_13 = TSU::Kinematics::calcInvMass( *tob1, *tob3 );
 		unsigned int invmass2_23 = TSU::Kinematics::calcInvMass( *tob2, *tob3 );
 		unsigned int invmass2 = invmass2_12 + invmass2_13 + invmass2_23;
-                // Muon sector and charge
+                // Charge cut ( for TGC muons: 0=negative, 1=positive, as described at ATR-22621 )
+                // Check the definition of sectorName at MuCTPIL1TopoCandidate.h (for TGC muons: sectorName.at(0)=E or F, for RPC muons: sectorName.at(0)=B)
+                // If no muon sectorName information is available, sectorName = ""
                 std::string sector1 = (*tob1)->sectorName();
                 std::string sector2 = (*tob2)->sectorName();
                 std::string sector3 = (*tob3)->sectorName();
@@ -252,8 +254,6 @@ TCS::InvariantMassThreeTOBsInclCharge::process( const std::vector<TCS::TOBArray
                 int charge2 = (*tob2)->charge();
                 int charge3 = (*tob3)->charge();
                 int totalCharge = charge1 + charge2 + charge3;
-                // Charge cut ( for TGC muons: 0=negative, 1=positive, as described at ATR-22621 )
-                // Reject if 3 TGC muons with total charge = -3 or 3 ( 0 or 3 in our convention )
                 bool acceptCharge = true;
                 if ( sector1 != "" && sector2 != "" && sector3 != "" && sector1.at(0) != 'B' && sector2.at(0) != 'B' && sector3.at(0) != 'B' ) {
                    if ( totalCharge == 0 or totalCharge == 3 ) { acceptCharge = false; }
@@ -278,12 +278,12 @@ TCS::InvariantMassThreeTOBsInclCharge::process( const std::vector<TCS::TOBArray
 		    TOBvector.clear();
 		  }
 		  if(fillAccept and not alreadyFilled) {
-		    fillHist1D(m_histAccept[i],sqrt(invmass2));
+		    fillHist1D(m_histAccept[i],std::sqrt(invmass2));
                     fillHist2D(m_histAcceptEta1Eta2[i],(*tob1)->eta(),(*tob2)->eta());
                     fillHist2D(m_histAcceptEta2Eta3[i],(*tob2)->eta(),(*tob3)->eta());
                     fillHist2D(m_histAcceptEta3Eta1[i],(*tob3)->eta(),(*tob1)->eta());
 		  } else if(fillReject) {
-		    fillHist1D(m_histReject[i],sqrt(invmass2));
+		    fillHist1D(m_histReject[i],std::sqrt(invmass2));
                     fillHist2D(m_histRejectEta1Eta2[i],(*tob1)->eta(),(*tob2)->eta());
                     fillHist2D(m_histRejectEta2Eta3[i],(*tob2)->eta(),(*tob3)->eta());
                     fillHist2D(m_histRejectEta3Eta1[i],(*tob3)->eta(),(*tob1)->eta());