diff --git a/Detector/DetCRD/compact/CRD_common_v01/DC_Simple_v01_01.xml b/Detector/DetCRD/compact/CRD_common_v01/DC_Simple_v01_01.xml index 59898fe5decabe2aee36fc74294d5dfe3a6b63eb..fef7af292b75be168026be014b269abae0db6608 100644 --- a/Detector/DetCRD/compact/CRD_common_v01/DC_Simple_v01_01.xml +++ b/Detector/DetCRD/compact/CRD_common_v01/DC_Simple_v01_01.xml @@ -47,6 +47,8 @@ <constant name="DC_inner_chamber_enabled" value="1"/> <constant name="DC_outer_chamber_enabled" value="1"/> + <constant name="Salf_distance" value="0.02*mm"/> + </define> <detectors> diff --git a/Detector/DetDriftChamber/compact/det.xml b/Detector/DetDriftChamber/compact/det.xml index 3a33224601c201847e452dff7c36538fcef1c269..b13e239e856c8d417d9fd07003fb69da6801b8cf 100644 --- a/Detector/DetDriftChamber/compact/det.xml +++ b/Detector/DetDriftChamber/compact/det.xml @@ -63,6 +63,8 @@ <constant name="DC_inner_chamber_enabled" value="1"/> <constant name="DC_outer_chamber_enabled" value="1"/> + <constant name="Salf_distance" value="0.02*mm"/> + </define> <display> diff --git a/Detector/DetDriftChamber/src/driftchamber/DriftChamber.cpp b/Detector/DetDriftChamber/src/driftchamber/DriftChamber.cpp index 6894e6a4eb591895dc97dcc3108edc1456ae6122..b6227597c2a6e562751432e205acd3b8a2a26542 100644 --- a/Detector/DetDriftChamber/src/driftchamber/DriftChamber.cpp +++ b/Detector/DetDriftChamber/src/driftchamber/DriftChamber.cpp @@ -41,9 +41,9 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, dd4hep::SensitiveDetector sd = sens; // - global - double chamber_radius_min = theDetector.constant<double>("SDT_radius_min"); - double chamber_radius_max = theDetector.constant<double>("SDT_radius_max"); - double chamber_length = theDetector.constant<double>("SDT_length"); +// double chamber_radius_min = theDetector.constant<double>("SDT_radius_min"); +// double chamber_radius_max = theDetector.constant<double>("SDT_radius_max"); + double chamber_length = theDetector.constant<double>("DC_length"); // - inner chamber double inner_chamber_radius_min = theDetector.constant<double>("SDT_inner_chamber_radius_min"); @@ -66,6 +66,9 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, int inner_chamber_enabled = theDetector.constant<int>("DC_inner_chamber_enabled"); int outer_chamber_enabled = theDetector.constant<int>("DC_outer_chamber_enabled"); + // - salf distance + double salf_diatance = theDetector.constant<double>("Salf_distance"); + // ======================================================================= // Detector Construction // ======================================================================= @@ -210,7 +213,7 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, dd4hep::PlacedVolume module_phy = layer_vol.placeVolume(module_vol,transform_module); // - Field wire dd4hep::PlacedVolume Module_phy; - double radius[9] = {rmid-chamber_layer_width*0.5,rmid-chamber_layer_width*0.5,rmid-chamber_layer_width*0.5,rmid-chamber_layer_width*0.5,rmid,rmid+chamber_layer_width*0.5,rmid+chamber_layer_width*0.5,rmid+chamber_layer_width*0.5,rmid+chamber_layer_width*0.5}; + double radius[9] = {rmid-chamber_layer_width*0.5+salf_diatance,rmid-chamber_layer_width*0.5+salf_diatance,rmid-chamber_layer_width*0.5+salf_diatance,rmid-chamber_layer_width*0.5+salf_diatance,rmid,rmid+chamber_layer_width*0.5-salf_diatance,rmid+chamber_layer_width*0.5-salf_diatance,rmid+chamber_layer_width*0.5-salf_diatance,rmid+chamber_layer_width*0.5-salf_diatance}; double phi[9] = {wire_phi+layer_Phi*0.25,wire_phi,wire_phi-layer_Phi*0.25,wire_phi-layer_Phi*0.5,wire_phi-layer_Phi*0.5,wire_phi-layer_Phi*0.5,wire_phi-layer_Phi*0.25,wire_phi,wire_phi+layer_Phi*0.25}; int num = 5; if(layer_id==(inner_chamber_layer_number-1)||layer_id==(outer_chamber_layer_number-1)) { num = 9; } @@ -255,12 +258,12 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, dd4hep::Position(0,0,0)); dd4hep::PlacedVolume phv = envelope.placeVolume(det_vol,transform); // - place wall -// dd4hep::PlacedVolume wall_phy; + dd4hep::PlacedVolume wall_phy; for(int i=0; i<4; i++) { dd4hep::Tube wall_solid(wall_rmin[i],wall_rmax[i],chamber_length*0.5); dd4hep::Volume wall_vol(det_name+"_wall_vol",wall_solid,wall_mat); wall_vol.setVisAttributes(theDetector,"VisibleGreen"); - dd4hep::PlacedVolume wall_phy = envelope.placeVolume(wall_vol,transform); + wall_phy = envelope.placeVolume(wall_vol,transform); } // - place Endcap @@ -282,4 +285,4 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, } -DECLARE_DETELEMENT(DriftChamber, create_detector); +DECLARE_DETELEMENT(DriftChamber, create_detector)