From 27d1412d28e48565e05b7e21430eb1fef7b9c9ac Mon Sep 17 00:00:00 2001
From: Axel Puntke <axel.puntke@uni-muenster.de>
Date: Wed, 23 Mar 2022 18:04:35 +0000
Subject: [PATCH] Added TRD v22e/f component ID maps to TRD hardware setup
 class

---
 core/detectors/trd/CbmTrdHardwareSetupR.cxx | 120 ++++++++++++++++++++
 core/detectors/trd/CbmTrdHardwareSetupR.h   |   2 +
 2 files changed, 122 insertions(+)

diff --git a/core/detectors/trd/CbmTrdHardwareSetupR.cxx b/core/detectors/trd/CbmTrdHardwareSetupR.cxx
index bd6549b142..daf3868df5 100644
--- a/core/detectors/trd/CbmTrdHardwareSetupR.cxx
+++ b/core/detectors/trd/CbmTrdHardwareSetupR.cxx
@@ -250,6 +250,12 @@ void CbmTrdHardwareSetupR::SelectComponentIdMap(TString geoTag)
   else if (geoTag.Contains("mcbm") && geoTag.Contains("v21")) {
     hwSetupVersion = ECbmTrdHardwareSetupVersion::kMcbm2021;
   }
+  else if (geoTag.Contains("mcbm") && geoTag.Contains("v22e")) {
+    hwSetupVersion = ECbmTrdHardwareSetupVersion::kMcbm2022WithoutHybrid;
+  }
+  else if (geoTag.Contains("mcbm") && geoTag.Contains("v22f")) {
+    hwSetupVersion = ECbmTrdHardwareSetupVersion::kMcbm2022Only1D;
+  }
   else if (geoTag.Contains("mcbm") && geoTag.Contains("v22")) {
     hwSetupVersion = ECbmTrdHardwareSetupVersion::kMcbm2022;
   }
@@ -391,6 +397,120 @@ void CbmTrdHardwareSetupR::SelectComponentIdMap(ECbmTrdHardwareSetupVersion hwSe
                          {53022, 3297900010},
                          {53023, 3297900012}};
       break;
+    case ECbmTrdHardwareSetupVersion::kMcbm2022WithoutHybrid:
+      fComponentIdMap = {// Module 21 (37 in normal 2022 setup)
+                         {21000, 3298100098},
+                         {21001, 3298100028},
+                         {21002, 3298100030},
+                         {21003, 3298100032},
+                         {21004, 3298100034},
+                         {21005, 3298100036},
+                         {21006, 3298100038},
+                         {21007, 3298100040},
+
+                         {21008, 3298100098},
+                         {21009, 3298100014},
+                         {21010, 3298100016},
+                         {21011, 3298100018},
+                         {21012, 3298100020},
+                         {21013, 3298100022},
+                         {21014, 3298100024},
+                         {21015, 3298100026},
+
+                         {21016, 3298100098},
+                         {21017, 3298100000},
+                         {21018, 3298100002},
+                         {21019, 3298100004},
+                         {21020, 3298100006},
+                         {21021, 3298100008},
+                         {21022, 3298100010},
+                         {21023, 3298100012},
+
+                         // Module 37 (53 in normal 2022 setup)
+                         {37000, 3297900098},
+                         {37001, 3297900028},
+                         {37002, 3297900030},
+                         {37003, 3297900032},
+                         {37004, 3297900034},
+                         {37005, 3297900036},
+                         {37006, 3297900038},
+                         {37007, 3297900040},
+
+                         {37008, 3297900098},
+                         {37009, 3297900014},
+                         {37010, 3297900016},
+                         {37011, 3297900018},
+                         {37012, 3297900020},
+                         {37013, 3297900022},
+                         {37014, 3297900024},
+                         {37015, 3297900026},
+
+                         {37016, 3297900098},
+                         {37017, 3297900000},
+                         {37018, 3297900002},
+                         {37019, 3297900004},
+                         {37020, 3297900006},
+                         {37021, 3297900008},
+                         {37022, 3297900010},
+                         {37023, 3297900012}};
+      break;
+    case ECbmTrdHardwareSetupVersion::kMcbm2022Only1D:
+      fComponentIdMap = {// Module 5 (37 in normal 2022 setup)
+                         {5000, 3298100098},
+                         {5001, 3298100028},
+                         {5002, 3298100030},
+                         {5003, 3298100032},
+                         {5004, 3298100034},
+                         {5005, 3298100036},
+                         {5006, 3298100038},
+                         {5007, 3298100040},
+
+                         {5008, 3298100098},
+                         {5009, 3298100014},
+                         {5010, 3298100016},
+                         {5011, 3298100018},
+                         {5012, 3298100020},
+                         {5013, 3298100022},
+                         {5014, 3298100024},
+                         {5015, 3298100026},
+
+                         {5016, 3298100098},
+                         {5017, 3298100000},
+                         {5018, 3298100002},
+                         {5019, 3298100004},
+                         {5020, 3298100006},
+                         {5021, 3298100008},
+                         {5022, 3298100010},
+                         {5023, 3298100012},
+
+                         // Module 21 (53 in normal 2022 setup)
+                         {21000, 3297900098},
+                         {21001, 3297900028},
+                         {21002, 3297900030},
+                         {21003, 3297900032},
+                         {21004, 3297900034},
+                         {21005, 3297900036},
+                         {21006, 3297900038},
+                         {21007, 3297900040},
+
+                         {21008, 3297900098},
+                         {21009, 3297900014},
+                         {21010, 3297900016},
+                         {21011, 3297900018},
+                         {21012, 3297900020},
+                         {21013, 3297900022},
+                         {21014, 3297900024},
+                         {21015, 3297900026},
+
+                         {21016, 3297900098},
+                         {21017, 3297900000},
+                         {21018, 3297900002},
+                         {21019, 3297900004},
+                         {21020, 3297900006},
+                         {21021, 3297900008},
+                         {21022, 3297900010},
+                         {21023, 3297900012}};
+      break;
     case ECbmTrdHardwareSetupVersion::kLabIkfOneSpadic:
       // REMARK This map is incomplete! Spadic position is random and not yet correlated to the true position in the lab.
       fComponentIdMap = {// Module 5
diff --git a/core/detectors/trd/CbmTrdHardwareSetupR.h b/core/detectors/trd/CbmTrdHardwareSetupR.h
index 6b37559852..5269103400 100644
--- a/core/detectors/trd/CbmTrdHardwareSetupR.h
+++ b/core/detectors/trd/CbmTrdHardwareSetupR.h
@@ -30,6 +30,8 @@ enum class ECbmTrdHardwareSetupVersion : Int_t
   kMcbm2020  = 1,
   kMcbm2021,
   kMcbm2022,
+  kMcbm2022WithoutHybrid,  // for v22e setup
+  kMcbm2022Only1D,         // for v22f setup
   kLabIkfOneSpadic,
   kDesy2019,
   kCbm2025
-- 
GitLab