3#include "../../../Algo_HLS/Ecal/src/TotalEnergy.cpp"
4#include "../../../Algo_HLS/Ecal/src/data.h"
6#include "Recon/Event/HgcrocTrigDigi.h"
7#include "Trigger/TrigUtilities.h"
12 hit_coll_name_ = ps.
get<std::string>(
"hit_coll_name");
13 hit_coll_passname_ = ps.
get<std::string>(
"hit_coll_passname");
14 hit_collname_events_passname_ =
15 ps.
get<std::string>(
"hit_collname_events_passname");
19 if (!event.
exists(hit_coll_name_, hit_collname_events_passname_))
return;
20 auto ecal_trig_digis{
event.getObject<ldmx::HgcrocTrigDigiCollection>(
21 hit_coll_name_, hit_coll_passname_)};
28 EcalTP input_t_ps_hw[N_INPUT_TP];
32 for (
const auto& trig_digi : ecal_trig_digis) {
36 float e = cvt.calc(trig_digi.linearPrimitive(), tid.
layer());
45 if (i_tp < N_INPUT_TP) {
46 input_t_ps_hw[i_tp].tid_ = trig_digi.getId();
47 input_t_ps_hw[i_tp].tp_ =
e_t(e);
52 TotalEnergy_hw(input_t_ps_hw, energy_hw);
Class that defines an ECal trigger cell detector ID.
#define DECLARE_PRODUCER(CLASS)
Macro which allows the framework to construct a producer given its name during configuration.
Implements an event buffer system for storing event data.
bool exists(const std::string &name, const std::string &passName, bool unique=true) const
Check for the existence of an object or collection with the given name and pass name in the event.
Class encapsulating parameters for configuring a processor.
const T & get(const std::string &name) const
Retrieve the parameter of the given name.
Extension of DetectorID providing access to ECal trigger cell information.
int layer() const
Get the value of the layer field from the ID.
virtual void configure(framework::config::Parameters &ps)
Callback for the EventProcessor to configure itself from the given set of parameters.
virtual void produce(framework::Event &event)
Process the event and put new data products into it.