From 8de8cf0bf24e8a9a8e7de9479b22b5d4bef145f3 Mon Sep 17 00:00:00 2001 From: Patrick Green Date: Mon, 29 Nov 2021 11:14:51 -0600 Subject: [PATCH 1/8] Added configuration for photon propagation time simulation in external argon (hybrid model) --- sbndcode/LArSoftConfigurations/PDFastSim_sbnd.fcl | 3 +++ .../opticalsimparameterisations_sbnd.fcl | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/sbndcode/LArSoftConfigurations/PDFastSim_sbnd.fcl b/sbndcode/LArSoftConfigurations/PDFastSim_sbnd.fcl index 0a04620c6..d9a85121c 100644 --- a/sbndcode/LArSoftConfigurations/PDFastSim_sbnd.fcl +++ b/sbndcode/LArSoftConfigurations/PDFastSim_sbnd.fcl @@ -42,6 +42,9 @@ sbnd_pdfastsim_pvs.IncludePropTime: true sbnd_pdfastsim_pvs.StoreReflected: true sbnd_pdfastsim_pvs.ScintTimeTool.SlowDecayTime: 1300.0 +# propagation times +sbnd_pdfastsim_pvs.VUVTiming: @local::sbnd_vuv_timing_parameterization_fast +sbnd_pdfastsim_pvs.VISTiming: @local::sbnd_vis_timing_parameterization END_PROLOG diff --git a/sbndcode/LArSoftConfigurations/opticalsimparameterisations_sbnd.fcl b/sbndcode/LArSoftConfigurations/opticalsimparameterisations_sbnd.fcl index 0b22fbe41..51fc01a48 100644 --- a/sbndcode/LArSoftConfigurations/opticalsimparameterisations_sbnd.fcl +++ b/sbndcode/LArSoftConfigurations/opticalsimparameterisations_sbnd.fcl @@ -62,6 +62,11 @@ sbnd_vuv_timing_parameterization: angle_bin_timing_vuv: 45 } +// faster, lower precision case for external argon volume (hybrid model) +sbnd_vuv_timing_parameterization_fast: @local::sbnd_vuv_timing_parameterization +sbnd_vuv_timing_parameterization_fast.step_size: 5. +sbnd_vuv_timing_parameterization_fast.angle_bin_timing_vuv: 90 + # VUV/DIRECT LIGHT: NUMBER OF HITS CORRECTIONS # SBND Gaisser-Hillas From 5303d5bb3661823713e520149d23156a6d4eefad Mon Sep 17 00:00:00 2001 From: Patrick Green Date: Mon, 6 Dec 2021 09:32:49 -0600 Subject: [PATCH 2/8] Re-enable hybrid light simulation --- .../g4/g4_3drift_faketrigger_filter.fcl | 4 +- .../standard/g4/g4_dirt_filter.fcl | 4 +- .../standard/g4/g4_enterstpc_filter.fcl | 4 +- .../standard/g4/g4_michelelectron_filter.fcl | 4 +- .../standard/g4/g4_mu_crt_filter_base.fcl | 4 +- .../standard/g4/g4_simphotontime_filter.fcl | 40 +++++++++---------- .../standard/standard_g4_sbnd.fcl | 10 ++--- 7 files changed, 34 insertions(+), 36 deletions(-) diff --git a/sbndcode/JobConfigurations/standard/g4/g4_3drift_faketrigger_filter.fcl b/sbndcode/JobConfigurations/standard/g4/g4_3drift_faketrigger_filter.fcl index 476a9001d..4f4c307c3 100644 --- a/sbndcode/JobConfigurations/standard/g4/g4_3drift_faketrigger_filter.fcl +++ b/sbndcode/JobConfigurations/standard/g4/g4_3drift_faketrigger_filter.fcl @@ -8,9 +8,9 @@ physics.simulate: [ rns , loader , largeant , ionandscint - # , ionandscintout + , ionandscintout , pdfastsim - # , pdfastsimout + , pdfastsimout , simdrift , filter # Adding filter , mcreco diff --git a/sbndcode/JobConfigurations/standard/g4/g4_dirt_filter.fcl b/sbndcode/JobConfigurations/standard/g4/g4_dirt_filter.fcl index 9c289b918..40594383a 100644 --- a/sbndcode/JobConfigurations/standard/g4/g4_dirt_filter.fcl +++ b/sbndcode/JobConfigurations/standard/g4/g4_dirt_filter.fcl @@ -4,9 +4,9 @@ physics.simulate: [ rns , ionandscint - # , ionandscintout + , ionandscintout , pdfastsim - # , pdfastsimout + , pdfastsimout , simdrift , mcreco , genericcrt diff --git a/sbndcode/JobConfigurations/standard/g4/g4_enterstpc_filter.fcl b/sbndcode/JobConfigurations/standard/g4/g4_enterstpc_filter.fcl index 5f1c7f3b3..712c1b0c2 100644 --- a/sbndcode/JobConfigurations/standard/g4/g4_enterstpc_filter.fcl +++ b/sbndcode/JobConfigurations/standard/g4/g4_enterstpc_filter.fcl @@ -6,9 +6,9 @@ physics.simulate: [ rns , loader , largeant , ionandscint - # , ionandscintout + , ionandscintout , pdfastsim - # , pdfastsimout + , pdfastsimout , simdrift , filter # Adding filter , mcreco diff --git a/sbndcode/JobConfigurations/standard/g4/g4_michelelectron_filter.fcl b/sbndcode/JobConfigurations/standard/g4/g4_michelelectron_filter.fcl index bb5e3ebf6..014b126d1 100644 --- a/sbndcode/JobConfigurations/standard/g4/g4_michelelectron_filter.fcl +++ b/sbndcode/JobConfigurations/standard/g4/g4_michelelectron_filter.fcl @@ -5,9 +5,9 @@ physics.simulate: [ rns , loader , largeant , ionandscint - # , ionandscintout + , ionandscintout , pdfastsim - # , pdfastsimout + , pdfastsimout , simdrift , filter # Adding filter , mcreco diff --git a/sbndcode/JobConfigurations/standard/g4/g4_mu_crt_filter_base.fcl b/sbndcode/JobConfigurations/standard/g4/g4_mu_crt_filter_base.fcl index e2d85aab6..33235e3b5 100644 --- a/sbndcode/JobConfigurations/standard/g4/g4_mu_crt_filter_base.fcl +++ b/sbndcode/JobConfigurations/standard/g4/g4_mu_crt_filter_base.fcl @@ -7,9 +7,9 @@ physics.simulate: [ rns , loader , largeant , ionandscint - # , ionandscintout + , ionandscintout , pdfastsim - # , pdfastsimout + , pdfastsimout , simdrift , filter # Adding filter , mcreco diff --git a/sbndcode/JobConfigurations/standard/g4/g4_simphotontime_filter.fcl b/sbndcode/JobConfigurations/standard/g4/g4_simphotontime_filter.fcl index f3ec09b67..46f0ef7c8 100644 --- a/sbndcode/JobConfigurations/standard/g4/g4_simphotontime_filter.fcl +++ b/sbndcode/JobConfigurations/standard/g4/g4_simphotontime_filter.fcl @@ -30,16 +30,16 @@ physics.producers.simdriftouttime.SimulationLabel: "ionandscintouttime:priorSCE" physics.producers.genericcrtouttime.LArG4Label: "larg4outtime" # Add processes for light simulation outside the active volume (AV) for the intimes -# physics.producers.ionandscintoutintime: @local::sbnd_ionandscint_out -# physics.producers.pdfastsimoutintime: @local::sbnd_pdfastsim_pvs -# physics.producers.ionandscintoutintime.InputModuleLabels: ["larg4intime"] -# physics.producers.pdfastsimoutintime.SimulationLabel: "ionandscintoutintime" +physics.producers.ionandscintoutintime: @local::sbnd_ionandscint_out +physics.producers.pdfastsimoutintime: @local::sbnd_pdfastsim_pvs +physics.producers.ionandscintoutintime.InputModuleLabels: ["larg4intime"] +physics.producers.pdfastsimoutintime.SimulationLabel: "ionandscintoutintime" # Add processes for light simulation outside the active volume (AV) for the outtimes -# physics.producers.ionandscintoutouttime: @local::sbnd_ionandscint_out -# physics.producers.pdfastsimoutouttime: @local::sbnd_pdfastsim_pvs -# physics.producers.ionandscintoutouttime.InputModuleLabels: ["larg4outtime"] -# physics.producers.pdfastsimoutouttime.SimulationLabel: "ionandscintoutouttime" +physics.producers.ionandscintoutouttime: @local::sbnd_ionandscint_out +physics.producers.pdfastsimoutouttime: @local::sbnd_pdfastsim_pvs +physics.producers.ionandscintoutouttime.InputModuleLabels: ["larg4outtime"] +physics.producers.pdfastsimoutouttime.SimulationLabel: "ionandscintoutouttime" # Add a process that merges the MCParticles physics.producers.largeant: @local::sbnd_merge_sim_sources @@ -67,9 +67,9 @@ physics.producers.pdfastsim.FillSimPhotons: true physics.producers.pdfastsim.InputSourcesLabels: [ "pdfastsimintime", "pdfastsimouttime"] # Add a process that merges the SimPhotons outside the AV -# physics.producers.pdfastsimout: @local::sbnd_merge_sim_sources -# physics.producers.pdfastsimout.FillSimPhotons: true -# physics.producers.pdfastsimout.InputSourcesLabels: [ "pdfastsimoutintime", "pdfastsimoutouttime"] +physics.producers.pdfastsimout: @local::sbnd_merge_sim_sources +physics.producers.pdfastsimout.FillSimPhotons: true +physics.producers.pdfastsimout.InputSourcesLabels: [ "pdfastsimoutintime", "pdfastsimoutouttime"] # Add all these new modules to the simulate path physics.simulate: [ rns @@ -84,16 +84,16 @@ physics.simulate: [ rns , simdriftouttime , genericcrtouttime ### Simulate the light outside the AV - # , ionandscintoutintime - # , pdfastsimoutintime - # , ionandscintoutouttime - # , pdfastsimoutouttime + , ionandscintoutintime + , pdfastsimoutintime + , ionandscintoutouttime + , pdfastsimoutouttime ### Merge the intime and outtime paths , largeant , ionandscint , simdrift , pdfastsim - # , pdfastsimout + , pdfastsimout , genericcrt ### Do truth-level reconstruction , mcreco @@ -117,11 +117,11 @@ outputs.out1.outputCommands: [ "keep *_*_*_*" , "drop *_simdriftintime_*_*" , "drop *_simdriftouttime_*_*" # Drop IonAndScint Outside AV - # , "drop *_ionandscintoutintime_*_*" - # , "drop *_ionandscintoutouttime_*_*" + , "drop *_ionandscintoutintime_*_*" + , "drop *_ionandscintoutouttime_*_*" # Drop PDFastSim Ouside AV - # , "drop *_pdfastsimoutintime_*_*" - # , "drop *_pdfastsimoutouttime_*_*" + , "drop *_pdfastsimoutintime_*_*" + , "drop *_pdfastsimoutouttime_*_*" # Drop LArG4 AuxDetHits, now replaced by AuxDetSimChannels , "drop sim::AuxDetHits_*_*_*" ] diff --git a/sbndcode/JobConfigurations/standard/standard_g4_sbnd.fcl b/sbndcode/JobConfigurations/standard/standard_g4_sbnd.fcl index e9cb9e5f4..db3d7ea98 100644 --- a/sbndcode/JobConfigurations/standard/standard_g4_sbnd.fcl +++ b/sbndcode/JobConfigurations/standard/standard_g4_sbnd.fcl @@ -74,15 +74,13 @@ physics: ionandscint: @local::sbnd_ionandscint # Creation of ionization electrons and scintillation photons, outside the active volume - # ionandscintout: @local::sbnd_ionandscint_out + ionandscintout: @local::sbnd_ionandscint_out # Light propogation inside the active volume pdfastsim: @local::sbnd_pdfastsim_par # Light propogation outside the active volume - # Nov 16th, 2021 - # Temporarily disable light simulation in the OUT-TPC (sbndcode issue 219) - # pdfastsimout: @local::sbnd_pdfastsim_pvs + pdfastsimout: @local::sbnd_pdfastsim_pvs # Electron propogation simdrift: @local::sbnd_simdrift @@ -100,9 +98,9 @@ physics: , loader , largeant , ionandscint - # , ionandscintout + , ionandscintout , pdfastsim - # , pdfastsimout + , pdfastsimout , simdrift , mcreco , genericcrt From b085c64d00f742612998e9fb62a438f572753e1a Mon Sep 17 00:00:00 2001 From: fran-nicar Date: Tue, 21 Dec 2021 11:24:07 -0600 Subject: [PATCH 3/8] Change voxelization scheme for hybrid model --- .../photpropservices_sbnd.fcl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sbndcode/LArSoftConfigurations/photpropservices_sbnd.fcl b/sbndcode/LArSoftConfigurations/photpropservices_sbnd.fcl index 0d6907041..ae8aa82c2 100644 --- a/sbndcode/LArSoftConfigurations/photpropservices_sbnd.fcl +++ b/sbndcode/LArSoftConfigurations/photpropservices_sbnd.fcl @@ -95,17 +95,17 @@ sbnd_library_for_hybrid_mode_photonvisibilityservice: { @table::sbnd_library_vuv_vis_prop_timing_photonvisibilityservice LibraryFile: "OpticalLibrary/SBND_OpLibOUT_v2.00.root" - NX: 66 - NY: 56 + NX: 104 + NY: 54 NZ: 71 UseCryoBoundary: false # IF UseCryoBoundary is set to false, so use the following parameters. - XMin: -264 - XMax: 264 - YMin: -280 - YMax: 280 - ZMin: -60 - ZMax: 650 + XMin: -261.69 + XMax: 261.69 + YMin: -275.0382 + YMax: 275.0382 + ZMin: -59.9294 + ZMax: 649.2353 } From f5d8d71de689859969998835e07c428d3a997ad4 Mon Sep 17 00:00:00 2001 From: Marco Del Tutto Date: Mon, 17 Jan 2022 10:35:27 -0600 Subject: [PATCH 4/8] Pass the SemiAnalyticalModel class to the FlashMatchManager With the SemiAnalyticalModel class, the OpT0Finder code will work with the new LArG4 --- sbndcode/OpT0Finder/SBNDOpT0Finder_module.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sbndcode/OpT0Finder/SBNDOpT0Finder_module.cc b/sbndcode/OpT0Finder/SBNDOpT0Finder_module.cc index 08cbaa350..1658d7c6e 100644 --- a/sbndcode/OpT0Finder/SBNDOpT0Finder_module.cc +++ b/sbndcode/OpT0Finder/SBNDOpT0Finder_module.cc @@ -33,6 +33,8 @@ #include "lardataobj/AnalysisBase/T0.h" #include "larcore/Geometry/Geometry.h" +#include "larsim/PhotonPropagation/SemiAnalyticalModel.h" + #include "larpandora/LArPandoraInterface/LArPandoraHelper.h" #include "sbncode/OpT0Finder/flashmatch/Base/OpT0FinderTypes.h" @@ -87,6 +89,10 @@ class SBNDOpT0Finder : public art::EDProducer { /// Returns a list of uncoated PMTs that are a subset of those in ch_to_use std::vector GetUncoatedPTMList(std::vector ch_to_use); + std::unique_ptr _semi_model; + fhicl::ParameterSet _vuv_params; + fhicl::ParameterSet _vis_params; + ::flashmatch::FlashMatchManager _mgr; ///< The flash matching manager std::vector _result_v; ///< Matching result will be stored here @@ -137,6 +143,10 @@ SBNDOpT0Finder::SBNDOpT0Finder(fhicl::ParameterSet const& p) ::art::ServiceHandle geo; + _vuv_params = p.get("VUVHits"); + _vis_params = p.get("VIVHits"); + _semi_model = std::make_unique(_vuv_params, _vis_params, true, false); + _opflash_producer_v = p.get>("OpFlashProducers"); _tpc_v = p.get>("TPCs"); _slice_producer = p.get("SliceProducer"); @@ -162,6 +172,7 @@ SBNDOpT0Finder::SBNDOpT0Finder(fhicl::ParameterSet const& p) _mgr.SetUncoatedPMTs(_uncoated_pmts); + _mgr.SetSemiAnalyticalModel(std::move(_semi_model)); _flash_spec.resize(geo->NOpDets(), 0.); _hypo_spec.resize(geo->NOpDets(), 0.); From f17165b6faa7dadc6702691774b42906520c6f2e Mon Sep 17 00:00:00 2001 From: Marco Del Tutto Date: Mon, 17 Jan 2022 10:37:16 -0600 Subject: [PATCH 5/8] Improve messages --- sbndcode/OpT0Finder/SBNDOpT0Finder_module.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sbndcode/OpT0Finder/SBNDOpT0Finder_module.cc b/sbndcode/OpT0Finder/SBNDOpT0Finder_module.cc index 1658d7c6e..43a981bf9 100644 --- a/sbndcode/OpT0Finder/SBNDOpT0Finder_module.cc +++ b/sbndcode/OpT0Finder/SBNDOpT0Finder_module.cc @@ -314,20 +314,20 @@ void SBNDOpT0Finder::DoMatch(art::Event& e, // Don't waste time if there are no flashes if (n_flashes == 0) { - mf::LogWarning("SBNDOpT0Finder") << "Zero good flashes in this event." << std::endl; + mf::LogInfo("SBNDOpT0Finder") << "Zero good flashes in this event." << std::endl; return; } // Get all the ligh clusters // auto light_cluster_v = GetLighClusters(e); if (!ConstructLightClusters(e, tpc)) { - mf::LogWarning("SBNDOpT0Finder") << "Cannot construct Light Clusters." << std::endl; + mf::LogInfo("SBNDOpT0Finder") << "Cannot construct Light Clusters." << std::endl; return; } // Don't waste time if there are no clusters if (!_light_cluster_v.size()) { - mf::LogWarning("SBNDOpT0Finder") << "No slices to work with." << std::endl; + mf::LogInfo("SBNDOpT0Finder") << "No slices to work with in TPC " << tpc << "." << std::endl; return; } @@ -356,6 +356,7 @@ void SBNDOpT0Finder::DoMatch(art::Event& e, mf::LogInfo("SBNDOpT0Finder") << "Matched TPC object " << _tpcid << " with flash number " << _flashid + << " in TPC " << tpc << " -> score: " << _score << ", qll xmin: " << _qll_xmin << std::endl; From 4674b9f75f97fbf277c7e9f878539a18116a5417 Mon Sep 17 00:00:00 2001 From: Marco Del Tutto Date: Mon, 17 Jan 2022 10:39:02 -0600 Subject: [PATCH 6/8] Re-add opt0finder to standard reco chain --- sbndcode/JobConfigurations/base/reco_sbnd.fcl | 11 ++--------- .../JobConfigurations/standard/reco/reco2_sce.fcl | 4 ++-- .../standard/standard_reco2_sbnd.fcl | 3 +-- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/sbndcode/JobConfigurations/base/reco_sbnd.fcl b/sbndcode/JobConfigurations/base/reco_sbnd.fcl index cf6e45a36..67dd048e8 100644 --- a/sbndcode/JobConfigurations/base/reco_sbnd.fcl +++ b/sbndcode/JobConfigurations/base/reco_sbnd.fcl @@ -211,14 +211,10 @@ physics: , crthitt0 , crttrackt0 , fmatch + , opt0finder , caloskimCalorimetry ] - # The new flashmatching will eventually be part of reco2, but for now - # we are keeping it separate here so we can easily remove if from the - # reco fcl files. - opticalt0: [ opt0finder ] - # Run caloskimmer to produce ntuples for calibration as part of reco2 chain analyzers:{ @@ -265,10 +261,7 @@ outputs: #Here we tell ART that we want to run both sequences of paths. This has to be done here as ART is not able to find the sequences while still wrapped in physics{ } physics.fullreco: [ @sequence::physics.reco1, @sequence::physics.reco2 - #,opt0finder - ] -physics.fullreco_noflashmatch: [ @sequence::physics.reco1, - @sequence::physics.reco2] + ] physics.trigger_paths: [ fullreco ] diff --git a/sbndcode/JobConfigurations/standard/reco/reco2_sce.fcl b/sbndcode/JobConfigurations/standard/reco/reco2_sce.fcl index 3838e4a77..18dfaaeee 100644 --- a/sbndcode/JobConfigurations/standard/reco/reco2_sce.fcl +++ b/sbndcode/JobConfigurations/standard/reco/reco2_sce.fcl @@ -12,8 +12,8 @@ process_name: Reco2 -physics.reco2_sce: [@sequence::physics.reco2, #opt0finder, - pandoraSCE, pandoraSCETrack, pandoraSCEShower, pandoraSCEShowerSBN, pandoraSCECalo, pandoraSCEPid, fmatchSCE]#, opt0finderSCE] +physics.reco2_sce: [@sequence::physics.reco2, + pandoraSCE, pandoraSCETrack, pandoraSCEShower, pandoraSCEShowerSBN, pandoraSCECalo, pandoraSCEPid, fmatchSCE, opt0finderSCE] physics.trigger_paths: [ reco2_sce ] diff --git a/sbndcode/JobConfigurations/standard/standard_reco2_sbnd.fcl b/sbndcode/JobConfigurations/standard/standard_reco2_sbnd.fcl index 3a17c29c2..30aede778 100644 --- a/sbndcode/JobConfigurations/standard/standard_reco2_sbnd.fcl +++ b/sbndcode/JobConfigurations/standard/standard_reco2_sbnd.fcl @@ -12,6 +12,5 @@ process_name: Reco2 -physics.trigger_paths: [reco2 #, opticalt0 - ] +physics.trigger_paths: [ reco2 ] physics.end_paths: [stream1, caloskimana] From 7f50f7abd8fc88c4a4fee05bd734f63c0d61e67f Mon Sep 17 00:00:00 2001 From: Marco Del Tutto Date: Mon, 17 Jan 2022 10:39:54 -0600 Subject: [PATCH 7/8] Add VUVHits and VISHits to opt0finder config --- sbndcode/OpT0Finder/job/opt0finder_sbnd.fcl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sbndcode/OpT0Finder/job/opt0finder_sbnd.fcl b/sbndcode/OpT0Finder/job/opt0finder_sbnd.fcl index 78ae9a253..e957379ec 100644 --- a/sbndcode/OpT0Finder/job/opt0finder_sbnd.fcl +++ b/sbndcode/OpT0Finder/job/opt0finder_sbnd.fcl @@ -1,4 +1,5 @@ #include "flashmatchalg.fcl" +#include "opticalsimparameterisations_sbnd.fcl" BEGIN_PROLOG @@ -15,6 +16,9 @@ sbnd_opt0_finder: PhotoDetectors: ["pmt_coated", "pmt_uncoated"] TPC: 0 + VUVHits: @local::sbnd_vuv_RS100cm_hits_parameterization + VIVHits: @local::sbnd_vis_RS100cm_hits_parameterization + FlashMatchConfig: @local::flashmatch_config ChargeToNPhotonsTrack: 39 # (1 / 0.0201293) e-/ADC*time_ticks x From e0d24a2d33b5e1484ce148122ceef4d97771d660 Mon Sep 17 00:00:00 2001 From: Patrick Green Date: Tue, 8 Feb 2022 11:29:40 -0600 Subject: [PATCH 8/8] Update to sbnd_data v01_11_00 --- ups/product_deps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ups/product_deps b/ups/product_deps index ea35176e0..712a4dc8b 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -35,7 +35,7 @@ fwdir product_dir scripts product version sbncode v09_37_01_03 -sbnd_data v01_10_00 - optional +sbnd_data v01_11_00 - optional sbndutil v09_37_01_01 - optional # list products required ONLY for the build