194 std::vector<raw::RawDigit>
const& rawDigitVector(*rawDigitHandle);
196 std::vector< std::pair<int,int> > ZeroFreq;
203 for (
size_t DigLoop=0; DigLoop < rawDigitVector.size(); ++DigLoop) {
205 int Channel = rawDigitVector[DigLoop].Channel();
206 size_t NADC = rawDigitVector[DigLoop].NADC();
207 double Pedestal = rawDigitVector[DigLoop].GetPedestal();
215 for (
size_t ADCs=0; ADCs < NADC; ++ADCs) {
218 for (
int ww=NADC; ww<16384; ++ww)
226 if (freq < 1000 && BinVal < 1e5) {
237 std::unique_ptr<double[]> Re(
new double[NADC]);
238 std::unique_ptr<double[]> Im(
new double[NADC]);
239 TVirtualFFT *fft = TVirtualFFT::GetCurrentTransform();
240 fft->GetPointsComplex(Re.get(),Im.get());
243 for (
size_t aa=0; aa<ZeroFreq.size(); ++aa) {
244 for (
int bb=ZeroFreq[aa].first; bb<ZeroFreq[aa].second; ++bb) {
248 for (
int cc=0; cc<Range; ++cc) {
249 ReMeanVal += Re[ZeroFreq[aa].first-cc] + Re[ZeroFreq[aa].second+cc];
250 ImMeanVal += Im[ZeroFreq[aa].first-cc] + Im[ZeroFreq[aa].second+cc];
252 ReMeanVal = ReMeanVal / Range;
253 Re[bb] = Re[1500-bb] = ReMeanVal;
254 ImMeanVal = ImMeanVal / Range;
255 Im[bb] = Im[1500-bb] = ImMeanVal;
256 double MagVal =
pow ( Re[bb]*Re[bb] + Im[bb]*Im[bb], 0.5);
268 double freq = 2000. *
bin / NBins;
280 if (TMath::IsNaN(MagVal)) MagVal = 0;
293 TVirtualFFT *fft_back = TVirtualFFT::FFT(1, &NBins,
"C2R");
294 fft_back->SetPointsComplex(Re.get(),Im.get());
295 fft_back->Transform();
297 hb = TH1::TransformHisto(fft_back, hb,
"Re");
298 for (
int BinNum=0; BinNum<NBins; ++BinNum) {
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
TH1F * RawDigitFFTChannelFilter[2048]
Planes which measure Z direction.
TF1 * fColFilterFunc
Parameterized collection filter function.
TF1 * fIndVFilterFunc
Parameterized induction filter function.
TH1F * RawDigitHistos[2048]
View_t View(geo::PlaneID const &pid) const
Returns the view (wire orientation) on the channels of specified TPC plane.
TF1 * fIndUFilterFunc
Parameterized induction filter function.
std::string fDigitModuleInstance
std::string fDigitModuleLabel
TH1F * RawDigitFFTCorrect[2048]
TH1F * RawDigitFFTChannel[2048]
ChannelMappingService::Channel Channel
QTextStream & bin(QTextStream &s)
Namespace collecting geometry-related classes utilities.
TH1F * RawDigitInvFFT[2048]