Jpp  master_rocky-37-gf0c5bc59d
the software that should make you happy
Public Types | Public Member Functions | List of all members
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 , INITIAL_STATE_ENERGY , NEUTRINO_ENERGY , FINAL_STATE_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. More...
 
bool is_valid () const override final
 Check whether this formula is valid. More...
 
double getFactor (const Evt &evt) const override final
 Get weighting factor for given event. More...
 
virtual clone_type clone () const override
 Get clone of this object. More...
 

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 >
typedef 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.

INITIAL_STATE_ENERGY 

Initial state energy.

NEUTRINO_ENERGY 

Initial state neutrino energy.

FINAL_STATE_ENERGY 

Final state energy.

LEADING_LEPTON_ENERGY 

Final state leading lepton energy.

BJORKEN_X 

Björken-x (= fractional momentum carried by the struck nucleon)

INELASTICITY 

Inelasticity (= Björken-y)

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  INITIAL_STATE_ENERGY, //!< Initial state energy
46  NEUTRINO_ENERGY, //!< Initial state neutrino energy
47  FINAL_STATE_ENERGY, //!< Final state energy
48  LEADING_LEPTON_ENERGY, //!< Final state leading lepton energy
49  BJORKEN_X, //!< Björken-x (= fractional momentum carried by the struck nucleon)
50  INELASTICITY, //!< Inelasticity (= Björken-y)
51  INTERACTION_TYPE, //!< Interaction channel type
52  CURRENT_TYPE, //!< Weak current type (CC or NC)
53  XSEC, //!< Exclusive total cross-section of the interaction
54  XSEC_MEAN, //!< Average interaction cross-section per nucleon along neutrino path [m2]
55  XSEC_DIFFERENTIAL, //!< Differential cross-section of the interaction
56  XSEC_WATER, //!< Inclusive cross-section in water
57  INT_LENGTH_WATER, //!< Interaction length in pure water
58  COLUMN_DEPTH, //!< Column density [m.w.e]
59  P_EARTH, //!< Earth transmission probability
60  P_SCALE, //!< GENIE ineraction probability scale
61  TARGET_A, //!< Number of nucleons in the target
62  TARGET_Z, //!< Number of protons in the target
63 
64  NUMBER_OF_VARIABLES //!< Number of reweighting variables; \n
65  //!< N.B.\ This enum value needs to be specified last!
66  };
@ TARGET_A
Number of nucleons in the target.
@ BJORKEN_X
Björken-x (= fractional momentum carried by the struck nucleon)
@ INELASTICITY
Inelasticity (= Björken-y)
@ XSEC_MEAN
Average interaction cross-section per nucleon along neutrino path [m2].
@ XSEC
Exclusive total cross-section of the interaction.
@ INITIAL_STATE_ENERGY
Initial state energy.
@ 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.
@ 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 72 of file JEvtWeightFactorGSeaGen.hh.

73  {}

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 81 of file JEvtWeightFactorGSeaGen.hh.

82  {
83  const int N = getFormula().GetNpar();
84 
85  return N >= 0 && N <= (int) NUMBER_OF_VARIABLES;
86  }

◆ getFactor()

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

Get weighting factor for given event.

Parameters
evtevent
Returns
weighting factor

Definition at line 95 of file JEvtWeightFactorGSeaGen.hh.

96  {
97  using namespace std;
98  using namespace JPP;
99 
100  Double_t vars[NUMBER_OF_VARIABLES] = { 0.0 };
101 
102  const Trk& neutrino = get_neutrino (evt);
103  const Trk& leading_lepton = get_leading_lepton(evt);
104 
105  vars[COSTH] = neutrino.dir.z;
106  vars[INITIAL_STATE_ENERGY] = getE0(evt);
107  vars[NEUTRINO_ENERGY] = neutrino.E;
108  vars[FINAL_STATE_ENERGY] = getE1(evt);
109  vars[LEADING_LEPTON_ENERGY] = leading_lepton.E;
110  vars[BJORKEN_X] = evt.w2list[W2LIST_GSEAGEN_BX];
114  vars[XSEC] = evt.w2list[W2LIST_GSEAGEN_XSEC];
124 
125  return getFormula().EvalPar(&vars[0]);
126  }
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino.
const Trk & get_leading_lepton(const Evt &event)
Auxiliary function to retrieve the leading lepton of a neutrino interaction.
double getE1(const Evt &evt)
Get final state energy of a neutrino interaction.
double getE0(const Evt &evt)
Get initial state energy of a neutrino interaction.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JSTDTypes.hh:14
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: