LDMX Software
EcalWABRecResults.cxx
1
2#include "DQM/EcalWABRecResults.h"
3
5
6namespace dqm {
7
9 ecal_WAB_rec_name_ = ps.getParameter<std::string>("ecal_WAB_rec_name");
10 ecal_WAB_rec_pass_ = ps.getParameter<std::string>("ecal_WAB_rec_pass");
11
12 return;
13}
14
16 auto WABRec{event.getObject<ldmx::EcalWABResult>(ecal_WAB_rec_name_,
18
19 histograms_.fill("ThetaDiffElectronPhoton",
20 WABRec.getRecThetaDiffElectronPhoton(),
21 WABRec.getTrueThetaDiffElectronPhoton());
22 histograms_.fill("ThetaElectron", WABRec.getRecThetaElectron(),
23 WABRec.getTrueThetaElectron());
24 histograms_.fill("ThetaPhoton", WABRec.getRecThetaPhoton(),
25 WABRec.getTrueThetaPhoton());
26 histograms_.fill("PhiDiffElectronPhoton",
27 WABRec.getRecPhiDiffElectronPhoton(),
28 WABRec.getTruePhiDiffElectronPhoton());
29 histograms_.fill("PhiElectron", WABRec.getRecPhiElectron(),
30 WABRec.getTruePhiElectron());
31 histograms_.fill("PhiPhoton", WABRec.getRecPhiPhoton(),
32 WABRec.getTruePhiPhoton());
33 histograms_.fill("ElectronEnergy", WABRec.getRecElectronShowerEnergy(),
34 WABRec.getTrueElectronShowerEnergy());
35 histograms_.fill("PhotonEnergy", WABRec.getRecPhotonShowerEnergy(),
36 WABRec.getTruePhotonShowerEnergy());
37 histograms_.fill("ElectronThetaDiff", WABRec.getTrueRecThetaDiffElectron());
38 histograms_.fill("PhotonThetaDiff", WABRec.getTrueRecThetaDiffPhoton());
39 histograms_.fill("ElectronPhiDiff", WABRec.getTrueRecPhiDiffElectron());
40 histograms_.fill("PhotonPhiDiff", WABRec.getTrueRecPhiDiffPhoton());
41 histograms_.fill("ProgressNum", WABRec.getProgressNum());
42
43 return;
44}
45
46} // namespace dqm
47
48DECLARE_ANALYZER_NS(dqm, EcalWABRecResults);
Class used to encapsulate the results obtained from EcalWABRecProcessor.
#define DECLARE_ANALYZER_NS(NS, CLASS)
Macro which allows the framework to construct an analyzer given its name during configuration.
virtual void analyze(const framework::Event &event) override
Fills histograms.
virtual void configure(framework::config::Parameters &ps) override
Input python configuration parameters.
std::string ecal_WAB_rec_name_
Collection Name for WABRec object.
std::string ecal_WAB_rec_pass_
Pass Name for WABRec object.
HistogramHelper histograms_
Interface class 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 double &val)
Fill a 1D histogram.
Definition Histograms.h:166
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:29