diff --git a/MQ/hitbuilder/startMQ_Mcbm2020.sh b/MQ/hitbuilder/startMQ_Mcbm2020.sh
new file mode 100644
index 0000000000000000000000000000000000000000..945cd4a960118aa2a4e2699d0fcca51437367937
--- /dev/null
+++ b/MQ/hitbuilder/startMQ_Mcbm2020.sh
@@ -0,0 +1,275 @@
+#!/bin/bash
+$FAIRROOTPATH/bin/shmmonitor --cleanup
+
+if [ -z "$1" ]; then 
+    _runname="359"
+else 
+    _runname=$1
+fi
+ 
+if [ -z "$2" ]; then 
+_reqmod=-193
+else 
+_reqmod=$2
+fi
+
+if [ -z "$3" ]; then 
+_pulmode=1
+else 
+_pulmode=$3
+fi
+
+if [ -z "$4" ]; then 
+    _reqtint=100
+else
+    _reqtint=$4 
+fi
+
+_Opt=$5
+
+_ntimeslices=-1
+#_ntimeslices=10000
+_iUnp=4
+_batch=1
+_pulmulmin=5
+_pultotmin=50
+_pultotmax=500
+_puldetref=16 # TSR=032
+#_puldetref=17 # TSR=032
+
+#_tofftof=0.  
+_tofftof=-30. 
+
+if [[ $_reqmod -eq 1 ]]; then
+  _iUnp=1
+fi
+
+#_dirname=/lustre/nyx/cbm/users/nh/CBM/cbmroot/trunk/macro/beamtime/mcbm2018/input/$_runname/
+_outdir=/lustre/cbm/users/nh/CBM/cbmroot/trunk/macro/beamtime/mcbm2020/data/
+#_datapath=~/KRONOS/CBM/cbmroot/trunk
+#_dirname=$_datapath/macro/beamtime/mcbm2018/input/$_runname/
+#_outdir=$_datapath/macro/beamtime/mcbm2018/data/
+ 
+#_filename="./tsaData/${_runname}_pn05_*.tsa;./tsaData/${_runname}_pn06_*.tsa;./tsaData/${_runname}_pn07_*.tsa"
+_filename="./tsaData2020/${_runname}_pn02_*.tsa;./tsaData2020/${_runname}_pn04_*.tsa;./tsaData2020/${_runname}_pn05_*.tsa;./tsaData2020/${_runname}_pn06_*.tsa;./tsaData2020/${_runname}_pn08_*.tsa;./tsaData2020/${_runname}_pn10_*.tsa;./tsaData2020/${_runname}_pn11_*.tsa;./tsaData2020/${_runname}_pn12_*.tsa;./tsaData2020/${_runname}_pn13_*.tsa;./tsaData2020/${_runname}_pn15_*.tsa"
+_digifile=$_runname.$_reqtint.$_reqmod.${_pulmode}${_Opt}.root
+
+# ASCII files  
+#_mapfile=/lustre/nyx/cbm/users/nh/CBM/cbmroot/trunk/MQ/hitbuilder/MapTofGbtx.par
+_mapfile=/lustre/cbm/users/nh/CBM/cbmroot/trunk/macro/beamtime/mcbm2020/mTofPar.par
+if [ $_runname -ge 707 ] && [ $_runname -lt 754 ]; then 
+  _mapfile=/lustre/cbm/users/nh/CBM/cbmroot/trunk/macro/beamtime/mcbm2020/mTofPar_2Stack.par
+else
+  if [ $_runname -ge 754 ]; then 
+    _mapfile=/lustre/cbm/users/nh/CBM/cbmroot/trunk/macro/beamtime/mcbm2020/mTofPar_3Stack.par
+    _puldetref=12 # TSR=022
+  fi
+fi 
+#_mapfile=/lustre/nyx/cbm/users/nh/CBM/cbmroot/trunk/macro/beamtime/mcbm2018/etofPar.par
+#_digibdffile=/lustre/nyx/cbm/users/nh/CBM/cbmroot/trunk/parameters/tof/v18j_cosmicHD.digibdf.par
+#_digiparfile=/lustre/nyx/cbm/users/nh/CBM/cbmroot/trunk/parameters/tof/tof_v18j_cosmicHD.digi.par
+_digibdffile=/lustre/cbm/users/nh/CBM/cbmroot/trunk/parameters/tof/v19b_mcbm.digibdf.par
+_digiparfile=/lustre/cbm/users/nh/CBM/cbmroot/trunk/parameters/tof/tof_v19b_mcbm.digi.par
+
+# ROOT files 
+_geofile=/lustre/cbm/users/nh/CBM/cbmroot/trunk/macro/beamtime/mcbm2018/tof_v18l_mCbm.par.root
+
+# MQ ports
+_pPar=5603
+_pSam=5613
+_pCmd=5623
+_pDig=5633
+
+rm -v nohup.out 
+#rm -v *log
+rm all_*
+
+PARAMETERSERVER="parmq-server"
+echo pkill $PARAMETERSERVER
+pkill -9 $PARAMETERSERVER
+pkill -9 $PARAMETERSERVER
+sleep 1
+PARAMETERSERVER+=" --id parmq-server"
+PARAMETERSERVER+=" --channel-name parameters"
+PARAMETERSERVER+=" --channel-config name=parameters,type=rep,method=bind,rateLogging=0,transport=zeromq,address=tcp://127.0.0.1:$_pPar"
+#PARAMETERSERVER+=" --libs-to-load libCbmTof;libCbmFlibMcbm2018"
+PARAMETERSERVER+=" --first-input-name $_mapfile;$_digiparfile;$_digibdffile"
+PARAMETERSERVER+=" --first-input-type ASCII"
+PARAMETERSERVER+=" --second-input-name $_geofile"
+PARAMETERSERVER+=" --second-input-type ROOT"
+PARAMETERSERVER+=" --severity INFO"
+if  [[ $_batch = 1 ]]; then 
+PARAMETERSERVER+=" --control static"
+PARAMETERSERVER+=" --log-to-file ParServ.out"
+nohup /lustre/nyx/cbm/users/nh/CBM/cbmroot/trunk/build/bin/MQ/parmq/$PARAMETERSERVER &
+else
+xterm -geometry 80x23+0+340 -hold -e /lustre/nyx/cbm/users/nh/CBM/cbmroot/trunk/build/bin/MQ/parmq/$PARAMETERSERVER &
+#xterm -geometry 80x23+500+0 -hold -e /cvmfs/fairroot.gsi.de/fairroot/v18.0.6_fairsoft-may18/bin/$PARAMETERSERVER &
+fi
+
+SAMPLER="TsaMultiSamplerTof"
+SAMPLER+=" --id sampler1"
+SAMPLER+=" --max-timeslices $_ntimeslices"
+#SAMPLER+=" --max-timeslices 1000000"
+#SAMPLER+=" --flib-port 10"
+#SAMPLER+=" --dirname $_dirname"
+SAMPLER+=" --filename $_filename"
+#SAMPLER+=" --flib-host myHost"
+SAMPLER+=" --channel-config name=tofcomponent,type=push,method=bind,rateLogging=0,transport=zeromq,address=tcp://*:$_pSam"
+SAMPLER+=" --channel-config name=syscmd,type=pub,method=bind,rateLogging=0,transport=zeromq,address=tcp://*:$_pCmd"
+#SAMPLER+=" --transport shmem"
+#SAMPLER+=" --transport zeromq"
+#SAMPLER+=" --transport nanomsg"
+#SAMPLER+=" --severity WARN"
+SAMPLER+=" --severity INFO"
+#SAMPLER+=" --severity DEBUG"
+SAMPLER+=" --SelectComponents 1"
+if  [[ $_batch = 1 ]]; then 
+SAMPLER+=" --log-to-file Sampl.out"
+SAMPLER+=" --control static"
+nohup  /lustre/nyx/cbm/users/nh/CBM/cbmroot/trunk/build/bin/MQ/source/$SAMPLER & 
+else 
+xterm -geometry 80x23+0+0 -hold -e /lustre/nyx/cbm/users/nh/CBM/cbmroot/trunk/build/bin/MQ/source/$SAMPLER &
+fi
+ 
+while (( _iUnp > 0 )); do
+
+UNPACKER="UnpackTofMcbm2018"
+UNPACKER+=" --id unpack$_iUnp"
+UNPACKER+=" --channel-config name=tofcomponent,type=pull,method=connect,rateLogging=0,transport=zeromq,address=tcp://127.0.0.1:$_pSam"
+UNPACKER+=" --channel-config name=parameters,type=req,method=connect,rateLogging=0,transport=zeromq,address=tcp://127.0.0.1:$_pPar"
+UNPACKER+=" --channel-config name=tofdigis,type=push,method=connect,rateLogging=0,transport=zeromq,address=tcp://127.0.0.1:$_pDig"
+UNPACKER+=" --channel-config name=syscmd,type=sub,method=connect,rateLogging=0,transport=zeromq,address=tcp://127.0.0.1:$_pCmd"
+#UNPACKER+=" --transport shmem"
+#UNPACKER+=" --severity DEBUG"
+UNPACKER+=" --severity  INFO"
+UNPACKER+=" --SelectComponents 1"
+#UNPACKER+=" --ReqBeam      20486" # diamond -> 0x00005006
+if  [[ $_reqmod -lt 1 ]]; then
+    UNPACKER+=" --ReqMode 0"
+    case $_reqmod in
+	0)
+	    ;;
+       -1)
+	    UNPACKER+=" --ReqDet0       20486" # diamond -> 0x00005006
+	    UNPACKER+=" --ReqDet1       65590" # RPC 031 -> 0x00010036
+	    UNPACKER+=" --ReqDet2       65606" # RPC 041
+	    ;;
+       -2) 
+	    UNPACKER+=" --ReqDet0       20486" # diamond
+	    UNPACKER+=" --ReqDet1      131126" # RPC 032
+	    UNPACKER+=" --ReqDet2      131142" # RPC 042
+	    ;; # for ceramics
+
+       -3)
+	    UNPACKER+=" --ReqDet0       20486" # diamond
+	    UNPACKER+=" --ReqDet1      196662" # RPC 033
+	    UNPACKER+=" --ReqDet2      196678" # RPC 043
+	    ;; # for BUC
+       
+       -190) 
+	    UNPACKER+=" --ReqDet0       20486"  # diamond
+	    UNPACKER+=" --ReqDet1       65606"  # RPC 041
+	    UNPACKER+=" --ReqDet2       36870"  # RPC 900
+	    UNPACKER+=" --ReqDet3     102406"  # RPC 901
+	    ;; # for  double stack calibration
+       
+       -191) 
+	    UNPACKER+=" --ReqDet0       20486" # diamond
+	    UNPACKER+=" --ReqDet1       65606"  # RPC 041
+	    UNPACKER+=" --ReqDet2       24582"  # RPC 600
+	    UNPACKER+=" --ReqDet3       90118"   # RPC 601
+	    ;; # for USTC counter analysis
+
+       -192) 
+	    UNPACKER+=" --ReqDet0       65606"  # RPC 041
+	    UNPACKER+=" --ReqDet1       36870"  # RPC 900
+	    UNPACKER+=" --ReqDet2     102406"   # RPC 901
+	    ;; # for  double stack calibration
+
+       -193) BeamBeam
+	    UNPACKER+=" --ReqDet0       65606"  # RPC 041
+	    UNPACKER+=" --ReqDet1       24582"  # RPC 600
+	    UNPACKER+=" --ReqDet2       90118"  # RPC 601
+	    ;; # for USTC counter analysis
+
+       -194) 
+	    UNPACKER+=" --ReqDet0       20486"  # diamond
+	    UNPACKER+=" --ReqDet1       24582"  # RPC 600
+	    UNPACKER+=" --ReqDet2       90118"  # RPC 601
+	    ;; # for USTC counter analysis
+	    
+       *)
+	    echo ReqMode $_reqmod not yet defined, exiting
+	    exit 1
+	    ;;
+    esac;
+else
+    UNPACKER+=" --ReqMode $_reqmod"
+fi
+UNPACKER+=" --ReqTint $_reqtint"
+UNPACKER+=" --PulserMode $_pulmode"
+UNPACKER+=" --PulMulMin $_pulmulmin"
+UNPACKER+=" --PulTotMin $_pultotmin"
+UNPACKER+=" --PulTotMax $_pultotmax"
+UNPACKER+=" --ToffTof $_tofftof"
+UNPACKER+=" --RefModType 5"
+UNPACKER+=" --RefModId      0"
+UNPACKER+=" --RefCtrType  4"
+UNPACKER+=" --RefCtrId        0"
+if  [[ $_batch = 1 ]]; then 
+UNPACKER+=" --control static"
+UNPACKER+=" --log-to-file Unp$_iUnp.out"
+#echo nohup $UNPACKER 
+nohup /lustre/nyx/cbm/users/nh/CBM/cbmroot/trunk/build/bin/MQ/unpacker/$UNPACKER &
+else 
+xterm -geometry 110x23+520+0 -hold -e /lustre/nyx/cbm/users/nh/CBM/cbmroot/trunk/build/bin/MQ/unpacker/$UNPACKER & 
+fi
+
+(( _iUnp -= 1 ))
+done 
+
+HITBUILDER="HitBuilderTof"
+HITBUILDER+=" --id hitbuilder1"
+HITBUILDER+=" --channel-config name=tofdigis,type=pull,method=bind,rateLogging=0,transport=zeromq,address=tcp://*:$_pDig"
+HITBUILDER+=" --channel-config name=parameters,type=req,method=connect,rateLogging=0,transport=zeromq,address=tcp://127.0.0.1:$_pPar"
+HITBUILDER+=" --channel-config name=syscmd,type=sub,method=connect,rateLogging=0,transport=zeromq,address=tcp://127.0.0.1:$_pCmd"
+#HITBUILDER+=" --channel-config name=tofhits,type=push,method=bind,transport=shmem,address=tcp://127.0.0.1:5557"
+#HITBUILDER+=" --channel-config name=tofcalib,type=push,method=bind,transport=shmem,address=tcp://127.0.0.1:5558"
+#HITBUILDER+=" --transport shmem"
+#HITBUILDER+=" --severity DEBUG"
+HITBUILDER+=" --severity INFO"
+#HITBUILDER+=" --severity WARN"
+HITBUILDER+=" --OutRootFile $_outdir$_digifile"
+#HITBUILDER+=" --MaxEvent 10000000"
+HITBUILDER+=" --RunId 1552883952"
+HITBUILDER+=" --PulserMode $_pulmode"
+HITBUILDER+=" --PulMulMin $_pulmulmin"
+HITBUILDER+=" --PulTotMin $_pultotmin"
+HITBUILDER+=" --PulTotMax $_pultotmax"
+HITBUILDER+=" --PulDetRef $_puldetref"
+HITBUILDER+=" --ReqTint $_reqtint"
+#HITBUILDER+=" --ReqBeam      20486" # diamond -> 0x00005006
+HITBUILDER+=" --BRefType  5"
+HITBUILDER+=" --BRefSm    0"
+HITBUILDER+=" --BRefDet   0"
+HITBUILDER+=" --DutType   0"
+HITBUILDER+=" --DutSm     3"
+HITBUILDER+=" --DutRpc    1"
+HITBUILDER+=" --SelType   0"
+HITBUILDER+=" --SelSm     4"
+HITBUILDER+=" --SelRpc    1"
+HITBUILDER+=" --Sel2Type  5"
+HITBUILDER+=" --Sel2Sm    0"
+HITBUILDER+=" --Sel2Rpc   0"
+if [[ $_reqmod -eq 1 ]]; then
+HITBUILDER+=" --Mode   1"
+fi
+
+if  [[ $_batch = 1 ]]; then 
+HITBUILDER+=" --control static"
+HITBUILDER+=" --log-to-file HitBuild.out"
+nohup  /lustre/nyx/cbm/users/nh/CBM/cbmroot/trunk/build/bin/MQ/hitbuilder/$HITBUILDER &
+else
+xterm -geometry 120x23+1400+0 -hold -e /lustre/nyx/cbm/users/nh/CBM/cbmroot/trunk/build/bin/MQ/hitbuilder/$HITBUILDER &
+fi
diff --git a/analysis/detectors/tof/CbmTofAnaTestbeam.cxx b/analysis/detectors/tof/CbmTofAnaTestbeam.cxx
index b654447f045251700f766e9011957221bc197532..212359bd09076d287d0b7925fa6c4acd9cfc6c19 100644
--- a/analysis/detectors/tof/CbmTofAnaTestbeam.cxx
+++ b/analysis/detectors/tof/CbmTofAnaTestbeam.cxx
@@ -72,7 +72,7 @@ using std::cout;
 using std::endl;
 using std::vector;
 
