diff --git a/device/PV/beamlinePV/include/pv_beamline_cleanup.cuh b/device/PV/beamlinePV/include/pv_beamline_cleanup.cuh index 6f58f633b3568895e35749f159c65113d80963f7..6e03895f893994215f5bb69bcd94282094f2062b 100644 --- a/device/PV/beamlinePV/include/pv_beamline_cleanup.cuh +++ b/device/PV/beamlinePV/include/pv_beamline_cleanup.cuh @@ -42,6 +42,8 @@ namespace pv_beamline_cleanup { Allen::Monitoring::Histogram<>::DeviceType, Allen::Monitoring::Histogram<>::DeviceType, Allen::Monitoring::Histogram<>::DeviceType, + Allen::Monitoring::Histogram<>::DeviceType, + Allen::Monitoring::Histogram<>::DeviceType, Allen::Monitoring::Histogram<>::DeviceType); struct pv_beamline_cleanup_t : public DeviceAlgorithm, Parameters { @@ -65,6 +67,14 @@ namespace pv_beamline_cleanup { Allen::Monitoring::Histogram<> m_histogram_pv_x {this, "pv_x", "pv_x", {1000u, -2.f, 2.f}}; Allen::Monitoring::Histogram<> m_histogram_pv_y {this, "pv_y", "pv_y", {1000u, -2.f, 2.f}}; Allen::Monitoring::Histogram<> m_histogram_pv_z {this, "pv_z", "pv_z", {2000u, -600.f, 200.f}}; + Allen::Monitoring::Histogram<> m_histogram_pv_z_only_pp {this, + "pv_z_only_pp", + "pv_z_only_pp", + {2000u, -200.f, 200.f}}; + Allen::Monitoring::Histogram<> m_histogram_pv_z_only_smog {this, + "pv_z_only_smog", + "pv_z_only_smog", + {2000u, -600.f, -200.f}}; Allen::Monitoring::Histogram<> m_histogram_n_smogpvs {this, "n_smog2_PVs", "n_smog2_PVs", {10, -0.5f, 9.5f}}; }; } // namespace pv_beamline_cleanup diff --git a/device/PV/beamlinePV/src/pv_beamline_cleanup.cu b/device/PV/beamlinePV/src/pv_beamline_cleanup.cu index 5f73f43571021fdcb0d0b35bce8520794201d77f..828a89b8c71c21cbc18e2a6a419a02e6241f4f93 100644 --- a/device/PV/beamlinePV/src/pv_beamline_cleanup.cu +++ b/device/PV/beamlinePV/src/pv_beamline_cleanup.cu @@ -37,7 +37,9 @@ void pv_beamline_cleanup::pv_beamline_cleanup_t::operator()( m_histogram_n_smogpvs.data(context), m_histogram_pv_x.data(context), m_histogram_pv_y.data(context), - m_histogram_pv_z.data(context)); + m_histogram_pv_z.data(context), + m_histogram_pv_z_only_pp.data(context), + m_histogram_pv_z_only_smog.data(context)); } __device__ void pv_beamline_cleanup::sort_pvs_by_z(PV::Vertex* final_vertices, unsigned n_vertices) @@ -80,7 +82,9 @@ __global__ void pv_beamline_cleanup::pv_beamline_cleanup( Allen::Monitoring::Histogram<>::DeviceType dev_n_smogpvs_histo, Allen::Monitoring::Histogram<>::DeviceType dev_pv_x_histo, Allen::Monitoring::Histogram<>::DeviceType dev_pv_y_histo, - Allen::Monitoring::Histogram<>::DeviceType dev_pv_z_histo) + Allen::Monitoring::Histogram<>::DeviceType dev_pv_z_histo, + Allen::Monitoring::Histogram<>::DeviceType dev_pv_z_only_pp_histo, + Allen::Monitoring::Histogram<>::DeviceType dev_pv_z_only_smog_histo) { __shared__ unsigned tmp_number_vertices[1]; @@ -121,6 +125,10 @@ __global__ void pv_beamline_cleanup::pv_beamline_cleanup( if (-200 < vertex1.position.z && vertex1.position.z < 200) { dev_pv_x_histo.increment(vertex1.position.x); dev_pv_y_histo.increment(vertex1.position.y); + dev_pv_z_only_pp_histo.increment(vertex1.position.z); + } + if (-600 < vertex1.position.z && vertex1.position.z <= -200) { + dev_pv_z_only_smog_histo.increment(vertex1.position.z); } if (vertex1.position.z < BeamlinePVConstants::Common::SMOG2_pp_separation) atomicAdd(tmp_number_SMOG_vertices, 1);