|
118 | 118 | #include "sbnobj/Common/Trigger/ExtraTriggerInfo.h" |
119 | 119 | #include "sbnobj/Common/Reco/CRUMBSResult.h" |
120 | 120 | #include "sbnobj/Common/Reco/OpT0FinderResult.h" |
| 121 | +#include "sbnobj/SBND/CRT/CRTVeto.hh" |
121 | 122 | #include "sbnobj/Common/Reco/CorrectedOpFlashTiming.h" |
122 | 123 | #include "sbnobj/SBND/Timing/TimingInfo.hh" |
123 | 124 | #include "sbnobj/SBND/Timing/FrameShiftInfo.hh" |
124 | 125 |
|
125 | | - |
126 | 126 | // GENIE |
127 | 127 | #include "Framework/EventGen/EventRecord.h" |
128 | 128 | #include "Framework/Ntuple/NtpMCEventRecord.h" |
@@ -1713,6 +1713,7 @@ void CAFMaker::produce(art::Event& evt) noexcept { |
1713 | 1713 | std::vector<caf::SRCRTTrack> srcrttracks; |
1714 | 1714 | std::vector<caf::SRCRTSpacePoint> srcrtspacepoints; |
1715 | 1715 | std::vector<caf::SRSBNDCRTTrack> srsbndcrttracks; |
| 1716 | + caf::SRSBNDCRTVeto srsbndcrtveto; |
1716 | 1717 | caf::SRSBNDFrameShiftInfo srsbndframeshiftinfo; |
1717 | 1718 | caf::SRSBNDTimingInfo srsbndtiminginfo; |
1718 | 1719 |
|
@@ -1783,6 +1784,24 @@ void CAFMaker::produce(art::Event& evt) noexcept { |
1783 | 1784 | FillSBNDCRTTrack(sbndcrttracks[i], srsbndcrttracks.back()); |
1784 | 1785 | } |
1785 | 1786 | } |
| 1787 | + |
| 1788 | + // Fill CRT Veto |
| 1789 | + art::Handle<std::vector<sbnd::crt::CRTVeto>> sbndcrtveto_handle; |
| 1790 | + GetByLabelStrict(evt, fParams.SBNDCRTVetoLabel(), sbndcrtveto_handle); |
| 1791 | + // fill into event |
| 1792 | + if (sbndcrtveto_handle.isValid()) { |
| 1793 | + const std::vector<sbnd::crt::CRTVeto> &sbndcrtveto_vec = *sbndcrtveto_handle; |
| 1794 | + // Only one valid veto per event |
| 1795 | + if (sbndcrtveto_vec.size() == 1) { |
| 1796 | + // And associated SpacePoint objects |
| 1797 | + art::FindManyP<sbnd::crt::CRTSpacePoint> spAssoc(sbndcrtveto_handle, evt, fParams.SBNDCRTVetoLabel()); |
| 1798 | + if (spAssoc.isValid()) { |
| 1799 | + // There is one vector of SpacePoints per Veto --> can be empty if no veto condition was satisfied |
| 1800 | + const std::vector<art::Ptr<sbnd::crt::CRTSpacePoint>>& veto_sp_v(spAssoc.at(0)); |
| 1801 | + FillSBNDCRTVeto(sbndcrtveto_vec[0], veto_sp_v, srsbndcrtveto); |
| 1802 | + } |
| 1803 | + } |
| 1804 | + } |
1786 | 1805 |
|
1787 | 1806 | art::Handle<sbnd::timing::FrameShiftInfo> sbndframeshiftinfo_handle; |
1788 | 1807 | GetByLabelStrict(evt, fParams.SBNDFrameShiftInfoLabel(), sbndframeshiftinfo_handle); |
@@ -2541,6 +2560,7 @@ void CAFMaker::produce(art::Event& evt) noexcept { |
2541 | 2560 | rec.ncrt_spacepoints = srcrtspacepoints.size(); |
2542 | 2561 | rec.sbnd_crt_tracks = srsbndcrttracks; |
2543 | 2562 | rec.nsbnd_crt_tracks = srsbndcrttracks.size(); |
| 2563 | + rec.sbnd_crt_veto = srsbndcrtveto; |
2544 | 2564 | rec.opflashes = srflashes; |
2545 | 2565 | rec.nopflashes = srflashes.size(); |
2546 | 2566 | rec.sbnd_frames = srsbndframeshiftinfo; |
|
0 commit comments