From 12bca9a71ac2292a55fa5cc6ee397f1fa99c00c6 Mon Sep 17 00:00:00 2001 From: Laura Paulucci Date: Tue, 27 Jan 2026 03:26:27 -0600 Subject: [PATCH 1/3] New PDVD OpHit calibrator --- .../PhotonCalibratorProtoDUNEVD.cc | 54 +++++++++++++++ .../PhotonCalibratorProtoDUNEVD.fcl | 30 ++++++++ .../PhotonCalibratorProtoDUNEVD.h | 51 ++++++++++++++ .../PhotonCalibratorServiceProtoDUNEVD.h | 68 +++++++++++++++++++ ...tonCalibratorServiceProtoDUNEVD_service.cc | 9 +++ 5 files changed, 212 insertions(+) create mode 100644 duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.cc create mode 100644 duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.fcl create mode 100644 duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.h create mode 100644 duneopdet/OpticalDetector/PhotonCalibratorServiceProtoDUNEVD.h create mode 100644 duneopdet/OpticalDetector/PhotonCalibratorServiceProtoDUNEVD_service.cc diff --git a/duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.cc b/duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.cc new file mode 100644 index 00000000..d69a9337 --- /dev/null +++ b/duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.cc @@ -0,0 +1,54 @@ +// dunetpc includes +#include "duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.h" + +// LArSoft Includes +#include "larreco/Calibrator/IPhotonCalibrator.h" +#include "larcore/Geometry/Geometry.h" +#include "larcore/CoreUtils/ServiceUtil.h" // lar::providerFrom() +#include "larcore/Geometry/WireReadout.h" + +// ART includes +#include "fhiclcpp/ParameterSet.h" +#include "art/Framework/Services/Registry/ActivityRegistry.h" +#include "art/Framework/Services/Registry/ServiceHandle.h" +#include "art/Framework/Services/Registry/ServiceMacros.h" +#include "messagefacility/MessageLogger/MessageLogger.h" + +#include +#include +#include + +namespace calib { + + PhotonCalibratorProtoDUNEVD::PhotonCalibratorProtoDUNEVD(fhicl::ParameterSet const& pset, art::ActivityRegistry& reg) + { + + fBadChannels = pset.get >("BadChannels"); + fHdwChannels = pset.get >("HdwChannels"); + fSPEAreas = pset.get >("SPEAreas"); + fSPEShifts = pset.get >("SPEShifts"); + + //Map for associating each hardware channel with its correspondent SPE area + for(size_t i=0; isecond; + auto entry2 = fShiftMap.find(opchannel); + float shift = entry2->second; + return adcs/area + shift; + } + +} + +//DEFINE_ART_SERVICE_INTERFACE_IMPL(calib::PhotonCalibratorProtoDUNEVD, calib::IPhotonCalibrator) diff --git a/duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.fcl b/duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.fcl new file mode 100644 index 00000000..f89f4cbf --- /dev/null +++ b/duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.fcl @@ -0,0 +1,30 @@ +BEGIN_PROLOG + +# +# Applies channel-by-channel PE calibrations +# + +protodunevd_photoncalibrator_config1: #Data taken between ??? +{ + service_provider: PhotonCalibratorServiceProtoDUNEVD + BadChannels: [ ] + HdwChannels: [ 1010, 1011, 1020, 1021, 1030, 1031, 1040, 1041, 1050, 1051, 1060, 1061, 1070, 1071, 1080, 1081, 2010, 2011, 2020, 2021, 2030, 2031, 2040, 2041, 2050, 2051, 2060, 2061, 2070, 2071, 2080, 2081, 3010, 3020, 3030, 3040, 3050, 3060, 3070, 3080, 3090, 3100, 3110, 3120, 3130, 3140, 3150, 3160, 3170, 3180, 3190, 3200, 3210, 3220, 3230, 3240 ] #hardware channels as in the PDVD_PDS_Mapping (in dunecore/ChannelMap) + SPEShifts: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] + SPEAreas: [ 3482.9, 1893.97, 2148.87, 4332.16, 2063.53, 2000, 2257.92, 2530.51, 5225.09, 5185.5, 2426.86, 2685.4, 3831.38, 3567.7, 1526.98, 1258.39, 2000, 2000, 2000, 2000, 3147.79, 3278.53, 1380.77, 2205.66, 4364.88, 4221.51, 3058.11, 3009.3, 2634.38, 2557.6, 3771.75, 3723.89, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 ] #channel correspondence can be found in the PDVD_PDS_Mapping found in dunecore/ChannelMap. Values from waffles/np02_data/calibration_data --> STILL TO BE OBTAINED. DO NOT USE + +} + +#Data taken between July 10th - 16th +protodunevd_photoncalibrator_config2: @local::protodunevd_photoncalibrator_config1 +protodunevd_photoncalibrator_config2.SPEAreas: [ 3450.06, 1950.04, 2138.67, 4251.92, 2063.53, 2000, 2336.25, 2197.08, 5225.09, 5185.5, 2426.86, 2685.4, 3831.38, 3567.7, 1526.98, 1258.39, 2000, 2000, 2000, 2000, 2794.99, 2732.12, 2073.26, 1948.84, 4302.94, 4255.39, 2900.88, 2826.3, 3238.6, 3074.78, 3669.16, 3723.37, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 ] #Values from waffles/np02_data/calibration_data/ --> STILL TO BE OBTAINED. DO NOT USE + +#Data taken between August 2nd - 8th +protodunevd_photoncalibrator_config3: @local::protodunevd_photoncalibrator_config1 +protodunevd_photoncalibrator_config3.SPEAreas: [ 3450.06, 1950.04, 2138.67, 4251.92, 2063.53, 2000, 2336.25, 2197.08, 5225.09, 5185.5, 2426.86, 2685.4, 3831.38, 3567.7, 1526.98, 1258.39, 2000, 2000, 2000, 2000, 2794.99, 2732.12, 2073.26, 1948.84, 4302.94, 4255.39, 2900.88, 2826.3, 3238.6, 3074.78, 3669.16, 3723.37, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 ] #Values from waffles/np02_data/calibration_data/np02-config-v3.0.0.csv + +#Data taken from August 10th on +protodunevd_photoncalibrator_config3: @local::protodunevd_photoncalibrator_config1 +protodunevd_photoncalibrator_config3.SPEAreas: [ 3482.9, 1893.97, 2148.87, 4332.16, 2063.53, 2000, 2257.92, 2530.51, 5225.09, 5185.5, 2426.86, 2685.4, 3831.38, 3567.7, 1526.98, 1258.39, 2000, 2000, 2000, 2000, 3147.79, 3278.53, 1380.77, 2205.66, 4364.88, 4221.51, 3058.11, 3009.3, 2634.38, 2557.6, 3771.75, 3723.89, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 ] #Values from waffles/np02_data/calibration_data/np02-config-v4.0.0.csv + + +END_PROLOG diff --git a/duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.h b/duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.h new file mode 100644 index 00000000..b50aa20b --- /dev/null +++ b/duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.h @@ -0,0 +1,51 @@ +//////////////////////////////////////////////////////////////////////// +// \file PhotonCalibratorProtoDUNEVD.h +// +// \brief ProtoDUNEVD service provider applying a channel based scale factor to optical hits. +// +// \author lpaulucc@fnal.gov based on PhotonCalibratorProtoduneSP by ahimmel +// +//////////////////////////////////////////////////////////////////////// + + +#ifndef PHOTONCALIBRATORPROTODUNEVD_H +#define PHOTONCALIBRATORPROTODUNEVD_H + +#include "larreco/Calibrator/IPhotonCalibrator.h" + +// ART includes +#include "fhiclcpp/ParameterSet.h" +#include "art/Framework/Services/Registry/ActivityRegistry.h" +#include "art/Framework/Services/Registry/ServiceHandle.h" +#include "art/Framework/Services/Registry/ServiceMacros.h" + + +namespace calib { + + class PhotonCalibratorProtoDUNEVD : public IPhotonCalibrator + { + public: + PhotonCalibratorProtoDUNEVD(fhicl::ParameterSet const& pset, art::ActivityRegistry& reg); + + // Override base class functions + double PE(double adcs, int opchannel) const override; + bool UseArea() const override { return true; } // ProtoDUNE always uses area + + /// Need a 3D position because result depends on position along length of + /// bar. This is going to be pretty imprecise even so. + // virtual double GeV(double PE, int opchannel, TVector3 pos) override; + + private: + std::vector fHdwChannels; + std::vector fSPEAreas; + std::vector fSPEShifts; + std::vector fBadChannels; + std::map fAreaMap; + std::map fShiftMap; + }; // class PhotonCalibratorProtoDUNEVD +} + +//DECLARE_ART_SERVICE_INTERFACE_IMPL(calib::PhotonCalibratorProtoDUNEVD, calib::IPhotonCalibrator, LEGACY) + + +#endif diff --git a/duneopdet/OpticalDetector/PhotonCalibratorServiceProtoDUNEVD.h b/duneopdet/OpticalDetector/PhotonCalibratorServiceProtoDUNEVD.h new file mode 100644 index 00000000..58e77c3d --- /dev/null +++ b/duneopdet/OpticalDetector/PhotonCalibratorServiceProtoDUNEVD.h @@ -0,0 +1,68 @@ +//////////////////////////////////////////////////////////////////////// +// \file PhotonCalibratorServiceProtoDUNEVD.h +// +// \brief Framework interface to PhotonCalibratorProtoDUNEVD +// +// \author lpaulucc@fnal.gov based on PhotonCalibratorServiceProtuDUNESP by ahimmel@fnal.gov +// +//////////////////////////////////////////////////////////////////////// + + +#ifndef PHOTONCALIBRATORSERVICEPROTODUNEVD +#define PHOTONCALIBRATORSERVICEPROTODUNEVD + +// LArSoft Includes +#include "duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.h" +#include "larreco/Calibrator/IPhotonCalibratorService.h" + + +// ART Includes +#include "fhiclcpp/ParameterSet.h" +#include "fhiclcpp/types/Atom.h" +#include "fhiclcpp/types/Sequence.h" +#include "art/Framework/Services/Registry/ActivityRegistry.h" +#include "art/Framework/Services/Registry/ServiceHandle.h" +#include "art/Framework/Services/Registry/ServiceMacros.h" +#include "art/Framework/Services/Registry/ServiceTable.h" +#include "art/Framework/Principal/Run.h" + + +#include + +namespace calib { + + + class PhotonCalibratorServiceProtoDUNEVD : public IPhotonCalibratorService + { + public: + using provider_type = PhotonCalibratorProtoDUNEVD; + + struct ServiceConfiguration_t + { + fhicl::Sequence HdwChannels { fhicl::Name("HdwChannels") }; + fhicl::Sequence SPEAreas { fhicl::Name("SPEAreas") }; + fhicl::Sequence SPEShifts { fhicl::Name("SPEShifts") }; + fhicl::Sequence BadChannels { fhicl::Name("BadChannels"), fhicl::Comment("Channels to remove from reconstruction") }; + }; + + using Parameters = art::ServiceTable; + + public: + PhotonCalibratorServiceProtoDUNEVD(Parameters const & config, + art::ActivityRegistry& aReg) + : fProvider( new PhotonCalibratorProtoDUNEVD(config.get_PSet(), aReg) ) + { } + + provider_type const* provider() const override { return fProvider.get(); } + + private: + std::unique_ptr fProvider; + }; + +} + +DECLARE_ART_SERVICE_INTERFACE_IMPL(calib::PhotonCalibratorServiceProtoDUNEVD, + calib::IPhotonCalibratorService, + LEGACY) + +#endif // PHOTONCALIBRATORSERVICEPROTODUNEVD diff --git a/duneopdet/OpticalDetector/PhotonCalibratorServiceProtoDUNEVD_service.cc b/duneopdet/OpticalDetector/PhotonCalibratorServiceProtoDUNEVD_service.cc new file mode 100644 index 00000000..009866a9 --- /dev/null +++ b/duneopdet/OpticalDetector/PhotonCalibratorServiceProtoDUNEVD_service.cc @@ -0,0 +1,9 @@ +/** + * Required minimal implementation file for calibrator service + * which only returns a provider. + */ +#include "duneopdet/OpticalDetector/PhotonCalibratorServiceProtoDUNEVD.h" +#include "art/Framework/Services/Registry/ServiceDefinitionMacros.h" + +DEFINE_ART_SERVICE_INTERFACE_IMPL(calib::PhotonCalibratorServiceProtoDUNEVD, + calib::IPhotonCalibratorService) From b0124b414421fab1c27720b31121729a16229eb1 Mon Sep 17 00:00:00 2001 From: Laura Paulucci Date: Tue, 27 Jan 2026 03:35:38 -0600 Subject: [PATCH 2/3] Fixing PDVD digitizer for correct handling input labels --- .../OpDetDigitizerProtoDUNEVD_module.cc | 30 ++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/duneopdet/OpticalDetector/OpDetDigitizerProtoDUNEVD_module.cc b/duneopdet/OpticalDetector/OpDetDigitizerProtoDUNEVD_module.cc index d2ef60d5..e0fb0656 100644 --- a/duneopdet/OpticalDetector/OpDetDigitizerProtoDUNEVD_module.cc +++ b/duneopdet/OpticalDetector/OpDetDigitizerProtoDUNEVD_module.cc @@ -534,10 +534,10 @@ void OpDetDigitizerProtoDUNEVD::produce(art::Event &evt) { art::fill_ptr_vector(mybtr_vec[mybtr_vec.size() - 1], btr_handles[hh]); for (auto const &btr : mybtr_vec[mybtr_vec.size() - 1]) { if (std::find(fInputModulesAr.begin(),fInputModulesAr.end(), - btr_handles[hh].provenance()->moduleLabel())==fInputModulesAr.end()) + btr_handles[hh].provenance()->moduleLabel())!=fInputModulesAr.end()) ODBMap[btr.get()->OpDetNum()].first.push_back(&btr); // Ar modules else if (std::find(fInputModulesXe.begin(),fInputModulesXe.end(), - btr_handles[hh].provenance()->moduleLabel())==fInputModulesXe.end()) + btr_handles[hh].provenance()->moduleLabel())!=fInputModulesXe.end()) ODBMap[btr.get()->OpDetNum()].second.push_back(&btr); // Xe modules else throw art::Exception(art::errors::LogicError) @@ -943,10 +943,32 @@ void OpDetDigitizerProtoDUNEVD::CheckFHiCLParameters() const { << "TimeBegin should be less than TimeEnd!\n"; } double OpDetDigitizerProtoDUNEVD::getPDE_Ar(int OpDet) const { - return fPDMapTool->ArgonEfficiency(OpDet); + // Correct out the prescaling applied during simulation + auto const *LarProp = lar::providerFrom(); + double QE = fPDMapTool->ArgonEfficiency(OpDet); + QE = QE / LarProp->ScintPreScale(); + if (QE > 1.0001 ) { + mf::LogError("OpDetDigitizerProtoDUNEVD") << "Channel PDE set as OpDetDigitizerProtoDUNEVD.QE, " << QE + << " is too large. It is larger than the prescaling applied during simulation, " + << LarProp->ScintPreScale() + << ". Final PDE must be equal to or smaller than the PreScale applied at simulation time."; + std::abort(); + } + return QE; } double OpDetDigitizerProtoDUNEVD::getPDE_Xe(int OpDet) const { - return fPDMapTool->XenonEfficiency(OpDet); + // Correct out the prescaling applied during simulation + auto const *LarProp = lar::providerFrom(); + double QE = fPDMapTool->XenonEfficiency(OpDet); + QE = QE / LarProp->ScintPreScale(); + if (QE > 1.0001 ) { + mf::LogError("OpDetDigitizerProtoDUNEVD") << "Channel PDE set as OpDetDigitizerProtoDUNEVD.QE, " << QE + << " is too large. It is larger than the prescaling applied during simulation, " + << LarProp->ScintPreScale() + << ". Final PDE must be equal to or smaller than the PreScale applied at simulation time."; + std::abort(); + } + return QE; } double OpDetDigitizerProtoDUNEVD::getDarkCountRate(int OpDet) const { return fDarkCountRateMap.second.at( From aaa3b070633459b2fa3e32f5252a2bf745a45a4e Mon Sep 17 00:00:00 2001 From: Laura Paulucci Date: Tue, 27 Jan 2026 04:24:13 -0600 Subject: [PATCH 3/3] removing calibrator --- .../PhotonCalibratorProtoDUNEVD.cc | 54 --------------- .../PhotonCalibratorProtoDUNEVD.fcl | 30 -------- .../PhotonCalibratorProtoDUNEVD.h | 51 -------------- .../PhotonCalibratorServiceProtoDUNEVD.h | 68 ------------------- ...tonCalibratorServiceProtoDUNEVD_service.cc | 9 --- 5 files changed, 212 deletions(-) delete mode 100644 duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.cc delete mode 100644 duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.fcl delete mode 100644 duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.h delete mode 100644 duneopdet/OpticalDetector/PhotonCalibratorServiceProtoDUNEVD.h delete mode 100644 duneopdet/OpticalDetector/PhotonCalibratorServiceProtoDUNEVD_service.cc diff --git a/duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.cc b/duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.cc deleted file mode 100644 index d69a9337..00000000 --- a/duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.cc +++ /dev/null @@ -1,54 +0,0 @@ -// dunetpc includes -#include "duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.h" - -// LArSoft Includes -#include "larreco/Calibrator/IPhotonCalibrator.h" -#include "larcore/Geometry/Geometry.h" -#include "larcore/CoreUtils/ServiceUtil.h" // lar::providerFrom() -#include "larcore/Geometry/WireReadout.h" - -// ART includes -#include "fhiclcpp/ParameterSet.h" -#include "art/Framework/Services/Registry/ActivityRegistry.h" -#include "art/Framework/Services/Registry/ServiceHandle.h" -#include "art/Framework/Services/Registry/ServiceMacros.h" -#include "messagefacility/MessageLogger/MessageLogger.h" - -#include -#include -#include - -namespace calib { - - PhotonCalibratorProtoDUNEVD::PhotonCalibratorProtoDUNEVD(fhicl::ParameterSet const& pset, art::ActivityRegistry& reg) - { - - fBadChannels = pset.get >("BadChannels"); - fHdwChannels = pset.get >("HdwChannels"); - fSPEAreas = pset.get >("SPEAreas"); - fSPEShifts = pset.get >("SPEShifts"); - - //Map for associating each hardware channel with its correspondent SPE area - for(size_t i=0; isecond; - auto entry2 = fShiftMap.find(opchannel); - float shift = entry2->second; - return adcs/area + shift; - } - -} - -//DEFINE_ART_SERVICE_INTERFACE_IMPL(calib::PhotonCalibratorProtoDUNEVD, calib::IPhotonCalibrator) diff --git a/duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.fcl b/duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.fcl deleted file mode 100644 index f89f4cbf..00000000 --- a/duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.fcl +++ /dev/null @@ -1,30 +0,0 @@ -BEGIN_PROLOG - -# -# Applies channel-by-channel PE calibrations -# - -protodunevd_photoncalibrator_config1: #Data taken between ??? -{ - service_provider: PhotonCalibratorServiceProtoDUNEVD - BadChannels: [ ] - HdwChannels: [ 1010, 1011, 1020, 1021, 1030, 1031, 1040, 1041, 1050, 1051, 1060, 1061, 1070, 1071, 1080, 1081, 2010, 2011, 2020, 2021, 2030, 2031, 2040, 2041, 2050, 2051, 2060, 2061, 2070, 2071, 2080, 2081, 3010, 3020, 3030, 3040, 3050, 3060, 3070, 3080, 3090, 3100, 3110, 3120, 3130, 3140, 3150, 3160, 3170, 3180, 3190, 3200, 3210, 3220, 3230, 3240 ] #hardware channels as in the PDVD_PDS_Mapping (in dunecore/ChannelMap) - SPEShifts: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] - SPEAreas: [ 3482.9, 1893.97, 2148.87, 4332.16, 2063.53, 2000, 2257.92, 2530.51, 5225.09, 5185.5, 2426.86, 2685.4, 3831.38, 3567.7, 1526.98, 1258.39, 2000, 2000, 2000, 2000, 3147.79, 3278.53, 1380.77, 2205.66, 4364.88, 4221.51, 3058.11, 3009.3, 2634.38, 2557.6, 3771.75, 3723.89, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 ] #channel correspondence can be found in the PDVD_PDS_Mapping found in dunecore/ChannelMap. Values from waffles/np02_data/calibration_data --> STILL TO BE OBTAINED. DO NOT USE - -} - -#Data taken between July 10th - 16th -protodunevd_photoncalibrator_config2: @local::protodunevd_photoncalibrator_config1 -protodunevd_photoncalibrator_config2.SPEAreas: [ 3450.06, 1950.04, 2138.67, 4251.92, 2063.53, 2000, 2336.25, 2197.08, 5225.09, 5185.5, 2426.86, 2685.4, 3831.38, 3567.7, 1526.98, 1258.39, 2000, 2000, 2000, 2000, 2794.99, 2732.12, 2073.26, 1948.84, 4302.94, 4255.39, 2900.88, 2826.3, 3238.6, 3074.78, 3669.16, 3723.37, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 ] #Values from waffles/np02_data/calibration_data/ --> STILL TO BE OBTAINED. DO NOT USE - -#Data taken between August 2nd - 8th -protodunevd_photoncalibrator_config3: @local::protodunevd_photoncalibrator_config1 -protodunevd_photoncalibrator_config3.SPEAreas: [ 3450.06, 1950.04, 2138.67, 4251.92, 2063.53, 2000, 2336.25, 2197.08, 5225.09, 5185.5, 2426.86, 2685.4, 3831.38, 3567.7, 1526.98, 1258.39, 2000, 2000, 2000, 2000, 2794.99, 2732.12, 2073.26, 1948.84, 4302.94, 4255.39, 2900.88, 2826.3, 3238.6, 3074.78, 3669.16, 3723.37, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 ] #Values from waffles/np02_data/calibration_data/np02-config-v3.0.0.csv - -#Data taken from August 10th on -protodunevd_photoncalibrator_config3: @local::protodunevd_photoncalibrator_config1 -protodunevd_photoncalibrator_config3.SPEAreas: [ 3482.9, 1893.97, 2148.87, 4332.16, 2063.53, 2000, 2257.92, 2530.51, 5225.09, 5185.5, 2426.86, 2685.4, 3831.38, 3567.7, 1526.98, 1258.39, 2000, 2000, 2000, 2000, 3147.79, 3278.53, 1380.77, 2205.66, 4364.88, 4221.51, 3058.11, 3009.3, 2634.38, 2557.6, 3771.75, 3723.89, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 ] #Values from waffles/np02_data/calibration_data/np02-config-v4.0.0.csv - - -END_PROLOG diff --git a/duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.h b/duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.h deleted file mode 100644 index b50aa20b..00000000 --- a/duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.h +++ /dev/null @@ -1,51 +0,0 @@ -//////////////////////////////////////////////////////////////////////// -// \file PhotonCalibratorProtoDUNEVD.h -// -// \brief ProtoDUNEVD service provider applying a channel based scale factor to optical hits. -// -// \author lpaulucc@fnal.gov based on PhotonCalibratorProtoduneSP by ahimmel -// -//////////////////////////////////////////////////////////////////////// - - -#ifndef PHOTONCALIBRATORPROTODUNEVD_H -#define PHOTONCALIBRATORPROTODUNEVD_H - -#include "larreco/Calibrator/IPhotonCalibrator.h" - -// ART includes -#include "fhiclcpp/ParameterSet.h" -#include "art/Framework/Services/Registry/ActivityRegistry.h" -#include "art/Framework/Services/Registry/ServiceHandle.h" -#include "art/Framework/Services/Registry/ServiceMacros.h" - - -namespace calib { - - class PhotonCalibratorProtoDUNEVD : public IPhotonCalibrator - { - public: - PhotonCalibratorProtoDUNEVD(fhicl::ParameterSet const& pset, art::ActivityRegistry& reg); - - // Override base class functions - double PE(double adcs, int opchannel) const override; - bool UseArea() const override { return true; } // ProtoDUNE always uses area - - /// Need a 3D position because result depends on position along length of - /// bar. This is going to be pretty imprecise even so. - // virtual double GeV(double PE, int opchannel, TVector3 pos) override; - - private: - std::vector fHdwChannels; - std::vector fSPEAreas; - std::vector fSPEShifts; - std::vector fBadChannels; - std::map fAreaMap; - std::map fShiftMap; - }; // class PhotonCalibratorProtoDUNEVD -} - -//DECLARE_ART_SERVICE_INTERFACE_IMPL(calib::PhotonCalibratorProtoDUNEVD, calib::IPhotonCalibrator, LEGACY) - - -#endif diff --git a/duneopdet/OpticalDetector/PhotonCalibratorServiceProtoDUNEVD.h b/duneopdet/OpticalDetector/PhotonCalibratorServiceProtoDUNEVD.h deleted file mode 100644 index 58e77c3d..00000000 --- a/duneopdet/OpticalDetector/PhotonCalibratorServiceProtoDUNEVD.h +++ /dev/null @@ -1,68 +0,0 @@ -//////////////////////////////////////////////////////////////////////// -// \file PhotonCalibratorServiceProtoDUNEVD.h -// -// \brief Framework interface to PhotonCalibratorProtoDUNEVD -// -// \author lpaulucc@fnal.gov based on PhotonCalibratorServiceProtuDUNESP by ahimmel@fnal.gov -// -//////////////////////////////////////////////////////////////////////// - - -#ifndef PHOTONCALIBRATORSERVICEPROTODUNEVD -#define PHOTONCALIBRATORSERVICEPROTODUNEVD - -// LArSoft Includes -#include "duneopdet/OpticalDetector/PhotonCalibratorProtoDUNEVD.h" -#include "larreco/Calibrator/IPhotonCalibratorService.h" - - -// ART Includes -#include "fhiclcpp/ParameterSet.h" -#include "fhiclcpp/types/Atom.h" -#include "fhiclcpp/types/Sequence.h" -#include "art/Framework/Services/Registry/ActivityRegistry.h" -#include "art/Framework/Services/Registry/ServiceHandle.h" -#include "art/Framework/Services/Registry/ServiceMacros.h" -#include "art/Framework/Services/Registry/ServiceTable.h" -#include "art/Framework/Principal/Run.h" - - -#include - -namespace calib { - - - class PhotonCalibratorServiceProtoDUNEVD : public IPhotonCalibratorService - { - public: - using provider_type = PhotonCalibratorProtoDUNEVD; - - struct ServiceConfiguration_t - { - fhicl::Sequence HdwChannels { fhicl::Name("HdwChannels") }; - fhicl::Sequence SPEAreas { fhicl::Name("SPEAreas") }; - fhicl::Sequence SPEShifts { fhicl::Name("SPEShifts") }; - fhicl::Sequence BadChannels { fhicl::Name("BadChannels"), fhicl::Comment("Channels to remove from reconstruction") }; - }; - - using Parameters = art::ServiceTable; - - public: - PhotonCalibratorServiceProtoDUNEVD(Parameters const & config, - art::ActivityRegistry& aReg) - : fProvider( new PhotonCalibratorProtoDUNEVD(config.get_PSet(), aReg) ) - { } - - provider_type const* provider() const override { return fProvider.get(); } - - private: - std::unique_ptr fProvider; - }; - -} - -DECLARE_ART_SERVICE_INTERFACE_IMPL(calib::PhotonCalibratorServiceProtoDUNEVD, - calib::IPhotonCalibratorService, - LEGACY) - -#endif // PHOTONCALIBRATORSERVICEPROTODUNEVD diff --git a/duneopdet/OpticalDetector/PhotonCalibratorServiceProtoDUNEVD_service.cc b/duneopdet/OpticalDetector/PhotonCalibratorServiceProtoDUNEVD_service.cc deleted file mode 100644 index 009866a9..00000000 --- a/duneopdet/OpticalDetector/PhotonCalibratorServiceProtoDUNEVD_service.cc +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Required minimal implementation file for calibrator service - * which only returns a provider. - */ -#include "duneopdet/OpticalDetector/PhotonCalibratorServiceProtoDUNEVD.h" -#include "art/Framework/Services/Registry/ServiceDefinitionMacros.h" - -DEFINE_ART_SERVICE_INTERFACE_IMPL(calib::PhotonCalibratorServiceProtoDUNEVD, - calib::IPhotonCalibratorService)