195 for (
size_t HistoChan=0; HistoChan<
MyUsefulChans.size(); HistoChan++) {
196 std::stringstream oss;
206 std::vector<raw::RawDigit>
const& rawDigitVector(*rawDigitHandle);
209 std::vector< std::pair<int,int> > ZeroFreq;
216 for (
size_t DigLoop=0; DigLoop < rawDigitVector.size(); ++DigLoop) {
217 int Channel = rawDigitVector[DigLoop].Channel();
218 size_t NADC = rawDigitVector[DigLoop].NADC();
219 double Pedestal = rawDigitVector[DigLoop].GetPedestal();
222 for (
size_t GotChan=0; GotChan<
MyUsefulChans.size(); ++GotChan) {
225 int WhAPA = GotChan/9;
226 int WhPla = (GotChan/3)%3;
227 int PlaIn = GotChan%3;
236 TH1F* hRawDigit =
new TH1F(
"hRawDigit",
"",NADC,0,NADC/2);
237 TH1F* hRawFFT =
new TH1F(
"hRawFFT" ,
"",NADC,0,NADC);
238 for (
size_t ADCs=0; ADCs < NADC; ++ADCs) {
239 hRawDigit -> SetBinContent( ADCs+1, rawDigitVector[DigLoop].ADC(ADCs)-Pedestal );
241 for (
size_t ww=NADC; ww<NADC; ++ww)
242 hRawFFT -> SetBinContent( ww, 0 );
244 hRawDigit -> FFT( hRawFFT ,
"MAG");
245 for (
size_t bin = 0;
bin < NADC; ++
bin) {
246 double BinVal = hRawFFT->GetBinContent(
bin+1);
247 double freq = 2000. *
bin / (double)NADC;
248 if (freq < 1000 && BinVal < 1e5) {
250 RawFFT_Planes -> Fill( (WhAPA*3)+(WhPla*12)+PlaIn+0.5, freq, BinVal );
257 std::unique_ptr<double[]> Re(
new double[NADC]);
258 std::unique_ptr<double[]> Im(
new double[NADC]);
259 TVirtualFFT *fft = TVirtualFFT::GetCurrentTransform();
260 fft->GetPointsComplex(Re.get(),Im.get());
263 for (
size_t aa=0; aa<ZeroFreq.size(); ++aa) {
264 for (
int bb=ZeroFreq[aa].first; bb<ZeroFreq[aa].second; ++bb) {
268 for (
int cc=0; cc<Range; ++cc) {
269 ReMeanVal += Re[ZeroFreq[aa].first-cc] + Re[ZeroFreq[aa].second+cc];
270 ImMeanVal += Im[ZeroFreq[aa].first-cc] + Im[ZeroFreq[aa].second+cc];
272 ReMeanVal = ReMeanVal / Range;
273 Re[bb] = Re[1500-bb] = ReMeanVal;
274 ImMeanVal = ImMeanVal / Range;
275 Im[bb] = Im[1500-bb] = ImMeanVal;
282 for (
size_t bin = 0;
bin < NADC; ++
bin) {
283 double freq = 2000. *
bin / NADC;
295 if (TMath::IsNaN(MagVal)) MagVal = 0;
298 if (freq < 1000 && MagVal < 1e5) {
300 FixFFT_Planes -> Fill( (WhAPA*3)+(WhPla*12)+PlaIn+0.5, freq, MagVal );
std::string fDigitModuleLabel
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
std::vector< int > MyUsefulChans
Planes which measure Z direction.
std::string fDigitModuleInstance
TF1 * fIndUFilterFunc
Parameterized induction filter function.
TF1 * fIndVFilterFunc
Parameterized induction filter function.
TF1 * fColFilterFunc
Parameterized collection filter function.
View_t View(geo::PlaneID const &pid) const
Returns the view (wire orientation) on the channels of specified TPC plane.
ChannelMappingService::Channel Channel
QTextStream & bin(QTextStream &s)
Namespace collecting geometry-related classes utilities.
QTextStream & endl(QTextStream &s)