Project

General

Profile

Bug #20034

prodgenie_atmnu

Added by John Losecco over 1 year ago. Updated 11 months ago.

Status:
Work in progress
Priority:
Normal
Assignee:
-
Start date:
05/28/2018
Due date:
% Done:

90%

Estimated time:
Duration:

Description

When generating atmospheric neutrino events with genie the flux is left in generator coordinates with
Z pointing upward toward the zenith and South as phi=0 and East is phi=90 degrees. The vectors need to be rotated into detector coordinates. With this bug the atmospheric flux is interpreted with the
zenith along the horizontal near the beam direction etc.

FD.png (341 KB) FD.png Tingjun Yang, 06/05/2018 01:16 PM
coordinate_flux_file.png (17.7 KB) coordinate_flux_file.png Wanwei Wu, 07/25/2018 11:29 AM
coordinate_genie_atmflux_driver.png (14.1 KB) coordinate_genie_atmflux_driver.png Wanwei Wu, 07/25/2018 11:43 AM
coordinate_dune_fd.png (51.3 KB) coordinate_dune_fd.png Wanwei Wu, 07/25/2018 11:45 AM

Related issues

Related to NuTools - Feature #21185: Atmospheric flux rotation by defaultNew10/18/2018

Associated revisions

Revision e6155747 (diff)
Added by Gianluca Petrillo 6 months ago

