Skip to content

Commit

Permalink
Added config parameters and their default values.
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-kaspar committed Jan 24, 2018
1 parent 049c52c commit c150b08
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
22 changes: 22 additions & 0 deletions config.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ struct Config
double cut4_a, cut4_c, cut4_si;

bool cut1_apply;
bool cut2_apply;
bool cut3_apply;
bool cut4_apply;

int LoadFrom(const string &f);
};
Expand All @@ -38,6 +40,26 @@ int Config::LoadFrom(const string &f_in)

n_si = process.getParameter<double>("n_si");

cut1_apply = process.getParameter<bool>("cut1_apply");
cut1_a = process.getParameter<double>("cut1_a");
cut1_c = process.getParameter<double>("cut1_c");
cut1_si = process.getParameter<double>("cut1_si");

cut2_apply = process.getParameter<bool>("cut2_apply");
cut2_a = process.getParameter<double>("cut2_a");
cut2_c = process.getParameter<double>("cut2_c");
cut2_si = process.getParameter<double>("cut2_si");

cut3_apply = process.getParameter<bool>("cut3_apply");
cut3_a = process.getParameter<double>("cut3_a");
cut3_c = process.getParameter<double>("cut3_c");
cut3_si = process.getParameter<double>("cut3_si");

cut4_apply = process.getParameter<bool>("cut4_apply");
cut4_a = process.getParameter<double>("cut4_a");
cut4_c = process.getParameter<double>("cut4_c");
cut4_si = process.getParameter<double>("cut4_si");

return 0;
}

Expand Down
23 changes: 21 additions & 2 deletions config_base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
import FWCore.ParameterSet.Config as cms

config = cms.PSet(
n_si = cms.double(4.)
)
n_si = cms.double(4.),

cut1_apply = cms.bool(False),
cut1_a = cms.double(1),
cut1_c = cms.double(0),
cut1_si = cms.double(0),

cut2_apply = cms.bool(False),
cut2_a = cms.double(1),
cut2_c = cms.double(0),
cut2_si = cms.double(0),

cut3_apply = cms.bool(False),
cut3_a = cms.double(1),
cut3_c = cms.double(0),
cut3_si = cms.double(0),

cut4_apply = cms.bool(False),
cut4_a = cms.double(1),
cut4_c = cms.double(0),
cut4_si = cms.double(0)
)

0 comments on commit c150b08

Please sign in to comment.