From a27a0369ce6d7f9e51c9372e0a467045205d598e Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Sun, 25 Feb 2024 19:31:31 +0100 Subject: [PATCH] Update unused variables --- detector/calorimeter/ECalEndcap_o1_v01_geo.cpp | 2 -- .../calorimeter/HCalThreePartsEndcap_o1_v01_geo.cpp | 7 ------- detector/calorimeter/HCalTileBarrel_o1_v01_geo.cpp | 2 -- detector/calorimeter/YokeEndcap_o1_v01_geo.cpp | 11 +---------- detector/tracker/VertexBarrel_detailed_o1_v01_geo.cpp | 3 +-- detector/tracker/VertexEndcap_detailed_o1_v01_geo.cpp | 3 --- 6 files changed, 2 insertions(+), 26 deletions(-) diff --git a/detector/calorimeter/ECalEndcap_o1_v01_geo.cpp b/detector/calorimeter/ECalEndcap_o1_v01_geo.cpp index 2bcae2f47..f27941378 100644 --- a/detector/calorimeter/ECalEndcap_o1_v01_geo.cpp +++ b/detector/calorimeter/ECalEndcap_o1_v01_geo.cpp @@ -184,7 +184,6 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s // Loop over the sets of layer elements in the detector double check_thick = 0.0; int l_num = 1; - int l_set [[maybe_unused]] = 0; for(xml_coll_t li(x_det,_U(layer)); li; ++li) { xml_comp_t x_layer = li; @@ -281,7 +280,6 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s // Increment layer number ++l_num; } - l_set++; } std::cout << "Total slice thickness check " << check_thick << " cm" << std::endl; diff --git a/detector/calorimeter/HCalThreePartsEndcap_o1_v01_geo.cpp b/detector/calorimeter/HCalThreePartsEndcap_o1_v01_geo.cpp index d87c6ea91..34544c2e2 100644 --- a/detector/calorimeter/HCalThreePartsEndcap_o1_v01_geo.cpp +++ b/detector/calorimeter/HCalThreePartsEndcap_o1_v01_geo.cpp @@ -5,7 +5,6 @@ #define endmsg std::endl #define lLog std::cout namespace MSG { -const std::string ERROR = " Error: "; const std::string DEBUG = " Debug: "; const std::string INFO = " Info: "; } @@ -216,7 +215,6 @@ void buildEC(dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector& aSensDet, dd4he layerVolume.setVisAttributes(aLcdd.invisible()); unsigned int idxSubMod = 0; - unsigned int idxActMod [[maybe_unused]] = 0; dd4hep::Position moduleOffset1 (0,0,sign * extBarrelOffset1); @@ -248,7 +246,6 @@ void buildEC(dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector& aSensDet, dd4he if (xComp.isSensitive()) { tileVol.setSensitiveDetector(sensDet); tilesPerLayer.push_back(placedTileVol); - idxActMod++; } tileZOffset += xComp.thickness(); } @@ -290,7 +287,6 @@ void buildEC(dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector& aSensDet, dd4he layerVolume.setVisAttributes(aLcdd.invisible()); unsigned int idxSubMod = 0; - unsigned int idxActMod [[maybe_unused]] = 0; double tileZOffset = - 0.5* dzSequence; @@ -311,7 +307,6 @@ void buildEC(dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector& aSensDet, dd4he if (xComp.isSensitive()) { tileVol.setSensitiveDetector(sensDet); tilesPerLayer.push_back(placedTileVol); - idxActMod++; } tileZOffset += xComp.thickness(); } @@ -361,7 +356,6 @@ void buildEC(dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector& aSensDet, dd4he layerVolume.setVisAttributes(aLcdd.invisible()); unsigned int idxSubMod = 0; - unsigned int idxActMod [[maybe_unused]] = 0; double tileZOffset = - 0.5* dzSequence; @@ -382,7 +376,6 @@ void buildEC(dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector& aSensDet, dd4he if (xComp.isSensitive()) { tileVol.setSensitiveDetector(sensDet); tilesPerLayer.push_back(placedTileVol); - idxActMod++; } tileZOffset += xComp.thickness(); } diff --git a/detector/calorimeter/HCalTileBarrel_o1_v01_geo.cpp b/detector/calorimeter/HCalTileBarrel_o1_v01_geo.cpp index 8767e0b96..89be7154d 100644 --- a/detector/calorimeter/HCalTileBarrel_o1_v01_geo.cpp +++ b/detector/calorimeter/HCalTileBarrel_o1_v01_geo.cpp @@ -167,7 +167,6 @@ static dd4hep::Ref_t createHCal(dd4hep::Detector& lcdd, xml_det_t xmlDet, dd4hep layerVolume.setVisAttributes(lcdd.invisible()); unsigned int idxSubMod = 0; - unsigned int idxActMod [[maybe_unused]] = 0; dd4hep::PlacedVolume placedLayerVolume = envelopeVolume.placeVolume(layerVolume); @@ -191,7 +190,6 @@ static dd4hep::Ref_t createHCal(dd4hep::Detector& lcdd, xml_det_t xmlDet, dd4hep if (xComp.isSensitive()) { tileVol.setSensitiveDetector(sensDet); tilesPerLayer.push_back(placedTileVol); - idxActMod++; } tileZOffset += xComp.thickness(); } diff --git a/detector/calorimeter/YokeEndcap_o1_v01_geo.cpp b/detector/calorimeter/YokeEndcap_o1_v01_geo.cpp index e41c16e47..2f957424c 100644 --- a/detector/calorimeter/YokeEndcap_o1_v01_geo.cpp +++ b/detector/calorimeter/YokeEndcap_o1_v01_geo.cpp @@ -113,7 +113,6 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s double sliceZ = -l_thick/2; double totalAbsorberThickness=0.; - double th_i [[maybe_unused]] = 0. , th_o = -1. ; for(xml_coll_t s(x_layer,_U(slice)); s; ++s) { xml_comp_t x_slice = s; string s_name = _toString(s_num,"slice%d"); @@ -131,15 +130,7 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s s_phv.addPhysVolID("submodule",sensor_num); sensor_num++; - th_i += s_thick / 2. ; - th_o = s_thick / 2. ; - } else { - if( th_o < 0. ){ - th_i += s_thick; - } else { - th_o += s_thick; - } - } + } if( x_slice.isRadiator() ==true) totalAbsorberThickness+= s_thick; diff --git a/detector/tracker/VertexBarrel_detailed_o1_v01_geo.cpp b/detector/tracker/VertexBarrel_detailed_o1_v01_geo.cpp index ada8d2417..cc9704eb5 100644 --- a/detector/tracker/VertexBarrel_detailed_o1_v01_geo.cpp +++ b/detector/tracker/VertexBarrel_detailed_o1_v01_geo.cpp @@ -342,7 +342,7 @@ static Ref_t create_element(Detector& theDetector, xml_h e, SensitiveDetector se // passivesDE.setPlacement(pv); // Place all sensor parts - int iSensitive = 0, iPassive [[maybe_unused]] = 0; + int iSensitive = 0; for(int i=0; i