-const Int_t DetMask   = 0x007FFFFF;
+const Int_t DetMask   = 0x001FFFFF;  // for v21a geometries
 const Double_t DTDMAX = 6.;  // diamond inspection range in ns
 
 Double_t dTDia;
diff --git a/core/detectors/tof/CbmTofDigiBdfPar.cxx b/core/detectors/tof/CbmTofDigiBdfPar.cxx
index 95f5067476de34c5f1ef8f1d39b5e1dd07c14a03..96dada9acc6df8c36545061ec96a1bc8737d7b89 100644
--- a/core/detectors/tof/CbmTofDigiBdfPar.cxx
+++ b/core/detectors/tof/CbmTofDigiBdfPar.cxx
@@ -877,16 +877,8 @@ Int_t CbmTofDigiBdfPar::GetNbDet() const { return fiDetUId.GetSize(); }
 
 Int_t CbmTofDigiBdfPar::GetDetInd(Int_t iAddr) {
 
-  const Int_t DetMask = 4194303;
-  /*
-  Int_t iInd=0;
-  while (fiDetUId[iInd] != (iAddr & DetMask) && iInd<fiDetUId.GetSize()) iInd++; //FIXME, inefficient and using a numerical constant!
-  if(iInd == fiDetUId.GetSize()){
-    LOG(error)<<Form(" detector id 0x%08x unknown ",iAddr) ;
-    iInd=0;
-  }
-  return iInd;
-  */
+  //const Int_t DetMask = 0x3fffff; // v14a
+  const Int_t DetMask = 0x1fffff; // v21a
   return fMapDetInd[(iAddr & DetMask)];
 }
 
