Skip to content

Commit

Permalink
adapt FlexibleEFTHiggs models to new interface
Browse files Browse the repository at this point in the history
I needed to split the matching condition class into 2 classes,
one for upwards, and one for downwards matching.
  • Loading branch information
Alexander Voigt authored and Alexander Voigt committed Oct 8, 2016
1 parent 63d912d commit f0e3c4f
Show file tree
Hide file tree
Showing 6 changed files with 203 additions and 99 deletions.
38 changes: 21 additions & 17 deletions templates/standard_model_high_scale_spectrum_generator.hpp.in
Expand Up @@ -52,7 +52,8 @@ public:
, high_scale_constraint()
, susy_scale_constraint()
, low_scale_constraint()
, matching()
, matching_up()
, matching_down()
, eft()
, high_scale(0.)
, susy_scale(0.)
Expand All @@ -73,7 +74,8 @@ private:
@ModelName@_high_scale_constraint<T> high_scale_constraint;
@ModelName@_susy_scale_constraint<T> susy_scale_constraint;
standard_model::Standard_model_low_scale_constraint<T> low_scale_constraint;
@ModelName@_standard_model_Matching<T> matching;
@ModelName@_standard_model_Matching_up<T> matching_up;
@ModelName@_standard_model_Matching_down<T> matching_down;
standard_model::StandardModel<T> eft;
double high_scale, susy_scale, low_scale;
};
Expand Down Expand Up @@ -127,24 +129,22 @@ void @ModelName@_spectrum_generator<T>::run(const softsusy::QedQcd& oneset,

const unsigned index = this->settings.get(Spectrum_generator_settings::eft_higgs_index);

matching.set_models(&eft, &model);
matching.set_constraint(&susy_scale_constraint);
matching.set_scale(this->settings.get(Spectrum_generator_settings::eft_matching_scale));
matching.set_loop_order_up(this->settings.get(Spectrum_generator_settings::eft_matching_loop_order_up));
matching.set_loop_order_down(this->settings.get(Spectrum_generator_settings::eft_matching_loop_order_down));
matching.set_higgs_index(index);
matching_up.set_models(&eft, &model);
matching_up.set_constraint(&susy_scale_constraint);
matching_up.set_scale(this->settings.get(Spectrum_generator_settings::eft_matching_scale));
matching_up.set_loop_order(this->settings.get(Spectrum_generator_settings::eft_matching_loop_order_up));
matching_up.set_higgs_index(index);

matching_down.set_models(&model, &eft);
matching_down.set_constraint(&susy_scale_constraint);
matching_down.set_scale(this->settings.get(Spectrum_generator_settings::eft_matching_scale));
matching_down.set_loop_order(this->settings.get(Spectrum_generator_settings::eft_matching_loop_order_down));
matching_down.set_higgs_index(index);

high_scale_constraint.initialize();
susy_scale_constraint.initialize();
low_scale_constraint .initialize();

std::vector<Constraint<T>*> model_constraints(2);
model_constraints[0] = &susy_scale_constraint;
model_constraints[1] = &high_scale_constraint;

std::vector<Constraint<T>*> eft_constraints(1);
eft_constraints[0] = &low_scale_constraint;

@ModelName@_convergence_tester<T> convergence_tester(
&model, this->settings.get(Spectrum_generator_settings::precision));
if (this->settings.get(Spectrum_generator_settings::max_iterations) > 0)
Expand All @@ -163,8 +163,12 @@ void @ModelName@_spectrum_generator<T>::run(const softsusy::QedQcd& oneset,
solver.set_convergence_tester(&convergence_tester);
solver.set_running_precision(&precision);
solver.set_initial_guesser(&initial_guesser);
solver.add_model(&eft, &matching, eft_constraints);
solver.add_model(&model, model_constraints);
solver.add(&low_scale_constraint, &eft);
solver.add(&matching_up, &eft, &model);
solver.add(&susy_scale_constraint, &model);
solver.add(&high_scale_constraint, &model);
solver.add(&susy_scale_constraint, &model);
solver.add(&matching_down, &model, &eft);

high_scale = susy_scale = low_scale = 0.;
this->reached_precision = std::numeric_limits<double>::infinity();
Expand Down
35 changes: 19 additions & 16 deletions templates/standard_model_low_scale_spectrum_generator.hpp.in
Expand Up @@ -50,7 +50,8 @@ public:
, solver()
, susy_scale_constraint()
, low_scale_constraint()
, matching()
, matching_up()
, matching_down()
, eft()
, susy_scale(0.)
, low_scale(0.)
Expand All @@ -69,7 +70,8 @@ private:
RGFlow<T> solver;
@ModelName@_susy_scale_constraint<T> susy_scale_constraint;
standard_model::Standard_model_low_scale_constraint<T> low_scale_constraint;
@ModelName@_standard_model_Matching<T> matching;
@ModelName@_standard_model_Matching_up<T> matching_up;
@ModelName@_standard_model_Matching_down<T> matching_down;
standard_model::StandardModel<T> eft;
double susy_scale, low_scale;
};
Expand Down Expand Up @@ -121,23 +123,22 @@ void @ModelName@_spectrum_generator<T>::run(const softsusy::QedQcd& oneset,

const unsigned index = this->settings.get(Spectrum_generator_settings::eft_higgs_index);

matching.set_models(&eft, &model);
matching.set_constraint(&susy_scale_constraint);
matching.set_scale(this->settings.get(Spectrum_generator_settings::eft_matching_scale));
matching.set_loop_order_up(this->settings.get(Spectrum_generator_settings::eft_matching_loop_order_up));
matching.set_loop_order_down(this->settings.get(Spectrum_generator_settings::eft_matching_loop_order_down));
matching.set_higgs_index(index);
matching_up.set_models(&eft, &model);
matching_up.set_constraint(&susy_scale_constraint);
matching_up.set_scale(this->settings.get(Spectrum_generator_settings::eft_matching_scale));
matching_up.set_loop_order(this->settings.get(Spectrum_generator_settings::eft_matching_loop_order_up));
matching_up.set_higgs_index(index);

matching_down.set_models(&model, &eft);
matching_down.set_constraint(&susy_scale_constraint);
matching_down.set_scale(this->settings.get(Spectrum_generator_settings::eft_matching_scale));
matching_down.set_loop_order(this->settings.get(Spectrum_generator_settings::eft_matching_loop_order_down));
matching_down.set_higgs_index(index);

susy_scale_constraint.initialize();
low_scale_constraint .initialize();


std::vector<Constraint<T>*> model_constraints(1);
model_constraints[0] = &susy_scale_constraint;

std::vector<Constraint<T>*> eft_constraints(1);
eft_constraints[0] = &low_scale_constraint;

@ModelName@_convergence_tester<T> convergence_tester(
&model, this->settings.get(Spectrum_generator_settings::precision));
if (this->settings.get(Spectrum_generator_settings::max_iterations) > 0)
Expand All @@ -154,8 +155,10 @@ void @ModelName@_spectrum_generator<T>::run(const softsusy::QedQcd& oneset,
solver.set_convergence_tester(&convergence_tester);
solver.set_running_precision(&precision);
solver.set_initial_guesser(&initial_guesser);
solver.add_model(&eft, &matching, eft_constraints);
solver.add_model(&model, model_constraints);
solver.add(&low_scale_constraint, &eft);
solver.add(&matching_up, &eft, &model);
solver.add(&susy_scale_constraint, &model);
solver.add(&matching_down, &model, &eft);

susy_scale = low_scale = 0.;
this->reached_precision = std::numeric_limits<double>::infinity();
Expand Down
8 changes: 4 additions & 4 deletions templates/standard_model_two_scale_initial_guesser.cpp.in
Expand Up @@ -229,10 +229,10 @@ void @ModelName@_standard_model_initial_guesser<Two_scale>::guess_model_paramete
eft->calculate_DRbar_masses();

//get gauge and Yukawa couplings from effective theory
@ModelName@_standard_model_Matching<Two_scale> matching;
matching.set_models(eft, model);
matching.set_constraint(&susy_constraint);
matching.match_low_to_high_scale_model_tree_level();
@ModelName@_standard_model_Matching_up<Two_scale> matching_up;
matching_up.set_models(eft, model);
matching_up.set_constraint(&susy_constraint);
matching_up.match_tree_level();

// apply susy-scale first guess
model->run_to(susy_scale_guess, running_precision);
Expand Down
Expand Up @@ -212,10 +212,10 @@ void @ModelName@_standard_model_initial_guesser<Two_scale>::guess_model_paramete
eft->calculate_DRbar_masses();

//get gauge and Yukawa couplings from effective theory
@ModelName@_standard_model_Matching<Two_scale> matching;
matching.set_models(eft, model);
matching.set_constraint(&susy_constraint);
matching.match_low_to_high_scale_model_tree_level();
@ModelName@_standard_model_Matching_up<Two_scale> matching_up;
matching_up.set_models(eft, model);
matching_up.set_constraint(&susy_constraint);
matching_up.match_tree_level();

model->run_to(susy_scale_guess, running_precision);

Expand Down
144 changes: 105 additions & 39 deletions templates/standard_model_two_scale_matching.cpp.in
Expand Up @@ -25,33 +25,32 @@
#include "error.hpp"
#include "two_scale_constraint.hpp"

#define CLASSNAME @ModelName@_standard_model_Matching<Two_scale>

namespace flexiblesusy {

CLASSNAME::@ModelName@_standard_model_Matching()
#define CLASSNAME @ModelName@_standard_model_Matching_up<Two_scale>

CLASSNAME::@ModelName@_standard_model_Matching_up()
: model(0), eft(0), constraint(0), scale(0.)
, loop_order_up(0), loop_order_down(0)
, loop_order(0)
, higgs_idx(0)
{}

CLASSNAME::@ModelName@_standard_model_Matching(
CLASSNAME::@ModelName@_standard_model_Matching_up(
standard_model::StandardModel<Two_scale>* low_,
@ModelName@<Two_scale>* high_,
Constraint<Two_scale>* constraint_,
unsigned loop_order_up_, unsigned loop_order_down_,
unsigned loop_order_,
unsigned higgs_idx_)
: model(high_)
, eft(low_)
, constraint(constraint_)
, scale(0.)
, higgs_idx(higgs_idx_)
{
set_loop_order_up(loop_order_up_);
set_loop_order_down(loop_order_down_);
set_loop_order(loop_order_);
}

CLASSNAME::~@ModelName@_standard_model_Matching()
CLASSNAME::~@ModelName@_standard_model_Matching_up()
{}

double CLASSNAME::get_scale() const
Expand All @@ -71,7 +70,7 @@ void CLASSNAME::set_models(Two_scale_model* low, Two_scale_model* high)
model = cast_model<@ModelName@<Two_scale>*>(high);
}

void CLASSNAME::match_high_to_low_scale_model()
void CLASSNAME::match()
{
if (!model || !eft)
throw SetupError("Model pointer in matching class is NULL!");
Expand All @@ -81,13 +80,13 @@ void CLASSNAME::match_high_to_low_scale_model()
eft->run_to(get_scale());
model->run_to(get_scale());

if (model->get_thresholds() && loop_order_down)
@ModelName@_standard_model_matching::match_high_to_low_scale_model(*eft, *model, loop_order_down, higgs_idx);
if (model->get_thresholds() && loop_order)
@ModelName@_standard_model_matching::match_low_to_high_scale_model(*model, *eft, loop_order);
else
@ModelName@_standard_model_matching::match_high_to_low_scale_model_tree_level(*eft, *model, higgs_idx);
@ModelName@_standard_model_matching::match_low_to_high_scale_model_tree_level(*model, *eft);
}

void CLASSNAME::match_low_to_high_scale_model()
void CLASSNAME::match_tree_level()
{
if (!model || !eft)
throw SetupError("Model pointer in matching class is NULL!");
Expand All @@ -97,13 +96,87 @@ void CLASSNAME::match_low_to_high_scale_model()
eft->run_to(get_scale());
model->run_to(get_scale());

if (model->get_thresholds() && loop_order_up)
@ModelName@_standard_model_matching::match_low_to_high_scale_model(*model, *eft, loop_order_up);
else
@ModelName@_standard_model_matching::match_low_to_high_scale_model_tree_level(*model, *eft);
@ModelName@_standard_model_matching::match_low_to_high_scale_model_tree_level(*model, *eft);
}

unsigned CLASSNAME::get_higgs_index() const
{
return higgs_idx;
}

unsigned CLASSNAME::get_loop_order() const
{
return loop_order;
}

void CLASSNAME::set_higgs_index(unsigned idx)
{
higgs_idx = idx;
}

void CLASSNAME::set_loop_order(unsigned loop_order_)
{
loop_order = loop_order_;
}

void CLASSNAME::set_constraint(Constraint<Two_scale>* constraint_)
{
constraint = constraint_;
}

void CLASSNAME::set_scale(double scale_)
{
scale = scale_;
}

#ifdef CLASSNAME
#undef CLASSNAME
#endif

#define CLASSNAME @ModelName@_standard_model_Matching_down<Two_scale>

CLASSNAME::@ModelName@_standard_model_Matching_down()
: model(0), eft(0), constraint(0), scale(0.)
, loop_order(0)
, higgs_idx(0)
{}

CLASSNAME::@ModelName@_standard_model_Matching_down(
standard_model::StandardModel<Two_scale>* low_,
@ModelName@<Two_scale>* high_,
Constraint<Two_scale>* constraint_,
unsigned loop_order_,
unsigned higgs_idx_)
: model(high_)
, eft(low_)
, constraint(constraint_)
, scale(0.)
, higgs_idx(higgs_idx_)
{
set_loop_order(loop_order_);
}

CLASSNAME::~@ModelName@_standard_model_Matching_down()
{}

double CLASSNAME::get_scale() const
{
if (scale != 0.)
return scale;

if (!constraint)
throw SetupError("Constraint pointer in matching class is NULL!");

return constraint->get_scale();
}

void CLASSNAME::set_models(Two_scale_model* high, Two_scale_model* low)
{
eft = cast_model<standard_model::StandardModel<Two_scale>*>(low);
model = cast_model<@ModelName@<Two_scale>*>(high);
}

void CLASSNAME::match_high_to_low_scale_model_tree_level()
void CLASSNAME::match()
{
if (!model || !eft)
throw SetupError("Model pointer in matching class is NULL!");
Expand All @@ -113,10 +186,13 @@ void CLASSNAME::match_high_to_low_scale_model_tree_level()
eft->run_to(get_scale());
model->run_to(get_scale());

@ModelName@_standard_model_matching::match_high_to_low_scale_model_tree_level(*eft, *model, higgs_idx);
if (model->get_thresholds() && loop_order)
@ModelName@_standard_model_matching::match_high_to_low_scale_model(*eft, *model, loop_order, higgs_idx);
else
@ModelName@_standard_model_matching::match_high_to_low_scale_model_tree_level(*eft, *model, higgs_idx);
}

void CLASSNAME::match_low_to_high_scale_model_tree_level()
void CLASSNAME::match_tree_level()
{
if (!model || !eft)
throw SetupError("Model pointer in matching class is NULL!");
Expand All @@ -126,44 +202,34 @@ void CLASSNAME::match_low_to_high_scale_model_tree_level()
eft->run_to(get_scale());
model->run_to(get_scale());

@ModelName@_standard_model_matching::match_low_to_high_scale_model_tree_level(*model, *eft);
@ModelName@_standard_model_matching::match_high_to_low_scale_model_tree_level(*eft, *model, higgs_idx);
}

unsigned CLASSNAME::get_higgs_index() const
{
return higgs_idx;
}

unsigned CLASSNAME::get_loop_order_up() const
{
return loop_order_up;
}

unsigned CLASSNAME::get_loop_order_down() const
unsigned CLASSNAME::get_loop_order() const
{
return loop_order_down;
return loop_order;
}

void CLASSNAME::set_higgs_index(unsigned idx)
{
higgs_idx = idx;
}

void CLASSNAME::set_loop_order_up(unsigned loop_order_up_)
{
loop_order_up = loop_order_up_;
}

void CLASSNAME::set_loop_order_down(unsigned loop_order_down_)
void CLASSNAME::set_loop_order(unsigned loop_order_)
{
if (loop_order_down_ > 1) {
WARNING("Matching loop order " << loop_order_down_
if (loop_order_ > 1) {
WARNING("Matching loop order " << loop_order_
<< " for downwards matching currently not"
" supported! I'm using 1-loop matching.");
loop_order_down = 1;
loop_order = 1;
}

loop_order_down = loop_order_down_;
loop_order = loop_order_;
}

void CLASSNAME::set_constraint(Constraint<Two_scale>* constraint_)
Expand Down

0 comments on commit f0e3c4f

Please sign in to comment.