18 #include "ConfigWrapper.h"
20 #include "mkFit/buildtestMPlex.h"
21 #include "mkFit/MkBuilderWrapper.h"
24 #include "tbb/task_arena.h"
51 geomToken_{esConsumes<TrackerGeometry, TrackerDigiGeometryRecord>()},
52 putToken_{produces<MkFitOutputWrapper>()},
53 backwardFitInCMSSW_{iConfig.getParameter<
bool>(
"backwardFitInCMSSW")},
54 mkFitSilent_{iConfig.getUntrackedParameter<
bool>(
"mkFitSilent")} {
57 if (
build ==
"bestHit") {
58 buildFunction_ = mkfit::runBuildingTestPlexBestHit;
59 }
else if (
build ==
"standard") {
60 buildFunction_ = mkfit::runBuildingTestPlexStandard;
61 }
else if (
build ==
"cloneEngine") {
62 buildFunction_ = mkfit::runBuildingTestPlexCloneEngine;
63 }
else if (
build ==
"fullVector") {
65 buildFunction_ = mkfit::runBuildingTestPlexFV;
67 throw cms::Exception(
"Configuration") <<
"Invalid value for parameter 'buildingRoutine' " <<
build
68 <<
", allowed are bestHit, standard, cloneEngine, fullVector";
71 const auto seedClean = iConfig.getParameter<
std::string>(
"seedCleaning");
72 auto seedCleanOpt = mkfit::ConfigWrapper::SeedCleaningOpts::noCleaning;
73 if (seedClean ==
"none") {
74 seedCleanOpt = mkfit::ConfigWrapper::SeedCleaningOpts::noCleaning;
75 }
else if (seedClean ==
"N2") {
76 seedCleanOpt = mkfit::ConfigWrapper::SeedCleaningOpts::cleanSeedsN2;
79 <<
"Invalida value for parameter 'seedCleaning' " << seedClean <<
", allowed are none, N2";
83 backwardFitInCMSSW_ ? mkfit::ConfigWrapper::BackwardFit::noFit : mkfit::ConfigWrapper::BackwardFit::toFirstLayer;
86 mkfit::MkBuilderWrapper::populate(isFV);
87 mkfit::ConfigWrapper::initializeForCMSSW(seedCleanOpt, backwardFitOpt, mkFitSilent_);
95 ->setComment(
"Valid values are: 'bestHit', 'standard', 'cloneEngine', 'fullVector'");
96 desc.
add<
std::string>(
"seedCleaning",
"N2")->setComment(
"Valid values are: 'none', 'N2'");
97 desc.
add(
"backwardFitInCMSSW",
false)
98 ->
setComment(
"Do backward fit (to innermost hit) in CMSSW (true) or mkFit (false)");
101 descriptions.
add(
"mkFitProducer", desc);
105 return std::make_unique<mkfit::MkBuilderWrapper>();
109 std::once_flag geometryFlag;
117 throw cms::Exception(
"Assert") <<
"For now this code works only with phase1 tracker, you have something else";
123 std::call_once(geometryFlag, [
nlayers =
hitsSeeds.nlayers()]() { mkfit::ConfigWrapper::setNTotalLayers(
nlayers); });
128 mkfit::Event
ev(
iEvent.id().event());