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/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/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_g4_sbnd.fcl b/sbndcode/JobConfigurations/standard/standard_g4_sbnd.fcl index 79df87abc..99c71ab88 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 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] 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 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 } diff --git a/sbndcode/OpT0Finder/SBNDOpT0Finder_module.cc b/sbndcode/OpT0Finder/SBNDOpT0Finder_module.cc index 08cbaa350..43a981bf9 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.); @@ -303,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; } @@ -345,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; 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 diff --git a/ups/product_deps b/ups/product_deps index 14edea0cd..3b4489cf7 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -35,7 +35,7 @@ fwdir product_dir scripts product version sbncode v09_37_02 -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