1 #ifndef __JAANET__JEVTWEIGHTFACTORGSEAGEN__
2 #define __JAANET__JEVTWEIGHTFACTORGSEAGEN__
26 namespace JPP {
using namespace JAANET; }
85 const char* formula) :
87 TFormula(name, formula)
102 if (static_cast<const JFluxHelper&>(*
this)) {
126 return this->DoEval(&vars[0]) * flux;
130 THROW(JNullPointerException,
"JEvtWeightFactorGSeaGen::operator(): Unspecified flux function.");
148 typedef JToken<';'> JToken_t;
156 object.Compile(formula.c_str());
158 for (
int count = 0;
count <
object.GetNpar() && in >> equation; ++
count) {
161 const double value =
getValue(equation, 0);
163 object.SetParameter(index, value);
183 out <<
object.GetExpFormula() <<
';';
185 for (
int i = 0;
i <
object.GetNpar(); ++
i) {
186 out <<
" p" <<
i <<
" = " <<
SCIENTIFIC(6,3) <<
object.GetParameter(
i) <<
';';
static const int W2LIST_GSEAGEN_BX
Bjorken x.
static const int W2LIST_GSEAGEN_P_SCALE
Interaction probability scale.
GENIE ineraction probability scale.
Number of nucleons in the target.
double getValue(const JScale_t scale)
Get numerical value corresponding to scale.
int getParameter(const std::string &text)
Get parameter number from text string.
Interaction channel type.
double getE0(const Evt &evt)
Get initial state energy of a neutrino interaction.
static const int W2LIST_GSEAGEN_XSEC
exclusive total cross section of the interaction
friend std::ostream & operator<<(std::ostream &out, const JEvtWeightFactorGSeaGen &object)
Stream output.
Number of protons in the target.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Interaction length in pure water.
then usage $script< input file >[option] nPossible options count
variables
Indices of reweighting variables for GSeaGen.
friend std::istream & operator>>(std::istream &in, JEvtWeightFactorGSeaGen &object)
Stream input.
static const int W2LIST_GSEAGEN_TARGETZ
number of protons in the target
Exclusive total cross-section of the interaction.
Average interaction cross-section per nucleon along neutrino path [m2].
Number of reweighting variables; N.B. This enum value needs to be specified last! ...
static const int W2LIST_GSEAGEN_TARGETA
number of nuclons in the target
Differential cross-section of the interaction.
JEvtWeightFactorGSeaGen(const JFlux &flux, const char *name, const char *formula)
Constructor.
double getFactor(const Evt &evt) const
Get weight-factor of given event.
static const int W2LIST_GSEAGEN_ICHAN
Interaction channel.
Helper class for event-weight factor.
Björken-x (= fractional momentum carried by the struck nucleon)
Low-level interface for retrieving the flux corresponding to a given event.
then fatal The output file must have the wildcard in the name
JEvtWeightFactorGSeaGen()
Default constructor.
Implementation of reweighting factor for simulated neutrino interactions according to a specifiable R...
static const int W2LIST_GSEAGEN_WATER_INT_LEN
Interaction length in pure water in m.
static const int W2LIST_GSEAGEN_CC
Charged current interaction flag.
static const int W2LIST_GSEAGEN_BY
Bjorken y.
static const int W2LIST_GSEAGEN_P_EARTH
Transmission probability in the Earth (XSEC_MEAN and COLUMN_DEPTH used to compute PEarth) ...
then fatal The output file must have the wildcard in the e g root fi eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
static const int W2LIST_GSEAGEN_WATERXSEC
inclusive xsec in water
Weak current type (CC or NC)
static const int W2LIST_GSEAGEN_COLUMN_DEPTH
Line integrated column density through the Earth for the neutrino direction.
static const int W2LIST_GSEAGEN_DXSEC
differential cross section of the interaction (dsigma/dxdy) extracted from genie
double operator()(const Evt &evt) const
Get weighting factor for given event.
static const int W2LIST_GSEAGEN_XSEC_MEAN
Average interaction cross-section per nucleon along the neutrino path throuh the Earth (in units of m...
Inelasticity (= Björken-y)
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino.
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
Auxiliary data structure for floating point format specification.
Earth transmission probability.
std::vector< double > w2list
MC: factors that make up w[1]=w2 (see e.g. Tag list or km3net-dataformat/definitions) ...
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
Inclusive cross-section in water.