|
101 | 101 | #include "nusimdata/SimulationBase/MCNeutrino.h" |
102 | 102 | #include "nusimdata/SimulationBase/GTruth.h" |
103 | 103 |
|
| 104 | +#include "sbnobj/Common/CRT/CRTHitT0TaggingInfo.hh" |
104 | 105 | #include "sbnobj/Common/EventGen/MeVPrtl/MeVPrtlTruth.h" |
105 | 106 | #include "sbnobj/Common/Reco/RangeP.h" |
106 | 107 | #include "sbnobj/Common/SBNEventWeight/EventWeightMap.h" |
@@ -1926,9 +1927,14 @@ void CAFMaker::produce(art::Event& evt) noexcept { |
1926 | 1927 |
|
1927 | 1928 | // NOTE: The sbn::crt::CRTHit is associated to the T0. It's a bit awkward to |
1928 | 1929 | // access that here, so we do it per-track (see code where fmCRTHitMatch is accessed below) |
| 1930 | + |
1929 | 1931 | art::FindManyP<anab::T0> fmCRTHitMatch = |
1930 | 1932 | FindManyPStrict<anab::T0>(slcTracks, evt, |
1931 | | - fParams.CRTHitMatchLabel() + slice_tag_suff); |
| 1933 | + fParams.CRTHitMatchLabel()); |
| 1934 | + |
| 1935 | + art::FindManyP<sbn::crt::CRTHitT0TaggingInfo> fmCRTHitMatchInfo = |
| 1936 | + FindManyPStrict<sbn::crt::CRTHitT0TaggingInfo>(slcTracks, evt, |
| 1937 | + fParams.CRTHitMatchInfoLabel()); |
1932 | 1938 |
|
1933 | 1939 | // TODO: also save the sbn::crt::CRTTrack in the matching so that CAFMaker has access to it |
1934 | 1940 | art::FindManyP<anab::T0> fmCRTTrackMatch = |
@@ -2167,14 +2173,19 @@ void CAFMaker::produce(art::Event& evt) noexcept { |
2167 | 2173 | fParams.TrackHitFillRRStartCut(), fParams.TrackHitFillRREndCut(), |
2168 | 2174 | dprop, trk); |
2169 | 2175 | } |
| 2176 | + |
2170 | 2177 | if (fmCRTHitMatch.isValid() && fDet == kICARUS) { |
2171 | 2178 | art::FindManyP<sbn::crt::CRTHit> CRTT02Hit = FindManyPStrict<sbn::crt::CRTHit> |
2172 | | - (fmCRTHitMatch.at(iPart), evt, fParams.CRTHitMatchLabel() + slice_tag_suff); |
| 2179 | + (fmCRTHitMatch.at(iPart), evt, fParams.CRTHitMatchLabel()); |
2173 | 2180 |
|
2174 | 2181 | std::vector<art::Ptr<sbn::crt::CRTHit>> crthitmatch; |
2175 | | - if (CRTT02Hit.isValid() && CRTT02Hit.size() == 1) crthitmatch = CRTT02Hit.at(0); |
2176 | | - |
2177 | | - FillTrackCRTHit(fmCRTHitMatch.at(iPart), crthitmatch, fParams.CRTUseTS0(), CRT_T0_reference_time, CRT_T1_reference_time, trk); |
| 2182 | + std::vector<art::Ptr<sbn::crt::CRTHitT0TaggingInfo>> crthittagginginfo; |
| 2183 | + if(CRTT02Hit.isValid() && CRTT02Hit.size() == 1){ |
| 2184 | + crthitmatch = CRTT02Hit.at(0); |
| 2185 | + crthittagginginfo = fmCRTHitMatchInfo.at(iPart); |
| 2186 | + } |
| 2187 | + |
| 2188 | + FillTrackCRTHit(fmCRTHitMatch.at(iPart), crthitmatch, crthittagginginfo, fParams.CRTUseTS0(), CRT_T0_reference_time, CRT_T1_reference_time, trk); |
2178 | 2189 | } |
2179 | 2190 | // NOTE: SEE TODO AT fmCRTTrackMatch |
2180 | 2191 | if (fmCRTTrackMatch.isValid() && fDet == kICARUS) { |
|
0 commit comments