diff --git a/sbncode/CAFMaker/CAFMakerParams.h b/sbncode/CAFMaker/CAFMakerParams.h index 9a5d8fb40..ff315ab6b 100644 --- a/sbncode/CAFMaker/CAFMakerParams.h +++ b/sbncode/CAFMaker/CAFMakerParams.h @@ -652,6 +652,18 @@ namespace caf Comment("Provide a string to label the blip input"), "blipreco" }; + + Atom QELambdaFRANSLabel { + Name("QELambdaFRANSLabel"), + Comment("Label of QE Lambda reconstruction."), + "FRANSProducer" + }; + + Atom QELambdaPIDLabel { + Name("QELambdaPIDLabel"), + Comment("Label of QE Lambda PID."), + "LambdaPID" + }; }; } diff --git a/sbncode/CAFMaker/CAFMaker_module.cc b/sbncode/CAFMaker/CAFMaker_module.cc index fe35bad7a..0622cca06 100644 --- a/sbncode/CAFMaker/CAFMaker_module.cc +++ b/sbncode/CAFMaker/CAFMaker_module.cc @@ -21,6 +21,7 @@ #include "sbncode/CAFMaker/FillTrigger.h" #include "sbncode/CAFMaker/Utils.h" #include "sbncode/CAFMaker/FillBlip.h" +#include "sbncode/CAFMaker/FillQELambda.h" // C/C++ includes #include @@ -2113,6 +2114,19 @@ void CAFMaker::produce(art::Event& evt) noexcept { } } + // Fill QE Lambda info + caf::SRQELambda srqelambda; + art::Handle qeLambdaReco_handle; + art::Handle qeLambdaPID_handle; + if(evt.getByLabel(fParams.QELambdaFRANSLabel(), qeLambdaReco_handle)) + { + FillFRANSLambda(*qeLambdaReco_handle, srqelambda); + } + if(evt.getByLabel(fParams.QELambdaPIDLabel(), qeLambdaPID_handle)) + { + FillLambdaPID(*qeLambdaPID_handle, srqelambda); + } + // nu graph std::vector< art::Handle> > ng2_slice_hit_map_handle(pandora_tag_suffixes.size()); std::vector< art::Handle>> > ng2_filter_handle(pandora_tag_suffixes.size()); @@ -2781,6 +2795,7 @@ void CAFMaker::produce(art::Event& evt) noexcept { rec.sbnd_frames = srsbndframeshiftinfo; rec.sbnd_timings = srsbndtiminginfo; rec.soft_trig = srsbndsofttrig; + rec.qelambda = srqelambda; if (fParams.FillTrueParticles()) { rec.true_particles = true_particles; diff --git a/sbncode/CAFMaker/CMakeLists.txt b/sbncode/CAFMaker/CMakeLists.txt index a53793dd5..1f00db25a 100644 --- a/sbncode/CAFMaker/CMakeLists.txt +++ b/sbncode/CAFMaker/CMakeLists.txt @@ -42,6 +42,7 @@ art_make_library( LIBRARY_NAME sbncode_CAFMaker sbnobj::SBND_CRT sbnobj::SBND_Timing sbnobj::SBND_Blip + sbnobj::SBND_qelambda lardataalg::DetectorInfo art::Framework_Services_System_TriggerNamesService_service sbncode_Metadata_MetadataSBN_service diff --git a/sbncode/CAFMaker/FillQELambda.cxx b/sbncode/CAFMaker/FillQELambda.cxx new file mode 100644 index 000000000..09853d7a4 --- /dev/null +++ b/sbncode/CAFMaker/FillQELambda.cxx @@ -0,0 +1,53 @@ +#include "sbncode/CAFMaker/FillQELambda.h" + +void caf::FillFRANSLambda( const qelambda::QELambdaReco LAr_QELambdaRecoProducts, caf::SRQELambda& CAF_QELambdaReco) +{ + + CAF_QELambdaReco.SliceId = LAr_QELambdaRecoProducts.SliceId; + + CAF_QELambdaReco.FransNUnassocOrigins = LAr_QELambdaRecoProducts.FransNUnassocOrigins; + CAF_QELambdaReco.FransNMaxDirtUnassocHits = LAr_QELambdaRecoProducts.FransNMaxDirtUnassocHits; + CAF_QELambdaReco.FransNAngles = LAr_QELambdaRecoProducts.FransNAngles; + CAF_QELambdaReco.FransContainedPhi = LAr_QELambdaRecoProducts.FransContainedPhi; + CAF_QELambdaReco.FransPzsign = LAr_QELambdaRecoProducts.FransPzsign; + + CAF_QELambdaReco.FransScore = LAr_QELambdaRecoProducts.FransScore; + CAF_QELambdaReco.FransIota = LAr_QELambdaRecoProducts.FransIota; + CAF_QELambdaReco.FransDelta = LAr_QELambdaRecoProducts.FransDelta; + CAF_QELambdaReco.FransEta = LAr_QELambdaRecoProducts.FransEta; + CAF_QELambdaReco.FransFitScore = LAr_QELambdaRecoProducts.FransFitScore; + + CAF_QELambdaReco.FransTrack1ID = LAr_QELambdaRecoProducts.FransTrack1ID; + CAF_QELambdaReco.FransTrack2ID = LAr_QELambdaRecoProducts.FransTrack2ID; + CAF_QELambdaReco.FransMainTrackID = LAr_QELambdaRecoProducts.FransMainTrackID; + + CAF_QELambdaReco.HyperonVtxX = LAr_QELambdaRecoProducts.HyperonVtxX; + CAF_QELambdaReco.HyperonVtxY = LAr_QELambdaRecoProducts.HyperonVtxY; + CAF_QELambdaReco.HyperonVtxZ = LAr_QELambdaRecoProducts.HyperonVtxZ; + CAF_QELambdaReco.PrimLeptonVtxX = LAr_QELambdaRecoProducts.PrimLeptonVtxX; + CAF_QELambdaReco.PrimLeptonVtxY = LAr_QELambdaRecoProducts.PrimLeptonVtxY; + CAF_QELambdaReco.PrimLeptonVtxZ = LAr_QELambdaRecoProducts.PrimLeptonVtxZ; + + CAF_QELambdaReco.MichelNMuonTracks = LAr_QELambdaRecoProducts.MichelNMuonTracks; + CAF_QELambdaReco.MichelRssRatio = LAr_QELambdaRecoProducts.MichelRssRatio; + CAF_QELambdaReco.MichelAngleQ80 = LAr_QELambdaRecoProducts.MichelAngleQ80; + CAF_QELambdaReco.MichelDropRadius = LAr_QELambdaRecoProducts.MichelDropRadius; + CAF_QELambdaReco.MichelNBlips = LAr_QELambdaRecoProducts.MichelNBlips; + CAF_QELambdaReco.MichelScore = LAr_QELambdaRecoProducts.MichelScore; + +} + +void caf::FillLambdaPID( const qelambda::QELambdaPID LAr_QELambdaPID, caf::SRQELambda& CAF_QELambdaReco) +{ + CAF_QELambdaReco.SecondPandoraVtxX = LAr_QELambdaPID.VtxX; + CAF_QELambdaReco.SecondPandoraVtxY = LAr_QELambdaPID.VtxY; + CAF_QELambdaReco.SecondPandoraVtxZ = LAr_QELambdaPID.VtxZ; + CAF_QELambdaReco.SecondPandoraProtonKE = LAr_QELambdaPID.ProtonKE; + CAF_QELambdaReco.SecondPandoraPionKE = LAr_QELambdaPID.PionKE; + CAF_QELambdaReco.SecondPandoraProtonPX = LAr_QELambdaPID.ProtonPX; + CAF_QELambdaReco.SecondPandoraProtonPY = LAr_QELambdaPID.ProtonPY; + CAF_QELambdaReco.SecondPandoraProtonPZ = LAr_QELambdaPID.ProtonPZ; + CAF_QELambdaReco.SecondPandoraPionPX = LAr_QELambdaPID.PionPX; + CAF_QELambdaReco.SecondPandoraPionPY = LAr_QELambdaPID.PionPY; + CAF_QELambdaReco.SecondPandoraPionPZ = LAr_QELambdaPID.PionPZ; +} diff --git a/sbncode/CAFMaker/FillQELambda.h b/sbncode/CAFMaker/FillQELambda.h new file mode 100644 index 000000000..ada008a5c --- /dev/null +++ b/sbncode/CAFMaker/FillQELambda.h @@ -0,0 +1,23 @@ +/** + * @file sbncode/CAFMaker/FillQELambda.h + * @brief CAFMaker utilities for filling "qelambda" objects into CAF. + * @author Sergio Yebes (syebes@ugr.es) + */ + +#ifndef FILLQELAMBDA_H +#define FILLQELAMBDA_H + +#include "sbnobj/SBND/QELambdaReco/LambdaProducts.hh" +#include "sbnobj/SBND/QELambdaReco/LambdaPID.hh" +#include "sbnanaobj/StandardRecord/SRQELambda.h" + +namespace caf +{ + + void FillFRANSLambda( const qelambda::QELambdaReco LAr_LambdaRecoProducts, caf::SRQELambda& CAF_LambdaRecoProducts); + void FillLambdaPID( const qelambda::QELambdaPID LAr_LambdaRecoProducts, caf::SRQELambda& CAF_LambdaRecoProducts); + + +} + +#endif // FILLQELAMBDA_H \ No newline at end of file