From 48d83bcbfb9cc5665dba8bc5743bb164f10848df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1nchez=20Castillo?= Date: Thu, 11 Dec 2025 14:28:09 -0600 Subject: [PATCH 01/15] Update scint prescale to match new efficiencies --- sbndcode/LArSoftConfigurations/opticalproperties_sbnd.fcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbndcode/LArSoftConfigurations/opticalproperties_sbnd.fcl b/sbndcode/LArSoftConfigurations/opticalproperties_sbnd.fcl index ba677dd9c..0048cc354 100644 --- a/sbndcode/LArSoftConfigurations/opticalproperties_sbnd.fcl +++ b/sbndcode/LArSoftConfigurations/opticalproperties_sbnd.fcl @@ -30,7 +30,7 @@ sbnd_opticalproperties: { # ScintPreScale MUST be equal/larger than the largest detection efficiency applied at DetSim stage # This corresponds to the coated PMTs detection efficiency (3.9% see docdb-40444) # See sbndcode/OpDetSim/digi_pmt_sbnd.fcl - ScintPreScale: 0.039 + ScintPreScale: 0.0392 EnableCerenkovLight: false # Cerenkov light OFF by default From ac6834346c2ec2510d628f26cb6992dc0cde800a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1nchez=20Castillo?= Date: Thu, 11 Dec 2025 14:29:16 -0600 Subject: [PATCH 02/15] Read correct efficiency for coated pmt (vis component) --- .../TPCPMTBarycenterMatching_module.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sbndcode/TPCPMTBarycenterMatching/TPCPMTBarycenterMatching_module.cc b/sbndcode/TPCPMTBarycenterMatching/TPCPMTBarycenterMatching_module.cc index 70fea3aa7..e9ee7beb9 100644 --- a/sbndcode/TPCPMTBarycenterMatching/TPCPMTBarycenterMatching_module.cc +++ b/sbndcode/TPCPMTBarycenterMatching/TPCPMTBarycenterMatching_module.cc @@ -232,8 +232,9 @@ class TPCPMTBarycenterMatchProducer : public art::EDProducer { double fDistanceCandidateFlashes; ///< Maximum distance between candidate flashes to be considered for matching (cm) std::vector fCalAreaConst; /// Calibration area constants for wire plane std::vector fSkipChannelList; - double fOpDetVUVEff; // Efficiencies for PMT detection - double fOpDetVISEff; // Efficiencies for PMT detection + double fOpDetCoVUVEff; // Efficiencies for PMT detection (Coated PMT VUV) + double fOpDetCoVISEff; // Efficiencies for PMT detection (Coated PMT VIS) + double fOpDetUncoVISEff; // Efficiencies for PMT detection (Uncoated PMT VIS) bool fVerbose; ///< Print extra info bool fFillMatchTree; ///< Fill an output TTree in the supplemental file bool fDo3DMatching; ///< Wether to perform the matching in 3D or 2D @@ -304,8 +305,9 @@ TPCPMTBarycenterMatchProducer::TPCPMTBarycenterMatchProducer(fhicl::ParameterSet fCollectionOnly(p.get("CollectionOnly", true)), fDistanceCandidateFlashes(p.get("DistanceCandidateFlashes")), // cm fCalAreaConst(p.get>("CalAreaConst")), - fOpDetVUVEff (p.get("OpDetVUVEff")), - fOpDetVISEff (p.get("OpDetVISEff")), + fOpDetCoVUVEff (p.get("OpDetCoVUVEff")), + fOpDetCoVISEff (p.get("OpDetCoVISEff")), + fOpDetUncoVISEff (p.get("OpDetUncoVISEff")), fVerbose(p.get("Verbose")), fFillMatchTree(p.get("FillMatchTree")), fDo3DMatching(p.get("Do3DMatching")), @@ -891,11 +893,10 @@ double TPCPMTBarycenterMatchProducer::GetFlashLight(double flash_pe, std::vector for(size_t ch=0; ch Date: Thu, 11 Dec 2025 14:30:09 -0600 Subject: [PATCH 03/15] Update eta pmt calibration file for new efficiencies --- sbndcode/OpDetReco/OpFlash/job/sbnd_driftestimatoralgo.fcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbndcode/OpDetReco/OpFlash/job/sbnd_driftestimatoralgo.fcl b/sbndcode/OpDetReco/OpFlash/job/sbnd_driftestimatoralgo.fcl index 38b8a9f67..bdb1fcbaa 100644 --- a/sbndcode/OpDetReco/OpFlash/job/sbnd_driftestimatoralgo.fcl +++ b/sbndcode/OpDetReco/OpFlash/job/sbnd_driftestimatoralgo.fcl @@ -5,7 +5,7 @@ BEGIN_PROLOG DriftEstimatorPMTRatio: { tool_type: "DriftEstimatorPMTRatio" - CalibrationFile: "OpDetReco/PMTRatioCalibration_MC2.root" + CalibrationFile: "OpDetReco/PMTRatioCalibration_MC3.root" VGroupVUV: @local::sbnd_vuv_timing_parameterization.vuv_vgroup_mean VGroupVIS: @local::sbnd_vis_timing_parameterization.vis_vmean DataCalibration: true From 33488f48454922f1dc50485ff5d1404489ce83c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1nchez=20Castillo?= Date: Thu, 11 Dec 2025 14:35:14 -0600 Subject: [PATCH 04/15] Update flashfinder configuration --- .../job/sbnd_flashfinder_deco.fcl | 47 +++++-------------- 1 file changed, 13 insertions(+), 34 deletions(-) diff --git a/sbndcode/OpDetReco/OpDeconvolution/job/sbnd_flashfinder_deco.fcl b/sbndcode/OpDetReco/OpDeconvolution/job/sbnd_flashfinder_deco.fcl index 610e9c818..55b4d01da 100644 --- a/sbndcode/OpDetReco/OpDeconvolution/job/sbnd_flashfinder_deco.fcl +++ b/sbndcode/OpDetReco/OpDeconvolution/job/sbnd_flashfinder_deco.fcl @@ -28,57 +28,36 @@ SBNDDecoSimpleFlashTPC1.CorrectLightPropagation: true ###### PMT DATA ###### ###TPC0 -SBNDDecoSimpleFlashTPC0_data: @local::SBNDSimpleFlashTPC0 +SBNDDecoSimpleFlashTPC0_data: @local::SBNDDecoSimpleFlashTPC0 +SBNDDecoSimpleFlashTPC0_data.ReadoutDelay: 0 //cable time delay in us SBNDDecoSimpleFlashTPC0_data.DriftEstimatorConfig.tool_type: "DriftEstimatorPMTRatio" SBNDDecoSimpleFlashTPC0_data.DriftEstimatorConfig.DataCalibration: true -SBNDDecoSimpleFlashTPC0_data.PECalib.SPEAreaGain: 200 -SBNDDecoSimpleFlashTPC0_data.OpHitProducers: ["ophitpmt"] -SBNDDecoSimpleFlashTPC0_data.OpHitInputTime: "RiseTime" -SBNDDecoSimpleFlashTPC0_data.UseT0Tool: true -SBNDDecoSimpleFlashTPC0_data.ReadoutDelay: 0 //cable time delay in us -SBNDDecoSimpleFlashTPC0_data.CorrectLightPropagation: true SBNDDecoSimpleFlashTPC0_data.DriftEstimatorConfig.CalibrationFile: "OpDetReco/PMTRatioCalibration_data_v2.root" +SBNDDecoSimpleFlashTPC0_data.FlashGeoConfig: @local::FlashGeoThresholdTPC0 #TPC1 -SBNDDecoSimpleFlashTPC1_data: @local::SBNDSimpleFlashTPC1 +SBNDDecoSimpleFlashTPC1_data: @local::SBNDDecoSimpleFlashTPC1 +SBNDDecoSimpleFlashTPC1_data.ReadoutDelay: 0 //cable time delay in us SBNDDecoSimpleFlashTPC1_data.DriftEstimatorConfig.tool_type: "DriftEstimatorPMTRatio" SBNDDecoSimpleFlashTPC1_data.DriftEstimatorConfig.DataCalibration: true -SBNDDecoSimpleFlashTPC1_data.PECalib.SPEAreaGain: 200 -SBNDDecoSimpleFlashTPC1_data.OpHitProducers: ["ophitpmt"] -SBNDDecoSimpleFlashTPC1_data.OpHitInputTime: "RiseTime" -SBNDDecoSimpleFlashTPC1_data.UseT0Tool: true -SBNDDecoSimpleFlashTPC1_data.ReadoutDelay: 0 //cable time delay in us +SBNDDecoSimpleFlashTPC1_data.DriftEstimatorConfig.CalibrationFile: "OpDetReco/PMTRatioCalibration_data_v2.root" SBNDDecoSimpleFlashTPC1_data.CorrectLightPropagation: true +SBNDDecoSimpleFlashTPC1_data.FlashGeoConfig: @local::FlashGeoThresholdTPC1 ###### PMT REALISTIC MC ###### ###TPC0 -SBNDDecoSimpleFlashTPC0_realisticMC: @local::SBNDSimpleFlashTPC0 -SBNDDecoSimpleFlashTPC0_realisticMC.DriftEstimatorConfig.tool_type: "DriftEstimatorPMTRatio" -SBNDDecoSimpleFlashTPC0_realisticMC.DriftEstimatorConfig.DataCalibration: true -SBNDDecoSimpleFlashTPC0_realisticMC.PECalib.SPEAreaGain: 200 -SBNDDecoSimpleFlashTPC0_realisticMC.OpHitProducers: ["ophitpmt"] -SBNDDecoSimpleFlashTPC0_realisticMC.OpHitInputTime: "RiseTime" -SBNDDecoSimpleFlashTPC0_realisticMC.UseT0Tool: true -SBNDDecoSimpleFlashTPC0_realisticMC.ReadoutDelay: 0 //cable time delay in us -SBNDDecoSimpleFlashTPC0_realisticMC.CorrectLightPropagation: true -SBNDDecoSimpleFlashTPC0_realisticMC.DriftEstimatorConfig.CalibrationFile: "OpDetReco/PMTRatioCalibration_MC2.root" +SBNDDecoSimpleFlashTPC0_realisticMC: @local::SBNDDecoSimpleFlashTPC0_data +SBNDDecoSimpleFlashTPC0_realisticMC.DriftEstimatorConfig.CalibrationFile: "OpDetReco/PMTRatioCalibration_MC3.root" +SBNDDecoSimpleFlashTPC0_realisticMC.ReadoutDelay: 0. //cable time delay in us #TPC1 -SBNDDecoSimpleFlashTPC1_realisticMC: @local::SBNDSimpleFlashTPC1 -SBNDDecoSimpleFlashTPC1_realisticMC.DriftEstimatorConfig.tool_type: "DriftEstimatorPMTRatio" -SBNDDecoSimpleFlashTPC1_realisticMC.DriftEstimatorConfig.DataCalibration: true -SBNDDecoSimpleFlashTPC1_realisticMC.PECalib.SPEAreaGain: 200 -SBNDDecoSimpleFlashTPC1_realisticMC.OpHitProducers: ["ophitpmt"] -SBNDDecoSimpleFlashTPC1_realisticMC.OpHitInputTime: "RiseTime" -SBNDDecoSimpleFlashTPC1_realisticMC.UseT0Tool: true -SBNDDecoSimpleFlashTPC1_realisticMC.ReadoutDelay: 0 //cable time delay in us -SBNDDecoSimpleFlashTPC1_realisticMC.CorrectLightPropagation: true -SBNDDecoSimpleFlashTPC1_realisticMC.DriftEstimatorConfig.CalibrationFile: "OpDetReco/PMTRatioCalibration_MC2.root" +SBNDDecoSimpleFlashTPC1_realisticMC: @local::SBNDDecoSimpleFlashTPC1_data +SBNDDecoSimpleFlashTPC1_realisticMC.DriftEstimatorConfig.CalibrationFile: "OpDetReco/PMTRatioCalibration_MC3.root" +SBNDDecoSimpleFlashTPC1_realisticMC.ReadoutDelay: 0. //cable time delay in us ###### XA IDEAL MC ###### - ####OpFlash finder for XArapucas deconvolved waveforms##### ###TPC0 SBNDDecoSimpleFlashTPC0Arapuca: @local::SBNDSimpleFlashTPC0 From 9bb1c7fcb8d3a7ef5a402019169dc87b24974ccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1nchez=20Castillo?= Date: Thu, 11 Dec 2025 14:40:20 -0600 Subject: [PATCH 05/15] Update flash geo config --- .../OpDetReco/OpDeconvolution/job/sbnd_flashfinder_deco.fcl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sbndcode/OpDetReco/OpDeconvolution/job/sbnd_flashfinder_deco.fcl b/sbndcode/OpDetReco/OpDeconvolution/job/sbnd_flashfinder_deco.fcl index 55b4d01da..7b7d75453 100644 --- a/sbndcode/OpDetReco/OpDeconvolution/job/sbnd_flashfinder_deco.fcl +++ b/sbndcode/OpDetReco/OpDeconvolution/job/sbnd_flashfinder_deco.fcl @@ -33,7 +33,7 @@ SBNDDecoSimpleFlashTPC0_data.ReadoutDelay: 0 //cable time delay in us SBNDDecoSimpleFlashTPC0_data.DriftEstimatorConfig.tool_type: "DriftEstimatorPMTRatio" SBNDDecoSimpleFlashTPC0_data.DriftEstimatorConfig.DataCalibration: true SBNDDecoSimpleFlashTPC0_data.DriftEstimatorConfig.CalibrationFile: "OpDetReco/PMTRatioCalibration_data_v2.root" -SBNDDecoSimpleFlashTPC0_data.FlashGeoConfig: @local::FlashGeoThresholdTPC0 +SBNDDecoSimpleFlashTPC0_data.FlashGeoConfig: @local::FlashGeoThresholdTPC0Data #TPC1 SBNDDecoSimpleFlashTPC1_data: @local::SBNDDecoSimpleFlashTPC1 @@ -42,7 +42,7 @@ SBNDDecoSimpleFlashTPC1_data.DriftEstimatorConfig.tool_type: "DriftEstimatorPMTR SBNDDecoSimpleFlashTPC1_data.DriftEstimatorConfig.DataCalibration: true SBNDDecoSimpleFlashTPC1_data.DriftEstimatorConfig.CalibrationFile: "OpDetReco/PMTRatioCalibration_data_v2.root" SBNDDecoSimpleFlashTPC1_data.CorrectLightPropagation: true -SBNDDecoSimpleFlashTPC1_data.FlashGeoConfig: @local::FlashGeoThresholdTPC1 +SBNDDecoSimpleFlashTPC1_data.FlashGeoConfig: @local::FlashGeoThresholdTPC1Data ###### PMT REALISTIC MC ###### @@ -50,11 +50,13 @@ SBNDDecoSimpleFlashTPC1_data.FlashGeoConfig: @local::FlashGeoThresholdTPC1 SBNDDecoSimpleFlashTPC0_realisticMC: @local::SBNDDecoSimpleFlashTPC0_data SBNDDecoSimpleFlashTPC0_realisticMC.DriftEstimatorConfig.CalibrationFile: "OpDetReco/PMTRatioCalibration_MC3.root" SBNDDecoSimpleFlashTPC0_realisticMC.ReadoutDelay: 0. //cable time delay in us +SBNDDecoSimpleFlashTPC0_realisticMC.FlashGeoConfig: @local::FlashGeoThresholdTPC0_realisticMC #TPC1 SBNDDecoSimpleFlashTPC1_realisticMC: @local::SBNDDecoSimpleFlashTPC1_data SBNDDecoSimpleFlashTPC1_realisticMC.DriftEstimatorConfig.CalibrationFile: "OpDetReco/PMTRatioCalibration_MC3.root" SBNDDecoSimpleFlashTPC1_realisticMC.ReadoutDelay: 0. //cable time delay in us +SBNDDecoSimpleFlashTPC1_realisticMC.FlashGeoConfig: @local::FlashGeoThresholdTPC1_realisticMC ###### XA IDEAL MC ###### From 3f6f230e9b40d26bf4079e0662d3e27efb358353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1nchez=20Castillo?= Date: Thu, 11 Dec 2025 14:40:40 -0600 Subject: [PATCH 06/15] Add new flash geo config for data/MC --- .../OpFlash/job/sbnd_flashgeoalgo.fcl | 46 ++++++++++++++++--- 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/sbndcode/OpDetReco/OpFlash/job/sbnd_flashgeoalgo.fcl b/sbndcode/OpDetReco/OpFlash/job/sbnd_flashgeoalgo.fcl index 18051a4c2..2ddcdfd18 100644 --- a/sbndcode/OpDetReco/OpFlash/job/sbnd_flashgeoalgo.fcl +++ b/sbndcode/OpDetReco/OpFlash/job/sbnd_flashgeoalgo.fcl @@ -1,17 +1,51 @@ BEGIN_PROLOG -FlashGeoBarycenter: -{ +FlashGeoBarycenter:{ tool_type: "FlashGeoBarycenter" WeightExp: 2 } -FlashGeoThreshold: -{ +FlashGeoThreshold:{ tool_type: "FlashGeoThreshold" PDTypes: ["pmt_coated", "pmt_uncoated"] - ThresholdY: 0.75 - ThresholdZ: 0.45 + ThresholdY: 0.8 + ThresholdZ: 0.8 + NormalizeByPDType: true + WeightExp: 2 +} + +FlashGeoThresholdTPC0Data:{ + tool_type: "FlashGeoThreshold" + PDTypes: ["pmt_coated", "pmt_uncoated"] + ThresholdY: 0.5 + ThresholdZ: 0.5 + NormalizeByPDType: true + WeightExp: 2 +} + +FlashGeoThresholdTPC1Data:{ + tool_type: "FlashGeoThreshold" + PDTypes: ["pmt_coated", "pmt_uncoated"] + ThresholdY: 0.5 + ThresholdZ: 0.5 + NormalizeByPDType: true + WeightExp: 2 +} + +FlashGeoThresholdTPC0_realisticMC:{ + tool_type: "FlashGeoThreshold" + PDTypes: ["pmt_coated", "pmt_uncoated"] + ThresholdY: 0.7 + ThresholdZ: 0.7 + NormalizeByPDType: true + WeightExp: 2 +} + +FlashGeoThresholdTPC0_realisticMC:{ + tool_type: "FlashGeoThreshold" + PDTypes: ["pmt_coated", "pmt_uncoated"] + ThresholdY: 0.6 + ThresholdZ: 0.6 NormalizeByPDType: true WeightExp: 2 } From 4380ae24e6eb999a5e5d587543238466146dd987 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1nchez=20Castillo?= Date: Thu, 11 Dec 2025 14:46:23 -0600 Subject: [PATCH 07/15] Update reco2 MC workflow --- .../JobConfigurations/standard/reco/config/workflow_reco2.fcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbndcode/JobConfigurations/standard/reco/config/workflow_reco2.fcl b/sbndcode/JobConfigurations/standard/reco/config/workflow_reco2.fcl index 167662ecc..e8e5aedc8 100755 --- a/sbndcode/JobConfigurations/standard/reco/config/workflow_reco2.fcl +++ b/sbndcode/JobConfigurations/standard/reco/config/workflow_reco2.fcl @@ -77,8 +77,8 @@ sbnd_reco2_producers:{ fmatchoparaSCE: @local::sbnd_simple_flashmatch_opara_sce opt0finder: @local::sbnd_opt0_finder_one_to_many opt0finderSCE: @local::sbnd_opt0_finder_one_to_many - tpcpmtbarycentermatching: @local::TPCPMTBarycenterMatchProducer - tpcpmtbarycentermatchingSCE: @local::TPCPMTBarycenterMatchProducerSCE + tpcpmtbarycentermatching: @local::TPCPMTBarycenterMatchProducerMC + tpcpmtbarycentermatchingSCE: @local::TPCPMTBarycenterMatchProducerSCEMC ### Uncalibrated calorimetry producer for calibration caloskimmer caloskimCalorimetry: @local::caloskim_calorimetry From b73462fe57cf238eaf6182e71d308f4071b64e5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1nchez=20Castillo?= Date: Thu, 11 Dec 2025 14:46:41 -0600 Subject: [PATCH 08/15] Update bfm configuration --- .../sbnd_tpcpmt3dbarycentermatching_config.fcl | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/sbndcode/TPCPMTBarycenterMatching/job/sbnd_tpcpmt3dbarycentermatching_config.fcl b/sbndcode/TPCPMTBarycenterMatching/job/sbnd_tpcpmt3dbarycentermatching_config.fcl index fad5f66d1..af1d50f43 100644 --- a/sbndcode/TPCPMTBarycenterMatching/job/sbnd_tpcpmt3dbarycentermatching_config.fcl +++ b/sbndcode/TPCPMTBarycenterMatching/job/sbnd_tpcpmt3dbarycentermatching_config.fcl @@ -16,21 +16,27 @@ TPCPMTBarycenterMatchProducer: DistanceCandidateFlashes: 100 VUVHits: @local::sbnd_vuv_RS100cm_hits_parameterization VIVHits: @local::sbnd_vis_RS100cm_hits_parameterization - OpDetVUVEff: @local::sbnd_digipmt_alg.PMTCoatedVUVEff_tpc1 - OpDetVISEff: @local::sbnd_digipmt_alg.PMTUncoatedEff_tpc1 + OpDetCoVUVEff: @local::sbnd_digipmt_alg.PMTCoatedVUVEff_tpc1 + OpDetCoVISEff: @local::sbnd_digipmt_alg.PMTCoatedVISEff_tpc1 + OpDetUncoVISEff: @local::sbnd_digipmt_alg.PMTUncoatedEff_tpc1 CalAreaConst: @local::sbnd_calorimetryalgdata.CalAreaConstants LightChargeRatioBounds: [0.25, 3] - XError: 12 // cm - YError: 23 // cm - ZError: 23 // cm + XError: 11 // cm + YError: 21 // cm + ZError: 25 // cm AngleError: 27 // deg FlashVetoWindow: [-5,5] // ns OpticalPathTool: @local::SBNDOpticalPath module_type: "TPCPMTBarycenterMatchProducer" } +TPCPMTBarycenterMatchProducerMC: @local::TPCPMTBarycenterMatchProducer +TPCPMTBarycenterMatchProducerMC.XError: 9 + +TPCPMTBarycenterMatchProducerSCEMC: @local::TPCPMTBarycenterMatchProducerMC +TPCPMTBarycenterMatchProducerSCEMC.PandoraLabel: "pandoraSCE" + TPCPMTBarycenterMatchProducerSCE: @local::TPCPMTBarycenterMatchProducer TPCPMTBarycenterMatchProducerSCE.PandoraLabel: "pandoraSCE" - END_PROLOG \ No newline at end of file From d1cb7c85a4200a92ef62aba2afe26a917ecf5253 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1nchez=20Castillo?= Date: Tue, 16 Dec 2025 12:31:49 -0600 Subject: [PATCH 09/15] Fix typo and use only coated PMTs for position reconstruction --- sbndcode/OpDetReco/OpFlash/job/sbnd_flashgeoalgo.fcl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sbndcode/OpDetReco/OpFlash/job/sbnd_flashgeoalgo.fcl b/sbndcode/OpDetReco/OpFlash/job/sbnd_flashgeoalgo.fcl index 2ddcdfd18..018bb0e94 100644 --- a/sbndcode/OpDetReco/OpFlash/job/sbnd_flashgeoalgo.fcl +++ b/sbndcode/OpDetReco/OpFlash/job/sbnd_flashgeoalgo.fcl @@ -16,7 +16,7 @@ FlashGeoThreshold:{ FlashGeoThresholdTPC0Data:{ tool_type: "FlashGeoThreshold" - PDTypes: ["pmt_coated", "pmt_uncoated"] + PDTypes: ["pmt_coated"] ThresholdY: 0.5 ThresholdZ: 0.5 NormalizeByPDType: true @@ -25,7 +25,7 @@ FlashGeoThresholdTPC0Data:{ FlashGeoThresholdTPC1Data:{ tool_type: "FlashGeoThreshold" - PDTypes: ["pmt_coated", "pmt_uncoated"] + PDTypes: ["pmt_coated"] ThresholdY: 0.5 ThresholdZ: 0.5 NormalizeByPDType: true @@ -34,16 +34,16 @@ FlashGeoThresholdTPC1Data:{ FlashGeoThresholdTPC0_realisticMC:{ tool_type: "FlashGeoThreshold" - PDTypes: ["pmt_coated", "pmt_uncoated"] + PDTypes: ["pmt_coated"] ThresholdY: 0.7 ThresholdZ: 0.7 NormalizeByPDType: true WeightExp: 2 } -FlashGeoThresholdTPC0_realisticMC:{ +FlashGeoThresholdTPC1_realisticMC:{ tool_type: "FlashGeoThreshold" - PDTypes: ["pmt_coated", "pmt_uncoated"] + PDTypes: ["pmt_coated"] ThresholdY: 0.6 ThresholdZ: 0.6 NormalizeByPDType: true From cb82a9b7cc9728eaf8ecec8ca2f3aa1224a68cca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1nchez=20Castillo?= Date: Tue, 16 Dec 2025 12:32:59 -0600 Subject: [PATCH 10/15] Add individual pmtratio curve for each tpc --- .../OpDetReco/OpDeconvolution/job/sbnd_flashfinder_deco.fcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbndcode/OpDetReco/OpDeconvolution/job/sbnd_flashfinder_deco.fcl b/sbndcode/OpDetReco/OpDeconvolution/job/sbnd_flashfinder_deco.fcl index 7b7d75453..8e314c8f2 100644 --- a/sbndcode/OpDetReco/OpDeconvolution/job/sbnd_flashfinder_deco.fcl +++ b/sbndcode/OpDetReco/OpDeconvolution/job/sbnd_flashfinder_deco.fcl @@ -32,7 +32,7 @@ SBNDDecoSimpleFlashTPC0_data: @local::SBNDDecoSimpleFlashTPC0 SBNDDecoSimpleFlashTPC0_data.ReadoutDelay: 0 //cable time delay in us SBNDDecoSimpleFlashTPC0_data.DriftEstimatorConfig.tool_type: "DriftEstimatorPMTRatio" SBNDDecoSimpleFlashTPC0_data.DriftEstimatorConfig.DataCalibration: true -SBNDDecoSimpleFlashTPC0_data.DriftEstimatorConfig.CalibrationFile: "OpDetReco/PMTRatioCalibration_data_v2.root" +SBNDDecoSimpleFlashTPC0_data.DriftEstimatorConfig.CalibrationFile: "OpDetReco/PMTRatioCalibration_data_v2_tpc0.root" SBNDDecoSimpleFlashTPC0_data.FlashGeoConfig: @local::FlashGeoThresholdTPC0Data #TPC1 @@ -40,7 +40,7 @@ SBNDDecoSimpleFlashTPC1_data: @local::SBNDDecoSimpleFlashTPC1 SBNDDecoSimpleFlashTPC1_data.ReadoutDelay: 0 //cable time delay in us SBNDDecoSimpleFlashTPC1_data.DriftEstimatorConfig.tool_type: "DriftEstimatorPMTRatio" SBNDDecoSimpleFlashTPC1_data.DriftEstimatorConfig.DataCalibration: true -SBNDDecoSimpleFlashTPC1_data.DriftEstimatorConfig.CalibrationFile: "OpDetReco/PMTRatioCalibration_data_v2.root" +SBNDDecoSimpleFlashTPC1_data.DriftEstimatorConfig.CalibrationFile: "OpDetReco/PMTRatioCalibration_data_v2_tpc1.root" SBNDDecoSimpleFlashTPC1_data.CorrectLightPropagation: true SBNDDecoSimpleFlashTPC1_data.FlashGeoConfig: @local::FlashGeoThresholdTPC1Data From a5f77d85fe68397156f0e6f8540c82e07acca4e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1nchez=20Castillo?= Date: Wed, 17 Dec 2025 06:12:22 -0600 Subject: [PATCH 11/15] Update db configuration --- .../configurations/calibration_database_PDS_TagSets_sbnd.fcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbndcode/Calibration/configurations/calibration_database_PDS_TagSets_sbnd.fcl b/sbndcode/Calibration/configurations/calibration_database_PDS_TagSets_sbnd.fcl index 3721691ce..b80cf8403 100644 --- a/sbndcode/Calibration/configurations/calibration_database_PDS_TagSets_sbnd.fcl +++ b/sbndcode/Calibration/configurations/calibration_database_PDS_TagSets_sbnd.fcl @@ -10,8 +10,8 @@ BEGIN_PROLOG # For SBND 2025 Fall production PDS_CalibrationTags_Nov2025: { - PMTCalibrationDatabaseTag: "v2r1" - DatabaseTimeStamp: 1763157679000000000 + PMTCalibrationDatabaseTag: "v3r1" + DatabaseTimeStamp: 1765487620000000000 } END_PROLOG \ No newline at end of file From 8504aa25df067dcab4fb089580cfb5d407ce0d1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1nchez=20Castillo?= Date: Wed, 17 Dec 2025 06:33:28 -0600 Subject: [PATCH 12/15] Start using pmt calibration db in deconvolution module --- .../Alg/OpDeconvolutionAlgWienerData_tool.cc | 8 ++------ .../OpDeconvolution/job/opdeconvolution_sbnd.fcl | 2 -- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/sbndcode/OpDetReco/OpDeconvolution/Alg/OpDeconvolutionAlgWienerData_tool.cc b/sbndcode/OpDetReco/OpDeconvolution/Alg/OpDeconvolutionAlgWienerData_tool.cc index d33cc57ee..134183f30 100644 --- a/sbndcode/OpDetReco/OpDeconvolution/Alg/OpDeconvolutionAlgWienerData_tool.cc +++ b/sbndcode/OpDetReco/OpDeconvolution/Alg/OpDeconvolutionAlgWienerData_tool.cc @@ -51,7 +51,6 @@ class opdet::OpDeconvolutionAlgWiener : opdet::OpDeconvolutionAlg { std::vector fSinglePEWave; std::vector fSinglePEChannels; std::vector fPeakAmplitude; - std::vector fSkipChannelList; bool fPositivePolarity; bool fUseSaturated; int fADCSaturationValue; @@ -129,7 +128,6 @@ opdet::OpDeconvolutionAlgWiener::OpDeconvolutionAlgWiener(fhicl::ParameterSet co fPMTChargeToADC = p.get< double >("PMTChargeToADC"); fDecoWaveformPrecision = p.get< double >("DecoWaveformPrecision"); fBaselineSample = p.get< short unsigned int >("BaselineSample"); - fSkipChannelList = p.get< std::vector>("SkipChannelList"); fFilter = p.get< std::string >("Filter"); fElectronics = p.get< std::string >("Electronics"); fDaphne_Freq = p.get< double >("DaphneFreq"); @@ -173,11 +171,9 @@ std::vector opdet::OpDeconvolutionAlgWiener::RunDeconvolutio { std::vector wfDeco; wfDeco.reserve(wfVector.size()); - for(auto const& wf : wfVector) - { + for(auto const& wf : wfVector){ int channelNumber = wf.ChannelNumber(); - auto it = std::find(fSkipChannelList.begin(), fSkipChannelList.end(), channelNumber); - if (it == fSkipChannelList.end()) { + if(fPMTCalibrationDatabaseService->getReconstructChannel(channelNumber)) { fSinglePEWave = fPMTCalibrationDatabaseService->getSER(channelNumber); double SPEAmplitude = fPMTCalibrationDatabaseService->getSPEAmplitude(channelNumber); double SPEPeakValue = *std::max_element(fSinglePEWave.begin(), fSinglePEWave.end(), [](double a, double b) {return std::abs(a) < std::abs(b);}); diff --git a/sbndcode/OpDetReco/OpDeconvolution/job/opdeconvolution_sbnd.fcl b/sbndcode/OpDetReco/OpDeconvolution/job/opdeconvolution_sbnd.fcl index 0d7790bf5..71bf626cb 100644 --- a/sbndcode/OpDetReco/OpDeconvolution/job/opdeconvolution_sbnd.fcl +++ b/sbndcode/OpDetReco/OpDeconvolution/job/opdeconvolution_sbnd.fcl @@ -34,7 +34,6 @@ SBNDOpDeconvolutionPMT_data.Electronics: [""] SBNDOpDeconvolutionPMT_data.OpDecoAlg.OpDetDataFile: "./OpDetSim/digi_pmt_sbnd_data_OV6.root" SBNDOpDeconvolutionPMT_data.OpDecoAlg.Filter: "(x>0)*exp(-0.5*pow(x/[0],[1]))" #Gauss filter, remove DC component F(0)=0 SBNDOpDeconvolutionPMT_data.OpDecoAlg.DecoWaveformPrecision: 0.005 -SBNDOpDeconvolutionPMT_data.OpDecoAlg.SkipChannelList: [39, 66, 67, 71, 85, 86, 87, 92, 115, 138, 141, 170, 197, 217, 218, 221, 222, 223, 226, 245, 248, 249, 302] ###### PMT REALISTIC MC ###### @@ -46,7 +45,6 @@ SBNDOpDeconvolutionPMT_realisticMC.Electronics: [""] SBNDOpDeconvolutionPMT_realisticMC.OpDecoAlg.OpDetDataFile: "./OpDetSim/digi_pmt_sbnd_data_OV6.root" SBNDOpDeconvolutionPMT_realisticMC.OpDecoAlg.Filter: "(x>0)*exp(-0.5*pow(x/[0],[1]))" #Gauss filter, remove DC component F(0)=0 SBNDOpDeconvolutionPMT_realisticMC.OpDecoAlg.DecoWaveformPrecision: 0.005 -SBNDOpDeconvolutionPMT_realisticMC.OpDecoAlg.SkipChannelList: [39, 66, 67, 71, 85, 86, 87, 92, 115, 138, 141, 170, 197, 217, 218, 221, 222, 223, 226, 245, 248, 249, 302] ###### XA IDEAL MC ###### From 39d2e1e12702e11200c384520e800101a3eead4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1nchez=20Castillo?= Date: Wed, 17 Dec 2025 06:46:45 -0600 Subject: [PATCH 13/15] Cleanup --- sbndcode/OpDetReco/OpDeconvolution/job/sbnd_flashfinder_deco.fcl | 1 - 1 file changed, 1 deletion(-) diff --git a/sbndcode/OpDetReco/OpDeconvolution/job/sbnd_flashfinder_deco.fcl b/sbndcode/OpDetReco/OpDeconvolution/job/sbnd_flashfinder_deco.fcl index 8e314c8f2..e83ffdbbb 100644 --- a/sbndcode/OpDetReco/OpDeconvolution/job/sbnd_flashfinder_deco.fcl +++ b/sbndcode/OpDetReco/OpDeconvolution/job/sbnd_flashfinder_deco.fcl @@ -41,7 +41,6 @@ SBNDDecoSimpleFlashTPC1_data.ReadoutDelay: 0 //cable time delay in us SBNDDecoSimpleFlashTPC1_data.DriftEstimatorConfig.tool_type: "DriftEstimatorPMTRatio" SBNDDecoSimpleFlashTPC1_data.DriftEstimatorConfig.DataCalibration: true SBNDDecoSimpleFlashTPC1_data.DriftEstimatorConfig.CalibrationFile: "OpDetReco/PMTRatioCalibration_data_v2_tpc1.root" -SBNDDecoSimpleFlashTPC1_data.CorrectLightPropagation: true SBNDDecoSimpleFlashTPC1_data.FlashGeoConfig: @local::FlashGeoThresholdTPC1Data From 1e6f62167c6fe8d1c3b364ab9256210435dc1700 Mon Sep 17 00:00:00 2001 From: lynnt20 Date: Wed, 17 Dec 2025 09:14:22 -0600 Subject: [PATCH 14/15] update opdetwaveform label for pmtmcpmetric producer, use correct producer order in standard detsim --- sbndcode/JobConfigurations/standard/standard_detsim_sbnd.fcl | 4 ++-- sbndcode/Trigger/PMTSoftware/fcls/pmtmcmetricproducer.fcl | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sbndcode/JobConfigurations/standard/standard_detsim_sbnd.fcl b/sbndcode/JobConfigurations/standard/standard_detsim_sbnd.fcl index 2dabe25f4..e9ab0fff7 100755 --- a/sbndcode/JobConfigurations/standard/standard_detsim_sbnd.fcl +++ b/sbndcode/JobConfigurations/standard/standard_detsim_sbnd.fcl @@ -68,12 +68,12 @@ physics: simtpc2d: @local::sbnd_wcls_simsp_bothrois crtsim: @local::sbnd_crtsim opdaq: @local::sbnd_opdetdigitizer - pmtmetricmc: @local::sbnd_pmtmcmetricproducer pmtpulseoscillation: @local::sbnd_pmtpulseoscillation + pmtmetricmc: @local::sbnd_pmtmcmetricproducer } #define the producer and filter modules for this path, order matters, - simulate: [rns, simtpc2d, crtsim, opdaq, pmtmetricmc, pmtpulseoscillation] + simulate: [rns, simtpc2d, crtsim, opdaq, pmtpulseoscillation, pmtmetricmc] #define the output stream, there could be more than one if using filters stream1: [ out1 ] diff --git a/sbndcode/Trigger/PMTSoftware/fcls/pmtmcmetricproducer.fcl b/sbndcode/Trigger/PMTSoftware/fcls/pmtmcmetricproducer.fcl index 3b35661ba..dacda483b 100644 --- a/sbndcode/Trigger/PMTSoftware/fcls/pmtmcmetricproducer.fcl +++ b/sbndcode/Trigger/PMTSoftware/fcls/pmtmcmetricproducer.fcl @@ -3,9 +3,12 @@ BEGIN_PROLOG sbnd_pmtmcmetricproducer: { module_type: "PMTMCMetricProducer" PDTypes: ["pmt_coated","pmt_uncoated"] - OpDetWaveformsLabel: "opdaq" + OpDetWaveformsLabel: "pmtpulseoscillation" StartTime: -1 ADCtoPE: 12.5 # don't change this without good reason, needs to be kept consistent with DAQ version + + ## the "off" PMT channels are properly accounted for in realistic PMT detsim + ## this fcl parameter is kept for legacy reasons, can be used for debugging #ChannelsToIgnore: [39, 66, 67, 71, 85, 86, 87, 92, 115, 138, 141, 170, 197, 217, 218, 221, 222, 223, 226, 245, 248, 249, 302] } END_PROLOG \ No newline at end of file From 09171c543e8f1d5ad5ab3439f4a36dd121abdb9e Mon Sep 17 00:00:00 2001 From: lynnt20 Date: Wed, 17 Dec 2025 09:30:08 -0600 Subject: [PATCH 15/15] remove unused vars `fPositivePolarity` is inferred during configuration --- sbndcode/OpDetSim/DigiPMTSBNDAlg.hh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sbndcode/OpDetSim/DigiPMTSBNDAlg.hh b/sbndcode/OpDetSim/DigiPMTSBNDAlg.hh index 7a7d7bcd0..25b714a41 100644 --- a/sbndcode/OpDetSim/DigiPMTSBNDAlg.hh +++ b/sbndcode/OpDetSim/DigiPMTSBNDAlg.hh @@ -81,8 +81,6 @@ namespace opdet { bool MakeGainFluctuations; //Fluctuate PMT gain fhicl::ParameterSet GainFluctuationsParams; bool SimulateNonLinearity; //Fluctuate PMT gain - bool PositivePolarity; - bool OscillateAfterPulse; bool UseDataNoise; fhicl::ParameterSet NonLinearityParams; @@ -135,8 +133,6 @@ namespace opdet { return fParams.PMTBaseline; } - void AddOscillationAfterPulse( std::vector& wave); - private: ConfigurationParameters_t fParams;