8#ifndef EVENTPROC_ECALPNETVETOPROCESSOR_H_
9#define EVENTPROC_ECALPNETVETOPROCESSOR_H_
17#include "Ecal/Event/EcalHit.h"
19#include "Framework/Configure/Parameters.h"
22#include "Tools/ONNXRuntime.h"
44 const std::vector<ldmx::EcalHit>& ecalRecHits,
45 std::array<double, 3> etraj, std::array<double, 3> enorm);
52 std::vector<float>
logSoftmax(
const std::vector<float>& logits);
59 constexpr static unsigned int N_COORDINATE_DIM = 3;
60 constexpr static unsigned int COORDINATE_X_OFFSET = 0;
61 constexpr static unsigned int COORDINATE_Y_OFFSET =
MAX_NUM_HITS;
62 constexpr static unsigned int COORDINATE_Z_OFFSET = 2 *
MAX_NUM_HITS;
64 constexpr static unsigned int N_FEATURE_DIM = 5;
65 constexpr static unsigned int FEATURE_X_OFFSET = 0;
66 constexpr static unsigned int FEATURE_Y_OFFSET =
MAX_NUM_HITS;
67 constexpr static unsigned int FEATURE_Z_OFFSET = 2 *
MAX_NUM_HITS;
68 constexpr static unsigned int FEATURE_ENERGY_OFFSET = 3 *
MAX_NUM_HITS;
69 constexpr static unsigned int FEATURE_LAYER_ID_OFFSET = 4 *
MAX_NUM_HITS;
71 const static std::vector<std::string> INPUT_NAMES;
72 const static std::vector<unsigned int> INPUT_SIZES;
74 float disc_cut_ = -99;
75 std::vector<std::vector<float>> data_;
76 std::unique_ptr<ldmx::ort::ONNXRuntime> rt_;
81 std::string rec_coll_name_;
82 std::string ecal_rec_hits_passname_;
83 std::string ecal_sp_hits_passname_;
84 std::string track_pass_name_;
85 std::string track_collection_;
86 bool recoil_from_tracking_;
Class that translates raw positions of ECal module hits into cells in a hexagonal readout.
Class that propagates tracks to the ECAL face.
Class used to encapsulate the results obtained from EcalVetoProcessor.
Base classes for all user event processing components to extend.
Class which encapsulates information from a hit in a simulated tracking detector.
Determines if event is vetoable using ECAL hit information w/ a deep neural network.
void produce(framework::Event &event) override
Process the event and put new data products into it.
std::string collection_name_
Name of the collection which will containt the results.
std::vector< float > logSoftmax(const std::vector< float > &logits)
Transform logits to a probability.
void configure(framework::config::Parameters ¶meters) override
Callback for the EventProcessor to configure itself from the given set of parameters.
static constexpr unsigned int MAX_NUM_HITS
Maximum number of hits allowed in ECAL.
void makeInputs(const ldmx::EcalGeometry &geom, const std::vector< ldmx::EcalHit > &ecalRecHits, std::array< double, 3 > etraj, std::array< double, 3 > enorm)
Make inputs to the DNN from ECAL RecHits.
Implements an event buffer system for storing event data.
Class which represents the process under execution.
Base class for a module which produces a data product.
virtual void process(Event &event) final
Processing an event for a Producer is calling produce.
Class encapsulating parameters for configuring a processor.
Translation between real-space positions and cell IDs within the ECal.