diff --git a/DDExamples/CLICSiD/src/CylindricalBarrelCalorimeter_geo.cpp b/DDExamples/CLICSiD/src/CylindricalBarrelCalorimeter_geo.cpp index f523514946a5126ca140f446dea6033d2b7c18ee..298e6ef98ff6d7eec8018d77ec80e42546af5646 100644 --- a/DDExamples/CLICSiD/src/CylindricalBarrelCalorimeter_geo.cpp +++ b/DDExamples/CLICSiD/src/CylindricalBarrelCalorimeter_geo.cpp @@ -51,7 +51,7 @@ static Ref_t create_detector(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens layer_tub.setDimensions(rlayer,r,z*2,0,2*M_PI); PlacedVolume layer_physvol = envelopeVol.placeVolume(layer_vol,IdentityPos()); - layer_physvol.addPhysVolID(_A(layer),n); + layer_physvol.addPhysVolID("layer",n); ++n; } } @@ -60,7 +60,7 @@ static Ref_t create_detector(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens envelopeVol.setAttributes(lcdd,x_det.regionStr(),x_det.limitsStr(),x_det.visStr()); PlacedVolume physvol = lcdd.pickMotherVolume(sdet).placeVolume(envelopeVol,IdentityPos()); - physvol.addPhysVolID(_A(system),sdet.id()).addPhysVolID(_A(barrel),0); + physvol.addPhysVolID("system",sdet.id()).addPhysVolID(_A(barrel),0); sdet.setPlacement(physvol); return sdet; } diff --git a/DDExamples/CLICSiD/src/CylindricalEndcapCalorimeter_geo.cpp b/DDExamples/CLICSiD/src/CylindricalEndcapCalorimeter_geo.cpp index 86661b81bf37c7e1dfba5cea0a08d079dce607e8..62a0e76fd18ab480bd3809f6f25ba88b78401b4b 100644 --- a/DDExamples/CLICSiD/src/CylindricalEndcapCalorimeter_geo.cpp +++ b/DDExamples/CLICSiD/src/CylindricalEndcapCalorimeter_geo.cpp @@ -64,16 +64,16 @@ static Ref_t create_detector(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens // Set attributes of slice envelopeVol.setAttributes(lcdd,x_det.regionStr(),x_det.limitsStr(),x_det.visStr()); - DetElement sdet(det_name,x_det.id()); - Volume motherVol = lcdd.pickMotherVolume(sdet); + DetElement sdet(det_name,x_det.id()); + Volume motherVol = lcdd.pickMotherVolume(sdet); PlacedVolume phv = motherVol.placeVolume(envelopeVol,Position(0,0,zmin+totWidth/2)); - phv.addPhysVolID(_A(system),sdet.id()) - .addPhysVolID(_A(barrel),1); + phv.addPhysVolID("system",sdet.id()) + .addPhysVolID("barrel",1); sdet.setPlacement(phv); if ( reflect ) { phv=motherVol.placeVolume(envelopeVol,Position(0,0,-zmin-totWidth/2),ReflectRot()); - phv.addPhysVolID(_A(system),sdet.id()) - .addPhysVolID(_A(barrel),2); + phv.addPhysVolID("system",sdet.id()) + .addPhysVolID("barrel",2); } return sdet; } diff --git a/DDExamples/CLICSiD/src/DiskTracker_geo.cpp b/DDExamples/CLICSiD/src/DiskTracker_geo.cpp index 388504eeef633af9b114f765029aec720643b5da..e582252e1128d9b3a02b17599f1ff76b2e656297 100644 --- a/DDExamples/CLICSiD/src/DiskTracker_geo.cpp +++ b/DDExamples/CLICSiD/src/DiskTracker_geo.cpp @@ -48,19 +48,19 @@ static Ref_t create_detector(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens s_vol.setAttributes(lcdd,x_slice.regionStr(),x_slice.limitsStr(),x_slice.visStr()); PlacedVolume spv = l_vol.placeVolume(s_vol,Position(0,0,z-zmin-layerWidth/2+thick/2)); - spv.addPhysVolID(_X(layer),l_num); - spv.addPhysVolID(_X(slice),s_num); + spv.addPhysVolID("layer",l_num); + spv.addPhysVolID("slice",s_num); } PlacedVolume lpv = motherVol.placeVolume(l_vol,Position(0,0,zmin+layerWidth/2.)); - lpv.addPhysVolID(_X(system),sdet.id()); - lpv.addPhysVolID(_X(barrel),1); + lpv.addPhysVolID("system",sdet.id()); + lpv.addPhysVolID("barrel",1); DetElement layer(sdet,l_nam,l_num); layer.setPlacement(lpv); if ( reflect ) { PlacedVolume lpvR = motherVol.placeVolume(l_vol,Position(0,0,-zmin-layerWidth/2),ReflectRot()); - lpvR.addPhysVolID(_X(system),sdet.id()); - lpvR.addPhysVolID(_X(barrel),2); + lpvR.addPhysVolID("system",sdet.id()); + lpvR.addPhysVolID("barrel",2); DetElement layerR = layer.clone(l_nam+"_reflect"); sdet.add(layerR.setPlacement(lpvR)); } diff --git a/DDExamples/CLICSiD/src/ForwardDetector_geo.cpp b/DDExamples/CLICSiD/src/ForwardDetector_geo.cpp index 1a3a845dbc4abda16f047fec1147ea780fe7a0b0..2148b3c6f61b433957a513c428f071fff242441e 100644 --- a/DDExamples/CLICSiD/src/ForwardDetector_geo.cpp +++ b/DDExamples/CLICSiD/src/ForwardDetector_geo.cpp @@ -139,7 +139,7 @@ static Ref_t create_detector(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens // Layer PV. PlacedVolume layerPV = envelopeVol.placeVolume(layerVol,Position(0,0,layerPosZ)); - layerPV.addPhysVolID(_X(layer), i); + layerPV.addPhysVolID("layer", i); layer.setPlacement(layerPV); // Increment to start of next layer. @@ -150,14 +150,14 @@ static Ref_t create_detector(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens sdet.setVisAttributes(lcdd, x_det.visStr(), envelopeVol); PlacedVolume env_phv = motherVol.placeVolume(envelopeVol,Position(0,0,zpos)); - env_phv.addPhysVolID(_X(system), id); - env_phv.addPhysVolID(_X(barrel), 1); + env_phv.addPhysVolID("system", id); + env_phv.addPhysVolID("barrel", 1); sdet.setPlacement(env_phv); // Reflect it. if ( reflect ) { env_phv = motherVol.placeVolume(envelopeVol,Position(0,0,-zpos),ReflectRot()); - env_phv.addPhysVolID(_X(system), id); - env_phv.addPhysVolID(_X(barrel), 2); + env_phv.addPhysVolID("system", id); + env_phv.addPhysVolID("barrel", 2); DetElement rdet(det_name+"_reflect",x_det.id()); rdet.setPlacement(env_phv); } diff --git a/DDExamples/CLICSiD/src/MultiLayerTracker_geo.cpp b/DDExamples/CLICSiD/src/MultiLayerTracker_geo.cpp index 64e5979fafd5459315f29fa108b52706cba7184b..e95ffb3dfd4512ea85d0f2b15e1cd1da546e1e07 100644 --- a/DDExamples/CLICSiD/src/MultiLayerTracker_geo.cpp +++ b/DDExamples/CLICSiD/src/MultiLayerTracker_geo.cpp @@ -46,14 +46,14 @@ static Ref_t create_detector(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens s_vol.setAttributes(lcdd,x_slice.regionStr(),x_slice.limitsStr(),x_slice.visStr()); PlacedVolume spv = l_vol.placeVolume(s_vol,IdentityPos()); // Slices have no extra id. Take the ID of the layer! - spv.addPhysVolID(_X(layer),n); + spv.addPhysVolID("layer",n); } l_tub.setDimensions(rmin,r,z,0,2*M_PI); cout << l_name << " " << rmin << " " << r << " " << z << endl; l_vol.setVisAttributes(lcdd,x_layer.visStr()); PlacedVolume lpv = motherVol.placeVolume(l_vol,IdentityPos()); - lpv.addPhysVolID(_X(system),sdet.id()).addPhysVolID(_X(barrel),0); + lpv.addPhysVolID("system",sdet.id()).addPhysVolID(_X(barrel),0); layer.setPlacement(lpv); } sdet.setCombineHits(x_det.attr<bool>(_A(combineHits)),sens); diff --git a/DDExamples/CLICSiD/src/PolyhedraBarrelCalorimeter2_geo.cpp b/DDExamples/CLICSiD/src/PolyhedraBarrelCalorimeter2_geo.cpp index 3f0c956052d06ba2967bcbdfa6190bb72d2c1660..3c8bc4d6fc370e552def4f0e59eac6afd2b3197d 100644 --- a/DDExamples/CLICSiD/src/PolyhedraBarrelCalorimeter2_geo.cpp +++ b/DDExamples/CLICSiD/src/PolyhedraBarrelCalorimeter2_geo.cpp @@ -32,8 +32,8 @@ static void placeStaves(DetElement& parent, for (int module = 0; module < numsides; ++module) { DetElement det = module>0 ? stave.clone(_toString(module,"stave%d")) : stave; PlacedVolume pv = envelopeVolume.placeVolume(sectVolume,Position(posX,-posY,0),Rotation(rotZ,rotY,0)); - pv.addPhysVolID(_X(stave), 0); - pv.addPhysVolID(_X(module),module); + pv.addPhysVolID("stave", 0); + pv.addPhysVolID("module",module); det.setPlacement(pv); parent.add(det); rotZ -= innerRotation; @@ -129,7 +129,7 @@ static Ref_t create_detector(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens slice_vol.setAttributes(lcdd,x_slice.regionStr(),x_slice.limitsStr(),x_slice.visStr()); // slice PlacedVolume PlacedVolume slice_phv = layer_vol.placeVolume(slice_vol,Position(0,0,slice_pos_z)); - slice_phv.addPhysVolID(_X(slice),slice_number); + slice_phv.addPhysVolID("slice",slice_number); slice.setPlacement(slice_phv); // Increment Z position for next slice. @@ -142,7 +142,7 @@ static Ref_t create_detector(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens // Layer physical volume. PlacedVolume layer_phv = staveInnerVol.placeVolume(layer_vol,Position(0,0,layer_pos_z)); - layer_phv.addPhysVolID(_X(layer),layer_num); + layer_phv.addPhysVolID("layer",layer_num); layer.setPlacement(layer_phv); // Increment the layer X dimension. @@ -162,8 +162,8 @@ static Ref_t create_detector(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens placeStaves(sdet,stave,rmin,numSides,totalThickness,envelopeVol,innerAngle,staveOuterVol); PlacedVolume env_phv = motherVol.placeVolume(envelopeVol,Rotation(0,0,M_PI/numSides)); - env_phv.addPhysVolID(_X(system), sdet.id()); - env_phv.addPhysVolID(_X(barrel), 0); + env_phv.addPhysVolID("system", sdet.id()); + env_phv.addPhysVolID("barrel", 0); sdet.setPlacement(env_phv); return sdet; } diff --git a/DDExamples/CLICSiD/src/SiTrackerEndcap2_geo.cpp b/DDExamples/CLICSiD/src/SiTrackerEndcap2_geo.cpp index be0ab8c170b36bc30f4b0581844a6391932a9bc4..48ce8a1e79408a0ec71ed196e5bab288d65293c7 100644 --- a/DDExamples/CLICSiD/src/SiTrackerEndcap2_geo.cpp +++ b/DDExamples/CLICSiD/src/SiTrackerEndcap2_geo.cpp @@ -55,7 +55,7 @@ static Ref_t create_detector(LCDD& lcdd, const xml_h& e, SensitiveDetector& sens phv.addPhysVolID(_X(component),c_id); if ( c.isSensitive() ) { sdet.check(n_sensor > 1,"SiTrackerEndcap2::fromCompact: "+c_name+" Max of 2 modules allowed!"); - phv.addPhysVolID(_X(sensor),c_id); + phv.addPhysVolID("sensor",c_id); vol.setSensitiveDetector(sens); ++n_sensor; } diff --git a/DDExamples/CLICSiD/src/TubeSegment_geo.cpp b/DDExamples/CLICSiD/src/TubeSegment_geo.cpp index 30a9f826a03a44bd7531248d0fdd828716a7e7bd..c48e498e0650f085b7bc0bec00923f721ab00d61 100644 --- a/DDExamples/CLICSiD/src/TubeSegment_geo.cpp +++ b/DDExamples/CLICSiD/src/TubeSegment_geo.cpp @@ -28,7 +28,7 @@ static Ref_t create_element(LCDD& lcdd, const xml_h& e, SensitiveDetector&) { PlacedVolume phv = mother.placeVolume(vol,Position(pos.x(),pos.y(),pos.z()), Rotation(rot.z(),rot.y(),rot.x())); - phv.addPhysVolID(_A(id),x_det.id()); + phv.addPhysVolID("id",x_det.id()); sdet.setPlacement(phv); return sdet; }