Skip to content

Commit

Permalink
Merge pull request cms-sw#305 from trackreco/config-parse
Browse files Browse the repository at this point in the history
Patch C++ configuration from a JSON patch file
  • Loading branch information
osschar committed Mar 16, 2021
2 parents b9ace51 + bf6317f commit d88786f
Show file tree
Hide file tree
Showing 18 changed files with 26,626 additions and 249 deletions.
5 changes: 5 additions & 0 deletions Config.cc
Expand Up @@ -100,6 +100,11 @@ namespace Config
bool backwardFit = false;
bool includePCA = false;

bool json_patch_dump_before = false;
bool json_patch_dump_after = false;
bool json_patch_verbose = false;
std::string json_patch_filename;

void RecalculateDependentConstants()
{
}
Expand Down
7 changes: 7 additions & 0 deletions Config.h
Expand Up @@ -402,6 +402,13 @@ namespace Config

// ================================================================

extern bool json_patch_dump_before;
extern bool json_patch_dump_after;
extern bool json_patch_verbose;
extern std::string json_patch_filename;

// ================================================================

void RecalculateDependentConstants();

inline float BfieldFromZR(const float z, const float r)
Expand Down
2 changes: 1 addition & 1 deletion TTreeValidation.cc
Expand Up @@ -1961,7 +1961,7 @@ void TTreeValidation::fillFakeRateTree(const Event& ev)
seedmask_seed_FR_ = 1; // automatically set to 1, because at the moment no cuts on seeds after conformal+KF fit. seed triplets filtered by RZ chi2 before fitting.

// last hit info
const Hit& lasthit = evt_layer_hits[seedtrack.getLastFoundHitLyr()][seedtrack.getLastFoundHitIdx()];
// const Hit& lasthit = evt_layer_hits[seedtrack.getLastFoundHitLyr()][seedtrack.getLastFoundHitIdx()];
xhit_seed_FR_ = 0;//lasthit.x();
yhit_seed_FR_ = 0;//lasthit.y();
zhit_seed_FR_ = 0;//lasthit.z();
Expand Down
2 changes: 1 addition & 1 deletion Track.cc
Expand Up @@ -89,7 +89,7 @@ bool TrackBase::hasSillyValues(bool dump, bool fix, const char* pref)
if ( ! is_silly)
{
is_silly = true;
if (dump) printf("%s (label=%d):", pref, label());
if (dump) printf("%s (label=%d, pT=%f):", pref, label(), pT());
}
if (dump) printf(" (%d,%d)=%e", i, j, state_.errors.At(i,j));
if (fix) state_.errors.At(i,j) = 0.00001;
Expand Down
2 changes: 1 addition & 1 deletion mkFit/Makefile
Expand Up @@ -34,7 +34,7 @@ AUTO_TGTS := auto-genmplex
default: ${AUTO_TGTS} ${TGTS}

clean:
rm -f ${TGTS} *.d *.o *.om Ice/*.d Ice/*.o Ice/*.om
rm -f ${TGTS} *.d *.o Ice/*.d Ice/*.o
rm -rf mkFit.dSYM

distclean: clean
Expand Down

0 comments on commit d88786f

Please sign in to comment.