|
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" |
@@ -267,6 +267,8 @@ class CAFMaker : public art::EDProducer { |
267 | 267 | double fGenieEvtRec_brEvtXSec = 0.0; ////< Cross section for selected event (1e-38 cm2) |
268 | 268 | double fGenieEvtRec_brEvtDXSec = 0.0; ////< Cross section for selected event kinematics (1e-38 cm2 / {K^n}) |
269 | 269 | unsigned int fGenieEvtRec_brEvtKPS = 0; ////< Kinematic phase space variables. See $GENIE/src/Framework/Conventions/KinePhaseSpace.h -> KinePhaseSpace_t |
| 270 | + int fGenieEvtRec_brSctType = 0; ///< See [`genie::EScatteringType`](https://hep.ph.liv.ac.uk/~costasa/genie_doxygen/master/html/namespacegenie.html#ab97d2b4d1f37af8d967dadd15be88d0b) |
| 271 | + int fGenieEvtRec_brIntType = 0; ///< See [`genie::EInteractionType`](https://hep.ph.liv.ac.uk/~costasa/genie_doxygen/master/html/namespacegenie.html#a554f81bb9954c9e46bbabadfcd403111) |
270 | 272 | double fGenieEvtRec_brEvtWght = 0.0; ////< Weight for that event |
271 | 273 | double fGenieEvtRec_brEvtProb = 0.0; ////< Probability for that event (given cross section, path lengths, etc) |
272 | 274 | double fGenieEvtRec_brEvtVtx[4] = {0.0}; ////< Event vertex position in detector coord syst (SI) |
@@ -1198,6 +1200,8 @@ void CAFMaker::InitializeOutfiles() |
1198 | 1200 | fFlatGenieTree->Branch("GenieEvtRec.EvtXSec", &fGenieEvtRec_brEvtXSec, "GenieEvtRec.EvtXSec/D" ); |
1199 | 1201 | fFlatGenieTree->Branch("GenieEvtRec.EvtDXSec", &fGenieEvtRec_brEvtDXSec, "GenieEvtRec.EvtDXSec/D" ); |
1200 | 1202 | fFlatGenieTree->Branch("GenieEvtRec.EvtKPS", &fGenieEvtRec_brEvtKPS, "GenieEvtRec.EvtKPS/i" ); |
| 1203 | + fFlatGenieTree->Branch("GenieEvtRec.SctType", &fGenieEvtRec_brSctType, "GenieEvtRec.SctType/I" ); |
| 1204 | + fFlatGenieTree->Branch("GenieEvtRec.IntType", &fGenieEvtRec_brIntType, "GenieEvtRec.IntType/I" ); |
1201 | 1205 | fFlatGenieTree->Branch("GenieEvtRec.EvtWght", &fGenieEvtRec_brEvtWght, "GenieEvtRec.EvtWght/D" ); |
1202 | 1206 | fFlatGenieTree->Branch("GenieEvtRec.EvtProb", &fGenieEvtRec_brEvtProb, "GenieEvtRec.EvtProb/D" ); |
1203 | 1207 | fFlatGenieTree->Branch("GenieEvtRec.EvtVtx", fGenieEvtRec_brEvtVtx, "GenieEvtRec.EvtVtx[4]/D" ); |
@@ -1564,6 +1568,8 @@ void CAFMaker::produce(art::Event& evt) noexcept { |
1564 | 1568 | fGenieEvtRec_brEvtXSec = genie_rec->XSec() * (1e+38/genie::units::cm2); |
1565 | 1569 | fGenieEvtRec_brEvtDXSec = genie_rec->DiffXSec() * (1e+38/genie::units::cm2); |
1566 | 1570 | fGenieEvtRec_brEvtKPS = genie_rec->DiffXSecVars(); |
| 1571 | + fGenieEvtRec_brSctType = genie_rec->Summary()->ProcInfo().ScatteringTypeId(); |
| 1572 | + fGenieEvtRec_brIntType = genie_rec->Summary()->ProcInfo().InteractionTypeId(); |
1567 | 1573 | fGenieEvtRec_brEvtWght = genie_rec->Weight(); |
1568 | 1574 | fGenieEvtRec_brEvtProb = genie_rec->Probability(); |
1569 | 1575 | fGenieEvtRec_brEvtVtx[0] = genie_rec->Vertex()->X(); |
@@ -1730,6 +1736,7 @@ void CAFMaker::produce(art::Event& evt) noexcept { |
1730 | 1736 | std::vector<caf::SRCRTTrack> srcrttracks; |
1731 | 1737 | std::vector<caf::SRCRTSpacePoint> srcrtspacepoints; |
1732 | 1738 | std::vector<caf::SRSBNDCRTTrack> srsbndcrttracks; |
| 1739 | + caf::SRSBNDCRTVeto srsbndcrtveto; |
1733 | 1740 | caf::SRSBNDFrameShiftInfo srsbndframeshiftinfo; |
1734 | 1741 | caf::SRSBNDTimingInfo srsbndtiminginfo; |
1735 | 1742 |
|
@@ -1800,6 +1807,24 @@ void CAFMaker::produce(art::Event& evt) noexcept { |
1800 | 1807 | FillSBNDCRTTrack(sbndcrttracks[i], srsbndcrttracks.back()); |
1801 | 1808 | } |
1802 | 1809 | } |
| 1810 | + |
| 1811 | + // Fill CRT Veto |
| 1812 | + art::Handle<std::vector<sbnd::crt::CRTVeto>> sbndcrtveto_handle; |
| 1813 | + GetByLabelStrict(evt, fParams.SBNDCRTVetoLabel(), sbndcrtveto_handle); |
| 1814 | + // fill into event |
| 1815 | + if (sbndcrtveto_handle.isValid()) { |
| 1816 | + const std::vector<sbnd::crt::CRTVeto> &sbndcrtveto_vec = *sbndcrtveto_handle; |
| 1817 | + // Only one valid veto per event |
| 1818 | + if (sbndcrtveto_vec.size() == 1) { |
| 1819 | + // And associated SpacePoint objects |
| 1820 | + art::FindManyP<sbnd::crt::CRTSpacePoint> spAssoc(sbndcrtveto_handle, evt, fParams.SBNDCRTVetoLabel()); |
| 1821 | + if (spAssoc.isValid()) { |
| 1822 | + // There is one vector of SpacePoints per Veto --> can be empty if no veto condition was satisfied |
| 1823 | + const std::vector<art::Ptr<sbnd::crt::CRTSpacePoint>>& veto_sp_v(spAssoc.at(0)); |
| 1824 | + FillSBNDCRTVeto(sbndcrtveto_vec[0], veto_sp_v, srsbndcrtveto); |
| 1825 | + } |
| 1826 | + } |
| 1827 | + } |
1803 | 1828 |
|
1804 | 1829 | art::Handle<sbnd::timing::FrameShiftInfo> sbndframeshiftinfo_handle; |
1805 | 1830 | GetByLabelStrict(evt, fParams.SBNDFrameShiftInfoLabel(), sbndframeshiftinfo_handle); |
@@ -2558,6 +2583,7 @@ void CAFMaker::produce(art::Event& evt) noexcept { |
2558 | 2583 | rec.ncrt_spacepoints = srcrtspacepoints.size(); |
2559 | 2584 | rec.sbnd_crt_tracks = srsbndcrttracks; |
2560 | 2585 | rec.nsbnd_crt_tracks = srsbndcrttracks.size(); |
| 2586 | + rec.sbnd_crt_veto = srsbndcrtveto; |
2561 | 2587 | rec.opflashes = srflashes; |
2562 | 2588 | rec.nopflashes = srflashes.size(); |
2563 | 2589 | rec.sbnd_frames = srsbndframeshiftinfo; |
|
0 commit comments