From 6d23cbed4e8c4feb4e1ae5e1e4293bb6b6cfd12a Mon Sep 17 00:00:00 2001 From: Andreas Loeschcke Centeno Date: Mon, 9 Dec 2024 15:36:07 +0100 Subject: [PATCH] Renamed DDDRCaloTubes to DRBarrelTubes for consistency with endcaps --- ...es_o1_v01.xml => DRBarrelTubes_o1_v01.xml} | 10 +++---- .../IDEA/compact/IDEA_o2_v01/IDEA_o2_v01.xml | 2 +- .../include/DRTubesconstructor.h | 4 +-- .../dual-readout-tubes/include/DRutils.h | 4 +-- ...es_o1_v01.cpp => DRBarrelTubes_o1_v01.cpp} | 4 +-- .../src/DRTubesconstructor.cpp | 28 +++++++++---------- .../dual-readout-tubes/src/DRutils.cpp | 4 +-- 7 files changed, 28 insertions(+), 28 deletions(-) rename FCCee/IDEA/compact/IDEA_o2_v01/{DDDRCaloTubes_o1_v01.xml => DRBarrelTubes_o1_v01.xml} (98%) rename detector/calorimeter/dual-readout-tubes/src/{DDDRCaloTubes_o1_v01.cpp => DRBarrelTubes_o1_v01.cpp} (93%) diff --git a/FCCee/IDEA/compact/IDEA_o2_v01/DDDRCaloTubes_o1_v01.xml b/FCCee/IDEA/compact/IDEA_o2_v01/DRBarrelTubes_o1_v01.xml similarity index 98% rename from FCCee/IDEA/compact/IDEA_o2_v01/DDDRCaloTubes_o1_v01.xml rename to FCCee/IDEA/compact/IDEA_o2_v01/DRBarrelTubes_o1_v01.xml index 02f6f3fce..33c2f2b07 100644 --- a/FCCee/IDEA/compact/IDEA_o2_v01/DDDRCaloTubes_o1_v01.xml +++ b/FCCee/IDEA/compact/IDEA_o2_v01/DRBarrelTubes_o1_v01.xml @@ -22,7 +22,7 @@ xmlns:xs="http://www.w3.org/2001/XMLSchema" xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd">--> - @@ -270,7 +270,7 @@ - + system:5,stave:10,tower:-8,air:1,col:-11,row:7,clad:1,core:1,cherenkov:1 diff --git a/FCCee/IDEA/compact/IDEA_o2_v01/IDEA_o2_v01.xml b/FCCee/IDEA/compact/IDEA_o2_v01/IDEA_o2_v01.xml index be15287d7..4c41f961c 100644 --- a/FCCee/IDEA/compact/IDEA_o2_v01/IDEA_o2_v01.xml +++ b/FCCee/IDEA/compact/IDEA_o2_v01/IDEA_o2_v01.xml @@ -62,7 +62,7 @@ - + diff --git a/detector/calorimeter/dual-readout-tubes/include/DRTubesconstructor.h b/detector/calorimeter/dual-readout-tubes/include/DRTubesconstructor.h index 59ec9b80f..1c97955fe 100644 --- a/detector/calorimeter/dual-readout-tubes/include/DRTubesconstructor.h +++ b/detector/calorimeter/dual-readout-tubes/include/DRTubesconstructor.h @@ -11,7 +11,7 @@ using namespace dd4hep; -namespace DDDRCaloTubes { +namespace DRBarrelTubes { class DRTubesconstructor { public: @@ -165,6 +165,6 @@ class DRTubesconstructor { }; -} // namespace DDDRCaloTubes +} // namespace DRBarrelTubes #endif // DRCONSTRUCTOR_H diff --git a/detector/calorimeter/dual-readout-tubes/include/DRutils.h b/detector/calorimeter/dual-readout-tubes/include/DRutils.h index 34d6cb518..08331ad27 100644 --- a/detector/calorimeter/dual-readout-tubes/include/DRutils.h +++ b/detector/calorimeter/dual-readout-tubes/include/DRutils.h @@ -10,7 +10,7 @@ using namespace dd4hep; // Utility functions for the construction of the barrel dual-readout calorimeter (based on tubes) -namespace DDDRCaloTubes +namespace DRBarrelTubes { // Quick rounding functions int fast_floor(double x); @@ -22,6 +22,6 @@ namespace DDDRCaloTubes std::vector get_plane_equation(const Position& point1, const Position& point2, const Position& point3); Position get_intersection(const std::vector& plane_coefficients, const Position& line_point, const Direction& line_direction); Position get_intersection(const Direction& plane_normal, const Position& plane_point, const Position& line_point, const Direction& line_direction); -} // namespace DDDRCaloTubes +} // namespace DRBarrelTubes #endif // DRutils_h diff --git a/detector/calorimeter/dual-readout-tubes/src/DDDRCaloTubes_o1_v01.cpp b/detector/calorimeter/dual-readout-tubes/src/DRBarrelTubes_o1_v01.cpp similarity index 93% rename from detector/calorimeter/dual-readout-tubes/src/DDDRCaloTubes_o1_v01.cpp rename to detector/calorimeter/dual-readout-tubes/src/DRBarrelTubes_o1_v01.cpp index 99178d149..366952b0f 100644 --- a/detector/calorimeter/dual-readout-tubes/src/DDDRCaloTubes_o1_v01.cpp +++ b/detector/calorimeter/dual-readout-tubes/src/DRBarrelTubes_o1_v01.cpp @@ -40,7 +40,7 @@ static Ref_t create_detector(Detector& description, Volume mother_volume = description.pickMotherVolume(s_detElement); // Helper class to construct the calorimeter - DDDRCaloTubes::DRTubesconstructor constructor(&description, entities, &sens); + DRBarrelTubes::DRTubesconstructor constructor(&description, entities, &sens); constructor.construct_calorimeter(barrel_volume); @@ -54,4 +54,4 @@ static Ref_t create_detector(Detector& description, } -DECLARE_DETELEMENT(DDDRCaloTubes,create_detector) +DECLARE_DETELEMENT(DRBarrelTubes,create_detector) diff --git a/detector/calorimeter/dual-readout-tubes/src/DRTubesconstructor.cpp b/detector/calorimeter/dual-readout-tubes/src/DRTubesconstructor.cpp index 027bc7dc0..d96c45454 100644 --- a/detector/calorimeter/dual-readout-tubes/src/DRTubesconstructor.cpp +++ b/detector/calorimeter/dual-readout-tubes/src/DRTubesconstructor.cpp @@ -3,9 +3,9 @@ #include using namespace dd4hep; -using namespace DDDRCaloTubes; +using namespace DRBarrelTubes; -DDDRCaloTubes::DRTubesconstructor::DRTubesconstructor(Detector* description, +DRBarrelTubes::DRTubesconstructor::DRTubesconstructor(Detector* description, xml_h& entities, SensitiveDetector* sens): m_entities(entities) @@ -96,7 +96,7 @@ DDDRCaloTubes::DRTubesconstructor::DRTubesconstructor(Detector* description, } // Function to calculate all tower parameters which are derived from user given values -void DDDRCaloTubes::DRTubesconstructor::calculate_tower_parameters() +void DRBarrelTubes::DRTubesconstructor::calculate_tower_parameters() { // Angle where endcap and barrel meet m_barrel_endcap_angle = std::atan2(m_calo_inner_half_z, m_calo_inner_r); @@ -156,7 +156,7 @@ void DDDRCaloTubes::DRTubesconstructor::calculate_tower_parameters() } // Function to calculate tower parameters specifically for phi direction -void DDDRCaloTubes::DRTubesconstructor::calculate_phi_parameters() +void DRBarrelTubes::DRTubesconstructor::calculate_phi_parameters() { double num_phi_towers_d = 360.0*deg/m_tower_phi; if (num_phi_towers_d < 0.0) throw std::runtime_error("Negative tower phi coverage not allowed"); @@ -195,7 +195,7 @@ void DDDRCaloTubes::DRTubesconstructor::calculate_phi_parameters() Anytime a variable contains "edge" it refers to the edge that would be running in y direction in this sketch with global coordinates (but is the x direction in the local coordinate system of the Trap volume). */ -void DDDRCaloTubes::DRTubesconstructor::calculate_theta_parameters() +void DRBarrelTubes::DRTubesconstructor::calculate_theta_parameters() { // How much the front faces of the already placed towers cover in global z direction in the global coordinate system double covered_z = std::tan(m_covered_theta)*m_calo_inner_r; @@ -272,7 +272,7 @@ void DDDRCaloTubes::DRTubesconstructor::calculate_theta_parameters() // Check if tube of this (half-)length already exists, if not, create it // and store it in the corresponding volume map -void DDDRCaloTubes::DRTubesconstructor::assert_tube_existence(int key, bool cher) +void DRBarrelTubes::DRTubesconstructor::assert_tube_existence(int key, bool cher) { std::unordered_map* tube_volume_map; @@ -342,7 +342,7 @@ void DDDRCaloTubes::DRTubesconstructor::assert_tube_existence(int key, bool cher // Similar to calculate_tower_width (see abelow), but for the encasing trapezoid support volume // Width is calculated for any given point in th z-y plane -double DDDRCaloTubes::DRTubesconstructor::calculate_trap_width(double given_y, double given_z, bool backface) +double DRBarrelTubes::DRTubesconstructor::calculate_trap_width(double given_y, double given_z, bool backface) { // Calculate width (x_direction) of trapezoid at given y // Assuming y=0 corresponds to right angle edge of the tower @@ -384,7 +384,7 @@ double DDDRCaloTubes::DRTubesconstructor::calculate_trap_width(double given_y, d |______> x / |/_ z */ -double DDDRCaloTubes::DRTubesconstructor::calculate_tower_width(int given_row, bool backface) +double DRBarrelTubes::DRTubesconstructor::calculate_tower_width(int given_row, bool backface) { // Calculate width (x_direction) of tower at given row // Assuming row 0 is at the right angle edge @@ -404,7 +404,7 @@ double DDDRCaloTubes::DRTubesconstructor::calculate_tower_width(int given_row, b // Place all tubes which make up the tower -void DDDRCaloTubes::DRTubesconstructor::assemble_tower(Volume& tower_air_volume) +void DRBarrelTubes::DRTubesconstructor::assemble_tower(Volume& tower_air_volume) { // Y-distance of rightangle wall from coordinate system origin // Used throughout this function @@ -619,7 +619,7 @@ void DDDRCaloTubes::DRTubesconstructor::assemble_tower(Volume& tower_air_volume) // Function to calculate the position of the tower inside the stave -void DDDRCaloTubes::DRTubesconstructor::calculate_tower_position() +void DRBarrelTubes::DRTubesconstructor::calculate_tower_position() { // Since the Trapezoids are defined including polar and azimuthal angles, we need to convert between cartesian and polar coordinates double trap_centre_r = m_trap_half_length/std::cos(m_trap_polar_angle); @@ -645,7 +645,7 @@ void DDDRCaloTubes::DRTubesconstructor::calculate_tower_position() // Function to construct the trapezoidal supoprt structure for the tower in which fibres are placed -void DDDRCaloTubes::DRTubesconstructor::construct_tower_trapezoid(Volume& trap_volume) +void DRBarrelTubes::DRTubesconstructor::construct_tower_trapezoid(Volume& trap_volume) { // Coordinate conversion, since the Trap volume uses polar coordinates double delta_y = (m_trap_backface_y - m_trap_frontface_y)/2.0; @@ -695,7 +695,7 @@ void DDDRCaloTubes::DRTubesconstructor::construct_tower_trapezoid(Volume& trap_v } -void DDDRCaloTubes::DRTubesconstructor::construct_tower(Volume& trap_volume) +void DRBarrelTubes::DRTubesconstructor::construct_tower(Volume& trap_volume) { // For each placed tower, recalculate the parameters this->calculate_theta_parameters(); @@ -706,7 +706,7 @@ void DDDRCaloTubes::DRTubesconstructor::construct_tower(Volume& trap_volume) // Placement of the tower in the stave volume // One tower is being placed twice, once in the forward and once in the backward region -void DDDRCaloTubes::DRTubesconstructor::place_tower(Volume& stave_volume, +void DRBarrelTubes::DRTubesconstructor::place_tower(Volume& stave_volume, Volume& tower_volume, unsigned int tower) { @@ -735,7 +735,7 @@ void DDDRCaloTubes::DRTubesconstructor::place_tower(Volume& stave_volume, // Highest level function to construct the calorimeter // In first loop all the towers are created and placed inside a stave // In the second loop the staves are placed in the calorimeter -void DDDRCaloTubes::DRTubesconstructor::construct_calorimeter(Volume& calorimeter_volume) +void DRBarrelTubes::DRTubesconstructor::construct_calorimeter(Volume& calorimeter_volume) { // Parameters for stave contruction. Shape is a trapezoid over the full barrel region (forward and backward) double dy1 = m_calo_inner_half_z; diff --git a/detector/calorimeter/dual-readout-tubes/src/DRutils.cpp b/detector/calorimeter/dual-readout-tubes/src/DRutils.cpp index f5c47c0a7..548ca21d3 100644 --- a/detector/calorimeter/dual-readout-tubes/src/DRutils.cpp +++ b/detector/calorimeter/dual-readout-tubes/src/DRutils.cpp @@ -3,7 +3,7 @@ using namespace dd4hep; -namespace DDDRCaloTubes +namespace DRBarrelTubes { // Fast rounding function which do not do some safety checks the std:: functions provide, since we don't expect problems with the input int fast_floor(double x) @@ -55,4 +55,4 @@ namespace DDDRCaloTubes return intersection; } -} // namespace DDDRCaloTubes +} // namespace DRBarrelTubes