From 24394874d1216bcb5fdfa7039360e424f3425547 Mon Sep 17 00:00:00 2001 From: cvarni <carlo.varni@cern.ch> Date: Thu, 20 Mar 2025 23:44:00 +0100 Subject: [PATCH 1/3] add tot and charge and sizes plots --- .../share/dcube_IDPVMPlots_ACTS_R22.xml | 6 ++ .../test_run4_acts_dataprep_ttbar_PU200.sh | 2 + .../src/PixelClusterValidationPlots.cxx | 55 +++++++++++++++++-- .../src/PixelClusterValidationPlots.h | 18 ++++++ 4 files changed, 76 insertions(+), 5 deletions(-) diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/dcube_IDPVMPlots_ACTS_R22.xml b/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/dcube_IDPVMPlots_ACTS_R22.xml index 360dbda6bcdf..8c35d5c7a978 100644 --- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/dcube_IDPVMPlots_ACTS_R22.xml +++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/dcube_IDPVMPlots_ACTS_R22.xml @@ -68,10 +68,16 @@ <hist1D name="eta_endcap" plotopts="" tests="KS" type="TH1F"/> <hist1D name="perp_barrel" plotopts="" tests="KS" type="TH1F"/> <hist1D name="perp_endcap" plotopts="" tests="KS" type="TH1F"/> + <hist1D name="tot_barrel" plotopts="logy" tests="KS" type="TH1F"/> + <hist1D name="tot_endcap" plotopts="logy" tests="KS" type="TH1F"/> + <hist1D name="charge_barrel" plotopts="" tests="KS" type="TH1F"/> + <hist1D name="charge_endcap" plotopts="" tests="KS" type="TH1F"/> <hist1D name="total_charge_barrel" plotopts="logy" tests="KS" type="TH1F"/> <hist1D name="total_charge_endcap" plotopts="logy" tests="KS" type="TH1F"/> <hist1D name="total_tot_barrel" plotopts="logy" tests="KS" type="TH1F"/> <hist1D name="total_tot_endcap" plotopts="logy" tests="KS" type="TH1F"/> + <hist2D name="charge_vs_tot_barrel" plotopts="box" tests="KS" type="TH2F"/> + <hist2D name="charge_vs_tot_endcap" plotopts="box" tests="KS" type="TH2F"/> <hist1D name="omega_x_barrel" plotopts="" tests="KS" type="TH1F" /> <hist1D name="omega_x_endcap" plotopts="" tests="KS" type="TH1F" /> <hist1D name="omega_y_barrel" plotopts="" tests="KS" type="TH1F" /> diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_run4_acts_dataprep_ttbar_PU200.sh b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_run4_acts_dataprep_ttbar_PU200.sh index 56ef05aa1f80..8a8a939e62ed 100755 --- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_run4_acts_dataprep_ttbar_PU200.sh +++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_run4_acts_dataprep_ttbar_PU200.sh @@ -106,6 +106,7 @@ ls -la "$lastref_dir" run "dcube-last" \ $ATLAS_LOCAL_ROOT/dcube/current/DCubeClient/python/dcube.py \ -p -x dcube_shifter_last \ + --plotopts=ratio \ -c ${dcubeXmlAbsPath} \ -r ${lastref_dir}/idpvm.acts.root \ idpvm.acts.root @@ -113,6 +114,7 @@ run "dcube-last" \ run "dcube-trk" \ $ATLAS_LOCAL_ROOT/dcube/current/DCubeClient/python/dcube.py \ -p -x dcube_trk \ + --plotopts=ratio \ -c ${dcubeXmlAbsPath} \ -r idpvm.athena.root \ -M "acts" \ diff --git a/Tracking/Acts/ActsMonitoring/src/PixelClusterValidationPlots.cxx b/Tracking/Acts/ActsMonitoring/src/PixelClusterValidationPlots.cxx index 993c46f984b9..bc8f6aad067f 100644 --- a/Tracking/Acts/ActsMonitoring/src/PixelClusterValidationPlots.cxx +++ b/Tracking/Acts/ActsMonitoring/src/PixelClusterValidationPlots.cxx @@ -32,12 +32,21 @@ namespace ActsTrk { m_perp_barrel = Book1D("perp_barrel", "PixelCluster_perp_barrel;r [mm];Entries;", 100, 0, 320, false); m_perp_endcap = Book1D("perp_endcap", "PixelCluster_perp_endcap;r [mm];Entries;", 100, 0, 320, false); + + m_charge_barrel = Book1D("charge_barrel", "PixelCluster_charge_barrel;Charge; Entries;", 100, 0, 150000, false); + m_charge_endcap = Book1D("charge_endcap", "PixelCluster_charge_endcap;Charge; Entries;", 100, 0, 150000, false); + + m_total_charge_barrel = Book1D("total_charge_barrel", "PixelCluster_totalCharge_barrel;total charge;Entries;", 50, 0, 300000, false); + m_total_charge_endcap = Book1D("total_charge_endcap", "PixelCluster_totalCharge_endcap;total charge;Entries;", 50, 0, 300000, false); - m_total_charge_barrel = Book1D("total_charge_barrel", "PixelCluster_totalCharge_barrel;charge;Entries;", 50, 0, 300000, false); - m_total_charge_endcap = Book1D("total_charge_endcap", "PixelCluster_totalCharge_endcap;charge;Entries;", 50, 0, 300000, false); + m_tot_barrel = Book1D("tot_barrel", "PixelCluster_tot_barrel;tot;Entries;", 18, 0, 18, false); + m_tot_endcap = Book1D("tot_endcap", "PixelCluster_tot_endcap;tot;Entries;", 18, 0, 18, false); - m_total_tot_barrel = Book1D("total_tot_barrel", "PixelCluster_totalTot_barrel;charge;Entries;", 50, 0, 5000, false); - m_total_tot_endcap = Book1D("total_tot_endcap", "PixelCluster_totalTot_endcap;charge;Entries;", 50, 0, 5000, false); + m_charge_vs_tot_barrel = Book2D("charge_vs_tot_barrel", "PixelCluster_charge_vs_tot_barrel;Charge;ToT;", 100, 0, 150000, 18, 0, 18, false); + m_charge_vs_tot_endcap = Book2D("charge_vs_tot_endcap", "PixelCluster_charge_vs_tot_endcap;Charge;ToT;", 100, 0, 150000, 18, 0, 18, false); + + m_total_tot_barrel = Book1D("total_tot_barrel", "PixelCluster_totalTot_barrel;total tot;Entries;", 50, 0, 5000, false); + m_total_tot_endcap = Book1D("total_tot_endcap", "PixelCluster_totalTot_endcap;total tot;Entries;", 50, 0, 5000, false); m_omega_x_barrel = Book1D("omega_x_barrel", "PixelCluster_omega_x_barrel;omega x;Entries;", 50, 0, 1, false); m_omega_x_endcap = Book1D("omega_x_endcap", "PixelCluster_omega_x_endcap;omega x;Entries;", 50, 0, 1, false); @@ -83,6 +92,15 @@ namespace ActsTrk { m_global_zr_barrel = Book2D("global_zr_barrel", "PixelCluster_global_zr_barrel;z [mm];r [mm];", 100, -3000, 3000, 100, 0, 350, false); m_global_zr_endcap = Book2D("global_zr_endcap", "PixelCluster_global_zr_endcap;z [mm];r [mm];", 100, -3000, 3000, 100, 0, 350, false); + + m_sizeX_vs_eta_barrel = Book2D("sizeX_vs_eta_barrel", "PixelCluster_sizeX_vs_eta_barrel;Eta;Size X;", 400, -5, 5, 400, 0, 400, false); + m_sizeX_vs_eta_endcap = Book2D("sizeX_vs_eta_endcap", "PixelCluster_sizeX_vs_eta_endcap;Eta;Size X;", 400, -5, 5, 400, 0, 400, false); + + m_sizeY_vs_eta_barrel = Book2D("sizeY_vs_eta_barrel", "PixelCluster_sizeY_vs_eta_barrel;Eta;Size Y;", 400, -5, 5, 400, 0, 400, false); + m_sizeY_vs_eta_endcap = Book2D("sizeY_vs_eta_endcap", "PixelCluster_sizeY_vs_eta_endcap;Eta;Size Y;", 400, -5, 5, 400, 0, 400, false); + + m_sizeX_vs_sizeY_barrel = Book2D("sizeX_vs_sizeY_barrel", "PixelCluster_sizeX_vs_sizeY_barrel;Size X;Size Y;", 400, 0, 400, 400, 0, 400, false); + m_sizeX_vs_sizeY_endcap = Book2D("sizeX_vs_sizeY_endcap", "PixelCluster_sizeX_vs_sizeY_endcap;Size X;Size Y;", 400, 0, 400, 400, 0, 400, false); } void PixelClusterValidationPlots:: fill(const xAOD::PixelCluster* cluster, @@ -103,6 +121,12 @@ namespace ActsTrk { const auto& globalPos = cluster->globalPosition(); Amg::Vector3D globalPosition(globalPos(0, 0), globalPos(1, 0), globalPos(2, 0)); + const std::vector<float> charges = cluster->chargeList(); + const std::vector<int> tots = cluster->totList(); + if (charges.size() != tots.size()) { + throw std::runtime_error("Wrong sizes of charge and tot collections"); + } + if (isBarrel) { m_layerDisk_barrel->Fill(pixLayerDisk, beamSpotWeight); m_phiModule_barrel->Fill(pixelID->phi_module(id), beamSpotWeight); @@ -112,7 +136,7 @@ namespace ActsTrk { m_eta_barrel->Fill(globalPosition.eta(), beamSpotWeight); m_perp_barrel->Fill(globalPosition.perp(), beamSpotWeight); - + m_total_charge_barrel->Fill(cluster->totalCharge(), beamSpotWeight); m_total_tot_barrel->Fill(cluster->totalToT(), beamSpotWeight); @@ -138,6 +162,17 @@ namespace ActsTrk { m_global_xy_barrel->Fill(globalPos(0, 0), globalPos(1, 0), beamSpotWeight); m_global_zr_barrel->Fill(globalPos(2, 0), globalPosition.perp(), beamSpotWeight); + + m_sizeX_vs_eta_barrel->Fill(globalPosition.eta(), cluster->channelsInPhi(), beamSpotWeight); + m_sizeY_vs_eta_barrel->Fill(globalPosition.eta(), cluster->channelsInEta(), beamSpotWeight); + m_sizeX_vs_sizeY_barrel->Fill(cluster->channelsInPhi(), cluster->channelsInEta(), beamSpotWeight); + + for (std::size_t i(0); i<charges.size(); ++i) { + m_charge_barrel->Fill(charges.at(i), beamSpotWeight); + m_tot_barrel->Fill(tots.at(i), beamSpotWeight); + m_charge_vs_tot_barrel->Fill(charges.at(i), tots.at(i), beamSpotWeight); + } + } else { m_layerDisk_endcap->Fill(pixLayerDisk, beamSpotWeight); m_phiModule_endcap->Fill(pixelID->phi_module(id), beamSpotWeight); @@ -173,6 +208,16 @@ namespace ActsTrk { m_global_xy_endcap->Fill(globalPos(0, 0), globalPos(1, 0), beamSpotWeight); m_global_zr_endcap->Fill(globalPos(2, 0), globalPosition.perp(), beamSpotWeight); + + m_sizeX_vs_eta_endcap->Fill(globalPosition.eta(), cluster->channelsInPhi(), beamSpotWeight); + m_sizeY_vs_eta_endcap->Fill(globalPosition.eta(), cluster->channelsInEta(), beamSpotWeight); + m_sizeX_vs_sizeY_endcap->Fill(cluster->channelsInPhi(), cluster->channelsInEta(), beamSpotWeight); + + for (std::size_t i(0); i<charges.size(); ++i) { + m_charge_endcap->Fill(charges.at(i), beamSpotWeight); + m_tot_endcap->Fill(tots.at(i), beamSpotWeight); + m_charge_vs_tot_endcap->Fill(charges.at(i), tots.at(i), beamSpotWeight); + } } } diff --git a/Tracking/Acts/ActsMonitoring/src/PixelClusterValidationPlots.h b/Tracking/Acts/ActsMonitoring/src/PixelClusterValidationPlots.h index 804681bb9b14..29d09dcad0c6 100644 --- a/Tracking/Acts/ActsMonitoring/src/PixelClusterValidationPlots.h +++ b/Tracking/Acts/ActsMonitoring/src/PixelClusterValidationPlots.h @@ -90,11 +90,29 @@ namespace ActsTrk { TH1* m_widthY_barrel {}; TH1* m_widthY_endcap {}; + TH1* m_charge_barrel {}; + TH1* m_charge_endcap {}; + + TH1* m_tot_barrel {}; + TH1* m_tot_endcap {}; + + TH2* m_charge_vs_tot_barrel {}; + TH2* m_charge_vs_tot_endcap {}; + TH2* m_global_xy_barrel {}; TH2* m_global_xy_endcap {}; TH2* m_global_zr_barrel {}; TH2* m_global_zr_endcap {}; + + TH2* m_sizeX_vs_eta_barrel {}; + TH2* m_sizeX_vs_eta_endcap {}; + + TH2* m_sizeY_vs_eta_barrel {}; + TH2* m_sizeY_vs_eta_endcap {}; + + TH2* m_sizeX_vs_sizeY_barrel {}; + TH2* m_sizeX_vs_sizeY_endcap {}; }; } -- GitLab From 8d0c75621fb71c4d82de9c46f041fd06ddfa03fb Mon Sep 17 00:00:00 2001 From: cvarni <carlo.varni@cern.ch> Date: Fri, 21 Mar 2025 14:59:32 +0100 Subject: [PATCH 2/3] charge for tot 14 is 2e5 --- .../PixelConditionsData/ChargeCalibParameters.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/ChargeCalibParameters.h b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/ChargeCalibParameters.h index 51ccc4a8b591..063f0513f6e3 100644 --- a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/ChargeCalibParameters.h +++ b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/ChargeCalibParameters.h @@ -39,7 +39,7 @@ namespace PixelChargeCalib{ } //return Charge, given time-over-Threshold float Q(float tot) const{ - if (tot >= maxToT) return 1e5; + if (tot >= maxToT) return 2e5; if (std::fabs(A) != 0.0f && std::fabs(tot / A - 1.f) != 0.0f) { return (C * tot / A - E) / (1.f - tot / A); } -- GitLab From 3b44ef7c7033111eeb4c2494b4d0e8b37c93c9ff Mon Sep 17 00:00:00 2001 From: Carlo Varni <carlo.varni@cern.ch> Date: Fri, 21 Mar 2025 15:14:15 +0000 Subject: [PATCH 3/3] change to 1.81e5 --- .../PixelConditionsData/ChargeCalibParameters.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/ChargeCalibParameters.h b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/ChargeCalibParameters.h index 063f0513f6e3..e3399f5179aa 100644 --- a/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/ChargeCalibParameters.h +++ b/InnerDetector/InDetConditions/PixelConditionsData/PixelConditionsData/ChargeCalibParameters.h @@ -39,7 +39,7 @@ namespace PixelChargeCalib{ } //return Charge, given time-over-Threshold float Q(float tot) const{ - if (tot >= maxToT) return 2e5; + if (tot >= maxToT) return 1.81e5; if (std::fabs(A) != 0.0f && std::fabs(tot / A - 1.f) != 0.0f) { return (C * tot / A - E) / (1.f - tot / A); } -- GitLab