|
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" |
@@ -1719,6 +1719,7 @@ void CAFMaker::produce(art::Event& evt) noexcept { |
1719 | 1719 | std::vector<caf::SRCRTTrack> srcrttracks; |
1720 | 1720 | std::vector<caf::SRCRTSpacePoint> srcrtspacepoints; |
1721 | 1721 | std::vector<caf::SRSBNDCRTTrack> srsbndcrttracks; |
| 1722 | + caf::SRSBNDCRTVeto srsbndcrtveto; |
1722 | 1723 | caf::SRSBNDFrameShiftInfo srsbndframeshiftinfo; |
1723 | 1724 | caf::SRSBNDTimingInfo srsbndtiminginfo; |
1724 | 1725 |
|
@@ -1789,6 +1790,24 @@ void CAFMaker::produce(art::Event& evt) noexcept { |
1789 | 1790 | FillSBNDCRTTrack(sbndcrttracks[i], srsbndcrttracks.back()); |
1790 | 1791 | } |
1791 | 1792 | } |
| 1793 | + |
| 1794 | + // Fill CRT Veto |
| 1795 | + art::Handle<std::vector<sbnd::crt::CRTVeto>> sbndcrtveto_handle; |
| 1796 | + GetByLabelStrict(evt, fParams.SBNDCRTVetoLabel(), sbndcrtveto_handle); |
| 1797 | + // fill into event |
| 1798 | + if (sbndcrtveto_handle.isValid()) { |
| 1799 | + const std::vector<sbnd::crt::CRTVeto> &sbndcrtveto_vec = *sbndcrtveto_handle; |
| 1800 | + // Only one valid veto per event |
| 1801 | + if (sbndcrtveto_vec.size() == 1) { |
| 1802 | + // And associated SpacePoint objects |
| 1803 | + art::FindManyP<sbnd::crt::CRTSpacePoint> spAssoc(sbndcrtveto_handle, evt, fParams.SBNDCRTVetoLabel()); |
| 1804 | + if (spAssoc.isValid()) { |
| 1805 | + // There is one vector of SpacePoints per Veto --> can be empty if no veto condition was satisfied |
| 1806 | + const std::vector<art::Ptr<sbnd::crt::CRTSpacePoint>>& veto_sp_v(spAssoc.at(0)); |
| 1807 | + FillSBNDCRTVeto(sbndcrtveto_vec[0], veto_sp_v, srsbndcrtveto); |
| 1808 | + } |
| 1809 | + } |
| 1810 | + } |
1792 | 1811 |
|
1793 | 1812 | art::Handle<sbnd::timing::FrameShiftInfo> sbndframeshiftinfo_handle; |
1794 | 1813 | GetByLabelStrict(evt, fParams.SBNDFrameShiftInfoLabel(), sbndframeshiftinfo_handle); |
@@ -2547,6 +2566,7 @@ void CAFMaker::produce(art::Event& evt) noexcept { |
2547 | 2566 | rec.ncrt_spacepoints = srcrtspacepoints.size(); |
2548 | 2567 | rec.sbnd_crt_tracks = srsbndcrttracks; |
2549 | 2568 | rec.nsbnd_crt_tracks = srsbndcrttracks.size(); |
| 2569 | + rec.sbnd_crt_veto = srsbndcrtveto; |
2550 | 2570 | rec.opflashes = srflashes; |
2551 | 2571 | rec.nopflashes = srflashes.size(); |
2552 | 2572 | rec.sbnd_frames = srsbndframeshiftinfo; |
|
0 commit comments