diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/InDetPVMPlotDefCommon_ITK.xml b/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/InDetPVMPlotDefCommon_ITK.xml index 4b4b811d37683c09ae880899b714d6a99695aa8f..65501d557b8fa8485feacfaba56199f10b3ff99f 100644 --- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/InDetPVMPlotDefCommon_ITK.xml +++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/share/InDetPVMPlotDefCommon_ITK.xml @@ -398,6 +398,7 @@ end of hit residuals & cluster width plots ======================================================= --> +<!--Tracks--> <h id="reco_time" type="TH1F" title="reco_{time}"> <x title="reco_{time} [ns]" n="160" lo="-&TIMEPARA;" hi="&TIMEPARA;"/> <y title="Number of Entries"/> @@ -408,6 +409,27 @@ end of hit residuals & cluster width plots <y title="efficiency"/> </h> +<!--Vertices--> +<h id="vx_time" type="TH1F" title="Time of vertex"> + <x title="time (ns)" n="40" lo="-&TIMEPARA;" hi="&TIMEPARA;"/> + <y title="Entries"/> +</h> + +<h id="vx_err_time" type="TH1F" title="Time error of vertex"> + <x title="#sigma(time) (ns)" n="40" lo="0.0" hi="0.05"/> + <y title="Entries"/> +</h> + +<h id="vx_time_diff" type="TH1F" title="PV selected-truth time difference"> + <x title="time_{reco} - time_{truth} [ns]" n="40" lo="-0.15" hi="0.15"/> + <y title="Entries"/> +</h> + +<h id="vx_time_diff_pull" type="TH1F" title="PV selected-truth time difference pull"> + <x title="(time_{reco} - time_{truth}) / #sigma(time_{reco})" n="40" lo="-5.0" hi="5.0"/> + <y title="Entries"/> +</h> + <!-- ======================================================= end of HGTD timing plots diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_Vertex.cxx b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_Vertex.cxx index f08202b63db381017a9cd78e35009b0c2fc65923..066afb93de95a31d340fa89824f0c1ae12fc2d83 100644 --- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_Vertex.cxx +++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_Vertex.cxx @@ -39,10 +39,12 @@ InDetPerfPlot_Vertex::initializePlots() { book(m_vx_x,"vx_x"); book(m_vx_y,"vx_y"); book(m_vx_z,"vx_z"); + book(m_vx_time,"vx_time"); book(m_vx_err_x,"vx_err_x"); book(m_vx_err_y,"vx_err_y"); book(m_vx_err_z,"vx_err_z"); + book(m_vx_err_time,"vx_err_time"); book(m_vx_chi2_over_ndf,"vx_chi2_over_ndf"); book(m_vx_type,"vx_type"); @@ -71,12 +73,27 @@ InDetPerfPlot_Vertex::fill(const xAOD::Vertex& vertex, float weight) { fillHisto(m_vx_y, vertex.y(), weight); fillHisto(m_vx_z, vertex.z(), weight); + static const SG::AuxElement::Accessor<uint8_t> accHasValidTime("hasValidTime"); + static const SG::AuxElement::Accessor<float> accTime("time"); + if (accHasValidTime.isAvailable(vertex) && accTime.isAvailable(vertex)) { + if (vertex.hasValidTime()) { + fillHisto(m_vx_time, vertex.time(), weight); + } + } + // fill error plots const AmgSymMatrix(3)& covariance = vertex.covariancePosition(); fillHisto(m_vx_err_x, Amg::error(covariance, 0), weight); fillHisto(m_vx_err_y, Amg::error(covariance, 1), weight); fillHisto(m_vx_err_z, Amg::error(covariance, 2), weight); + static const SG::AuxElement::Accessor<float> accTimeResolution("timeResolution"); + if (accHasValidTime.isAvailable(vertex) && accTimeResolution.isAvailable(vertex)) { + if (vertex.hasValidTime()) { + fillHisto(m_vx_err_time, vertex.timeResolution(), weight); + } + } + // fill vertex quality and type fillHisto(m_vx_type, vertex.vertexType(), weight); diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_Vertex.h b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_Vertex.h index a8cea14668600fc5bc2bfe6e8f767b419c9fcc85..f6123c3312922e0863554930ee1d48027e66a325 100644 --- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_Vertex.h +++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_Vertex.h @@ -34,6 +34,8 @@ private: TH1* m_vx_y; ///Position z TH1* m_vx_z; + ///Time + TH1* m_vx_time; ///@} ///@name Errors of vertex @@ -43,6 +45,8 @@ private: TH1* m_vx_err_y; ///Error z TH1* m_vx_err_z; + ///Error time + TH1* m_vx_err_time; ///@} ///@name Vertex quality and type diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_VertexTruthMatching.cxx b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_VertexTruthMatching.cxx index 641e767651eff062da6bd9f4af16360226f23d27..d8d916d5f4128a4f5b5ca827f9ae47703a6606d1 100644 --- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_VertexTruthMatching.cxx +++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_VertexTruthMatching.cxx @@ -14,6 +14,7 @@ #include "InDetPerfPlot_nTracks.h" #include "TFitResult.h" #include "TFitResultPtr.h" +#include "GaudiKernel/PhysicalConstants.h" using namespace IDPVM; @@ -199,6 +200,8 @@ void InDetPerfPlot_VertexTruthMatching::initializePlots() { book(m_vx_type_truth,"vx_type_truth"); book(m_vx_z_diff,"vx_z_diff"); book(m_vx_z_diff_pull,"vx_z_diff_pull"); + book(m_vx_time_diff,"vx_time_diff"); + book(m_vx_time_diff_pull,"vx_time_diff_pull"); if (m_detailLevel >= 200) { book(m_vx_hs_classification,"vx_hs_classification"); book(m_vx_nReco_vs_nTruth_inclusive,"vx_nReco_vs_nTruth_inclusive"); @@ -549,6 +552,20 @@ void InDetPerfPlot_VertexTruthMatching::fill(const xAOD::Vertex& vertex, const x float err_z = fabs(Amg::error(covariance, 2)) > 1e-7 ? Amg::error(covariance, 2) : 1000.; fillHisto(m_vx_z_diff,diff_z, weight); fillHisto(m_vx_z_diff_pull,diff_z/err_z, weight); + + static const SG::AuxElement::Accessor<uint8_t> accHasValidTime("hasValidTime"); + static const SG::AuxElement::Accessor<float> accTime("time"); + static const SG::AuxElement::Accessor<float> accTimeResolution("timeResolution"); + if (accHasValidTime.isAvailable(vertex) && accTime.isAvailable(vertex) && + accTimeResolution.isAvailable(vertex)) { + + if (vertex.hasValidTime()) { + float diff_time = vertex.time()-tvrt->t()/Gaudi::Units::c_light; + float err_time = vertex.timeResolution(); + fillHisto(m_vx_time_diff, diff_time, weight); + fillHisto(m_vx_time_diff_pull, diff_time/err_time, weight); + } + } } // Get the match type info for each vertex: diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_VertexTruthMatching.h b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_VertexTruthMatching.h index dfc4e5fafe9ab7acd917d4e97807f92d46bb4e91..4cd5a15d5ad36ecf93163c0308b83a52e9a74eff 100644 --- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_VertexTruthMatching.h +++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_VertexTruthMatching.h @@ -50,6 +50,11 @@ private: TH1* m_vx_type_truth{}; TH1* m_vx_z_diff{}; TH1* m_vx_z_diff_pull{}; + + ///vertex time + TH1* m_vx_time_diff{}; + TH1* m_vx_time_diff_pull{}; + ///hardscatter classification TH1* m_vx_hs_classification{}; ///vertex reco efficiency diff --git a/Tools/CampaignsARTTests/config/dcube_config_all_domains_reduced.xml b/Tools/CampaignsARTTests/config/dcube_config_all_domains_reduced.xml index 653196bb1ea4013a0092628d27df9728cff213f9..9fdbe5c30523fa56b6fefd7a38efb02c9a06e7ba 100644 --- a/Tools/CampaignsARTTests/config/dcube_config_all_domains_reduced.xml +++ b/Tools/CampaignsARTTests/config/dcube_config_all_domains_reduced.xml @@ -146,10 +146,14 @@ <hist1D name="vx_x" plotopts="" tests="KS" type="TH1F"/> <hist1D name="vx_y" plotopts="" tests="KS" type="TH1F"/> <hist1D name="vx_z" plotopts="" tests="KS" type="TH1F"/> + <hist1D name="vx_time" plotopts="" tests="KS" type="TH1F" /> <hist1D name="vx_err_x" plotopts="" tests="KS" type="TH1F"/> <hist1D name="vx_err_y" plotopts="" tests="KS" type="TH1F"/> <hist1D name="vx_err_z" plotopts="" tests="KS" type="TH1F"/> + <hist1D name="vx_err_time" plotopts="" tests="KS" type="TH1F"/> <hist1D name="vx_nTracks" plotopts="" tests="KS" type="TH1F"/> + <hist1D name="vx_time_diff" plotopts="" tests="KS" type="TH1F"/> + <hist1D name="vx_time_diff_pull" plotopts="" tests="KS" type="TH1F"/> </TDirectory> </TDirectory> </TDirectory>