All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TPCNoiseMC_module.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // Class: TPCNoiseMC
3 // Plugin Type: producer (art v3_05_01)
4 // File: TPCNoiseMC_module.cc
5 //
6 // Generated at Thu Jan 21 16:22:15 2021 by Justin Mueller using cetskelgen
7 // from cetlib version v3_10_00.
8 ////////////////////////////////////////////////////////////////////////
9 
10 // LArSoft Includes
14 #include "lardataobj/RawData/raw.h"
17 #include "cetlib/cpu_timer.h"
22 
23 #include "art/Framework/Core/EDAnalyzer.h"
24 #include "art/Framework/Core/ModuleMacros.h"
25 #include "art/Framework/Principal/Event.h"
26 #include "art/Framework/Principal/Handle.h"
27 #include "art/Framework/Principal/Run.h"
28 #include "art/Framework/Principal/SubRun.h"
29 #include "art_root_io/TFileService.h"
30 #include "art/Framework/Core/ModuleMacros.h"
31 #include "art/Utilities/make_tool.h"
32 #include "canvas/Utilities/InputTag.h"
33 #include "canvas/Persistency/Common/FindManyP.h"
34 #include "messagefacility/MessageLogger/MessageLogger.h"
35 #include "fhiclcpp/ParameterSet.h"
36 #include "cetlib_except/exception.h"
37 
38 // icaruscode Includes
40 
41 // icarus_signal_processing Includes
42 #include "icarus_signal_processing/Filters/ICARUSFFT.h"
43 
44 // ROOT Includes
45 #include "TTree.h"
46 #include "TFile.h"
47 // C++ Includes
48 #include <map>
49 #include <vector>
50 #include <tuple>
51 #include <algorithm>
52 #include <iostream>
53 #include <string>
54 #include <cmath>
55 #include <iostream>
56 #include <fstream>
57 #include <memory>
58 #include <numeric> // std::accumulate
59 
60 namespace TPCNoiseMC {
61  class TPCNoiseMC;
62 }
63 
64 
65 class TPCNoiseMC::TPCNoiseMC : public art::EDAnalyzer {
66 public:
67  explicit TPCNoiseMC(fhicl::ParameterSet const& p);
68  // The compiler-generated destructor is fine for non-base
69  // classes without bare pointers or other resource use.
70 
71  // Plugins should not be copied or assigned.
72  //TPCNoiseMC(TPCNoiseMC const&) = delete;
73  //TPCNoiseMC(TPCNoiseMC&&) = delete;
74  //TPCNoiseMC& operator=(TPCNoiseMC const&) = delete;
75  //TPCNoiseMC& operator=(TPCNoiseMC&&) = delete;
76  void analyze(const art::Event& e);
77  void reconfigure(fhicl::ParameterSet const& pset);
78  void beginJob();
79  // void beginRun();
80  void endJob();
81  // void endRun();
82 
83 private:
84  // Various FHiCL parameters.
85  std::string fRawDigitModuleLabel;
86  std::string fRawDigitProcess;
87  std::string fRawDigitInstance;
88 std::string fHistoFileName;
89 
90 
91  // FFT calculation.
92  using FFTPointer = std::unique_ptr<icarus_signal_processing::ICARUSFFT<double>>;
95 
96  // FFT variables.
97  std::vector< std::vector<float> > fRawPowerC;
98  std::vector< std::vector<float> > fIntrinsicPowerC;
99 std::vector< std::vector<float> > fCoherentPowerC;
100  // FFT variables.
101  std::vector< std::vector<float> > fRawPowerI1;
102  std::vector< std::vector<float> > fIntrinsicPowerI1;
103 std::vector< std::vector<float> > fCoherentPowerI1;
104  // FFT variables.
105  std::vector< std::vector<float> > fRawPowerI2;
106  std::vector< std::vector<float> > fIntrinsicPowerI2;
107 std::vector< std::vector<float> > fCoherentPowerI2;
108 
109 // average FFT histos
117 // average FFT histos
125 // average FFT histos
133  // The variables that will go into the n-tuple.
134  int fEvent;
135  int fRun;
136  int fSubRun;
137  std::vector<float> fPed;
138  std::vector<float> fRawMeanC;
139  std::vector<float> fRawMeanI1;
140  std::vector<float> fRawMeanI2;
141  std::vector<double> fRawRMSC;
142  std::vector<double> fRawRMSI1;
143  std::vector<double> fRawRMSI2;
144  std::vector<double> fRawRMSTrim;
145  std::vector<float> fIntrinsicMean;
146  std::vector<double> fIntrinsicRMSC;
147  std::vector<double> fIntrinsicRMSI1;
148  std::vector<double> fIntrinsicRMSI2;
149  std::vector<double> fIntrinsicRMSTrim;
150  std::vector<float> fCoherentMean;
151  std::vector<double> fCoherentRMSC;
152  std::vector<double> fCoherentRMSI1;
153  std::vector<double> fCoherentRMSI2;
154  std::vector<double> fCoherentRMSTrim;
155  std::vector<unsigned short int> fChannel;
156 
157  // The variables that will go into the power n-tuple.
158  //std::vector< std::vector<float> > fPower;
159  unsigned int NEvents;
160 
161  // The output trees.
162  TTree* fNoiseTree;
166 };
167 
168 
169 TPCNoiseMC::TPCNoiseMC::TPCNoiseMC(fhicl::ParameterSet const& p)
170  : EDAnalyzer(p),
171  NEvents(0)
172 {
173  // Retrieve proper number of time samples.
174  auto const detProp = art::ServiceHandle<detinfo::DetectorPropertiesService const>()->DataForJob();
175  NumberTimeSamples = detProp.NumberTimeSamples();
176 
177  std::cout << "Number of time samples: " << NumberTimeSamples << std::endl;
178 
179  fRawPowerC.resize(1);
180  for(auto &it : fRawPowerC)
181  {
182  it.resize(NumberTimeSamples);
183  }
184 std::cout << " after resizing " << std::endl;
185  fIntrinsicPowerC.resize(1);
186  for(auto &it : fIntrinsicPowerC)
187  {
188  it.resize(NumberTimeSamples);
189  }
190 std::cout << " after resizing " << std::endl;
191  fCoherentPowerC.resize(1);
192  for(auto &it : fCoherentPowerC)
193  {
194  it.resize(NumberTimeSamples);
195  }
196 
197 std::cout << " after resizing " << std::endl;
198  fRawPowerI1.resize(1);
199  for(auto &it : fRawPowerI1)
200  {
201  it.resize(NumberTimeSamples);
202  }
203 std::cout << " after resizing " << std::endl;
204  fIntrinsicPowerI1.resize(1);
205  for(auto &it : fIntrinsicPowerI1)
206  {
207  it.resize(NumberTimeSamples);
208  }
209 std::cout << " after resizing " << std::endl;
210  fCoherentPowerI1.resize(1);
211  for(auto &it : fCoherentPowerI1)
212  {
213  it.resize(NumberTimeSamples);
214  }
215 fCoherentPowerI2.resize(1);
216  for(auto &it : fCoherentPowerI2)
217  {
218  it.resize(NumberTimeSamples);
219  }
220 std::cout << " after resizing " << std::endl;
221  fRawPowerI2.resize(1);
222  for(auto &it : fRawPowerI2)
223  {
224  it.resize(NumberTimeSamples);
225  }
226 std::cout << " after resizing " << std::endl;
227  fIntrinsicPowerI2.resize(1);
228  for(auto &it : fIntrinsicPowerI2)
229  {
230  it.resize(NumberTimeSamples);
231  }
232 std::cout << " after intrinsic i2 resizing " << std::endl;
233 
234  fFFT = std::make_unique<icarus_signal_processing::ICARUSFFT<double>>(NumberTimeSamples);
235  this->reconfigure(p);
236 double freqBin=0.6103515625;
237 fRawPowerHistoC=new TH1D("rawpowerC","rawpowerC",2048,0.,2048*freqBin);
238 fIntrinsicPowerHistoC=new TH1D("intpowerC","intpowerC",2048,0.,2048*freqBin);
239 fCoherentPowerHistoC=new TH1D("cohpowerC","cohpowerC",2048,0.,2048*freqBin);
240 fRawRMSHistoC=new TH1D("rawRMSC","rawRMSC",100,0.,30.);
241 fMediaHistoC=new TH1D("mediaC","mediaC",100,-10.,10.);
242 fIntrinsicRMSHistoC=new TH1D("intRMSC","intRMSC",100,0.,30.);
243 fCoherentRMSHistoC=new TH1D("cohRMSC","cohRMSC",100,0.,30.);
244 fRawPowerHistoI1=new TH1D("rawpowerI1","rawpowerI1",2048,0.,2048*freqBin);
245 fIntrinsicPowerHistoI1=new TH1D("intpowerI1","intpowerI1",2048,0.,2048*freqBin);
246 fCoherentPowerHistoI1=new TH1D("cohpowerI1","cohpowerI1",2048,0.,2048*freqBin);
247 fRawRMSHistoI1=new TH1D("rawRMSI1","rawRMSI1",100,0.,30.);
248 fMediaHistoI1=new TH1D("mediaI1","mediaI1",100,-10.,10.);
249 fIntrinsicRMSHistoI1=new TH1D("intRMSI1","intRMSI1",100,0.,30.);
250 fCoherentRMSHistoI1=new TH1D("cohRMSI1","cohRMSI1",100,0.,30.);
251 fRawPowerHistoI2=new TH1D("rawpowerI2","rawpowerI2",2048,0.,2048*freqBin);
252 fIntrinsicPowerHistoI2=new TH1D("intpowerI2","intpowerI2",2048,0.,2048*freqBin);
253 fCoherentPowerHistoI2=new TH1D("cohpowerI2","cohpowerI2",2048,0.,2048*freqBin);
254 fRawRMSHistoI2=new TH1D("rawRMSI2","rawRMSI2",100,0.,30.);
255 fMediaHistoI2=new TH1D("mediaI2","mediaI2",100,-10.,10.);
256 fIntrinsicRMSHistoI2=new TH1D("intRMSI2","intRMSI2",100,0.,30.);
257 fCoherentRMSHistoI2=new TH1D("cohRMSI2","cohRMSI2",100,0.,30.);
258 
259 std::cout << " end constructor " << std::endl;
260 }
261 
262 void TPCNoiseMC::TPCNoiseMC::analyze(const art::Event& e)
263 {
264 std::cout << " begin analyze " << std::endl;
265  art::ServiceHandle<geo::Geometry> geom;
266 
267  // Clear vectors before filling for this event.
268  fChannel.clear();
269 std::cout << " after clearing " << std::endl;
270  fPed.clear();
271  fRawMeanC.clear();
272 fRawMeanI1.clear();
273 fRawMeanI2.clear();
274  fRawRMSC.clear();
275  fCoherentRMSC.clear();
276  fRawRMSTrim.clear();
277 fRawRMSI1.clear();
278  fCoherentRMSI1.clear();
279 fRawRMSI2.clear();
280  fCoherentRMSI2.clear();
281  fIntrinsicMean.clear();
282  fIntrinsicRMSC.clear();
283 fIntrinsicRMSI1.clear();
284 fIntrinsicRMSI2.clear();
285  fIntrinsicRMSTrim.clear();
286 std::cout << " after clearing " << std::endl;
287 
288  // Fill event level variables.
289  fEvent = e.id().event();
290 std::cout << " event " << fEvent << std::endl;
291  fRun = e.id().run();
292 std::cout << " run " << fRun << std::endl;
293  fSubRun = e.id().subRun();
294  std::cout << " subrun " << fSubRun << std::endl;
295  std::cout << "Processing event " << NEvents+1 << " for TPC Noise Analysis " << " Run " << fRun << ", " << "Event " << fEvent << "." << std::endl;
296 
297 
298  ///////////////////////////
299  // "Raw" RawDigits.
300  ///////////////////////////
301 
302  art::Handle< std::vector<raw::RawDigit> > RawDigitHandle;
303  e.getByLabel(fRawDigitModuleLabel, fRawDigitInstance,fRawDigitProcess, RawDigitHandle);
304 
305  // int ctI1=0; int ctI2=0; int ctC=0;
306  for(const auto& RawDigit : *RawDigitHandle)
307  {
308  // Grab raw waveform, ensuring that the size is set appropriately.
309  unsigned int DataSize = RawDigit.Samples();
310  std::vector<short> RawADC;
311  RawADC.resize(DataSize);
312  raw::Uncompress(RawDigit.ADCs(), RawADC, RawDigit.Compression());
313 
314  // We need a sorted waveform (by absolute value) for the truncated RMS and median calculation.
315  std::vector<short> SortedADC(RawADC);
316  std::sort(SortedADC.begin(),SortedADC.end(),[](const auto& left, const auto& right){return std::fabs(left) < std::fabs(right);});
317  float median(SortedADC.at(SortedADC.size()/2));
318 
319  // Calculate mean values.
320  float mean(float(std::accumulate(SortedADC.begin(),SortedADC.end(),0))/float(SortedADC.size()));
321 std::vector<geo::WireID> widVec = geom->ChannelToWire(RawDigit.Channel());
322  size_t plane = widVec[0].Plane;
323  size_t wire = widVec[0].Wire;
324 size_t tpc = widVec[0].TPC;
325 size_t cryostat = widVec[0].Cryostat;
326 std::cout << " cryo " << cryostat << " tpc " << tpc << " plane " << plane <<" wire " << wire << std::endl;
327  // Remove pedestal of waveform.
328  std::vector<float> ADCLessPed;
329  ADCLessPed.resize(SortedADC.size());
330  std::transform(SortedADC.begin(),SortedADC.end(),ADCLessPed.begin(),std::bind(std::minus<float>(),std::placeholders::_1,median));
331 
332  // Calculate full RMS.
333  float rms(std::sqrt(std::inner_product(ADCLessPed.begin(), ADCLessPed.end(), ADCLessPed.begin(), 0.) / float(ADCLessPed.size())));
334 
335  // Calculate the truncated RMS.
336  unsigned int MinBins((1.0 - 0.01)*ADCLessPed.size());
337  //unsigned int BinsToKeep;
338  //for(BinsToKeep = 0; BinsToKeep < ADCLessPed.size(); ++BinsToKeep)
339  //{
340  // if(std::fabs(ADCLessPed.at(BinsToKeep)) >= 3*rms) break;
341  //}
342  //float truncrms(std::sqrt(std::inner_product(ADCLessPed.begin(), ADCLessPed.begin() + BinsToKeep, ADCLessPed.begin(), 0.) / float(BinsToKeep)));
343  float truncrms(std::sqrt(std::inner_product(ADCLessPed.begin(), ADCLessPed.begin() + MinBins, ADCLessPed.begin(), 0.) / float(MinBins)));
344 
345  // Calculate the power.
346  std::vector<double> power(DataSize);
347  std::vector<double> RawLessPed;
348  RawLessPed.resize(RawADC.size());
349  std::transform(RawADC.begin(),RawADC.end(),RawLessPed.begin(),std::bind(std::minus<double>(),std::placeholders::_1,median));
350  fFFT->getFFTPower(RawLessPed, power);
351 
352 if(plane==0) {
353 std::transform(fRawPowerI1.at(0).begin(), fRawPowerI1.at(0).end(), power.begin(), fRawPowerI1.at(0).begin(), std::plus<float>()); }
354 if(plane==1) { std::transform(fRawPowerI2.at(0).begin(), fRawPowerI2.at(0).end(), power.begin(), fRawPowerI2.at(0).begin(), std::plus<float>()); }
355 if(plane==2) { std::transform(fRawPowerC.at(0).begin(), fRawPowerC.at(0).end(), power.begin(), fRawPowerC.at(0).begin(), std::plus<float>()); }
356 
357 
358  fPed.push_back(median);
359  if(plane==2) fRawMeanC.push_back(mean);
360 if(plane==1) fRawMeanI2.push_back(mean);
361 if(plane==0) fRawMeanI1.push_back(mean);
362  if(plane==2) { fRawRMSC.push_back(rms);}
363  if(plane==0) { fRawRMSI1.push_back(rms); }
364  if(plane==1) { fRawRMSI2.push_back(rms);if(wire==0) for(int j=0;j<4096;j++) std::cout << " wire 0 tick " << j << " signal " << RawADC.at(j) << std::endl;
365  }
366  fRawRMSTrim.push_back(truncrms);
367 
368  fChannel.push_back(RawDigit.Channel());
369 
370  }
371 
372 
373 //std::cout << " cohrms size " << fCoherentRMSC.size() << std::endl;
374 //for(int j=0;j<10;j++) std::cout << " j " << j << " cohrms C " << fCoherentRMSC.at(j) << " cohrms I2 " << fCoherentRMSI2.at(j) << std::endl;
375  fNoiseTree->Fill();
376  ++NEvents;
377 
378  return;
379 
380 }
381 
382 void TPCNoiseMC::TPCNoiseMC::reconfigure(fhicl::ParameterSet const& p)
383 {
384  fRawDigitModuleLabel = p.get< std::string >("RawDigitModuleLabel", std::string("daqTPC"));
385  //std::cerr << "fRawDigitModuleLabel: " << fRawDigitModuleLabel << std::endl;
386  fRawDigitProcess = p.get< std::string >("RawDigitProcess", std::string("decode"));
387  //std::cerr << "fRawDigitProcess: " << fRawDigitProcess << std::endl;
388  fRawDigitInstance = p.get< std::string >("RawDigitInstance", std::string(""));
389 fHistoFileName = p.get< std::string >("HistoFileName");
390 
391  return;
392 
393 }
394 
396 {
397  art::ServiceHandle<art::TFileService> tfs;
398 
399  fNoiseTree = tfs->makeAndRegister<TTree>("TPCNoiseMC_t", "TPC Noise");
400  fRawPowerTree = tfs->makeAndRegister<TTree>("TPCRawPower_t", "TPC Raw Power");
401  fIntrinsicPowerTree = tfs->makeAndRegister<TTree>("TPCIntrinsicPower_t", "TPC Intrinsic Power");
402 fCoherentPowerTree = tfs->makeAndRegister<TTree>("TPCCoherentPower_t", "TPC Coherent Power");
403 
404  // Initialize branches of the noise TTree.
405  fNoiseTree->Branch("Event", &fEvent, "Event/I");
406  fNoiseTree->Branch("Run", &fRun, "Run/I");
407  fNoiseTree->Branch("SubRun", &fSubRun, "SubRun/I");
408  fNoiseTree->Branch("Channel", &fChannel);
409  fNoiseTree->Branch("Pedestal", &fPed);
410  fNoiseTree->Branch("RawMeanC", &fRawMeanC);
411  fNoiseTree->Branch("RawRMSC", &fRawRMSC);
412 
413  fNoiseTree->Branch("RawTrimmedRMS", &fRawRMSTrim);
414  fNoiseTree->Branch("IntrinsicMean", &fIntrinsicMean);
415  fNoiseTree->Branch("IntrinsicRMSC", &fIntrinsicRMSC);
416  fNoiseTree->Branch("IntrinsicTrimmedRMS", &fIntrinsicRMSTrim);
417 
418  return;
419 }
420 
422 {
423 double freqBin=0.6103515625;
424  // Average the power vectors.
425  std::cout << "Averaging power vectors..." << std::endl;
426  std::vector<float> TMPVect;
427  fRawPowerTree->Branch("Power", &TMPVect);
428  for(auto &it : fRawPowerC)
429  {
430  std::transform(it.begin(), it.end(), it.begin(), std::bind(std::divides<float>(), std::placeholders::_1, NEvents));
431  TMPVect = it;
432  // fRawPowerTree->Fill();
433  std::cout << " tmpvect size " << TMPVect.size() << std::endl;
434 for(unsigned int jv=0;jv<TMPVect.size();jv++)
435  fRawPowerHistoC->Fill(jv*freqBin,TMPVect[jv]);
436  }
437 std::cout << " after filling raw power histo " << std::endl;
438 
439 
440 std::cout << " frawrmsc size " << fRawRMSC.size() << std::endl;
441  for(unsigned int jj=0;jj<fRawRMSC.size();jj++)
442  fRawRMSHistoC->Fill(fRawRMSC.at(jj));
443 std::cout << " after filling raw rms histo " << std::endl;
444 for(unsigned int j=0;j<fRawMeanC.size(); j++) {
445 std::cout << " filling media " << std::endl;
446  fMediaHistoC->Fill(fRawMeanC.at(j));
447 }
448 std::cout << " after filling media histo " << std::endl;
449 
450  // Average the power vectors.
451  std::cout << "Averaging power vectors..." << std::endl;
452  //std::vector<float> TMPVect;
453  fRawPowerTree->Branch("Power", &TMPVect);
454 int count=0;
455  for(auto &it : fRawPowerI1)
456  {
457  std::cout << " i1 counter " << count++ << std::endl;
458  std::transform(it.begin(), it.end(), it.begin(), std::bind(std::divides<float>(), std::placeholders::_1, NEvents));
459  TMPVect = it;
460  // fRawPowerTree->Fill();
461  // std::cout << " tmpvect size " << TMPVect.size() << std::endl;
462 for(unsigned int jv=0;jv<TMPVect.size();jv++)
463  fRawPowerHistoI1->Fill(jv*freqBin,TMPVect[jv]);
464  }
465 std::cout << " after filling raw power histo " << std::endl;
466 
467 
468 std::cout << " rawrmsi1 size " << fRawRMSI1.size() << std::endl;
469  for(unsigned int jj=0;jj<fRawRMSI1.size();jj++) {
470 std::cout << " filling rawrmsi1 value " << fRawRMSI1.at(jj) << std::endl;
471  fRawRMSHistoI1->Fill(fRawRMSI1.at(jj));
472 }
473 std::cout << " after filling raw rms histo entries " << fRawRMSHistoI1->GetEntries() << std::endl;
474 for(unsigned int j=0;j<fRawMeanI1.size(); j++) {
475 //std::cout << " filling media " << std::endl;
476  fMediaHistoI1->Fill(fRawMeanI1.at(j));
477 }
478 std::cout << " after filling media histo " << std::endl;
479 
480 for(unsigned int jj=0;jj<fIntrinsicRMSI1.size();jj++)
481  fIntrinsicRMSHistoI1->Fill(fIntrinsicRMSI1.at(jj));
482 
483 std::cout << " fillhisto cohrms size " << fCoherentRMSI1.size() << std::endl;
484 
485 for(unsigned int j=0;j<fCoherentRMSI1.size();j++) {
486 std::cout << " filling coherent RMS " << fCoherentRMSI1.at(j) << std::endl;
487  fCoherentRMSHistoI1->Fill(fCoherentRMSI1.at(j));
488 }
489 
490  // Average the power vectors.
491  std::cout << "Averaging power vectors..." << std::endl;
492  //std::vector<float> TMPVect;
493  fRawPowerTree->Branch("Power", &TMPVect);
494  for(auto &it : fRawPowerI2)
495  {
496  std::transform(it.begin(), it.end(), it.begin(), std::bind(std::divides<float>(), std::placeholders::_1, NEvents));
497  TMPVect = it;
498  // fRawPowerTree->Fill();
499  std::cout << " tmpvect size " << TMPVect.size() << std::endl;
500 for(unsigned int jv=0;jv<TMPVect.size();jv++)
501  fRawPowerHistoI2->Fill(jv*freqBin,TMPVect[jv]);
502  }
503 std::cout << " after filling raw power histo " << std::endl;
504 
505  for(unsigned int jj=0;jj<fRawRMSI2.size();jj++)
506  fRawRMSHistoI2->Fill(fRawRMSI2.at(jj));
507 std::cout << " after filling raw rms histo " << std::endl;
508 for(unsigned int j=0;j<fRawMeanI2.size(); j++) {
509 //std::cout << " filling media " << std::endl;
510  fMediaHistoI2->Fill(fRawMeanI2.at(j));
511 }
512 std::cout << " after filling media histo " << std::endl;
513 
514  TFile *f = new TFile(fHistoFileName.c_str(),"RECREATE");
515 
516 std::cout << " coherent rms histo entries "<< std::endl;
517 
518  fRawPowerHistoI2->Write();
519 
520  fRawRMSHistoI2->Write();
521 fMediaHistoI2->Write();
522 
523 
524 std::cout << " after filling i2 histos " << std::endl;
525 
526  fRawPowerHistoI1->Write();
527 
528  fRawRMSHistoI1->Write();
529 fMediaHistoI1->Write();
530 
531 
532 std::cout << " after filling i1 histos " << std::endl;
533 
534  fRawPowerHistoC->Write();
535 
536  fRawRMSHistoC->Write();
537 fMediaHistoC->Write();
538 
539  f->Close();
540  f->Delete();
541 std::cout << " after filling c histos " << std::endl;
542  std::cout << "Ending job..." << std::endl;
543 //exit(11);
544  return;
545 }
546 
547 DEFINE_ART_MODULE(TPCNoiseMC::TPCNoiseMC)
std::unique_ptr< icarus_signal_processing::ICARUSFFT< double >> FFTPointer
std::vector< std::vector< float > > fRawPowerC
static constexpr Sample_t transform(Sample_t sample)
std::vector< double > fCoherentRMSC
std::vector< float > fRawMeanC
std::vector< std::vector< float > > fCoherentPowerI1
std::vector< std::vector< float > > fRawPowerI2
std::vector< float > fRawMeanI2
std::vector< double > fIntrinsicRMSC
std::vector< double > fCoherentRMSTrim
std::vector< float > fRawMeanI1
walls no right
Definition: selectors.fcl:105
pdgs p
Definition: selectors.fcl:22
Definition of basic raw digits.
TPCNoiseMC(fhicl::ParameterSet const &p)
std::vector< double > fIntrinsicRMSTrim
std::vector< std::vector< float > > fCoherentPowerC
void analyze(const art::Event &e)
std::vector< double > fCoherentRMSI2
void reconfigure(fhicl::ParameterSet const &pset)
std::vector< std::vector< float > > fCoherentPowerI2
std::vector< std::vector< float > > fRawPowerI1
std::vector< double > fRawRMSC
std::vector< double > fIntrinsicRMSI1
std::vector< double > fCoherentRMSI1
Collect all the RawData header files together.
std::vector< float > fCoherentMean
std::vector< std::vector< float > > fIntrinsicPowerI1
walls no left
Definition: selectors.fcl:105
Definition of data types for geometry description.
std::vector< double > fRawRMSI2
double mean(const std::vector< short > &wf, size_t start, size_t nsample)
Definition: UtilFunc.cxx:13
std::vector< float > fIntrinsicMean
std::vector< unsigned short int > fChannel
std::vector< std::vector< float > > fIntrinsicPowerC
std::vector< double > fRawRMSTrim
do i e
art::ServiceHandle< art::TFileService > tfs
std::size_t count(Cont const &cont)
void Uncompress(const std::vector< short > &adc, std::vector< short > &uncompressed, raw::Compress_t compress)
Uncompresses a raw data buffer.
Definition: raw.cxx:776
std::vector< double > fIntrinsicRMSI2
std::vector< double > fRawRMSI1
art framework interface to geometry description
BEGIN_PROLOG could also be cout
auto const detProp
std::vector< float > fPed
std::vector< std::vector< float > > fIntrinsicPowerI2