solo.cpp
Go to the documentation of this file.
45 if (not Backends::backendInfo().works[str("nulike")+NULIKE_VERSION]) backend_error().raise(LOCAL_INFO, str("nulike ")+NULIKE_VERSION+" is missing!"); 77 throw std::runtime_error("YAML error in "+filename_in+".\n(yaml-cpp error: "+std::string(e.what())+" )"); 82 bool use_lnpiln = settings.getValueOrDef<bool>(false, "use_lognormal_distribution_for_1d_systematic"); 90 throw std::runtime_error("Unrecognised event file format in "+event_filename+"; must be .lhe or .hepmc."); 93 if (debug) cout << "Reading " << (event_file_is_LHEF ? "LHEF" : "HepMC") << " file: " << event_filename << endl; 101 // Initialise the random number generator, using a hardware seed if no seed is given in the input file. 114 getEvent.setOption<str>((event_file_is_LHEF ? "lhef_filename" : "hepmc_filename"), event_filename); 120 getYAMLCrossSection.setOption<double>("cross_section_pb", settings.getValue<double>("cross_section_pb")); 121 if (settings.hasKey("cross_section_fractional_uncert")) { getYAMLCrossSection.setOption<double>("cross_section_fractional_uncert", settings.getValue<double>("cross_section_fractional_uncert")); } 122 else {getYAMLCrossSection.setOption<double>("cross_section_uncert_pb", settings.getValue<double>("cross_section_uncert_pb")); } 126 getYAMLCrossSection.setOption<double>("cross_section_fb", settings.getValue<double>("cross_section_fb")); 127 if (settings.hasKey("cross_section_fractional_uncert")) { getYAMLCrossSection.setOption<double>("cross_section_fractional_uncert", settings.getValue<double>("cross_section_fractional_uncert")); } 128 else { getYAMLCrossSection.setOption<double>("cross_section_uncert_fb", settings.getValue<double>("cross_section_uncert_fb")); } 132 calc_LHC_LogLikes.setOption<int>("covariance_nsamples_start", settings.getValue<int>("covariance_nsamples_start")); 133 calc_LHC_LogLikes.setOption<double>("covariance_marg_convthres_abs", settings.getValue<double>("covariance_marg_convthres_abs")); 134 calc_LHC_LogLikes.setOption<double>("covariance_marg_convthres_rel", settings.getValue<double>("covariance_marg_convthres_rel")); 203 // Retrieve and print the predicted + observed counts and likelihoods for the individual SRs and analyses, as well as the total likelihood. 210 const Gambit::ColliderBit::AnalysisLogLikes& analysis_loglikes = calc_LHC_LogLikes(0).at(analysis_name); 217 summary_line << " Signal region " << srData.sr_label << " (SR index " << sr_index << "):" << endl; 219 summary_line << " SM prediction: " << srData.n_bkg << " +/- " << combined_bg_uncertainty << endl; 220 summary_line << " Signal prediction: " << srData.n_sig_scaled << " +/- " << combined_s_uncertainty << endl; 228 summary_line << " Total log-likelihood for analysis:" << analysis_loglikes.combination_loglike << endl << endl; 234 cout << "Read and analysed " << n_events << " events from " << (event_file_is_LHEF ? "LHE" : "HepMC") << " file." << endl << endl; Rollcall header for ColliderBit module. void calc_combined_LHC_LogLike(double &result) Compute the total likelihood combining all analyses. Definition: LHC_likelihoods.cpp:902 Container for loglike information for an analysis. Definition: ColliderBit_types.hpp:73 std::string combination_sr_label Definition: ColliderBit_types.hpp:78 #define NULIKE_VERSION ColliderBit Solo: an event-based LHC recast tool using the GAMBIT ColliderBit module. Definition: solo.cpp:22 void getLHEvent(HEPUtils::Event &result) A nested function that reads in Les Houches Event files and converts them to HEPUtils::Event format... Definition: getLHEvent.cpp:38 Includes everything needed to use a GAMBIT module as a standalone analysis code. double combination_loglike Definition: ColliderBit_types.hpp:80 void calc_LHC_LogLikes(map_str_AnalysisLogLikes &result) Loop over all analyses and fill a map of AnalysisLogLikes objects. Definition: LHC_likelihoods.cpp:415 void getBuckFastCMS(BaseDetector *&result) Retrieve a BuckFast sim of CMS. Definition: getBuckFast.cpp:70 double n_bkg The number of standard model events expected to pass the selection for this signal region... Definition: AnalysisData.hpp:135 void get_LHC_LogLike_per_analysis(map_str_dbl &result) Extract the combined log likelihood for each analysis. Definition: LHC_likelihoods.cpp:809 std::map< std::string, double > sr_loglikes Definition: ColliderBit_types.hpp:76 A container for the result of an analysis, potentially with many signal regions and correlations... Definition: AnalysisData.hpp:148 void CollectAnalyses(AnalysisDataPointers &result) Loop over all analyses and collect them in one place. Definition: ColliderBit_eventloop.cpp:318 bool hasKey(const args &... keys) const Getters for key/value pairs (which is all the options node should contain) Definition: yaml_options.hpp:67 double n_obs The number of events passing selection for this signal region as reported by the experiment. Definition: AnalysisData.hpp:132 General small utility functions. EXPORT_SYMBOLS bool endsWith(const std::string &str, const std::string &suffix) Checks whether `str' ends with `suffix'. Definition: util_functions.cpp:398 Definition: log_tags.hpp:35 std::string sr_label A label for the particular signal region of the analysis. Definition: AnalysisData.hpp:127 void getBuckFastATLAS(BaseDetector *&result) Retrieve a BuckFast sim of ATLAS. Definition: getBuckFast.cpp:55 void initialise_standalone_logs(str) Logger setup standalone utility function. Definition: standalone_utils.cpp:26 Definition: log_tags.hpp:36 void getYAMLCrossSection(xsec_container &result) A function that reads the total cross-section from the input file, but builds up the number of events... Definition: getxsec.cpp:1272 const Logging::endofmessage EOM Explicit const instance of the end of message struct in Gambit namespace. Definition: logger.hpp:100 void set_log_debug_messages(bool flag) Choose whether "Debug" tagged log messages will be ignored (i.e. not logged) Definition: logmaster.hpp:138 std::string infile("FlavBit/data/example.slha") EXPORT_SYMBOLS Logging::LogMaster & logger() Function to retrieve a reference to the Gambit global log object. Definition: logger.cpp:95 A simple container for the result of one signal region from one analysis. Definition: AnalysisData.hpp:57 TYPE getValueOrDef(TYPE def, const args &... keys) const Definition: yaml_options.hpp:115 void getBuckFastIdentity(BaseDetector *&result) Retrieve an Identity BuckFast sim (no sim) Definition: getBuckFast.cpp:85 double calc_n_sig_scaled_err() const Definition: AnalysisData.hpp:115 void getHepMCEvent(HEPUtils::Event &result) A nested function that reads in HepMC event files and converts them to HEPUtils::Event format... Definition: getHepMCEvent.cpp:59 Concatenation macros. |