Skip to content

Commit

Permalink
new update deconvolution and Ophitfinder v09_72_01
Browse files Browse the repository at this point in the history
  • Loading branch information
mjdelgadog committed May 17, 2023
1 parent 7b8c6af commit 76ae296
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 28 deletions.
48 changes: 33 additions & 15 deletions duneopdet/OpticalDetector/Deconvolution/Deconvolution.fcl
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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

Expand Down
8 changes: 4 additions & 4 deletions duneopdet/OpticalDetector/OpHitFinder/OpHitFinderDeco.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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"

Expand Down
11 changes: 6 additions & 5 deletions duneopdet/OpticalDetector/SIPMOpSensorSim_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,12 @@ namespace opdet {
, fInputToken{ consumes< std::vector<sim::OpDetBacktrackerRecord> >(fInputTag) }
, fDarkNoiseRate{config().DarkNoiseRate()}
, fCrossTalk{ config().CrossTalk()}
, fSIPMEngine( art::ServiceHandle<rndm::NuRandomService>()->createEngine(*this,
"HepJamesRandom",
"sipm",
config.get_PSet(),
"SeedSiPM"))
, fSIPMEngine(
art::ServiceHandle<rndm::NuRandomService>()->createEngine(*this,
"HepJamesRandom",
"sipm",
config.get_PSet(),
"SeedSiPM"))
, fRandExponential(fSIPMEngine)
, fRandFlat(fSIPMEngine)
, fRandPoissPhot(fSIPMEngine)
Expand Down
5 changes: 3 additions & 2 deletions duneopdet/OpticalDetector/WaveformDigitizerSim_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,13 @@ namespace opdet {

, fFullWaveformOutput{ config().FullWaveformOutput() }

, fOpDigiEngine( art::ServiceHandle<rndm::NuRandomService>()->createEngine(*this,
, fOpDigiEngine( art::ServiceHandle<rndm::NuRandomService>()->createEngine(*this,
"HepJamesRandom",
"waveformdigi",
config.get_PSet(),
"SeedWaveformDigi") )


, fRandGauss(fOpDigiEngine)
{

Expand Down Expand Up @@ -615,4 +617,3 @@ namespace opdet {


} // end namespace

Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ phot::PhotonLibraryPropagationS2::PhotonLibraryPropagationS2(fhicl::ParameterSet
: EDProducer{p}
, fDriftEModuleLabel{p.get< std::string >("DriftEModuleLabel")}
, fGain{p.get<double>("Gain",500)}
, fPhotonEngine(art::ServiceHandle<rndm::NuRandomService>()->createEngine(*this, "HepJamesRandom", "photon", p, "SeedPhoton"))
, fPhotonEngine(art::ServiceHandle<rndm::NuRandomService>()->
createEngine(*this, "HepJamesRandom", "photon", p, "SeedPhoton"))
, fScintTimeEngine(art::ServiceHandle<rndm::NuRandomService>()->createEngine(*this, "HepJamesRandom", "scinttime", p, "SeedScintTime"))
{
art::ServiceHandle<sim::LArG4Parameters> lgp;
Expand Down

0 comments on commit 76ae296

Please sign in to comment.