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 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 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/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 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 ###### diff --git a/sbndcode/OpDetReco/OpDeconvolution/job/sbnd_flashfinder_deco.fcl b/sbndcode/OpDetReco/OpDeconvolution/job/sbnd_flashfinder_deco.fcl index 610e9c818..e83ffdbbb 100644 --- a/sbndcode/OpDetReco/OpDeconvolution/job/sbnd_flashfinder_deco.fcl +++ b/sbndcode/OpDetReco/OpDeconvolution/job/sbnd_flashfinder_deco.fcl @@ -28,57 +28,37 @@ 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.DriftEstimatorConfig.CalibrationFile: "OpDetReco/PMTRatioCalibration_data_v2_tpc0.root" +SBNDDecoSimpleFlashTPC0_data.FlashGeoConfig: @local::FlashGeoThresholdTPC0Data #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.CorrectLightPropagation: true +SBNDDecoSimpleFlashTPC1_data.DriftEstimatorConfig.CalibrationFile: "OpDetReco/PMTRatioCalibration_data_v2_tpc1.root" +SBNDDecoSimpleFlashTPC1_data.FlashGeoConfig: @local::FlashGeoThresholdTPC1Data ###### 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 +SBNDDecoSimpleFlashTPC0_realisticMC.FlashGeoConfig: @local::FlashGeoThresholdTPC0_realisticMC #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 +SBNDDecoSimpleFlashTPC1_realisticMC.FlashGeoConfig: @local::FlashGeoThresholdTPC1_realisticMC ###### XA IDEAL MC ###### - ####OpFlash finder for XArapucas deconvolved waveforms##### ###TPC0 SBNDDecoSimpleFlashTPC0Arapuca: @local::SBNDSimpleFlashTPC0 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 diff --git a/sbndcode/OpDetReco/OpFlash/job/sbnd_flashgeoalgo.fcl b/sbndcode/OpDetReco/OpFlash/job/sbnd_flashgeoalgo.fcl index 18051a4c2..018bb0e94 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"] + ThresholdY: 0.5 + ThresholdZ: 0.5 + NormalizeByPDType: true + WeightExp: 2 +} + +FlashGeoThresholdTPC1Data:{ + tool_type: "FlashGeoThreshold" + PDTypes: ["pmt_coated"] + ThresholdY: 0.5 + ThresholdZ: 0.5 + NormalizeByPDType: true + WeightExp: 2 +} + +FlashGeoThresholdTPC0_realisticMC:{ + tool_type: "FlashGeoThreshold" + PDTypes: ["pmt_coated"] + ThresholdY: 0.7 + ThresholdZ: 0.7 + NormalizeByPDType: true + WeightExp: 2 +} + +FlashGeoThresholdTPC1_realisticMC:{ + tool_type: "FlashGeoThreshold" + PDTypes: ["pmt_coated"] + ThresholdY: 0.6 + ThresholdZ: 0.6 NormalizeByPDType: true WeightExp: 2 } 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; 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