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/HcalHit.h"
14#include "Hcal/Event/VisiblesVetoResult.h"
15#include "Tools/ONNXRuntime.h"
16
17// recoil tracking
18#include "Tracking/Event/Track.h"
19
20namespace hcal {
21
23 public:
24 VisiblesVetoProcessor(const std::string& name, framework::Process& process)
25 : Producer(name, process) {}
26
27 virtual ~VisiblesVetoProcessor() {}
28
29 void configure(framework::config::Parameters& parameters) override;
30
31 void produce(framework::Event& event) override;
32
33 private:
34 void clearProcessor();
35
36 void buildBDTFeatureVector(const ldmx::VisiblesVetoResult& result);
37
38 /* a function for finding track IDs for truth-level tracking */
39 bool inList(std::vector<int> parents, int track_id);
40
41 int n_layers_hit_{0};
42 double x_std_{0};
43 double y_std_{0};
44 double z_std_{0};
45 double x_mean_{0};
46 double y_mean_{0};
47 double r_mean_{0};
48 int iso_hits_{0};
49 double iso_energy_{0};
50 int n_readout_hits_{0};
51 double summed_det_{0};
52 double r_mean_from_photon_track_{0};
53
54 double bdt_cut_val_{0};
55
56 double beam_energy_mev_{0};
57
58 std::vector<float> bdt_features_;
59 std::string feature_list_name_;
60
61 // Pass and collection names
62 std::string rec_pass_name_;
63 std::string rec_coll_name_;
64 bool recoil_from_tracking_;
65 std::string track_pass_name_;
66 std::string track_collection_;
67 std::string sp_collection_;
68 std::string sp_pass_name_;
69 std::string sim_particles_pass_name_;
70
71 std::string collection_name_{"VisiblesVeto"};
72
73 std::unique_ptr<ldmx::ort::ONNXRuntime> rt_;
74};
75
76} // namespace hcal
77
78#endif
Base classes for all user event processing components to extend.
Class that stores Stores reconstructed hit information from the HCAL.
Implements an event buffer system for storing event data.
Definition Event.h:42
Class which represents the process under execution.
Definition Process.h:36
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:29
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.