diff --git a/Detector/DetCRD/compact/CRD_common_v01/OTKBarrel_v01_01.xml b/Detector/DetCRD/compact/CRD_common_v01/OTKBarrel_v01_01.xml index 0996e56bd4d1a3f0fd9771dee2e01cdc5e3f438d..bbef416d608bd750de1363d29afe95d389fe20d7 100644 --- a/Detector/DetCRD/compact/CRD_common_v01/OTKBarrel_v01_01.xml +++ b/Detector/DetCRD/compact/CRD_common_v01/OTKBarrel_v01_01.xml @@ -20,10 +20,11 @@ <constant name="OTKBarrel_flex_width" value="15*mm" /> <constant name="OTKBarrel_sensor_length" value="140*mm" /> <constant name="OTKBarrel_sensor_thickness" value="500*um" /> - <constant name="OTKBarrel_sensor_active_width" value="132*mm" /> - <constant name="OTKBarrel_sensor_dead_width" value="28*mm" /> + <constant name="OTKBarrel_sensor_active_width" value="159.5*mm" /> + <constant name="OTKBarrel_sensor_dead_width" value="0.5*mm" /> <constant name="OTKBarrel_pcb_thickness" value="500*um" /> - <constant name="OTKBarrel_pcb_width" value="130*mm" /> + <constant name="OTKBarrel_pcb_width" value="28*mm" /> + <constant name="OTKBarrel_port_pcb_width" value="28*mm" /> <constant name="OTKBarrel_pcb_length" value="10*mm" /> <constant name="OTKBarrel_pcb_zgap" value="1*mm" /> <constant name="OTKBarrel_asic_thickness" value="500*um" /> @@ -34,7 +35,7 @@ </define> <detectors> - <detector id="DetID_OTKBarrel" name="OTKBarrel" type="SiTracker_otkbarrel_v01" vis="OTKBarrelVis" readout="OTKBarrelCollection" insideTrackingVolume="true"> + <detector id="DetID_OTKBarrel" limits="otk_limits" name="OTKBarrel" type="SiTracker_otkbarrel_v01" vis="OTKBarrelVis" readout="OTKBarrelCollection" insideTrackingVolume="true"> <envelope> <shape type="BooleanShape" operation="Union" material="Air" > <shape type="Tube" rmin="OTKBarrel_inner_radius" rmax="OTKBarrel_outer_radius" dz="OTKBarrel_half_length" /> @@ -44,7 +45,7 @@ <type_flags type="DetType_TRACKER + DetType_BARREL + DetType_STRIP "/> <global sensitive_mat="G4_Si" support_mat="G4_C" sensitive_threshold_KeV="64*keV" ladder_offset="0*mm"/> - <display ladder="SeeThrough" support="VXDSupportVis" flex="VXDFlexVis" sens_env="SeeThrough" sens="GrayVis" deadsensor="GreenVis" + <display ladder="SeeThrough" support="WhiteVis" flex="VXDFlexVis" sens_env="SeeThrough" sens="GrayVis" deadsensor="GreenVis" pcb="GreenVis" asic="yellowVis"/> <layer layer_id="0" ladder_radius="OTKBarrel1_inner_radius" n_ladders="45" ladder_offset="0*mm" ladder_thickness="OTKBarrel_ladder_total_thickness" @@ -59,7 +60,7 @@ </flex> <sensor n_sensors="42" gap="0*mm" thickness="OTKBarrel_sensor_thickness" length="OTKBarrel_sensor_length" active_width="OTKBarrel_sensor_active_width" sensor_mat="G4_Si" dead_width="OTKBarrel_sensor_dead_width"/> - <other pcb_thickness="OTKBarrel_pcb_thickness" pcb_width="OTKBarrel_pcb_width" pcb_length="OTKBarrel_pcb_length" pcb_zgap="OTKBarrel_pcb_zgap" pcb_mat="epoxy" + <other pcb_thickness="OTKBarrel_pcb_thickness" pcb_width="OTKBarrel_pcb_width" pcb_length="OTKBarrel_pcb_length" pcb_zgap="OTKBarrel_pcb_zgap" port_pcb_width="OTKBarrel_port_pcb_width" pcb_mat="epoxy" asic_thickness="OTKBarrel_asic_thickness" asic_width="OTKBarrel_asic_width" asic_length="OTKBarrel_asic_length" asic_zgap="OTKBarrel_asic_zgap" asic_mat="G4_Si"/> </ladder> </layer> @@ -75,7 +76,7 @@ </flex> <sensor n_sensors="42" gap="0*mm" thickness="OTKBarrel_sensor_thickness" length="OTKBarrel_sensor_length" active_width="OTKBarrel_sensor_active_width" sensor_mat="G4_Si" dead_width="OTKBarrel_sensor_dead_width"/> - <other pcb_thickness="OTKBarrel_pcb_thickness" pcb_width="OTKBarrel_pcb_width" pcb_length="OTKBarrel_pcb_length" pcb_zgap="OTKBarrel_pcb_zgap" pcb_mat="epoxy" + <other pcb_thickness="OTKBarrel_pcb_thickness" pcb_width="OTKBarrel_pcb_width" pcb_length="OTKBarrel_pcb_length" pcb_zgap="OTKBarrel_pcb_zgap" port_pcb_width="OTKBarrel_port_pcb_width" pcb_mat="epoxy" asic_thickness="OTKBarrel_asic_thickness" asic_width="OTKBarrel_asic_width" asic_length="OTKBarrel_asic_length" asic_zgap="OTKBarrel_asic_zgap" asic_mat="G4_Si"/> </ladder> </layer> diff --git a/Detector/DetCRD/compact/CRD_common_v01/OTKEndCap_v01_01.xml b/Detector/DetCRD/compact/CRD_common_v01/OTKEndCap_v01_01.xml index fb0b4375f9f8a4ca5f6c3611577c79d2a4aaad78..b73df32e0b9a3e52c9b52a54faff88a0fbc1f7cb 100644 --- a/Detector/DetCRD/compact/CRD_common_v01/OTKEndCap_v01_01.xml +++ b/Detector/DetCRD/compact/CRD_common_v01/OTKEndCap_v01_01.xml @@ -24,7 +24,9 @@ <constant name="OTKEndCap_inner_radius" value="OTKEndCap_r0" /> <constant name="OTKEndCap_outer_radius" value="OTKEndCap_r10" /> <constant name="OTKEndCap_half_length" value="2900*mm" /> - <constant name="OTKEndCap_piece_deg" value="8" /><!-- variable OTKEndCap_piece_deg needs no dimension --> + <constant name="OTKEndCap_piece_deg" value="7.5" /><!-- variable OTKEndCap_piece_deg needs no dimension --> + <constant name="OTKEndCap_dead_deg" value="0.5" /> + <constant name="OTKEndCap_dead_thickness" value="1*mm" /> <constant name="OTKEndCap_piece_num" value="24" /> <constant name="OTKEndCap_asic_num_0" value="5" /> <constant name="OTKEndCap_asic_num_1" value="7" /> @@ -51,8 +53,8 @@ <constant name="OTKEndCap_layer1_zpos" value="2875*mm" /> <constant name="OTKEndCap_support_thickness" value="1*mm" /> <constant name="OTKEndCap_sensor_thickness" value="500*um" /> - <constant name="OTKEndCap_sensor_gap" value="0.1*mm" /> - <constant name="OTKEndCap_sensor_dead_width" value="0.001*mm" /><!-- do not set it to 0 --> + <constant name="OTKEndCap_sensor_gap" value="0.5*mm" /> + <constant name="OTKEndCap_sensor_dead_width" value="0.5*mm" /><!-- do not set it to 0 --> <constant name="OTKEndCap_pcb_thickness" value="500*um" /> <constant name="OTKEndCap_pcb_rlength" value="10*mm" /> <constant name="OTKEndCap_pcb_rgap" value="10*mm" /> @@ -64,17 +66,17 @@ </define> <detectors> - <detector id="DetID_OTKEndCap" name="OTKEndCap" type="SiTracker_otkendcap_v01" vis="OTKEndCapVis" readout="OTKEndCapCollection" insideTrackingVolume="true"> + <detector id="DetID_OTKEndCap" limits="otk_limits" name="OTKEndCap" type="SiTracker_otkendcap_v01" vis="OTKEndCapVis" readout="OTKEndCapCollection" insideTrackingVolume="true"> <envelope> <shape type="BooleanShape" operation="Union" material="Air" > <shape type="Tube" rmin="OTKEndCap_inner_radius" rmax="OTKEndCap_outer_radius" dz="OTKEndCap_half_length" /> </shape> </envelope> <display support="WhiteVis" sens_env="SeeThrough" sens="GrayVis" deadsensor="GreenVis" - pcb="GreenVis" asic="YellowVis"/> + pcb="GreenVis" asic="YellowVis" dead="BlackVis"/> <type_flags type="DetType_TRACKER + DetType_ENDCAP + DetType_STRIP "/> <global sensitive_mat="G4_Si" support_mat="G4_C" sensitive_threshold_KeV="64*keV"/> - <support thickness="OTKEndCap_support_thickness" inner_radius="OTKEndCap_inner_radius" outer_radius="OTKEndCap_outer_radius" mat="CarbonFiber"/> + <support thickness="OTKEndCap_support_thickness" inner_radius="OTKEndCap_inner_radius" outer_radius="OTKEndCap_outer_radius" mat="CarbonFiber" dead_mat="epoxy"/> <layer id="0" thickness="OTKEndCap_layer_thickness" zpos="OTKEndCap_layer0_zpos"> <sensor gap="OTKEndCap_sensor_gap" thickness="OTKEndCap_sensor_thickness" dead_width="OTKEndCap_sensor_dead_width" mat="G4_Si"/> <pcb thickness="OTKEndCap_pcb_thickness" rlength="OTKEndCap_pcb_rlength" rgap="OTKEndCap_pcb_rgap" mat="epoxy"/> diff --git a/Detector/DetCRD/compact/TDR_o1_v01/TDR_Dimensions_v01_01.xml b/Detector/DetCRD/compact/TDR_o1_v01/TDR_Dimensions_v01_01.xml index 0328be805afed9aaeec463dd3858fbde41bf63b3..ff4d5f9c8eb60772433f932a22a564eac2011957 100644 --- a/Detector/DetCRD/compact/TDR_o1_v01/TDR_Dimensions_v01_01.xml +++ b/Detector/DetCRD/compact/TDR_o1_v01/TDR_Dimensions_v01_01.xml @@ -341,6 +341,9 @@ <limit name="ekin_min" particles="*" value="10" unit="MeV" /> <limit name="range_min" particles="*" value="10.0" unit="mm" /> </limitset> + <limitset name="otk_limits"> + <limit name="step_length_max" particles="*" value="50" unit="um" /> + </limitset> </limits> <regions> diff --git a/Detector/DetCRD/src/Tracker/SiTracker_otkbarrel_v01_geo.cpp b/Detector/DetCRD/src/Tracker/SiTracker_otkbarrel_v01_geo.cpp index fa01e81a7f7a23d9a2483bebfb19af5c65a58175..b1f5ed127561eb6304c627a13ac5c58e58340433 100644 --- a/Detector/DetCRD/src/Tracker/SiTracker_otkbarrel_v01_geo.cpp +++ b/Detector/DetCRD/src/Tracker/SiTracker_otkbarrel_v01_geo.cpp @@ -343,7 +343,7 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& theDetector, xml_h e, dd4h volSurfaceList(sensorDE)->push_back(surfSens); // std::cout << "\t" << sensor_str.str() << " done." << endl; } - Transform3D tr (RotationZYX(ladder_dphi*(i+rot),0.,0.),Position(ladder_radius*cos(ladder_phi0+ladder_dphi*(i+rot)), ladder_radius*sin(ladder_phi0+ladder_dphi*(i+rot)), 0.)); + Transform3D tr (RotationZYX(ladder_dphi*(i+rot)+dd4hep::twopi/2,0.,0.),Position(ladder_radius*cos(ladder_phi0+ladder_dphi*(i+rot)), ladder_radius*sin(ladder_phi0+ladder_dphi*(i+rot)), 0.)); pv = layer_assembly.placeVolume(LadderLogical,tr); pv.addPhysVolID("module", i ) ; ladderDE.setPlacement(pv); diff --git a/Detector/DetCRD/src/Tracker/SiTracker_otkendcap_v01_geo.cpp b/Detector/DetCRD/src/Tracker/SiTracker_otkendcap_v01_geo.cpp index ab3c96ff3722aa6d65794c2f242879be5ba6ae84..720675f77d9a4659274b0edf5308a84f9b5e004f 100644 --- a/Detector/DetCRD/src/Tracker/SiTracker_otkendcap_v01_geo.cpp +++ b/Detector/DetCRD/src/Tracker/SiTracker_otkendcap_v01_geo.cpp @@ -58,6 +58,8 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& theDetector, xml_h e, dd4h const double total_length = theDetector.constant<double>("OTKEndCap_half_length")*2.; const int total_sections = theDetector.constant<int>("OTKEndCap_total_sections"); const double deg = theDetector.constant<double>("OTKEndCap_piece_deg")*dd4hep::degree; + const double dead_deg = theDetector.constant<double>("OTKEndCap_dead_deg")*dd4hep::degree; + const double dead_thickness = theDetector.constant<double>("OTKEndCap_dead_thickness"); const double piece_number = theDetector.constant<double>("OTKEndCap_piece_num"); const double deg_interval = 360 / piece_number * dd4hep::degree; const double r0 = theDetector.constant<double>("OTKEndCap_r0"); @@ -97,8 +99,10 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& theDetector, xml_h e, dd4h std::cout << "total_length: " << total_length/mm << "mm" << std::endl; std::cout << "total_sections: " << total_sections << std::endl; std::cout << "deg: " << deg/dd4hep::degree << "deg" << std::endl; + std::cout << "dead_deg: " << dead_deg/dd4hep::degree << "deg" << std::endl; + std::cout << "dead_thickness" << dead_thickness/mm << "mm" << std::endl; std::cout << "piece_number: " << piece_number << std::endl; - std::cout << "deg interval: " << deg_interval/dd4hep::degree << "deg" << std::endl; + std::cout << "deg interval: " << deg_interval/dd4hep::degree << "deg" << std::endl; std::cout << "r0: " << r0/mm << "mm" << std::endl; std::cout << "r1: " << r1/mm << "mm" << std::endl; std::cout << "r2: " << r2/mm << "mm" << std::endl; @@ -171,6 +175,7 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& theDetector, xml_h e, dd4h std::string deadsensVis = x_display.attr<string>(_Unicode(deadsensor)); std::string pcbVis = x_display.attr<string>(_Unicode(pcb)); std::string asicVis = x_display.attr<string>(_Unicode(asic)); + std::string deadVis = x_display.attr<string>(_Unicode(dead)); //fetch the support parameters xml_comp_t x_support(x_det.child(_Unicode(support))); @@ -178,6 +183,7 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& theDetector, xml_h e, dd4h double support_inner_radius = x_support.attr<double>(_Unicode(inner_radius)); double support_outer_radius = x_support.attr<double>(_Unicode(outer_radius)); Material support_mat = theDetector.material(x_support.attr<string>(_Unicode(mat))); + Material dead_mat = theDetector.material(x_support.attr<string>(_Unicode(dead_mat))); std::cout << "support_thickness: " << support_thickness/mm << " mm" << std::endl; std::cout << "support_inner_radius: " << support_inner_radius/mm << " mm" << std::endl; std::cout << "support_outer_radius: " << support_outer_radius/mm << " mm" << std::endl; @@ -243,7 +249,7 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& theDetector, xml_h e, dd4h outer_radius, layer_thickness / 2.0, 0., - deg); + deg+dead_deg); Volume PieceEnvLogical( name + dd4hep::_toString(layer_id, "_PieceEnvLogical_%02d"), PieceEnvSolid, air); @@ -253,7 +259,7 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& theDetector, xml_h e, dd4h support_outer_radius, support_thickness / 2.0, 0., - deg); + deg+dead_deg); Volume SupportLogical( name + dd4hep::_toString(layer_id, "_SupportLogical_%02d"), SupportSolid, support_mat); @@ -261,6 +267,18 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& theDetector, xml_h e, dd4h SupportLogical.setVisAttributes(theDetector.visAttributes(supportVis)); pv = PieceEnvLogical.placeVolume(SupportLogical, Position(0, 0, (-layer_thickness + support_thickness) / 2.0)); + //create and place electronic logical volume + dd4hep::Tube ElectronicSolid( support_inner_radius, + support_outer_radius, + dead_thickness / 2.0, + deg, + deg + dead_deg); + Volume ElectronicLogical( name + dd4hep::_toString(layer_id, "_ElectronicLogical_%02d"), + ElectronicSolid, + dead_mat); + ElectronicLogical.setVisAttributes(theDetector.visAttributes(deadVis)); + pv = PieceEnvLogical.placeVolume(ElectronicLogical, Position(0, 0, (-layer_thickness + support_thickness*2 + dead_thickness) / 2.0)); + //create sensor envelope logical volume dd4hep::Tube SensorEnvSolid( inner_radius, outer_radius, @@ -326,6 +344,22 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& theDetector, xml_h e, dd4h Volume DeadSensorLogicalB( name + dd4hep::_toString(layer_id, "_DeadSensorLogicalB_%02d_") + std::to_string(i), DeadSensorSolidB, sensor_mat); + dd4hep::Tube DeadSensorSolidC( ring_inner_radius - sensor_dead_gap, + ring_inner_radius, + sensor_thickness/2.0, + 0., + deg); + Volume DeadSensorLogicalC( name + dd4hep::_toString(layer_id, "_DeadSensorLogicalC_%02d_") + std::to_string(i), + DeadSensorSolidC, + sensor_mat); + dd4hep::Tube DeadSensorSolidD( ring_outer_radius, + ring_outer_radius + sensor_dead_gap, + sensor_thickness/2.0, + 0., + deg); + Volume DeadSensorLogicalD( name + dd4hep::_toString(layer_id, "_DeadSensorLogicalD_%02d_") + std::to_string(i), + DeadSensorSolidD, + sensor_mat); SensorLogical.setSensitiveDetector(sens); SensorLogical.setVisAttributes(theDetector.visAttributes(sensVis)); @@ -338,11 +372,15 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& theDetector, xml_h e, dd4h sensor_surf.push_back(surfsens); DeadSensorLogicalA.setVisAttributes(theDetector.visAttributes(deadsensVis)); DeadSensorLogicalB.setVisAttributes(theDetector.visAttributes(deadsensVis)); + DeadSensorLogicalC.setVisAttributes(theDetector.visAttributes(deadsensVis)); + DeadSensorLogicalD.setVisAttributes(theDetector.visAttributes(deadsensVis)); pv = SensorEnvLogical.placeVolume(SensorLogical, Position(0, 0, -(pcb_thickness + asic_thickness) / 2.0)); pv.addPhysVolID("layer", layer_id).addPhysVolID("active", 0).addPhysVolID("sensor", i); sensor_pv.push_back(pv); pv = SensorEnvLogical.placeVolume(DeadSensorLogicalA, Position(0, 0, -(pcb_thickness + asic_thickness) / 2.0)); pv = SensorEnvLogical.placeVolume(DeadSensorLogicalB, Position(0, 0, -(pcb_thickness + asic_thickness) / 2.0)); + pv = SensorEnvLogical.placeVolume(DeadSensorLogicalC, Position(0, 0, -(pcb_thickness + asic_thickness) / 2.0)); + pv = SensorEnvLogical.placeVolume(DeadSensorLogicalD, Position(0, 0, -(pcb_thickness + asic_thickness) / 2.0)); if(ring_module_number==2){ dd4hep::Tube SensorSolid( ring_inner_radius,