108 fGenModule = pset.get<std::string>(
"GenModule");
109 fInputLabels = pset.get<std::vector<std::string>>(
"InputLabels");
112 for (
auto const& ch :
113 pset.get<std::vector<unsigned int>>(
"ChannelMasks", std::vector<unsigned int>()))
117 bool useCalibrator = pset.get<
bool>(
"UseCalibrator",
false);
119 auto const&
geometry(*lar::providerFrom<geo::Geometry>());
124 fCalib = lar::providerFrom<calib::IPhotonCalibratorService>();
129 bool areaToPE = pset.get<
bool>(
"AreaToPE");
130 float SPEArea = pset.get<
float>(
"SPEArea");
131 float SPEShift = pset.get<
float>(
"SPEShift", 0.);
143 auto const rise_alg_pset = pset.get_if_present<fhicl::ParameterSet>(
"RiseTimeCalculator");
146 auto const hit_alg_pset = pset.get<fhicl::ParameterSet>(
"HitAlgoPset");
147 std::string threshAlgName = hit_alg_pset.get<std::string>(
"Name");
148 if (threshAlgName ==
"Threshold")
149 fThreshAlg = thresholdAlgorithm<pmtana::AlgoThreshold>(hit_alg_pset, rise_alg_pset);
150 else if (threshAlgName ==
"SiPM")
151 fThreshAlg = thresholdAlgorithm<pmtana::AlgoSiPM>(hit_alg_pset, rise_alg_pset);
152 else if (threshAlgName ==
"SlidingWindow")
153 fThreshAlg = thresholdAlgorithm<pmtana::AlgoSlidingWindow>(hit_alg_pset, rise_alg_pset);
154 else if (threshAlgName ==
"FixedWindow")
155 fThreshAlg = thresholdAlgorithm<pmtana::AlgoFixedWindow>(hit_alg_pset, rise_alg_pset);
156 else if (threshAlgName ==
"CFD")
157 fThreshAlg = thresholdAlgorithm<pmtana::AlgoCFD>(hit_alg_pset, rise_alg_pset);
159 throw art::Exception(art::errors::UnimplementedFeature)
160 <<
"Cannot find implementation for " << threshAlgName <<
" algorithm.\n";
163 auto const ped_alg_pset = pset.get<fhicl::ParameterSet>(
"PedAlgoPset");
164 std::string pedAlgName = ped_alg_pset.get<std::string>(
"Name");
165 if (pedAlgName ==
"Edges")
167 else if (pedAlgName ==
"RollingMean")
169 else if (pedAlgName ==
"UB")
172 throw art::Exception(art::errors::UnimplementedFeature)
173 <<
"Cannot find implementation for " << pedAlgName <<
" algorithm.\n";
175 produces<std::vector<recob::OpHit>>();
const geo::GeometryCore * geometry
unsigned int fMaxOpChannel
void AddRecoAlgo(pmtana::PMTPulseRecoBase *algo, PMTPedestalBase *ped_algo=nullptr)
A method to set pulse reconstruction algorithm.
std::set< unsigned int > fChannelMasks
BEGIN_PROLOG xarapuca_vuv SBNDDecoOpHitFinderXArapuca SPEArea
unsigned int MaxOpChannel() const
Largest optical channel number.
pmtana::PMTPulseRecoBase * fThreshAlg
calib::IPhotonCalibrator const * fCalib
pmtana::PulseRecoManager fPulseRecoMgr
void SetDefaultPedAlgo(pmtana::PMTPedestalBase *algo)
A method to set a choice of pedestal estimation method.
std::vector< std::string > fInputLabels
pmtana::PMTPedestalBase * fPedAlg