LDMX Software
HcalInefficiencyDQM.h
1#ifndef HCALINEFFICIENCYDQM_H
2#define HCALINEFFICIENCYDQM_H
3#include <DetDescr/HcalID.h>
5#include <TCanvas.h>
6
7#include <string>
8#include <vector>
9
10#include "Framework/Configure/Parameters.h"
11#include "Framework/Event.h"
14namespace dqm {
16 public:
17 HcalInefficiencyAnalyzer(const std::string &name, framework::Process &process)
18 : framework::Analyzer{name, process} {}
19
20 enum vetoCategories {
21 back = 0,
22 top = 1,
23 bottom = 2,
24 right = 3,
25 left = 4,
26 any = 5,
27 both = 6,
28 back_only = 7,
29 side_only = 8,
30 neither = 9
31 };
32 void configure(framework::config::Parameters &parameters) override;
33
34 bool hitPassesVeto(const ldmx::HcalHit &hit, int section) {
35 if (hit.getPE() < pe_veto_threshold || hit.getTime() > max_hit_time_) {
36 return true;
37 }
38 if (section == ldmx::HcalID::HcalSection::BACK && hit.getMinPE() < 1) {
39 return true;
40 }
41 return false;
42 }
43
44 void analyze(const framework::Event &event) override;
45
46 private:
47 std::string hcalSimHitsCollection_{"HcalSimHits"};
48 std::string hcalRecHitsCollection_{"HcalRecHits"};
49 std::string hcalSimHitsPassName_{""};
50 std::string hcalRecHitsPassName_{""};
51
52 // Veto threshold for photo-electrons
53 float pe_veto_threshold;
54 double max_hit_time_;
55};
56
57} // namespace dqm
58
59#endif /* HCALINEFFICIENCYDQM_H */
Base classes for all user event processing components to extend.
Class implementing an event buffer system for storing event data.
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 analyze(const framework::Event &event) override
Process the event and make histograms or summaries.
void configure(framework::config::Parameters &parameters) override
Callback for the EventProcessor to configure itself from the given set of parameters.
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
float getTime() const
Get the time of the hit [ns].
Stores reconstructed hit information from the HCAL.
Definition HcalHit.h:23
float getMinPE() const
Get the minimum number of photoelectrons estimated for this hit if two sided readout.
Definition HcalHit.h:58
float getPE() const
Get the number of photoelectrons estimated for this hit.
Definition HcalHit.h:50