1#include "DQM/TrigScintDigiVerifier.h"
6#include "TrigScint/Event/TrigScintHit.h"
25 std::sort(ts_simhits.begin(), ts_simhits.end(),
28 return lhs.getID() < rhs.getID();
35 std::sort(ts_digis.begin(), ts_digis.end(),
37 return lhs.getID() < rhs.getID();
41 ldmx_log(info) <<
"There are " << ts_digis.size()
42 <<
" ts digis in this event";
43 for (
const auto& ts_digi : ts_digis) {
45 if (ts_digi.isNoise()) {
46 ldmx_log(debug) <<
"Digi with raw ID " << ts_digi.getID()
47 <<
" and bar ID " << ts_digi.getBarID()
48 <<
" is flagged as noise, skipping";
51 int raw_id = ts_digi.getID();
52 ldmx_log(debug) <<
"Digi with raw ID " << raw_id <<
" and bar ID "
53 << ts_digi.getBarID() <<
" has energy "
54 << ts_digi.getEnergy() <<
" and amplitude "
55 << ts_digi.getAmplitude();
59 double total_sim_energy_dep = 0.;
60 for (
const auto& ts_simhit : ts_simhits) {
61 if (raw_id == ts_simhit.getID()) {
62 total_sim_energy_dep += ts_simhit.getEdep();
63 }
else if (raw_id < ts_simhit.getID()) {
69 ldmx_log(info) <<
" There are " << ts_simhits.size()
70 <<
" sim hits in this event, adding up to a total energy of "
71 << total_sim_energy_dep;
74 ts_digi.getAmplitude());
#define DECLARE_ANALYZER(CLASS)
Macro which allows the framework to construct an analyzer given its name during configuration.
Class which stores simulated calorimeter hit information.
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.