|
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" |
@@ -1950,9 +1951,14 @@ void CAFMaker::produce(art::Event& evt) noexcept { |
1950 | 1951 |
|
1951 | 1952 | // NOTE: The sbn::crt::CRTHit is associated to the T0. It's a bit awkward to |
1952 | 1953 | // access that here, so we do it per-track (see code where fmCRTHitMatch is accessed below) |
| 1954 | + |
1953 | 1955 | art::FindManyP<anab::T0> fmCRTHitMatch = |
1954 | 1956 | FindManyPStrict<anab::T0>(slcTracks, evt, |
1955 | | - fParams.CRTHitMatchLabel() + slice_tag_suff); |
| 1957 | + fParams.CRTHitMatchLabel()); |
| 1958 | + |
| 1959 | + art::FindManyP<sbn::crt::CRTHitT0TaggingInfo> fmCRTHitMatchInfo = |
| 1960 | + FindManyPStrict<sbn::crt::CRTHitT0TaggingInfo>(slcTracks, evt, |
| 1961 | + fParams.CRTHitMatchInfoLabel()); |
1956 | 1962 |
|
1957 | 1963 | // TODO: also save the sbn::crt::CRTTrack in the matching so that CAFMaker has access to it |
1958 | 1964 | art::FindManyP<anab::T0> fmCRTTrackMatch = |
@@ -2191,14 +2197,19 @@ void CAFMaker::produce(art::Event& evt) noexcept { |
2191 | 2197 | fParams.TrackHitFillRRStartCut(), fParams.TrackHitFillRREndCut(), |
2192 | 2198 | dprop, trk); |
2193 | 2199 | } |
| 2200 | + |
2194 | 2201 | if (fmCRTHitMatch.isValid() && fDet == kICARUS) { |
2195 | 2202 | art::FindManyP<sbn::crt::CRTHit> CRTT02Hit = FindManyPStrict<sbn::crt::CRTHit> |
2196 | | - (fmCRTHitMatch.at(iPart), evt, fParams.CRTHitMatchLabel() + slice_tag_suff); |
| 2203 | + (fmCRTHitMatch.at(iPart), evt, fParams.CRTHitMatchLabel()); |
2197 | 2204 |
|
2198 | 2205 | std::vector<art::Ptr<sbn::crt::CRTHit>> crthitmatch; |
2199 | | - if (CRTT02Hit.isValid() && CRTT02Hit.size() == 1) crthitmatch = CRTT02Hit.at(0); |
2200 | | - |
2201 | | - FillTrackCRTHit(fmCRTHitMatch.at(iPart), crthitmatch, fParams.CRTUseTS0(), CRT_T0_reference_time, CRT_T1_reference_time, trk); |
| 2206 | + std::vector<art::Ptr<sbn::crt::CRTHitT0TaggingInfo>> crthittagginginfo; |
| 2207 | + if(CRTT02Hit.isValid() && CRTT02Hit.size() == 1){ |
| 2208 | + crthitmatch = CRTT02Hit.at(0); |
| 2209 | + crthittagginginfo = fmCRTHitMatchInfo.at(iPart); |
| 2210 | + } |
| 2211 | + |
| 2212 | + FillTrackCRTHit(fmCRTHitMatch.at(iPart), crthitmatch, crthittagginginfo, fParams.CRTUseTS0(), CRT_T0_reference_time, CRT_T1_reference_time, trk); |
2202 | 2213 | } |
2203 | 2214 | // NOTE: SEE TODO AT fmCRTTrackMatch |
2204 | 2215 | if (fmCRTTrackMatch.isValid() && fDet == kICARUS) { |
|
0 commit comments