Jpp master_rocky-44-g75b7c4f75
the software that should make you happy
Loading...
Searching...
No Matches
JAANET::JAtmosphericNeutrinoFlux Struct Referencefinal

Implementation of atmospheric neutrino flux using official KM3NeT atmospheric flux function. More...

#include <JAtmosphericNeutrinoFlux.hh>

Inheritance diagram for JAANET::JAtmosphericNeutrinoFlux:
JAANET::JOscFlux JLANG::JClonable< JClonable_t, JDerived_t >

Public Types

typedef JClonable< JClonable_t >::clone_type clone_type
 

Public Member Functions

 JAtmosphericNeutrinoFlux (const JOscProbHelper &pOscProb)
 Constructor.
 
 JAtmosphericNeutrinoFlux (const JOscProbInterface &oscProbInterface)
 Constructor.
 
template<class JOscProbFunction_t >
 JAtmosphericNeutrinoFlux (const JOscProbFunction_t &oscProbCalculator)
 Constructor.
 
bool is_valid () const override final
 Check whether this oscillated neutrino flux object is valid.
 
double getFactor (const Evt &evt) const override final
 Get flux for given event.
 
JProperties getProperties (const JEquationParameters &eqpars=JEvtWeightFactor::getEquationParameters()) override final
 Get properties of this class.
 
JProperties getProperties (const JEquationParameters &eqpars=JEvtWeightFactor::getEquationParameters()) const override final
 Get properties of this class.
 
std::istream & read (std::istream &in) override final
 Stream input.
 
virtual clone_type clone () const override
 Get clone of this object.
 

Protected Attributes

JOscProbHelper P
 
JDiffuseFluxHelper F
 

Static Private Attributes

static const JDiffuseFluxHelper pFlux = JDiffuseFluxHelper(JFluxAtmospheric())
 Initialisation of atmospheric neutrino flux function.
 

Detailed Description

Implementation of atmospheric neutrino flux using official KM3NeT atmospheric flux function.


Definition at line 35 of file JAtmosphericNeutrinoFlux.hh.

Member Typedef Documentation

◆ clone_type

template<class JClonable_t , class JDerived_t >
JClonable<JClonable_t>::clone_type JLANG::JClonable< JClonable_t, JDerived_t >::clone_type
inherited

Definition at line 61 of file JClonable.hh.

Constructor & Destructor Documentation

◆ JAtmosphericNeutrinoFlux() [1/3]

JAANET::JAtmosphericNeutrinoFlux::JAtmosphericNeutrinoFlux ( const JOscProbHelper & pOscProb)
inline

Constructor.

Parameters
pOscProbshared pointer to oscillation probability interface

Definition at line 43 of file JAtmosphericNeutrinoFlux.hh.

43 :
44 JOscFlux(pFlux, pOscProb)
45 {}
static const JDiffuseFluxHelper pFlux
Initialisation of atmospheric neutrino flux function.
JOscFlux(const JDiffuseFluxHelper &diffuseFlux, const JOscProbHelper &oscProb)
Constructor.
Definition JOscFlux.hh:51

◆ JAtmosphericNeutrinoFlux() [2/3]

JAANET::JAtmosphericNeutrinoFlux::JAtmosphericNeutrinoFlux ( const JOscProbInterface & oscProbInterface)
inline

Constructor.

Parameters
oscProbInterfaceoscillation probability interface

Definition at line 53 of file JAtmosphericNeutrinoFlux.hh.

53 :
54 JOscFlux(pFlux, oscProbInterface)
55 {}

◆ JAtmosphericNeutrinoFlux() [3/3]

template<class JOscProbFunction_t >
JAANET::JAtmosphericNeutrinoFlux::JAtmosphericNeutrinoFlux ( const JOscProbFunction_t & oscProbCalculator)
inline

Constructor.

The template argument refers to an oscillation probability function object or pointer.

Parameters
oscProbCalculatoroscillation probability calculator

Definition at line 66 of file JAtmosphericNeutrinoFlux.hh.

66 :
68 {}
JOscProbFunction< JFunction_t > make_oscProbFunction(const JFunction_t &function)
Auxiliary method for creating an interface to an oscillation probability function.
JAtmosphericNeutrinoFlux(const JOscProbHelper &pOscProb)
Constructor.

Member Function Documentation

◆ is_valid()

bool JAANET::JOscFlux::is_valid ( ) const
inlinefinaloverrideinherited

Check whether this oscillated neutrino flux object is valid.

Returns
true if valid; else false

Definition at line 63 of file JOscFlux.hh.

64 {
65 return (F && F->is_valid() &&
66 P && P->getParameters().is_valid());
67 }
bool is_valid() const
Check validity of oscillation parameters.
bool is_valid() const
Check whether this event-weight factor is valid.
JOscProbHelper P
Definition JOscFlux.hh:169
JDiffuseFluxHelper F
Definition JOscFlux.hh:170
JOscParameterReferences_t & getParameters() const
Get reference to oscillation parameters interface.

◆ getFactor()

double JAANET::JOscFlux::getFactor ( const Evt & evt) const
inlinefinaloverrideinherited

Get flux for given event.

Note that in this evaluation the zenith-angle is defined
with respect to the line of sight (i.e. a neutrino pointing straight at you
from the center of the Earth has $ cos(\theta) = -1.0 $).

