8 combined_quad_coll_name_ = ps.
get<std::string>(
"combined_quad_coll_name");
9 pass_coll_name_ = ps.
get<std::string>(
"pass_coll_name");
10 tp_coll_passname_ = ps.
get<std::string>(
"tp_coll_pass_name");
11 tp_coll_event_passname_ = ps.
get<std::string>(
"tp_coll_event_passname");
15 if (!event.
exists(combined_quad_coll_name_, tp_coll_event_passname_))
return;
16 auto hcal_t_ps{
event.getObject<ldmx::CaloTrigPrimCollection>(
17 combined_quad_coll_name_, tp_coll_passname_)};
22 std::vector<TrigCaloHit> pass_trig_hits;
23 for (
const auto& tp : hcal_t_ps) {
24 double x{0}, y{0}, z{0};
27 int adc = tp.getPrimitive();
35 pass_trig_hits.emplace_back(x, y, z, energy);
37 pass_trig_hits.back().setLayer(combo_id.
layer());
38 pass_trig_hits.back().setStrip(combo_id.
superstrip());
39 pass_trig_hits.back().setSection(combo_id.section());
42 event.add(pass_coll_name_ +
"Hits", pass_trig_hits);
#define DECLARE_PRODUCER(CLASS)
Macro which allows the framework to construct a producer given its name during configuration.
Hcal clustering algorithm.
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 HCal trigger cell.
int superstrip() const
Get the value of the 'superstrip' field from the ID.
int layer() const
Get the value of the layer field from the ID.
virtual void produce(framework::Event &event)
Process the event and put new data products into it.
virtual void configure(framework::config::Parameters &ps)
Callback for the EventProcessor to configure itself from the given set of parameters.