From c3a55d258c70274e2af19f6542d20d9ad91092e3 Mon Sep 17 00:00:00 2001 From: zwu0922 Date: Thu, 18 Apr 2024 14:02:49 +0200 Subject: [PATCH] Clarify crosstalk coefficients --- ..._neighbors_moduleThetaMergedSegmentation.h | 2 +- ...eighbors_moduleThetaMergedSegmentation.cpp | 20 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/detectorCommon/include/detectorCommon/xtalk_neighbors_moduleThetaMergedSegmentation.h b/detectorCommon/include/detectorCommon/xtalk_neighbors_moduleThetaMergedSegmentation.h index 07bce091d..51e910497 100644 --- a/detectorCommon/include/detectorCommon/xtalk_neighbors_moduleThetaMergedSegmentation.h +++ b/detectorCommon/include/detectorCommon/xtalk_neighbors_moduleThetaMergedSegmentation.h @@ -20,7 +20,7 @@ namespace crosstalk { * @param[in] aFieldNames Names of the fields for which crosstalk neighbours are found. * @param[in] aFieldExtremes Minimal and maximal values for the fields. * @param[in] aCellId ID of cell. - * return Vector of neighbours andcross talk coefficients. + * return Vector of neighbours and their crosstalk coefficients. */ std::vector> getNeighboursModuleThetaMerged(const dd4hep::DDSegmentation::FCCSWGridModuleThetaMerged_k4geo& aSeg, const dd4hep::DDSegmentation::BitFieldCoder& aDecoder, diff --git a/detectorCommon/src/xtalk_neighbors_moduleThetaMergedSegmentation.cpp b/detectorCommon/src/xtalk_neighbors_moduleThetaMergedSegmentation.cpp index e43fcc596..19c3d441d 100644 --- a/detectorCommon/src/xtalk_neighbors_moduleThetaMergedSegmentation.cpp +++ b/detectorCommon/src/xtalk_neighbors_moduleThetaMergedSegmentation.cpp @@ -55,12 +55,13 @@ std::vector> getNeighboursModuleThetaMerged(const dd std::cout << "WARNING: will return empty neighbour map" << std::endl; return xtalk_neighbours; } - - double dummy_xtalk=0; - double dummy_xtalk_radial=0.7e-2; // type 1 - double dummy_xtalk_theta=0.2e-2; // type 2 - double dummy_xtalk_diagonal=0.04e-2; // type 3 - double dummy_xtalk_tower=0.1e-2; // type 4 + + // crosstalk coefficients + // also see https://indico.cern.ch/event/1368231/contributions/5904291/ + double dummy_xtalk_radial = 0.7e-2; // type 1 + double dummy_xtalk_theta = 0.2e-2; // type 2 + double dummy_xtalk_diagonal = 0.04e-2; // type 3 + double dummy_xtalk_tower = 0.1e-2; // type 4 // retrieve layer/module/theta of cell under study int layer_id = aDecoder.get(aCellId, aFieldNames[idLayerField]); @@ -107,6 +108,7 @@ std::vector> getNeighboursModuleThetaMerged(const dd // instead of the extrema only for a certain layer // this border effect is also present in the original method.. for (int i=-1; i <= aSeg.mergedThetaCells(layer_id); i++) { + double dummy_xtalk = 0.0; // will be set to the crosstalk coefficient for this neighbour, either radial or diagonal int theta_id_neighbour = (theta_id + i) - ((theta_id + i) % (aSeg.mergedThetaCells(layer_id+deltaLayer) ? aSeg.mergedThetaCells(layer_id+deltaLayer):1) ); // Do we need to check if the index neighbour theta is valid? if ((theta_id_neighbour >= theta_id && theta_id_neighbour < (theta_id + aSeg.mergedThetaCells(layer_id))) or (theta_id_neighbour < theta_id && theta_id_neighbour > (theta_id - aSeg.mergedThetaCells(layer_id+deltaLayer)))) { // crosstalk neighbour type 1 @@ -157,14 +159,12 @@ std::vector> getNeighboursModuleThetaMerged(const dd int theta_id_neighbour = (theta_id + i) - ((theta_id + i) % (aSeg.mergedThetaCells(loopLayer) ? aSeg.mergedThetaCells(loopLayer):1) ); // check if the neighbour theta index is valid if (theta_id_neighbour >= theta_id && theta_id_neighbour < (theta_id + aSeg.mergedThetaCells(layer_id)) && theta_id_neighbour>=aFieldExtremes_layer[loopLayer_indice_offset][idThetaField].first && theta_id_neighbour<=aFieldExtremes_layer[loopLayer_indice_offset][idThetaField].second) { // crosstalk neighbour type 4 - dummy_xtalk = dummy_xtalk_tower; aDecoder.set(cID, aSeg.fieldNameTheta(), theta_id_neighbour); - xtalk_neighbours.emplace_back(cID, dummy_xtalk); + xtalk_neighbours.emplace_back(cID, dummy_xtalk_tower); } else if (theta_id_neighbour < theta_id && theta_id_neighbour > (theta_id - aSeg.mergedThetaCells(loopLayer)) && theta_id_neighbour>=aFieldExtremes_layer[loopLayer_indice_offset][idThetaField].first && theta_id_neighbour<=aFieldExtremes_layer[loopLayer_indice_offset][idThetaField].second) { // crosstalk neighbour type 4 - dummy_xtalk = dummy_xtalk_tower; aDecoder.set(cID, aSeg.fieldNameTheta(), theta_id_neighbour); - xtalk_neighbours.emplace_back(cID, dummy_xtalk); + xtalk_neighbours.emplace_back(cID, dummy_xtalk_tower); } else continue; }