Jpp 21.0.0
the software that should make you happy
Loading...
Searching...
No Matches
JAANET::JEvtWeightFactorGSeaGen Class Referencefinal

Implementation of reweighting factor for simulated neutrino interactions according to a specifiable ROOT TFormula. More...

#include <JEvtWeightFactorGSeaGen.hh>

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

Public Types

enum  variables {
  COSTH , TOTAL_ENERGY , NEUTRINO_ENERGY , LEADING_LEPTON_ENERGY ,
  BJORKEN_X , INELASTICITY , INTERACTION_TYPE , CURRENT_TYPE ,
  XSEC , XSEC_MEAN , XSEC_DIFFERENTIAL , XSEC_WATER ,
  INT_LENGTH_WATER , COLUMN_DEPTH , P_EARTH , P_SCALE ,
  TARGET_A , TARGET_Z , NUMBER_OF_VARIABLES
}
 Indices of reweighting variables for GSeaGen. More...
 
typedef JClonable< JClonable_t >::clone_type clone_type
 

Public Member Functions

 JEvtWeightFactorGSeaGen ()
 Default constructor.
 
bool is_valid () const override final
 Check whether this formula is valid.
 
double getFactor (const Evt &evt) const override final
 Get weighting factor for given event.
 
virtual clone_type clone () const override
 Get clone of this object.
 

Detailed Description

Implementation of reweighting factor for simulated neutrino interactions according to a specifiable ROOT TFormula.

Note: The ROOT TFormula may assume any number of parameters, but should be restricted to
the physical variables listed among JEvtWeightFactorGSeaGen::variables.
These variables may be specified within the ROOT TFormula as 'x[<index>]',
where <index> corresponds to the index of the desired physical variable within JEvtWeightFactorGSeaGen::variables.

Definition at line 35 of file JEvtWeightFactorGSeaGen.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.

Member Enumeration Documentation

◆ variables

Indices of reweighting variables for GSeaGen.

Enumerator
COSTH 

Cosine zenith angle.

TOTAL_ENERGY 

Total event energy (neutrino + target)

NEUTRINO_ENERGY 

Initial state neutrino energy.

LEADING_LEPTON_ENERGY 

Final state leading lepton energy.

BJORKEN_X 

Björken-x (= fractional momentum carried by the struck nucleon when evaluated in the Breit reference frame)

INELASTICITY 

Inelasticity (= Björken-y = fractional energy transfer to the nucleus when evaluated in the lab frame)

INTERACTION_TYPE 

Interaction channel type.

CURRENT_TYPE 

Weak current type (CC or NC)

XSEC 

Exclusive total cross-section of the interaction.

XSEC_MEAN 

Average interaction cross-section per nucleon along neutrino path [m2].

XSEC_DIFFERENTIAL 

Differential cross-section of the interaction.

XSEC_WATER 

Inclusive cross-section in water.

INT_LENGTH_WATER 

Interaction length in pure water.

COLUMN_DEPTH 

Column density [m.w.e].

P_EARTH 

Earth transmission probability.

P_SCALE 

GENIE ineraction probability scale.

TARGET_A 

Number of nucleons in the target.

TARGET_Z 

Number of protons in the target.

NUMBER_OF_VARIABLES 

Number of reweighting variables;
N.B. This enum value needs to be specified last!

Definition at line 43 of file JEvtWeightFactorGSeaGen.hh.