diff --git a/reco/detectors/tof/CbmTofEventClusterizer.cxx b/reco/detectors/tof/CbmTofEventClusterizer.cxx
index e81e978fc31ff077d70b1a42280edca7709c2735..1b9391266157137e46553bb1bebc021c9a6a1232 100644
--- a/reco/detectors/tof/CbmTofEventClusterizer.cxx
+++ b/reco/detectors/tof/CbmTofEventClusterizer.cxx
@@ -561,7 +561,7 @@ Bool_t CbmTofEventClusterizer::RegisterOutputs() {
   if (NULL == fEventsColl) {
     // Flag check to control whether digis are written in output root file
     //rootMgr->Register( "TofCalDigi","Tof", fTofCalDigisColl, fbWriteDigisInOut);
-    rootMgr->RegisterAny("TofCalDigi", fTofCalDigiVec, fbWriteDigisInOut);
+	rootMgr->RegisterAny("TofCalDigi", fTofCalDigiVec, fbWriteDigisInOut);
 
     // Flag check to control whether digis are written in output root file
     rootMgr->Register(tHitBranchName, "Tof", fTofHitsColl, fbWriteHitsInOut);
@@ -5342,8 +5342,10 @@ Bool_t CbmTofEventClusterizer::BuildClusters() {
       CbmTofDigi* pDigi = &(fTofDigiVec.at(iDigInd));
       //CbmTofDigi *pDigi = (CbmTofDigi*) fTofDigisColl->At( iDigInd );
       if (pDigi->GetType() == 5) {
-        if (pDigi->GetSide() == 1)
+        if (pDigi->GetSide() == 1) {
           bAddBeamCounterSideDigi = kFALSE;  // disable for current data set
+          LOG(info) << "Start counter digi duplication disabled";
+        }
         fTofDigiVec.push_back(CbmTofDigi(*pDigi));
         CbmTofDigi* pDigiN = &(fTofDigiVec.back());
         //	 CbmTofDigi *pDigiN  = new((*fTofDigisColl)[iNbDigi++]) CbmTofDigi( *pDigi );
@@ -5352,6 +5354,7 @@ Bool_t CbmTofEventClusterizer::BuildClusters() {
                            pDigi->GetChannel(),
                            (0 == pDigi->GetSide()) ? 1 : 0,
                            pDigi->GetType());
+        LOG(debug) << "Duplicated digi at address 0x" << std::hex << pDigiN->GetAddress();
       }
     }
     iNbTofDigi = fTofDigiVec.size();
@@ -5362,20 +5365,23 @@ Bool_t CbmTofEventClusterizer::BuildClusters() {
     for (Int_t iDigInd = 0; iDigInd < iNbTofDigi; iDigInd++) {
       //CbmTofDigi *pDigi = (CbmTofDigi*) fTofDigisColl->At( iDigInd );
       CbmTofDigi* pDigi = &(fTofDigiVec.at(iDigInd));
+      Int_t iDetIndx = fDigiBdfPar->GetDetInd(pDigi->GetAddress());
+
       LOG(debug) << iDigInd << " " << pDigi
                  << Form(" Address : 0x%08x ", pDigi->GetAddress()) << " SmT "
                  << pDigi->GetType() << " Sm " << pDigi->GetSm() << " Rpc "
                  << pDigi->GetRpc() << " Ch " << pDigi->GetChannel() << " S "
-                 << pDigi->GetSide() << " : " << pDigi->ToString()
+                 << pDigi->GetSide()
+				 << ", DetIndx " << iDetIndx
+				 << " : " << pDigi->ToString()
         //         <<" Time "<<pDigi->GetTime()
         //         <<" Tot " <<pDigi->GetTot()
         ;
 
-      Int_t iDetIndx = fDigiBdfPar->GetDetInd(pDigi->GetAddress());
 
       if (fDigiBdfPar->GetNbDet() - 1 < iDetIndx || iDetIndx < 0) {
         LOG(debug) << Form(
-          " Wrong DetIndx %d >< %d,0 ", iDetIndx, fDigiBdfPar->GetNbDet());
+          " Wrong DetIndx %d >< %d ", iDetIndx, fDigiBdfPar->GetNbDet());
         break;
       }
 
@@ -5409,6 +5415,7 @@ Bool_t CbmTofEventClusterizer::BuildClusters() {
       for (Int_t iDigI2 = 0; iDigI2 < iNbTofDigi; iDigI2++) {
         CbmTofDigi* pDigi2 = &(fTofDigiVec.at(iDigI2));
         //         CbmTofDigi *pDigi2 = (CbmTofDigi*) fTofDigisColl->At( iDigI2 );
+        // Fill digi correlation histogram per counter
         if (iDetIndx == fDigiBdfPar->GetDetInd(pDigi2->GetAddress())) {
           if (0. == pDigi->GetSide() && 1. == pDigi2->GetSide()) {
             fhRpcDigiCor[iDetIndx]->Fill(pDigi->GetChannel(),
@@ -5538,7 +5545,7 @@ Bool_t CbmTofEventClusterizer::BuildClusters() {
               if (fiMsgCnt-- > 0) {
                 LOG(warning)
                   << " BuildClusters: Inconsistent duplicated digis in event "
-                  << fiNevtBuild << ", Ind: " << iDigInd;
+                  << fiNevtBuild << ", Ind: " << iDigInd; // << "CTyp: " << pDigi->GetCounterType;
                 LOG(warning) << "   " << pDigi->ToString();
                 LOG(warning) << "   " << pDigi2Min->ToString();
               }
@@ -6564,8 +6571,7 @@ Bool_t CbmTofEventClusterizer::BuildHits() {
                   fChannelInfo = fDigiPar->GetCell(iChId);
 
                   if (NULL == fChannelInfo) {
-                    LOG(error) << "CbmTofEventClusterizer::BuildClusters: no "
-                                  "geometry info! "
+                    LOG(error) << "CbmTofEventClusterizer::BuildClusters: no geometry info! "
                                << Form(" %3d %3d %3d %3d 0x%08x 0x%08x ",
                                        iSmType,
                                        iSm,
@@ -7296,9 +7302,9 @@ Bool_t CbmTofEventClusterizer::CalibRawDigis() {
                      > mChannelDeadTime[iAddr] + fdChannelDeadtime))) {
 
         //       pCalDigi = new((*fTofCalDigisColl)[++iDigIndCal]) CbmTofDigi( *pDigi );
-        fTofCalDigiVec->push_back(CbmTofDigi(*pDigi));
-        pCalDigi = &(fTofCalDigiVec->back());
-        iDigIndCal++;
+          fTofCalDigiVec->push_back(CbmTofDigi(*pDigi));
+          pCalDigi = &(fTofCalDigiVec->back());
+          iDigIndCal++;
       }
     } else {
       fTofCalDigiVec->push_back(CbmTofDigi(*pDigi));
diff --git a/reco/detectors/tof/CbmTofFindTracks.cxx b/reco/detectors/tof/CbmTofFindTracks.cxx
index 5a53cb2d456f8a5b6ccf77f0ca44d8b2f7fa8d7a..f581e8abfc5171a49101ae6bcf3d0d979a7b447b 100644
--- a/reco/detectors/tof/CbmTofFindTracks.cxx
+++ b/reco/detectors/tof/CbmTofFindTracks.cxx
@@ -52,7 +52,8 @@ using std::cout;
 using std::endl;
 using std::vector;
 
-const Int_t DetMask = 0x3FFFFF;  // check for consistency with geometry
+//const Int_t DetMask = 0x3FFFFF;  // check for consistency with v14a geometry
+const Int_t DetMask = 0x1FFFFF;  // check for consistency with v21a geometry
 
 ClassImp(CbmTofFindTracks);
 
@@ -429,11 +430,9 @@ Bool_t CbmTofFindTracks::LoadCalParameter() {
         Int_t iUniqueId          = it->first;
         CbmTofCell* fChannelInfo = fDigiPar->GetCell(iUniqueId);
         if (NULL != fChannelInfo) {
-          Double_t dVal =
-            0.;  // FIXME numeric constant in code, default for cosmic
+          Double_t dVal = 0.;  // FIXME numeric constant in code, default for cosmic
           if (fiBeamCounter != iUniqueId)
-            dVal =
-              fChannelInfo->GetZ() * fTtTarg;  //  use calibration target value
+            dVal = fChannelInfo->GetZ() * fTtTarg;  //  use calibration target value
           fhPullT_Smt_Off->SetBinContent(iDet + 1, dVal);
           LOG(info) << Form("Initialize det 0x%08x at %d, z=%f with TOff %6.2f",
                             iUniqueId,
diff --git a/reco/detectors/tof/CbmTofTrackFinderNN.cxx b/reco/detectors/tof/CbmTofTrackFinderNN.cxx
index 1f0a7fc7eb92b5c878ebc3771efa0b509f5fbc0e..f150cc984d6bad99de0d32e8d856231c6e0addce 100644
--- a/reco/detectors/tof/CbmTofTrackFinderNN.cxx
+++ b/reco/detectors/tof/CbmTofTrackFinderNN.cxx
@@ -45,7 +45,8 @@ using std::cout;
 using std::endl;
 using std::map;
 
-const Int_t DetMask = 0x3FFFFF;  // check for consistency with geometry
+//const Int_t DetMask = 0x3FFFFF;  // check for consistency with v14a geometry
+const Int_t DetMask = 0x3FFFFF;  // check for consistency with v21a geometry
 LKFMinuit CbmTofTrackFinderNN::fMinuit;
 
 CbmTofTrackFinderNN::CbmTofTrackFinderNN()