Necessary Maintenance #17917
Anatree needs updating to store information for multiple neutrinos per event/entry
SBND's anatree (which I assume came from MicroBooNE given that the namespace is microboone...) is only capable of storing one neutrino per entry in the TTree (which is a 1:1 map to ART event).
I believe that MicroBooNE and basically every other neutrino-searching LArSoft customer assume there will be at most one neutrino interaction per readout window. Unfortunately, this assumption is 100% not OK for SBND.
Looking in anatree, I see the following variables associated with the neutrino (and complementary line number):
375 Int_t nuPDG_truth; //neutrino PDG code
376 Int_t ccnc_truth; //0=CC 1=NC
377 Int_t mode_truth; //0=QE/El, 1=RES, 2=DIS, 3=Coherent production
378 Float_t enu_truth; //true neutrino energy
379 Float_t Q2_truth; //Momentum transfer squared
380 Float_t W_truth; //hadronic invariant mass
381 Int_t hitnuc_truth; //hit nucleon
382 Float_t nuvtxx_truth; //neutrino vertex x
383 Float_t nuvtxy_truth; //neutrino vertex y
384 Float_t nuvtxz_truth; //neutrino vertex z
385 Float_t nu_dcosx_truth; //neutrino dcos x
386 Float_t nu_dcosy_truth; //neutrino dcos y
387 Float_t nu_dcosz_truth; //neutrino dcos z
388 Float_t lep_mom_truth; //lepton momentum
389 Float_t lep_dcosx_truth; //lepton dcos x
390 Float_t lep_dcosy_truth; //lepton dcos y
391 Float_t lep_dcosz_truth; //lepton dcos z
I believe that the solution is a simple one, swap the data members for vectors.
This change will obviously increase the output size of the output root files. Unfortunately this is a necessary evil as it's very important that we have the ability to store ALL true neutrinos for analysis. Given the number of data members we currently store and the number of neutrinos we expect per ART event, I don't forsee the file size increase will be large.
I'm tagging this as urgent as we plan to use a dirt sample in the upcoming SBN workshop.
#1 Updated by Dominic Brailsford over 2 years ago
- % Done changed from 0 to 50
This fix is slightly more complicated due to the MCFlux information assuming that there is one neutrino per event.
There's also a bunch of 'genie' info which stores some information about the daughter particles of the neutrino. I'm not sure this stuff is even needed as geant4 information gets stored in the tree.
Fixing the flux information will be easy enough and the same procedure can be followed.
Unfortunately this additional 'genie' info can't be fixed in the same way as we would end up with a 2D array and root can't handle 2D variable length arrays...
I'd suggest leaving this original genie info untouched for now but I'd recommend we remove it down the line. As said above, this info should be retrievable from the geant4 information also stored in anatree.
Initial fix in commit 698af02