26 #include "oneapi/tbb/task_arena.h" 27 #include "oneapi/tbb/parallel_for.h" 29 #if defined(USE_VTUNE_PAUSE) 30 #include "ittnotify.h" 39 using namespace mkfit;
79 "mkFit.cc/%s--JSON-Load read %d JSON entities from %d files, replaced %d parameters.\n" 80 " NOTE that these changes were NOT APPLIED to actual configuration that is going to be used.\n",
92 printf(
"mkFit.cc/%s--JOSN-Patch read %d JSON entities from %d files, replaced %d parameters.\n",
113 int g_start_event = 1;
115 bool g_run_fit_std =
false;
117 bool g_run_build_all =
true;
118 bool g_run_build_cmssw =
false;
119 bool g_run_build_bh =
false;
120 bool g_run_build_std =
false;
121 bool g_run_build_ce =
false;
122 bool g_run_build_mimi =
false;
130 void init_seed_opts() {
131 g_seed_opts[
"sim"] = {
simSeeds,
"Use simtracks for seeds"};
132 g_seed_opts[
"cmssw"] = {
cmsswSeeds,
"Use external CMSSW seeds"};
133 g_seed_opts[
"find"] = {
findSeeds,
"Use mplex seed finder for seeds"};
137 void init_clean_opts() {
138 g_clean_opts[
"none"] = {
noCleaning,
"No cleaning applied to external CMSSW seeds"};
139 g_clean_opts[
"n2"] = {
cleanSeedsN2,
"Apply N^2 cleaning by Mario to external CMSSW seeds"};
140 g_clean_opts[
"pure"] = {
142 "Only use external CMSSW seeds that have produced a CMSSW track \n must enable: --read-cmssw-tracks"};
143 g_clean_opts[
"badlabel"] = {
cleanSeedsBadLabel,
"Remove seeds with label()<0 in external CMSSW seeds"};
147 void init_match_opts() {
149 "Use track parameter-based matching for validating against CMSSW tracks"};
150 g_match_opts[
"hits"] = {
hitBased,
"Use hit-based matching for validating against CMSSW tracks"};
151 g_match_opts[
"label"] = {
labelBased,
"Only allowed with pure seeds: stricter hit-based matching"};
154 const char* b2a(
bool b) {
return b ?
"true" :
"false"; }
161 template <
typename T,
typename U>
165 for (
const auto& g_opt_pair : g_opt_map) {
166 if (g_opt_pair.second.first == c_opt)
167 return g_opt_pair.first;
169 std::cerr <<
"No match for option " << c_opt << std::endl;
173 template <
typename T,
typename U>
175 if (g_opt_map.count(cmd_ln_str))
176 c_opt = g_opt_map.at(cmd_ln_str).first;
178 std::cerr << cmd_ln_str <<
" is not a valid " << ex_txt <<
" option!! Exiting..." << std::endl;
183 template <
typename U>
185 for (
const auto& g_opt_pair : g_opt_map) {
186 std::cout <<
" " << g_opt_pair.first.c_str() <<
" : " << g_opt_pair.second.second.c_str() << std::endl;
193 printf(
"Running test_standard(), operation=\"%s\"\n", g_operation.c_str());
194 printf(
" vusize=%d, num_th_sim=%d, num_th_finder=%d\n",
199 " sizeof(Track)=%zu, sizeof(Hit)=%zu, sizeof(SVector3)=%zu, sizeof(SMatrixSym33)=%zu, sizeof(MCHitInfo)=%zu\n",
207 printf(
"- reading seeds from file\n");
212 if (g_operation ==
"read") {
214 int evs_available = evs_in_file - g_start_event + 1;
218 printf(
"Requested number of events %d, only %d available.\n",
Config::nEvents, evs_available);
222 if (g_start_event > 1) {
227 constexpr
int NT = 5;
228 double t_sum[NT] = {0};
229 double t_skip[NT] = {0};
234 std::atomic<int>
nevt{g_start_event};
235 std::atomic<int> seedstot{0}, simtrackstot{0}, candstot{0};
236 std::atomic<int> maxHits_all{0}, maxLayer_all{0};
244 std::vector<std::shared_ptr<FILE>> fps;
250 std::ostringstream serial;
258 if (g_operation ==
"read") {
259 fps.emplace_back(fopen(g_input_file.c_str(),
"r"), [](FILE*
fp) {
274 arena.execute([&]() {
277 [&](
const tbb::blocked_range<int>& threads) {
278 int thisthread = threads.begin();
283 auto&
ev = *evs[thisthread].get();
284 auto& mkb = *mkbs[thisthread].get();
285 auto& eoh = *eohs[thisthread].get();
286 auto fp = fps[thisthread].get();
288 int evstart = thisthread * events_per_thread;
291 dprint(
"thisthread " << thisthread <<
" events " <<
Config::nEvents <<
" events/thread " << events_per_thread
292 <<
" range " << evstart <<
":" << evend);
294 for (
int evt = evstart; evt < evend; ++evt) {
300 printf(
"Processing event %d\n",
ev.evtID());
303 ev.read_in(data_file,
fp);
306 if (
ev.seedTracks_.empty())
313 std::vector<DeadVec> deadvectors(
ev.layerHits_.size());
319 double t_best[NT] = {0}, t_cur[NT] = {0};
320 std::vector<double> t_cur_iter;
321 simtrackstot +=
ev.simTracks_.size();
322 seedstot +=
ev.seedTracks_.size();
324 int ncands_thisthread = 0;
325 int maxHits_thisthread = 0;
326 int maxLayer_thisthread = 0;
331 if (g_run_build_all || g_run_build_mimi)
334 if (g_run_build_all || g_run_build_cmssw)
337 if (g_run_build_ce || g_run_build_mimi) {
338 ncands_thisthread = mkb.total_cands();
339 auto const& ln = mkb.max_hits_layer(eoh);
340 maxHits_thisthread = ln.first;
341 maxLayer_thisthread = ln.second;
343 for (
int i = 0;
i < NT; ++
i)
344 t_best[
i] = (
b == 0) ? t_cur[
i] :
std::min(t_cur[
i], t_best[
i]);
349 printf(
"----------------------------------------------------------------\n");
350 printf(
"Best-of-times:");
351 for (
int i = 0;
i < NT; ++
i)
352 printf(
" %.5f/%.5f", t_cur[
i], t_best[
i]);
355 printf(
"----------------------------------------------------------------\n");
359 candstot += ncands_thisthread;
360 if (maxHits_thisthread > maxHits_all) {
361 maxHits_all = maxHits_thisthread;
362 maxLayer_all = maxLayer_thisthread;
366 printf(
"Matriplex fit = %.5f --- Build BHMX = %.5f STDMX = %.5f CEMX = %.5f MIMI = %.5f\n",
376 std::lock_guard<std::mutex> locker(sum_up_lock);
378 for (
int i = 0;
i < NT; ++
i)
379 t_sum[
i] += t_best[
i];
381 for (
int i = 0;
i < NT; ++
i)
382 t_skip[
i] += t_best[
i];
383 if (g_run_build_all || g_run_build_mimi) {
385 t_sum_iter[
i] += t_cur_iter[
i];
388 t_skip_iter[
i] += t_cur_iter[
i];
393 tbb::simple_partitioner());
399 printf(
"================================================================\n");
401 printf(
"================================================================\n");
403 printf(
"Total Matriplex fit = %.5f --- Build BHMX = %.5f STDMX = %.5f CEMX = %.5f MIMI = %.5f\n",
409 printf(
"Total event > 1 fit = %.5f --- Build BHMX = %.5f STDMX = %.5f CEMX = %.5f MIMI = %.5f\n",
415 printf(
"Total event loop time %.5f simtracks %d seedtracks %d builtcands %d maxhits %d on lay %d\n",
421 maxLayer_all.load());
423 if (g_run_build_all || g_run_build_mimi) {
424 printf(
"================================================================\n");
426 std::cout <<
" Iteration " <<
i <<
" build time = " << t_sum_iter[
i] <<
" \n";
427 printf(
"================================================================\n");
429 std::cout <<
" Iteration " <<
i <<
" build time (event > 1) = " << t_skip_iter[
i] <<
" \n";
430 printf(
"================================================================\n");
432 if (g_operation ==
"read") {
436 for (
auto&
val : vals) {
437 val->fillConfigTree();
455 if (++
j ==
args.end() ||
has_suffix(*
j,
".C") || ((*j)[0] ==
'-' && !(*
j ==
"-" && allow_single_minus))) {
456 std::cerr <<
"Error: option " << *
i <<
" requires an argument.\n";
471 feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
475 #ifdef USE_VTUNE_PAUSE 480 "To make sure this is true for icc and gcc<6 when mixing bools/ints in bitfields.");
488 for (
int i = 1;
i <
argc; ++
i) {
489 mArgs.push_back(
argv[
i]);
493 while (
i != mArgs.end()) {
496 if (*
i ==
"-h" || *
i ==
"-help" || *
i ==
"--help") {
499 "Usage: %s [options]\n" 500 "Options: defaults defined as (def: DEFAULT VALUE)\n" 501 "\n----------------------------------------------------------------------------------------------------------" 503 "Generic options\n\n" 504 " --geom <str> geometry plugin to use (def: %s)\n" 505 " --silent suppress printouts inside event loop (def: %s)\n" 506 " --best-out-of <int> run test num times, report best time (def: %d)\n" 507 " --input-file file name for reading (def: %s)\n" 508 " --output-file file name for writitng (def: %s)\n" 509 " --read-cmssw-tracks read external cmssw reco tracks if available (def: %s)\n" 510 " --read-simtrack-states read in simTrackStates for pulls in validation (def: %s)\n" 511 " --num-events <int> number of events to run over or simulate (def: %d)\n" 512 " if using --input-file, must be enabled AFTER on command line\n" 513 " --start-event <int> event number to start at when reading from a file (def: %d)\n" 514 " --loop-over-file after reaching the end of the file, start over from the beginning until " 515 "<num-events> events have been processed\n" 517 "If no --input-file is specified, will trigger simulation\n" 518 " --num-tracks <int> number of tracks to generate for each event (def: %d)\n" 519 "\n----------------------------------------------------------------------------------------------------------" 521 "Threading related options\n\n" 522 " --num-thr-sim <int> number of threads for simulation (def: %d)\n" 523 " --num-thr <int> number of threads for track finding (def: %d)\n" 524 " --num-thr-ev <int> number of threads to run the event loop (def: %d)\n" 525 " --seeds-per-task <int> number of seeds to process in a tbb task (def: %d)\n" 526 " --hits-per-task <int> number of layer1 hits per task when using find seeds (def: %d)\n" 527 "\n----------------------------------------------------------------------------------------------------------" 529 "FittingTestMPlex options\n\n" 530 " --fit-std run standard fitting test (def: %s)\n" 531 " --fit-std-only run only standard fitting test (def: %s)\n" 532 " --cf-fitting enable conformal fit before fitting tracks to get initial estimate of track " 533 "parameters and errors (def: %s)\n" 534 " --fit-val enable ROOT based validation for fittingMPlex (def: %s)\n" 535 "\n----------------------------------------------------------------------------------------------------------" 537 "BuildingTestMPlex options\n\n" 538 " **Specify which building routine you would like to run\n" 539 " --build-cmssw run dummy validation of CMSSW tracks with MkBuilder stuff (def: %s)\n" 540 " --build-bh run best-hit building test (def: %s)\n" 541 " --build-std run standard combinatorial building test (def: %s)\n" 542 " --build-ce run clone engine combinatorial building test (def: %s)\n" 543 " --build-mimi run clone engine on multiple-iteration test (def: %s)\n" 544 " --num-iters-cmssw <int> number of mimi iterations to run (def: set to 3 when --build-mimi is in effect, " 547 " **Seeding options\n" 548 " --seed-input <str> which seed collecion used for building (def: %s)\n" 549 " --seed-cleaning <str> which seed cleaning to apply if using cmssw seeds (def: %s)\n" 550 " --cf-seeding enable conformal fit over seeds (def: %s)\n" 552 " **Duplicate removal options\n" 553 " --remove-dup run duplicate removal after building, using both hit and kinematic criteria (def: " 555 " --remove-dup-no-hit run duplicate removal after building, using kinematic criteria only (def: %s)\n" 557 " **Dead module (strip) option\n" 558 " --use-dead-modules run duplicate removal after building, using both hit and kinematic criteria " 561 " **Additional options for building\n" 562 " --use-phiq-arr use phi-Q arrays in select hit indices (def: %s)\n" 563 " --kludge-cms-hit-errors make sure err(xy) > 15 mum, err(z) > 30 mum (def: %s)\n" 564 " --backward-fit perform backward fit during building (def: %s)\n" 565 " --no-backward-search do not do backward search after backward fit\n" 566 " (def: do search if backward-fit is enabled and available in given iteration)\n" 567 " --include-pca do the backward fit to point of closest approach, does not imply " 568 "'--backward-fit' (def: %s)\n" 569 "\n----------------------------------------------------------------------------------------------------------" 571 "Validation options\n\n" 572 " **Text file based options\n" 573 " --quality-val enable printout validation for MkBuilder (def: %s)\n" 574 " must enable: --dump-for-plots\n" 575 " --dump-for-plots make shell printouts for plots (def: %s)\n" 576 " --mtv-like-val configure validation to emulate CMSSW MultiTrackValidator (MTV) (def: %s)\n" 577 " --mtv-require-seeds configure validation to emulate MTV but require sim tracks to be matched to " 580 " **ROOT based options\n" 581 " --sim-val-for-cmssw enable ROOT based validation for CMSSW tracks with simtracks as reference [eff, " 582 "FR, DR] (def: %s)\n" 583 " --sim-val enable ROOT based validation for seeding, building, and fitting with simtracks " 584 "as reference [eff, FR, DR] (def: %s)\n" 585 " --cmssw-val enable ROOT based validation for building and fitting with CMSSW tracks as " 586 "reference [eff, FR, DR] (def: %s)\n" 587 " must enable: --geom CMS-2017 --read-cmssw-tracks\n" 588 " --cmssw-match-fw <str> which cmssw track matching routine to use if validating against CMSSW tracks, " 589 "forward built tracks only (def: %s)\n" 590 " must enable: --geom CMS-2017 --cmssw-val --read-cmssw-tracks\n" 591 " --cmssw-match-bk <str> which cmssw track matching routine to use if validating against CMSSW tracks, " 592 "backward fit tracks only (def: %s)\n" 593 " must enable: --geom CMS-2017 --cmssw-val --read-cmssw-tracks --backward-fit " 594 "--backward-fit-pca\n" 595 " --inc-shorts include short reco tracks into FR (def: %s)\n" 596 " --keep-hit-info keep vectors of hit idxs and branches in trees (def: %s)\n" 597 " --try-to-save-sim-info two options for this flag [related to validation with simtracks as reference " 598 "collection] (def: %s)\n" 599 " a) IF (--read-simtrack-states is enabled)\n" 600 " If a sim track is associated to a reco track, but it does not contain " 601 "the last found on the reco track\n" 602 " still save sim track kinematic info from generator position\n" 603 " b) ELSE (--read-simtrack-states is NOT enabled)\n" 604 " Save sim track kinematic info from generator position if matched to " 606 "\n----------------------------------------------------------------------------------------------------------" 608 "Combo spaghetti, that's with cole slaw:\n\n" 609 " **Building and fitting combo options\n" 610 " --backward-fit-pca perform backward fit to point of closest approach during building\n" 611 " == --backward-fit --include-pca\n" 612 " **Seed combo options\n" 613 " --cmssw-simseeds use CMS geom with simtracks for seeds\n" 614 " == --geom CMS-2017 --seed-input %s\n" 615 " --cmssw-stdseeds use CMS geom with CMSSW seeds uncleaned\n" 616 " == --geom CMS-2017 --seed-input %s --seed-cleaning %s\n" 617 " --cmssw-n2seeds use CMS geom with CMSSW seeds cleaned with N^2 routine\n" 618 " == --geom CMS-2017 --seed-input %s --seed-cleaning %s\n" 619 " --cmssw-pureseeds use CMS geom with pure CMSSW seeds (seeds which produced CMSSW reco tracks), " 620 "enable read of CMSSW tracks\n" 621 " == --geom CMS-2017 --seed-input %s --seed-cleaning %s --read-cmssw-tracks\n" 622 " --cmssw-goodlabelseeds use CMS geom with CMSSW seeds with label() >= 0\n" 623 " == --geom CMS-2017 --seed-input %s --seed-cleaning %s\n" 625 " **CMSSW validation combo options\n" 626 " --cmssw-val-fhit-bhit use CMSSW validation with hit based matching (50 percent after seed) for forward " 628 " use CMSSW validation with hit based matching (50 percent after seed) for " 629 "backward fit tracks\n" 630 " == --cmssw-val --read-cmssw-tracks --cmssw-match-fw %s --cmssw-match-bk %s\n" 631 " must enable: --backward-fit-pca\n" 632 " --cmssw-val-fhit-bprm use CMSSW validation with hit based matching (50 percent after seed) for forward " 634 " use CMSSW validation with track parameter based matching for backward fit " 636 " == --cmssw-val --read-cmssw-tracks --cmssw-match-fw %s --cmssw-match-bk %s\n" 637 " must enable: --backward-fit-pca\n" 638 " --cmssw-val-fprm-bhit use CMSSW validation with track parameter based matching for forward built " 640 " use CMSSW validation with hit based matching (50 percent after seed) for " 641 "backward fit tracks\n" 642 " == --cmssw-val --read-cmssw-tracks --cmssw-match-fw %s --cmssw-match-bk %s\n" 643 " must enable: --backward-fit-pca\n" 644 " --cmssw-val-fprm-bprm use CMSSW validation with track parameter based matching for forward built " 646 " use CMSSW validation with track parameter based matching for backward fit " 648 " == --cmssw-val --read-cmssw-tracks --cmssw-match-fw %s --cmssw-match-bk %s\n" 649 " must enable: --backward-fit-pca\n" 650 " --cmssw-val-label use CMSSW validation with stricter hit based matching for both forward built and " 651 "backward fit tracks, enable read of CMSSW tracks\n" 652 " == --cmssw-val --read-cmssw-tracks --cmssw-match-fw %s --cmssw-match-bk %s\n" 653 " must enable: --cmssw-pureseeds --backward-fit-pca\n" 654 "\n----------------------------------------------------------------------------------------------------------" 656 "JSON config patcher options:\n\n" 657 " --json-load <filename> load single IterationConfig from given JSON file (def: do not load)\n" 658 " can be specified multiple times for several files\n" 659 " --json-patch <filename> patch IterationsInfo from given JSON file (def: do not patch)\n" 660 " can be specified multiple times for several files\n" 661 " --json-save-iterations <fname-fmt> save per iteration json files\n" 662 " %%d in fname-fmt gets replaced with iteration index\n" 663 " %%s in fname-fmt gets replaced with iteration algorithm name\n" 664 " exactly one of %%d and %%s must be specified\n" 665 " --json-save-iterations-include-iter-info-preamble (def: %s)\n" 666 " --json-verbose print each patch assignment as it is being made (def: %s)\n" 667 " --json-dump-before print iteration config before patching (def: %s)\n" 668 " --json-dump-after print iteration config after patching (def: %s)\n" 669 "\n----------------------------------------------------------------------------------------------------------" 676 g_input_file.c_str(),
677 g_output_file.c_str(),
692 !(g_run_build_all || g_run_build_cmssw || g_run_build_bh || g_run_build_std || g_run_build_ce)),
696 b2a(g_run_build_all || g_run_build_cmssw),
697 b2a(g_run_build_all || g_run_build_bh),
698 b2a(g_run_build_all || g_run_build_std),
699 b2a(g_run_build_all || g_run_build_ce),
700 b2a(g_run_build_all || g_run_build_mimi),
756 printf(
"List of options for string based inputs \n");
763 printf(
"--seed-input \n");
767 printf(
"--seed-cleaning \n");
771 printf(
"--cmssw-matching \n");
778 else if (*
i ==
"--geom") {
781 }
else if (*
i ==
"--silent") {
783 }
else if (*
i ==
"--best-out-of") {
786 }
else if (*
i ==
"--input-file") {
789 g_operation =
"read";
791 }
else if (*
i ==
"--output-file") {
794 g_operation =
"write";
795 }
else if (*
i ==
"--read-cmssw-tracks") {
797 }
else if (*
i ==
"--read-simtrack-states") {
799 }
else if (*
i ==
"--num-events") {
802 }
else if (*
i ==
"--start-event") {
804 g_start_event = atoi(
i->c_str());
805 }
else if (*
i ==
"--loop-over-file") {
807 }
else if (*
i ==
"--num-tracks") {
810 }
else if (*
i ==
"--num-thr-sim") {
813 }
else if (*
i ==
"--num-thr") {
816 }
else if (*
i ==
"--num-thr-ev") {
819 }
else if (*
i ==
"--seeds-per-task") {
822 }
else if (*
i ==
"--hits-per-task") {
825 }
else if (*
i ==
"--fit-std") {
826 g_run_fit_std =
true;
827 }
else if (*
i ==
"--fit-std-only") {
828 g_run_fit_std =
true;
829 g_run_build_all =
false;
830 g_run_build_bh =
false;
831 g_run_build_std =
false;
832 g_run_build_ce =
false;
833 }
else if (*
i ==
"--cf-fitting") {
835 }
else if (*
i ==
"--fit-val") {
837 }
else if (*
i ==
"--build-cmssw") {
838 g_run_build_all =
false;
839 g_run_build_cmssw =
true;
840 g_run_build_bh =
false;
841 g_run_build_std =
false;
842 g_run_build_ce =
false;
843 }
else if (*
i ==
"--build-bh") {
844 g_run_build_all =
false;
845 g_run_build_cmssw =
false;
846 g_run_build_bh =
true;
847 g_run_build_std =
false;
848 g_run_build_ce =
false;
849 }
else if (*
i ==
"--build-std") {
850 g_run_build_all =
false;
851 g_run_build_cmssw =
false;
852 g_run_build_bh =
false;
853 g_run_build_std =
true;
854 g_run_build_ce =
false;
855 }
else if (*
i ==
"--build-ce") {
856 g_run_build_all =
false;
857 g_run_build_cmssw =
false;
858 g_run_build_bh =
false;
859 g_run_build_std =
false;
860 g_run_build_ce =
true;
861 }
else if (*
i ==
"--build-mimi") {
862 g_run_build_all =
false;
863 g_run_build_cmssw =
false;
864 g_run_build_bh =
false;
865 g_run_build_std =
false;
866 g_run_build_ce =
false;
867 g_run_build_mimi =
true;
870 }
else if (*
i ==
"--num-iters-cmssw") {
873 }
else if (*
i ==
"--seed-input") {
876 }
else if (*
i ==
"--seed-cleaning") {
879 }
else if (*
i ==
"--cf-seeding") {
881 }
else if (*
i ==
"--use-phiq-arr") {
882 #ifdef CONFIG_PhiQArrays 885 printf(
"--use-phiq-arr has no effect: recompile with CONFIG_PhiQArrays\n");
887 }
else if (*
i ==
"--remove-dup") {
888 Config::removeDuplicates =
true;
890 }
else if (*
i ==
"--remove-dup-no-hit") {
891 Config::removeDuplicates =
true;
893 }
else if (*
i ==
"--use-dead-modules") {
895 }
else if (*
i ==
"--kludge-cms-hit-errors") {
897 }
else if (*
i ==
"--backward-fit") {
899 }
else if (*
i ==
"--no-backward-search") {
901 }
else if (*
i ==
"--include-pca") {
903 }
else if (*
i ==
"--quality-val") {
905 }
else if (*
i ==
"--dump-for-plots") {
907 }
else if (*
i ==
"--mtv-like-val") {
911 }
else if (*
i ==
"--mtv-require-seeds") {
916 }
else if (*
i ==
"--sim-val-for-cmssw") {
918 }
else if (*
i ==
"--sim-val") {
920 }
else if (*
i ==
"--cmssw-val") {
922 }
else if (*
i ==
"--cmssw-match-fw") {
925 }
else if (*
i ==
"--cmssw-match-bk") {
928 }
else if (*
i ==
"--inc-shorts") {
930 }
else if (*
i ==
"--keep-hit-info") {
932 }
else if (*
i ==
"--try-to-save-sim-info") {
934 }
else if (*
i ==
"--backward-fit-pca") {
937 }
else if (*
i ==
"--cmssw-simseeds") {
940 }
else if (*
i ==
"--cmssw-stdseeds") {
944 }
else if (*
i ==
"--cmssw-n2seeds") {
948 }
else if (*
i ==
"--cmssw-pureseeds") {
953 }
else if (*
i ==
"--cmssw-goodlabelseeds") {
957 }
else if (*
i ==
"--cmssw-val-fhit-bhit") {
962 }
else if (*
i ==
"--cmssw-val-fhit-bprm") {
967 }
else if (*
i ==
"--cmssw-val-fprm-bhit") {
972 }
else if (*
i ==
"--cmssw-val-fprm-bprm") {
977 }
else if (*
i ==
"--cmssw-val-label") {
982 }
else if (*
i ==
"--json-load") {
985 }
else if (*
i ==
"--json-patch") {
988 }
else if (*
i ==
"--json-save-iterations") {
991 }
else if (*
i ==
"--json-save-iterations-include-iter-info-preamble") {
993 }
else if (*
i ==
"--json-verbose") {
995 }
else if (*
i ==
"--json-dump-before") {
997 }
else if (*
i ==
"--json-dump-after") {
1000 fprintf(
stderr,
"Error: Unknown option/argument '%s'.\n",
i->c_str());
1010 std::cerr <<
"What have you done?!? Can't mix cmssw label matching without pure seeds! Exiting..." << std::endl;
1014 <<
"What have you done?!? Short reco tracks are already accounted for in the MTV-Like Validation! Inclusive " 1015 "shorts is only an option for the standard simval, and will break the MTV-Like simval! Exiting..."
int openRead(const std::string &fname, int expected_n_layers)
std::map< std::string, std::pair< seedOpts, std::string > > seedOptsMap
double runBuildingTestPlexStandard(Event &ev, const EventOfHits &eoh, MkBuilder &builder)
ROOT::Math::SVector< float, 3 > SVector3
void setOpt(const std::string &cmd_ln_str, T &c_opt, const U &g_opt_map, const std::string &ex_txt)
bool has_suffix(const std::string &str, const std::string &suffix)
std::map< std::string, std::pair< matchOpts, std::string > > matchOptsMap
std::vector< std::string > json_patch_filenames
static Validation * make_validation(const std::string &, const TrackerInfo *)
void execTrackerInfoCreatorPlugin(const std::string &base, TrackerInfo &ti, IterationsInfo &ii, bool verbose)
void recalculateDependentConstants()
constexpr bool usePhiQArrays
void patch_Files(IterationsInfo &its_info, const std::vector< std::string > &fnames, ConfigJsonPatcher::PatchReport *report=nullptr)
matchOpts cmsswMatchingFW
std::string getOpt(const T &c_opt, const U &g_opt_map)
void loadHitsAndBeamSpot(Event &ev, EventOfHits &eoh)
void skipNEvents(int n_to_skip)
matchOpts cmsswMatchingBK
void listOpts(const U &g_opt_map)
void loadDeads(EventOfHits &eoh, const std::vector< DeadVec > &deadvectors)
int main(int argc, const char *argv[])
std::unique_ptr< IterationConfig > patchLoad_File(const IterationsInfo &its_info, const std::string &fname, ConfigJsonPatcher::PatchReport *report=nullptr)
void runBuildingTestPlexDumbCMSSW(Event &ev, const EventOfHits &eoh, MkBuilder &builder)
constexpr int numThreadsFinder
void save_Iterations(IterationsInfo &its_info, const std::string &fname_fmt, bool include_iter_info_preamble)
constexpr bool nan_etc_sigs_enable
static std::mutex printmutex
double runBuildingTestPlexCloneEngine(Event &ev, const EventOfHits &eoh, MkBuilder &builder)
void next_arg_or_die(lStr_t &args, lStr_i &i, bool allow_single_minus=false)
void dump(IterationsInfo &its_info)
std::map< std::string, std::pair< cleanOpts, std::string > > cleanOptsMap
bool json_save_iters_include_iter_info_preamble
std::vector< std::string > json_load_filenames
std::vector< double > runBtpCe_MultiIter(Event &ev, const EventOfHits &eoh, MkBuilder &builder, int n)
static std::unique_ptr< MkBuilder > make_builder(bool silent=true)
constexpr int numSeedsPerTask
constexpr int numThreadsEvents
std::list< std::string > lStr_t
const bool useHitsForDuplicates
std::string json_save_iters_fname_fmt
ROOT::Math::SMatrix< float, 3, 3, ROOT::Math::MatRepSym< float, 3 > > SMatrixSym33
int finderReportBestOutOfN
double runBuildingTestPlexBestHit(Event &ev, const EventOfHits &eoh, MkBuilder &builder)