diff --git a/macro/KF/KFParticleFinderSignalTest/Signal/physSignal.C b/macro/KF/KFParticleFinderSignalTest/Signal/physSignal.C
index fcb76e211796323974722898c412874d47b89fb4..1ca4cc5cd9aea748e2ce0f8adacc8c4af6c17481 100644
--- a/macro/KF/KFParticleFinderSignalTest/Signal/physSignal.C
+++ b/macro/KF/KFParticleFinderSignalTest/Signal/physSignal.C
@@ -144,15 +144,12 @@ void physSignal(Int_t nEvents = 1000, const char* setupName = "sis100_electron")
     parIo2->open(parFileList, "in");
     rtdb->setSecondInput(parIo2);
   }
+  rtdb->setOutput(parIo1);
   // ------------------------------------------------------------------------
 
   // -----   Intialise and run   --------------------------------------------
   run->Init();
 
-  rtdb->setOutput(parIo1);
-  rtdb->saveOutput();
-  rtdb->print();
-
   KFPartEfficiencies eff;
   for (int jParticle = eff.fFirstStableParticleIndex + 10; jParticle <= eff.fLastStableParticleIndex; jParticle++) {
     TDatabasePDG* pdgDB = TDatabasePDG::Instance();
@@ -163,8 +160,10 @@ void physSignal(Int_t nEvents = 1000, const char* setupName = "sis100_electron")
     }
   }
   run->Run(firstEventToRun, lastEventToRun + 1);
-  // ------------------------------------------------------------------------
 
+  // ------------------------------------------------------------------------
+  rtdb->saveOutput();
+  rtdb->print();
   timer.Stop();
   Double_t rtime = timer.RealTime();
   Double_t ctime = timer.CpuTime();
diff --git a/macro/KF/KFParticleFinderSignalTest/Signal/recoSignal.C b/macro/KF/KFParticleFinderSignalTest/Signal/recoSignal.C
index ae60341bb33b797b32488b76094f1bfa0706b55c..2ffb2449dd51df40741927085d34c38bcd620e05 100644
--- a/macro/KF/KFParticleFinderSignalTest/Signal/recoSignal.C
+++ b/macro/KF/KFParticleFinderSignalTest/Signal/recoSignal.C
@@ -307,16 +307,13 @@ void recoSignal(Int_t nEvents = 1000, const char* setupName = "sis100_electron")
     parIo2->open(parFileList, "in");
     rtdb->setSecondInput(parIo2);
   }
+  rtdb->setOutput(parIo1);
   // ------------------------------------------------------------------------
 
 
   // -----   Intialise and run   --------------------------------------------
   run->Init();
 
