Skip to content

Commit

Permalink
Update unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Feb 25, 2024
1 parent cf2c07e commit a27a036
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 26 deletions.
2 changes: 0 additions & 2 deletions detector/calorimeter/ECalEndcap_o1_v01_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
7 changes: 0 additions & 7 deletions detector/calorimeter/HCalThreePartsEndcap_o1_v01_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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: ";
}
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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();
}
Expand Down Expand Up @@ -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;

Expand All @@ -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();
}
Expand Down Expand Up @@ -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;

Expand All @@ -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();
}
Expand Down
2 changes: 0 additions & 2 deletions detector/calorimeter/HCalTileBarrel_o1_v01_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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();
}
Expand Down
11 changes: 1 addition & 10 deletions detector/calorimeter/YokeEndcap_o1_v01_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions detector/tracker/VertexBarrel_detailed_o1_v01_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int(m.sensor_volumes.size()); i++){
x_pos = 0.0;
y_pos = m.sensor_xmin[i]+abs(m.sensor_xmax[i]-m.sensor_xmin[i])/2.;
Expand All @@ -369,7 +369,6 @@ static Ref_t create_element(Detector& theDetector, xml_h e, SensitiveDetector se
// Place passive sensor parts
else{
stave_assembly.placeVolume(m.sensor_volumes[i], Transform3D(rot, pos)*Translation3D(pos2));
iPassive++;
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions detector/tracker/VertexEndcap_detailed_o1_v01_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,6 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
petalDE.setPlacement(pv);

int iStave = 0;
int nStaves [[maybe_unused]] = 0;
for(xml_coll_t ri(x_layer,_U(stave)); ri; ++ri)
nStaves+=1;

for(xml_coll_t ri(x_layer,_U(stave)); ri; ++ri) {
xml_comp_t x_stave = ri;
Expand Down

0 comments on commit a27a036

Please sign in to comment.