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"
17
18namespace trigscint {
19
25 public:
27 const std::string& name,
28 framework::Process& process); // : framework::Analyzer(name, process) {}
29 virtual ~QualityFlagAnalyzer() = default;
30 void configure(framework::config::Parameters& parameters) override;
31
32 void analyze(const framework::Event& event) override;
33
34 void onProcessStart() override;
35
36 void onProcessEnd() override;
37
38 private:
39 std::vector<std::vector<TH1F*> > v_charge_vs_time_;
40
41 // configurable parameters
42 std::string input_event_col_; // full event stream input
43 std::string input_event_pass_name_{""};
44 std::string input_hit_col_; // hit collection
45 std::string input_hit_pass_name_{""};
46 std::vector<double> peds_;
47 std::vector<double> gain_;
48 int start_sample_{0};
49
50 // plotting stuff
51 int n_ev_{200};
52 static constexpr int N_CHANNELS{16};
53 int n_flags_{6};
54 int pe_fill_nb_{0};
55
56 // make sure to match constants above
57 // this order just makes looping easier
58 int flags_[6] = {16, 8, 4, 2, 1, 0};
59 // keep a counter for each flag type to get good stats
60 int n_ev_drawn_[6] = {0};
61
62 TH1F* h_out_[200][16];
63 TH1F* h_out_pe_[200][16];
64 TH1F* h_out_flag_[6][200][16]; // for 4 quality flags and 0 (no flag)
65 TH1F* h_pe_[16];
66
67 TH2F* h_td_cfire_chan_vs_event_;
68};
69} // namespace trigscint
70
71#endif /* TRIGSCINT_QUALITYFLAGANALYZER_H */
Base classes for all user event processing components to extend.
Class that stores full reconstructed (linearized) readout QIE sample from the TS.
Class that stores full reconstructed (linearized) readout QIE sample from the TS.
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:42
Class which represents the process under execution.
Definition Process.h:36
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:29
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,...