43 {
44 COSTH, //!< Cosine zenith angle
45 TOTAL_ENERGY, //!< Total event energy (neutrino + target)
46 NEUTRINO_ENERGY, //!< Initial state neutrino energy
47 LEADING_LEPTON_ENERGY, //!< Final state leading lepton energy
48 BJORKEN_X, //!< Björken-x (= fractional momentum carried by the struck nucleon when evaluated in the Breit reference frame)
49 INELASTICITY, //!< Inelasticity (= Björken-y = fractional energy transfer to the nucleus when evaluated in the lab frame)
50 INTERACTION_TYPE, //!< Interaction channel type
51 CURRENT_TYPE, //!< Weak current type (CC or NC)
52 XSEC, //!< Exclusive total cross-section of the interaction
53 XSEC_MEAN, //!< Average interaction cross-section per nucleon along neutrino path [m2]
54 XSEC_DIFFERENTIAL, //!< Differential cross-section of the interaction
55 XSEC_WATER, //!< Inclusive cross-section in water
56 INT_LENGTH_WATER, //!< Interaction length in pure water
57 COLUMN_DEPTH, //!< Column density [m.w.e]
58 P_EARTH, //!< Earth transmission probability
59 P_SCALE, //!< GENIE ineraction probability scale
60 TARGET_A, //!< Number of nucleons in the target
61 TARGET_Z, //!< Number of protons in the target
62
63 NUMBER_OF_VARIABLES //!< Number of reweighting variables; \n
64 //!< N.B.\ This enum value needs to be specified last!
65 };
@ TARGET_A
Number of nucleons in the target.
@ BJORKEN_X
Björken-x (= fractional momentum carried by the struck nucleon when evaluated in the Breit reference ...
@ INELASTICITY
Inelasticity (= Björken-y = fractional energy transfer to the nucleus when evaluated in the lab frame...
@ XSEC_MEAN
Average interaction cross-section per nucleon along neutrino path [m2].
@ XSEC
Exclusive total cross-section of the interaction.
@ P_EARTH
Earth transmission probability.
@ INT_LENGTH_WATER
Interaction length in pure water.
@ NUMBER_OF_VARIABLES
Number of reweighting variables; N.B. This enum value needs to be specified last!
@ INTERACTION_TYPE
Interaction channel type.
@ TOTAL_ENERGY
Total event energy (neutrino + target)
@ TARGET_Z
Number of protons in the target.
@ LEADING_LEPTON_ENERGY
Final state leading lepton energy.
@ NEUTRINO_ENERGY
Initial state neutrino energy.
@ XSEC_DIFFERENTIAL
Differential cross-section of the interaction.
@ P_SCALE
GENIE ineraction probability scale.
@ CURRENT_TYPE
Weak current type (CC or NC)
@ XSEC_WATER
Inclusive cross-section in water.

Constructor & Destructor Documentation

◆ JEvtWeightFactorGSeaGen()

JAANET::JEvtWeightFactorGSeaGen::JEvtWeightFactorGSeaGen ( )
inline

Default constructor.

Definition at line 71 of file JEvtWeightFactorGSeaGen.hh.

72 {}

Member Function Documentation

◆ is_valid()

bool JAANET::JEvtWeightFactorGSeaGen::is_valid ( ) const
inlinefinaloverride

Check whether this formula is valid.

Returns
true if valid; else false

Definition at line 80 of file JEvtWeightFactorGSeaGen.hh.

81 {
82 const int N = this->GetNdim();
83
84 return N >= 0 && N <= (int) NUMBER_OF_VARIABLES;
85 }

◆ getFactor()

double JAANET::JEvtWeightFactorGSeaGen::getFactor ( const Evt & evt) const
inlinefinaloverride

Get weighting factor for given event.

Parameters
evtevent
Returns
weighting factor

Definition at line 94 of file JEvtWeightFactorGSeaGen.hh.

95 {
96 using namespace std;
97 using namespace JPP;
98
99 Double_t vars[NUMBER_OF_VARIABLES] = { 0.0 };
100
101 const Trk& neutrino = get_neutrino (evt);
102 const Trk& leading_lepton = get_leading_lepton(evt);
103
104 vars[COSTH] = -neutrino.dir.z;
105 vars[TOTAL_ENERGY] = getE0(evt);
106 vars[NEUTRINO_ENERGY] = neutrino.E;
107 vars[LEADING_LEPTON_ENERGY] = leading_lepton.E;
112 vars[XSEC] = evt.w2list[W2LIST_GSEAGEN_XSEC];
122
123 return this->EvalPar(&vars[0]);
124 }
const Trk & get_leading_lepton(const Evt &event)
Auxiliary function to retrieve the leading lepton of a neutrino interaction.
double getE0(const Evt &evt)
Get initial state energy of a neutrino interaction.
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino.
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
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
Definition Trk.hh:15
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_COLUMN_DEPTH
Line integrated column density through the Earth for the neutrino direction.
static const int W2LIST_GSEAGEN_BX
Bjorken x.
static const int W2LIST_GSEAGEN_DXSEC
differential cross section of the interaction (dsigma/dxdy) extracted from genie
static const int W2LIST_GSEAGEN_WATERXSEC
inclusive xsec in water
static const int W2LIST_GSEAGEN_CC
Charged current interaction flag.
static const int W2LIST_GSEAGEN_XSEC_MEAN
Average interaction cross-section per nucleon along the neutrino path throuh the Earth (in units of m...
static const int W2LIST_GSEAGEN_XSEC
exclusive total cross section of the interaction
static const int W2LIST_GSEAGEN_TARGETZ
number of protons in the target
static const int W2LIST_GSEAGEN_P_SCALE
Interaction probability scale.
static const int W2LIST_GSEAGEN_TARGETA
number of nuclons in the target
static const int W2LIST_GSEAGEN_ICHAN
Interaction channel.
static const int W2LIST_GSEAGEN_BY
Bjorken y.
static const int W2LIST_GSEAGEN_WATER_INT_LEN
Interaction length in pure water in m.
static const int W2LIST_GSEAGEN_P_EARTH
Transmission probability in the Earth (XSEC_MEAN and COLUMN_DEPTH used to compute PEarth)

◆ clone()

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

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