LDMX Software
HcalGeometryVerifier.h
1#ifndef HCALGEOMETRYVERIFIER_H
2#define HCALGEOMETRYVERIFIER_H
3
4#include "DetDescr/HcalID.h"
5#include "Framework/Configure/Parameters.h"
6#include "Framework/Event.h"
8
9namespace dqm {
11 public:
12 HcalGeometryVerifier(const std::string& name, framework::Process& process)
14 void configure(framework::config::Parameters& parameters) override;
15 /*
16 *
17 * Determine which of x/y/z corresponds to the direction along, across, and
18 * through the bar respectively. Along corresponding to the length of the bar,
19 * across to the width of the bar, and through to the thickness of the bar.
20 *
21 *
22 */
23 std::array<int, 3> determineIndices(const ldmx::HcalID id);
24
25 /*
26 *
27 * Check if the hit at position `position` is within the bounds of the
28 * scintillator bar with HcalID `id`.
29 *
30 * @note: On error, this function will raise an exception if `stop_on_error`
31 * is set to true or log the issue if false.
32 *
33 */
34 bool hitOk(const ldmx::HcalID id, const std::array<double, 3>& position);
35
36 void analyze(const framework::Event& event) override;
37
38 private:
39 std::string hcal_sim_hits_collection_{"HcalSimHits"};
40 std::string hcal_rec_hits_collection_{"HcalRecHits"};
41 std::string hcal_sim_hits_pass_name_{""};
42 std::string hcal_rec_hits_pass_name_{""};
43
44 // Maximum difference between position and bounds of the scintillator bar that
45 // will be accepted [mm]
46 double tolerance_{};
47 bool stop_on_error_{};
48};
49} // namespace dqm
50
51#endif /* HCALGEOMETRYVERIFIER_H */
Base classes for all user event processing components to extend.
Class implementing an event buffer system for storing event data.
Class that defines an HCal sensitive detector.
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.
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
Implements detector ids for HCal subdetector.
Definition HcalID.h:19