diff --git a/L1Trigger/DTTriggerPhase2/plugins/DTTrigPhase2Prod.cc b/L1Trigger/DTTriggerPhase2/plugins/DTTrigPhase2Prod.cc index c7a6758baf9ad..edefec9ff6f19 100644 --- a/L1Trigger/DTTriggerPhase2/plugins/DTTrigPhase2Prod.cc +++ b/L1Trigger/DTTriggerPhase2/plugins/DTTrigPhase2Prod.cc @@ -105,6 +105,8 @@ class DTTrigPhase2Prod : public edm::stream::EDProducer<> { void setChiSquareThreshold(float ch2Thr); void setMinimumQuality(MP_QUALITY q); + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); + // data-members const DTGeometry* dtGeo_; edm::ESGetToken dtGeomH; @@ -876,4 +878,89 @@ void DTTrigPhase2Prod::processDigi(std::queue>& inQ vec.push_back(&newQueue); } +void DTTrigPhase2Prod::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + // dtTriggerPhase2PrimitiveDigis + edm::ParameterSetDescription desc; + desc.add("digiTag", edm::InputTag("CalibratedDigis")); + desc.add("timeTolerance", 999999); + desc.addUntracked("geometry_tag", ""); + desc.addUntracked("trigger_with_sl", 4); + desc.addUntracked("tanPhiTh", 1.0); + desc.addUntracked("tanPhiThw2max", 1.3); + desc.addUntracked("tanPhiThw2min", 0.5); + desc.addUntracked("tanPhiThw1max", 0.9); + desc.addUntracked("tanPhiThw1min", 0.2); + desc.addUntracked("tanPhiThw0", 0.5); + desc.addUntracked("chi2Th", 0.01); + desc.addUntracked("chi2corTh", 0.1); + desc.add("do_correlation", true); + desc.addUntracked("useBX_correlation", false); + desc.addUntracked("dT0_correlate_TP", 25.0); + desc.addUntracked("dBX_correlate_TP", 0); + desc.addUntracked("dTanPsi_correlate_TP", 99999.0); + desc.addUntracked("clean_chi2_correlation", true); + desc.addUntracked("allow_confirmation", true); + desc.addUntracked("minx_match_2digis", 1.0); + desc.add("scenario", 0); + desc.add("df_extended", 0); + desc.addUntracked("filter_cousins", true); + desc.add("max_primitives", 999); + desc.add("ttrig_filename", edm::FileInPath("L1Trigger/DTTriggerPhase2/data/wire_rawId_ttrig.txt")); + desc.add("z_filename", edm::FileInPath("L1Trigger/DTTriggerPhase2/data/wire_rawId_z.txt")); + desc.add("shift_filename", edm::FileInPath("L1Trigger/DTTriggerPhase2/data/wire_rawId_x.txt")); + desc.add("shift_theta_filename", edm::FileInPath("L1Trigger/DTTriggerPhase2/data/theta_shift.txt")); + desc.add("global_coords_filename", + edm::FileInPath("L1Trigger/DTTriggerPhase2/data/global_coord_perp_x_phi0.txt")); + desc.add("algo", 0); + desc.addUntracked("minHits4Fit", 3); + desc.addUntracked("splitPathPerSL", true); + desc.addUntracked("debug", false); + desc.addUntracked("dump", false); + desc.add("rpcRecHits", edm::InputTag("rpcRecHits")); + desc.add("useRPC", false); + desc.addUntracked("bx_window", 1); + desc.addUntracked("phi_window", 50.0); + desc.addUntracked("max_quality_to_overwrite_t0", 9); + desc.addUntracked("storeAllRPCHits", false); + desc.add("activateBuffer", false); + desc.add("superCelltimewidth", 400); + desc.add("superCellspacewidth", 20); + { + edm::ParameterSetDescription psd0; + psd0.addUntracked("debug", false); + psd0.addUntracked("angletan", 0.3); + psd0.addUntracked("anglebinwidth", 1.0); + psd0.addUntracked("posbinwidth", 2.1); + psd0.addUntracked("maxdeltaAngDeg", 10); + psd0.addUntracked("maxdeltaPos", 10); + psd0.addUntracked("UpperNumber", 6); + psd0.addUntracked("LowerNumber", 4); + psd0.addUntracked("MaxDistanceToWire", 0.03); + psd0.addUntracked("minNLayerHits", 6); + psd0.addUntracked("minSingleSLHitsMax", 3); + psd0.addUntracked("minSingleSLHitsMin", 3); + psd0.addUntracked("allowUncorrelatedPatterns", true); + psd0.addUntracked("minUncorrelatedHits", 3); + desc.add("HoughGrouping", psd0); + } + { + edm::ParameterSetDescription psd0; + psd0.addUntracked( + "pattern_filename", edm::FileInPath("L1Trigger/DTTriggerPhase2/data/PseudoBayesPatterns_uncorrelated_v0.root")); + psd0.addUntracked("debug", false); + psd0.addUntracked("minNLayerHits", 3); + psd0.addUntracked("minSingleSLHitsMax", 3); + psd0.addUntracked("minSingleSLHitsMin", 0); + psd0.addUntracked("allowedVariance", 1); + psd0.addUntracked("allowDuplicates", false); + psd0.addUntracked("setLateralities", true); + psd0.addUntracked("allowUncorrelatedPatterns", true); + psd0.addUntracked("minUncorrelatedHits", 3); + psd0.addUntracked("saveOnPlace", true); + psd0.addUntracked("maxPathsPerMatch", 256); + desc.add("PseudoBayesPattern", psd0); + } + descriptions.add("dtTriggerPhase2PrimitiveDigis", desc); +} + DEFINE_FWK_MODULE(DTTrigPhase2Prod); diff --git a/L1Trigger/DTTriggerPhase2/src/MPCleanHitsFilter.cc b/L1Trigger/DTTriggerPhase2/src/MPCleanHitsFilter.cc index e87aedb3fbfc6..06eb72fbb67ab 100644 --- a/L1Trigger/DTTriggerPhase2/src/MPCleanHitsFilter.cc +++ b/L1Trigger/DTTriggerPhase2/src/MPCleanHitsFilter.cc @@ -10,16 +10,14 @@ MPCleanHitsFilter::MPCleanHitsFilter(const ParameterSet &pset) : MPFilter(pset) // Obtention of parameters debug_ = pset.getUntrackedParameter("debug"); - timeTolerance_ = pset.exists("timeTolerance") ? pset.getParameter("timeTolerance") : 999999; + timeTolerance_ = pset.getParameter("timeTolerance"); // probably something close to the max time drift (400ns/2) is a reasonable value } void MPCleanHitsFilter::run(edm::Event &iEvent, const edm::EventSetup &iEventSetup, MuonPathPtrs &inMPaths, MuonPathPtrs &outMPaths) { - int counter = 0; for (const auto &mpath : inMPaths) { - ++counter; auto mpAux = std::make_shared(*mpath); removeOutliers(mpAux); // remove hits that are more than 1 bX from the meantime. diff --git a/L1Trigger/DTTriggerPhase2/src/MPQualityEnhancerFilterBayes.cc b/L1Trigger/DTTriggerPhase2/src/MPQualityEnhancerFilterBayes.cc index 9c44c86ce167f..57c17dead8540 100644 --- a/L1Trigger/DTTriggerPhase2/src/MPQualityEnhancerFilterBayes.cc +++ b/L1Trigger/DTTriggerPhase2/src/MPQualityEnhancerFilterBayes.cc @@ -233,10 +233,7 @@ void MPQualityEnhancerFilterBayes::filterCousins(std::vector &inM // double bestChi2 = 9999; // At the beginning, we want to keep all mpaths - bool keep_this[inMPaths.size()]; - for (unsigned int k = 0; k < inMPaths.size(); k++) { - keep_this[k] = true; - } + std::vector keep_this(inMPaths.size(), true); // If we have just one mpath, save it if (inMPaths.size() == 1) {