diff --git a/macro/beamtime/CMakeLists.txt b/macro/beamtime/CMakeLists.txt
index d31987f2cbe904cac70c84d9263b977f776890ea..0d822449984d086fcc00de0c7c5e898a359e2fdd 100644
--- a/macro/beamtime/CMakeLists.txt
+++ b/macro/beamtime/CMakeLists.txt
@@ -25,6 +25,11 @@ If(EXISTS ${CBMROOT_SOURCE_DIR}/input/hodoTop_source_1000ts_20160422.tsa)
 EndIf()
 #####################
 
+##### COSY 2019 tests
+add_subdirectory(cosy2019)
+#####################
+
+
 ##### mCBM 2019 tests
 add_subdirectory(mcbm2019)
 #####################
diff --git a/macro/beamtime/cosy2019/CMakeLists.txt b/macro/beamtime/cosy2019/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..d525760c440319ec7e8d366d078f6937e45f4041
--- /dev/null
+++ b/macro/beamtime/cosy2019/CMakeLists.txt
@@ -0,0 +1,85 @@
+
+### Cleanup of old root files
+add_test(run_cleanup_cosy2019
+	${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/cmake/scripts/cleanmacrodir.cmake)
+set_tests_properties(run_cleanup_cosy2019 PROPERTIES
+	TIMEOUT 30
+	FIXTURES_SETUP cleanup_cosy2019
+)
+#####################
+
+### Simulation: Run in any case
+GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/beamtime/cosy2019/cosy2019_transport.C )   # MC (simu)
+#GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/beamtime/cosy2019/cosy2019_digi.C )        # Digitization (simu)
+#  GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/beamtime/cosy2019/cosy2019_reco.C )        # Cluster Finding + Hit reconstruction, time based (simu)
+
+Set(testname cosy_transport_2019)
+Add_Test(${testname} ${CBMROOT_BINARY_DIR}/macro/beamtime/cosy2019/cosy2019_transport.sh 10 )
+Set_Tests_Properties(${testname} PROPERTIES TIMEOUT "300")
+Set_Tests_Properties(${testname} PROPERTIES PASS_REGULAR_EXPRESSION "Test Passed;All ok")
+set_tests_properties(${testname} PROPERTIES DEPENDS run_cleanup_cosy2019)
+set_tests_properties(${testname} PROPERTIES FIXTURES_REQUIRED run_cleanup_cosy2019)
+Set(fixture_cosy_transport fixture_done_${testname})
+set_tests_properties(${testname} PROPERTIES FIXTURES_SETUP ${fixture_cosy_transport})
+
+## Digitization = broken as of 09/12/2020
+#Set(testname cosy_digi_2019)
+#Add_Test(${testname} ${CBMROOT_BINARY_DIR}/macro/beamtime/cosy2019/cosy2019_digi.sh 20 )
+#Set_Tests_Properties(${testname} PROPERTIES TIMEOUT "600")
+#Set_Tests_Properties(${testname} PROPERTIES PASS_REGULAR_EXPRESSION "Test Passed;All ok")
+#set_tests_properties(${testname} PROPERTIES FIXTURES_REQUIRED ${fixture_cosy_transport})
+#set_tests_properties(${testname} PROPERTIES DEPENDS cosy_transport_2019)
+#Set(fixture_cosy_digi fixture_done_${testname})
+#set_tests_properties(${testname} PROPERTIES FIXTURES_SETUP ${fixture_cosy_digi})
+#####################
+
+### COSY 2019 tests: only if test TSA files for "typical runs" present
+If(DEFINED ENV{RAW_DATA_PATH} )
+  SET( RAW_DATA_PATH $ENV{RAW_DATA_PATH} )
+
+  Message( STATUS "Raw data path provided => Performing COSY 2019 tests using tsa files in ${RAW_DATA_PATH}" )
+
+  ## Generate scripts
+  GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/beamtime/cosy2019/unpack_tsa_cosy2019.C )  # Unpackers (real)
+  GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/beamtime/cosy2019/cosy2019_calib.C )       # Coarse time calibration (real)
+#  GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/beamtime/cosy2019/cosy2019_process.C )     # Cluster Finding + Hit reconstruction, time based (real)
+
+  ## Run only if raw data files present
+  ForEach(RUN 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 )
+    Message( STATUS "Checking if raw data file exists: ${RAW_DATA_PATH}/r00${RUN}_first20Ts.tsa" )
+    If(EXISTS ${RAW_DATA_PATH}/r00${RUN}_first20Ts.tsa)
+      Message( STATUS "Raw data file found, tests will be performed for COSY 2019 run ${RUN}" )
+
+      ## Define tests + dependencies
+      ### Raw data analysis tests
+      Set(testname cosy_unpack_2019_${RUN})
+      Add_Test(${testname} ${CBMROOT_BINARY_DIR}/macro/beamtime/cosy2019/unpack_tsa_cosy2019.sh \"${RAW_DATA_PATH}/r00${RUN}_first20Ts.tsa\" ${RUN} )
+      Set_Tests_Properties(${testname} PROPERTIES TIMEOUT "600")
+      Set_Tests_Properties(${testname} PROPERTIES PASS_REGULAR_EXPRESSION "Test Passed;All ok")
+      set_tests_properties(${testname} PROPERTIES DEPENDS run_cleanup_cosy2019)
+      set_tests_properties(${testname} PROPERTIES FIXTURES_REQUIRED run_cleanup_cosy2019)
+      Set(fixture_cosy_unpacked_${RUN} fixture_done_${testname})
+      set_tests_properties(${testname} PROPERTIES FIXTURES_SETUP ${fixture_cosy_unpacked_${RUN}})
+
+      Set(testname cosy_calib_2019_${RUN})
+      Add_Test(${testname} ${CBMROOT_BINARY_DIR}/macro/beamtime/cosy2019/cosy2019_calib.sh 20 ${RUN} )
+      Set_Tests_Properties(${testname} PROPERTIES TIMEOUT "600")
+      Set_Tests_Properties(${testname} PROPERTIES PASS_REGULAR_EXPRESSION "Test Passed;All ok")
+      set_tests_properties(${testname} PROPERTIES FIXTURES_REQUIRED ${fixture_cosy_unpacked_${RUN}})
+      set_tests_properties(${testname} PROPERTIES DEPENDS cosy_unpack_2019_${RUN})
+      Set(fixture_cosy_calib_${RUN} fixture_done_${testname})
+      set_tests_properties(${testname} PROPERTIES FIXTURES_SETUP ${fixture_cosy_calib_${RUN}})
+
+## Clustering = broken as of 09/12/2020
+#      Set(testname cosy_process_2019_${RUN})
+#      Add_Test(${testname} ${CBMROOT_BINARY_DIR}/macro/beamtime/cosy2019/cosy2019_process.sh ${RUN} )
+#      Set_Tests_Properties(${testname} PROPERTIES TIMEOUT "600")
+#      Set_Tests_Properties(${testname} PROPERTIES PASS_REGULAR_EXPRESSION "Test Passed;All ok")
+#      set_tests_properties(${testname} PROPERTIES FIXTURES_REQUIRED ${fixture_cosy_calib_${RUN}})
+#      set_tests_properties(${testname} PROPERTIES DEPENDS cosy_calib_2019_${RUN})
+#      Set(fixture_cosy_process_${RUN} fixture_done_${testname})
+#      set_tests_properties(${testname} PROPERTIES FIXTURES_SETUP ${fixture_cosy_process_${RUN}})
+    EndIf() # If(EXISTS ${RAW_DATA_PATH}/${RUN}_first20Ts.tsa))
+  EndForEach() # ForEach(RUN 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 )
+EndIf() # If(DEFINED ENV{RAW_DATA_PATH} )
+#####################
diff --git a/macro/beamtime/cosy2019/cosy2019_calib.C b/macro/beamtime/cosy2019/cosy2019_calib.C
index 81f3afadf6c6c0632de98c709cdf054f815ebe51..76a408f8d959323068bf47aa22b87e84f1e8579f 100644
--- a/macro/beamtime/cosy2019/cosy2019_calib.C
+++ b/macro/beamtime/cosy2019/cosy2019_calib.C
@@ -21,7 +21,7 @@ void cosy2019_calib(
 
 
   // -----   Environment   --------------------------------------------------
-  TString myName = "cosy2019_reco";  // this macro's name for screen output
+  TString myName = "cosy2019_calib";  // this macro's name for screen output
   TString srcDir = gSystem->Getenv("VMCWORKDIR");  // top source directory
   // TString srcDir1 = gSystem->Getenv("SLURM_INDEX");
   // ------------------------------------------------------------------------
@@ -86,9 +86,6 @@ void cosy2019_calib(
   std::cout << std::endl;
   std::cout << "-I- " << myName << ": Initialise run" << std::endl;
   run->Init();
-  rtdb->setOutput(parIo1);
-  rtdb->saveOutput();
-  rtdb->print();
   // ------------------------------------------------------------------------
 
 
diff --git a/macro/beamtime/cosy2019/cosy2019_digi.C b/macro/beamtime/cosy2019/cosy2019_digi.C
index 98c8fd7965870051c6aac01d263c1039a9106c01..f84b22ca02f0db43617e58c8d5178f9bddb4c809 100644
--- a/macro/beamtime/cosy2019/cosy2019_digi.C
+++ b/macro/beamtime/cosy2019/cosy2019_digi.C
@@ -81,10 +81,11 @@ void cosy2019_digi(
 
   run.DefaultInit();
   CbmStsDigitize* stsDigitizer =
-    dynamic_cast<CbmStsDigitize*>(run.GetDigitizer(kSts));
+    dynamic_cast<CbmStsDigitize*>(run.GetDigitizer(ECbmModuleId::kSts));
   if (nullptr == stsDigitizer) {
     std::cout << "No STS digitizer could be accessed: "
-              << run.GetDigitizer(kSts) << " -> " << stsDigitizer << std::endl;
+              << run.GetDigitizer(ECbmModuleId::kSts) << " -> " << stsDigitizer
+              << std::endl;
     return;
   }  // if( nullptr == stsDigitizer )
   stsDigitizer->SetSensorParameterFile(sStsHodoGeoPar);
diff --git a/macro/beamtime/cosy2019/cosy2019_process.C b/macro/beamtime/cosy2019/cosy2019_process.C
index 3673630574166265da6861d74512e6a6c750e1c3..c553d67eefe913a5ff1e99acbb4e67e921955709 100644
--- a/macro/beamtime/cosy2019/cosy2019_process.C
+++ b/macro/beamtime/cosy2019/cosy2019_process.C
@@ -1,6 +1,6 @@
 // --------------------------------------------------------------------------
 //
-// Macro for reconstruction of mcbm data (2019)
+// Macro for reconstruction of cosy real data (2019)
 // Only STS local reconstruction (cluster + hit finder) for the time being
 //
 //
@@ -24,7 +24,7 @@ void cosy2019_process(
 
 
   // -----   Environment   --------------------------------------------------
-  TString myName = "cosy2019_reco";  // this macro's name for screen output
+  TString myName = "cosy2019_process";  // this macro's name for screen output
   TString srcDir = gSystem->Getenv("VMCWORKDIR");  // top source directory
   // TString srcDir1 = gSystem->Getenv("SLURM_INDEX");  // ------------------------------------------------------------------------
 
diff --git a/macro/beamtime/cosy2019/cosy2019_reco.C b/macro/beamtime/cosy2019/cosy2019_reco.C
index df55f3b4134fc2997b7b75a9bc3b24d0f83c710a..127763e8c467cca376e0be369a94cea06b66cf36 100644
--- a/macro/beamtime/cosy2019/cosy2019_reco.C
+++ b/macro/beamtime/cosy2019/cosy2019_reco.C
@@ -1,6 +1,6 @@
 // --------------------------------------------------------------------------
 //
-// Macro for reconstruction of mcbm data (2019)
+// Macro for reconstruction of cosy simulated data (2019)
 // Only STS local reconstruction (cluster + hit finder) for the time being
 //
 //
diff --git a/macro/beamtime/cosy2019/unpack_tsa_cosy2019.C b/macro/beamtime/cosy2019/unpack_tsa_cosy2019.C
index 96dde9d1e5243c48747db4c96fe40146654a9cc9..ffddca6b796eff93af66484e5cd7ca55305ba79c 100644
--- a/macro/beamtime/cosy2019/unpack_tsa_cosy2019.C
+++ b/macro/beamtime/cosy2019/unpack_tsa_cosy2019.C
@@ -1245,11 +1245,14 @@ void unpack_tsa_cosy2019(TString inFile  = "",
   CbmMcbm2018Source* source = new CbmMcbm2018Source();
 
   source->SetFileName(inFile);
-  if (13 <= uRunId) source->AddUnpacker(unpacker_tof, 0x90, kTof);  //gDPB T0
-  source->AddUnpacker(unpacker_hodo, 0x10, kHodo);  //HODO + STS xyter
+  if (13 <= uRunId) {
+    source->AddUnpacker(unpacker_tof, 0x90, ECbmModuleId::kTof);  //gDPB T0
+  }  // if (13 <= uRunId)
+  source->AddUnpacker(
+    unpacker_hodo, 0x10, ECbmModuleId::kHodo);  //HODO + STS xyter
 
   // --- Event header
-  FairEventHeader* event = new CbmTbEvent();
+  FairEventHeader* event = new FairEventHeader();
   event->SetRunId(uRunId);
 
   // --- RootFileSink