LDMX Software
HCalDQM.h
1#ifndef _DQM_HCAL_DQM_H_
2#define _DQM_HCAL_DQM_H_
3//----------//
4// STL //
5//----------//
6#include <algorithm>
7
8//----------//
9// ROOT //
10//----------//
11#include "TVector3.h"
12
13/*~~~~~~~~~~~~~~~*/
14/* Framework */
15/*~~~~~~~~~~~~~~~*/
16#include <map>
17
19#include "DetDescr/HcalID.h"
20#include "Framework/Configure/Parameters.h"
21#include "Framework/Event.h"
22#include "Framework/EventFile.h"
24#include "Hcal/Event/HcalHit.h"
27#include "Tools/AnalysisUtils.h"
28namespace dqm {
29
31 public:
33 HCalDQM(const std::string &name, framework::Process &process);
34
37
43 void configure(framework::config::Parameters &parameters) override;
44
50 void analyze(const framework::Event &event) override;
51
52 bool skipHit(const ldmx::HcalID &id) {
53 const auto section{id.section()};
54 return (section != section_ && section_ != -1);
55 }
56 void analyzeRecHits(const std::vector<ldmx::HcalHit> &hits);
57 void analyzeSimHits(const std::vector<ldmx::SimCalorimeterHit> &hits);
58
59 bool hitPassesVeto(const ldmx::HcalHit &hit, int section) {
60 if (hit.getPE() < pe_veto_threshold || hit.getTime() > max_hit_time_) {
61 return true;
62 }
63 if (section == ldmx::HcalID::HcalSection::BACK && hit.getMinPE() < 1) {
64 return true;
65 }
66 return false;
67 }
68
69 private:
71 std::string sim_coll_name_;
72
74 std::string sim_pass_name_;
76 std::string rec_coll_name_;
77
79 std::string rec_pass_name_;
80
82 std::string veto_name_;
83
85 std::string veto_pass_;
86
87 // Veto threshold for photo-electrons
88 float pe_veto_threshold;
89 int section_;
90 double max_hit_time_;
91};
92
93} // namespace dqm
94
95#endif // _DQM_HCAL_DQM_H_
Collection of utility functions useful for analysis.
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 used to encapsulate the results obtained from HcalVetoProcessor.
Class which stores simulated calorimeter hit information.
std::string sim_pass_name_
Hcal Sim Hits pass name.
Definition HCalDQM.h:74
std::string veto_name_
Hcal Veto name.
Definition HCalDQM.h:82
void analyze(const framework::Event &event) override
Process the event and make histograms ro summaries.
Definition HCalDQM.cxx:18
~HCalDQM()
Destructor.
Definition HCalDQM.h:36
std::string rec_pass_name_
Hcal Rec Hits pass name.
Definition HCalDQM.h:79
std::string veto_pass_
Hcal Veto pass name.
Definition HCalDQM.h:85
void configure(framework::config::Parameters &parameters) override
Configure the processor using the given user specified parameters.
Definition HCalDQM.cxx:8
std::string rec_coll_name_
Hcal Rec Hits collection name.
Definition HCalDQM.h:76
std::string sim_coll_name_
Hcal Sim Hits collection name.
Definition HCalDQM.h:71
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
Implements detector ids for HCal subdetector.
Definition HcalID.h:19