1#ifndef __JAANET__JEVTWEIGHTFACTORMEFFRATIO__
2#define __JAANET__JEVTWEIGHTFACTORMEFFRATIO__
67 public JClonable<JEvtWeightFactor, JEvtWeightFactorMeffRatio>
90 hMeff (
"",
"default"),
100 for (Int_t i = 1; i <=
pMeff->GetNbinsX(); ++i) {
101 pMeff->SetBinContent(i, 1.0);
104 pMeff->SetDirectory(0);
158 pMeff->SetDirectory(0);
185 pMeff->SetDirectory(0);
278 const double x2)
const
280 const double M1 =
pMeff->Interpolate(x1);
281 const double M2 =
pMeff->Interpolate(x2);
298 const double X = log10(E0);
314 const double E0 =
getE0(event);
329 const double X = log10(Enu);
362 const double X = log10(Evis);
395 const double EvisLL)
const
436 const double EvisLL)
const
474 return (this->*
mfp)(evt);
506 std::istream&
read(std::istream& in)
override final
513 if (getFileStatus(is.str().c_str())) {
547 template<
class JEvtWeightFactorMeffRatio_t>
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
I/O formatting auxiliaries.
Utility class to parse parameter values.
#define gmake_property(A)
macros to convert (template) parameter to JPropertiesElement object
Auxiliary class to define a range between two values.
Utility class to parse parameter values.
double getVolume() const
Get volume.
Auxiliary class to handle file name, ROOT directory and object name.
TString getObjectName() const
Get object name.
const std::string & getFilename() const
Get file name.
bool is_valid() const
Check validity.
Simple data structure to support I/O of equations (see class JLANG::JEquation).
Exception for opening of file.
Exception for null pointer operation.
Wrapper class around STL stringstream class to facilitate optional loading of data from file.
void load()
Load data from file with name corresponding to current contents.
Exception for accessing a value in a collection that is outside of its range.
Extensions to Evt data format.
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).
const JCylinder3D getMaximumContainmentVolume()
Forward function declarations.
double getVisibleEnergy(const Trk &, const JCylinder3D &)
Get the visible energy of a track.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
Auxiliary class for I/O of effective mass ratio factor.
JEvtWeightFactorMeffRatioHelper(JEvtWeightFactorMeffRatio_t &factor, const JEquationParameters &eqpars)
Constructor.
Implementation of reweighting factor for effective mass ratios.
double(JEvtWeightFactorMeffRatio::*) pFunction(const Evt &) const
Type definition of pointer to member function for calculating effective mass ratios.
void configure()
Configure effective mass ratio factor.
JRootObjectID hMeff
Effective mass histogram OID.
double getMeffRatio2(const Evt &event) const
Get effective mass ratio based on a scaling of the primary neutrino energy.
JProperties getProperties(const JEquationParameters &eqpars=JEvtWeightFactor::getEquationParameters()) override final
Get properties of this class.
std::istream & read(std::istream &in) override final
Read event-weight factor from input.
bool is_valid() const override final
Check if this effective mass ratio weight factor is valid.
JCylinder3D fiducialVolume
Fiducial volume (for visible energy computation)
JMeffRatioOption
Indices of options for calculating effective mass ratios.
@ ENERGY_INITIAL_STATE
Compute effective mass ratio based on scaling of the initial state energy.
@ EVIS
Compute effective mass ratio based on scaling of the total visible energy.
@ NUMBER_OF_OPTIONS
N.B.: This enum value needs to be specified last!
@ EVIS_HADRONIC_CONTR
Compute effective mass ratio based on scaling of the visible energy contribution of the hadronic show...
@ ENERGY_NEUTRINO
Compute effective mass ratio based on scaling of theprimary neutrino energy.
@ EVIS_LEADING_LEPTON_CONTR
Compute effective mass ratio based on scaling of the visible energy contribution of the leading lepto...
JCylinder3D getFiducialVolume() const
Retrieve fiducial volume.
JEvtWeightFactorMeffRatio(const JRootObjectID &objectID, const JMeffRatioOption option, const double ratio, const JRange_t &range, const bool logE, const JCylinder3D &fiducialVolume)
Constructor.
double getMeffRatio4(const Evt &event) const
Get effective mass ratio based on a scaling of the leading leptonic contribution to the total visible...
double getMeffRatio2(const double Enu) const
Get effective mass ratio based on a scaling of the primary neutrino energy.
double getFactor(const Evt &evt) const override final
Get weighting factor for given event.
JEvtWeightFactorMeffRatio(const JEvtWeightFactorMeffRatio &factor)
Copy constructor.
bool logE
Toggle logarithmic abscissa.
double getMeffRatio3(const Evt &event) const
Get effective mass ratio based on a scaling of the total visible energy.
int option
Effective mass ratio option.
double getMeffRatio1(const double E0) const
Get effective mass ratio based on a scaling of the initial state energy.
double getMeffRatio5(const Evt &event) const
Get effective mass ratio based on a scaling of the hadronic contribution to the total visible energy.
double getMeffRatio(const double x1, const double x2) const
Get effective mass ratio based on a scaling of the initial state energy.
void setFiducialVolume(const JCylinder3D &fiducialVolume)
Set fiducial volume.
const double MeffMin
Minimum effective mass.
JRange_t range
Applicable range.
std::unique_ptr< TH1 > pMeff
Unique pointer to effective mass ratio histogram.
JRange< double > JRange_t
JEvtWeightFactorMeffRatio()
Default constructor.
double getMeffRatio5(const double Evis, const double EvisLL) const
Get effective mass ratio based on a scaling of the hadronic contribution to the total visible energy.
double getMeffRatio4(const double Evis, const double EvisLL) const
Get effective mass ratio based on a scaling of the leading leptonic contribution to the total visible...
double getMeffRatio3(const double Evis) const
Get effective mass ratio based on a scaling of the total visible energy.
const TH1 & getHistogram() const
Retrieve effective mass histogram.
double ratio
Abscissa ratio.
JProperties getProperties(const JEquationParameters &eqpars=JEvtWeightFactor::getEquationParameters()) const override final
Get properties of this class.
pFunction mfp
Pointer to member method for calculating effective mass ratios.
double getMeffRatio1(const Evt &event) const
Get effective mass ratio based on a scaling of the initial state energy.
static const char *const getTypeKey()
Get type keyword.
static JEquationParameters & getEquationParameters()
Get equation parameters.
Template class for object cloning.
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.