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 b353a49e6d2c919df1298d1285e9108af1d375a9..9bc5cbbc7e0689e3356326e85583ef2dd48feb43 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 @@ -118,9 +118,9 @@ <!-- Parameters of time of flight tracker --> <constant name="OTKBarrel_inner_radius" value="1800*mm"/> <constant name="OTKBarrel_outer_radius" value="1860*mm"/> - <constant name="OTKBarrel_half_length" value="TPC_half_length"/> - <constant name="OTKBarrelLayer1_half_length" value="TPC_half_length"/> - <constant name="OTKBarrelLayer2_half_length" value="TPC_half_length"/> + <constant name="OTKBarrel_half_length" value="2940*mm"/> + <constant name="OTKBarrelLayer1_half_length" value="OTKBarrel_half_length"/> + <constant name="OTKBarrelLayer2_half_length" value="OTKBarrel_half_length"/> <constant name="OTKBarrel1_inner_radius" value="1825*mm"/> <constant name="OTKBarrel2_inner_radius" value="1845*mm"/> diff --git a/Detector/DetCRD/src/Tracker/SiTracker_otkbarrel_v01_geo.cpp b/Detector/DetCRD/src/Tracker/SiTracker_otkbarrel_v01_geo.cpp index 0f55e8efac34243f0edd9eba435b1d438930dbe4..fa01e81a7f7a23d9a2483bebfb19af5c65a58175 100644 --- a/Detector/DetCRD/src/Tracker/SiTracker_otkbarrel_v01_geo.cpp +++ b/Detector/DetCRD/src/Tracker/SiTracker_otkbarrel_v01_geo.cpp @@ -165,6 +165,7 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& theDetector, xml_h e, dd4h double pcb_width = x_other.attr<double>(_Unicode(pcb_width)); double pcb_length = x_other.attr<double>(_Unicode(pcb_length)); double pcb_zgap = x_other.attr<double>(_Unicode(pcb_zgap)); + double port_pcb_width = x_other.attr<double>(_Unicode(port_pcb_width)); double asic_thickness = x_other.attr<double>(_Unicode(asic_thickness)); double asic_width = x_other.attr<double>(_Unicode(asic_width)); double asic_length = x_other.attr<double>(_Unicode(asic_length)); @@ -176,6 +177,7 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& theDetector, xml_h e, dd4h std::cout << "pcb_width: " << pcb_width/mm << " mm" << endl; std::cout << "pcb_length: " << pcb_length/mm << " mm" << endl; std::cout << "pcb_zgap: " << pcb_zgap/mm << " mm" << endl; + std::cout << "port_pcb_width: " << port_pcb_width/mm << " mm" << endl; std::cout << "asic_thickness: " << asic_thickness/mm << " mm" << endl; std::cout << "asic_width: " << asic_width/mm << " mm" << endl; std::cout << "asic_length: " << asic_length/mm << " mm" << endl; std::cout << "asic_zgap: " << asic_zgap/mm << " mm" << endl; @@ -256,6 +258,10 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& theDetector, xml_h e, dd4h Volume PcbLogical(name + dd4hep::_toString( layer_id, "_PcbLogical_%02d"), PcbSolid, pcb_mat); PcbLogical.setVisAttributes(theDetector.visAttributes(pcbVis)); + Box PortPcbSolid(pcb_thickness / 2.0, port_pcb_width / 2.0, sensor_length / 2.0); + Volume PortPcbLogical(name + dd4hep::_toString( layer_id, "_PortPcbLogical_%02d"), PortPcbSolid, pcb_mat); + PortPcbLogical.setVisAttributes(theDetector.visAttributes(pcbVis)); + //create asic sensor logical volume Box AsicSolid(asic_thickness / 2.0, asic_width / 2.0, asic_length / 2.0); Volume AsicLogical(name + dd4hep::_toString( layer_id, "_AsicLogical_%02d"), AsicSolid, asic_mat); @@ -267,12 +273,14 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& theDetector, xml_h e, dd4h double sensor_total_z = n_sensors_per_side*sensor_length + dead_gap*n_sensors_per_side; double sensor_xpos = -(pcb_thickness+asic_thickness)/2.0; double sensor_ypos_active = (sensor_total_width-sensor_active_width)/2.0; - double sensor_ypos_dead = (-sensor_total_width+sensor_dead_width)/ 2.0; + double sensor_ypos_dead = (sensor_total_width-sensor_active_width*2-sensor_dead_width)/ 2.0; double sensor_zpos = -sensor_total_z/2.0 + (sensor_length + dead_gap)/2.0 + isensor*(sensor_length + dead_gap); double pcb_xpos = (sensor_thickness-asic_thickness)/2.0; - double pcb_ypos = sensor_ypos_active; + double pcb_ypos = -(sensor_total_width-port_pcb_width*2-pcb_width)/2.0; double pcb_zpos_0 = sensor_zpos-(sensor_length/2.0-pcb_zgap-pcb_length/2.0); double pcb_zpos_1 = sensor_zpos+(sensor_length/2.0-pcb_zgap-pcb_length/2.0); + double port_pcb_ypos = -(sensor_total_width-port_pcb_width)/2.0; + double port_pcb_zpos = sensor_zpos; double asic_xpos = (sensor_thickness+pcb_thickness)/2.0; double asic_ypos = pcb_ypos; double asic_zpos_0 = sensor_zpos-(sensor_length/2.0-asic_zgap-asic_length/2.0); @@ -283,6 +291,7 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& theDetector, xml_h e, dd4h pv = SensorEnvelopeLogical.placeVolume(SensorDeadLogical, Position(sensor_xpos,sensor_ypos_dead,sensor_zpos)); pv = SensorEnvelopeLogical.placeVolume(PcbLogical, Position(pcb_xpos,pcb_ypos,pcb_zpos_0)); pv = SensorEnvelopeLogical.placeVolume(PcbLogical, Position(pcb_xpos,pcb_ypos,pcb_zpos_1)); + pv = SensorEnvelopeLogical.placeVolume(PortPcbLogical, Position(pcb_xpos,port_pcb_ypos,port_pcb_zpos)); pv = SensorEnvelopeLogical.placeVolume(AsicLogical, Position(asic_xpos,asic_ypos,asic_zpos_0)); pv = SensorEnvelopeLogical.placeVolume(AsicLogical, Position(asic_xpos,asic_ypos,asic_zpos_1)); } diff --git a/Detector/DetCRD/src/Tracker/SiTracker_otkendcap_v01_geo.cpp b/Detector/DetCRD/src/Tracker/SiTracker_otkendcap_v01_geo.cpp index 4c4e61611664f359c2712178bbf2a0e51fe218b3..ab3c96ff3722aa6d65794c2f242879be5ba6ae84 100644 --- a/Detector/DetCRD/src/Tracker/SiTracker_otkendcap_v01_geo.cpp +++ b/Detector/DetCRD/src/Tracker/SiTracker_otkendcap_v01_geo.cpp @@ -53,7 +53,7 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& theDetector, xml_h e, dd4h //*****************************************************************// //fetch the geometry parameters - const double inner_radius = theDetector.constant<double>("OTKEndCapBarrel_inner_radius"); + const double inner_radius = theDetector.constant<double>("OTKEndCap_inner_radius"); const double outer_radius = theDetector.constant<double>("OTKEndCap_outer_radius"); const double total_length = theDetector.constant<double>("OTKEndCap_half_length")*2.; const int total_sections = theDetector.constant<int>("OTKEndCap_total_sections"); @@ -455,7 +455,10 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& theDetector, xml_h e, dd4h //create the meassurement surface // int sensor_num = std::accumulate(module_num_v.begin(), module_num_v.end(), 0); - int sensor_num = 15; + int sensor_num = 0; + for(int iring=0;iring<10;iring++){ + sensor_num = sensor_num + module_num[iring]; + } for(int isensor=0;isensor<sensor_num;++isensor){ std::stringstream sensor_str; sensor_str << piece_enum.str() << "_" << isensor;