From 3cfa995b431963bcfa94e147640e6bf12993e688 Mon Sep 17 00:00:00 2001
From: Johannes Junggeburth <johannes.josef.junggeburth@cern.ch>
Date: Thu, 2 May 2024 17:45:00 +0200
Subject: [PATCH] Remove rotation logic

---
 .../MuonG4/MuonG4SD/src/RPCSensitiveDetector.cxx    | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/MuonSpectrometer/MuonG4/MuonG4SD/src/RPCSensitiveDetector.cxx b/MuonSpectrometer/MuonG4/MuonG4SD/src/RPCSensitiveDetector.cxx
index 9cd358f1dc5d..f20f2cbd3523 100755
--- a/MuonSpectrometer/MuonG4/MuonG4SD/src/RPCSensitiveDetector.cxx
+++ b/MuonSpectrometer/MuonG4/MuonG4SD/src/RPCSensitiveDetector.cxx
@@ -50,8 +50,6 @@ G4bool RPCSensitiveDetector::ProcessHits(G4Step* aStep,G4TouchableHistory*) {
   const G4AffineTransform trans     = track->GetTouchable()->GetHistory()->GetTopTransform(); // from global to local
 
   // necessary to assign correct identifiers
-  int rpcIsRotated      = 0;
-  // int layer             = 0;
 
   std::string tech;
   // fields for the RPC identifier construction
@@ -158,7 +156,6 @@ G4bool RPCSensitiveDetector::ProcessHits(G4Step* aStep,G4TouchableHistory*) {
       }
       int kk=gmID;
 
-      if (kk < 0) rpcIsRotated=1;
 
       doubletR =(abs(kk)%1000)/100;
       mydbZ    = abs(int(kk%10));
@@ -180,21 +177,15 @@ G4bool RPCSensitiveDetector::ProcessHits(G4Step* aStep,G4TouchableHistory*) {
 
       int kk=touchHist->GetVolume(i)->GetCopyNo();
 
-      if (kk < 0) rpcIsRotated=1;
+
 
       doubletR=(abs(kk)%1000)/100;
 
     } else if ((npos = volName.find("layer")) != std::string::npos) {
 
       int copyNo = touchHist->GetVolume(i)->GetCopyNo();
+      gasGap = copyNo;
 
-      if (copyNo == 1) {
-        rpcIsRotated ? gasGap = 2 : gasGap = 1;
-      } else if (copyNo ==2) {
-        rpcIsRotated ? gasGap = 1 : gasGap = 2;
-      } else if (copyNo ==3) {
-        gasGap = 3;
-      }
     } else if((npos = volName.find("gas volume")) != std::string::npos) {
 
       int copyNo = touchHist->GetVolume(i)->GetCopyNo();
-- 
GitLab