Skip to content

Commit

Permalink
adding min_logL switch
Browse files Browse the repository at this point in the history
  • Loading branch information
bjfar committed Jun 8, 2016
2 parents 95d53c4 + fa2fcfd commit 445671f
Show file tree
Hide file tree
Showing 66 changed files with 1,276 additions and 311 deletions.
7 changes: 7 additions & 0 deletions Backends/include/gambit/Backends/backend_info.hpp
Expand Up @@ -98,6 +98,13 @@ namespace Gambit
/// Get the default version of a BOSSed backend.
str default_version(const str& be) const;

/// Get all versions of a given backend that are successfully loaded.
std::vector<str> working_versions(const str&);

/// Get all safe versions of a given backend that are successfully loaded.
std::vector<str> working_safe_versions(const str&);


private:

/// Map from backend names to maps between version and safe version
Expand Down
16 changes: 8 additions & 8 deletions Backends/include/gambit/Backends/backend_types/HiggsBounds.hpp
Expand Up @@ -66,15 +66,15 @@ namespace Gambit
double BR_hjhihi[3][3];

// Charged Higgs Parameters
double MHplus;
double deltaMHplus;
double HpGammaTot;
double CS_lep_HpjHmi_ratio;
double MHplus[1];
double deltaMHplus[1];
double HpGammaTot[1];
double CS_lep_HpjHmi_ratio[1];
double BR_tWpb;
double BR_tHpjb;
double BR_Hpjcs;
double BR_Hpjcb;
double BR_Hptaunu;
double BR_tHpjb[1];
double BR_Hpjcs[1];
double BR_Hpjcb[1];
double BR_Hptaunu[1];
};


Expand Down
2 changes: 1 addition & 1 deletion Backends/include/gambit/Backends/frontends/HiggsBounds.hpp
Expand Up @@ -32,7 +32,7 @@ LOAD_LIBRARY
* (e.g. "LibFirst_initialize_capability") */

BE_FUNCTION(initialize_HiggsBounds_int, void, (int&, int&, int&), "initialize_higgsbounds_int_", "initialize_HiggsBounds_int")
BE_FUNCTION(run_HiggsBounds_classic, void, (double&, int&, double&, int&), "run_higgsbounds_classic_", "run_HiggsBounds_classic")
BE_FUNCTION(run_HiggsBounds_classic, void, (int&, int&, double&, int&), "run_higgsbounds_classic_", "run_HiggsBounds_classic")
BE_FUNCTION(finish_HiggsBounds, void, (), "finish_higgsbounds_", "finish_HiggsBounds")
BE_FUNCTION(HiggsBounds_set_mass_uncertainties, void, (double*, double*), "higgsbounds_set_mass_uncertainties_", "HiggsBounds_set_mass_uncertainties")

Expand Down
35 changes: 35 additions & 0 deletions Backends/src/backend_info.cpp
Expand Up @@ -204,6 +204,41 @@ namespace Gambit
return default_versions.at(be);
}

/// Get all versions of a given backend that are successfully loaded.
std::vector<str> Backends::backend_info::working_versions(const str& be)
{
std::vector<str> working_versions;
// Retrieve the versions known of the given backend.
if (safe_version_map.find(be) == safe_version_map.end())
{
std::ostringstream msg;
msg << "The backend \"" << be << "\" is not known to GAMBIT.";
backend_error().raise(LOCAL_INFO, msg.str());
}
std::map<str,str> versions = safe_version_map[be].second;
// Iterate over all known versions of the given backend, retaining only those that work.
for (auto it = versions.begin(); it != versions.end(); ++it)
{
if (works.at(be + it->first)) working_versions.push_back(it->first);
}
return working_versions;
}


/// Get all safe versions of a given backend that are successfully loaded.
std::vector<str> Backends::backend_info::working_safe_versions(const str& be)
{
// Get the working versions, then iterate over them and convert them to safe versions.
std::vector<str> safe_versions;
const std::vector<str> versions = working_versions(be);
for (auto it = versions.begin(); it != versions.end(); ++it)
{
safe_versions.push_back(safe_version_from_version(be, *it));
}
return safe_versions;
}


}


Expand Down
24 changes: 20 additions & 4 deletions Backends/src/frontends/HiggsSignals.cpp
Expand Up @@ -17,6 +17,7 @@
/// *********************************************

