diff --git a/RecoBTag/Combined/plugins/BTagProbabilityToDiscriminator.cc b/RecoBTag/Combined/plugins/BTagProbabilityToDiscriminator.cc index 8adbff6f4e2bf..a5311ba40e8dc 100644 --- a/RecoBTag/Combined/plugins/BTagProbabilityToDiscriminator.cc +++ b/RecoBTag/Combined/plugins/BTagProbabilityToDiscriminator.cc @@ -171,6 +171,7 @@ void BTagProbabilityToDiscriminator::fillDescriptions(edm::ConfigurationDescript edm::ParameterSetDescription desc; { edm::ParameterSetDescription vpsd1; + vpsd1.setAllowAnything(); // Allow any string-to-string mappings vpsd1.add>("denominator", {}); vpsd1.add>("numerator", { @@ -178,51 +179,55 @@ void BTagProbabilityToDiscriminator::fillDescriptions(edm::ConfigurationDescript edm::InputTag("pfDeepCSVJetTags", "probbb"), }); vpsd1.add("name", "BvsAll"); - std::vector temp1; - temp1.reserve(3); + std::vector vectorOfDiscriminators; + vectorOfDiscriminators.reserve(3); { - edm::ParameterSet temp2; - temp2.addParameter>("denominator", {}); - temp2.addParameter>("numerator", - { - edm::InputTag("pfDeepCSVJetTags", "probb"), - edm::InputTag("pfDeepCSVJetTags", "probbb"), - }); - temp2.addParameter("name", "BvsAll"); - temp1.push_back(temp2); + edm::ParameterSet tempDiscriminator; + tempDiscriminator.addParameter>("denominator", {}); + tempDiscriminator.addParameter>("numerator", + { + edm::InputTag("pfDeepCSVJetTags", "probb"), + edm::InputTag("pfDeepCSVJetTags", "probbb"), + }); + tempDiscriminator.addParameter("name", "BvsAll"); + vectorOfDiscriminators.push_back(tempDiscriminator); } { - edm::ParameterSet temp2; - temp2.addParameter>("denominator", - { - edm::InputTag("pfDeepCSVJetTags", "probc"), - edm::InputTag("pfDeepCSVJetTags", "probb"), - edm::InputTag("pfDeepCSVJetTags", "probbb"), - }); - temp2.addParameter>("numerator", - { - edm::InputTag("pfDeepCSVJetTags", "probc"), - }); - temp2.addParameter("name", "CvsB"); - temp1.push_back(temp2); + edm::ParameterSet tempDiscriminator; + tempDiscriminator.addParameter>("denominator", + { + edm::InputTag("pfDeepCSVJetTags", "probc"), + edm::InputTag("pfDeepCSVJetTags", "probb"), + edm::InputTag("pfDeepCSVJetTags", "probbb"), + }); + tempDiscriminator.addParameter>("numerator", + { + edm::InputTag("pfDeepCSVJetTags", "probc"), + }); + tempDiscriminator.addParameter("name", "CvsB"); + vectorOfDiscriminators.push_back(tempDiscriminator); } { - edm::ParameterSet temp2; - temp2.addParameter>("denominator", - { - edm::InputTag("pfDeepCSVJetTags", "probudsg"), - edm::InputTag("pfDeepCSVJetTags", "probc"), - }); - temp2.addParameter>("numerator", - { - edm::InputTag("pfDeepCSVJetTags", "probc"), - }); - temp2.addParameter("name", "CvsL"); - temp1.push_back(temp2); + edm::ParameterSet tempDiscriminator; + tempDiscriminator.addParameter>("denominator", + { + edm::InputTag("pfDeepCSVJetTags", "probudsg"), + edm::InputTag("pfDeepCSVJetTags", "probc"), + }); + tempDiscriminator.addParameter>("numerator", + { + edm::InputTag("pfDeepCSVJetTags", "probc"), + }); + tempDiscriminator.addParameter("name", "CvsL"); + vectorOfDiscriminators.push_back(tempDiscriminator); } - desc.addVPSet("discriminators", vpsd1, temp1); + desc.addVPSet("discriminators", vpsd1, vectorOfDiscriminators) + ->setComment( + "List of ParameterSets to create new ratio-based neural network discriminants. " + "Each entry is a ParameterSet where 'name' is the new name of the variable, and 'numerator' and " + "'denominator' are vector of InputTags of the pure neural network scores to be used in the calculation."); } - descriptions.addDefault(desc); + descriptions.addWithDefaultLabel(desc); } // define this as a plug-in diff --git a/RecoBTag/ImpactParameter/plugins/IPProducer.h b/RecoBTag/ImpactParameter/plugins/IPProducer.h index c2cfa5712ef41..fa243bd074c73 100644 --- a/RecoBTag/ImpactParameter/plugins/IPProducer.h +++ b/RecoBTag/ImpactParameter/plugins/IPProducer.h @@ -443,21 +443,30 @@ template <> inline void IPProducer::fillDescriptions( edm::ConfigurationDescriptions& descriptions) { edm::ParameterSetDescription desc; - desc.add("maximumTransverseImpactParameter", 0.2); - desc.add("minimumNumberOfHits", 8); - desc.add("minimumTransverseMomentum", 1.0); - desc.add("primaryVertex", edm::InputTag("offlinePrimaryVertices")); - desc.add("maximumLongitudinalImpactParameter", 17.0); - desc.add("computeGhostTrack", true); - desc.add("ghostTrackPriorDeltaR", 0.03); - desc.add("jetTracks", edm::InputTag("ak4JetTracksAssociatorAtVertexPF")); - desc.add("jetDirectionUsingGhostTrack", false); - desc.add("minimumNumberOfPixelHits", 2); - desc.add("jetDirectionUsingTracks", false); - desc.add("computeProbabilities", true); - desc.add("useTrackQuality", false); - desc.add("maximumChiSquared", 5.0); - descriptions.addDefault(desc); + desc.add("maximumTransverseImpactParameter", 0.2) + ->setComment("Set upper threshold for the track transverse impact parameter."); + desc.add("minimumNumberOfHits", 8)->setComment("Set lower threshold for the number of valid hits per track."); + desc.add("minimumTransverseMomentum", 1.0) + ->setComment("Set lower threshold for the minimum track transverse momentum."); + desc.add("primaryVertex", edm::InputTag("offlinePrimaryVertices")) + ->setComment("InputTag for the primary vertex collection."); + desc.add("maximumLongitudinalImpactParameter", 17.0) + ->setComment("Set upper threshold for the track transverse impact parameter."); + desc.add("computeGhostTrack", true)->setComment("Flag to produce ghost track collection."); + desc.add("ghostTrackPriorDeltaR", 0.03)->setComment("Set cone radius for the ghost track fit."); + desc.add("jetTracks", edm::InputTag("ak4JetTracksAssociatorAtVertexPF")) + ->setComment("InputTag for the jet-track association collection."); + desc.add("jetDirectionUsingGhostTrack", false) + ->setComment("Flag to build the jet momentum using ghost tracks."); + desc.add("minimumNumberOfPixelHits", 2) + ->setComment("Set lower threshold for the number of valid pixel hits per track."); + desc.add("jetDirectionUsingTracks", false) + ->setComment("Flag to include the track momentum into the jet momentum."); + desc.add("computeProbabilities", true) + ->setComment("Flag to produce output probabilities for the tracks to originate from the PV."); + desc.add("useTrackQuality", false)->setComment("Flag to use the track quality in the probability calculation."); + desc.add("maximumChiSquared", 5.0)->setComment("Set upper threshold for the track normalized chi2."); + descriptions.addWithDefaultLabel(desc); } template <> @@ -465,24 +474,34 @@ inline void IPProducer, reco::JetTagInfo, IPProducerHelpers::FromJetAndCands>::fillDescriptions( edm::ConfigurationDescriptions& descriptions) { edm::ParameterSetDescription desc; - desc.add("maximumTransverseImpactParameter", 0.2); - desc.add("minimumNumberOfHits", 8); - desc.add("minimumTransverseMomentum", 1.0); - desc.add("primaryVertex", edm::InputTag("offlinePrimaryVertices")); - desc.add("maximumLongitudinalImpactParameter", 17.0); - desc.add("computeGhostTrack", true); - desc.add("maxDeltaR", 0.4); - desc.add("candidates", edm::InputTag("particleFlow")); - desc.add("jetDirectionUsingGhostTrack", false); - desc.add("minimumNumberOfPixelHits", 2); - desc.add("jetDirectionUsingTracks", false); - desc.add("computeProbabilities", true); - desc.add("useTrackQuality", false); - desc.add("jets", edm::InputTag("ak4PFJetsCHS")); - desc.add("ghostTrackPriorDeltaR", 0.03); - desc.add("maximumChiSquared", 5.0); - desc.addOptional("explicitJTA", false); - descriptions.addDefault(desc); + desc.add("maximumTransverseImpactParameter", 0.2) + ->setComment("Set upper threshold for the track transverse impact parameter."); + desc.add("minimumNumberOfHits", 8)->setComment("Set lower threshold for the number of valid hits per track."); + desc.add("minimumTransverseMomentum", 1.0) + ->setComment("Set lower threshold for the minimum track transverse momentum."); + desc.add("primaryVertex", edm::InputTag("offlinePrimaryVertices")) + ->setComment("InputTag for the primary vertex collection."); + desc.add("maximumLongitudinalImpactParameter", 17.0) + ->setComment("Set upper threshold for the track transverse impact parameter."); + desc.add("computeGhostTrack", true)->setComment("Flag to produce ghost track collection."); + desc.add("maxDeltaR", 0.4) + ->setComment("Set upper threshold for the maximum distance between tracks and jets."); + desc.add("candidates", edm::InputTag("particleFlow")) + ->setComment("InputTag for the particle flow candidate collection."); + desc.add("jetDirectionUsingGhostTrack", false) + ->setComment("Flag to build the jet momentum using ghost tracks."); + desc.add("minimumNumberOfPixelHits", 2) + ->setComment("Set lower threshold for the number of valid pixel hits per track."); + desc.add("jetDirectionUsingTracks", false) + ->setComment("Flag to include the track momentum into the jet momentum."); + desc.add("computeProbabilities", true) + ->setComment("Flag to produce output probabilities for the tracks to originate from the PV."); + desc.add("useTrackQuality", false)->setComment("Flag to use the track quality in the probability calculation."); + desc.add("jets", edm::InputTag("ak4PFJetsCHS"))->setComment("InputTag for the jet collection."); + desc.add("ghostTrackPriorDeltaR", 0.03)->setComment("Set cone radius for the ghost track fit."); + desc.add("maximumChiSquared", 5.0)->setComment("Set upper threshold for the track normalized chi2."); + desc.addOptional("explicitJTA", false)->setComment("Flag to explicitly assign jets to tracks."); + descriptions.addWithDefaultLabel(desc); } #endif diff --git a/RecoBTag/SecondaryVertex/plugins/TemplatedSecondaryVertexProducer.cc b/RecoBTag/SecondaryVertex/plugins/TemplatedSecondaryVertexProducer.cc index 8ca07c3586310..0c9126e2e1e68 100644 --- a/RecoBTag/SecondaryVertex/plugins/TemplatedSecondaryVertexProducer.cc +++ b/RecoBTag/SecondaryVertex/plugins/TemplatedSecondaryVertexProducer.cc @@ -1215,8 +1215,10 @@ void TemplatedSecondaryVertexProducer::matchSubjets(const edm::Handle template void TemplatedSecondaryVertexProducer::fillDescriptions(edm::ConfigurationDescriptions &descriptions) { edm::ParameterSetDescription desc; - desc.add("extSVDeltaRToJet", 0.3); - desc.add("beamSpotTag", edm::InputTag("offlineBeamSpot")); + desc.add("extSVDeltaRToJet", 0.3) + ->setComment("Minimum distance between jets and external secondary vertex collection, if provided."); + desc.add("beamSpotTag", edm::InputTag("offlineBeamSpot")) + ->setComment("InputTag for the beamspot collection."); { edm::ParameterSetDescription vertexReco; vertexReco.add("primcut", 1.8); @@ -1231,15 +1233,21 @@ void TemplatedSecondaryVertexProducer::fillDescriptions(edm::Configur edm::ParameterDescription("mergeThreshold", 3.0, true) and edm::ParameterDescription("fitType", "RefitGhostTrackWithVertices", true), true); - desc.add("vertexReco", vertexReco); + desc.add("vertexReco", vertexReco) + ->setComment("ParameterSet to steer the secondary vertex reconstruction parameters."); } { edm::ParameterSetDescription vertexSelection; vertexSelection.add("sortCriterium", "dist3dError"); - desc.add("vertexSelection", vertexSelection); + desc.add("vertexSelection", vertexSelection) + ->setComment("ParameterSet steering the secondary vertex sorting."); } - desc.add("constraint", "BeamSpot"); - desc.add("trackIPTagInfos", edm::InputTag("impactParameterTagInfos")); + desc.add("constraint", "BeamSpot") + ->setComment( + "Option to set any constraint for the SV fit. Options are 'None', 'BeamSpot' (default), " + "'BeamSpot+PVPosition', 'BeamSpotZ+PVErrorScaledXY', 'PVErrorScaled', and 'BeamSpot+PVTracksInFit'."); + desc.add("trackIPTagInfos", edm::InputTag("impactParameterTagInfos")) + ->setComment("InputTag for the track impact parameter information collection."); { edm::ParameterSetDescription vertexCuts; vertexCuts.add("distSig3dMax", 99999.9); @@ -1261,11 +1269,13 @@ void TemplatedSecondaryVertexProducer::fillDescriptions(edm::Configur vertexCuts.add("distVal3dMin", -99999.9); vertexCuts.add("massMax", 6.5); vertexCuts.add("distSig3dMin", -99999.9); - desc.add("vertexCuts", vertexCuts); + desc.add("vertexCuts", vertexCuts) + ->setComment("ParameterSet steering the secondary vertex selection."); } - desc.add("useExternalSV", false); - desc.add("minimumTrackWeight", 0.5); - desc.add("usePVError", true); + desc.add("useExternalSV", false) + ->setComment("Flag to consider an external secondary vertex collection as input."); + desc.add("minimumTrackWeight", 0.5)->setComment("Setting a lower threshold for the track weight."); + desc.add("usePVError", true)->setComment("Flag to consider the error on the PV."); { edm::ParameterSetDescription trackSelection; trackSelection.add("b_pT", 0.3684); @@ -1294,21 +1304,35 @@ void TemplatedSecondaryVertexProducer::fillDescriptions(edm::Configur trackSelection.add("sip3dSigMax", 99999.9); trackSelection.add("sip2dSigMin", -99999.9); trackSelection.add("b_dR", 0.6263); - desc.add("trackSelection", trackSelection); + desc.add("trackSelection", trackSelection) + ->setComment("ParameterSet steering the track selection."); } - desc.add("trackSort", "sip3dSig"); - desc.add("extSVCollection", edm::InputTag("secondaryVertices")); + desc.add("trackSort", "sip3dSig")->setComment("Set the sorting of the tracks, default is 'sip3dSig'."); + desc.add("extSVCollection", edm::InputTag("secondaryVertices")) + ->setComment("InputTag for an (optional) external secondary vertex collection."); desc.addOptionalNode(edm::ParameterDescription("useSVClustering", false, true) and edm::ParameterDescription("jetAlgorithm", true) and edm::ParameterDescription("rParam", true), - true); - desc.addOptional("useSVMomentum", false); - desc.addOptional("ghostRescaling", 1e-18); - desc.addOptional("relPtTolerance", 1e-03); - desc.addOptional("fatJets"); - desc.addOptional("groomedFatJets"); - desc.add("weights", edm::InputTag("")); - descriptions.addDefault(desc); + true) + ->setComment("Optional ParameterSet to steer any secondary vertex reclustering."); + desc.addOptional("useSVMomentum", false) + ->setComment( + "Flag to consider the secondary vertex momentum instead of the direction only for the ghost clustering."); + desc.addOptional("ghostRescaling", 1e-18) + ->setComment("Parameter to scale down the secondary vertex momentum for the ghost clustering."); + desc.addOptional("relPtTolerance", 1e-03) + ->setComment("Tolerance for relative difference in transverse momentum for the ghost clustering."); + desc.addOptional("pvErrorScaling", 1.0) + ->setComment( + "Scaling of the primary vertex error if 'PVErrorScaled' or 'BeamSpotZ+PVErrorScaledXY' is set for the " + "constraint."); + desc.addOptional("fatJets")->setComment( + "InputTag for any fatjet collection to cluster secondary vertices."); + desc.addOptional("groomedFatJets") + ->setComment("InputTag for any groomed fatjet collection to cluster secondary vertices."); + desc.add("weights", edm::InputTag("")) + ->setComment("InputTag for any weight collection, e.g., from PUPPI."); + descriptions.addWithDefaultLabel(desc); } //define this as a plug-in diff --git a/RecoBTag/SoftLepton/plugins/SoftLepton.cc b/RecoBTag/SoftLepton/plugins/SoftLepton.cc index 09705ed584dc0..37e30651f0015 100644 --- a/RecoBTag/SoftLepton/plugins/SoftLepton.cc +++ b/RecoBTag/SoftLepton/plugins/SoftLepton.cc @@ -509,16 +509,22 @@ double SoftLepton::boostedPPar(const math::XYZVector &vector, const math::XYZVec // ------------ method fills 'descriptions' with the allowed parameters for the module ------------ void SoftLepton::fillDescriptions(edm::ConfigurationDescriptions &descriptions) { edm::ParameterSetDescription desc; - desc.add("muonSelection", 1); - desc.add("leptons", edm::InputTag("muons")); - desc.add("primaryVertex", edm::InputTag("offlinePrimaryVertices")); - desc.add("leptonCands", edm::InputTag()); - desc.add("leptonId", edm::InputTag()); - desc.add("refineJetAxis", 0); - desc.add("jets", edm::InputTag("ak4PFJetsCHS")); - desc.add("leptonDeltaRCut", 0.4); - desc.add("leptonChi2Cut", 9999.0); - descriptions.addDefault(desc); + desc.add("muonSelection", 1) + ->setComment("Specify the muon SelectionType, default is 'AllGlobalMuons'."); + desc.add("leptons", edm::InputTag("muons"))->setComment("InputTag for the lepton collection."); + desc.add("primaryVertex", edm::InputTag("offlinePrimaryVertices")) + ->setComment("InputTag for the primary vertex collection."); + desc.add("leptonCands", edm::InputTag()) + ->setComment("InputTag for the lepton candidates collection, optional."); + desc.add("leptonId", edm::InputTag())->setComment("InputTag for the lepton ID collection, optional."); + desc.add("refineJetAxis", 0) + ->setComment("Specify if a modified jet axis is to be used. See SoftLepton::AxisType for details."); + desc.add("jets", edm::InputTag("ak4PFJetsCHS"))->setComment("InputTag for the jet collection."); + desc.add("leptonDeltaRCut", 0.4) + ->setComment("Specify the maximum allowed value for the distance in DeltaR between the lepton and the jet axis."); + desc.add("leptonChi2Cut", 9999.0) + ->setComment("Specify the maximum allowed value for the normalized chi2 of the lepton."); + descriptions.addWithDefaultLabel(desc); } DEFINE_FWK_MODULE(SoftLepton); diff --git a/RecoBTau/JetTagComputer/plugins/JetTagProducer.cc b/RecoBTau/JetTagComputer/plugins/JetTagProducer.cc index 5a8d019d91202..67b21e86c45b2 100644 --- a/RecoBTau/JetTagComputer/plugins/JetTagProducer.cc +++ b/RecoBTau/JetTagComputer/plugins/JetTagProducer.cc @@ -171,16 +171,17 @@ void JetTagProducer::produce(StreamID, Event &iEvent, const EventSetup &iSetup) // ------------ method fills 'descriptions' with the allowed parameters for the module ------------ void JetTagProducer::fillDescriptions(edm::ConfigurationDescriptions &descriptions) { edm::ParameterSetDescription desc; - desc.add("jetTagComputer", "combinedMVAComputer"); + desc.add("jetTagComputer", "combinedMVAComputer")->setComment("InputTag for the jet-tag computer."); { std::vector tagInfos; tagInfos.push_back(edm::InputTag("impactParameterTagInfos")); tagInfos.push_back(edm::InputTag("inclusiveSecondaryVertexFinderTagInfos")); tagInfos.push_back(edm::InputTag("softPFMuonsTagInfos")); tagInfos.push_back(edm::InputTag("softPFElectronsTagInfos")); - desc.add >("tagInfos", tagInfos); + desc.add >("tagInfos", tagInfos) + ->setComment("InputTag for the list of InputTags for the TagInfos to be used."); } - descriptions.addDefault(desc); + descriptions.addWithDefaultLabel(desc); } // define it as plugin