LDMX Software
QIEAnalyzer.h
Go to the documentation of this file.
1
7#ifndef TRIGSCINT_QIEANALYZER_H
8#define TRIGSCINT_QIEANALYZER_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"
16
17namespace trigscint {
18
24 public:
26 const std::string& name,
27 framework::Process& process); // : framework::Analyzer(name, process) {}
28 virtual ~QIEAnalyzer() = default;
29 void configure(framework::config::Parameters& parameters) override;
30
31 void analyze(const framework::Event& event) override;
32
33 void onProcessStart() override;
34
35 void onProcessEnd() override;
36
37 float convertToID(float yVal) { return (yVal + yOffset_) * yToIDfactor_; }
38
39 private:
40 std::vector<std::vector<TH1F*> > vChargeVsTime;
41
42 // configurable parameters
43 std::string inputCol_;
44 std::string inputPassName_{""};
45 std::vector<double> peds_;
46 std::vector<double> gain_;
47 int startSample_{0};
48
49 // plotting stuff
50 int nEv{200};
51 int nChannels{16};
52 // int nTrkMax{100};
53
54 // match nev, nchan above
55 TH1F* hOut[200][16];
56 TH1F* hPE[16];
57 TH2F* hPEvsT[16];
58 TH2F* hPedSubtractedAvgQvsT[16];
59 TH2F* hPedSubtractedTotQvsPed[16];
60 TH2F* hPedSubtractedTotQvsN[16];
61 TH2F* hTotQvsPed[16];
62 TH2F* hPedSubtractedPEvsN[16];
63 TH2F* hPedSubtractedPEvsT[16];
64 TH2F* hAvgQvsT[16];
65
66 TH2F* hTDCfireChanvsEvent;
67 double yOffset_{35.};
68 double yToIDfactor_{50. / 80.};
69};
70} // namespace trigscint
71
72#endif /* TRIGSCINT_QIEANALYZER_H */
Base classes for all user event processing components to extend.
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 analyze(const framework::Event &event) override
Process the event and make histograms or summaries.
void onProcessEnd() override
Callback for the EventProcessor to take any necessary action when the processing of events finishes,...
void onProcessStart() override
Callback for the EventProcessor to take any necessary action when the processing of events starts,...
void configure(framework::config::Parameters &parameters) override
Callback for the EventProcessor to configure itself from the given set of parameters.