Skip to content

Commit

Permalink
Use + std::to_string to convert integers before appending to a string (
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell authored Aug 9, 2024
1 parent 976c22e commit a713f69
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions detector/muonSystem/muonSystemMuRWELL_o1_v01.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ static dd4hep::Ref_t createmuonSystemMuRWELL_o1_v01(dd4hep::Detector& lcdd,
dd4hep::Position detectorLayerTrans(0., 0., 0.);
dd4hep::PlacedVolume detectorLayerPhys = BarrelVolume.placeVolume(BarrelDetectorLayerVolume, dd4hep::Transform3D(dd4hep::RotationZ(0.), detectorLayerTrans));
detectorLayerPhys.addPhysVolID("layer", numBarrelLayer+1);
dd4hep::DetElement BarrelDetectorLayerDE(BarrelDE, "MSBarrelDetectorLayerDE" + numBarrelLayer+1, numBarrelLayer+1);
dd4hep::DetElement BarrelDetectorLayerDE(BarrelDE, "MSBarrel_DetectorLayerDE_" + std::to_string(numBarrelLayer+1), numBarrelLayer+1);
BarrelDetectorLayerDE.setPlacement(detectorLayerPhys);
BarrelDetectorLayerVolume.setVisAttributes(lcdd.visAttributes("no_vis"));

Expand Down Expand Up @@ -589,7 +589,7 @@ static dd4hep::Ref_t createmuonSystemMuRWELL_o1_v01(dd4hep::Detector& lcdd,

dd4hep::Position radiatorLayerTrans(0., 0., 0.);
dd4hep::PlacedVolume radiatorLayerPhys = BarrelVolume.placeVolume(BarrelRadiatorLayerVolume, dd4hep::Transform3D(dd4hep::RotationZ(0.), radiatorLayerTrans));
dd4hep::DetElement BarrelRadiatorLayerDE(BarrelDE, "MSBarrel_RadiatorLayerDE" + numBarrelRadiatorLayer+1, numBarrelRadiatorLayer+1);
dd4hep::DetElement BarrelRadiatorLayerDE(BarrelDE, "MSBarrel_RadiatorLayerDE_" + std::to_string(numBarrelRadiatorLayer+1), numBarrelRadiatorLayer+1);
BarrelRadiatorLayerDE.setPlacement(radiatorLayerPhys);
BarrelRadiatorLayerVolume.setVisAttributes(lcdd.visAttributes("no_vis"));

Expand All @@ -614,7 +614,7 @@ static dd4hep::Ref_t createmuonSystemMuRWELL_o1_v01(dd4hep::Detector& lcdd,
endcapTrans = dd4hep::Position(0., 0., endcapType * endcapOffset);
endcapPhys = detectorVolume.placeVolume(endcapVolume, dd4hep::Transform3D(dd4hep::RotationZ(0.), endcapTrans));
endcapPhys.addPhysVolID("type", endcapType);
EndcapDE = dd4hep::DetElement(detElement, "MSEndcapDE" + endcapType , endcapType);
EndcapDE = dd4hep::DetElement(detElement, "MSEndcapDE_" + std::to_string(endcapType) , endcapType);
EndcapDE.setPlacement(endcapPhys);
endcapVolume.setVisAttributes(lcdd.visAttributes("no_vis"));

Expand Down

0 comments on commit a713f69

Please sign in to comment.