LDMX Software
VisiblesVetoProcessor.h
1/*
2 * @file VisiblesVetoProcessor.h
3 * @brief Class that determines if activity in the Hcal looks like a LLP
4 * @author Tyler Horoho, University of Virginia
5 */
6
7#ifndef EVENTPROC_VISIBLESVETOPROCESSOR_H_
8#define EVENTPROC_VISIBLESVETOPROCESSOR_H_
9
10// LDMX
11#include "Framework/Configure/Parameters.h"
13#include "Hcal/Event/VisiblesVetoResult.h"
14#include "Tools/ONNXRuntime.h"
15
16namespace hcal {
17
19 public:
20 VisiblesVetoProcessor(const std::string& name, framework::Process& process)
21 : Producer(name, process) {}
22
23 virtual ~VisiblesVetoProcessor() {}
24
25 void configure(framework::config::Parameters& parameters) override;
26
27 void produce(framework::Event& event) override;
28
29 private:
30 void clearProcessor();
31
32 void buildBDTFeatureVector(const ldmx::VisiblesVetoResult& result);
33
34 /* a function for finding track IDs for truth-level tracking */
35 bool inList(std::vector<int> parents, int track_id);
36
37 int n_layers_hit_{0};
38 double x_std_{0};
39 double y_std_{0};
40 double z_std_{0};
41 double x_mean_{0};
42 double y_mean_{0};
43 double r_mean_{0};
44 int iso_hits_{0};
45 double iso_energy_{0};
46 int n_readout_hits_{0};
47 double summed_det_{0};
48 double r_mean_from_photon_track_{0};
49
50 double bdt_cut_val_{0};
51
52 double beam_energy_mev_{0};
53
54 std::vector<float> bdt_features_;
55 std::string feature_list_name_;
56
57 // Pass and collection names
58 std::string rec_pass_name_;
59 std::string rec_coll_name_;
60 bool recoil_from_tracking_;
61 std::string track_pass_name_;
62 std::string track_collection_;
63 std::string sp_collection_;
64 std::string sp_pass_name_;
65 std::string sim_particles_pass_name_;
66
67 std::string collection_name_{"VisiblesVeto"};
68
69 std::unique_ptr<ldmx::ort::ONNXRuntime> rt_;
70};
71
72} // namespace hcal
73
74#endif
Base classes for all user event processing components to extend.
Implements an event buffer system for storing event data.
Definition Event.h:40
Class which represents the process under execution.
Definition Process.h:34
Base class for a module which produces a data product.
Producer(const std::string &name, Process &process)
Class constructor.
virtual void process(Event &event) final
Processing an event for a Producer is calling produce.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:26
void produce(framework::Event &event) override
Process the event and put new data products into it.
void configure(framework::config::Parameters &parameters) override
Callback for the EventProcessor to configure itself from the given set of parameters.