505 <<
"------------------------------------"
507 <<
"GenXsecAnalyzer:"
509 <<
"------------------------------------";
512 edm::LogPrint(
"GenXSecAnalyzer") <<
"------------------------------------"
514 <<
"Cross-section summary not available"
516 <<
"------------------------------------";
521 double final_fract_neg_w = 0;
522 double final_fract_neg_w_unc = 0;
528 <<
"-----------------------------------------------------------------------------------------------------------"
529 "--------------------------------------------------------------- \n"
530 <<
"Overall cross-section summary \n"
531 <<
"-----------------------------------------------------------------------------------------------------------"
532 "---------------------------------------------------------------";
533 edm::LogPrint(
"GenXSecAnalyzer") <<
"Process\t\txsec_before [pb]\t\tpassed\tnposw\tnnegw\ttried\tnposw\tnnegw "
534 "\txsec_match [pb]\t\t\taccepted [%]\t event_eff [%]";
537 const unsigned last = sizeOfInfos - 1;
540 double jetmatch_eff = 0;
541 double jetmatch_err = 0;
542 double matching_eff = 1;
543 double matching_efferr = 1;
565 <<
"-------------------------------------------------------------------------------------------------------"
566 "------------------------------------------------------------------- ";
572 final_fract_neg_w_unc =
574 ? final_fract_neg_w * final_fract_neg_w / thisEventEffStat.
numEventsPassed() *
580 title[
i] = Form(
"%d", i);
583 edm::LogPrint(
"GenXSecAnalyzer") << title[
i] <<
"\t\t" << std::scientific << std::setprecision(3)
593 << (jetmatch_eff * 100) <<
" +/- " << (jetmatch_err * 100) <<
"\t" << std::fixed
603 <<
"-----------------------------------------------------------------------------------------------------------"
604 "---------------------------------------------------------------";
606 edm::LogPrint(
"GenXSecAnalyzer") <<
"Before matching: total cross section = " << std::scientific
610 edm::LogPrint(
"GenXSecAnalyzer") <<
"After matching: total cross section = " << std::scientific
614 edm::LogPrint(
"GenXSecAnalyzer") <<
"Matching efficiency = " << std::fixed << std::setprecision(1) << matching_eff
615 <<
" +/- " << matching_efferr <<
" [TO BE USED IN MCM]";
618 edm::LogPrint(
"GenXSecAnalyzer") <<
"Before Filter: total cross section = " << std::scientific
623 double hepMCFilter_eff = 1.0;
624 double hepMCFilter_err = 0.0;
628 edm::LogPrint(
"GenXSecAnalyzer") <<
"HepMC filter efficiency (taking into account weights)= "
632 <<
" = " << std::scientific << std::setprecision(3) << hepMCFilter_eff <<
" +- "
635 double hepMCFilter_event_total =
637 double hepMCFilter_event_pass =
639 double hepMCFilter_event_eff = hepMCFilter_event_total > 0 ? hepMCFilter_event_pass / hepMCFilter_event_total : 0;
640 double hepMCFilter_event_err =
641 hepMCFilter_event_total > 0
642 ?
sqrt((1 - hepMCFilter_event_eff) * hepMCFilter_event_eff / hepMCFilter_event_total)
644 edm::LogPrint(
"GenXSecAnalyzer") <<
"HepMC filter efficiency (event-level)= "
645 <<
"(" << hepMCFilter_event_pass <<
")"
647 <<
"(" << hepMCFilter_event_total <<
")"
648 <<
" = " << std::scientific << std::setprecision(3) << hepMCFilter_event_eff
649 <<
" +- " << hepMCFilter_event_err;
657 edm::LogPrint(
"GenXSecAnalyzer") <<
"Filter efficiency (taking into account weights)= "
661 <<
" = " << std::scientific << std::setprecision(3) << filterOnly_eff <<
" +- "
664 double filterOnly_event_total =
666 double filterOnly_event_pass =
668 double filterOnly_event_eff = filterOnly_event_total > 0 ? filterOnly_event_pass / filterOnly_event_total : 0;
669 double filterOnly_event_err = filterOnly_event_total > 0
670 ?
sqrt((1 - filterOnly_event_eff) * filterOnly_event_eff / filterOnly_event_total)
672 edm::LogPrint(
"GenXSecAnalyzer") <<
"Filter efficiency (event-level)= "
673 <<
"(" << filterOnly_event_pass <<
")"
675 <<
"(" << filterOnly_event_total <<
")"
676 <<
" = " << std::scientific << std::setprecision(3) << filterOnly_event_eff
677 <<
" +- " << filterOnly_event_err <<
" [TO BE USED IN MCM]";
682 final_fract_neg_w_unc =
684 ? final_fract_neg_w * final_fract_neg_w / filterOnly_event_pass *
691 edm::LogPrint(
"GenXSecAnalyzer") <<
"\nAfter filter: final cross section = " << std::scientific
694 edm::LogPrint(
"GenXSecAnalyzer") <<
"After filter: final fraction of events with negative weights = "
695 << std::scientific << std::setprecision(3) << final_fract_neg_w <<
" +- "
696 << final_fract_neg_w_unc;
699 double lumi_1M_evts =
700 xsec_.
value() > 0 ? 1e6 * (1 - 2 * final_fract_neg_w) * (1 - 2 * final_fract_neg_w) /
xsec_.
value() / 1e3 : 0;
701 double lumi_1M_evts_unc =
702 xsec_.
value() > 0 ? (1 - 2 * final_fract_neg_w) * lumi_1M_evts *
703 sqrt(1
e-6 + 16 *
pow(final_fract_neg_w_unc, 2) /
pow(1 - 2 * final_fract_neg_w, 2) +
706 edm::LogPrint(
"GenXSecAnalyzer") <<
"After filter: final equivalent lumi for 1M events (1/fb) = " << std::scientific
707 << std::setprecision(3) << lumi_1M_evts <<
" +- " << lumi_1M_evts_unc;
std::vector< GenLumiInfoProduct::XSec > xsecBeforeMatching_
std::map< int, GenFilterInfo > jetMatchEffStat_
unsigned int numTotalPositiveEvents() const
double filterEfficiency(int idwtup=+3) const
GenFilterInfo filterOnlyEffStat_
std::atomic< int > hepidwtup_
GenLumiInfoProduct::XSec xsec_
GenFilterInfo hepMCFilterEffStat_
double sumPassWeights() const
unsigned int numEventsPassed() const
unsigned int numTotalNegativeEvents() const
Log< level::Warning, true > LogPrint
unsigned int numEventsTotal() const
double filterEfficiencyError(int idwtup=+3) const
unsigned int numPassPositiveEvents() const
double sumWeights2() const
std::vector< GenLumiInfoProduct::XSec > xsecAfterMatching_
double sumWeights() const
Power< A, B >::type pow(const A &a, const B &b)
GenLumiInfoProduct::XSec xsecPreFilter_
unsigned int numPassNegativeEvents() const