Skip to content
Snippets Groups Projects
Commit 16995973 authored by Jernej Debevc's avatar Jernej Debevc Committed by Frank Winklmeier
Browse files

Add vertex time plots to monitoring

Add vertex time plots to monitoring
parent 00f162c5
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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);
......
......@@ -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
......
......@@ -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:
......
......@@ -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
......
......@@ -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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment