diff --git a/CMakeLists.txt b/CMakeLists.txt index cb8c49e67..61bc982b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR) find_package(cetmodules 3.20.00 REQUIRED) -project(sbncode VERSION 10.15.00 LANGUAGES CXX) +project(sbncode VERSION 10.20.03 LANGUAGES CXX) message(STATUS "\n\n ========================== ${PROJECT_NAME} ==========================") diff --git a/sbncode/CAFMaker/CAFMaker_module.cc b/sbncode/CAFMaker/CAFMaker_module.cc index 9f2c01590..d2d2a0f0c 100644 --- a/sbncode/CAFMaker/CAFMaker_module.cc +++ b/sbncode/CAFMaker/CAFMaker_module.cc @@ -352,6 +352,10 @@ class CAFMaker : public art::EDProducer { art::FindOneP FindOnePStrict(const U& from, const art::Event& evt, const art::InputTag& label) const; + template + art::FindOneP FindOnePStrictSingle(const U& from, const art::Event& evt, + const art::InputTag& label) const; + template art::FindOneP FindOnePDStrict(const U& from, const art::Event& evt, @@ -1299,6 +1303,14 @@ art::FindOneP CAFMaker::FindOnePStrict(const U& from, return ret; } +//...................................................................... +template +art::FindOneP CAFMaker::FindOnePStrictSingle(const U& from, + const art::Event& evt, + const art::InputTag& tag) const { + return FindOnePStrict(std::vector{ from }, evt, tag); +} + //...................................................................... template art::FindOneP CAFMaker::FindOnePDStrict(const U& from, @@ -1791,12 +1803,15 @@ void CAFMaker::produce(art::Event& evt) noexcept { { art::Handle> crtspacepoints_handle; GetByLabelStrict(evt, fParams.CRTSpacePointLabel(), crtspacepoints_handle); + art::FindOneP foCRTCluster = + FindOnePStrict(crtspacepoints_handle, evt, fParams.CRTSpacePointLabel()); if (crtspacepoints_handle.isValid()) { const std::vector &crtspacepoints = *crtspacepoints_handle; for (unsigned i = 0; i < crtspacepoints.size(); i++) { srcrtspacepoints.emplace_back(); - FillCRTSpacePoint(crtspacepoints[i], srcrtspacepoints.back()); + const art::Ptr crtcluster = foCRTCluster.at(i); + FillCRTSpacePoint(crtspacepoints[i], *crtcluster, srcrtspacepoints.back()); } } @@ -2239,6 +2254,9 @@ void CAFMaker::produce(art::Event& evt) noexcept { FindOnePDStrict(slcTracks, evt, fParams.CRTSpacePointMatchLabel() + slice_tag_suff); + art::Handle> crtspacepoints_handle; + GetByLabelStrict(evt, fParams.CRTSpacePointLabel(), crtspacepoints_handle); + art::FindOneP foSBNDCRTTrackMatch = FindOnePDStrict(slcTracks, evt, fParams.SBNDCRTTrackMatchLabel() + slice_tag_suff); @@ -2515,8 +2533,12 @@ void CAFMaker::produce(art::Event& evt) noexcept { { const art::Ptr crtspacepoint = foCRTSpacePointMatch.at(iPart); + art::FindOneP foCRTCluster = + FindOnePStrictSingle(crtspacepoint, evt, fParams.CRTSpacePointLabel()); + const art::Ptr& crtcluster = foCRTCluster.at(0); + if(crtspacepoint.isNonnull()) - FillTrackCRTSpacePoint(foCRTSpacePointMatch.data(iPart).ref(), crtspacepoint, trk); + FillTrackCRTSpacePoint(foCRTSpacePointMatch.data(iPart).ref(), *crtspacepoint, *crtcluster, trk); } if(foSBNDCRTTrackMatch.isValid() && fDet == kSBND) { diff --git a/sbncode/CAFMaker/FillReco.cxx b/sbncode/CAFMaker/FillReco.cxx index 46396a2c1..86d56a6e2 100644 --- a/sbncode/CAFMaker/FillReco.cxx +++ b/sbncode/CAFMaker/FillReco.cxx @@ -164,6 +164,7 @@ namespace caf } void FillCRTSpacePoint(const sbnd::crt::CRTSpacePoint &spacepoint, + const sbnd::crt::CRTCluster &cluster, caf::SRCRTSpacePoint &srspacepoint, bool allowEmpty) { @@ -173,6 +174,8 @@ namespace caf srspacepoint.time = spacepoint.Ts0(); srspacepoint.time_err = spacepoint.Ts0Err(); srspacepoint.complete = spacepoint.Complete(); + srspacepoint.nhits = cluster.NHits(); + srspacepoint.tagger = cluster.Tagger(); } void FillSBNDCRTTrack(const sbnd::crt::CRTTrack &track, @@ -186,6 +189,9 @@ namespace caf srsbndcrttrack.time_err = track.Ts0Err(); srsbndcrttrack.pe = track.PE(); srsbndcrttrack.tof = track.ToF(); + + for(auto const& tagger : track.Taggers()) + srsbndcrttrack.taggers.push_back(tagger); } void FillSBNDCRTVeto(const sbnd::crt::CRTVeto &veto, @@ -810,12 +816,15 @@ namespace caf } void FillTrackCRTSpacePoint(const anab::T0 &t0match, - const art::Ptr &spacepointmatch, + const sbnd::crt::CRTSpacePoint &spacepointmatch, + const sbnd::crt::CRTCluster &cluster, caf::SRTrack &srtrack, bool allowEmpty) { - srtrack.crtspacepoint.score = t0match.fTriggerConfidence; - FillCRTSpacePoint(*spacepointmatch, srtrack.crtspacepoint.spacepoint); + srtrack.crtspacepoint.matched = true; + srtrack.crtspacepoint.score = t0match.fTriggerConfidence; + + FillCRTSpacePoint(spacepointmatch, cluster, srtrack.crtspacepoint.spacepoint); } void FillTrackSBNDCRTTrack(const anab::T0 &t0match, @@ -823,7 +832,9 @@ namespace caf caf::SRTrack &srtrack, bool allowEmpty) { - srtrack.crtsbndtrack.score = t0match.fTriggerConfidence; + srtrack.crtsbndtrack.matched = true; + srtrack.crtsbndtrack.score = t0match.fTriggerConfidence; + FillSBNDCRTTrack(*trackmatch, srtrack.crtsbndtrack.track); } diff --git a/sbncode/CAFMaker/FillReco.h b/sbncode/CAFMaker/FillReco.h index 46704181a..eafbd1842 100644 --- a/sbncode/CAFMaker/FillReco.h +++ b/sbncode/CAFMaker/FillReco.h @@ -41,6 +41,7 @@ #include "sbnobj/Common/CRT/CRTHit.hh" #include "sbnobj/Common/CRT/CRTTrack.hh" #include "sbnobj/SBND/CRT/CRTSpacePoint.hh" +#include "sbnobj/SBND/CRT/CRTCluster.hh" #include "sbnobj/SBND/CRT/CRTTrack.hh" #include "sbnobj/SBND/CRT/CRTVeto.hh" #include "sbnobj/Common/CRT/CRTPMTMatching.hh" @@ -205,7 +206,8 @@ namespace caf bool allowEmpty = false); void FillTrackCRTSpacePoint(const anab::T0 &t0match, - const art::Ptr &spacepointmatch, + const sbnd::crt::CRTSpacePoint &spacepointmatch, + const sbnd::crt::CRTCluster &cluster, caf::SRTrack &srtrack, bool allowEmpty = false); @@ -277,6 +279,7 @@ namespace caf bool allowEmpty = false); void FillCRTSpacePoint(const sbnd::crt::CRTSpacePoint &spacepoint, + const sbnd::crt::CRTCluster &cluster, caf::SRCRTSpacePoint &srspacepoint, bool allowEmpty = false); diff --git a/sbncode/OpT0Finder/flashmatch/Algorithms/CMakeLists.txt b/sbncode/OpT0Finder/flashmatch/Algorithms/CMakeLists.txt index c6ee1e2d3..eb08314d2 100644 --- a/sbncode/OpT0Finder/flashmatch/Algorithms/CMakeLists.txt +++ b/sbncode/OpT0Finder/flashmatch/Algorithms/CMakeLists.txt @@ -2,7 +2,7 @@ art_make_library( LIBRARIES larsim::PhotonPropagation larsim::PhotonPropagation_PhotonVisibilityService_service - larsim::LegacyLArG4 + #larsim::LegacyLArG4 #sbncode_OpT0Finder_flashmatch_GeoAlgo sbncode_OpT0Finder_flashmatch_Base larcorealg::GeoAlgo diff --git a/sbncode/SBNEventWeight/Calculators/Geant4/CMakeLists.txt b/sbncode/SBNEventWeight/Calculators/Geant4/CMakeLists.txt index 568ecc7f6..b064daff0 100644 --- a/sbncode/SBNEventWeight/Calculators/Geant4/CMakeLists.txt +++ b/sbncode/SBNEventWeight/Calculators/Geant4/CMakeLists.txt @@ -13,6 +13,7 @@ art_make_library( art_root_io::TFileService_service larcore::Geometry_Geometry_service cetlib_except::cetlib_except + Geant4::G4ptl ReweightBaseLib PropBaseLib ROOT::Tree diff --git a/sbncode/SinglePhotonAnalysis/jobs/prodgenie_nu_singleinteraction_tpc_NCDeltaRadiative_filtered_sbnd.fcl b/sbncode/SinglePhotonAnalysis/jobs/prodgenie_nu_singleinteraction_tpc_NCDeltaRadiative_filtered_sbnd.fcl index 72716d7fd..9a5c117b4 100644 --- a/sbncode/SinglePhotonAnalysis/jobs/prodgenie_nu_singleinteraction_tpc_NCDeltaRadiative_filtered_sbnd.fcl +++ b/sbncode/SinglePhotonAnalysis/jobs/prodgenie_nu_singleinteraction_tpc_NCDeltaRadiative_filtered_sbnd.fcl @@ -1,26 +1,20 @@ # Simulates GENIE neutrino interactions from the BNB beam # forcing one interaction per event, inside the TPC volume # (with 10 cm padding on each side), -# selecting only NC events with photons coming out from the delta decay +# selecting only NC events with photons coming out from the Delta +#include "prodgenie_nu_singleinteraction_tpc_sbnd.fcl" + +#------ this could be a separated file # # services # -#include "services_sbnd.fcl" -#include "messages_sbnd.fcl" - # # modules # -#include "filters_sbnd.fcl" -#include "emptyevent_sbnd.fcl" -#include "genie_sbnd.fcl" - - - process_name: GenieGenFiltered @@ -108,5 +102,5 @@ outputs: # override # THIS DOES NOT WORK, CHECK! physics.producers.generator.TopVolume: "volTPCActive" -#physics.producers.generator.BeamName: "booster" -#physics.producers.generator.EventGeneratorList: "NCRES" +physics.producers.generator.BeamName: "booster" +physics.producers.generator.EventGeneratorList: "NCRES" diff --git a/ups/product_deps b/ups/product_deps index bd64268c1..50a46ba75 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -254,13 +254,13 @@ libdir fq_dir lib product version qual flags genie_xsec v3_06_00 - larcv2 v2_2_6 - -larsoft v10_15_00 - -sbnalg v10_15_00 - +larsoft v10_20_03 - +sbnalg v10_20_03 - sbndaq_artdaq_core v1_10_06 - sbndata v01_08 - systematicstools v01_04_04 - -nusystematics v1_05_10 - -geant4reweight v01_20_14 - +nusystematics v1_05_11 - +geant4reweight v01_21_02 - cetmodules v3_24_01 - only_for_build end_product_list ####################################