A GENIE flux driver encapsulating the JPARC neutrino flux. It reads-in the official JPARC neutrino flux ntuples. More...
#include <GJPARCNuFlux.h>
Public Member Functions | |
GJPARCNuFlux () | |
~GJPARCNuFlux () | |
const PDGCodeList & | FluxParticles (void) |
declare list of flux neutrinos that can be generated (for init. purposes) More... | |
double | MaxEnergy (void) |
declare the max flux neutrino energy that can be generated (for init. purposes) More... | |
bool | GenerateNext (void) |
generate the next flux neutrino (return false in err) More... | |
int | PdgCode (void) |
returns the flux neutrino pdg code More... | |
double | Weight (void) |
returns the flux neutrino weight (if any) More... | |
const TLorentzVector & | Momentum (void) |
returns the flux neutrino 4-momentum More... | |
const TLorentzVector & | Position (void) |
returns the flux neutrino 4-position (note: expect SI rather than physical units) More... | |
bool | End (void) |
true if no more flux nu's can be thrown (eg reaching end of beam sim ntuples) More... | |
long int | Index (void) |
returns corresponding index for current flux neutrino (e.g. for a flux ntuple returns the current entry number) More... | |
void | Clear (Option_t *opt) |
reset state variables based on opt More... | |
void | GenerateWeighted (bool gen_weighted=true) |
set whether to generate weighted or unweighted neutrinos More... | |
bool | LoadBeamSimData (string filename, string det_loc) |
load a jnubeam root flux ntuple More... | |
void | SetFluxParticles (const PDGCodeList &particles) |
specify list of flux neutrino species More... | |
void | SetMaxEnergy (double Ev) |
specify maximum flx neutrino energy More... | |
void | SetFilePOT (double pot) |
flux file norm is in /N POT/det [ND] or /N POT/cm^2 [FD]. Specify N (typically 1E+21) More... | |
void | SetUpstreamZ (double z0) |
set flux neutrino initial z position (upstream of the detector) More... | |
void | SetNumOfCycles (int n) |
set how many times to cycle through the ntuple (default: 1 / n=0 means 'infinite') More... | |
void | DisableOffset (void) |
switch off random offset, must be called before LoadBeamSimData to have any effect More... | |
void | RandomOffset (void) |
choose a random offset as starting entry in flux ntuple More... | |
double | POT_1cycle (void) |
flux POT per cycle More... | |
double | POT_curravg (void) |
current average POT More... | |
long int | NFluxNeutrinos (void) const |
number of flux neutrinos looped so far More... | |
double | SumWeight (void) const |
intergated weight for flux neutrinos looped so far More... | |
const GJPARCNuFluxPassThroughInfo & | PassThroughInfo (void) |
GJPARCNuFluxPassThroughInfo. More... | |
Public Member Functions inherited from genie::GFluxI | |
virtual | ~GFluxI () |
Private Member Functions | |
bool | GenerateNext_weighted (void) |
void | Initialize (void) |
void | SetDefaults (void) |
void | CleanUp (void) |
void | ResetCurrent (void) |
int | DLocName2Id (string name) |
Private Attributes | |
double | fMaxEv |
maximum energy More... | |
PDGCodeList * | fPdgCList |
list of neutrino pdg-codes More... | |
int | fgPdgC |
running generated nu pdg-code More... | |
TLorentzVector | fgP4 |
running generated nu 4-momentum More... | |
TLorentzVector | fgX4 |
running generated nu 4-position More... | |
TFile * | fNuFluxFile |
input flux file More... | |
TTree * | fNuFluxTree |
input flux ntuple More... | |
TChain * | fNuFluxChain |
input flux ntuple More... | |
TTree * | fNuFluxSumTree |
input summary ntuple for flux file. This tree is only present for later flux versions > 10a More... | |
TChain * | fNuFluxSumChain |
input summary ntuple for flux file. This tree is only present for later flux versions > 10a More... | |
bool | fNuFluxUsingTree |
are we using a TTree or a TChain to view the input flux file? More... | |
string | fDetLoc |
input detector location ('sk','nd1','nd2',...) More... | |
int | fDetLocId |
input detector location id (fDetLoc -> jnubeam idfd) More... | |
int | fNDetLocIdFound |
per cycle keep track of the number of fDetLocId are found - if this is zero will exit job More... | |
bool | fIsFDLoc |
input location is a 'far' detector location? More... | |
bool | fIsNDLoc |
input location is a 'near' detector location? More... | |
long int | fNEntries |
number of flux ntuple entries More... | |
long int | fIEntry |
current flux ntuple entry More... | |
long int | fEntriesThisCycle |
keep track of number of entries used so far for this cycle More... | |
long int | fOffset |
start looping at entry fOffset More... | |
double | fNorm |
current flux ntuple normalisation More... | |
double | fMaxWeight |
max flux neutrino weight in input file for the specified detector location More... | |
double | fFilePOT |
file POT normalization, typically 1E+21 More... | |
double | fZ0 |
configurable starting z position for each flux neutrino (in detector coord system) More... | |
int | fNCycles |
how many times to cycle through the flux ntuple More... | |
int | fICycle |
current cycle More... | |
double | fSumWeight |
sum of weights for neutrinos thrown so far More... | |
long int | fNNeutrinos |
number of flux neutrinos thrown so far More... | |
double | fSumWeightTot1c |
total sum of weights for neutrinos to be thrown / cycle More... | |
long int | fNNeutrinosTot1c |
total number of flux neutrinos to be thrown / cycle More... | |
bool | fGenerateWeighted |
generate weighted/deweighted flux neutrinos (default is false) More... | |
bool | fUseRandomOffset |
whether set random starting point when looping over flux ntuples More... | |
bool | fLoadedNeutrino |
set to true when GenerateNext_weighted has been called successfully More... | |
GJPARCNuFluxPassThroughInfo * | fPassThroughInfo |
Additional Inherited Members | |
Protected Member Functions inherited from genie::GFluxI | |
GFluxI () | |
A GENIE flux driver encapsulating the JPARC neutrino flux. It reads-in the official JPARC neutrino flux ntuples.
See http://jnusrv01.kek.jp/internal/t2k/nubeam/flux/ (Note: T2K internal)
Feb 04, 2008
Copyright (c) 2003-2020, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org
Definition at line 50 of file GJPARCNuFlux.h.
genie::flux::GJPARCNuFlux::GJPARCNuFlux | ( | ) |
GJPARCNuFlux::~GJPARCNuFlux | ( | ) |
Definition at line 50 of file GJPARCNuFlux.cxx.
|
private |
Definition at line 909 of file GJPARCNuFlux.cxx.
|
virtual |
reset state variables based on opt
Implements genie::GFluxI.
Definition at line 806 of file GJPARCNuFlux.cxx.
|
inline |
switch off random offset, must be called before LoadBeamSimData to have any effect
Definition at line 83 of file GJPARCNuFlux.h.
|
private |
Definition at line 922 of file GJPARCNuFlux.cxx.
|
inlinevirtual |
true if no more flux nu's can be thrown (eg reaching end of beam sim ntuples)
Implements genie::GFluxI.
Definition at line 66 of file GJPARCNuFlux.h.
|
inlinevirtual |
declare list of flux neutrinos that can be generated (for init. purposes)
Implements genie::GFluxI.
Definition at line 59 of file GJPARCNuFlux.h.
|
virtual |
generate the next flux neutrino (return false in err)
Implements genie::GFluxI.
Definition at line 55 of file GJPARCNuFlux.cxx.
|
private |
Definition at line 100 of file GJPARCNuFlux.cxx.
|
virtual |
set whether to generate weighted or unweighted neutrinos
Implements genie::GFluxI.
Definition at line 781 of file GJPARCNuFlux.cxx.
|
virtual |
returns corresponding index for current flux neutrino (e.g. for a flux ntuple returns the current entry number)
Implements genie::GFluxI.
Definition at line 363 of file GJPARCNuFlux.cxx.
|
private |
Definition at line 826 of file GJPARCNuFlux.cxx.
load a jnubeam root flux ntuple
Definition at line 377 of file GJPARCNuFlux.cxx.
|
inlinevirtual |
declare the max flux neutrino energy that can be generated (for init. purposes)
Implements genie::GFluxI.
Definition at line 60 of file GJPARCNuFlux.h.
|
inlinevirtual |
returns the flux neutrino 4-momentum
Implements genie::GFluxI.
Definition at line 64 of file GJPARCNuFlux.h.
|
inline |
number of flux neutrinos looped so far
Definition at line 88 of file GJPARCNuFlux.h.
|
inline |
Definition at line 92 of file GJPARCNuFlux.h.
|
inlinevirtual |
returns the flux neutrino pdg code
Implements genie::GFluxI.
Definition at line 62 of file GJPARCNuFlux.h.
|
inlinevirtual |
returns the flux neutrino 4-position (note: expect SI rather than physical units)
Implements genie::GFluxI.
Definition at line 65 of file GJPARCNuFlux.h.
double GJPARCNuFlux::POT_1cycle | ( | void | ) |
flux POT per cycle
Definition at line 322 of file GJPARCNuFlux.cxx.
double GJPARCNuFlux::POT_curravg | ( | void | ) |
current average POT
Definition at line 341 of file GJPARCNuFlux.cxx.
void GJPARCNuFlux::RandomOffset | ( | void | ) |
choose a random offset as starting entry in flux ntuple
Definition at line 790 of file GJPARCNuFlux.cxx.
|
private |
Definition at line 895 of file GJPARCNuFlux.cxx.
|
private |
Definition at line 868 of file GJPARCNuFlux.cxx.
void GJPARCNuFlux::SetFilePOT | ( | double | pot | ) |
flux file norm is in /N POT/det [ND] or /N POT/cm^2 [FD]. Specify N (typically 1E+21)
Definition at line 751 of file GJPARCNuFlux.cxx.
void GJPARCNuFlux::SetFluxParticles | ( | const PDGCodeList & | particles | ) |
specify list of flux neutrino species
Definition at line 732 of file GJPARCNuFlux.cxx.
void GJPARCNuFlux::SetMaxEnergy | ( | double | Ev | ) |
specify maximum flx neutrino energy
Definition at line 743 of file GJPARCNuFlux.cxx.
void GJPARCNuFlux::SetNumOfCycles | ( | int | n | ) |
set how many times to cycle through the ntuple (default: 1 / n=0 means 'infinite')
Definition at line 769 of file GJPARCNuFlux.cxx.
void GJPARCNuFlux::SetUpstreamZ | ( | double | z0 | ) |
set flux neutrino initial z position (upstream of the detector)
Definition at line 759 of file GJPARCNuFlux.cxx.
|
inline |
intergated weight for flux neutrinos looped so far
Definition at line 89 of file GJPARCNuFlux.h.
|
inlinevirtual |
returns the flux neutrino weight (if any)
Implements genie::GFluxI.
Definition at line 63 of file GJPARCNuFlux.h.
|
private |
input detector location ('sk','nd1','nd2',...)
Definition at line 120 of file GJPARCNuFlux.h.
|
private |
input detector location id (fDetLoc -> jnubeam idfd)
Definition at line 121 of file GJPARCNuFlux.h.
|
private |
keep track of number of entries used so far for this cycle
Definition at line 127 of file GJPARCNuFlux.h.
|
private |
file POT normalization, typically 1E+21
Definition at line 131 of file GJPARCNuFlux.h.
|
private |
generate weighted/deweighted flux neutrinos (default is false)
Definition at line 139 of file GJPARCNuFlux.h.
|
private |
running generated nu 4-momentum
Definition at line 111 of file GJPARCNuFlux.h.
|
private |
running generated nu pdg-code
Definition at line 110 of file GJPARCNuFlux.h.
|
private |
running generated nu 4-position
Definition at line 112 of file GJPARCNuFlux.h.
|
private |
current cycle
Definition at line 134 of file GJPARCNuFlux.h.
|
private |
current flux ntuple entry
Definition at line 126 of file GJPARCNuFlux.h.
|
private |
input location is a 'far' detector location?
Definition at line 123 of file GJPARCNuFlux.h.
|
private |
input location is a 'near' detector location?
Definition at line 124 of file GJPARCNuFlux.h.
|
private |
set to true when GenerateNext_weighted has been called successfully
Definition at line 141 of file GJPARCNuFlux.h.
|
private |
maximum energy
Definition at line 107 of file GJPARCNuFlux.h.
|
private |
max flux neutrino weight in input file for the specified detector location
Definition at line 130 of file GJPARCNuFlux.h.
|
private |
how many times to cycle through the flux ntuple
Definition at line 133 of file GJPARCNuFlux.h.
|
private |
per cycle keep track of the number of fDetLocId are found - if this is zero will exit job
Definition at line 122 of file GJPARCNuFlux.h.
|
private |
number of flux ntuple entries
Definition at line 125 of file GJPARCNuFlux.h.
|
private |
number of flux neutrinos thrown so far
Definition at line 136 of file GJPARCNuFlux.h.
|
private |
total number of flux neutrinos to be thrown / cycle
Definition at line 138 of file GJPARCNuFlux.h.
|
private |
current flux ntuple normalisation
Definition at line 129 of file GJPARCNuFlux.h.
|
private |
input flux ntuple
Definition at line 116 of file GJPARCNuFlux.h.
|
private |
input flux file
Definition at line 114 of file GJPARCNuFlux.h.
|
private |
input summary ntuple for flux file. This tree is only present for later flux versions > 10a
Definition at line 118 of file GJPARCNuFlux.h.
|
private |
input summary ntuple for flux file. This tree is only present for later flux versions > 10a
Definition at line 117 of file GJPARCNuFlux.h.
|
private |
input flux ntuple
Definition at line 115 of file GJPARCNuFlux.h.
|
private |
are we using a TTree or a TChain to view the input flux file?
Definition at line 119 of file GJPARCNuFlux.h.
|
private |
start looping at entry fOffset
Definition at line 128 of file GJPARCNuFlux.h.
|
private |
Definition at line 143 of file GJPARCNuFlux.h.
|
private |
list of neutrino pdg-codes
Definition at line 108 of file GJPARCNuFlux.h.
|
private |
sum of weights for neutrinos thrown so far
Definition at line 135 of file GJPARCNuFlux.h.
|
private |
total sum of weights for neutrinos to be thrown / cycle
Definition at line 137 of file GJPARCNuFlux.h.
|
private |
whether set random starting point when looping over flux ntuples
Definition at line 140 of file GJPARCNuFlux.h.
|
private |
configurable starting z position for each flux neutrino (in detector coord system)
Definition at line 132 of file GJPARCNuFlux.h.