502 <<
"------------------------------------" 504 <<
"GenXsecAnalyzer:" 506 <<
"------------------------------------";
509 edm::LogPrint(
"GenXSecAnalyzer") <<
"------------------------------------" 511 <<
"Cross-section summary not available" 513 <<
"------------------------------------";
518 double final_fract_neg_w = 0;
519 double final_fract_neg_w_unc = 0;
525 <<
"-----------------------------------------------------------------------------------------------------------" 526 "--------------------------------------------------------------- \n" 527 <<
"Overall cross-section summary \n" 528 <<
"-----------------------------------------------------------------------------------------------------------" 529 "---------------------------------------------------------------";
530 edm::LogPrint(
"GenXSecAnalyzer") <<
"Process\t\txsec_before [pb]\t\tpassed\tnposw\tnnegw\ttried\tnposw\tnnegw " 531 "\txsec_match [pb]\t\t\taccepted [%]\t event_eff [%]";
534 const unsigned last = sizeOfInfos - 1;
537 double jetmatch_eff = 0;
538 double jetmatch_err = 0;
539 double matching_eff = 1;
540 double matching_efferr = 1;
562 <<
"-------------------------------------------------------------------------------------------------------" 563 "------------------------------------------------------------------- ";
569 final_fract_neg_w_unc =
571 ? final_fract_neg_w * final_fract_neg_w / thisEventEffStat.
numEventsPassed() *
580 edm::LogPrint(
"GenXSecAnalyzer") <<
title[
i] <<
"\t\t" << std::scientific << std::setprecision(3)
590 << (jetmatch_eff * 100) <<
" +/- " << (jetmatch_err * 100) <<
"\t" <<
std::fixed 600 <<
"-----------------------------------------------------------------------------------------------------------" 601 "---------------------------------------------------------------";
603 edm::LogPrint(
"GenXSecAnalyzer") <<
"Before matching: total cross section = " << std::scientific
607 edm::LogPrint(
"GenXSecAnalyzer") <<
"After matching: total cross section = " << std::scientific
611 edm::LogPrint(
"GenXSecAnalyzer") <<
"Matching efficiency = " <<
std::fixed << std::setprecision(1) << matching_eff
612 <<
" +/- " << matching_efferr <<
" [TO BE USED IN MCM]";
615 edm::LogPrint(
"GenXSecAnalyzer") <<
"Before Filter: total cross section = " << std::scientific
620 double hepMCFilter_eff = 1.0;
621 double hepMCFilter_err = 0.0;
625 edm::LogPrint(
"GenXSecAnalyzer") <<
"HepMC filter efficiency (taking into account weights)= " 629 <<
" = " << std::scientific << std::setprecision(3) << hepMCFilter_eff <<
" +- " 632 double hepMCFilter_event_total =
634 double hepMCFilter_event_pass =
636 double hepMCFilter_event_eff = hepMCFilter_event_total > 0 ? hepMCFilter_event_pass / hepMCFilter_event_total : 0;
637 double hepMCFilter_event_err =
638 hepMCFilter_event_total > 0
639 ?
sqrt((1 - hepMCFilter_event_eff) * hepMCFilter_event_eff / hepMCFilter_event_total)
641 edm::LogPrint(
"GenXSecAnalyzer") <<
"HepMC filter efficiency (event-level)= " 642 <<
"(" << hepMCFilter_event_pass <<
")" 644 <<
"(" << hepMCFilter_event_total <<
")" 645 <<
" = " << std::scientific << std::setprecision(3) << hepMCFilter_event_eff
646 <<
" +- " << hepMCFilter_event_err;
654 edm::LogPrint(
"GenXSecAnalyzer") <<
"Filter efficiency (taking into account weights)= " 658 <<
" = " << std::scientific << std::setprecision(3) << filterOnly_eff <<
" +- " 661 double filterOnly_event_total =
663 double filterOnly_event_pass =
665 double filterOnly_event_eff = filterOnly_event_total > 0 ? filterOnly_event_pass / filterOnly_event_total : 0;
666 double filterOnly_event_err = filterOnly_event_total > 0
667 ?
sqrt((1 - filterOnly_event_eff) * filterOnly_event_eff / filterOnly_event_total)
669 edm::LogPrint(
"GenXSecAnalyzer") <<
"Filter efficiency (event-level)= " 670 <<
"(" << filterOnly_event_pass <<
")" 672 <<
"(" << filterOnly_event_total <<
")" 673 <<
" = " << std::scientific << std::setprecision(3) << filterOnly_event_eff
674 <<
" +- " << filterOnly_event_err <<
" [TO BE USED IN MCM]";
679 final_fract_neg_w_unc =
681 ? final_fract_neg_w * final_fract_neg_w / filterOnly_event_pass *
688 edm::LogPrint(
"GenXSecAnalyzer") <<
"\nAfter filter: final cross section = " << std::scientific
691 edm::LogPrint(
"GenXSecAnalyzer") <<
"After filter: final fraction of events with negative weights = " 692 << std::scientific << std::setprecision(3) << final_fract_neg_w <<
" +- " 693 << final_fract_neg_w_unc;
696 double lumi_1M_evts =
697 xsec_.
value() > 0 ? 1e6 * (1 - 2 * final_fract_neg_w) * (1 - 2 * final_fract_neg_w) /
xsec_.
value() / 1
e3 : 0;
698 double lumi_1M_evts_unc =
699 xsec_.
value() > 0 ? (1 - 2 * final_fract_neg_w) * lumi_1M_evts *
700 sqrt(1
e-6 + 16 *
pow(final_fract_neg_w_unc, 2) /
pow(1 - 2 * final_fract_neg_w, 2) +
703 edm::LogPrint(
"GenXSecAnalyzer") <<
"After filter: final equivalent lumi for 1M events (1/fb) = " << std::scientific
704 << std::setprecision(3) << lumi_1M_evts <<
" +- " << lumi_1M_evts_unc;
std::vector< GenLumiInfoProduct::XSec > xsecBeforeMatching_
std::map< int, GenFilterInfo > jetMatchEffStat_
GenFilterInfo filterOnlyEffStat_
unsigned int numTotalNegativeEvents() const
std::atomic< int > hepidwtup_
double sumWeights2() const
unsigned int numPassNegativeEvents() const
GenLumiInfoProduct::XSec xsec_
unsigned int numTotalPositiveEvents() const
GenFilterInfo hepMCFilterEffStat_
double sumPassWeights() const
Log< level::Warning, true > LogPrint
double filterEfficiency(int idwtup=+3) const
double sumWeights() const
double filterEfficiencyError(int idwtup=+3) const
unsigned int numEventsPassed() const
unsigned int numPassPositiveEvents() const
std::vector< GenLumiInfoProduct::XSec > xsecAfterMatching_
unsigned int numEventsTotal() const
GenLumiInfoProduct::XSec xsecPreFilter_