@@ -200,16 +200,22 @@ struct HfEventSelection : o2::framework::ConfigurableGroup {
200200 const o2::framework::AxisSpec th2AxisCent{th2ConfigAxisCent, " Centrality" };
201201 const o2::framework::AxisSpec th2AxisOccupancy{th2ConfigAxisOccupancy, " Occupancy" };
202202 hCollisionsCentOcc = registry.add <TH2>(NameHistCollisionsCentOcc, " selected events;Centrality; Occupancy" , {o2::framework::HistType::kTH2D , {th2AxisCent, th2AxisOccupancy}});
203+ }
204+
205+ // / \brief Inits the HF event selection object
206+ // / \param registry reference to the histogram registry
207+ void init (o2::framework::HistogramRegistry& registry)
208+ {
209+ // we initialise the RCT checker
210+ rctChecker.init (rctLabel.value , rctCheckZDC.value , rctTreatLimitedAcceptanceAsBad.value );
203211
204212 // we initialise the summary object
205213 if (softwareTrigger.value != " " ) {
206214 zorroSummary.setObject (zorro.getZorroSummary ());
207215 }
208- }
209216
210- void initRctChecker ()
211- {
212- rctChecker.init (rctLabel.value , rctCheckZDC.value , rctTreatLimitedAcceptanceAsBad.value );
217+ // we initialise histograms
218+ addHistograms (registry);
213219 }
214220
215221 // / \brief Applies event selection.
@@ -390,6 +396,9 @@ struct HfEventSelectionMc {
390396 setEventRejectionLabels (hParticles);
391397 }
392398
399+ // / \brief Configures the object from the reco workflow
400+ // / \param registry reference to the histogram registry
401+ // / \param device device spec to get the configs from the reco workflow
393402 void configureFromDevice (const o2::framework::DeviceSpec& device)
394403 {
395404 for (const auto & option : device.options ) {
@@ -419,7 +428,21 @@ struct HfEventSelectionMc {
419428 rctTreatLimitedAcceptanceAsBad = option.defaultValue .get <bool >();
420429 }
421430 }
431+ }
432+
433+ // / \brief Inits the HF event selection object
434+ // / \param device device spec to get the configs from the reco workflow
435+ // / \param registry reference to the histogram registry
436+ void init (const o2::framework::DeviceSpec& device, o2::framework::HistogramRegistry& registry)
437+ {
438+ // we get the configuration from the reco workflow
439+ configureFromDevice (device);
440+
441+ // we initialise the RCT checker
422442 rctChecker.init (rctLabel, rctCheckZDC, rctTreatLimitedAcceptanceAsBad);
443+
444+ // we initialise histograms
445+ addHistograms (registry);
423446 }
424447
425448 // / \brief Function to apply event selections to generated MC collisions
0 commit comments