-  rtdb->setOutput(parIo1);
-  rtdb->saveOutput();
-  rtdb->print();
-
   //add ions to the TDatabasePDG
   KFPartEfficiencies eff;
   for (int jParticle = eff.fFirstStableParticleIndex + 10; jParticle <= eff.fLastStableParticleIndex; jParticle++) {
@@ -332,6 +329,8 @@ void recoSignal(Int_t nEvents = 1000, const char* setupName = "sis100_electron")
   // ------------------------------------------------------------------------
 
   // -----   Finish   -------------------------------------------------------
+  rtdb->saveOutput();
+  rtdb->print();
   timer.Stop();
   Double_t rtime = timer.RealTime();
   Double_t ctime = timer.CpuTime();
diff --git a/macro/KF/KFParticleFinderSignalTest/Signal/simSignal.C b/macro/KF/KFParticleFinderSignalTest/Signal/simSignal.C
index 74fa3d56d5eb9c152afdbba96bd9f57f51f5eb13..83c883e93ca63fca2e815d48c16c1fa28206a09d 100644
--- a/macro/KF/KFParticleFinderSignalTest/Signal/simSignal.C
+++ b/macro/KF/KFParticleFinderSignalTest/Signal/simSignal.C
@@ -226,8 +226,6 @@ void simSignal(int iParticle = 0, Int_t nEvents = 1000, const char* setupName =
   FairParRootFileIo* parOut = new FairParRootFileIo(kParameterMerged);
   parOut->open(parFile.Data());
   rtdb->setOutput(parOut);
-  rtdb->saveOutput();
-  rtdb->print();
   // ------------------------------------------------------------------------
 
   if (!(iParticle == 56 || iParticle == 57)) {
@@ -286,6 +284,8 @@ void simSignal(int iParticle = 0, Int_t nEvents = 1000, const char* setupName =
 
 
   // -----   Finish   -------------------------------------------------------
+  rtdb->saveOutput();
+  rtdb->print();
   run->CreateGeometryFile(geoFile);
   timer.Stop();
   Double_t rtime = timer.RealTime();
diff --git a/macro/KF/kf_kfparticle.C b/macro/KF/kf_kfparticle.C
index e5d3ce5e47c4375677b6f086078bca70e31f47da..8f575c9b80bd8f62ef017c3cee9a5d39481fd9bf 100644
--- a/macro/KF/kf_kfparticle.C
+++ b/macro/KF/kf_kfparticle.C
@@ -229,7 +229,8 @@ void kf_kfparticle(Int_t nEvents = 2, const TString setupName = "sis100_electron
   kfParticleFinderQA->SetEffFileName(effFile.Data());
   if (iDecay > -1) {
     TString referenceResults = srcDir + "/input/qa/KF/reference/";
-    if (useDetectorPID) referenceResults += "realpid/";
+    if (useDetectorPID)
+      referenceResults += "realpid/";
     else
       referenceResults += "mcpid/";
     kfParticleFinderQA->SetReferenceResults(referenceResults);
@@ -251,15 +252,12 @@ void kf_kfparticle(Int_t nEvents = 2, const TString setupName = "sis100_electron
   FairParAsciiFileIo* parIo2 = new FairParAsciiFileIo();
   parIo1->open(parFile.Data(), "UPDATE");
   rtdb->setFirstInput(parIo1);
+  rtdb->setOutput(parIo1);
   // ------------------------------------------------------------------------
 
   // -----   Intialise and run   --------------------------------------------
   run->Init();
 
-  rtdb->setOutput(parIo1);
-  rtdb->saveOutput();
-  rtdb->print();
-
   KFPartEfficiencies eff;
   for (int jParticle = eff.fFirstStableParticleIndex + 10; jParticle <= eff.fLastStableParticleIndex; jParticle++) {
     TDatabasePDG* pdgDB = TDatabasePDG::Instance();
@@ -273,6 +271,8 @@ void kf_kfparticle(Int_t nEvents = 2, const TString setupName = "sis100_electron
   // ------------------------------------------------------------------------
 
   // -----   Finish   -------------------------------------------------------
+  rtdb->saveOutput();
+  rtdb->print();
   if (hasFairMonitor) FairMonitor::GetMonitor()->Print();
   timer.Stop();
   Double_t rtime = timer.RealTime();
diff --git a/macro/KF/kf_transport.C b/macro/KF/kf_transport.C
index e682ad9653e1f1aaf080bf00ab56e679ac2b6966..f99971dd998280e47cbdc55abd250a5576c1de92 100644
--- a/macro/KF/kf_transport.C
+++ b/macro/KF/kf_transport.C
@@ -47,9 +47,12 @@ void kf_transport(Int_t nEvents = 2, const char* setupName = "sis100_electron",
   std::cout << std::endl;
   TString defaultInputFile = srcDir + "/input/urqmd.auau.10gev.centr.root";
   TString inFile;
-  if (strcmp(inputFile, "") == 0) inFile = defaultInputFile;
-  else
+  if (strcmp(inputFile, "") == 0) {
+    inFile = defaultInputFile;
+  }
+  else {
     inFile = inputFile;
+  }
   std::cout << "-I- " << myName << ": Using input file " << inFile << std::endl;
   // ------------------------------------------------------------------------
 
@@ -271,8 +274,6 @@ void kf_transport(Int_t nEvents = 2, const char* setupName = "sis100_electron",
   FairParRootFileIo* parOut = new FairParRootFileIo(kParameterMerged);
   parOut->open(parFile.Data());
   rtdb->setOutput(parOut);
-  rtdb->saveOutput();
-  rtdb->print();
   // ------------------------------------------------------------------------
 
 
@@ -284,6 +285,8 @@ void kf_transport(Int_t nEvents = 2, const char* setupName = "sis100_electron",
 
 
   // -----   Finish   -------------------------------------------------------
+  rtdb->saveOutput();
+  rtdb->print();
   run->CreateGeometryFile(geoFile);
   timer.Stop();
   Double_t rtime = timer.RealTime();
diff --git a/macro/KF/kf_transport_new.C b/macro/KF/kf_transport_new.C
index 41bb6b63d507ff5d1268b1dd2cb5a4e392914394..3e7b6af79c22e401a938aebc7ad88b297f340fd4 100644
--- a/macro/KF/kf_transport_new.C
+++ b/macro/KF/kf_transport_new.C
@@ -55,9 +55,12 @@ void kf_transport_new(Int_t nEvents = 2, const char* setupName = "sis100_electro
   std::cout << std::endl;
   TString defaultInputFile = srcDir + "/input/urqmd.auau.10gev.centr.root";
   TString inFile;
-  if (strcmp(inputFile, "") == 0) inFile = defaultInputFile;
-  else
+  if (strcmp(inputFile, "") == 0) {
+    inFile = defaultInputFile;
+  }
+  else {
     inFile = inputFile;
+  }
   std::cout << "-I- " << myName << ": Using input file " << inFile << std::endl;
   // ------------------------------------------------------------------------
 
diff --git a/macro/L1/perf.C b/macro/L1/perf.C
deleted file mode 100644
index 433dc1a5dae060f7f31e7aea7f1fa3dd9d7f0782..0000000000000000000000000000000000000000
--- a/macro/L1/perf.C
+++ /dev/null
@@ -1,100 +0,0 @@
-/* Copyright (C) 2006-2009 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
-   SPDX-License-Identifier: GPL-3.0-only
-   Authors: Denis Bertini [committer] */
-
-void perf()
-{
-
-  TStopwatch timer;
-  timer.Start();
-
-  gROOT->LoadMacro("/$VMCWORKDIR/gconfig/basiclibs.C");
-  basiclibs();
-  gSystem->Load("libGeoBase");
-  gSystem->Load("libBase");
-  gSystem->Load("libSts");
-  gSystem->Load("libPassive");
-  gSystem->Load("libGen");
-  gSystem->Load("libTof");
-  gSystem->Load("libRich");
-  gSystem->Load("libTrd");
-  gSystem->Load("libEcal");
-  gSystem->Load("libGlobal");
-  gSystem->Load("libKF");
-  gSystem->Load("libL1");
-  //gSystem->Load("libAnalysis");
-
-  char* inFile  = "/d/cbm02/ikisel/data/default/sim_1000_0.root";
-  char* parFile = "/d/cbm02/ikisel/data/default/sim_1000_0.params.root";
-  char* recFile = "/d/cbm02/ikisel/data/default/rec_1000_0.root";
-  char* outFile = "/d/cbm02/ikisel/data/default/perf_1000_0.root";
-  //char *outFile = "out.root";
-
-  // -----   Run   ----------------------------------------------------------
-  FairRunAna* fRun = new FairRunAna();
-  fRun->SetInputFile(inFile);
-  fRun->AddFriend(recFile);
-
-  fRun->SetOutputFile(outFile);
-
-  fRun->SetContainerStatic();
-
-  // Init Simulation Parameters from Root File
-  FairRuntimeDb* rtdb      = fRun->GetRuntimeDb();
-  FairParRootFileIo* input = new FairParRootFileIo();
-  input->open(parFile);
-
-  // Init Digitization Parameters from Ascii File
-  FairParAsciiFileIo* input2 = new FairParAsciiFileIo();
-  TString StsDigiFile(gSystem->Getenv("VMCWORKDIR"));
-  StsDigiFile = StsDigiFile + "/parameters/sts/sts_digi.par";
-  input2->open(StsDigiFile.Data(), "in");
-
-  rtdb->setFirstInput(input);
-  rtdb->setSecondInput(input2);
-
-  cout << " LoadGeometry starting..." << endl;
-  fRun->LoadGeometry();
-  cout << "LoadGeometry ok" << endl;
-  cout << " - I TGeoManager " << gGeoManager << endl;
-
-  // Kalman Filter
-
-  CbmKF* KF = new CbmKF();
-  fRun->AddTask(KF);
-
-  //****************** track fitter *************
-
-  //CbmStsKFTrackFitter* kalman = new CbmStsKFTrackFitter;
-  //CbmStsFitTracks *fitTask = new CbmStsFitTracks("Kalman fitter","FairTask",kalman);
-  //fRun->AddTask(fitTask);
-
-  //****************** vertex finder *************
-
-  //CbmPVFinderKF *vfinder = new CbmPVFinderKF;
-  //CbmFindPrimaryVertex *vTask = new CbmFindPrimaryVertex("Kalman PV finder", "FairTask", vfinder);
-  //fRun->AddTask(vTask);
-
-  //CbmD0Analysis *D0 = new CbmD0Analysis;
-  //fRun->AddTask(D0);
-
-  //***************** performance fitter ********
-
-  CbmStsFitPerformanceTask* fitperf = new CbmStsFitPerformanceTask("FitPerformance");
-  fitperf->DoTrackAnalysis();
-  fitperf->DoVertexAnalysis();
-  fitperf->DoD0Analysis();
-  fRun->AddTask(fitperf);
-
-  //******************
-
-  cout << " INITIALISATION " << endl;
-
-  fRun->Init();
-  fRun->Run();  //0,10);
-
-  timer.Stop();
-  Double_t rtime = timer.RealTime();
-  Double_t ctime = timer.CpuTime();
-  printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime);
-}
diff --git a/macro/L1/rec.C b/macro/L1/rec.C
deleted file mode 100644
index d0e3c1e7f4fed437c08e659c1203691c8d26a075..0000000000000000000000000000000000000000
--- a/macro/L1/rec.C
+++ /dev/null
@@ -1,131 +0,0 @@
-/* Copyright (C) 2006-2009 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
-   SPDX-License-Identifier: GPL-3.0-only
-   Authors: Denis Bertini [committer] */
-
-void rec()
-{
-
-  TStopwatch timer;
-  timer.Start();
-
-  gROOT->LoadMacro("/$VMCWORKDIR/gconfig/basiclibs.C");
-  basiclibs();
-  gSystem->Load("libGeoBase");
-  gSystem->Load("libBase");
-  gSystem->Load("libSts");
-  gSystem->Load("libPassive");
-  gSystem->Load("libGen");
-  gSystem->Load("libTof");
-  gSystem->Load("libRich");
-  gSystem->Load("libTrd");
-  gSystem->Load("libEcal");
-  gSystem->Load("libGlobal");
-  gSystem->Load("libKF");
-  gSystem->Load("libL1");
-
-  char* inFile  = "/d/cbm02/ikisel/data/default/sim_1000_0.root";
-  char* parFile = "/d/cbm02/ikisel/data/default/sim_1000_0.params.root";
-  char* bgFile  = "/d/cbm02/ikisel/data/default/sim_1000_0.root";
-  char* outFile = "/d/cbm02/ikisel/data/default/rec_1000_0.root";
-  //char *outFile = "out.root";
-  char* version = "v05a";
-
-  // -----   Run   ----------------------------------------------------------
-  FairRunAna* fRun = new FairRunAna();
-  fRun->SetInputFile(inFile);
-  fRun->SetOutputFile(outFile);
-
-  fRun->SetContainerStatic();
-
-  // Init Simulation Parameters from Root File
-  FairRuntimeDb* rtdb      = fRun->GetRuntimeDb();
-  FairParRootFileIo* input = new FairParRootFileIo();
-  input->open(parFile);
-
-  // Init Digitization Parameters from Ascii File
-  FairParAsciiFileIo* input2 = new FairParAsciiFileIo();
-  TString StsDigiFile(gSystem->Getenv("VMCWORKDIR"));
-  StsDigiFile = StsDigiFile + "/parameters/sts/sts_digi.par";
-  input2->open(StsDigiFile.Data(), "in");
-
-  rtdb->setFirstInput(input);
-  rtdb->setSecondInput(input2);
-
-  cout << " LoadGeometry starting..." << endl;
-  fRun->LoadGeometry();
-  cout << "LoadGeometry ok" << endl;
-  cout << " - I TGeoManager " << gGeoManager << endl;
-
-
-  CbmStsMapsHitProducer* mapsHitProd = new CbmStsMapsHitProducer(1, 2);
-  mapsHitProd->SetPileupFileName(bgFile);
-  CbmStsHybridHitProducer* hybHitProd  = new CbmStsHybridHitProducer(3, 3);
-  CbmStsStripHitProducer* stripHitProd = new CbmStsStripHitProducer(4, 7);
-
-  fRun->AddTask(mapsHitProd);
-  fRun->AddTask(hybHitProd);
-  fRun->AddTask(stripHitProd);
-
-  // Kalman Filter
-
-  fRun->AddTask(new CbmTrackingDetectorInterfaceInit());
-
-  CbmKF* KF = new CbmKF();
-  fRun->AddTask(KF);
-
-  // L1
-
-  CbmL1* L1 = new CbmL1();
-  fRun->AddTask(L1);
-
-  //******************* track finder ***************
-
-  //CbmStsTrackFinderIdeal* trackFinder = new CbmStsTrackFinderIdeal();
-  CbmL1StsTrackFinder* trackFinder = new CbmL1StsTrackFinder();
-
-  CbmStsFindTracks* findTask = new CbmStsFindTracks("finderTask", "FairTask", trackFinder);
-  fRun->AddTask(findTask);
-
-  //****************** track fitter *************
-
-  CbmStsKFTrackFitter* kalman = new CbmStsKFTrackFitter;
-  CbmStsFitTracks* fitTask    = new CbmStsFitTracks("Kalman fitter", "FairTask", kalman);
-  fRun->AddTask(fitTask);
-
-  //****************** vertex finder *************
-
-  CbmPVFinderKF* vfinder      = new CbmPVFinderKF;
-  CbmFindPrimaryVertex* vTask = new CbmFindPrimaryVertex("Kalman PV finder", "FairTask", vfinder);
-  fRun->AddTask(vTask);
-
-  //***************** Sts<->MC track match *********
-
-  CbmStsMatchTracks* match = new CbmStsMatchTracks();
-  fRun->AddTask(match);
-
-  //***************** performance finder *********
-
-  //CbmStsFinderPerformanceTask *findperf = new CbmStsFinderPerformanceTask("FinderPerformance");  //findperf->SetNEventsCalculateRmin(1000);
-  //fRun->AddTask(findperf);
-
-  //***************** performance fitter ********
-
-  CbmStsFitPerformanceTask* fitperf = new CbmStsFitPerformanceTask("FitPerformance");
-  fitperf->DoTrackAnalysis();
-  fitperf->DoVertexAnalysis(1);
-  fitperf->DoD0Analysis(0);
-
-  fRun->AddTask(fitperf);
-
-  //******************
-
-  cout << " INITIALISATION " << endl;
-
-  fRun->Init();
-  fRun->Run();  //0,10);
-
-  timer.Stop();
-  Double_t rtime = timer.RealTime();
-  Double_t ctime = timer.CpuTime();
-  printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime);
-}
diff --git a/macro/L1/run_reco_L1global.C b/macro/L1/run_reco_L1global.C
index 2ed03688c5e2fcfedd8807eadb90af755c1def3e..c55b045438d0942a1c14335033aaf1c0cd5cf3b1 100644
--- a/macro/L1/run_reco_L1global.C
+++ b/macro/L1/run_reco_L1global.C
@@ -171,7 +171,9 @@ void run_reco_L1global(TString input = "", Int_t nTimeSlices = -1, Int_t firstTi
   // -----   FairRunAna   ---------------------------------------------------
   FairRunAna* run             = new FairRunAna();
   FairFileSource* inputSource = new FairFileSource(rawFile);
-  if (debugWithMC) { inputSource->AddFriend(traFile); }
+  if (debugWithMC) {
+    inputSource->AddFriend(traFile);
+  }
   run->SetSource(inputSource);
   run->SetOutputFile(outFile);
   run->SetGenerateRunInfo(kTRUE);
@@ -275,7 +277,9 @@ void run_reco_L1global(TString input = "", Int_t nTimeSlices = -1, Int_t firstTi
   // -----   Local reconstruction in STS   ----------------------------------
   if (useSts) {
     CbmRecoSts* stsReco = new CbmRecoSts(ECbmRecoMode::Timeslice);
-    if (eventBased) stsReco->SetMode(ECbmRecoMode::EventByEvent);
+    if (eventBased) {
+      stsReco->SetMode(ECbmRecoMode::EventByEvent);
+    }
     run->AddTask(stsReco);
     std::cout << "-I- " << myName << ": Added task " << stsReco->GetName() << std::endl;
   }
@@ -316,9 +320,12 @@ void run_reco_L1global(TString input = "", Int_t nTimeSlices = -1, Int_t firstTi
 
     Double_t triggerThreshold       = 0.5e-6;  // SIS100
     CbmTrdClusterFinder* trdCluster = new CbmTrdClusterFinder();
-    if (eventBased) trdCluster->SetTimeBased(kFALSE);
-    else
+    if (eventBased) {
+      trdCluster->SetTimeBased(kFALSE);
+    }
+    else {
       trdCluster->SetTimeBased(kTRUE);
+    }
     trdCluster->SetNeighbourEnable(true, false);
     trdCluster->SetMinimumChargeTH(triggerThreshold);
     trdCluster->SetRowMerger(true);
@@ -366,7 +373,9 @@ void run_reco_L1global(TString input = "", Int_t nTimeSlices = -1, Int_t firstTi
     CbmKF* kalman = new CbmKF();
     run->AddTask(kalman);
     CbmL1* l1 = 0;
-    if (debugWithMC) { l1 = new CbmL1("L1", 2, 1); }
+    if (debugWithMC) {
+      l1 = new CbmL1("L1", 2, 1);
+    }
     else {
       l1 = new CbmL1("L1", 0);
     }
diff --git a/macro/L1/run_reco_LITglobal.C b/macro/L1/run_reco_LITglobal.C
index 9b870e1aac8b105fb72379d370e5a5431562d52c..75ec5e8e3ee4835a82d94bdc96f825c2bdd5aa83 100644
--- a/macro/L1/run_reco_LITglobal.C
+++ b/macro/L1/run_reco_LITglobal.C
@@ -182,7 +182,9 @@ void run_reco_LITglobal(TString input = "", Int_t nTimeSlices = -1, Int_t firstT
   // -----   FairRunAna   ---------------------------------------------------
   FairRunAna* run             = new FairRunAna();
   FairFileSource* inputSource = new FairFileSource(rawFile);
-  if (debugWithMC) { inputSource->AddFriend(traFile); }
+  if (debugWithMC) {
+    inputSource->AddFriend(traFile);
+  }
   run->SetSource(inputSource);
   run->SetOutputFile(outFile);
   run->SetGenerateRunInfo(kTRUE);
@@ -286,7 +288,9 @@ void run_reco_LITglobal(TString input = "", Int_t nTimeSlices = -1, Int_t firstT
   if (useSts) {
     CbmRecoSts* stsReco = new CbmRecoSts(ECbmRecoMode::Timeslice);
     stsReco->SetUseGpuReco(stsRecoUseGpu);
-    if (eventBased) stsReco->SetMode(ECbmRecoMode::EventByEvent);
+    if (eventBased) {
+      stsReco->SetMode(ECbmRecoMode::EventByEvent);
+    }
     run->AddTask(stsReco);
     std::cout << "-I- " << myName << ": Added task " << stsReco->GetName() << std::endl;
   }
@@ -315,7 +319,9 @@ void run_reco_LITglobal(TString input = "", Int_t nTimeSlices = -1, Int_t firstT
 
     // --- Initialization of the digi scheme
     auto muchGeoScheme = CbmMuchGeoScheme::Instance();
-    if (!muchGeoScheme->IsInitialized()) { muchGeoScheme->Init(parFile, muchFlag); }
+    if (!muchGeoScheme->IsInitialized()) {
+      muchGeoScheme->Init(parFile, muchFlag);
+    }
 
     // --- Hit finder for GEMs
     FairTask* muchReco = new CbmMuchFindHitsGem(parFile.Data(), muchFlag);
@@ -331,9 +337,12 @@ void run_reco_LITglobal(TString input = "", Int_t nTimeSlices = -1, Int_t firstT
 
     Double_t triggerThreshold       = 0.5e-6;  // SIS100
     CbmTrdClusterFinder* trdCluster = new CbmTrdClusterFinder();
-    if (eventBased) trdCluster->SetTimeBased(kFALSE);
-    else
+    if (eventBased) {
+      trdCluster->SetTimeBased(kFALSE);
+    }
+    else {
       trdCluster->SetTimeBased(kTRUE);
+    }
     trdCluster->SetNeighbourEnable(true, false);
     trdCluster->SetMinimumChargeTH(triggerThreshold);
     trdCluster->SetRowMerger(true);
diff --git a/macro/L1/sim.C b/macro/L1/sim.C
deleted file mode 100644
index b375019522f40db9214d74b1adfccdba2a8c1b10..0000000000000000000000000000000000000000
--- a/macro/L1/sim.C
+++ /dev/null
@@ -1,180 +0,0 @@
-/* Copyright (C) 2006-2010 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
-   SPDX-License-Identifier: GPL-3.0-only
-   Authors: Denis Bertini [committer] */
-
-// Macro for running Cbm  with Geant3  or Geant4 (M. Al-Turany , D. Bertini)
-// Modified 22/06/2005 D.Bertini
-{
-  TStopwatch timer;
-  timer.Start();
-  gDebug = 0;
-  // Load basic libraries
-  gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C");
-  basiclibs();
-
-  // Load this example libraries
-  gSystem->Load("libGeoBase");
-  gSystem->Load("libBase");
-  gSystem->Load("libPassive");
-  gSystem->Load("libSts");
-  gSystem->Load("libTof");
-  gSystem->Load("libRich");
-  gSystem->Load("libTrd");
-  gSystem->Load("libEcal");
-  gSystem->Load("libGen");
-
-
-  FairRunSim* fRun = new FairRunSim();
-
-  char* outFile   = "/d/cbm02/ikisel/data/default/sim_1000_0.root";
-  char* parFile   = "/d/cbm02/ikisel/data/default/sim_1000_0.params.root";
-  char* urqmdFile = "/d/cbm01/cbmsim/urqmd/auau/25gev/centr/urqmd.auau.25gev.centr.0000.ftn14";
-  //char *urqmdFile  ="/d/cbm01/cbmsim/urqmd/auau/25gev/mbias/urqmd.auau.25gev.mbias.0000.ftn14";
-
-  // set the MC version used
-  // ------------------------
-
-  fRun->SetName("TGeant3");
-  // Choose the Geant Navigation System
-  // fRun->SetGeoModel("G3Native");
-
-  fRun->SetOutputFile(outFile);
-
-  // Set Material file Name
-  //-----------------------
-
-  fRun->SetMaterials("media.geo");
-
-  // Create and add detectors
-  //-------------------------
-
-  FairModule* Cave = new CbmCave("CAVE");
-  Cave->SetGeometryFileName("cave.geo");
-  fRun->AddModule(Cave);
-
-  FairModule* Pipe = new CbmPipe("PIPE");
-  Pipe->SetGeometryFileName("pipe.geo");
-  fRun->AddModule(Pipe);
-
-
-  FairModule* Magnet = new CbmMagnet("MAGNET");
-  // 1- Active shielding Geometry
-  Magnet->SetGeometryFileName("magnet_active.geo");
-  // 2- Iron Magnet
-  // Magnet->SetGeometryFileName("magnet_iron.geo");
-  fRun->AddModule(Magnet);
-
-  FairDetector* Sts = new CbmSts("STS", kTRUE);
-  Sts->SetGeometryFileName("sts.geo");
-  fRun->AddModule(Sts);
-
-  FairModule* Target = new CbmTarget("Target");
-  Target->SetGeometryFileName("target.geo");
-  fRun->AddModule(Target);
-
-  //FairDetector *Tof= new CbmTof("TOF", kTRUE );
-  //Tof->SetGeometryFileName("tof.geo");
-  //fRun->AddModule(Tof);
-
-  //FairDetector *Trd= new CbmTrd("TRD",kTRUE );
-  //Trd->SetGeometryFileName("trd_9.geo");
-  //fRun->AddModule(Trd);
-
-  //FairDetector *Rich= new CbmRich("RICH", kTRUE);
-  //Rich->SetGeometryFileName("rich.geo");
-  //fRun->AddModule(Rich);
-
-  //FairDetector *Ecal= new CbmEcal("ECAL", kTRUE);
-  //Ecal->SetGeometryFileName("ecal.geo");
-  //fRun->AddModule(Ecal);
-
-
-  // Create and Set Event Generator
-  //-------------------------------
-
-  FairPrimaryGenerator* primGen = new FairPrimaryGenerator();
-  fRun->SetGenerator(primGen);
-
-  // Urqmd  Generator
-  FairUrqmdGenerator* urqmdGen = new FairUrqmdGenerator(urqmdFile);
-  primGen->AddGenerator(urqmdGen);
-
-  // Particle Generator
-  //  FairParticleGenerator* partGen = new FairParticleGenerator(211, 10, 1., 1.,
-  //  2);
-  //  primGen->AddGenerator(partGen);
-
-  // Ion Generator
-  //    FairIonGenerator *fIongen= new FairIonGenerator(79, 197,79,1, 0.,0., 25, 0.,0.,-1.);
-  //    primGen->AddGenerator(fIongen);
-
-  // smear the beam spot
-  primGen->SetBeam(0.0, 0.0, 100.e-4, 100.e-4);  //cm
-
-  primGen->SetTarget(0.0, 0.025);  //cm
-
-  Bool_t smear = true;
-
-  primGen->SmearVertexZ(smear);
-  primGen->SmearVertexXY(smear);
-
-  // Field Map Definition
-  // --------------------
-  // 1- Reading the new field map in the old format
-
-  // CbmFieldMap *fMagField= new CbmFieldMap("FIELD.v04_pavel.map");
-  // Constant Field
-  //  CbmConstField *fMagField=new CbmConstField();
-  //  fMagField->SetFieldXYZ(0, 14 ,0 ); // values are in kG
-  // MinX=-75, MinY=-40,MinZ=-12 ,MaxX=75, MaxY=40 ,MaxZ=124 );  // values are in cm
-  //  fMagField->SetFieldRegions(-74, -39 ,-22 , 74, 39 , 160 );
-
-  // 2- Reading the new field map in the new format
-
-  CbmField* fMagField = new CbmField("Magnet Active Shielding map");
-  // Active Shielding
-  fMagField->readRootfile("$VMCWORKDIR/input/FieldActive.root", "NewMap");
-  // Iron Dipole
-  //  fMagField->readRootfile("$VMCWORKDIR/input/FieldIron.root", "Field");
-  fRun->SetField(fMagField);
-
-  fRun->Init();
-
-
-  // -Trajectories Visualization (TGeoManager Only )
-  // -----------------------------------------------
-
-  //  fRun->SetStoreTraj(kTRUE);
-  // Set cuts for storing the trajectpries
-  /* FairTrajFilter* trajFilter = FairTrajFilter::Instance();
-     trajFilter->SetStepSizeCut(0.01); // 1 cm
-     trajFilter->SetVertexCut(-2000., -2000., 4., 2000., 2000., 100.);
-     trajFilter->SetMomentumCutP(10e-3); // p_lab > 10 MeV
-     trajFilter->SetEnergyCut(0., 1.02); // 0 < Etot < 1.04 GeV
-     trajFilter->SetStorePrimaries(kTRUE);
-     trajFilter->SetStoreSecondaries(kTRUE);
-   */
-
-
-  // Fill the Parameter containers for this run
-  //-------------------------------------------
-
-  FairRuntimeDb* rtdb       = fRun->GetRuntimeDb();
-  Bool_t kParameterMerged   = kTRUE;
-  FairParRootFileIo* output = new FairParRootFileIo(kParameterMerged);
-  output->open(parFile);
-  rtdb->setOutput(output);
-  rtdb->saveOutput();
-  rtdb->print();
-
-  // Transport nEvents
-  // -----------------
-
-  Int_t nEvents = 1000;
-  fRun->Run(nEvents);
-
-  timer.Stop();
-  Double_t rtime = timer.RealTime();
-  Double_t ctime = timer.CpuTime();
-  printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime);
-}
diff --git a/macro/L1/simD0.C b/macro/L1/simD0.C
deleted file mode 100644
index 8e0c884a529701f196551283d8559339ecefde14..0000000000000000000000000000000000000000
--- a/macro/L1/simD0.C
+++ /dev/null
@@ -1,188 +0,0 @@
-/* Copyright (C) 2006-2010 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
-   SPDX-License-Identifier: GPL-3.0-only
-   Authors: Denis Bertini [committer] */
-
-// Macro for running Cbm  with Geant3  or Geant4 (M. Al-Turany , D. Bertini)
-// Modified 22/06/2005 D.Bertini
-{
-  TStopwatch timer;
-  timer.Start();
-  gDebug = 0;
-  // Load basic libraries
-  gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C");
-  basiclibs();
-
-  // Load this example libraries
-  gSystem->Load("libGeoBase");
-  gSystem->Load("libBase");
-  gSystem->Load("libPassive");
-  gSystem->Load("libSts");
-  gSystem->Load("libTof");
-  gSystem->Load("libRich");
-  gSystem->Load("libTrd");
-  gSystem->Load("libEcal");
-  gSystem->Load("libGen");
-
-  char* outFile   = "/d/cbm02/ikisel/data/default/D0/sim_1000_0.root";
-  char* parFile   = "/d/cbm02/ikisel/data/default/D0/sim_1000_0.params.root";
-  char* urqmdFile = "/d/cbm01/cbmsim/urqmd/auau/25gev/centr/urqmd.auau.25gev.centr.0000.ftn14";
-  char* asciiFile = "/d/cbm02/vassiliev/d0_1000_0.dat";
-
-  //char *urqmdFile  =("/d/cbm01/cbmsim/urqmd/auau/25gev/mbias/urqmd.auau.25gev.mbias.0000.ftn14");
-
-  FairRunSim* fRun = new FairRunSim();
-
-  // set the MC version used
-  // ------------------------
-
-  fRun->SetName("TGeant3");
-  // Choose the Geant Navigation System
-  // fRun->SetGeoModel("G3Native");
-
-  fRun->SetOutputFile(outFile);
-
-  // Set Material file Name
-  //-----------------------
-
-  fRun->SetMaterials("media.geo");
-
-  // Create and add detectors
-  //-------------------------
-
-  FairModule* Cave = new CbmCave("CAVE");
-  Cave->SetGeometryFileName("cave.geo");
-  fRun->AddModule(Cave);
-
-  FairModule* Pipe = new CbmPipe("PIPE");
-  Pipe->SetGeometryFileName("pipe.geo");
-  fRun->AddModule(Pipe);
-
-
-  FairModule* Magnet = new CbmMagnet("MAGNET");
-  // 1- Active shielding Geometry
-  Magnet->SetGeometryFileName("magnet_active.geo");
-  // 2- Iron Magnet
-  // Magnet->SetGeometryFileName("magnet_iron.geo");
-  fRun->AddModule(Magnet);
-
-  FairDetector* Sts = new CbmSts("STS", kTRUE);
-  Sts->SetGeometryFileName("sts.geo");
-  fRun->AddModule(Sts);
-
-
-  FairModule* Target = new CbmTarget("Target");
-  Target->SetGeometryFileName("target.geo");
-  fRun->AddModule(Target);
-
-  //FairDetector *Tof= new CbmTof("TOF", kTRUE );
-  //Tof->SetGeometryFileName("tof.geo");
-  //fRun->AddModule(Tof);
-
-  //FairDetector *Trd= new CbmTrd("TRD",kTRUE );
-  //Trd->SetGeometryFileName("trd_9.geo");
-  //fRun->AddModule(Trd);
-
-  //FairDetector *Rich= new CbmRich("RICH", kTRUE);
-  //Rich->SetGeometryFileName("rich.geo");
-  //fRun->AddModule(Rich);
-
-  //FairDetector *Ecal= new CbmEcal("ECAL", kTRUE);
-  //Ecal->SetGeometryFileName("ecal.geo");
-  //fRun->AddModule(Ecal);
-
-
-  // Create and Set Event Generator
-  //-------------------------------
-
-  FairPrimaryGenerator* primGen = new FairPrimaryGenerator();
-  fRun->SetGenerator(primGen);
-
-  // Ascii generator
-
-  FairAsciiGenerator* D0gen = new FairAsciiGenerator(asciiFile);
-  primGen->AddGenerator(D0gen);
-
-  // Urqmd  Generator
-  FairUrqmdGenerator* urqmdGen = new FairUrqmdGenerator(urqmdFile);
-
-  primGen->AddGenerator(urqmdGen);
-
-  // Particle Generator
-  //  FairParticleGenerator* partGen = new FairParticleGenerator(211, 10, 1., 1.,
-  //  2);
-  //  primGen->AddGenerator(partGen);
-
-  // Ion Generator
-  //    FairIonGenerator *fIongen= new FairIonGenerator(79, 197,79,1, 0.,0., 25, 0.,0.,-1.);
-  //    primGen->AddGenerator(fIongen);
-
-  // smear the beam spot
-  primGen->SetBeam(0.0, 0.0, 100.e-4, 100.e-4);  //cm
-
-  primGen->SetTarget(0.0, 0.025);  //cm
-
-  Bool_t smear = false;
-
-  primGen->SmearVertexZ(smear);
-  primGen->SmearVertexXY(smear);
-
-  // Field Map Definition
-  // --------------------
-  // 1- Reading the new field map in the old format
-
-  // CbmFieldMap *fMagField= new CbmFieldMap("FIELD.v04_pavel.map");
-  // Constant Field
-  //  CbmConstField *fMagField=new CbmConstField();
-  //  fMagField->SetFieldXYZ(0, 14 ,0 ); // values are in kG
-  // MinX=-75, MinY=-40,MinZ=-12 ,MaxX=75, MaxY=40 ,MaxZ=124 );  // values are in cm
-  //  fMagField->SetFieldRegions(-74, -39 ,-22 , 74, 39 , 160 );
-
-  // 2- Reading the new field map in the new format
-
-  CbmField* fMagField = new CbmField("Magnet Active Shielding map");
-  // Active Shielding
-  fMagField->readRootfile("$VMCWORKDIR/input/FieldActive.root", "NewMap");
-  // Iron Dipole
-  //  fMagField->readRootfile("$VMCWORKDIR/input/FieldIron.root", "Field");
-  fRun->SetField(fMagField);
-
-  fRun->Init();
-
-
-  // -Trajectories Visualization (TGeoManager Only )
-  // -----------------------------------------------
-
-  //  fRun->SetStoreTraj(kTRUE);
-  // Set cuts for storing the trajectpries
-  /* FairTrajFilter* trajFilter = FairTrajFilter::Instance();
-     trajFilter->SetStepSizeCut(0.01); // 1 cm
-     trajFilter->SetVertexCut(-2000., -2000., 4., 2000., 2000., 100.);
-     trajFilter->SetMomentumCutP(10e-3); // p_lab > 10 MeV
-     trajFilter->SetEnergyCut(0., 1.02); // 0 < Etot < 1.04 GeV
-     trajFilter->SetStorePrimaries(kTRUE);
-     trajFilter->SetStoreSecondaries(kTRUE);
-   */
-
-
-  // Fill the Parameter containers for this run
-  //-------------------------------------------
-
-  FairRuntimeDb* rtdb       = fRun->GetRuntimeDb();
-  Bool_t kParameterMerged   = kTRUE;
-  FairParRootFileIo* output = new FairParRootFileIo(kParameterMerged);
-  output->open(parFile);
-  rtdb->setOutput(output);
-  rtdb->saveOutput();
-  rtdb->print();
-
-  // Transport nEvents
-  // -----------------
-
-  Int_t nEvents = 1000;
-  fRun->Run(nEvents);
-
-  timer.Stop();
-  Double_t rtime = timer.RealTime();
-  Double_t ctime = timer.CpuTime();
-  printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime);
-}
diff --git a/reco/L1/utils/Draw_L1_histo.C b/reco/L1/utils/Draw_L1_histo.C
index efac384cbc53cf1b3153ee0a3df47a156c27fc93..9cc6e2a8e7c12886e32991a1a9153b7e531f121e 100644
--- a/reco/L1/utils/Draw_L1_histo.C
+++ b/reco/L1/utils/Draw_L1_histo.C
@@ -15,7 +15,9 @@ void FitHistoGaus(TH1* hist, float* sigma = 0)
     fit->SetLineColor(2);
     fit->SetLineWidth(3);
     hist->Fit("fit", "", "", hist->GetXaxis()->GetXmin(), hist->GetXaxis()->GetXmax());
-    if (sigma) *sigma = fit->GetParameter(2);
+    if (sigma) {
+      *sigma = fit->GetParameter(2);
+    }
   }
   else {
     std::cout << " E: Read hists error! " << std::endl;
@@ -270,7 +272,9 @@ void Draw_L1_histo()
   TH1F* histoOther[nHistoOther];
 
   for (int i = 0; i < 12; i++) {
-    if (i % 4 != 2) histoOther[i] = (TH1F*) dirOther->Get(histoDataOther[i].name);
+    if (i % 4 != 2) {
+      histoOther[i] = (TH1F*) dirOther->Get(histoDataOther[i].name);
+    }
     else {
       histoOther[i] = new TH1F(histoDataOther[i].name, "Not reconstructed tracks", 100, 0.0, 5.0);
       for (j = 0; j < histoOther[i]->GetNbinsX(); j++) {
@@ -396,9 +400,12 @@ void Draw_L1_histo()
           break;
         case 3: histoOther[iH]->SetLineColor(kBlack); break;
       }
-      if (i == 0) histoOther[iH]->Draw();
-      else
+      if (i == 0) {
+        histoOther[iH]->Draw();
+      }
+      else {
         histoOther[iH]->Draw("same");
+      }
       leg1->AddEntry(histoOther[iH], histoOther[iH]->GetTitle());
     }
     leg1->Draw();