1#ifndef __JAANET__JEVTWEIGHTFACTORTRIGGEREFFICIENCYRATIO__ 
    2#define __JAANET__JEVTWEIGHTFACTORTRIGGEREFFICIENCYRATIO__ 
   70    public JClonable<JEvtWeightFactor, JEvtWeightFactorTriggerEfficiencyRatio>
 
  102      for (Int_t i = 1; i <= 
pTE->GetNbinsX(); ++i) {
 
  103        pTE->SetBinContent(i, 1.0);
 
  106      pTE->SetDirectory(0);
 
 
  156      pTE.reset((TH1*) factor.
pTE->Clone());
 
  158      pTE->SetDirectory(0);
 
 
  185          pTE->SetDirectory(0);
 
 
  280      const Int_t    Nbins = 
pTE->GetNbinsX();
 
  285      const Int_t    i0 = max(1, min(Nbins, 
pTE->FindBin(X)));
 
  287      const Double_t x0 = 
pTE->GetBinCenter (i0);
 
  288      const Double_t y0 = 
pTE->GetBinContent(i0);
 
  290      const Int_t    i1 = max(2, min(Nbins-1, (x > x0 ? i0+1 : i0-1)));
 
  292      const Double_t x1 = 
pTE->GetBinCenter (i1);
 
  293      const Double_t y1 = 
pTE->GetBinContent(i1);
 
  295      return max(0.0, y0 + (x-x0) * (y1-y0)/(x1-x0));
 
 
  307                                            const double x2)
 const 
  309      static const double Xmin = -3.0; 
 
  315        X1 = x1 > 0.0 ? log10(x1) : Xmin;
 
  316        X2 = x2 > 0.0 ? log10(x2) : Xmin;
 
  322      return M2 > 0.0 ? M1/M2 : 1.0;
 
 
  346      const double E0 = 
getE0(event);
 
 
  417                                             const double EvisLL)
 const 
 
  452                                             const double EvisLL)
 const 
 
  484      return (this->*
mfp)(evt);
 
 
  516    std::istream& 
read(std::istream& in) 
override final 
  523      if (getFileStatus(is.str().c_str())) {
 
 
  557      template<
class JEvtWeightFactorTriggerEfficiencyRatio_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.
 
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 getVisibleEnergyLeadingLepton(const Trk &, const JCylinder3D &)
 
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 trigger efficiency ratio factor.
 
JEvtWeightFactorTriggerEfficiencyRatioHelper(JEvtWeightFactorTriggerEfficiencyRatio_t &factor, const JEquationParameters &eqpars)
Constructor.
 
Implementation of reweighting factor for trigger efficiency ratios.
 
JRootObjectID hTE
Trigger efficiency histogram OID.
 
JTriggerEfficiencyRatioOption
Indices of options for calculating trigger efficiency ratios.
 
@ EVIS_HADRONIC_CONTR
Compute trigger efficiency ratio based on scaling of the visible energy contribution of the hadronic ...
 
@ ENERGY_NEUTRINO
Compute trigger efficiency ratio based on scaling of theprimary neutrino energy.
 
@ EVIS
Compute trigger efficiency ratio based on scaling of the total visible energy.
 
@ EVIS_LEADING_LEPTON_CONTR
Compute trigger efficiency ratio based on scaling of the visible energy contribution of the leading l...
 
@ ENERGY_INITIAL_STATE
Compute trigger efficiency ratio based on scaling of the initial state energy.
 
@ NUMBER_OF_OPTIONS
N.B.: This enum value needs to be specified last!
 
double getTriggerEfficiencyRatio5(const Evt &event) const
Get trigger efficiency ratio based on a scaling of the hadronic contribution to the total visible ene...
 
int option
Trigger efficiency ratio option.
 
double getFactor(const Evt &evt) const override final
Get weighting factor for given event.
 
JEvtWeightFactorTriggerEfficiencyRatio()
Default constructor.
 
void setFiducialVolume(const JCylinder3D &fiducialVolume)
Set fiducial volume.
 
double getTriggerEfficiencyRatio1(const Evt &event) const
Get trigger efficiency ratio based on a scaling of the initial state energy.
 
JEvtWeightFactorTriggerEfficiencyRatio(const JRootObjectID &objectID, const JTriggerEfficiencyRatioOption option, const double ratio, const JRange_t &range, const bool logE, const JCylinder3D &fiducialVolume)
Constructor.
 
JProperties getProperties(const JEquationParameters &eqpars=JEvtWeightFactor::getEquationParameters()) override final
Get properties of this class.
 
JRange_t range
Applicable range.
 
pFunction mfp
Pointer to member method for calculating trigger efficiency ratios.
 
double getTriggerEfficiencyRatio(const double x1, const double x2) const
Get trigger efficiency ratio based on a scaling of the initial state energy.
 
bool is_valid() const override final
Check if this trigger efficiency ratio weight factor is valid.
 
JProperties getProperties(const JEquationParameters &eqpars=JEvtWeightFactor::getEquationParameters()) const override final
Get properties of this class.
 
void configure()
Configure trigger efficiency ratio factor.
 
double ratio
Abscissa ratio.
 
JCylinder3D fiducialVolume
Fiducial volume (for visible energy computation)
 
double getTriggerEfficiencyRatio3(const Evt &event) const
Get trigger efficiency ratio based on a scaling of the total visible energy.
 
bool logE
Toggle logarithmic abscissa.
 
double getTriggerEfficiencyRatio2(const double Enu) const
Get trigger efficiency ratio based on a scaling of the primary neutrino energy.
 
double getTriggerEfficiencyRatio4(const Evt &event) const
Get trigger efficiency ratio based on a scaling of the leading leptonic contribution to the total vis...
 
JCylinder3D getFiducialVolume() const
Retrieve fiducial volume.
 
double getTriggerEfficiencyRatio3(const double Evis) const
Get trigger efficiency ratio based on a scaling of the total visible energy.
 
std::istream & read(std::istream &in) override final
Read event-weight factor from input.
 
double getTriggerEfficiencyRatio5(const double Evis, const double EvisLL) const
Get trigger efficiency ratio based on a scaling of the hadronic contribution to the total visible ene...
 
JEvtWeightFactorTriggerEfficiencyRatio(const JEvtWeightFactorTriggerEfficiencyRatio &factor)
Copy constructor.
 
double(JEvtWeightFactorTriggerEfficiencyRatio::*) pFunction(const Evt &) const
Type definition of pointer to member function for calculating trigger efficiency ratios.
 
double interpolate(const double x) const
Perform linear inter- or extrapolation of trigger efficiency for given abscissa value.
 
double getTriggerEfficiencyRatio1(const double E0) const
Get trigger efficiency ratio based on a scaling of the initial state energy.
 
double getTriggerEfficiencyRatio4(const double Evis, const double EvisLL) const
Get trigger efficiency ratio based on a scaling of the leading leptonic contribution to the total vis...
 
JRange< double > JRange_t
 
double getTriggerEfficiencyRatio2(const Evt &event) const
Get trigger efficiency ratio based on a scaling of the primary neutrino energy.
 
const TH1 & getHistogram() const
Retrieve trigger efficiency histogram.
 
std::unique_ptr< TH1 > pTE
Unique pointer to trigger efficiency ratio histogram.
 
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.