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*> > vChargeVsTime;
40
41 // configurable parameters
42 std::string inputEventCol_; // full event stream input
43 std::string inputEventPassName_{""};
44 std::string inputHitCol_; // hit collection
45 std::string inputHitPassName_{""};
46 std::vector<double> peds_;
47 std::vector<double> gain_;
48 int startSample_{0};
49
50 // plotting stuff
51 const int nEv{200};
52 static constexpr int nChannels{16};
53 const int nFlags{6};
54 int peFillNb{0};
55
56 // make sure to match constants above
57 const int flags[6] = {16, 8, 4,
58 2, 1, 0}; // this order just makes looping easier
59 int nEvDrawn[6] = {0}; // keep a counter for each flag type to get good stats
60 TH1F* hOut[200][16];
61 TH1F* hOutPE[200][16];
62 TH1F* hOutFlag[6][200][16]; // for 4 quality flags and 0 (no flag)
63 TH1F* hPE[16];
64
65 TH2F* hTDCfireChanvsEvent;
66};
67} // namespace trigscint
68
69#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.
Implements an event buffer system for storing event data.
Definition Event.h:41
Class which represents the process under execution.
Definition Process.h:36
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:27
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,...