#include "gambit/Backends/frontend_macros.hpp"
#include "gambit/Backends/backend_singleton.hpp"
#include "gambit/Backends/frontends/HiggsSignals.hpp"
#include "gambit/Utils/file_lock.hpp"

Expand All @@ -30,15 +31,30 @@ BE_INI_FUNCTION
int nHplus = 1; // number of charged higgses
int pdf = 2; // choose which pdf style to use for Higgs lineshape; 2 = Gaussian
// Initialize HiggsSignals. Do this one-by-one for each MPI process with
// locks, as HS writes files here then reads them back in later (crazy).
Utils::FileLock mylock("HiggsSignals_" STRINGIFY(SAFE_VERSION) "_init");
mylock.get_lock();
// locks, as HS calls HB, which writes files then reads them back in later (crazy).
// Note that this is the Higgs*Bounds* lock, as in the HiggsBounds ini function,
// because we need to make sure that neither this function nor the HB ini function
// run at the same time, beccause both of them cause the HiggsBounds files to be
// written.

// Find all the versions of HiggsBounds that have been successfully loaded, and get
// their locks.
std::vector<str> hbversions = Backends::backendInfo().working_safe_versions("HiggsBounds");
std::vector<Utils::FileLock> mylocks;
for (auto it = hbversions.begin(); it != hbversions.end(); ++it)
{
mylocks.emplace_back("HiggsBounds_" + *it + "_init");
mylocks.back().get_lock();
}
{
// initialize HiggsSignals with the latest results and set pdf shape
initialize_HiggsSignals_latestresults(nHneut,nHplus);
setup_pdf(pdf);
}
mylock.release_lock();
for (auto it = mylocks.begin(); it != mylocks.end(); ++it)
{
it->release_lock();
}
scan_level = false;
}

Expand Down
13 changes: 7 additions & 6 deletions CMSSM.yaml
Expand Up @@ -65,13 +65,13 @@ Scanner:
multinest:
plugin: MultiNest
like: LogLike
nlive: 20000
tol: 0.0001
nlive: 4000
tol: 0.5

de:
plugin: Diver
like: LogLike
NP: 2000
NP: 5000
verbosity: 1

ObsLikes:
Expand Down Expand Up @@ -342,8 +342,8 @@ Rules:
function: FH_A0_decays
- capability: Higgs_decay_rates
function: FH_MSSM_h0_1_decays
- capability: Hplus_decay_rates
function: FH_Hplus_decays
- capability: H_plus_decay_rates
function: FH_H_plus_decays
- capability: h0_2_decay_rates
function: FH_h0_2_decays
- capability: t_decay_rates
Expand Down Expand Up @@ -454,7 +454,8 @@ Rules:
"PartonLevel:FSR = on",
"HadronLevel:all = on",
"SUSY:all = on",
"TauDecays:mode = 0"]
"TauDecays:mode = 0",
"TimeShower:pTmin = 20"]

- capability: LHC_Combined_LogLike
backends:
Expand Down
Expand Up @@ -461,7 +461,7 @@ START_MODULE
(double*, double*, double*, double*,
double*, double*, double*, double*))
BACKEND_REQ(HiggsBounds_set_mass_uncertainties, (libhiggsbounds), void, (double*, double*))
BACKEND_REQ(run_HiggsBounds_classic, (libhiggsbounds), void, (double&, int&, double&, int&))
BACKEND_REQ(run_HiggsBounds_classic, (libhiggsbounds), void, (int&, int&, double&, int&))
BACKEND_REQ(HB_calc_stats, (libhiggsbounds), void, (double&, double&, double&, int&))
BACKEND_OPTION( (HiggsBounds, 4.2.1), (libhiggsbounds) )
#undef FUNCTION
Expand Down
@@ -1,7 +1,14 @@
#ifndef AbsoluteIsolation_h
#define AbsoluteIsolation_h

/** \class AbsoluteIsolation
#include "classes/DelphesModule.h"

class TObjArray;

class ExRootFilter;
class AbsoluteIsolationClassifier;

/** \brief AbsoluteIsolation Delphes module
*
* Sums transverse momenta of isolation objects (tracks, calorimeter towers, etc)
* within a DeltaR cone around a candidate and calculates fraction of this sum
Expand All @@ -15,14 +22,6 @@
* \author P. Demin - UCL, Louvain-la-Neuve
*
*/

