diff --git a/DDExamples/ILDExDet/compact/ILDEx.xml b/DDExamples/ILDExDet/compact/ILDEx.xml index 678b6cdbc3c21ccaee3ae6d8097d4e14c40aac31..95ec14c4bb8e17e0c90896f866409056edea53af 100644 --- a/DDExamples/ILDExDet/compact/ILDEx.xml +++ b/DDExamples/ILDExDet/compact/ILDEx.xml @@ -24,7 +24,15 @@ <constant name="world_z" value="world_side/2"/> <constant name="CrossingAngle" value="0.014"/> - <constant name="TPC_zhalf" value="2500*mm"/> + <constant name="VXD_inner_radius" value="15*mm"/> + <constant name="VXD_outer_radius" value="80*mm"/> + <constant name="VXD_zhalf" value="130*mm"/> + + <constant name="SIT_inner_radius" value="150*mm"/> + <constant name="SIT_outer_radius" value="330*mm"/> + <constant name="SIT_zhalf" value="660*mm"/> + + <constant name="TPC_zhalf" value="2500*mm"/> <constant name="TPC_outer_radius" value="1800*mm"/> <constant name="TPC_inner_radius" value="350*mm"/> <constant name="TPC_inner_thickness" value="2*mm"/> @@ -107,6 +115,7 @@ <comment>Trackers</comment> <detector name="VXD" type="ILDExVXD" vis="VXDVis" id="1" limits="Tracker_limits" readout="VXDCollection" insideTrackingVolume="true"> + <tubs rmin="VXD_inner_radius" rmax="VXD_outer_radius" zhalf="VXD_zhalf"/> <layer id="0" vis="VXDLayerVis" phi0="-1.570796327e+00"> <support thickness=".1*mm" material="Carbon" vis="VXDSupportVis"/> <ladder zhalf="65*mm" radius="1.595000000e+01*mm" width="1.100000000e+01*mm" offset="-1.874869853e+00*mm" thickness="0.05*mm" material="Silicon" number="10"/> @@ -134,7 +143,8 @@ </detector> <detector name="SIT" type="ILDExSIT" vis="SITVis" id="2" limits="Tracker_limits" readout="SITCollection" insideTrackingVolume="true"> - <layer id="0" vis="SITLayerVis"> + <tubs rmin="SIT_inner_radius" rmax="SIT_outer_radius" zhalf="SIT_zhalf"/> + <layer id="0" vis="SITLayerVis"> <support thickness="0.01*mm" material="Carbon" vis="SITSupportVis"/> <ladder thickness="0.1*mm" zhalf="370*mm" radius="155*mm" material="Silicon" number="10" /> </layer> @@ -145,7 +155,7 @@ </detector> - <detector name="TPC" type="XX_ILDExTPC" vis="TPCVis" id="3" limits="TPC_limits" readout="TPCCollection" insideTrackingVolume="true"> + <detector name="TPC" type="XXX_ILDExTPC" vis="TPCVis" id="3" limits="TPC_limits" readout="TPCCollection" insideTrackingVolume="true"> <tubs rmin="TPC_inner_radius" rmax="TPC_outer_radius" zhalf="TPC_zhalf"/> <!-- GEAR Data--> <driftlength value="TPC_zhalf*0.9"/> @@ -184,7 +194,7 @@ </detector> <comment>Calorimeters</comment> - <detector id="7" name="HcalBarrel" type="AhcalBarrelCalorimeter" readout="HcalBarrelHits" vis="HcalBarrelVis" calorimeterType="HAD_BARREL" gap="10.*mm"> + <detector id="7" name="HcalBarrel" type="XXXAhcalBarrelCalorimeter" readout="HcalBarrelHits" vis="HcalBarrelVis" calorimeterType="HAD_BARREL" gap="10.*mm"> <comment>Hadron Calorimeter Barrel</comment> <material name="Steel235"/> @@ -197,7 +207,7 @@ <slice material = "Air" thickness = "2.7*mm" vis="HcalBarrelAirVis" /> </layer> </detector> - <detector id="8" name="HcalEndcap" type="AhcalEndcapCalorimeter" readout="HcalEndcapHits" calorimeterType="HAD_ENDCAP" gap="15.*mm"> + <detector id="8" name="HcalEndcap" type="XXXAhcalEndcapCalorimeter" readout="HcalEndcapHits" calorimeterType="HAD_ENDCAP" gap="15.*mm"> <comment>Hadron Calorimeter Endcap</comment> <material name="Steel235"/> diff --git a/DDExamples/ILDExDet/src/compact/ILDExSIT_geo.cpp b/DDExamples/ILDExDet/src/compact/ILDExSIT_geo.cpp index 6bdcabe158fa190937f95e421edc42f560ed9f31..ae12c505460b4fdc71d6824da3dad3147e729fee 100644 --- a/DDExamples/ILDExDet/src/compact/ILDExSIT_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/ILDExSIT_geo.cpp @@ -21,20 +21,17 @@ static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector sens) { xml_det_t x_det = e; string name = x_det.nameStr(); DetElement sit(name,x_det.id()); - Assembly assembly( name + "assembly" ) ; + // Assembly assembly( name + "assembly" ) ; PlacedVolume pv; - // // setup the encoder - // UTIL::BitField64 encoder( ILDCellID0::encoder_string ) ; - // encoder.reset() ; // reset to 0 - // encoder[ILDCellID0::subdet] = ILDDetID::SIT ; - // encoder[ILDCellID0::side] = 0 ; - // encoder[ILDCellID0::module] = 0 ; - // encoder[ILDCellID0::sensor] = 0 ; - - for(xml_coll_t c(e,_U(layer)); c; ++c) { + // replace assembly with cylinder of air: + xml_comp_t x_tube (x_det.child(_U(tubs))); + Tube envelope_cylinder(x_tube.rmin(),x_tube.rmax(),x_tube.zhalf()); + Volume assembly ("sit_envelope_cyl", envelope_cylinder ,lcdd.air()); + for(xml_coll_t c(e,_U(layer)); c; ++c) { + xml_comp_t x_layer (c); xml_comp_t x_support (x_layer.child(_U(support))); xml_comp_t x_ladder (x_layer.child(_U(ladder))); @@ -71,9 +68,6 @@ static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector sens) { double radius = sens_radius + ((sens_thick+supp_thick)/2. - sens_thick/2.); Position pos(radius*cos(j*dphi),radius*sin(j*dphi),0.); - // place the volume and set the cellID0 - will be set to the copyNo in Geant4Converter - // encoder[ILDCellID0::module] = j ; - // int cellID0 = encoder.lowWord() ; pv = assembly.placeVolume(laddervol,Transform3D(RotationZ(j*dphi),pos)); diff --git a/DDExamples/ILDExDet/src/compact/ILDExVXD_geo.cpp b/DDExamples/ILDExDet/src/compact/ILDExVXD_geo.cpp index c2aef3c5d096554efaed4515efb8bb99e1071ca8..abdf7cc018c445f2f9a0a6082b749ddff1dd01a8 100644 --- a/DDExamples/ILDExDet/src/compact/ILDExVXD_geo.cpp +++ b/DDExamples/ILDExDet/src/compact/ILDExVXD_geo.cpp @@ -21,19 +21,20 @@ static Ref_t create_element(LCDD& lcdd, xml_h e, SensitiveDetector sens) { DetElement vxd; xml_det_t x_det = e; string name = x_det.nameStr(); - Assembly assembly(name+"_assembly"); + + // Assembly assembly(name+"_assembly"); + + // replace assembly with cylinder of air: + xml_comp_t x_tube (x_det.child(_U(tubs))); + Tube envelope_cylinder(x_tube.rmin(),x_tube.rmax(),x_tube.zhalf()); + Volume assembly ("vxd_envelope_cyl", envelope_cylinder ,lcdd.air()); + PlacedVolume pv; VXDData* vxd_data = new VXDData(); vxd.assign(vxd_data,name,x_det.typeStr()); vxd_data->id = x_det.id(); - // // setup the encoder - // UTIL::BitField64 encoder( ILDCellID0::encoder_string ) ; - // encoder.reset() ; // reset to 0 - // encoder[ILDCellID0::subdet] = ILDDetID::VXD ; - // encoder[ILDCellID0::side] = 0 ; - // encoder[ILDCellID0::sensor] = 0 ; for(xml_coll_t c(e,_U(layer)); c; ++c) {