Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Fit/Config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ namespace KinKal {
<< " diverge dpar chisq " << kkconfig.pdchisq_
<< " diverge traj gap (mm) " << kkconfig.divgap_
<< " fractional momentum tolerance " << kkconfig.tol_
<< " min domain step (ns) " << kkconfig.mindtstep_
<< " min field (T) " << kkconfig.minfield_
<< " domain margin (ns) " << kkconfig.domainmargin_
<< " max domains " << kkconfig.maxdomains_
<< " min NDOF " << kkconfig.minndof_
<< " BField correction " << kkconfig.bfcorr_
<< " zero-field extrap handoff " << kkconfig.zerofield_extrap_
<< " with " << kkconfig.schedule().size()
<< " Meta-iterations:" << std::endl;
for(auto const& miconfig : kkconfig.schedule() ) {
Expand Down
6 changes: 6 additions & 0 deletions Fit/Config.hh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <vector>
#include <memory>
#include <algorithm>
#include <limits>
#include <ostream>
#include <istream>

Expand All @@ -29,8 +30,13 @@ namespace KinKal {
double pdchisq_ = 1.0e6; // maximum allowed parameter change (units of chisqred) WRT previous reference
double divgap_ = 1.0e2; // maximum average gap of trajectory before calling it diverged (mm)
double tol_ = 1.0e-4; // tolerance on fractional momentum accuracy due to BField domain steps
double mindtstep_ = 0.0; // ns: hard floor on the BField domain step (0 = legacy; >0 bounds the domain count where rangeInTolerance->0)
double minfield_ = 0.0; // T: if >0, and zerofield_extrap_ is enabled, hand bfcorr extrapolation off to free-particle continuation once |B| drops below this
double domainmargin_ = std::numeric_limits<double>::max(); // ns: max time a fit domain may extend beyond the active range (max = unclamped/legacy overhang; finite = confine walk+sampling to range±margin)
unsigned maxdomains_ = std::numeric_limits<unsigned>::max(); // hard cap on BField domains per fit; over-cap fits fail cleanly (max = unlimited/legacy)
unsigned minndof_ = 5; // minimum number of DOFs to continue fit
bool bfcorr_ = true; // whether to make BFieldMap corrections in the fit
bool zerofield_extrap_ = false; // if true: (1) bfcorr extrapolate() hands off to geometric free-particle continuation outside the map / below minfield_; (2) createDomains stops DomainWalls at that edge instead of failing Extension; (3) replaceDomains charge/mass mismatch soft-keeps the prior usable fit (CH cosmic CRV). Default false preserves legacy LH/CH behaviour.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would zerofield_extrap_ == true result in different behavior for minfield_ = 0? If not, this config could be replaced with (minfield_ > 0)

bool ends_ = true; // process the passive effects at each end of the track after schedule completion
printLevel plevel_ = none; // print level
// schedule of meta-iterations. These will be executed sequentially until completion or failure
Expand Down
Loading
Loading