1#include "DQM/TrigScintDigiVerifier.h"
20 std::sort(ts_simhits.begin(), ts_simhits.end(),
23 return lhs.getID() < rhs.getID();
30 std::sort(ts_digis.begin(), ts_digis.end(),
32 return lhs.getID() < rhs.getID();
36 ldmx_log(info) <<
"There are " << ts_digis.size()
37 <<
" ts digis in this event";
38 for (
const auto &ts_digi : ts_digis) {
40 if (ts_digi.isNoise()) {
41 ldmx_log(debug) <<
"Digi with raw ID " << ts_digi.getID()
42 <<
" and bar ID " << ts_digi.getBarID()
43 <<
" is flagged as noise, skipping";
46 int raw_id = ts_digi.getID();
47 ldmx_log(debug) <<
"Digi with raw ID " << raw_id <<
" and bar ID "
48 << ts_digi.getBarID() <<
" has energy "
49 << ts_digi.getEnergy() <<
" and amplitude "
50 << ts_digi.getAmplitude();
54 double total_sim_energy_dep = 0.;
55 for (
const auto &ts_simhit : ts_simhits) {
56 if (raw_id == ts_simhit.getID()) {
57 total_sim_energy_dep += ts_simhit.getEdep();
58 }
else if (raw_id < ts_simhit.getID()) {
64 ldmx_log(info) <<
" There are " << ts_simhits.size()
65 <<
" sim hits in this event, adding up to a total energy of "
66 << total_sim_energy_dep;
69 ts_digi.getAmplitude());
#define DECLARE_ANALYZER(CLASS)
Macro which allows the framework to construct an analyzer given its name during configuration.
Generate histograms to check digi pipeline performance.
std::string ts_simhit_pass_
Pass Name for SimHits.
virtual void analyze(const framework::Event &event)
Fills histograms.
virtual void configure(framework::config::Parameters &ps)
Input python configuration parameters.
std::string ts_simhit_coll_
Collection Name for SimHits.
std::string ts_digi_coll_
Collection Name for digis.
std::string ts_digi_pass_
Pass Name for digis.
HistogramPool histograms_
helper object for making and filling histograms
Implements an event buffer system for storing event data.
void fill(const std::string &name, const T &val)
Fill a 1D histogram.
Class encapsulating parameters for configuring a processor.
const T & get(const std::string &name) const
Retrieve the parameter of the given name.
Stores simulated calorimeter hit information.