Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions sbncode/CAFMaker/CAFMakerParams.h
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,18 @@ namespace caf
Comment("Provide a string to label the blip input"),
"blipreco"
};

Atom<string> QELambdaFRANSLabel {
Name("QELambdaFRANSLabel"),
Comment("Label of QE Lambda reconstruction."),
"FRANSProducer"
};

Atom<string> QELambdaPIDLabel {
Name("QELambdaPIDLabel"),
Comment("Label of QE Lambda PID."),
"LambdaPID"
};
};
}

Expand Down
15 changes: 15 additions & 0 deletions sbncode/CAFMaker/CAFMaker_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <fenv.h>
Expand Down Expand Up @@ -2113,6 +2114,19 @@ void CAFMaker::produce(art::Event& evt) noexcept {
}
}

// Fill QE Lambda info
caf::SRQELambda srqelambda;
art::Handle<qelambda::QELambdaReco> qeLambdaReco_handle;
art::Handle<qelambda::QELambdaPID> 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<std::vector<unsigned int>> > ng2_slice_hit_map_handle(pandora_tag_suffixes.size());
std::vector< art::Handle<std::vector<anab::FeatureVector<1>>> > ng2_filter_handle(pandora_tag_suffixes.size());
Expand Down Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions sbncode/CAFMaker/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
53 changes: 53 additions & 0 deletions sbncode/CAFMaker/FillQELambda.cxx
Original file line number Diff line number Diff line change
@@ -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;
}
23 changes: 23 additions & 0 deletions sbncode/CAFMaker/FillQELambda.h
Original file line number Diff line number Diff line change
@@ -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