From 279d605717fdeb08c956ff29d1a37088bf8cd7d5 Mon Sep 17 00:00:00 2001 From: Fangyi Guo <guofangyi@ihep.ac.cn> Date: Mon, 3 Mar 2025 13:22:15 +0800 Subject: [PATCH] Minor: mute printout info in geometry construction --- .../src/calorimeter/SHcalSc04_Barrel_v04.cpp | 2 +- ...ystalBarBarrelCalorimeter32Polygon_v01.cpp | 70 ++++++++--------- ...ystalBarBarrelCalorimeter32Polygon_v02.cpp | 76 +++++++++---------- .../LongCrystalBarEndcapCalorimeter_v03.cpp | 38 +++++----- .../LongCrystalBarEndcapCalorimeter_v04.cpp | 38 +++++----- .../src/Calorimeter/Lumical_v01_geo.cpp | 4 +- .../src/Other/Lumical_v01_geo_beampipe.cpp | 4 +- .../Tracker/SiTracker_otkbarrel_v01_geo.cpp | 70 ++++++++--------- 8 files changed, 151 insertions(+), 151 deletions(-) diff --git a/Detector/DetCEPCv4/src/calorimeter/SHcalSc04_Barrel_v04.cpp b/Detector/DetCEPCv4/src/calorimeter/SHcalSc04_Barrel_v04.cpp index 52396b76..4c23cbc5 100644 --- a/Detector/DetCEPCv4/src/calorimeter/SHcalSc04_Barrel_v04.cpp +++ b/Detector/DetCEPCv4/src/calorimeter/SHcalSc04_Barrel_v04.cpp @@ -539,7 +539,7 @@ static Ref_t create_detector(Detector &theDetector, xml_h element, SensitiveDete cell_x_offset -= total_cell_size_abnormal / 2.; } } - printf("layerID: %2d, x_length: %3.3lf, x_cell: %3.3lf, x_cell_abnormal: %3.3lf, x_dead: %3.3lf, z_length: %3.3lf,z_cell: %3.3lf, z_dead: %3.3lf,\n", layer_id, 2 * x_halflength, n_x * total_cell_size, nx_abnormal * total_cell_size_abnormal, 2 * x_halflength - n_x * total_cell_size - nx_abnormal * total_cell_size_abnormal, 2 * z_halfwidth, n_z * total_cell_size, 2 * z_halfwidth - n_z * total_cell_size); + //printf("layerID: %2d, x_length: %3.3lf, x_cell: %3.3lf, x_cell_abnormal: %3.3lf, x_dead: %3.3lf, z_length: %3.3lf,z_cell: %3.3lf, z_dead: %3.3lf,\n", layer_id, 2 * x_halflength, n_x * total_cell_size, nx_abnormal * total_cell_size_abnormal, 2 * x_halflength - n_x * total_cell_size - nx_abnormal * total_cell_size_abnormal, 2 * z_halfwidth, n_z * total_cell_size, 2 * z_halfwidth - n_z * total_cell_size); // Reset counters to measure "outside" quantitites nRadiationLengths = 0.; nInteractionLengths = 0.; diff --git a/Detector/DetCRD/src/Calorimeter/LongCrystalBarBarrelCalorimeter32Polygon_v01.cpp b/Detector/DetCRD/src/Calorimeter/LongCrystalBarBarrelCalorimeter32Polygon_v01.cpp index cd884987..cd660571 100755 --- a/Detector/DetCRD/src/Calorimeter/LongCrystalBarBarrelCalorimeter32Polygon_v01.cpp +++ b/Detector/DetCRD/src/Calorimeter/LongCrystalBarBarrelCalorimeter32Polygon_v01.cpp @@ -208,32 +208,32 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, // ### Print Volume ### // #################### - std::cout << "dim_x1" << " : " << dim_x1*2 << std::endl; - std::cout << "dim_x2" << " : " << dim_x2*2 << std::endl; - std::cout << "dim_x3" << " : " << dim_x3*2 << std::endl; - std::cout << "dim_x4" << " : " << dim_x4*2 << std::endl; - std::cout << "depth_longitudinal_p" << " : " << depth_longitudinal_p << std::endl; - std::cout << "depth_longitudinal_n" << " : " << depth_longitudinal_n << std::endl; + //std::cout << "dim_x1" << " : " << dim_x1*2 << std::endl; + //std::cout << "dim_x2" << " : " << dim_x2*2 << std::endl; + //std::cout << "dim_x3" << " : " << dim_x3*2 << std::endl; + //std::cout << "dim_x4" << " : " << dim_x4*2 << std::endl; + //std::cout << "depth_longitudinal_p" << " : " << depth_longitudinal_p << std::endl; + //std::cout << "depth_longitudinal_n" << " : " << depth_longitudinal_n << std::endl; - std::cout << "radius outer" << " : " << sqrt((radius_inner+depth_longitudinal_n)*(radius_inner+depth_longitudinal_n)+dim_x4*dim_x4) << std::endl; - std::cout << "radius outer" << " : " << sqrt((radius_inner+height_layer1+depth_longitudinal_p)*(radius_inner+height_layer1+depth_longitudinal_p)+dim_x2*dim_x2) << std::endl; + //std::cout << "radius outer" << " : " << sqrt((radius_inner+depth_longitudinal_n)*(radius_inner+depth_longitudinal_n)+dim_x4*dim_x4) << std::endl; + //std::cout << "radius outer" << " : " << sqrt((radius_inner+height_layer1+depth_longitudinal_p)*(radius_inner+height_layer1+depth_longitudinal_p)+dim_x2*dim_x2) << std::endl; - std::cout << "size_crystal" << " : " << size_crystal << std::endl; - std::cout << "size_posi_crystal" << " : " << size_posi_crystal << std::endl; + //std::cout << "size_crystal" << " : " << size_crystal << std::endl; + //std::cout << "size_posi_crystal" << " : " << size_posi_crystal << std::endl; - std::cout << "dead_material_p" << " : " << dead_material_p << std::endl; - std::cout << "dead_material_plus" << " : " << size_posi_crystal*tan(alice_angle) << std::endl; + //std::cout << "dead_material_p" << " : " << dead_material_p << std::endl; + //std::cout << "dead_material_plus" << " : " << size_posi_crystal*tan(alice_angle) << std::endl; - std::cout << "dead_material_n" << " : " << dead_material_n << std::endl; - std::cout << "dead_material_minus" << " : " << size_crystal/tan(copper_angle) << std::endl; + //std::cout << "dead_material_n" << " : " << dead_material_n << std::endl; + //std::cout << "dead_material_minus" << " : " << size_crystal/tan(copper_angle) << std::endl; - std::cout << "area_1" << " : " << dead_material_p*2*size_posi_crystal << std::endl; - std::cout << "area_2" << " : " << (dead_material_p+dead_material_p+size_posi_crystal*tan(alice_angle))*size_posi_crystal << std::endl; - std::cout << "area_3" << " : " << (dead_material_p+dead_material_p+2*size_posi_crystal*tan(alice_angle))*size_posi_crystal << std::endl; + //std::cout << "area_1" << " : " << dead_material_p*2*size_posi_crystal << std::endl; + //std::cout << "area_2" << " : " << (dead_material_p+dead_material_p+size_posi_crystal*tan(alice_angle))*size_posi_crystal << std::endl; + //std::cout << "area_3" << " : " << (dead_material_p+dead_material_p+2*size_posi_crystal*tan(alice_angle))*size_posi_crystal << std::endl; - std::cout << "area_4" << " : " << dead_material_n*2*size_crystal << std::endl; - std::cout << "area_5" << " : " << (dead_material_n+dead_material_n+size_crystal/tan(copper_angle))*size_crystal << std::endl; - std::cout << "area_6" << " : " << (dead_material_n+dead_material_n+2*size_crystal/tan(copper_angle))*size_crystal << std::endl; + //std::cout << "area_4" << " : " << dead_material_n*2*size_crystal << std::endl; + //std::cout << "area_5" << " : " << (dead_material_n+dead_material_n+size_crystal/tan(copper_angle))*size_crystal << std::endl; + //std::cout << "area_6" << " : " << (dead_material_n+dead_material_n+2*size_crystal/tan(copper_angle))*size_crystal << std::endl; double area_posi = (2*dim_x1+2*dim_x2)*depth_longitudinal_p/2; double area_nega = (2*dim_x3+2*dim_x4)*depth_longitudinal_n/2; @@ -246,12 +246,12 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, double area_5 = (dead_material_n+dead_material_n+size_crystal/tan(copper_angle))*size_crystal; double area_6 = (dead_material_n+dead_material_n+2*size_crystal/tan(copper_angle))*size_crystal; - std::cout << "area_1_ratio" << " : " << (area_1+area_4)*2*14/(area_posi+area_nega) << std::endl; - std::cout << "area_2_ratio" << " : " << (area_2+area_5)*2*14/(area_posi+area_nega) << std::endl; - std::cout << "area_3_ratio" << " : " << (area_3+area_6)*2*14/(area_posi+area_nega) << std::endl; + //std::cout << "area_1_ratio" << " : " << (area_1+area_4)*2*14/(area_posi+area_nega) << std::endl; + //std::cout << "area_2_ratio" << " : " << (area_2+area_5)*2*14/(area_posi+area_nega) << std::endl; + //std::cout << "area_3_ratio" << " : " << (area_3+area_6)*2*14/(area_posi+area_nega) << std::endl; - std::cout << "pZ" << " : " << pZ << std::endl; - std::cout << "Nbar_phi" << " : " << Nbar_phi << std::endl; + //std::cout << "pZ" << " : " << pZ << std::endl; + //std::cout << "Nbar_phi" << " : " << Nbar_phi << std::endl; // #################################### // ### placement of all the volumes ### @@ -408,7 +408,7 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, Tot_Phi = Tot_Phi + Nbar_phi; Tot_length_Phi_posi = Tot_length_Phi_posi + (length_posi-photoelectronic-crystal_wrapping)*2*(size_posi_crystal*0.5-crystal_wrapping)*2*(length_crystal_z-crystal_wrapping*2*Nbar_phi); - cout<<"length_crystal_phi "<<(dim_x1 - dead_material_l-photoelectronic-crystal_wrapping)*2 <<" "<<size_posi_crystal*tan(alice_angle)*2<<endl; + //cout<<"length_crystal_phi "<<(dim_x1 - dead_material_l-photoelectronic-crystal_wrapping)*2 <<" "<<size_posi_crystal*tan(alice_angle)*2<<endl; dd4hep::Volume sipm_s0("sipm_s0", dd4hep::Box(photoelectronic/2, photoelectronic_width/2, photoelectronic_width/2), mat_Si); sipm_s0.setVisAttributes(theDetector, "BlueVis"); @@ -568,8 +568,8 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, Tot_Z = Tot_Z + 2*Nbar_z+1; Tot_length_Z_posi = Tot_length_Z_posi + (2*length_posi-(2*Nbar_z+1)*crystal_wrapping*2)*(length_crystal_z/2-photoelectronic-crystal_wrapping)*2*(size_posi_crystal*0.5-crystal_wrapping)*2; - cout<<"layer: "<< ilayer+1 <<" Nbar_z: "<< 2*Nbar_z+1 <<endl; - cout<<"length_crystal_z "<<(length_crystal_z/2-photoelectronic-crystal_wrapping)*2 <<endl; + //cout<<"layer: "<< ilayer+1 <<" Nbar_z: "<< 2*Nbar_z+1 <<endl; + //cout<<"length_crystal_z "<<(length_crystal_z/2-photoelectronic-crystal_wrapping)*2 <<endl; dd4hep::Volume sipm_s0("sipm_s0", dd4hep::Box(photoelectronic_width/2, photoelectronic/2, photoelectronic_width/2), mat_Si); sipm_s0.setVisAttributes(theDetector, "BlueVis"); @@ -723,7 +723,7 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, dd4hep::PlacedVolume plv = subtrap_positive_vol.placeVolume(block, Position(0, 0, 0.5*size_posi_crystal+ilayer*size_posi_crystal-dim_z_p)); plv.addPhysVolID("dlayer", floor(ilayer/2+1)); - cout<<"*****layer: "<<floor(ilayer/2+1)<<endl; + //cout<<"*****layer: "<<floor(ilayer/2+1)<<endl; sd.setPlacement(plv); } @@ -861,7 +861,7 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, Tot_Phi = Tot_Phi + Nbar_phi; Tot_length_Phi_nega = Tot_length_Phi_nega + (length_nega-photoelectronic-crystal_wrapping)*2*(length_crystal_z-Nbar_phi*crystal_wrapping*2)*(size_crystal*0.5-crystal_wrapping)*2; - cout<<"length_crystal_phi "<<(dim_x3 - dead_material_r-photoelectronic-crystal_wrapping)*2 <<" "<<size_crystal/tan(copper_angle)*2<<endl; + //cout<<"length_crystal_phi "<<(dim_x3 - dead_material_r-photoelectronic-crystal_wrapping)*2 <<" "<<size_crystal/tan(copper_angle)*2<<endl; dd4hep::Volume sipm_s0("sipm_s0", dd4hep::Box(photoelectronic/2, photoelectronic_width/2, photoelectronic_width/2), mat_Si); sipm_s0.setVisAttributes(theDetector, "BlueVis"); @@ -1022,8 +1022,8 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, Tot_Z = Tot_Z + 2*Nbar_z+1; Tot_length_Z_nega = Tot_length_Z_nega + (2*length_nega-(2*Nbar_z+1)*crystal_wrapping*2)*(size_crystal*0.5-crystal_wrapping)*2*(length_crystal_z/2-photoelectronic-crystal_wrapping)*2; - cout<<"layer: "<< ilayer+1 <<" Nbar_z: "<< 2*Nbar_z+1 <<endl; - cout<<"length_crystal_z "<<(length_crystal_z/2-photoelectronic-crystal_wrapping)*2 <<endl; + //cout<<"layer: "<< ilayer+1 <<" Nbar_z: "<< 2*Nbar_z+1 <<endl; + //cout<<"length_crystal_z "<<(length_crystal_z/2-photoelectronic-crystal_wrapping)*2 <<endl; dd4hep::Volume sipm_s0("sipm_s0", dd4hep::Box(photoelectronic_width/2, photoelectronic/2, photoelectronic_width/2), mat_Si); sipm_s0.setVisAttributes(theDetector, "BlueVis"); @@ -1179,13 +1179,13 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, dd4hep::PlacedVolume plv = subtrap_negative_vol.placeVolume(block, Position(0, 0, 0.5*size_crystal+ilayer*size_crystal-dim_z_n)); plv.addPhysVolID("dlayer", floor(ilayer/2+1)); - cout<<"*****layer: "<<floor(ilayer/2+1)<<endl; + //cout<<"*****layer: "<<floor(ilayer/2+1)<<endl; sd.setPlacement(plv); } - cout<<"Tot_Phi: "<<Tot_Phi<<" Tot_Z: "<<Tot_Z<<endl; - cout<<"Tot_Phi: "<<Tot_Phi*15*16<<" Tot_Z: "<<Tot_Z*15*16<<endl; + //cout<<"Tot_Phi: "<<Tot_Phi<<" Tot_Z: "<<Tot_Z<<endl; + //cout<<"Tot_Phi: "<<Tot_Phi*15*16<<" Tot_Z: "<<Tot_Z*15*16<<endl; // ########################### // ### Z modules placement ### diff --git a/Detector/DetCRD/src/Calorimeter/LongCrystalBarBarrelCalorimeter32Polygon_v02.cpp b/Detector/DetCRD/src/Calorimeter/LongCrystalBarBarrelCalorimeter32Polygon_v02.cpp index ad31d995..8d412b13 100755 --- a/Detector/DetCRD/src/Calorimeter/LongCrystalBarBarrelCalorimeter32Polygon_v02.cpp +++ b/Detector/DetCRD/src/Calorimeter/LongCrystalBarBarrelCalorimeter32Polygon_v02.cpp @@ -179,34 +179,34 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, // ### Print Volume ### // #################### - std::cout << "dim_x1" << " : " << dim_x1*2 << std::endl; - std::cout << "dim_x2" << " : " << dim_x2*2 << std::endl; - std::cout << "dim_x3" << " : " << dim_x3*2 << std::endl; - std::cout << "dim_x4" << " : " << dim_x4*2 << std::endl; - std::cout << "depth_longitudinal_p" << " : " << depth_longitudinal_p << std::endl; - std::cout << "depth_longitudinal_n" << " : " << depth_longitudinal_n << std::endl; - - std::cout << "radius outer" << " : " << sqrt((radius_inner+depth_longitudinal_n)*(radius_inner+depth_longitudinal_n)+dim_x4*dim_x4) << std::endl; - std::cout << "radius outer" << " : " << sqrt((radius_inner+height_layer1+depth_longitudinal_p)*(radius_inner+height_layer1+depth_longitudinal_p)+dim_x2*dim_x2) << std::endl; - - std::cout << "size_crystal" << " : " << size_crystal << std::endl; - std::cout << "size_posi_crystal" << " : " << size_posi_crystal << std::endl; - - std::cout << "pZ" << " : " << pZ << std::endl; - std::cout << "Nbar_phi" << " : " << Nbar_phi << std::endl; - - std::cout << "area_1" << " : " << dead_material_p*2*size_posi_crystal << std::endl; - std::cout << "area_2" << " : " << (dead_material_p+dead_material_p+size_posi_crystal*tan(alice_angle))*size_posi_crystal << std::endl; - std::cout << "area_3" << " : " << (dead_material_p+dead_material_p+2*size_posi_crystal*tan(alice_angle))*size_posi_crystal << std::endl; - - std::cout << "area_4" << " : " << dead_material_n*2*size_crystal << std::endl; - std::cout << "area_5" << " : " << (dead_material_n+dead_material_n+size_crystal/tan(copper_angle))*size_crystal << std::endl; - std::cout << "area_6" << " : " << (dead_material_n+dead_material_n+2*size_crystal/tan(copper_angle))*size_crystal << std::endl; - - std::cout << "total volume" << " : " << - ( dim_x1*2 + (dim_x1+Nlayers*size_crystal*tan(alice_angle))*2 ) * Nlayers*size_crystal /2 * pZ + - ( dim_x3*2 + (dim_x3-Nlayers*size_posi_crystal/tan(copper_angle))*2 ) * Nlayers*size_posi_crystal /2 * pZ - << std::endl; + //std::cout << "dim_x1" << " : " << dim_x1*2 << std::endl; + //std::cout << "dim_x2" << " : " << dim_x2*2 << std::endl; + //std::cout << "dim_x3" << " : " << dim_x3*2 << std::endl; + //std::cout << "dim_x4" << " : " << dim_x4*2 << std::endl; + //std::cout << "depth_longitudinal_p" << " : " << depth_longitudinal_p << std::endl; + //std::cout << "depth_longitudinal_n" << " : " << depth_longitudinal_n << std::endl; + + //std::cout << "radius outer" << " : " << sqrt((radius_inner+depth_longitudinal_n)*(radius_inner+depth_longitudinal_n)+dim_x4*dim_x4) << std::endl; + //std::cout << "radius outer" << " : " << sqrt((radius_inner+height_layer1+depth_longitudinal_p)*(radius_inner+height_layer1+depth_longitudinal_p)+dim_x2*dim_x2) << std::endl; + + //std::cout << "size_crystal" << " : " << size_crystal << std::endl; + //std::cout << "size_posi_crystal" << " : " << size_posi_crystal << std::endl; + + //std::cout << "pZ" << " : " << pZ << std::endl; + //std::cout << "Nbar_phi" << " : " << Nbar_phi << std::endl; + + //std::cout << "area_1" << " : " << dead_material_p*2*size_posi_crystal << std::endl; + //std::cout << "area_2" << " : " << (dead_material_p+dead_material_p+size_posi_crystal*tan(alice_angle))*size_posi_crystal << std::endl; + //std::cout << "area_3" << " : " << (dead_material_p+dead_material_p+2*size_posi_crystal*tan(alice_angle))*size_posi_crystal << std::endl; + + //std::cout << "area_4" << " : " << dead_material_n*2*size_crystal << std::endl; + //std::cout << "area_5" << " : " << (dead_material_n+dead_material_n+size_crystal/tan(copper_angle))*size_crystal << std::endl; + //std::cout << "area_6" << " : " << (dead_material_n+dead_material_n+2*size_crystal/tan(copper_angle))*size_crystal << std::endl; + // + //std::cout << "total volume" << " : " << + //( dim_x1*2 + (dim_x1+Nlayers*size_crystal*tan(alice_angle))*2 ) * Nlayers*size_crystal /2 * pZ + + //( dim_x3*2 + (dim_x3-Nlayers*size_posi_crystal/tan(copper_angle))*2 ) * Nlayers*size_posi_crystal /2 * pZ + //<< std::endl; // #################################### // ### placement of all the volumes ### @@ -239,8 +239,8 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, for(int ilayer=0; ilayer<Nlayers; ilayer=ilayer+1){ length_posi = dim_x1 - dead_material_l + ilayer*size_posi_crystal*tan(alice_angle); - cout<< "layer: "<< ilayer+1 << endl; - cout<< " length_posi: "<< length_posi*2 << endl; + //cout<< "layer: "<< ilayer+1 << endl; + //cout<< " length_posi: "<< length_posi*2 << endl; //Trapezoid in layer dd4hep::Volume block("block", dd4hep::Trapezoid( dim_x1+ilayer*size_posi_crystal*tan(alice_angle), dim_x1+(ilayer+1)*size_posi_crystal*tan(alice_angle), pZ/2, pZ/2, size_posi_crystal/2), air); @@ -335,7 +335,7 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, // ################################### if(ilayer%2==0){ - cout<< " Nbar_phi: " << Nbar_phi << endl; + //cout<< " Nbar_phi: " << Nbar_phi << endl; dd4hep::Volume sipm_s0("sipm_s0", dd4hep::Box(photoelectronic/2, photoelectronic_width/2, photoelectronic_width/2), mat_Si); sipm_s0.setVisAttributes(theDetector, "BlueVis"); @@ -556,7 +556,7 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, Nbar_z = int((length_posi-0.5*width_crystal)/width_crystal); last_bar = length_posi-0.5*width_crystal - (Nbar_z-1)*width_crystal; - cout<< " Nbar_z: " << 2*Nbar_z+1 << endl; + //cout<< " Nbar_z: " << 2*Nbar_z+1 << endl; dd4hep::Volume sipm_s0("sipm_s0", dd4hep::Box(photoelectronic_width/2, photoelectronic/2, photoelectronic_width/2), mat_Si); sipm_s0.setVisAttributes(theDetector, "BlueVis"); @@ -792,8 +792,8 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, length_nega = dim_x3 - dead_material_r - (ilayer+1)*size_crystal/tan(copper_angle); - cout << "layer: " << ilayer+1 << endl; - cout << " length_nega: " << length_nega*2 << endl; + //cout << "layer: " << ilayer+1 << endl; + //cout << " length_nega: " << length_nega*2 << endl; //Trapezoid in layer @@ -889,7 +889,7 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, if(ilayer%2==0){ - cout<< " Nbar_phi: " << Nbar_phi << endl; + //cout<< " Nbar_phi: " << Nbar_phi << endl; dd4hep::Volume sipm_s0("sipm_s0", dd4hep::Box(photoelectronic/2, photoelectronic_width/2, photoelectronic_width/2), mat_Si); sipm_s0.setVisAttributes(theDetector, "BlueVis"); @@ -1109,7 +1109,7 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, Nbar_z = int((length_nega-0.5*width_crystal)/width_crystal); last_bar = length_nega-0.5*width_crystal - (Nbar_z-1)*width_crystal; - cout << " Nbar_z: " << 2*Nbar_z+1 << endl; + //cout << " Nbar_z: " << 2*Nbar_z+1 << endl; dd4hep::Volume sipm_s0("sipm_s0", dd4hep::Box(photoelectronic_width/2, photoelectronic/2, photoelectronic_width/2), mat_Si); sipm_s0.setVisAttributes(theDetector, "BlueVis"); @@ -1332,8 +1332,8 @@ static dd4hep::Ref_t create_detector(dd4hep::Detector& theDetector, sd.setPlacement(plv); } - cout<<"positive volume "<< positive_volume<<endl; - cout<<"negative volume "<< negative_volume<<endl; + //cout<<"positive volume "<< positive_volume<<endl; + //cout<<"negative volume "<< negative_volume<<endl; // ########################### // ### Z modules placement ### diff --git a/Detector/DetCRD/src/Calorimeter/LongCrystalBarEndcapCalorimeter_v03.cpp b/Detector/DetCRD/src/Calorimeter/LongCrystalBarEndcapCalorimeter_v03.cpp index 1d69fea7..4fbd0588 100755 --- a/Detector/DetCRD/src/Calorimeter/LongCrystalBarEndcapCalorimeter_v03.cpp +++ b/Detector/DetCRD/src/Calorimeter/LongCrystalBarEndcapCalorimeter_v03.cpp @@ -171,18 +171,18 @@ static Ref_t create_detector(Detector& theDetector, xml_h element, SensitiveDete } - std::cout << "module_type: " << module_type << std::endl; - std::cout << "module_number: " << module_number << std::endl; - std::cout << "dim_x: " << dim_x << std::endl; - std::cout << "dim_x1: " << dim_x1 << std::endl; - std::cout << "dim_x2: " << dim_x2 << std::endl; - std::cout << "dim_y: " << dim_y << std::endl; - std::cout << "dim_y1: " << dim_y1 << std::endl; - std::cout << "dim_y2: " << dim_y2 << std::endl; - std::cout << "dim_z: " << dim_z << std::endl; - std::cout << "pos_x: " << pos_x << std::endl; - std::cout << "pos_y: " << pos_y << std::endl; - std::cout << "pos_z: " << pos_z << std::endl; + //std::cout << "module_type: " << module_type << std::endl; + //std::cout << "module_number: " << module_number << std::endl; + //std::cout << "dim_x: " << dim_x << std::endl; + //std::cout << "dim_x1: " << dim_x1 << std::endl; + //std::cout << "dim_x2: " << dim_x2 << std::endl; + //std::cout << "dim_y: " << dim_y << std::endl; + //std::cout << "dim_y1: " << dim_y1 << std::endl; + //std::cout << "dim_y2: " << dim_y2 << std::endl; + //std::cout << "dim_z: " << dim_z << std::endl; + //std::cout << "pos_x: " << pos_x << std::endl; + //std::cout << "pos_y: " << pos_y << std::endl; + //std::cout << "pos_z: " << pos_z << std::endl; Box EndcapModule(box_half_x,box_half_y,box_half_z); @@ -498,8 +498,8 @@ static Ref_t create_detector(Detector& theDetector, xml_h element, SensitiveDete } } - std::cout << "N_bar: " << N_bar << std::endl; - std::cout << "volume_bar: " << volume_bar << std::endl; + //std::cout << "N_bar: " << N_bar << std::endl; + //std::cout << "volume_bar: " << volume_bar << std::endl; int sector_sum = 0; if(module_type==1 || module_type==2 || module_type == 21 || module_type == 22) sector_sum = module_number; @@ -722,13 +722,13 @@ static Ref_t create_detector(Detector& theDetector, xml_h element, SensitiveDete } endcapID++; } - cout<<"EndcapModule0: "<<all_module0<<endl; - cout<<"EndcapModule1: "<<all_module1<<endl; - cout<<"EndcapModule2: "<<all_module2<<endl; - cout<<"EndcapModule3: "<<all_module3<<endl; + //cout<<"EndcapModule0: "<<all_module0<<endl; + //cout<<"EndcapModule1: "<<all_module1<<endl; + //cout<<"EndcapModule2: "<<all_module2<<endl; + //cout<<"EndcapModule3: "<<all_module3<<endl; sdet.addExtension<dd4hep::rec::ECALSystemInfoData>(ecalSystemInfoData); return sdet; } -DECLARE_DETELEMENT(LongCrystalBarEndcapCalorimeter_v03, create_detector) \ No newline at end of file +DECLARE_DETELEMENT(LongCrystalBarEndcapCalorimeter_v03, create_detector) diff --git a/Detector/DetCRD/src/Calorimeter/LongCrystalBarEndcapCalorimeter_v04.cpp b/Detector/DetCRD/src/Calorimeter/LongCrystalBarEndcapCalorimeter_v04.cpp index dadb7cfb..d7b704aa 100755 --- a/Detector/DetCRD/src/Calorimeter/LongCrystalBarEndcapCalorimeter_v04.cpp +++ b/Detector/DetCRD/src/Calorimeter/LongCrystalBarEndcapCalorimeter_v04.cpp @@ -184,18 +184,18 @@ static Ref_t create_detector(Detector& theDetector, xml_h element, SensitiveDete } - std::cout << "module_type: " << module_type << std::endl; - std::cout << "module_number: " << module_number << std::endl; - std::cout << "dim_x: " << dim_x << std::endl; - std::cout << "dim_x1: " << dim_x1 << std::endl; - std::cout << "dim_x2: " << dim_x2 << std::endl; - std::cout << "dim_y: " << dim_y << std::endl; - std::cout << "dim_y1: " << dim_y1 << std::endl; - std::cout << "dim_y2: " << dim_y2 << std::endl; - std::cout << "dim_z: " << dim_z << std::endl; - std::cout << "pos_x: " << pos_x << std::endl; - std::cout << "pos_y: " << pos_y << std::endl; - std::cout << "pos_z: " << pos_z << std::endl; + //std::cout << "module_type: " << module_type << std::endl; + //std::cout << "module_number: " << module_number << std::endl; + //std::cout << "dim_x: " << dim_x << std::endl; + //std::cout << "dim_x1: " << dim_x1 << std::endl; + //std::cout << "dim_x2: " << dim_x2 << std::endl; + //std::cout << "dim_y: " << dim_y << std::endl; + //std::cout << "dim_y1: " << dim_y1 << std::endl; + //std::cout << "dim_y2: " << dim_y2 << std::endl; + //std::cout << "dim_z: " << dim_z << std::endl; + //std::cout << "pos_x: " << pos_x << std::endl; + //std::cout << "pos_y: " << pos_y << std::endl; + //std::cout << "pos_z: " << pos_z << std::endl; Box EndcapModule(box_half_x,box_half_y,box_half_z); @@ -619,8 +619,8 @@ static Ref_t create_detector(Detector& theDetector, xml_h element, SensitiveDete } } - std::cout << "N_bar: " << N_bar << std::endl; - std::cout << "volume_bar: " << volume_bar << std::endl; + //std::cout << "N_bar: " << N_bar << std::endl; + //std::cout << "volume_bar: " << volume_bar << std::endl; int sector_sum = 0; if(module_type==1 || module_type==2 || module_type == 21 || module_type == 22) sector_sum = module_number; @@ -843,13 +843,13 @@ static Ref_t create_detector(Detector& theDetector, xml_h element, SensitiveDete } endcapID++; } - cout<<"EndcapModule0: "<<all_module0<<endl; - cout<<"EndcapModule1: "<<all_module1<<endl; - cout<<"EndcapModule2: "<<all_module2<<endl; - cout<<"EndcapModule3: "<<all_module3<<endl; + //cout<<"EndcapModule0: "<<all_module0<<endl; + //cout<<"EndcapModule1: "<<all_module1<<endl; + //cout<<"EndcapModule2: "<<all_module2<<endl; + //cout<<"EndcapModule3: "<<all_module3<<endl; sdet.addExtension<dd4hep::rec::ECALSystemInfoData>(ecalSystemInfoData); return sdet; } -DECLARE_DETELEMENT(LongCrystalBarEndcapCalorimeter_v04, create_detector) \ No newline at end of file +DECLARE_DETELEMENT(LongCrystalBarEndcapCalorimeter_v04, create_detector) diff --git a/Detector/DetCRD/src/Calorimeter/Lumical_v01_geo.cpp b/Detector/DetCRD/src/Calorimeter/Lumical_v01_geo.cpp index d510b940..3efb63fe 100644 --- a/Detector/DetCRD/src/Calorimeter/Lumical_v01_geo.cpp +++ b/Detector/DetCRD/src/Calorimeter/Lumical_v01_geo.cpp @@ -111,7 +111,7 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s int keyVal = segxml.attr<int>( _Unicode(value) ) ; encoder[ keyStr ] = keyVal ; - std::cout<<"keyStr:"<<keyStr<<"_keyVal:"<<keyVal<<"\n"; + //std::cout<<"keyStr:"<<keyStr<<"_keyVal:"<<keyVal<<"\n"; // if we have a multisegmentation that uses the slice as key, we need to know for the // computation of the layer parameters in LayeredCalorimeterData::Layer below if( keyStr == "layer"){sensitive_slice_number = keyVal;} @@ -239,7 +239,7 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s slice_vol.setVisAttributes(description,x_slice.visStr()); PlacedVolume slice_phv = envelope.placeVolume(slice_vol,Position(x_slice.position().x(),ky*x_slice.position().y(),kz*x_slice.position().z())); slice_phv.addPhysVolID("side",kz).addPhysVolID("stave",ky).addPhysVolID("module",l+1).addPhysVolID("layer",layer_num ).addPhysVolID("slice",slice_number); - std::cout<<"l + 1 = "<<l+1<<"\n"; + //std::cout<<"l + 1 = "<<l+1<<"\n"; if(ky==1 && kz==1){ dd4hep::PrintLevel printLevel = dd4hep::ERROR; if (x_det.hasAttr(_Unicode(printLevel))) { diff --git a/Detector/DetCRD/src/Other/Lumical_v01_geo_beampipe.cpp b/Detector/DetCRD/src/Other/Lumical_v01_geo_beampipe.cpp index d3c07fbe..e9440330 100644 --- a/Detector/DetCRD/src/Other/Lumical_v01_geo_beampipe.cpp +++ b/Detector/DetCRD/src/Other/Lumical_v01_geo_beampipe.cpp @@ -144,7 +144,7 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s Transform3D transform_beampipe(RotationZYX(90*deg,0,0), Translation3D(-kx*x_slice.position().x(),x_slice.position().y() , kz*x_slice.position().z())); PlacedVolume slice_phv = envelope.placeVolume(slice_vol,transform_beampipe); slice_phv.addPhysVolID("side",kz).addPhysVolID("module",0).addPhysVolID("layer",0 ).addPhysVolID("slice",layer_num); - std::cout<<"side:"<<kz<<"module:"<<0<<"layer:"<<layer_num<<"slice:"<<layer_num<<"\n"; + //std::cout<<"side:"<<kz<<"module:"<<0<<"layer:"<<layer_num<<"slice:"<<layer_num<<"\n"; slice.setPlacement(slice_phv); slice_number++; } @@ -167,7 +167,7 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s Transform3D transform_beampipe(RotationZYX(90*deg,0,0), Translation3D(-kx*x_slice.position().x(),x_slice.position().y() , kz*x_slice.position().z())); PlacedVolume slice_phv = envelope.placeVolume(slice_vol,transform_beampipe); slice_phv.addPhysVolID("side",kz).addPhysVolID("module",0).addPhysVolID("layer",0 ).addPhysVolID("slice",layer_num); - std::cout<<"side:"<<kz<<"module:"<<0<<"layer:"<<layer_num<<"slice:"<<layer_num<<"\n"; + //std::cout<<"side:"<<kz<<"module:"<<0<<"layer:"<<layer_num<<"slice:"<<layer_num<<"\n"; slice.setPlacement(slice_phv); slice_number++; } diff --git a/Detector/DetCRD/src/Tracker/SiTracker_otkbarrel_v01_geo.cpp b/Detector/DetCRD/src/Tracker/SiTracker_otkbarrel_v01_geo.cpp index 762f80f1..1f086773 100644 --- a/Detector/DetCRD/src/Tracker/SiTracker_otkbarrel_v01_geo.cpp +++ b/Detector/DetCRD/src/Tracker/SiTracker_otkbarrel_v01_geo.cpp @@ -71,7 +71,7 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& theDetector, xml_h e, dd4h dd4hep::PlacedVolume pv; int layer_id = x_layer.attr<int>(_Unicode(layer_id)); - std::cout << "layer_id: " << layer_id << " ......." << endl; + //std::cout << "layer_id: " << layer_id << " ......." << endl; double sensitive_radius = x_layer.attr<double>(_Unicode(ladder_radius)); int n_ladders = x_layer.attr<int>(_Unicode(n_ladders)) ; @@ -81,11 +81,11 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& theDetector, xml_h e, dd4h double ladder_total_thickness = x_layer.attr<double>(_Unicode(ladder_thickness)); double ladder_total_width = x_layer.attr<double>(_Unicode(ladder_width)); double ladder_total_length = x_layer.attr<double>(_Unicode(ladder_length)); - std::cout << "ladder_radius: " << ladder_radius/mm <<" mm" << endl; - std::cout << "sensitive_radius: " << sensitive_radius/mm << " mm" << endl; - std::cout << "ladder_thickness: " << ladder_total_thickness/mm << " mm" << endl; - std::cout << "ladder_width: " << ladder_total_width/mm << " mm" << endl; - std::cout << "ladder_length: " << ladder_total_length/mm << " mm" << endl; + //std::cout << "ladder_radius: " << ladder_radius/mm <<" mm" << endl; + //std::cout << "sensitive_radius: " << sensitive_radius/mm << " mm" << endl; + //std::cout << "ladder_thickness: " << ladder_total_thickness/mm << " mm" << endl; + //std::cout << "ladder_width: " << ladder_total_width/mm << " mm" << endl; + //std::cout << "ladder_length: " << ladder_total_length/mm << " mm" << endl; std::string layerName = dd4hep::_toString( layer_id , "layer_%d" ); dd4hep::Assembly layer_assembly( layerName ) ; @@ -94,7 +94,7 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& theDetector, xml_h e, dd4h layerDE.setPlacement( pv ) ; const double ladder_dphi = ( dd4hep::twopi / n_ladders ) ; - std::cout << "ladder_dphi: " << ladder_dphi << endl; + //std::cout << "ladder_dphi: " << ladder_dphi << endl; //fetch the ladder parameters @@ -115,9 +115,9 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& theDetector, xml_h e, dd4h { support_mat = theDetector.material(x_ladder_support.materialStr()); } - std::cout << "support_length: " << support_length/mm << " mm" << endl; - std::cout << "support_thickness: " << support_thickness/mm << " mm" << endl; - std::cout << "support_width: " << support_width/mm << " mm" << endl; + //std::cout << "support_length: " << support_length/mm << " mm" << endl; + //std::cout << "support_thickness: " << support_thickness/mm << " mm" << endl; + //std::cout << "support_width: " << support_width/mm << " mm" << endl; //fetch the flex parameters @@ -133,11 +133,11 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& theDetector, xml_h e, dd4h flex_thickness += x_flex_slice_thickness; if (x_flex_slice_width > flex_width) flex_width = x_flex_slice_width; if (x_flex_slice_length > flex_length) flex_length = x_flex_slice_length; - std::cout << "x_flex_slice_thickness: " << x_flex_slice_thickness/mm << " mm" << endl; + //std::cout << "x_flex_slice_thickness: " << x_flex_slice_thickness/mm << " mm" << endl; } - std::cout << "flex_thickness: " << flex_thickness/mm << " mm" << endl; - std::cout << "flex_width: " << flex_width/mm << " mm" << endl; - std::cout << "flex_length: " << flex_length/mm << " mm" << endl; + //std::cout << "flex_thickness: " << flex_thickness/mm << " mm" << endl; + //std::cout << "flex_width: " << flex_width/mm << " mm" << endl; + //std::cout << "flex_length: " << flex_length/mm << " mm" << endl; //fetch the sensor parameters @@ -151,13 +151,13 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& theDetector, xml_h e, dd4h double sensor_total_width = sensor_active_width + sensor_dead_width; Material sensor_mat = theDetector.material(x_sensor.attr<string>(_Unicode(sensor_mat))); - std::cout << "n_sensors_per_side: " << n_sensors_per_side << endl; - std::cout << "dead_gap: " << dead_gap/mm << " mm" << endl; - std::cout << "sensor_thickness: " << sensor_thickness/mm << " mm" << endl; - std::cout << "sensor_length: " << sensor_length/mm << " mm" << endl; - std::cout << "sensor_active_width: " << sensor_active_width/mm << " mm" << endl; - std::cout << "sensor_dead_width: " << sensor_dead_width/mm << " mm" << endl; - std::cout << "sensor_total_width: " << sensor_total_width/mm << " mm" << endl; + //std::cout << "n_sensors_per_side: " << n_sensors_per_side << endl; + //std::cout << "dead_gap: " << dead_gap/mm << " mm" << endl; + //std::cout << "sensor_thickness: " << sensor_thickness/mm << " mm" << endl; + //std::cout << "sensor_length: " << sensor_length/mm << " mm" << endl; + //std::cout << "sensor_active_width: " << sensor_active_width/mm << " mm" << endl; + //std::cout << "sensor_dead_width: " << sensor_dead_width/mm << " mm" << endl; + //std::cout << "sensor_total_width: " << sensor_total_width/mm << " mm" << endl; //fetch parameters for the pcb and asic parts xml_comp_t x_other(x_ladder.child(_Unicode(other))); @@ -173,14 +173,14 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& theDetector, xml_h e, dd4h Material pcb_mat = theDetector.material(x_other.attr<string>(_Unicode(pcb_mat))); Material asic_mat = theDetector.material(x_other.attr<string>(_Unicode(asic_mat))); - std::cout << "pcb_thickness: " << pcb_thickness/mm << " mm" << endl; - 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; + //std::cout << "pcb_thickness: " << pcb_thickness/mm << " mm" << endl; + //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; //*****************************************************************// @@ -224,9 +224,9 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& theDetector, xml_h e, dd4h FlexLayerLogical.setVisAttributes(theDetector.visAttributes(flexVis)); double flex_slice_height = flex_start_height + x_flex_slice_thickness/2.; pv = FlexEnvelopeLogical.placeVolume(FlexLayerLogical, Position(flex_slice_height, 0., 0.)); - std::cout << "flex thickness = " << x_flex_slice_thickness << std::endl; - std::cout << "flex width = " << x_flex_slice_width << std::endl; - std::cout << "flex length = " << x_flex_slice_length << std::endl; + //std::cout << "flex thickness = " << x_flex_slice_thickness << std::endl; + //std::cout << "flex width = " << x_flex_slice_width << std::endl; + //std::cout << "flex length = " << x_flex_slice_length << std::endl; // std::cout << "flex material: " << x_flex_slice_mat << std::endl; flex_start_height += x_flex_slice_thickness; index++; @@ -348,7 +348,7 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& theDetector, xml_h e, dd4h pv.addPhysVolID("module", i ) ; ladderDE.setPlacement(pv); //std::cout << ladder_enum.str() << " done." << endl; - if(i==0) std::cout << "xy=" << ladder_radius*cos(ladder_phi0) << " " << ladder_radius*sin(ladder_phi0) << std::endl; + //if(i==0) std::cout << "xy=" << ladder_radius*cos(ladder_phi0) << " " << ladder_radius*sin(ladder_phi0) << std::endl; } // package the reconstruction data @@ -373,12 +373,12 @@ static dd4hep::Ref_t create_element(dd4hep::Detector& theDetector, xml_h e, dd4h zPlanarData->layers.push_back(otkbarrelLayer); } - std::cout << (*zPlanarData) << endl; + //std::cout << (*zPlanarData) << endl; otkbarrel.addExtension< ZPlanarData >(zPlanarData); if ( x_det.hasAttr(_U(combineHits)) ) { otkbarrel.setCombineHits(x_det.attr<bool>(_U(combineHits)),sens); } - std::cout << "otkbarrel done." << endl; + //std::cout << "otkbarrel done." << endl; return otkbarrel; } DECLARE_DETELEMENT(SiTracker_otkbarrel_v01,create_element) -- GitLab