From 1080f73a7cc16107bb30cb603dad8cd8a4238b42 Mon Sep 17 00:00:00 2001
From: Alexandru Bercuci <abercuci@niham.nipne.ro>
Date: Thu, 14 Oct 2021 11:35:15 +0300
Subject: [PATCH] add hybrid TRD-2D module in the CbmTrdPads definition. Fix
 formatting

---
 core/detectors/trd/CbmTrdPads.h                    | 14 ++++++++++----
 macro/mcbm/geometry/trd/Create_TRD_Geometry_v21b.C |  8 +++++---
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/core/detectors/trd/CbmTrdPads.h b/core/detectors/trd/CbmTrdPads.h
index 954e6dacfb..e3e3f5d74c 100644
--- a/core/detectors/trd/CbmTrdPads.h
+++ b/core/detectors/trd/CbmTrdPads.h
@@ -13,9 +13,9 @@
 #define CBMTRDPADS_H
 
 Int_t fst1_sect_count = 3;
-// array of pad geometries in the TRD (trd1mod[1-9])
-// 9 modules  // 3 sectors  // 4 values
-Float_t fst1_pad_type[9][3][4] =
+// array of pad geometries in the TRD (trd1mod[1-10])
+// 10 modules  // 3 sectors  // 4 values
+Float_t fst1_pad_type[10][3][4] =
 
   // module type 1
   // number of pads:  80 x 32 = 2560
@@ -71,6 +71,12 @@ Float_t fst1_pad_type[9][3][4] =
    // number of pads:  72 x 20 = 1440
    // pad size sector 1:  0.75 cm x  2.70 cm =  2.03 cm2
    // pad size sector 0:  0.75 cm x  2.70 cm =  2.03 cm2
-   {{54.0, 5.40, 54.0 / 72, 2.70}, {54.0, 43.20, 54.0 / 72, 2.70}, {54.0, 5.40, 54.0 / 72, 2.70}}};
+   {{54.0, 5.40, 54.0 / 72, 2.70}, {54.0, 43.20, 54.0 / 72, 2.70}, {54.0, 5.40, 54.0 / 72, 2.70}},
+
+   // module type 10
+   // number of pads:  32 x  3 =   96
+   // pad size sector 1:  0.72 cm x  2.72 cm =  1.96 cm2
+   // pad size sector 0:  0.72 cm x  2.72 cm =  1.96 cm2
+   {{23.0, 2.72, 23.0 / 32, 2.72}, {23.0, 2.72, 23.0 / 32, 2.72}, {23.0, 2.72, 23.0 / 32, 2.72}}};
 
 #endif
diff --git a/macro/mcbm/geometry/trd/Create_TRD_Geometry_v21b.C b/macro/mcbm/geometry/trd/Create_TRD_Geometry_v21b.C
index d512c3b629..3422f316a1 100644
--- a/macro/mcbm/geometry/trd/Create_TRD_Geometry_v21b.C
+++ b/macro/mcbm/geometry/trd/Create_TRD_Geometry_v21b.C
@@ -7,6 +7,7 @@
 /// \brief Generates TRD geometry in Root format.
 ///
 
+// 2021-10-10 - AB - v21b    - based on v21b. Correct order of TRD(2D) modules in the set-up
 // 2021-09-28 - SR - v21b    - based on v21a the position is corrected
 // 2021-07-25 - AB - v21a    - based on v20b, add 2 TRD2D modules and their support structure for the 2021 setup
 // 2020-05-25 - DE - v20b    - based on v20a, use 2 TRD modules for 2021 setup
@@ -347,7 +348,7 @@ const Int_t GbtxPerRob[NofModuleTypes]    = {105, 105, 105, 103, 107,
                                           105, 105, 103, 103, 103};  // number of GBTx ASICs on ROB
 
 const Int_t GbtxPerModule[NofModuleTypes]   = {15, 10, 5, 18, 0,
-                                             10, 5,  3, 6, 1};  // for .geo.info - TODO: merge with above GbtxPerRob
+                                             10, 5,  3, 6,  1};  // for .geo.info - TODO: merge with above GbtxPerRob
 const Int_t RobTypeOnModule[NofModuleTypes] = {
   555, 55, 5, 333333, 0, 55, 5, 3, 333333, 333333};  // for .geo.info - TODO: merge with above GbtxPerRob
 
@@ -2947,7 +2948,8 @@ void create_detector_layers(Int_t layerId)
 
           cout << "DESH layer " << layerId << " xPos " << xPos << endl;
           cout << "DESH layer " << layerId << " yPos " << yPos << endl;
-          cout << "DESH layer " << layerId << " zPos " << LayerPosition[layerId] << " " <<  LayerThickness / 2  << " " <<  dz << endl;
+          cout << "DESH layer " << layerId << " zPos " << LayerPosition[layerId] << " " << LayerThickness / 2 << " "
+               << dz << endl;
 
           TGeoCombiTrans* module_placement =
             new TGeoCombiTrans(xPos, yPos, LayerPosition[layerId] + LayerThickness / 2 + dz,
@@ -2988,7 +2990,7 @@ void create_detector_layers(Int_t layerId)
   ModuleStats[layerId][type - 1]++;
 
   module_rotation = new TGeoRotation();
-  cout << "DESH layer " << layerId << " zPos " << LayerPosition[layerId] + LayerThickness / 2  << " " <<  zPos << endl;
+  cout << "DESH layer " << layerId << " zPos " << LayerPosition[layerId] + LayerThickness / 2 << " " << zPos << endl;
   TGeoCombiTrans* module_placement =
     new TGeoCombiTrans(xPos, yPos, /*LayerPosition[0] - (layerId - 1) * LayerThickness / 2 + zPos*/
                        LayerPosition[layerId] + LayerThickness / 2 + zPos,
-- 
GitLab