Precise alignment of detector for atmospheric flux offered as option (see issue #20034).

History

#1 Updated by Robert Hatcher over 1 year ago

Capturing some email discussion:

John:

The last problem before these can be used is the WRONG coordinate system. DUNE has Z more or less along the beam, Y up and X in the drift direction. The flux files have Z up and the angle phi is measured as 0 degrees is due south and 90 degrees is east.

Can someone point me toward the DUNE detector coordnate axes in a North South East West bases?

To convert the neutrino flux vectors (Honda and Gaisser) to detector coordinates takes a 90 degree rotation about X to flip the flux Z direction into the detector Y direction. It then needs as yet unknown rotation about the DUNE Y axis to get the azimuth right.

Any idea of what that Y rotation angle is?

I guess this rotation should be coded into the flux interface.

Jim Stewart:

The caverns are roughly aligned to the beam from FNAL. Google earth will give you a rough orientation. Tracy Lundin may have a drawing with the actual coordinates and the angle to true north.

The requirement in docdb 112 is LBNF shall provide an excavation at the 4850 level aligned to within +/- 1.0 degrees to the FNAL beam.

Robert:

Looks like the two make different assumptions and no one compensates for it.

GHAKKMAtmoFlux derives from GAtmoFlux which does provide an interface:

void SetUserCoordSystem (TRotation & rotation);
///< Rotation: Topocentric Horizontal -> User-defined Topocentric Coord System.

that we could call in NuTools'. GENIEHelper class. I'd prefer not to have users have to input a TRotation so a little thought about the user interface here would be useful. Perhaps inputing the detector z orientation relative to true north (which Tingjun seems to be tracking down) and having it work out the rest during the flux initialization.

#2 Updated by Tingjun Yang over 1 year ago

Hi Robert,

How was this handled for the MINOS simulation?

Tingjun

#3 Updated by Robert Hatcher over 1 year ago

Tingjun, MINOS didn't use GENIE and I'm not sure which atmospheric flux it used. NOvA does use GENIE, but again I'm not sure what flux was used (or what the state of the analysis is); presumably someone would notice is the angles were wrong ... so I'm assuming that it wasn't the Honda flux.

More followup from John

I have encountered one other limitation in the atmospheric neutrino fluxes. There is only one choice, solar min, for the Honda flux. genie_dune.fcl has only one option "dune_fd_genie_atmo_hondaflux" which had been coded to the flux files "hms-ally-20-01-solmax.d".

In my copy of genie_dune.fcl I have added dune_fd_genie_atmo_max_hondaflux which points to hms-ally-20-12-solmax.d. In my copy I had changed dune_fd_genie_atmo_hondaflux to point to hms-ally-20-12-solmin.d to avoid the angular bug.

It might be smart to use a more symetric set of names such as

dune_fd_genie_atmo_max_hondaflux

and

dune_fd_genie_atmo_min_hondaflux

Yes, one can/should expand and "regularize" the configurations in the dune fcl files.

#4 Updated by Tingjun Yang over 1 year ago

Robert Hatcher wrote:

Tingjun, MINOS didn't use GENIE and I'm not sure which atmospheric flux it used. NOvA does use GENIE, but again I'm not sure what flux was used (or what the state of the analysis is); presumably someone would notice is the angles were wrong ... so I'm assuming that it wasn't the Honda flux.

More followup from John

I have encountered one other limitation in the atmospheric neutrino fluxes. There is only one choice, solar min, for the Honda flux. genie_dune.fcl has only one option "dune_fd_genie_atmo_hondaflux" which had been coded to the flux files "hms-ally-20-01-solmax.d".

In my copy of genie_dune.fcl I have added dune_fd_genie_atmo_max_hondaflux which points to hms-ally-20-12-solmax.d. In my copy I had changed dune_fd_genie_atmo_hondaflux to point to hms-ally-20-12-solmin.d to avoid the angular bug.

It might be smart to use a more symetric set of names such as

dune_fd_genie_atmo_max_hondaflux

and

dune_fd_genie_atmo_min_hondaflux

Yes, one can/should expand and "regularize" the configurations in the dune fcl files.

It is also possible to override any fcl parameters in the job fcl file.

#5 Updated by John Losecco over 1 year ago

The solution to the orientation problem, the direction, is the compass heading for a
great circle route. It is a problem in spherical geometry.
The solution can be found on-line, for example Wikipedia

https://en.wikipedia.org/wiki/Great-circle_navigation

One needs the latitude and longitude of the starting and ending points.

#6 Updated by John Losecco over 1 year ago

Putting in rough positions for Fermilab and Sanford lab gives the beam direction
at Sanford lab to be about -82.819 degrees west of north. These should be checked
with the correct latitude and longitude of the far detector. I used an estimate of
the Yates shaft location. I also did not put in an exact beam origin location.

#7 Updated by Tingjun Yang over 1 year ago

Virgil Bocean confirmed the angle is 277.175588 deg (measured clockwise from North).

#8 Updated by Wanwei Wu about 1 year ago

  • Honda atmospheric flux file is located at:_ /pnfs/dune/persistent/TaskForce_ Flux/atmos/Honda_. The flux itself uses a coordinate system, which z is the zenith (up), x points to South and y points to the East. The azimuth angle phi is measured from South, counter-clockwise. See
  • The coordinate system of DUNE FD is given in
    .
    If we follow the above definition of phi at this moment, we have to do some rotations and plus a flip of axis to change the left-handed system to right-handed system. Robert Hatcher added the rotation parts in release v06_84_00 of dunetpc, the configuration part is, for example,

physics.producers.generator.FluxRotCfg: "verbose series rotXdeg rotZdeg rotZdeg"
physics.producers.generator.FluxRotValues: [90,-90,7.175588]

Here, the rotation is in a left-handed system, and rotXdeg, rotYdeg, and rotZdeg are relative to the initial coordinate in GENIE. The flip of left-handed to right-handed can be done by changing signs of x and Px, i.e., x=-x, Px=-Px.

  • We identified this left-handed issue due to the definition of phi in GENIE source code and sent a notice to GENIE collaboration. Below is a reply from Costas Andreopoulos:

"Yes, I think this can be fixed in v3.0.0. Other experiments are probably using this - The Honda flux was contributed from INO and IceCUBE folks so they should be using it in some way or another. Not sure if this made it to any of their publications. We can fix this / document the change, and then we will also notify all known users of that flux."

Basically, the line 191 and 192 regarding to Px and Py are changed into: _ double py = -1.* Ev * sintheta * sinphi; double px = -1.* Ev * sintheta * cosphi;_. After this, we still need to do rotations to obtain DUNE FD coordinate system. This will be easy and clear with the help of the rotation configuration.

#9 Updated by Gianluca Petrillo 11 months ago

  • Related to Feature #21185: Atmospheric flux rotation by default added

#10 Updated by Gianluca Petrillo 11 months ago

Dear all, I have just now became aware of this ticket.
A few days ago I have discovered the wheel at the NDK/High-E Working Group Meeting.
In that context, I prepared a branch feature/gp_AtmoFluxFixes including the simple rotation (commit 0831403; plus another fix for the far detector). The file has also math commented out to include the azimuth orientation, but I missed the right angle to do so (the 82.8244 degrees above).

I was asking for inclusion of that branch in dunetpc. At this point, I'd rather coordinate with you.
But I would suggest that, if the outcome of this ticket is not going to be here soon1, the branch above be merged first, so that at least people using Bartol flux (and the ones using far detector) are safe, and the final changes will override it eventually.


1 Never easy to guess...

#11 Updated by Tingjun Yang 11 months ago

Gianluca Petrillo wrote:

Dear all, I have just now became aware of this ticket.
A few days ago I have discovered the wheel at the NDK/High-E Working Group Meeting.
In that context, I prepared a branch feature/gp_AtmoFluxFixes including the simple rotation (commit 0831403; plus another fix for the far detector). The file has also math commented out to include the azimuth orientation, but I missed the right angle to do so (the 82.8244 degrees above).

I was asking for inclusion of that branch in dunetpc. At this point, I'd rather coordinate with you.
But I would suggest that, if the outcome of this ticket is not going to be here soon1, the branch above be merged first, so that at least people using Bartol flux (and the ones using far detector) are safe, and the final changes will override it eventually.


1 Never easy to guess...

The coordination system bug will be fixed in genie 3. I agree we can put in the fix for now and remove it later when larsoft uses genie3.

#12 Updated by Gianluca Petrillo 11 months ago

  • Status changed from New to Work in progress

After consulting with the release managers, I have pushed my changes in develop branch, with the understanding that if something better comes out from this or #21185, those should supersede these changes.

The configuration I pushed aligns z axis with the east-west direction. In the same file, there is a more precise rotation that should account for the correct direction of the detector. Since I did not test the latter, I left it as optional in a separate configuration snippet that would need to be explicitly added in the main job configuration.



Also available in: Atom PDF