22#ifndef _GJPARC_NEUTRINO_FLUX_H_
23#define _GJPARC_NEUTRINO_FLUX_H_
28#include <TLorentzVector.h>
68 long int Index (
void);
69 void Clear (Option_t * opt);
friend ostream & operator<<(ostream &stream, const GJPARCNuFluxPassThroughInfo &info)
virtual ~GJPARCNuFluxPassThroughInfo()
GJPARCNuFluxPassThroughInfo()
bool GenerateNext_weighted(void)
long int fEntriesThisCycle
keep track of number of entries used so far for this cycle
TTree * fNuFluxSumTree
input summary ntuple for flux file. This tree is only present for later flux versions > 10a
double MaxEnergy(void)
declare the max flux neutrino energy that can be generated (for init. purposes)
void SetFilePOT(double pot)
flux file norm is in /N POT/det [ND] or /N POT/cm^2 [FD]. Specify N (typically 1E+21)
double Weight(void)
returns the flux neutrino weight (if any)
int DLocName2Id(string name)
bool GenerateNext(void)
generate the next flux neutrino (return false in err)
const GJPARCNuFluxPassThroughInfo & PassThroughInfo(void)
GJPARCNuFluxPassThroughInfo.
void Clear(Option_t *opt)
reset state variables based on opt
TLorentzVector fgP4
running generated nu 4-momentum
const TLorentzVector & Momentum(void)
returns the flux neutrino 4-momentum
TFile * fNuFluxFile
input flux file
double fMaxWeight
max flux neutrino weight in input file for the specified detector location
void SetMaxEnergy(double Ev)
specify maximum flx neutrino energy
long int fIEntry
current flux ntuple entry
bool fUseRandomOffset
whether set random starting point when looping over flux ntuples
TTree * fNuFluxTree
input flux ntuple
long int Index(void)
returns corresponding index for current flux neutrino (e.g. for a flux ntuple returns the current ent...
void SetNumOfCycles(int n)
set how many times to cycle through the ntuple (default: 1 / n=0 means 'infinite')
void SetUpstreamZ(double z0)
set flux neutrino initial z position (upstream of the detector)
void GenerateWeighted(bool gen_weighted=true)
set whether to generate weighted or unweighted neutrinos
long int NFluxNeutrinos(void) const
number of flux neutrinos looped so far
double fNorm
current flux ntuple normalisation
long int fNNeutrinosTot1c
total number of flux neutrinos to be thrown / cycle
int fgPdgC
running generated nu pdg-code
double fFilePOT
file POT normalization, typically 1E+21
int fDetLocId
input detector location id (fDetLoc -> jnubeam idfd)
int PdgCode(void)
returns the flux neutrino pdg code
double SumWeight(void) const
intergated weight for flux neutrinos looped so far
bool End(void)
true if no more flux nu's can be thrown (eg reaching end of beam sim ntuples)
void DisableOffset(void)
switch off random offset, must be called before LoadBeamSimData to have any effect
double fMaxEv
maximum energy
long int fOffset
start looping at entry fOffset
TChain * fNuFluxSumChain
input summary ntuple for flux file. This tree is only present for later flux versions > 10a
long int fNNeutrinos
number of flux neutrinos thrown so far
double fSumWeightTot1c
total sum of weights for neutrinos to be thrown / cycle
double fZ0
configurable starting z position for each flux neutrino (in detector coord system)
void SetFluxParticles(const PDGCodeList &particles)
specify list of flux neutrino species
bool fIsNDLoc
input location is a 'near' detector location?
bool fLoadedNeutrino
set to true when GenerateNext_weighted has been called successfully
bool fIsFDLoc
input location is a 'far' detector location?
const PDGCodeList & FluxParticles(void)
declare list of flux neutrinos that can be generated (for init. purposes)
bool fNuFluxUsingTree
are we using a TTree or a TChain to view the input flux file?
int fNDetLocIdFound
per cycle keep track of the number of fDetLocId are found - if this is zero will exit job
double POT_curravg(void)
current average POT
int fNCycles
how many times to cycle through the flux ntuple
PDGCodeList * fPdgCList
list of neutrino pdg-codes
TChain * fNuFluxChain
input flux ntuple
double POT_1cycle(void)
flux POT per cycle
bool fGenerateWeighted
generate weighted/deweighted flux neutrinos (default is false)
long int fNEntries
number of flux ntuple entries
bool LoadBeamSimData(string filename, string det_loc)
load a jnubeam root flux ntuple
string fDetLoc
input detector location ('sk','nd1','nd2',...)
TLorentzVector fgX4
running generated nu 4-position
const TLorentzVector & Position(void)
returns the flux neutrino 4-position (note: expect SI rather than physical units)
void RandomOffset(void)
choose a random offset as starting entry in flux ntuple
double fSumWeight
sum of weights for neutrinos thrown so far
GJPARCNuFluxPassThroughInfo * fPassThroughInfo
ostream & operator<<(ostream &stream, const genie::flux::GJPARCNuFluxPassThroughInfo &info)
THE MAIN GENIE PROJECT NAMESPACE