26int main(
int argc,
char **argv)
52 catch(
const exception& error) {
53 FATAL(error.what() << endl);
61 const bool logE = properties.
getValue<
bool>(
"logE");
62 const int option = properties.
getValue<
int> (
"option");
66 const int Nbins = hTE.GetNbinsX();
68 if (option != (
int) JEvtWeightFactorTriggerEfficiencyRatio::EVIS_LEADING_LEPTON_CONTR &&
69 option != (
int) JEvtWeightFactorTriggerEfficiencyRatio::EVIS_HADRONIC_CONTR) {
74 case (
int) JEvtWeightFactorTriggerEfficiencyRatio::ENERGY_INITIAL_STATE :
75 mfp = &JEvtWeightFactorTriggerEfficiencyRatio::getTriggerEfficiencyRatio1;
77 case (
int) JEvtWeightFactorTriggerEfficiencyRatio::ENERGY_NEUTRINO:
78 mfp = &JEvtWeightFactorTriggerEfficiencyRatio::getTriggerEfficiencyRatio2;
80 case (
int) JEvtWeightFactorTriggerEfficiencyRatio::EVIS:
81 mfp = &JEvtWeightFactorTriggerEfficiencyRatio::getTriggerEfficiencyRatio3;
84 FATAL(
"Invalid 1D option " << option);
88 g.SetName(hTE.GetName());
90 for (Int_t i = 0; i < Nbins; ++i) {
92 const double x = hTE.GetBinCenter(i+1);
93 const double y = (factor.*mfp)(logE ? pow(10.0, x) : x);
98 WARNING(
"Trigger efficiency ratio not finite for x = " <<
SCIENTIFIC(10,3) << x << endl);
109 case (
int) JEvtWeightFactorTriggerEfficiencyRatio::EVIS_LEADING_LEPTON_CONTR:
110 mfp = &JEvtWeightFactorTriggerEfficiencyRatio::getTriggerEfficiencyRatio4;
112 case (
int) JEvtWeightFactorTriggerEfficiencyRatio::EVIS_HADRONIC_CONTR:
113 mfp = &JEvtWeightFactorTriggerEfficiencyRatio::getTriggerEfficiencyRatio5;
116 FATAL(
"Invalid 2D option " << option);
119 const Int_t N = Nbins * Nbins * (Nbins + 1) / 2;
122 g.SetName(hTE.GetName());
126 for (Int_t i = 0; i < Nbins; ++i) {
128 const double x = hTE.GetBinCenter(i+1);
130 for (Int_t j = 0; j < i; ++j, ++k) {
132 const double y = hTE.GetBinCenter(j+1);
133 const double z = (logE ?
134 (factor.*mfp)(pow(10.0, x), pow(10.0, y)) :
135 (factor.*mfp)(x, y));
137 g.SetPoint(k, x, y, z);