LDMX Software
HcalVetoResults.cxx
1#include "DQM/HcalVetoResults.h"
2// #include "Framework/EventProcessor.h"
4
5namespace dqm {
6
8 hcal_veto_name_ = ps.get<std::string>("hcal_veto_name");
9 hcal_veto_pass_ = ps.get<std::string>("hcal_veto_pass");
10 hcal_veto_passname_ = ps.get<std::string>("hcal_veto_passname");
11}
12
14 // Get the veto object
15 auto hcal_veto{
16 event.getObject<ldmx::HcalVetoResult>("HcalVeto", hcal_veto_passname_)};
17
18 // Get variables to be plotted
19 auto veto_passed = hcal_veto.passesVeto();
20 auto total_pe = hcal_veto.getTotalPE();
21 auto num_valid_hits = hcal_veto.getNumValidHits();
22 auto max_pe_hit = hcal_veto.getMaxPEHit();
23 auto max_pe = max_pe_hit.getPE();
24 auto max_section = max_pe_hit.getSection();
25 auto max_pos_z = max_pe_hit.getZPos();
26
27 // ldmx_log(info) << "max_section" << max_section;
28
29 // Fill the histograms
30 histograms_.fill("max_pe", max_pe);
31 histograms_.fill("total_pe", total_pe);
32 histograms_.fill("num_valid_hits", num_valid_hits);
33 histograms_.fill("max_section", max_section);
34 histograms_.fill("max_pos_z", max_pos_z);
35 histograms_.fill("veto_pass", veto_passed);
36}
37
38} // namespace dqm
39
#define DECLARE_ANALYZER(CLASS)
Macro which allows the framework to construct an analyzer given its name during configuration.
Class used to encapsulate the results obtained from HcalVetoProcessor.
Generate histograms to check the final decisions made in the Hcal veto.
std::string hcal_veto_pass_
Pass Name for veto object.
virtual void analyze(const framework::Event &event)
Fills histograms.
std::string hcal_veto_name_
Collection Name for veto object.
virtual void configure(framework::config::Parameters &ps)
Input python configuration parameters.
HistogramPool histograms_
helper object for making and filling histograms
Implements an event buffer system for storing event data.
Definition Event.h:42
void fill(const std::string &name, const T &val)
Fill a 1D histogram.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:29
const T & get(const std::string &name) const
Retrieve the parameter of the given name.
Definition Parameters.h:78