LDMX Software
HcalGeometryVerifier.h
1#ifndef HCALGEOMETRYVERIFIER_H
2#define HCALGEOMETRYVERIFIER_H
3#include <TCanvas.h>
4
5#include <iomanip>
6#include <sstream>
7
9#include "DetDescr/HcalID.h"
10#include "Framework/Configure/Parameters.h"
11#include "Framework/Event.h"
13#include "Hcal/Event/HcalHit.h"
15
16namespace dqm {
18 public:
19 HcalGeometryVerifier(const std::string &name, framework::Process &process)
20 : framework::Analyzer{name, process} {}
21 void configure(framework::config::Parameters &parameters) override;
22 /*
23 *
24 * Determine which of x/y/z corresponds to the direction along, across, and
25 * through the bar respectively. Along corresponding to the length of the bar,
26 * across to the width of the bar, and through to the thickness of the bar.
27 *
28 *
29 */
30 std::array<int, 3> determine_indices(const ldmx::HcalID id);
31
32 /*
33 *
34 * Check if the hit at position `position` is within the bounds of the
35 * scintillator bar with HcalID `id`.
36 *
37 * @note: On error, this function will raise an exception if `stop_on_error`
38 * is set to true or log the issue if false.
39 *
40 */
41 bool hit_ok(const ldmx::HcalID id, const std::array<double, 3> &position);
42
43 void analyze(const framework::Event &event) override;
44
45 private:
46 std::string hcalSimHitsCollection_{"HcalSimHits"};
47 std::string hcalRecHitsCollection_{"HcalRecHits"};
48 std::string hcalSimHitsPassName_{""};
49 std::string hcalRecHitsPassName_{""};
50
51 // Maximum difference between position and bounds of the scintillator bar that
52 // will be accepted [mm]
53 double tolerance{};
54 bool stop_on_error{};
55};
56} // namespace dqm
57
58#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 translates HCal ID into positions of strip hits.
Class that stores Stores reconstructed hit information from the HCAL.
Class that defines an HCal sensitive detector.
Class which stores simulated calorimeter hit information.
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.
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
Implements detector ids for HCal subdetector.
Definition HcalID.h:19