29 :
public JOmniFactory<PhotoMultiplierHitDigi_factory, PhotoMultiplierHitDigiConfig> {
35 std::unique_ptr<AlgoT> m_algo;
37 PodioInput<edm4hep::EventHeader> m_event_headers_input{
this};
38 PodioInput<edm4hep::SimTrackerHit> m_sim_hits_input{
this};
39 PodioOutput<edm4eic::RawTrackerHit> m_raw_hits_output{
this};
40#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
41 PodioOutput<edm4eic::MCRecoTrackerHitLink> m_links_output{
this};
43 PodioOutput<edm4eic::MCRecoTrackerHitAssociation> m_raw_assocs_output{
this};
45 ParameterRef<std::string> m_detectorName{
this,
"detectorName",
config().detectorName,
""};
46 ParameterRef<std::string> m_readoutClass{
this,
"readoutClass",
config().readoutClass,
""};
47 ParameterRef<double> m_hitTimeWindow{
this,
"hitTimeWindow",
config().hitTimeWindow,
""};
48 ParameterRef<double> m_timeResolution{
this,
"timeResolution",
config().timeResolution,
""};
49 ParameterRef<double> m_speMean{
this,
"speMean",
config().speMean,
""};
50 ParameterRef<double> m_speError{
this,
"speError",
config().speError,
""};
51 ParameterRef<double> m_pedMean{
this,
"pedMean",
config().pedMean,
""};
52 ParameterRef<double> m_pedError{
this,
"pedError",
config().pedError,
""};
53 ParameterRef<bool> m_enablePixelGaps{
this,
"enablePixelGaps",
config().enablePixelGaps,
54 "enable/disable removal of hits in gaps between pixels"};
55 ParameterRef<double> m_safetyFactor{
this,
"safetyFactor",
config().safetyFactor,
56 "overall safety factor"};
57 ParameterRef<bool> m_enableNoise{
this,
"enableNoise",
config().enableNoise,
""};
58 ParameterRef<double> m_noiseRate{
this,
"noiseRate",
config().noiseRate,
""};
59 ParameterRef<double> m_noiseTimeWindow{
this,
"noiseTimeWindow",
config().noiseTimeWindow,
""};
62 Service<AlgorithmsInit_service> m_algorithmsInit{
this};
63 Service<RichGeo_service> m_RichGeoSvc{
this};
67 m_algo = std::make_unique<AlgoT>(
GetPrefix());
68 m_algo->level(
static_cast<algorithms::LogLevel
>(
logger()->level()));
72 m_RichGeoSvc().GetReadoutGeo(
config().detectorName,
config().readoutClass);
73 m_algo->SetVisitRngCellIDs(
76 .GetReadoutGeo(
config().detectorName,
config().readoutClass)
77 ->VisitAllRngPixels(lambda, p);
79 m_algo->SetPixelGapMask(
82 .GetReadoutGeo(
config().detectorName,
config().readoutClass)
83 ->PixelGapMask(cellID, pos);
87 m_algo->applyConfig(
config());
92 m_algo->process({m_event_headers_input(), m_sim_hits_input()}, {m_raw_hits_output().get(),
93#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
94 m_links_output().get(),
96 m_raw_assocs_output().get()});