499 <<
"------------------------------------" 501 <<
"GenXsecAnalyzer:" 503 <<
"------------------------------------";
506 edm::LogPrint(
"GenXSecAnalyzer") <<
"------------------------------------" 508 <<
"Cross-section summary not available" 510 <<
"------------------------------------";
515 double final_fract_neg_w = 0;
516 double final_fract_neg_w_unc = 0;
522 <<
"-----------------------------------------------------------------------------------------------------------" 523 "--------------------------------------------------------------- \n" 524 <<
"Overall cross-section summary \n" 525 <<
"-----------------------------------------------------------------------------------------------------------" 526 "---------------------------------------------------------------";
527 edm::LogPrint(
"GenXSecAnalyzer") <<
"Process\t\txsec_before [pb]\t\tpassed\tnposw\tnnegw\ttried\tnposw\tnnegw " 528 "\txsec_match [pb]\t\t\taccepted [%]\t event_eff [%]";
531 const unsigned last = sizeOfInfos - 1;
534 double jetmatch_eff = 0;
535 double jetmatch_err = 0;
536 double matching_eff = 1;
537 double matching_efferr = 1;
559 <<
"-------------------------------------------------------------------------------------------------------" 560 "------------------------------------------------------------------- ";
566 final_fract_neg_w_unc =
568 ? final_fract_neg_w * final_fract_neg_w / thisEventEffStat.
numEventsPassed() *
577 edm::LogPrint(
"GenXSecAnalyzer") <<
title[
i] <<
"\t\t" << std::scientific << std::setprecision(3)
587 << (jetmatch_eff * 100) <<
" +/- " << (jetmatch_err * 100) <<
"\t" <<
std::fixed 597 <<
"-----------------------------------------------------------------------------------------------------------" 598 "---------------------------------------------------------------";
600 edm::LogPrint(
"GenXSecAnalyzer") <<
"Before matching: total cross section = " << std::scientific
604 edm::LogPrint(
"GenXSecAnalyzer") <<
"After matching: total cross section = " << std::scientific
608 edm::LogPrint(
"GenXSecAnalyzer") <<
"Matching efficiency = " <<
std::fixed << std::setprecision(1) << matching_eff
609 <<
" +/- " << matching_efferr <<
" [TO BE USED IN MCM]";
612 edm::LogPrint(
"GenXSecAnalyzer") <<
"Before Filter: total cross section = " << std::scientific
617 double hepMCFilter_eff = 1.0;
618 double hepMCFilter_err = 0.0;
622 edm::LogPrint(
"GenXSecAnalyzer") <<
"HepMC filter efficiency (taking into account weights)= " 626 <<
" = " << std::scientific << std::setprecision(3) << hepMCFilter_eff <<
" +- " 629 double hepMCFilter_event_total =
631 double hepMCFilter_event_pass =
633 double hepMCFilter_event_eff = hepMCFilter_event_total > 0 ? hepMCFilter_event_pass / hepMCFilter_event_total : 0;
634 double hepMCFilter_event_err =
635 hepMCFilter_event_total > 0
636 ?
sqrt((1 - hepMCFilter_event_eff) * hepMCFilter_event_eff / hepMCFilter_event_total)
638 edm::LogPrint(
"GenXSecAnalyzer") <<
"HepMC filter efficiency (event-level)= " 639 <<
"(" << hepMCFilter_event_pass <<
")" 641 <<
"(" << hepMCFilter_event_total <<
")" 642 <<
" = " << std::scientific << std::setprecision(3) << hepMCFilter_event_eff
643 <<
" +- " << hepMCFilter_event_err;
651 edm::LogPrint(
"GenXSecAnalyzer") <<
"Filter efficiency (taking into account weights)= " 655 <<
" = " << std::scientific << std::setprecision(3) << filterOnly_eff <<
" +- " 658 double filterOnly_event_total =
660 double filterOnly_event_pass =
662 double filterOnly_event_eff = filterOnly_event_total > 0 ? filterOnly_event_pass / filterOnly_event_total : 0;
663 double filterOnly_event_err = filterOnly_event_total > 0
664 ?
sqrt((1 - filterOnly_event_eff) * filterOnly_event_eff / filterOnly_event_total)
666 edm::LogPrint(
"GenXSecAnalyzer") <<
"Filter efficiency (event-level)= " 667 <<
"(" << filterOnly_event_pass <<
")" 669 <<
"(" << filterOnly_event_total <<
")" 670 <<
" = " << std::scientific << std::setprecision(3) << filterOnly_event_eff
671 <<
" +- " << filterOnly_event_err <<
" [TO BE USED IN MCM]";
676 final_fract_neg_w_unc =
678 ? final_fract_neg_w * final_fract_neg_w / filterOnly_event_pass *
685 edm::LogPrint(
"GenXSecAnalyzer") <<
"\nAfter filter: final cross section = " << std::scientific
688 edm::LogPrint(
"GenXSecAnalyzer") <<
"After filter: final fraction of events with negative weights = " 689 << std::scientific << std::setprecision(3) << final_fract_neg_w <<
" +- " 690 << final_fract_neg_w_unc;
693 double lumi_1M_evts =
694 xsec_.
value() > 0 ? 1e6 * (1 - 2 * final_fract_neg_w) * (1 - 2 * final_fract_neg_w) /
xsec_.
value() / 1
e3 : 0;
695 double lumi_1M_evts_unc =
696 xsec_.
value() > 0 ? (1 - 2 * final_fract_neg_w) * lumi_1M_evts *
697 sqrt(1
e-6 + 16 *
pow(final_fract_neg_w_unc, 2) /
pow(1 - 2 * final_fract_neg_w, 2) +
700 edm::LogPrint(
"GenXSecAnalyzer") <<
"After filter: final equivalent lumi for 1M events (1/fb) = " << std::scientific
701 << 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_