19 : fSize(pset.
get<int>(
"FFTSize", 0))
20 , fOption(pset.
get<
std::string>(
"FFTOption"))
21 , fFitBins(pset.
get<int>(
"FitBins"))
30 fSize = art::ServiceHandle<detinfo::DetectorPropertiesService const>()
42 fSize = art::ServiceHandle<detinfo::DetectorPropertiesService const>()
45 ReinitializeFFT(fSize, fOption, fFitBins);
53 for (i = 1; i < fSize; i *= 2) {}
55 fFreqSize = fSize / 2 + 1;
58 fFFT =
new TFFTRealComplex(fSize,
false);
59 fInverseFFT =
new TFFTComplexReal(fSize,
false);
63 fFFT->Init(fOption.c_str(), -1, dummy);
64 fInverseFFT->Init(fOption.c_str(), 1, dummy);
66 fPeakFit =
new TF1(
"fPeakFit",
"gaus");
67 fConvHist =
new TH1D(
"fConvHist",
68 "Convolution Peak Data",
73 fCompTemp.resize(fFreqSize);
74 fKern.resize(fFreqSize);
122 double factor = -2.0 * TMath::Pi() * shift / (double)fSize;
124 for (
int i = 0; i < fFreqSize; i++)
125 input[i] *= TComplex::Exp(TComplex(0, factor * (
double)i));
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
void resetSizePerRun(art::Run const &)
void ShiftData(std::vector< TComplex > &input, double shift)
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
LArFFT(fhicl::ParameterSet const &pset, art::ActivityRegistry ®)
void ReinitializeFFT(int, std::string, int)