GENIEGenerator
|
A base class for the FLUKA, BGLRS and ATMNC atmo. nu. flux drivers. The driver depends on data files provided by the atmospheric neutrino flux simulation authors in order to determine the angular and energy dependence for each neutrino species. The position of each flux neutrino [going towards a detector centered at (0,0,0)] is generated uniformly on a plane that is perpendicular to a sphere of radius Rl at the point that is determined by the generated neutrino direction (theta,phi). The size of the area of that plane, where flux neutrinos are generated, is determined by the transverse radius Rt. You can tweak Rl, Rt to match the size of your detector. Initially, neutrino coordinates are generated in a default detector coordinate system (Topocentric Horizontal Coordinate -THZ-): +z: Points towards the local zenith. +x: On same plane as local meridian, pointing south. +y: As needed to make a right-handed coordinate system. origin: detector centre Alternative user-defined topocentric systems can be defined by specifying the appropriate rotation from THZ. The driver allows minimum and maximum energy cuts. Also it provides the options to generate wither unweighted or weighted flux neutrinos (the latter giving smoother distributions at the tails). More...
#include <GAtmoFlux.h>
Public Member Functions | |
virtual | ~GAtmoFlux () |
virtual const PDGCodeList & | FluxParticles (void) |
declare list of flux neutrinos that can be generated (for init. purposes) More... | |
virtual double | MaxEnergy (void) |
declare the max flux neutrino energy that can be generated (for init. purposes) More... | |
virtual bool | GenerateNext (void) |
generate the next flux neutrino (return false in err) More... | |
virtual int | PdgCode (void) |
returns the flux neutrino pdg code More... | |
virtual double | Weight (void) |
returns the flux neutrino weight (if any) More... | |
virtual const TLorentzVector & | Momentum (void) |
returns the flux neutrino 4-momentum More... | |
virtual const TLorentzVector & | Position (void) |
returns the flux neutrino 4-position (note: expect SI rather than physical units) More... | |
virtual bool | End (void) |
true if no more flux nu's can be thrown (eg reaching end of beam sim ntuples) More... | |
virtual long int | Index (void) |
returns corresponding index for current flux neutrino (e.g. for a flux ntuple returns the current entry number) More... | |
virtual void | Clear (Option_t *opt) |
reset state variables based on opt More... | |
virtual void | GenerateWeighted (bool gen_weighted) |
set whether to generate weighted or unweighted neutrinos More... | |
double | Enu (void) |
double | Energy (void) |
double | CosTheta (void) |
double | CosZenith (void) |
long int | NFluxNeutrinos (void) const |
Number of flux nu's generated. Not the same as the number of nu's thrown towards the geometry (if there are cuts). More... | |
void | ForceMinEnergy (double emin) |
void | ForceMaxEnergy (double emax) |
void | SetSpectralIndex (double index) |
void | SetRadii (double Rlongitudinal, double Rtransverse) |
double | GetFluxSurfaceArea (void) |
double | GetLongitudinalRadius (void) |
double | GetTransverseRadius (void) |
void | SetUserCoordSystem (TRotation &rotation) |
Rotation: Topocentric Horizontal -> User-defined Topocentric Coord System. More... | |
void | AddFluxFile (int neutrino_pdg, string filename) |
void | AddFluxFile (string filename) |
bool | LoadFluxData (void) |
TH3D * | GetFluxHistogram (int flavour) |
double | GetTotalFlux (void) |
double | GetTotalFluxInEnergyRange (void) |
double | GetFlux (int flavour) |
double | GetFlux (int flavour, double energy) |
double | GetFlux (int flavour, double energy, double costh) |
double | GetFlux (int flavour, double energy, double costh, double phi) |
Public Member Functions inherited from genie::GFluxI | |
virtual | ~GFluxI () |
Protected Member Functions | |
GAtmoFlux () | |
bool | GenerateNext_1try (void) |
void | Initialize (void) |
void | CleanUp (void) |
void | ResetSelection (void) |
double | MinEnergy (void) |
TH3D * | CreateFluxHisto (string name, string title) |
void | ZeroFluxHisto (TH3D *hist) |
void | AddAllFluxes (void) |
int | SelectNeutrino (double Ev, double costheta, double phi) |
TH3D * | CreateNormalisedFluxHisto (TH3D *hist) |
virtual bool | FillFluxHisto (int nu_pdg, string filename)=0 |
Protected Member Functions inherited from genie::GFluxI | |
GFluxI () | |
Protected Attributes | |
double | fMaxEv |
maximum energy (in input flux files) More... | |
PDGCodeList * | fPdgCList |
input list of neutrino pdg-codes More... | |
int | fgPdgC |
current generated nu pdg-code More... | |
TLorentzVector | fgP4 |
current generated nu 4-momentum More... | |
TLorentzVector | fgX4 |
current generated nu 4-position More... | |
double | fWeight |
current generated nu weight More... | |
long int | fNNeutrinos |
number of flux neutrinos thrown so far More... | |
double | fMaxEvCut |
user-defined cut: maximum energy More... | |
double | fMinEvCut |
user-defined cut: minimum energy More... | |
double | fRl |
defining flux neutrino generation surface: longitudinal radius More... | |
double | fRt |
defining flux neutrino generation surface: transverse radius More... | |
TRotation | fRotTHz2User |
coord. system rotation: THZ -> Topocentric user-defined More... | |
unsigned int | fNumPhiBins |
number of phi bins in input flux data files More... | |
unsigned int | fNumCosThetaBins |
number of cos(theta) bins in input flux data files More... | |
unsigned int | fNumEnergyBins |
number of energy bins in input flux data files More... | |
double * | fPhiBins |
phi bins in input flux data files More... | |
double * | fCosThetaBins |
cos(theta) bins in input flux data files More... | |
double * | fEnergyBins |
energy bins in input flux data files More... | |
bool | fGenWeighted |
generate a weighted or unweighted flux? More... | |
double | fSpectralIndex |
power law function used for weighted flux More... | |
bool | fInitialized |
flag to check that initialization is run More... | |
TH3D * | fTotalFluxHisto |
flux = f(Ev,cos8,phi) summed over neutrino species More... | |
double | fTotalFluxHistoIntg |
fFluxSum2D integral More... | |
map< int, TH3D * > | fFluxHistoMap |
flux = f(Ev,cos8,phi) for each neutrino species More... | |
map< int, TH3D * > | fRawFluxHistoMap |
flux = f(Ev,cos8,phi) for each neutrino species More... | |
vector< int > | fFluxFlavour |
input flux file for each neutrino species More... | |
vector< string > | fFluxFile |
input flux file for each neutrino species More... | |
A base class for the FLUKA, BGLRS and ATMNC atmo. nu. flux drivers. The driver depends on data files provided by the atmospheric neutrino flux simulation authors in order to determine the angular and energy dependence for each neutrino species. The position of each flux neutrino [going towards a detector centered at (0,0,0)] is generated uniformly on a plane that is perpendicular to a sphere of radius Rl at the point that is determined by the generated neutrino direction (theta,phi). The size of the area of that plane, where flux neutrinos are generated, is determined by the transverse radius Rt. You can tweak Rl, Rt to match the size of your detector. Initially, neutrino coordinates are generated in a default detector coordinate system (Topocentric Horizontal Coordinate -THZ-): +z: Points towards the local zenith. +x: On same plane as local meridian, pointing south. +y: As needed to make a right-handed coordinate system. origin: detector centre Alternative user-defined topocentric systems can be defined by specifying the appropriate rotation from THZ. The driver allows minimum and maximum energy cuts. Also it provides the options to generate wither unweighted or weighted flux neutrinos (the latter giving smoother distributions at the tails).
Definition at line 60 of file GAtmoFlux.h.
|
virtual |
Definition at line 39 of file GAtmoFlux.cxx.
|
protected |
Definition at line 34 of file GAtmoFlux.cxx.
|
protected |
Definition at line 551 of file GAtmoFlux.cxx.
void GAtmoFlux::AddFluxFile | ( | int | neutrino_pdg, |
string | filename | ||
) |
Definition at line 394 of file GAtmoFlux.cxx.
References genie::pdg::IsAntiNeutrino(), genie::pdg::IsNeutrino(), LOG, pFATAL, and pWARN.
Referenced by GetFlux(), testGetTotalFlux(), and testGetTotalFluxInEnergyRange().
void GAtmoFlux::AddFluxFile | ( | string | filename | ) |
Definition at line 411 of file GAtmoFlux.cxx.
References genie::kPdgAntiNuE, genie::kPdgAntiNuMu, genie::kPdgNuE, genie::kPdgNuMu, LOG, and pFATAL.
|
protected |
Definition at line 336 of file GAtmoFlux.cxx.
|
virtual |
reset state variables based on opt
Implements genie::GFluxI.
Definition at line 239 of file GAtmoFlux.cxx.
|
inline |
Definition at line 81 of file GAtmoFlux.h.
References fgP4.
|
inline |
Definition at line 82 of file GAtmoFlux.h.
References fgP4.
|
protected |
Definition at line 569 of file GAtmoFlux.cxx.
|
protected |
Definition at line 497 of file GAtmoFlux.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 73 of file GAtmoFlux.h.
|
inline |
Definition at line 80 of file GAtmoFlux.h.
References fgP4.
|
inline |
Definition at line 79 of file GAtmoFlux.h.
References fgP4.
|
protectedpure virtual |
Implemented in genie::flux::GBGLRSAtmoFlux, genie::flux::GFLUKAAtmoFlux, and genie::flux::GHAKKMAtmoFlux.
|
inlinevirtual |
declare list of flux neutrinos that can be generated (for init. purposes)
Implements genie::GFluxI.
Definition at line 66 of file GAtmoFlux.h.
References fPdgCList.
void GAtmoFlux::ForceMaxEnergy | ( | double | emax | ) |
Definition at line 233 of file GAtmoFlux.cxx.
Referenced by GetFlux(), testGetTotalFlux(), and testGetTotalFluxInEnergyRange().
void GAtmoFlux::ForceMinEnergy | ( | double | emin | ) |
Definition at line 227 of file GAtmoFlux.cxx.
Referenced by GetFlux(), testGetTotalFlux(), and testGetTotalFluxInEnergyRange().
|
virtual |
generate the next flux neutrino (return false in err)
Implements genie::GFluxI.
Definition at line 49 of file GAtmoFlux.cxx.
|
protected |
Definition at line 71 of file GAtmoFlux.cxx.
References GetFlux(), genie::RandomGen::Instance(), genie::constants::kPi, LOG, genie::utils::print::P4AsShortString(), pINFO, genie::RandomGen::RndFlux(), and genie::utils::print::X4AsString().
|
virtual |
set whether to generate weighted or unweighted neutrinos
Implements genie::GFluxI.
Definition at line 246 of file GAtmoFlux.cxx.
double GAtmoFlux::GetFlux | ( | int | flavour | ) |
Definition at line 711 of file GAtmoFlux.cxx.
Referenced by testGetTotalFlux(), and testGetTotalFluxInEnergyRange().
double GAtmoFlux::GetFlux | ( | int | flavour, |
double | energy | ||
) |
Definition at line 745 of file GAtmoFlux.cxx.
double GAtmoFlux::GetFlux | ( | int | flavour, |
double | energy, | ||
double | costh | ||
) |
Definition at line 774 of file GAtmoFlux.cxx.
double GAtmoFlux::GetFlux | ( | int | flavour, |
double | energy, | ||
double | costh, | ||
double | phi | ||
) |
Definition at line 799 of file GAtmoFlux.cxx.
TH3D * GAtmoFlux::GetFluxHistogram | ( | int | flavour | ) |
Definition at line 628 of file GAtmoFlux.cxx.
double GAtmoFlux::GetFluxSurfaceArea | ( | void | ) |
Definition at line 378 of file GAtmoFlux.cxx.
References genie::constants::kPi.
Referenced by main().
double GAtmoFlux::GetLongitudinalRadius | ( | void | ) |
Definition at line 383 of file GAtmoFlux.cxx.
double GAtmoFlux::GetTotalFlux | ( | void | ) |
Definition at line 640 of file GAtmoFlux.cxx.
Referenced by testGetTotalFlux(), and testGetTotalFluxInEnergyRange().
double GAtmoFlux::GetTotalFluxInEnergyRange | ( | void | ) |
Definition at line 659 of file GAtmoFlux.cxx.
Referenced by main(), and testGetTotalFluxInEnergyRange().
double GAtmoFlux::GetTransverseRadius | ( | void | ) |
Definition at line 388 of file GAtmoFlux.cxx.
|
inlinevirtual |
returns corresponding index for current flux neutrino (e.g. for a flux ntuple returns the current entry number)
Implements genie::GFluxI.
Definition at line 74 of file GAtmoFlux.h.
|
protected |
Definition at line 268 of file GAtmoFlux.cxx.
bool GAtmoFlux::LoadFluxData | ( | void | ) |
Definition at line 438 of file GAtmoFlux.cxx.
References genie::PDGLibrary::Find(), genie::PDGLibrary::Instance(), LOG, pERROR, and pNOTICE.
Referenced by GetFlux(), testGetTotalFlux(), and testGetTotalFluxInEnergyRange().
|
virtual |
declare the max flux neutrino energy that can be generated (for init. purposes)
Implements genie::GFluxI.
Definition at line 44 of file GAtmoFlux.cxx.
|
inlineprotected |
Definition at line 120 of file GAtmoFlux.h.
References fMinEvCut.
|
inlinevirtual |
returns the flux neutrino 4-momentum
Implements genie::GFluxI.
Definition at line 71 of file GAtmoFlux.h.
References fgP4.
long int GAtmoFlux::NFluxNeutrinos | ( | void | ) | const |
Number of flux nu's generated. Not the same as the number of nu's thrown towards the geometry (if there are cuts).
Definition at line 222 of file GAtmoFlux.cxx.
|
inlinevirtual |
returns the flux neutrino pdg code
Implements genie::GFluxI.
Definition at line 69 of file GAtmoFlux.h.
References fgPdgC.
|
inlinevirtual |
returns the flux neutrino 4-position (note: expect SI rather than physical units)
Implements genie::GFluxI.
Definition at line 72 of file GAtmoFlux.h.
References fgX4.
|
protected |
Definition at line 326 of file GAtmoFlux.cxx.
|
protected |
Definition at line 580 of file GAtmoFlux.cxx.
References genie::RandomGen::Instance(), LOG, pDEBUG, pERROR, pINFO, and genie::RandomGen::RndFlux().
void GAtmoFlux::SetRadii | ( | double | Rlongitudinal, |
double | Rtransverse | ||
) |
Definition at line 369 of file GAtmoFlux.cxx.
Referenced by GetFlux().
void GAtmoFlux::SetSpectralIndex | ( | double | index | ) |
Definition at line 251 of file GAtmoFlux.cxx.
References LOG, pNOTICE, and pWARN.
void GAtmoFlux::SetUserCoordSystem | ( | TRotation & | rotation | ) |
Rotation: Topocentric Horizontal -> User-defined Topocentric Coord System.
Definition at line 263 of file GAtmoFlux.cxx.
Referenced by GetFlux().
|
inlinevirtual |
returns the flux neutrino weight (if any)
Implements genie::GFluxI.
Definition at line 70 of file GAtmoFlux.h.
References fWeight.
|
protected |
Definition at line 544 of file GAtmoFlux.cxx.
|
protected |
cos(theta) bins in input flux data files
Definition at line 147 of file GAtmoFlux.h.
Referenced by genie::flux::GHAKKMAtmoFlux::FillFluxHisto(), genie::flux::GHAKKMAtmoFlux::SetBinSizes(), genie::flux::GFLUKAAtmoFlux::SetBinSizes(), and genie::flux::GBGLRSAtmoFlux::SetBinSizes().
|
protected |
energy bins in input flux data files
Definition at line 148 of file GAtmoFlux.h.
Referenced by genie::flux::GHAKKMAtmoFlux::FillFluxHisto(), genie::flux::GHAKKMAtmoFlux::SetBinSizes(), genie::flux::GFLUKAAtmoFlux::SetBinSizes(), and genie::flux::GBGLRSAtmoFlux::SetBinSizes().
|
protected |
input flux file for each neutrino species
Definition at line 157 of file GAtmoFlux.h.
|
protected |
input flux file for each neutrino species
Definition at line 156 of file GAtmoFlux.h.
|
protected |
flux = f(Ev,cos8,phi) for each neutrino species
Definition at line 154 of file GAtmoFlux.h.
|
protected |
generate a weighted or unweighted flux?
Definition at line 149 of file GAtmoFlux.h.
|
protected |
current generated nu 4-momentum
Definition at line 134 of file GAtmoFlux.h.
Referenced by CosTheta(), CosZenith(), Energy(), Enu(), and Momentum().
|
protected |
|
protected |
current generated nu 4-position
Definition at line 135 of file GAtmoFlux.h.
Referenced by Position().
|
protected |
flag to check that initialization is run
Definition at line 151 of file GAtmoFlux.h.
|
protected |
maximum energy (in input flux files)
Definition at line 131 of file GAtmoFlux.h.
Referenced by genie::flux::GHAKKMAtmoFlux::SetBinSizes(), genie::flux::GFLUKAAtmoFlux::SetBinSizes(), and genie::flux::GBGLRSAtmoFlux::SetBinSizes().
|
protected |
user-defined cut: maximum energy
Definition at line 138 of file GAtmoFlux.h.
|
protected |
user-defined cut: minimum energy
Definition at line 139 of file GAtmoFlux.h.
Referenced by MinEnergy().
|
protected |
number of flux neutrinos thrown so far
Definition at line 137 of file GAtmoFlux.h.
|
protected |
number of cos(theta) bins in input flux data files
Definition at line 144 of file GAtmoFlux.h.
Referenced by genie::flux::GHAKKMAtmoFlux::SetBinSizes(), genie::flux::GFLUKAAtmoFlux::SetBinSizes(), and genie::flux::GBGLRSAtmoFlux::SetBinSizes().
|
protected |
number of energy bins in input flux data files
Definition at line 145 of file GAtmoFlux.h.
Referenced by genie::flux::GHAKKMAtmoFlux::SetBinSizes(), genie::flux::GFLUKAAtmoFlux::SetBinSizes(), and genie::flux::GBGLRSAtmoFlux::SetBinSizes().
|
protected |
number of phi bins in input flux data files
Definition at line 143 of file GAtmoFlux.h.
Referenced by genie::flux::GHAKKMAtmoFlux::SetBinSizes(), genie::flux::GFLUKAAtmoFlux::SetBinSizes(), and genie::flux::GBGLRSAtmoFlux::SetBinSizes().
|
protected |
input list of neutrino pdg-codes
Definition at line 132 of file GAtmoFlux.h.
Referenced by FluxParticles().
|
protected |
phi bins in input flux data files
Definition at line 146 of file GAtmoFlux.h.
Referenced by genie::flux::GHAKKMAtmoFlux::FillFluxHisto(), genie::flux::GHAKKMAtmoFlux::SetBinSizes(), genie::flux::GFLUKAAtmoFlux::SetBinSizes(), and genie::flux::GBGLRSAtmoFlux::SetBinSizes().
|
protected |
flux = f(Ev,cos8,phi) for each neutrino species
Definition at line 155 of file GAtmoFlux.h.
Referenced by genie::flux::GHAKKMAtmoFlux::FillFluxHisto(), genie::flux::GFLUKAAtmoFlux::FillFluxHisto(), and genie::flux::GBGLRSAtmoFlux::FillFluxHisto().
|
protected |
defining flux neutrino generation surface: longitudinal radius
Definition at line 140 of file GAtmoFlux.h.
|
protected |
coord. system rotation: THZ -> Topocentric user-defined
Definition at line 142 of file GAtmoFlux.h.
|
protected |
defining flux neutrino generation surface: transverse radius
Definition at line 141 of file GAtmoFlux.h.
|
protected |
power law function used for weighted flux
Definition at line 150 of file GAtmoFlux.h.
|
protected |
flux = f(Ev,cos8,phi) summed over neutrino species
Definition at line 152 of file GAtmoFlux.h.
|
protected |
fFluxSum2D integral
Definition at line 153 of file GAtmoFlux.h.
|
protected |