LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
A driver for a power spectrum atmospheric neutrino flux. Elements extensively reused from GAtmoFlux. More...
#include "GPowerSpectrumAtmoFlux.h"
Public Member Functions | |
GPowerSpectrumAtmoFlux () | |
~GPowerSpectrumAtmoFlux () | |
const PDGCodeList & | FluxParticles (void) override |
declare list of flux neutrinos that can be generated (for init. purposes) More... | |
double | MaxEnergy (void) override |
declare the max flux neutrino energy that can be generated (for init. purposes) More... | |
bool | GenerateNext (void) override |
generate the next flux neutrino (return false in err) More... | |
int | PdgCode (void) override |
returns the flux neutrino pdg code More... | |
double | Weight (void) override |
returns the flux neutrino weight (if any) More... | |
const TLorentzVector & | Momentum (void) override |
returns the flux neutrino 4-momentum More... | |
const TLorentzVector & | Position (void) override |
returns the flux neutrino 4-position (note: expect SI rather than physical units) More... | |
bool | End (void) override |
true if no more flux nu's can be thrown (eg reaching end of beam sim ntuples) More... | |
long int | Index (void) override |
returns corresponding index for current flux neutrino (e.g. for a flux ntuple returns the current entry number) More... | |
void | Clear (Option_t *opt) override |
reset state variables based on opt More... | |
void | GenerateWeighted (bool gen_weighted) override |
set whether to generate weighted or unweighted neutrinos More... | |
double | MinEnergy (void) |
void | SetSpectralIndex (double index) |
void | SetUserCoordSystem (TRotation &rotation) |
void | SetRadii (double Rlongitudinal, double Rtransverse) |
void | SetFlavors (std::vector< int > flavors) |
void | SetMinEnergy (double Emin) |
void | SetMaxEnergy (double Emax) |
long int | NFluxNeutrinos (void) const |
void | ResetNFluxNeutrinos (void) |
void | AddFluxFile (int neutrino_pdg, string filename) |
bool | LoadFluxData (void) |
double | GetFlux (int flavour, double energy, double costh, double phi) |
double | ComputeWeight (int flavour, double energy, double costh, double phi) |
void | InitializeWeight () |
Private Member Functions | |
bool | FillFluxHisto (int nu_pdg, string filename) |
void | AddAllFluxes (void) |
TH3D * | CreateNormalisedFluxHisto (TH3D *hist) |
void | ResetSelection (void) |
void | Initialize (void) |
void | CleanUp (void) |
Private Attributes | |
PDGCodeList * | fPdgCList |
input list of neutrino pdg-codes More... | |
double | fMaxEvCut |
user-defined cut: maximum energy More... | |
double | fMinEvCut |
user-defined cut: minimum energy 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... | |
double | fSpectralIndex |
power law function More... | |
double | fRl |
defining flux neutrino generation surface: longitudinal radius More... | |
double | fRt |
defining flux neutrino generation surface: transverse radius More... | |
double | fGlobalGenWeight |
global generation weight to apply to all events More... | |
double | fAgen |
current generation area More... | |
TRotation | fRotTHz2User |
coord. system rotation: THZ -> Topocentric user-defined More... | |
long int | fNNeutrinos |
number of flux neutrinos thrown so far More... | |
vector< int > | fFluxFlavour |
input flux file for each neutrino species More... | |
vector< string > | fFluxFile |
input flux file for each neutrino species More... | |
map< int, TH3D * > | fRawFluxHistoMap |
flux = f(Ev,cos8,phi) for each neutrino species More... | |
map< int, TH2D * > | fRawFluxHistoMap2D |
flux = f(Ev,cos8) for each neutrino species More... | |
A driver for a power spectrum atmospheric neutrino flux. Elements extensively reused from GAtmoFlux.
December 16, 2022
Definition at line 28 of file GPowerSpectrumAtmoFlux.h.
GPowerSpectrumAtmoFlux::GPowerSpectrumAtmoFlux | ( | ) |
Definition at line 27 of file GPowerSpectrumAtmoFlux.cxx.
References Initialize().
GPowerSpectrumAtmoFlux::~GPowerSpectrumAtmoFlux | ( | ) |
Definition at line 36 of file GPowerSpectrumAtmoFlux.cxx.
|
private |
void GPowerSpectrumAtmoFlux::AddFluxFile | ( | int | neutrino_pdg, |
string | filename | ||
) |
Definition at line 402 of file GPowerSpectrumAtmoFlux.cxx.
References f, fFluxFile, and fFluxFlavour.
Referenced by evgb::GENIEHelper::InitializeFluxDriver().
|
private |
Definition at line 339 of file GPowerSpectrumAtmoFlux.cxx.
References fPdgCList.
|
override |
reset state variables based on opt
Definition at line 245 of file GPowerSpectrumAtmoFlux.cxx.
References ResetNFluxNeutrinos().
double GPowerSpectrumAtmoFlux::ComputeWeight | ( | int | flavour, |
double | energy, | ||
double | costh, | ||
double | phi | ||
) |
Definition at line 492 of file GPowerSpectrumAtmoFlux.cxx.
References fAgen, fGlobalGenWeight, fSpectralIndex, and GetFlux().
Referenced by GenerateNext().
|
private |
|
override |
true if no more flux nu's can be thrown (eg reaching end of beam sim ntuples)
Definition at line 224 of file GPowerSpectrumAtmoFlux.cxx.
|
private |
Definition at line 372 of file GPowerSpectrumAtmoFlux.cxx.
References f, fRawFluxHistoMap, fRawFluxHistoMap2D, and h2.
Referenced by LoadFluxData().
|
override |
declare list of flux neutrinos that can be generated (for init. purposes)
Definition at line 44 of file GPowerSpectrumAtmoFlux.cxx.
References fPdgCList.
|
override |
generate the next flux neutrino (return false in err)
Definition at line 65 of file GPowerSpectrumAtmoFlux.cxx.
References ComputeWeight(), fgP4, fgPdgC, fgX4, fNNeutrinos, fPdgCList, fRl, fRotTHz2User, fRt, fSpectralIndex, fWeight, MaxEnergy(), MinEnergy(), ResetSelection(), weight, x, y, and z.
|
override |
set whether to generate weighted or unweighted neutrinos
Definition at line 253 of file GPowerSpectrumAtmoFlux.cxx.
double GPowerSpectrumAtmoFlux::GetFlux | ( | int | flavour, |
double | energy, | ||
double | costh, | ||
double | phi | ||
) |
Definition at line 468 of file GPowerSpectrumAtmoFlux.cxx.
References fRawFluxHistoMap, fRawFluxHistoMap2D, and h2.
Referenced by ComputeWeight().
|
override |
returns corresponding index for current flux neutrino (e.g. for a flux ntuple returns the current entry number)
Definition at line 231 of file GPowerSpectrumAtmoFlux.cxx.
|
private |
Definition at line 284 of file GPowerSpectrumAtmoFlux.cxx.
References fAgen, fMaxEvCut, fMinEvCut, fNNeutrinos, fPdgCList, fRl, fRotTHz2User, fRt, fSpectralIndex, InitializeWeight(), and ResetSelection().
void GPowerSpectrumAtmoFlux::InitializeWeight | ( | ) |
Definition at line 501 of file GPowerSpectrumAtmoFlux.cxx.
References fGlobalGenWeight, fMaxEvCut, fMinEvCut, and fSpectralIndex.
Referenced by Initialize(), SetMaxEnergy(), SetMinEnergy(), and SetSpectralIndex().
bool GPowerSpectrumAtmoFlux::LoadFluxData | ( | void | ) |
Definition at line 421 of file GPowerSpectrumAtmoFlux.cxx.
References fFluxFile, fFluxFlavour, FillFluxHisto(), fPdgCList, fRawFluxHistoMap, and n.
Referenced by evgb::GENIEHelper::InitializeFluxDriver().
|
override |
declare the max flux neutrino energy that can be generated (for init. purposes)
Definition at line 51 of file GPowerSpectrumAtmoFlux.cxx.
References fMaxEvCut.
Referenced by GenerateNext().
double GPowerSpectrumAtmoFlux::MinEnergy | ( | void | ) |
Definition at line 58 of file GPowerSpectrumAtmoFlux.cxx.
References fMinEvCut.
Referenced by GenerateNext().
|
override |
returns the flux neutrino 4-momentum
Definition at line 210 of file GPowerSpectrumAtmoFlux.cxx.
References fgP4.
long int GPowerSpectrumAtmoFlux::NFluxNeutrinos | ( | void | ) | const |
Definition at line 365 of file GPowerSpectrumAtmoFlux.cxx.
References fNNeutrinos.
|
override |
returns the flux neutrino pdg code
Definition at line 196 of file GPowerSpectrumAtmoFlux.cxx.
References fgPdgC.
|
override |
returns the flux neutrino 4-position (note: expect SI rather than physical units)
Definition at line 217 of file GPowerSpectrumAtmoFlux.cxx.
References fgX4.
void GPowerSpectrumAtmoFlux::ResetNFluxNeutrinos | ( | void | ) |
Definition at line 238 of file GPowerSpectrumAtmoFlux.cxx.
References fNNeutrinos.
Referenced by Clear().
|
private |
Definition at line 184 of file GPowerSpectrumAtmoFlux.cxx.
References fgP4, fgPdgC, fgX4, and fWeight.
Referenced by GenerateNext(), and Initialize().
void GPowerSpectrumAtmoFlux::SetFlavors | ( | std::vector< int > | flavors | ) |
Definition at line 329 of file GPowerSpectrumAtmoFlux.cxx.
References fPdgCList.
Referenced by evgb::GENIEHelper::InitializeFluxDriver().
void GPowerSpectrumAtmoFlux::SetMaxEnergy | ( | double | Emax | ) |
Definition at line 358 of file GPowerSpectrumAtmoFlux.cxx.
References fMaxEvCut, and InitializeWeight().
Referenced by evgb::GENIEHelper::InitializeFluxDriver().
void GPowerSpectrumAtmoFlux::SetMinEnergy | ( | double | Emin | ) |
Definition at line 348 of file GPowerSpectrumAtmoFlux.cxx.
References fMinEvCut, and InitializeWeight().
Referenced by evgb::GENIEHelper::InitializeFluxDriver().
void GPowerSpectrumAtmoFlux::SetRadii | ( | double | Rlongitudinal, |
double | Rtransverse | ||
) |
Definition at line 316 of file GPowerSpectrumAtmoFlux.cxx.
References fAgen, fRl, and fRt.
Referenced by evgb::GENIEHelper::InitializeFluxDriver().
void GPowerSpectrumAtmoFlux::SetSpectralIndex | ( | double | index | ) |
Definition at line 263 of file GPowerSpectrumAtmoFlux.cxx.
References fSpectralIndex, and InitializeWeight().
Referenced by evgb::GENIEHelper::InitializeFluxDriver().
void GPowerSpectrumAtmoFlux::SetUserCoordSystem | ( | TRotation & | rotation | ) |
Definition at line 277 of file GPowerSpectrumAtmoFlux.cxx.
References fRotTHz2User.
Referenced by evgb::GENIEHelper::InitializeFluxDriver().
|
override |
returns the flux neutrino weight (if any)
Definition at line 203 of file GPowerSpectrumAtmoFlux.cxx.
References fWeight.
|
private |
current generation area
Definition at line 74 of file GPowerSpectrumAtmoFlux.h.
Referenced by ComputeWeight(), Initialize(), and SetRadii().
|
private |
input flux file for each neutrino species
Definition at line 78 of file GPowerSpectrumAtmoFlux.h.
Referenced by AddFluxFile(), and LoadFluxData().
|
private |
input flux file for each neutrino species
Definition at line 77 of file GPowerSpectrumAtmoFlux.h.
Referenced by AddFluxFile(), and LoadFluxData().
|
private |
global generation weight to apply to all events
Definition at line 73 of file GPowerSpectrumAtmoFlux.h.
Referenced by ComputeWeight(), and InitializeWeight().
|
private |
current generated nu 4-momentum
Definition at line 67 of file GPowerSpectrumAtmoFlux.h.
Referenced by GenerateNext(), Momentum(), and ResetSelection().
|
private |
current generated nu pdg-code
Definition at line 66 of file GPowerSpectrumAtmoFlux.h.
Referenced by GenerateNext(), PdgCode(), and ResetSelection().
|
private |
current generated nu 4-position
Definition at line 68 of file GPowerSpectrumAtmoFlux.h.
Referenced by GenerateNext(), Position(), and ResetSelection().
|
private |
user-defined cut: maximum energy
Definition at line 64 of file GPowerSpectrumAtmoFlux.h.
Referenced by Initialize(), InitializeWeight(), MaxEnergy(), and SetMaxEnergy().
|
private |
user-defined cut: minimum energy
Definition at line 65 of file GPowerSpectrumAtmoFlux.h.
Referenced by Initialize(), InitializeWeight(), MinEnergy(), and SetMinEnergy().
|
private |
number of flux neutrinos thrown so far
Definition at line 76 of file GPowerSpectrumAtmoFlux.h.
Referenced by GenerateNext(), Initialize(), NFluxNeutrinos(), and ResetNFluxNeutrinos().
|
private |
input list of neutrino pdg-codes
Definition at line 63 of file GPowerSpectrumAtmoFlux.h.
Referenced by CleanUp(), FluxParticles(), GenerateNext(), Initialize(), LoadFluxData(), and SetFlavors().
|
private |
flux = f(Ev,cos8,phi) for each neutrino species
Definition at line 79 of file GPowerSpectrumAtmoFlux.h.
Referenced by FillFluxHisto(), GetFlux(), and LoadFluxData().
|
private |
flux = f(Ev,cos8) for each neutrino species
Definition at line 80 of file GPowerSpectrumAtmoFlux.h.
Referenced by FillFluxHisto(), and GetFlux().
|
private |
defining flux neutrino generation surface: longitudinal radius
Definition at line 71 of file GPowerSpectrumAtmoFlux.h.
Referenced by GenerateNext(), Initialize(), and SetRadii().
|
private |
coord. system rotation: THZ -> Topocentric user-defined
Definition at line 75 of file GPowerSpectrumAtmoFlux.h.
Referenced by GenerateNext(), Initialize(), and SetUserCoordSystem().
|
private |
defining flux neutrino generation surface: transverse radius
Definition at line 72 of file GPowerSpectrumAtmoFlux.h.
Referenced by GenerateNext(), Initialize(), and SetRadii().
|
private |
power law function
Definition at line 70 of file GPowerSpectrumAtmoFlux.h.
Referenced by ComputeWeight(), GenerateNext(), Initialize(), InitializeWeight(), and SetSpectralIndex().
|
private |
current generated nu weight
Definition at line 69 of file GPowerSpectrumAtmoFlux.h.
Referenced by GenerateNext(), ResetSelection(), and Weight().