From 76ae296f77c083e8a0ea7d6d348a0901180f8d13 Mon Sep 17 00:00:00 2001 From: mjdelgadog Date: Wed, 17 May 2023 03:24:33 -0500 Subject: [PATCH] new update deconvolution and Ophitfinder v09_72_01 --- .../Deconvolution/Deconvolution.fcl | 48 +++++++++++++------ .../OpHitFinder/OpHitFinderDeco.fcl | 8 ++-- .../OpHitFinder/OpHitFinder_deco_run.fcl | 2 +- .../OpticalDetector/SIPMOpSensorSim_module.cc | 11 +++-- .../WaveformDigitizerSim_module.cc | 5 +- .../PhotonLibraryPropagationS2_module.cc | 3 +- 6 files changed, 49 insertions(+), 28 deletions(-) diff --git a/duneopdet/OpticalDetector/Deconvolution/Deconvolution.fcl b/duneopdet/OpticalDetector/Deconvolution/Deconvolution.fcl index 76e312f0..2ef22cad 100644 --- a/duneopdet/OpticalDetector/Deconvolution/Deconvolution.fcl +++ b/duneopdet/OpticalDetector/Deconvolution/Deconvolution.fcl @@ -1,5 +1,22 @@ BEGIN_PROLOG +################################################################### +# Configuration for the filters: +################################################################### + +WfmWienerfilter: { + Name: "Wiener" + Cutoff: 1. # Cutoff is not used in this filter +} + +WfmGaussfilter: { + Name: "Gauss" + Cutoff: 1. # In MHz.The cutoff frequency is defined by the standard deviation in the frequency domain. +} # The cutoff value should be changed if signal smoothing is not observed. + +################################################################### + + dune_deconvolution: { module_type: "Deconvolution" @@ -14,32 +31,33 @@ dune_deconvolution: Samples: 1000 # Timewindow (ReadoutWindow) in [ticks] Scale: 0.001 # Scaling of resulting deconvolution signal. DigiDataColumn: 0 # SPE template source file column. - DigiDataFile: "fbk_decon_digi_2023.txt" # The SPE template with undershoot and without pretrigger (in ADC*us), - # was obtained from DAPHNE V2 and the cold amplifier (with 48 SiPM FBK/HPK). + DigiDataFile: "fbk_decon_digi_2023.txt" + # The SPE template with undershoot and without pretrigger (in ADC*us), + # was obtained from DAPHNE V2 and the cold amplifier (with 48 SiPM FBK/HPK). AutoScale: true # Scaling based on SPE amplitude from template (Use "true" for Wiener Filter and # "false" for Gauss Filter). If set to false the value of Scale is used. ApplyPostBLCorrection: true # Correct baseline after the deconvolution process. PedestalBuffer: 20 # In [ticks], should always be smaller than PreTrigger. - WfmFilter: { - Name: "Wiener" # Write the filter: "Wiener" or "Gauss" - Cutoff: 1. # In MHz.The cutoff value should be changed if signal smoothing is not observed. - } - ApplyPostfilter: true # Filter the waveforms after deconvolution. - - WfmPostfilter: { - Name: "Gauss" # Only available "Gauss" postfilter - Cutoff: 2.8 # The cutoff frequency is defined by the standard deviation in the frequency domain, - } # In MHz.The cutoff value should be changed if signal smoothing is not observed. + WfmFilter: @local::WfmWienerfilter # Write the filter: "WfmWienerfilter" or "WfmGaussfilter" + WfmPostfilter: @local::WfmGaussfilter # Only available "Gauss" postfilter. + } -//By debbuging and review the values (SNR,H,S,N,G0,G1,G,V,v) of the Wiener filter: + //DataFile hpk + #dune_deconvolution_hpk: @local::dune_deconvolution + #dune_deconvolution_hpk.SPEDataFile: "hpk_deco_digi.txt" + + //Postfilter Cutoff + dune_deconvolution.WfmPostfilter.Cutoff: 2.8 # Use this value only for postfilter. + + //By debbuging and review the values (SNR,H,S,N,G0,G1,G,V,v) of the Wiener filter: + deconvolution_snr: @local::dune_deconvolution + deconvolution_snr.OutputProduct: "SNR" -deconvolution_snr: @local::standard_deconvolution -deconvolution_snr.OutputProduct: "SNR" END_PROLOG diff --git a/duneopdet/OpticalDetector/OpHitFinder/OpHitFinderDeco.fcl b/duneopdet/OpticalDetector/OpHitFinder/OpHitFinderDeco.fcl index 4f2adfca..cffd61c2 100644 --- a/duneopdet/OpticalDetector/OpHitFinder/OpHitFinderDeco.fcl +++ b/duneopdet/OpticalDetector/OpHitFinder/OpHitFinderDeco.fcl @@ -4,20 +4,20 @@ dune_ophit_finder_deco: { module_type: "OpHitFinderDeco" GenModule: "generator" - InputModule: "opdec" //Module with the recob::OpWaveform object - InputModuledigi: "opdigi" //Module with the raw::OpDetWaveform object + InputModule: "opdec" # Module with the recob::OpWaveform object + InputModuledigi: "opdigi" # Module with the raw::OpDetWaveform object InputLabels: [ "" ] InputDigiType: "recob" # Write recob for OpWaveform object raw OpDetWaveform object ChannelMasks: [] # Will ignore channels in this list - HitThreshold: 7.0 # Amplitude threshold for hits "to be checked" + HitThreshold: 7.0 # Amplitude threshold for hits "7.0 for Gauus" and "9.0 for Wiener" UseCalibrator: false # If set to false, SPE parameters below # are used. If set to true, is it unusable? AreaToPE: true # Use area to calculate number of PEs ScalingFactor: 100.0 # If AreaToPE is true, this number is SPEArea: 100.0 # For deco waveforms, should be equal to ScalingFactor # used as single PE area (for raw (ADC*ns)/(sampling rate)16ns = ADC counts) - SPEShift: 0.0 # Baseline offset in ADC->SPE conversion "to be checked" + SPEShift: 0.0 # Baseline offset in ADC->SPE conversion. reco_man: @local::standard_preco_manager HitAlgoPset: @local::standard_algo_slidingwindow PedAlgoPset: @local::standard_algo_pedestal_edges diff --git a/duneopdet/OpticalDetector/OpHitFinder/OpHitFinder_deco_run.fcl b/duneopdet/OpticalDetector/OpHitFinder/OpHitFinder_deco_run.fcl index ede230f2..d766295d 100644 --- a/duneopdet/OpticalDetector/OpHitFinder/OpHitFinder_deco_run.fcl +++ b/duneopdet/OpticalDetector/OpHitFinder/OpHitFinder_deco_run.fcl @@ -1,7 +1,7 @@ #include "opticaldetectormodules_dune.fcl" #include "opticaldetectorservices_dune.fcl" #include "services_dune.fcl" -#include "OpHitFinder.fcl" +#include "OpHitFinderDeco.fcl" #include "OpHitFindAna.fcl" #include "tools_dune.fcl" diff --git a/duneopdet/OpticalDetector/SIPMOpSensorSim_module.cc b/duneopdet/OpticalDetector/SIPMOpSensorSim_module.cc index 93b65d73..56734265 100644 --- a/duneopdet/OpticalDetector/SIPMOpSensorSim_module.cc +++ b/duneopdet/OpticalDetector/SIPMOpSensorSim_module.cc @@ -140,11 +140,12 @@ namespace opdet { , fInputToken{ consumes< std::vector >(fInputTag) } , fDarkNoiseRate{config().DarkNoiseRate()} , fCrossTalk{ config().CrossTalk()} - , fSIPMEngine( art::ServiceHandle()->createEngine(*this, - "HepJamesRandom", - "sipm", - config.get_PSet(), - "SeedSiPM")) + , fSIPMEngine( + art::ServiceHandle()->createEngine(*this, + "HepJamesRandom", + "sipm", + config.get_PSet(), + "SeedSiPM")) , fRandExponential(fSIPMEngine) , fRandFlat(fSIPMEngine) , fRandPoissPhot(fSIPMEngine) diff --git a/duneopdet/OpticalDetector/WaveformDigitizerSim_module.cc b/duneopdet/OpticalDetector/WaveformDigitizerSim_module.cc index b705c70d..8d518b3a 100644 --- a/duneopdet/OpticalDetector/WaveformDigitizerSim_module.cc +++ b/duneopdet/OpticalDetector/WaveformDigitizerSim_module.cc @@ -313,11 +313,13 @@ namespace opdet { , fFullWaveformOutput{ config().FullWaveformOutput() } - , fOpDigiEngine( art::ServiceHandle()->createEngine(*this, + , fOpDigiEngine( art::ServiceHandle()->createEngine(*this, "HepJamesRandom", "waveformdigi", config.get_PSet(), "SeedWaveformDigi") ) + + , fRandGauss(fOpDigiEngine) { @@ -615,4 +617,3 @@ namespace opdet { } // end namespace - diff --git a/duneopdet/PhotonPropagation/PhotonLibraryPropagationS2_module.cc b/duneopdet/PhotonPropagation/PhotonLibraryPropagationS2_module.cc index a218046d..a8c2acd3 100644 --- a/duneopdet/PhotonPropagation/PhotonLibraryPropagationS2_module.cc +++ b/duneopdet/PhotonPropagation/PhotonLibraryPropagationS2_module.cc @@ -89,7 +89,8 @@ phot::PhotonLibraryPropagationS2::PhotonLibraryPropagationS2(fhicl::ParameterSet : EDProducer{p} , fDriftEModuleLabel{p.get< std::string >("DriftEModuleLabel")} , fGain{p.get("Gain",500)} - , fPhotonEngine(art::ServiceHandle()->createEngine(*this, "HepJamesRandom", "photon", p, "SeedPhoton")) + , fPhotonEngine(art::ServiceHandle()-> + createEngine(*this, "HepJamesRandom", "photon", p, "SeedPhoton")) , fScintTimeEngine(art::ServiceHandle()->createEngine(*this, "HepJamesRandom", "scinttime", p, "SeedScintTime")) { art::ServiceHandle lgp;