#include "classes/DelphesModule.h"

class TObjArray;

class ExRootFilter;
class AbsoluteIsolationClassifier;

class AbsoluteIsolation: public DelphesModule
{
public:
Expand Down
@@ -1,5 +1,5 @@

/** \class
/** \file
*
* Lists classes to be included in cint dicitonary
*
Expand Down
@@ -1,7 +1,17 @@
#ifndef BTaggingWithTruth_h
#define BTaggingWithTruth_h

/** \class BTaggingWithTruth
#include "classes/DelphesModule.h"

#include <map>

class TObjArray;
class DelphesFormula;

class ExRootFilter;
class BTaggingWithTruthPartonClassifier;

/** \brief BTaggingWithTruth Delphes Module
*
* Determines origin of jet,
* applies b-tagging efficiency (miss identification rate) formulas
Expand All @@ -15,16 +25,6 @@
*
*/

#include "classes/DelphesModule.h"

#include <map>

class TObjArray;
class DelphesFormula;

class ExRootFilter;
class BTaggingWithTruthPartonClassifier;

class BTaggingWithTruth: public DelphesModule
{
public:
Expand Down
@@ -1,5 +1,5 @@

/** \class
/** \file
*
* Lists classes to be included in cint dicitonary
*
Expand Down
Expand Up @@ -37,6 +37,7 @@ namespace Gambit {

/// @name Event detection simulation
//@{
/// Perform the detector simulation on the next collider event by reference.
virtual void processEvent(const EventIn&, EventOut&) const = 0;
//@}

Expand Down
22 changes: 14 additions & 8 deletions ColliderBit/include/gambit/ColliderBit/detectors/BuckFastSmear.hpp
Expand Up @@ -5,13 +5,19 @@
namespace Gambit {
namespace ColliderBit {

/// A base class for BuckFast simple smearing simulations within ColliderBit.
struct BuckFastBase : BaseDetector<Pythia8::Event, HEPUtils::Event> {
/// @name Event detection simulation.
//@{
bool partonOnly;
double antiktR;
bool partonOnly; ///< Chooses between parton only and full event conversion.
double antiktR; ///< The jet radius used for the anti-kt jet clustering.
/// A converter for a Pythia8::Event which considers all final state particles.
/// @note Also performs the jet clustering algorithm.
void convertPythia8ParticleEvent(const EventInType&, EventOutType&) const;
/// A converter for a Pythia8::Event which considers only partonic final states.
/// @note Also performs the jet clustering algorithm.
void convertPythia8PartonEvent(const EventInType&, EventOutType&) const;
/// Perform the BuckFast simple smearing on the next collider event by reference.
virtual void processEvent(const EventInType&, EventOutType&) const = 0;
//@}

Expand All @@ -23,16 +29,16 @@ namespace Gambit {

/// @name (Re-)Initialization functions
//@{
/// @brief Settings parsing and initialization for any sub-class.
/// Settings parsing and initialization for any sub-class.
virtual void init(const std::vector<std::string>&) { };
/// @brief General init for any collider of this type - no settings version.
/// General init for any collider of this type - no settings version.
virtual void init() { };
/// @brief Settings parsing and initialization for sub-classes with parton and jet radius settings only.
/// Settings parsing and initialization for sub-classes with parton and jet radius settings only.
void init(bool parton, double R) { partonOnly=parton; antiktR=R; };
//@}
};

/// @brief Simple ATLAS smearing functions as a detector pseudo-simulation.
/// Simple ATLAS smearing functions as a detector pseudo-simulation.
struct BuckFastSmearATLAS : BuckFastBase {
/// @name Event detection simulation.
//@{
Expand All @@ -46,7 +52,7 @@ namespace Gambit {
//@}
};

/// @brief Simple CMS smearing functions as a detector pseudo-simulation.
/// Simple CMS smearing functions as a detector pseudo-simulation.
struct BuckFastSmearCMS : BuckFastBase {
/// @name Event detection simulation.
//@{
Expand All @@ -60,7 +66,7 @@ namespace Gambit {
//@}
};

/// @brief Simple smearing functions as a detector pseudo-simulation.
/// Simple smearing functions as a detector pseudo-simulation.
struct BuckFastIdentity : BuckFastBase {
/// @name Event detection simulation.
//@{
Expand Down
Expand Up @@ -13,13 +13,11 @@ namespace Gambit {
class DelphesVanillaImpl;


/// @note Abstract base class Delphes_ToHEPUtilsBase
/// A class for Delphes detector simulations within ColliderBit.
class DelphesVanilla : public BaseDetector<Pythia8::Event, HEPUtils::Event> {
protected:

/// @name Member variable abstraction via a forward-declared type
/// @note Abstraction means that external types are hidden cf. the PIMPL idiom
DelphesVanillaImpl* _impl;
DelphesVanillaImpl* _impl; ///< Member variable abstraction via a forward-declared type.

public:

Expand Down
26 changes: 14 additions & 12 deletions ColliderBit/include/gambit/ColliderBit/lep_mssm_xsecs.hpp
Expand Up @@ -10,23 +10,25 @@
/// S. Dawson, E. Eichten and C. Quigg, Phys. Rev. D31 (1985) 1581
/// A. Bartl, H. Fraas, W. Majerotto, Z. Phys. C34 (1987) 411
///
/// The Bartl, Fraas and Majerotto (BFM) papers are based on a convention for the neutralino decomposed
/// into photino, zino and two higgsinos a and b:
/// \tilde\chi_i^0 = N_{i1} \tilde\gamma + N_{i2} \tilde Z + N_{i3} \tilde H_a + N_{i4} \tilde H_b
/// where \tilde H_a = \tilde H_1^0 \sin\beta - \tilde H_2^0 \cos\beta
/// and \tilde H_b = \tilde H_1^0 \cos\beta + \tilde H_2^0 \sin\beta
/// The Bartl, Fraas and Majerotto (BFM) papers are based on a convention for
/// the neutralino decomposed into photino, zino and two higgsinos a and b:
/// \f$\tilde\chi_i^0 = N_{i1} \tilde\gamma + N_{i2} \tilde Z + N_{i3} \tilde H_a + N_{i4} \tilde H_b\f$
/// where \f$\tilde H_a = \tilde H_1^0 \sin\beta - \tilde H_2^0 \cos\beta\f$
/// and \f$\tilde H_b = \tilde H_1^0 \cos\beta + \tilde H_2^0 \sin\beta\f$
///
/// This corresponds to the conventions for N' in Haber & Kane (HK). Haber & Kane in turn have similar
/// conventions to Gunion & Haber which is used in SLHA, however, \tan\beta is upside down in HK.
/// This corresponds to the conventions for N' in Haber & Kane (HK).
/// Haber & Kane in turn have similar conventions to Gunion & Haber which is used
/// in SLHA, however, \f$\tan\beta\f$ is upside down in HK.
/// A conversion routine SLHA2BFM_NN from SLHA to these conventions is included.
///
/// For the charginos a convention similar to HK is followed, which has almost the same mixing matrices
/// V and U as in SLHA, however, BFM uses \sigma_3 V as the mixing matrix for negative charged states.
/// HK refines this to be dependent on the mass matrix determinant so as to always get positive masses.
/// For the charginos a convention similar to HK is followed, which has almost
/// the same mixing matrices V and U as in SLHA, however, BFM uses \f$\sigma_3 V\f$
/// as the mixing matrix for negative charged states. HK refines this to be
/// dependent on the mass matrix determinant so as to always get positive masses.
/// For conversion from SLHA to BFM use SLHA2BFM_VV.
///
/// For sleptons the SLHA convention is followed. Thus F_{11}=\cos\phi, F_{12}=\sin\phi, etc.
/// For \phi = 0 we have ~l_1 = ~l_L and ~l_2 = ~l_R.
/// For sleptons the SLHA convention is followed. Thus \f$F_{11}=\cos\phi\f$, \f$F_{12}=\sin\phi\f$, etc.
/// For \f$\phi = 0\f$ we have \f$\tilde l_1 = \tilde l_L\f$ and \f$\tilde l_2 = \tilde l_R\f$.
///
/// *********************************************
///
Expand Down
Expand Up @@ -43,7 +43,7 @@ namespace Gambit {
};


/// @brief A class to contain the limit data from ALEPH_PLB526_2002_206, figure 3a.
/// @brief A class to contain the limit data from ALEPH_PLB526_2002_206, figure 3c.
class ALEPHStauLimitAt208GeV : public BaseLimitContainer {
/// @name Point interpolation, conversion, and region checks
//@{
Expand Down

0 comments on commit 445671f

Please sign in to comment.