LDMX Software
QualityFlagAnalyzer.h
Go to the documentation of this file.
1
7#ifndef TRIGSCINT_QUALITYFLAGANALYZER_H
8#define TRIGSCINT_QUALITYFLAGANALYZER_H
9
10// LDMX Framework
11#include "Framework/Configure/Parameters.h"
12#include "Framework/EventProcessor.h" //Needed to declare processor
13#include "TH1.h"
14#include "TH2.h"
15
16namespace trigscint {
17
23 public:
25 const std::string& name,
26 framework::Process& process); // : framework::Analyzer(name, process) {}
27 virtual ~QualityFlagAnalyzer() = default;
28 void configure(framework::config::Parameters& parameters) override;
29
30 void analyze(const framework::Event& event) override;
31
32 void onProcessStart() override;
33
34 void onProcessEnd() override;
35
36 private:
37 std::vector<std::vector<TH1F*> > v_charge_vs_time_;
38
39 // configurable parameters
40 std::string input_event_col_; // full event stream input
41 std::string input_event_pass_name_{""};
42 std::string input_hit_col_; // hit collection
43 std::string input_hit_pass_name_{""};
44 std::vector<double> peds_;
45 std::vector<double> gain_;
46 int start_sample_{0};
47
48 // plotting stuff
49 int n_ev_{200};
50 static constexpr int N_CHANNELS{16};
51 int n_flags_{6};
52 int pe_fill_nb_{0};
53
54 // make sure to match constants above
55 // this order just makes looping easier
56 int flags_[6] = {16, 8, 4, 2, 1, 0};
57 // keep a counter for each flag type to get good stats
58 int n_ev_drawn_[6] = {0};
59
60 TH1F* h_out_[200][16];
61 TH1F* h_out_pe_[200][16];
62 TH1F* h_out_flag_[6][200][16]; // for 4 quality flags and 0 (no flag)
63 TH1F* h_pe_[16];
64
65 TH2F* h_td_cfire_chan_vs_event_;
66};
67} // namespace trigscint
68
69#endif /* TRIGSCINT_QUALITYFLAGANALYZER_H */
Base classes for all user event processing components to extend.
Base class for a module which does not produce a data product.
virtual void process(Event &event) final
Processing an event for an Analyzer is calling analyze.
Implements an event buffer system for storing event data.
Definition Event.h:40
Class which represents the process under execution.
Definition Process.h:34
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:26
void configure(framework::config::Parameters &parameters) override
Callback for the EventProcessor to configure itself from the given set of parameters.
void analyze(const framework::Event &event) override
Process the event and make histograms or summaries.
void onProcessStart() override
Callback for the EventProcessor to take any necessary action when the processing of events starts,...
void onProcessEnd() override
Callback for the EventProcessor to take any necessary action when the processing of events finishes,...