13 #ifndef TpcMonitor_module 14 #define TpcMonitor_module 31 #include "art_root_io/TFileService.h" 33 #include "canvas/Persistency/Common/FindManyP.h" 43 #include "TLorentzVector.h" 49 #include "TProfile2D.h" 61 #pragma link C++ class vector<vector<int> >+; 215 float rmsADC(std::vector< short > & uncompressed);
216 float meanADC(std::vector< short > & uncompressed);
217 void calculateFFT(TH1D* hist_waveform, TH1D* graph_frequency);
218 void FillChannelHistos(TProfile*
h1,
double mean,
double sigma,
int& ndeadchannels,
int& nnoisychannels_sigma,
int& nnoisychannels_counts);
283 for(
unsigned int i=0;i<
fNofAPA;i++)
301 fStuckCodeOffFrac.push_back(tfs->make<TH1F>(Form(
"fStuckCodeOffFrac%d",j),Form(
"Stuck-Off Code Fraction APA%d",j),100,0,1));
302 fStuckCodeOnFrac.push_back(tfs->make<TH1F>(Form(
"fStuckCodeOnFrac%d",j),Form(
"Stuck-On Code Fraction APA%d",j),100,0,1));
305 fChanRMSU_pfx.push_back(tfs->make<TProfile>(Form(
"fChanRMSU%d_pfx", j),Form(
"Profiled raw-ped RMS vs Channel(Plane U, APA%d)", j), UChMax - UChMin + 1, UChMin-0.5, UChMax+0.5,
"s"));
306 fChanMeanU_pfx.push_back(tfs->make<TProfile>(Form(
"fChanMeanU%d_pfx",j),Form(
"Profiled raw-ped MEAN vs Channel(Plane U, APA%d)",j), UChMax - UChMin + 1, UChMin-0.5, UChMax+0.5,
"s"));
307 fChanFFTU.push_back(tfs->make<TH2F>(Form(
"fChanFFTU%d", j),Form(
"fChanFFT (Plane U, APA%d)", j), UChMax - UChMin + 1, UChMin-0.5, UChMax+0.5,
fNticks/2,0,
fNticks/2*
fBinWidth));
308 fChanMeanDistU.push_back(tfs->make<TH1F>(Form(
"fChanMeanDistU%d",j),Form(
"Means of Channels in (Plane U, APA%d)",j), 4096, -0.5, 4095.5));
309 fChanRMSDistU.push_back(tfs->make<TH1F>(Form(
"fChanRMSDistU%d",j),Form(
"RMSs of Channels in (Plane U, APA%d)",j), 100, 0, 50));
310 fChanStuckCodeOffFracU.push_back(tfs->make<TProfile>(Form(
"fChanStuckCodeOffFracU%d",j),Form(
"Stuck-Off Code Fraction (Plane U, APA%d)",j), UChMax - UChMin + 1, UChMin-0.5, UChMax+0.5,
"s"));
311 fChanStuckCodeOnFracU.push_back(tfs->make<TProfile>(Form(
"fChanStuckCodeOnFracU%d",j),Form(
"Stuck-On Code Fraction (Plane U, APA%d)",j), UChMax - UChMin + 1, UChMin-0.5, UChMax+0.5,
"s"));
314 fChanRMSV_pfx.push_back(tfs->make<TProfile>(Form(
"fChanRMSV%d_pfx",j),Form(
"Profiled raw-ped RMS vs Channel(Plane V, APA%d)",j), VChMax - VChMin + 1, VChMin-0.5, VChMax+0.5,
"s"));
315 fChanMeanV_pfx.push_back(tfs->make<TProfile>(Form(
"fChanMeanV%d_pfx",j),Form(
"Profiled raw-ped Mean vs Channel(Plane V, APA%d)",j), VChMax - VChMin + 1, VChMin-0.5, VChMax+0.5,
"s"));
316 fChanFFTV.push_back(tfs->make<TH2F>(Form(
"fChanFFTV%d", j),Form(
"fChanFFT (Plane V, APA%d)", j), VChMax - VChMin + 1, VChMin-0.5, VChMax+0.5,
fNticks/2,0,
fNticks/2*
fBinWidth));
317 fChanMeanDistV.push_back(tfs->make<TH1F>(Form(
"fChanMeanDistV%d",j),Form(
"Means of Channels in (Plane V, APA%d)",j), 4096, -0.5, 4095.5));
318 fChanRMSDistV.push_back(tfs->make<TH1F>(Form(
"fChanRMSDistV%d",j),Form(
"RMSs of Channels in (Plane V, APA%d)",j), 100, 0, 50));
319 fChanStuckCodeOffFracV.push_back(tfs->make<TProfile>(Form(
"fChanStuckCodeOffFracV%d",j),Form(
"Stuck-Off Code Fraction (Plane V, APA%d)",j), VChMax - VChMin + 1, VChMin-0.5, VChMax+0.5,
"s"));
320 fChanStuckCodeOnFracV.push_back(tfs->make<TProfile>(Form(
"fChanStuckCodeOnFracV%d",j),Form(
"Stuck-On Code Fraction (Plane V, APA%d)",j), VChMax - VChMin + 1, VChMin-0.5, VChMax+0.5,
"s"));
323 fChanRMSZ_pfx.push_back(tfs->make<TProfile>(Form(
"fChanRMSZ%d_pfx",j),Form(
"Profiled raw-ped RMS vs Channel(Plane Z, APA%d)",j), ZChMax - ZChMin + 1, ZChMin-0.5, ZChMax+0.5,
"s"));
324 fChanMeanZ_pfx.push_back(tfs->make<TProfile>(Form(
"fChanMeanZ%d_pfx",j),Form(
"Profiled raw-ped Mean vs Channel(Plane Z, APA%d)",j), ZChMax - ZChMin + 1, ZChMin-0.5, ZChMax+0.5,
"s"));
325 fChanFFTZ.push_back(tfs->make<TH2F>(Form(
"fChanFFTZ%d", j),Form(
"fChanFFT (Plane Z, APA%d)", j), ZChMax - ZChMin + 1, ZChMin-0.5, ZChMax+0.5,
fNticks/2,0,
fNticks/2*
fBinWidth));
326 fChanMeanDistZ.push_back(tfs->make<TH1F>(Form(
"fChanMeanDistZ%d",j),Form(
"Means of Channels in (Plane Z, APA%d)",j), 4096, -0.5, 4095.5));
327 fChanRMSDistZ.push_back(tfs->make<TH1F>(Form(
"fChanRMSDistZ%d",j),Form(
"RMSs of Channels in (Plane Z, APA%d)",j), 100, 0, 50));
328 fChanStuckCodeOffFracZ.push_back(tfs->make<TProfile>(Form(
"fChanStuckCodeOffFracZ%d",j),Form(
"Stuck-Off Code Fraction (Plane Z, APA%d)",j), ZChMax - ZChMin + 1, ZChMin-0.5, ZChMax+0.5,
"s"));
329 fChanStuckCodeOnFracZ.push_back(tfs->make<TProfile>(Form(
"fChanStuckCodeOnFracZ%d",j),Form(
"Stuck-On Code Fraction (Plane Z, APA%d)",j), ZChMax - ZChMin + 1, ZChMin-0.5, ZChMax+0.5,
"s"));
338 fChanFFTU[i]->GetXaxis()->SetTitle(
"Chan");
fChanFFTU[i]->GetYaxis()->SetTitle(
"kHz");
339 fChanFFTV[i]->GetXaxis()->SetTitle(
"Chan");
fChanFFTV[i]->GetYaxis()->SetTitle(
"kHz");
340 fChanFFTZ[i]->GetXaxis()->SetTitle(
"Chan");
fChanFFTZ[i]->GetYaxis()->SetTitle(
"kHz");
364 fAllChanMean = tfs->make<TProfile2D>(
"fAllChanMean",
"Means for all channels", 240, -0.5, 239.5, 64, -0.5, 63.5);
365 fAllChanRMS = tfs->make<TProfile2D>(
"fAllChanRMS",
"RMS for all channels", 240, -0.5, 239.5, 64, -0.5, 63.5);
378 for(
int i=0;i<12;i++)
380 fBitValue.push_back(tfs->make<TProfile2D>(Form(
"fBitValue%d",i),Form(
"Values for bit %d",i),240,-0.5,239.5,64,-0.5,63.5,0,1));
382 fBitValue[i]->GetXaxis()->SetTitle(
"APA Number (online)");
fBitValue[i]->GetYaxis()->SetTitle(
"Plane");
fBitValue[i]->GetZaxis()->SetTitle(
"Bit Fraction On");
383 fBitValue[i]->GetXaxis()->SetLabelSize(.075);
fBitValue[i]->GetYaxis()->SetLabelSize(.05);
384 fBitValue[i]->GetXaxis()->SetBinLabel(40,
"3");
fBitValue[i]->GetXaxis()->SetBinLabel(120,
"2");
fBitValue[i]->GetXaxis()->SetBinLabel(200,
"1");
385 fBitValue[i]->GetYaxis()->SetBinLabel(5,
"U");
fBitValue[i]->GetYaxis()->SetBinLabel(15,
"V");
fBitValue[i]->GetYaxis()->SetBinLabel(26,
"Z");
386 fBitValue[i]->GetYaxis()->SetBinLabel(37,
"U");
fBitValue[i]->GetYaxis()->SetBinLabel(47,
"V");
fBitValue[i]->GetYaxis()->SetBinLabel(58,
"Z");
390 for(
int i=0;i<30;i++) {
394 fSlotChanMean_pfx.push_back(tfs->make<TProfile>(Form(
"APA%d_Slot%d_Mean", apaloc, slotloc), Form(
"APA %d Slot%d Mean_vs_SlotChannel", apaloc, slotloc), 512, 0, 512,
"s"));
395 fSlotChanRMS_pfx.push_back(tfs->make<TProfile>(Form(
"APA%d_Slot%d_RMS", apaloc, slotloc), Form(
"APA %d Slot %d RMS_vs_SlotChannel", apaloc, slotloc), 512, 0, 512,
"s"));
403 unsigned int fembmap_by_fiberID[120] =
405 320,315,310,305,319,314,309,304,318,313,308,303,317,312,307,302,316,311,306,301,505,510,515,520,504,509,514,519,503,508,513,518,502,507,512,517,501,506,511,516,220,215,210,205,219,
406 214,209,204,218,213,208,203,217,212,207,202,216,211,206,201,605,610,615,620,604,609,614,619,603,608,613,618,602,607,612,617,601,606,611,616,120,115,110,105,119,114,109,104,118,113,
407 108,103,117,112,107,102,116,111,106,101,405,410,415,420,404,409,414,419,403,408,413,418,402,407,412,417,401,406,411,416
412 for(
int i=0;i<120;i++) {
413 unsigned int imb = fembmap_by_fiberID[i];
421 for (
int i=0;i<6;++i)
428 fNTicksTPC = tfs->make<TH1F>(
"NTicksTPC",
"NTicks in TPC Channels",100,0,20000);
431 fNDeadChannelsHisto = tfs->make<TH1F>(
"fNDeadChannelsHisto",
"Number of dead channels",fNofAPA+1,0,fNofAPA+1);
432 fNDeadChannelsHisto->GetYaxis()->SetTitle(
"Number of dead channels");
438 fNDeadChannelsHistoU = tfs->make<TH1F>(
"fNDeadChannelsHistoU",
"Number of dead channels (Plane U)",fNofAPA+1,0,fNofAPA+1);
445 fNDeadChannelsHistoV = tfs->make<TH1F>(
"fNDeadChannelsHistoV",
"Number of dead channels (Plane V)",fNofAPA+1,0,fNofAPA+1);
452 fNDeadChannelsHistoZ = tfs->make<TH1F>(
"fNDeadChannelsHistoZ",
"Number of dead channels (Plane Z)",fNofAPA+1,0,fNofAPA+1);
466 for(
unsigned int i=0;i<
fNofAPA;i++){
468 TString apastring = Form(
"APA %i", j);
469 fNDeadChannelsHisto->GetXaxis()->SetBinLabel(j+1, apastring.Data());
507 fNticks = detProp.NumberTimeSamples();
526 <<
"-------------------- TPC TpcMonitor -------------------";
530 fEvent =
event.id().event();
537 auto RawTPC =
event.getHandle< std::vector<raw::RawDigit> >(itag1);
541 auto RDStatusHandle =
event.getHandle< std::vector<raw::RDStatus> >(itag1);
545 std::vector< art::Ptr<raw::RawDigit> >
RawDigits;
550 int xEdgeAPA[6] = {0,0,80,80,160,160};
552 int yEdgeAPA[2] = {0,32};
556 for (
auto const& rdstatus : (*RDStatusHandle) )
558 if (rdstatus.GetCorruptDataDroppedFlag())
560 MF_LOG_INFO(
"TpcMonitor_module: ") <<
"Corrupt Data Dropped Flag set in RDStatus";
568 for(
auto const & dptr : RawDigits) {
572 uint32_t chan = digit.
Channel();
574 int nSamples = digit.
Samples();
580 std::vector<short> uncompressed(nSamples);
589 std::vector<short> uncompPed(nSamples);
593 for (
int i=0; i<nSamples; i++)
595 auto adc=uncompressed.at(i);
596 auto adcl6b =
adc & 0x3F;
597 if (adcl6b == 0) ++nstuckoff;
598 if (adcl6b == 0x3F) ++nstuckon;
599 uncompPed.at(i) =
adc - pedestal;
601 float fracstuckoff = ((
float) nstuckoff)/((
float) nSamples);
602 float fracstuckon = ((
float) nstuckon)/((
float) nSamples);
609 TH1D* histwav=
new TH1D(Form(
"wav%d",(
int)chan),Form(
"wav%d",(
int)chan),nSamples,0,nSamples);
612 histwav->SetBinContent(
k+1, uncompPed.at(
k));
618 TH1D* histfft=
new TH1D(Form(
"fft%d",(
int)chan),Form(
"fft%d",(
int)chan),nSamples,0,nSamples*
fBinWidth);
640 int iFEMB = ((WIB*4)+(FEMB-1));
649 for (
int i=0; i<nSamples; i++)
651 auto adc=uncompressed.at(i);
656 int bit = (bitstring%2);
658 bitstring = (bitstring/2);
673 for(
int l=0;
l<nSamples/2;
l++) {
675 fChanFFTU[apa]->Fill(chan, (
l+0.5)*fBinWidth, histfft->GetBinContent(
l+1));
690 for(
int l=0;
l<nSamples/2;
l++) {
692 fChanFFTV[apa]->Fill(chan, (
l+0.5)*fBinWidth, histfft->GetBinContent(
l+1));
707 for(
int l=0;
l<nSamples/2;
l++) {
709 fChanFFTZ[apa]->Fill(chan, (
l+0.5)*fBinWidth, histfft->GetBinContent(
l+1));
718 uint32_t SlotChannelNumber = FiberNumber*128 + FiberChannelNumber;
723 for(
int l=0;
l<nSamples/2;
l++) {
740 int n = uncomp.size();
742 for(
int i = 0; i <
n; i++){
743 if(uncomp[i]!=0) sum += uncomp[i];
745 float mean = sum /
n;
747 for(
int i = 0; i <
n; i++)
749 if (uncomp[i]!=0) sum += (uncomp[i]-
mean)*(uncomp[i]-mean);
751 return sqrt(sum / n);
758 int n = uncomp.size();
760 for(
int i = 0; i <
n; i++)
762 if (uncomp[i]!=0) sum +=
abs(uncomp[i]);
771 int n_bins = hist_waveform->GetNbinsX();
772 TH1* hist_transform = 0;
775 hist_transform = hist_waveform->FFT(hist_transform,
"MAG");
776 hist_transform ->
Scale (1.0 /
float(n_bins));
777 int nFFT=hist_transform->GetNbinsX();
784 for (
int k = 0;
k < nFFT/2;
k++){
787 amplitude = hist_transform->GetBinContent(
k+1);
788 amplitudeLog = 20*log10(amplitude);
789 hist_frequency->Fill(frequency, amplitudeLog);
792 hist_transform->Delete();
801 TString htitle = h1->GetTitle();
803 for(Int_t j=1; j <= h1->GetNbinsX(); j++){
805 int fChannelID = h1->GetBinCenter(j);
806 double fChannelValue = h1->GetBinContent(j);
808 if(fChannelValue == 0){
813 if(fChannelValue > rms_threshold){
814 nnoisychannels_sigma++;
817 if(htitle.Contains(
"Plane U"))
821 nnoisychannels_counts++;
825 else if(htitle.Contains(
"Plane V"))
829 nnoisychannels_counts++;
833 else if(htitle.Contains(
"Plane Z"))
837 nnoisychannels_counts++;
843 <<
" Unknown histogram title: " << htitle.Data() <<
std::endl;
856 int FEMBchanToHistogram[128][2] = { {0,0},{0,1},{0,2},{0,3},{0,4},
857 {0,10},{0,11},{0,12},{0,13},{0,14},
858 {0,20},{0,21},{0,22},{0,23},{0,24},{0,25},
859 {0,5},{0,6},{0,7},{0,8},{0,9},
860 {0,15},{0,16},{0,17},{0,18},{0,19},
861 {0,26},{0,27},{0,28},{0,29},{0,30},{0,31},
862 {1,20},{1,21},{1,22},{1,23},{1,24},{1,25},
863 {1,10},{1,11},{1,12},{1,13},{1,14},
864 {1,0},{1,1},{1,2},{1,3},{1,4},
865 {1,26},{1,27},{1,28},{1,29},{1,30},{1,31},
866 {1,15},{1,16},{1,17},{1,18},{1,19},
867 {1,5},{1,6},{1,7},{1,8},{1,9},
868 {2,0},{2,1},{2,2},{2,3},{2,4},
869 {2,10},{2,11},{2,12},{2,13},{2,14},
870 {2,20},{2,21},{2,22},{2,23},{2,24},{2,25},
871 {2,5},{2,6},{2,7},{2,8},{2,9},
872 {2,15},{2,16},{2,17},{2,18},{2,19},
873 {2,26},{2,27},{2,28},{2,29},{2,30},{2,31},
874 {3,20},{3,21},{3,22},{3,23},{3,24},{3,25},
875 {3,10},{3,11},{3,12},{3,13},{3,14},
876 {3,0},{3,1},{3,2},{3,3},{3,4},
877 {3,26},{3,27},{3,28},{3,29},{3,30},{3,31},
878 {3,15},{3,16},{3,17},{3,18},{3,19},
879 {3,5},{3,6},{3,7},{3,8},{3,9} };
880 return FEMBchanToHistogram[FEMBchan][
coord];
887 std::vector<double> fURMS_mean; std::vector<double> fURMS_sigma;
888 std::vector<double> fVRMS_mean; std::vector<double> fVRMS_sigma;
889 std::vector<double> fZRMS_mean; std::vector<double> fZRMS_sigma;
890 for(
unsigned int i = 0; i <
fNofAPA; i++){
893 fURMS_mean.push_back(h1->GetMean());
894 fURMS_sigma.push_back(h1->GetRMS());
897 fVRMS_mean.push_back(h2->GetMean());
898 fVRMS_sigma.push_back(h2->GetRMS());
901 fZRMS_mean.push_back(h3->GetMean());
902 fZRMS_sigma.push_back(h3->GetRMS());
905 std::vector<int> fUdch_vec; std::vector<int> fUnch_vec; std::vector<int> fUcch_vec;
906 std::vector<int> fVdch_vec; std::vector<int> fVnch_vec; std::vector<int> fVcch_vec;
907 std::vector<int> fZdch_vec; std::vector<int> fZnch_vec; std::vector<int> fZcch_vec;
909 for(
unsigned int i = 0; i <
fNofAPA; i++){
910 int ndeadchannels = 0;
int nnoisychannels = 0;
int nnoisychannels_counts = 0;
914 FillChannelHistos(h1, fURMS_mean.at(i), fURMS_sigma.at(i), ndeadchannels, nnoisychannels, nnoisychannels_counts);
915 fUdch_vec.push_back(ndeadchannels);
916 fUnch_vec.push_back(nnoisychannels);
917 fUcch_vec.push_back(nnoisychannels_counts);
920 ndeadchannels = 0; nnoisychannels = 0; nnoisychannels_counts = 0;
922 FillChannelHistos(h2, fVRMS_mean.at(i), fVRMS_sigma.at(i), ndeadchannels, nnoisychannels, nnoisychannels_counts);
923 fVdch_vec.push_back(ndeadchannels);
924 fVnch_vec.push_back(nnoisychannels);
925 fVcch_vec.push_back(nnoisychannels_counts);
928 ndeadchannels = 0; nnoisychannels = 0; nnoisychannels_counts = 0;
930 FillChannelHistos(h3, fZRMS_mean.at(i), fZRMS_sigma.at(i), ndeadchannels, nnoisychannels, nnoisychannels_counts);
931 fZdch_vec.push_back(ndeadchannels);
932 fZnch_vec.push_back(nnoisychannels);
933 fZcch_vec.push_back(nnoisychannels_counts);
937 for(
unsigned int i = 0; i <
fNofAPA; i++){
939 int nch = fUdch_vec.at(i) + fVdch_vec.at(i) + fZdch_vec.at(i);
941 nch = fUnch_vec.at(i) + fVnch_vec.at(i) + fZnch_vec.at(i);
943 nch = fUcch_vec.at(i) + fVcch_vec.at(i) + fZcch_vec.at(i);
971 #endif // TpcMonitore_module std::vector< TProfile * > fChanStuckCodeOnFracZ
TH1F * fNDeadChannelsHistoZ
std::vector< TH2F * > fChanFFTV
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
const ADCvector_t & ADCs() const
Reference to the compressed ADC count vector.
std::vector< TH2F * > fChanFFTU
ULong64_t Samples() const
Number of samples in the uncompressed ADC data.
TProfile2D * fAllChanMean
Collection of charge vs time digitized from a single readout channel.
std::vector< TProfile * > fFFT_by_Fiber_pfx
std::vector< TH1F * > fStuckCodeOffFrac
unsigned int FiberIdFromOfflineChannel(unsigned int offlineChannel) const
Returns global fiber ID.
double rms(sqlite3 *db, std::string const &table_name, std::string const &column_name)
unsigned int FEMBChannelFromOfflineChannel(unsigned int offlineChannel) const
Returns FEMB channel.
TH1F * fNDeadChannelsList
std::vector< TProfile * > fChanStuckCodeOffFracU
float meanADC(std::vector< short > &uncompressed)
std::vector< TProfile * > fChanMeanZ_pfx
auto coord(Vector &v, unsigned int n) noexcept
Returns an object to manage the coordinate n of a vector.
TH1F * fNNoisyChannelsHistoFromNSigma
std::vector< TProfile * > fChanStuckCodeOnFracV
ChannelID_t Channel() const
DAQ channel this raw data was read from.
std::vector< raw::RawDigit > RawDigits
std::vector< geo::WireID > ChannelToWire(raw::ChannelID_t const channel) const
Returns a list of wires connected to the specified TPC channel.
Planes which measure Z direction.
TH1F * fNNoisyChannelsHistoFromNCountsV
std::vector< TProfile * > fChanMeanV_pfx
std::vector< TH1F * > fChanMeanDistU
Scale(size_t pos, T factor) -> Scale< T >
EDAnalyzer(fhicl::ParameterSet const &pset)
void beginRun(const art::Run &run)
unsigned int Ncryostats() const
Returns the number of cryostats in the detector.
TH1F * fNNoisyChannelsHistoFromNCounts
std::vector< TH2F * > fPersistentFFT_by_APA
art framework interface to geometry description
unsigned int Nchannels() const
Returns the number of TPC readout channels in the detector.
std::vector< TH1F * > fChanRMSDistU
TH1F * fNDeadChannelsHisto
TH1F * fNNoisyChannelsHistoFromNCountsZ
unsigned int nADC_uncompPed
std::vector< TProfile * > fChanStuckCodeOffFracV
int fNoiseLevelMinNCountsV
TH1F * fNNoisyChannelsHistoFromNSigmaU
unsigned int SlotIdFromOfflineChannel(unsigned int offlineChannel) const
Returns global slot ID.
#define DEFINE_ART_MODULE(klass)
std::vector< TProfile * > fChanStuckCodeOnFracU
std::vector< TProfile * > fChanRMSZ_pfx
std::vector< TProfile * > fSlotChanRMS_pfx
TpcMonitor(fhicl::ParameterSet const &pset)
TH1F * fNNoisyChannelsHistoFromNCountsU
int FEMBchanToHistogramMap(int, int)
T get(std::string const &key) const
std::vector< TH1F * > fChanRMSDistZ
size_t NADC() const
Number of elements in the compressed ADC sample vector.
std::vector< unsigned int > fApaLabelNum
TH1F * fNNoisyChannelsHistoFromNSigmaZ
void reconfigure(fhicl::ParameterSet const &pset)
std::vector< TProfile2D * > fBitValue
TH1F * fNNoisyChannelsHistoFromNSigmaV
Description of geometry of one entire detector.
std::vector< TH1F * > fChanMeanDistZ
#define MF_LOG_INFO(category)
TH1F * fNNoisyChannelsListFromNCounts
View_t View(geo::PlaneID const &pid) const
Returns the view (wire orientation) on the channels of specified TPC plane.
Definition of data types for geometry description.
float rmsADC(std::vector< short > &uncompressed)
TH1F * fNDeadChannelsHistoU
geo::GeometryCore const * fGeom
std::vector< TProfile * > fChanMeanU_pfx
unsigned int NTPC(unsigned int cstat=0) const
Returns the total number of TPCs in the specified cryostat.
TH1F * fNDeadChannelsHistoV
raw::Compress_t Compression() const
Compression algorithm used to store the ADC counts.
unsigned int WIBFromOfflineChannel(unsigned int offlineChannel) const
Returns WIB/slot.
unsigned int fChansPerAPA
void FillChannelHistos(TProfile *h1, double mean, double sigma, int &ndeadchannels, int &nnoisychannels_sigma, int &nnoisychannels_counts)
TH1F * fNNoisyChannelsListFromNSigma
std::vector< TH1F * > fChanMeanDistV
std::vector< TProfile * > fChanRMSV_pfx
void analyze(const art::Event &evt)
std::vector< TH2F * > fChanFFTZ
void calculateFFT(TH1D *hist_waveform, TH1D *graph_frequency)
unsigned int FEMBFromOfflineChannel(unsigned int offlineChannel) const
Returns FEMB/fiber.
static constexpr double mm
std::vector< TProfile * > fChanStuckCodeOffFracZ
int fNoiseLevelMinNCountsZ
std::vector< TH1F * > fChanRMSDistV
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
void Uncompress(const std::vector< short > &adc, std::vector< short > &uncompressed, raw::Compress_t compress)
Uncompresses a raw data buffer.
double sampling_rate(DetectorClocksData const &data)
Returns the period of the TPC readout electronics clock.
double mean(sqlite3 *db, std::string const &table_name, std::string const &column_name)
int fNoiseLevelMinNCountsU
std::vector< TProfile * > fChanRMSU_pfx
QTextStream & endl(QTextStream &s)
Event finding and building.
std::vector< TProfile * > fSlotChanMean_pfx
std::vector< TH1F * > fStuckCodeOnFrac
std::string fRawDigitLabel