SBNSoftware / sbncode

SBN Analysis Software
9 stars 27 forks source link

Correct the time and spatial structure of the BNB beam-spill to the default neutrino generation fcls #112

Open wesketchum opened 3 years ago

wesketchum commented 3 years ago

@jzennamo I think this came from you, and we should verify that it is still an issue.

jzennamo commented 3 years ago

@PetrilloAtWork described this to me so he is a good person to pull into this

PetrilloAtWork commented 3 years ago

Let me summarise the issue: GENIE generator + nugen's GENIEhelper + LArSoft module GENIEGen are not able to place the interaction so that its locations and time are compatible with the expected flight of beam neutrinos. For a given interaction time, there are only a few regions of the detector where an interaction may happen (one in 5-m SBND, about three in 18-m ICARUS), and in each given point beam neutrino buckets are going to show up only every 18.2 ns. To establish this correlation the generating code would need to know the boundary condition of a reference space-time point wheren a bucket is. GENIE has little idea of the detector geometry and it is probably a pain to change that. GENIEHelper is the piece of code in charge of relocating the interaction in the world, but it does time and space location independently and does not currently have all the information necessary to do it right. GENIEGen does have the information, but it would need to "undo" the work of GENIEHelper. I do not remember how hard it was to add what GENIEHelper needs in a LArSoft-agnostic way (that helper is supposed to work also without geo::Geometry service, which is LArSoft's own).

PetrilloAtWork commented 3 years ago

I see some activity in nugen by Robert Hatcher that might be related and might be leading to a solution.

jzennamo commented 3 years ago

Looking at the ICARUS fcl files I see this line: SpillTimeConfig: "evgb::EvtTimeFNALBeam\nintensity 1.0\nsigma 2.00\ndtbucket 18.8313277969\nnperbatch 84\nnfilled 81\nglobal 0.0\n

I expect that this is the configuration but I am not sure if this has been validated, can anyone comment on that?

PetrilloAtWork commented 3 years ago

The issue as I described in the previous comment still persists to my knowledge, and it is a deep one that requires a lot of work to fix and even to work around. This said, as you show for ICARUS the time structure parameters (both BNB and NuMI) are in place and, as far as I know, roughly correct.

wesketchum commented 3 years ago

Moving to 2021C release.

wesketchum commented 2 years ago

Talking to @jzennamo, we think this is likely to slip to 2022A ... will keep here to continue to shame us for now until that project is made.

wesketchum commented 2 years ago

Status here? @PetrilloAtWork @jzennamo

wesketchum commented 1 year ago

See https://github.com/SBNSoftware/icaruscode/issues/475 for more details.

marcodeltutto commented 8 months ago

As written in https://github.com/SBNSoftware/sbndcode/pull/419, the use of AddGenieVtxTime allows assigning the correct time to an interaction in the detector. This requires having the neutrino time in the flux ntuples, which SBND has recently added (https://github.com/SBNSoftware/sbndcode/pull/320),

PetrilloAtWork commented 7 months ago

With:

#include "simulation_genie_icarus_bnb_volCryostat.fcl"

physics.producers.generator.AddGenieVtxTime: true

which sports a SpillTimeConfig: "evgb::EvtTimeFNALBeam\nintensity 1.0\nsigma 2.00\ndtbucket 18.8313277969\nnperbatch 84\nnfilled 81\nglobal 0.0\n": BNBnuLocation

ibsafa commented 3 months ago

@PetrilloAtWork @marcodeltutto Is this issue related to the recent update in larsoft (new genie tag 3.4.2) which results in the correct time and location to be sampled?