Parameters
evtevent
Returns
flux $ \left[\mathrm{GeV}^{-1} \, \mathrm{m}^{-2} \, \mathrm{sr}^{-1} \, \mathrm{s}^{-1}\right] $

Definition at line 80 of file JOscFlux.hh.

81 {
82 using namespace JPP;
83
84 double flux = 0.0;
85
86 const Trk& neutrino = get_neutrino(evt);
87 const double costh = -neutrino.dir.z;
88
89 const int interactionType = evt.w2list[W2LIST_GSEAGEN_CC];
90
91 if (interactionType == (int) JInteractionTypeGENIE_t::WEAK_CHARGED_CURRENT) {
92
93 for (int i = 0; i != NUMBER_OF_OSCCHANNELS; ++i) {
94
95 const JOscChannel& channel = getOscChannel[i];
96
97 const int inType = ((int) channel.Cparity) * ((int) channel.in);
98 const int outType = ((int) channel.Cparity) * ((int) channel.out);
99
100 if (outType == neutrino.type) {
101
102 flux += ( F.getFlux(inType, log10(neutrino.E), costh) *
103 P.getP (channel, neutrino.E, costh) );
104 }
105 }
106
107 } else if (interactionType == (int) JInteractionTypeGENIE_t::WEAK_NEUTRAL_CURRENT) { // For NC events, the neutrino flavour is irrelevant
108
109 const int Cparity = (int) getChargeParity(neutrino);
110
111 flux += (F.getFlux(Cparity * TRACK_TYPE_NUE, log10(neutrino.E), costh) +
112 F.getFlux(Cparity * TRACK_TYPE_NUMU, log10(neutrino.E), costh) +
113 F.getFlux(Cparity * TRACK_TYPE_NUTAU, log10(neutrino.E), costh));
114 }
115
116 return flux;
117 }
@ WEAK_NEUTRAL_CURRENT
Weak neutral current interaction.
@ WEAK_CHARGED_CURRENT
Weak charged current interaction.
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino.
JChargeParity_t getChargeParity(const int pdgType)
Auxiliary function for retrieving the charge-parity of a given PDG type.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
std::vector< double > w2list
MC: factors that make up w[1]=w2 (see e.g. Tag list or km3net-dataformat/definitions)
Definition Evt.hh:43
double getFlux(const int type, const double log10E, const double costh) const
Get flux for given particle PDG-identifier, energy and zenith-angle.
Neutrino flux.
Definition JHead.hh:906
Neutrino oscillation channel.
JChargeParity_t Cparity
Charge-parity.
JFlavour_t in
Incoming flavour.
JFlavour_t out
Outcoming flavour.
double getP(const JOscChannel &channel, const double energy, const double costh) const
Get oscillation probability corresponding to given oscillation channel, neutrino energy and zenith an...
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
Definition Trk.hh:15
int type
MC: particle type in PDG encoding.
Definition Trk.hh:24
Vec dir
track direction
Definition Trk.hh:18
double E
Energy [GeV] (either MC truth or reconstructed)
Definition Trk.hh:20
double z
Definition Vec.hh:14
static const int W2LIST_GSEAGEN_CC
Charged current interaction flag.

◆ getProperties() [1/2]

JProperties JAANET::JOscFlux::getProperties ( const JEquationParameters & eqpars = JEvtWeightFactor::getEquationParameters())
inlinefinaloverrideinherited

Get properties of this class.

Parameters
eqparsequation parameters

Definition at line 125 of file JOscFlux.hh.

126 {
127 return JOscFluxHelper(*this, eqpars);
128 }

◆ getProperties() [2/2]

JProperties JAANET::JOscFlux::getProperties ( const JEquationParameters & eqpars = JEvtWeightFactor::getEquationParameters()) const
inlinefinaloverrideinherited

Get properties of this class.

Parameters
eqparsequation parameters

Definition at line 136 of file JOscFlux.hh.

137 {
138 return JOscFluxHelper(*this, eqpars);
139 }

◆ read()

std::istream & JAANET::JOscFlux::read ( std::istream & in)
inlinefinaloverrideinherited

Stream input.

Parameters
ininput stream
Returns
input stream

Definition at line 148 of file JOscFlux.hh.

149 {
150 using namespace std;
151 using namespace JPP;
152
153 if (F) {
154 F->read(in);
155 }
156
157 if (P) {
158 in >> P->getParameters();
159 }
160
161 check_validity();
162
163 return in;
164 }

◆ clone()

template<class JClonable_t , class JDerived_t >
virtual clone_type JLANG::JClonable< JClonable_t, JDerived_t >::clone ( ) const
inlineoverridevirtualinherited

Member Data Documentation

◆ pFlux

const JDiffuseFluxHelper JAANET::JAtmosphericNeutrinoFlux::pFlux = JDiffuseFluxHelper(JFluxAtmospheric())
staticprivate

Initialisation of atmospheric neutrino flux function.

Definition at line 73 of file JAtmosphericNeutrinoFlux.hh.

◆ P

JOscProbHelper JAANET::JOscFlux::P
protectedinherited

Definition at line 169 of file JOscFlux.hh.

◆ F

JDiffuseFluxHelper JAANET::JOscFlux::F
protectedinherited

Definition at line 170 of file JOscFlux.hh.


The documentation for this struct was generated from the following file: