File indexing completed on 2024-04-06 12:27:50
0001 #include "FWCore/PluginManager/interface/ModuleDef.h"
0002 #include "FWCore/Framework/interface/MakerMacros.h"
0003
0004 #include "CommonTools/UtilAlgos/interface/ObjectSelector.h"
0005 #include "RecoTauTag/RecoTau/plugins/PFTauSelectorDefinition.h"
0006
0007 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0008 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0009
0010 class PFTauSelector : public ObjectSelector<PFTauSelectorDefinition> {
0011 public:
0012 PFTauSelector(const edm::ParameterSet& ps) : ObjectSelector<PFTauSelectorDefinition>(ps) {}
0013 static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
0014 edm::ParameterSetDescription desc;
0015 desc.setComment("PF tau selector module");
0016
0017 desc.add<edm::InputTag>("src", edm::InputTag("fixedConePFTauProducer"));
0018 desc.add<std::string>("cut", "pt > 0");
0019
0020 edm::ParameterSetDescription psd1;
0021 psd1.add<edm::InputTag>("discriminator");
0022 psd1.add<double>("selectionCut");
0023 edm::ParameterSet ps1;
0024 ps1.addParameter<edm::InputTag>("discriminator", edm::InputTag("fixedConePFTauDiscriminationByIsolation"));
0025 ps1.addParameter<double>("selectionCut", 0.5);
0026 desc.addVPSet("discriminators", psd1, {ps1});
0027
0028 edm::ParameterSetDescription psd2;
0029 psd2.add<edm::InputTag>("discriminator");
0030 psd2.add<std::vector<std::string>>("rawValues");
0031 psd2.add<std::vector<std::string>>("workingPoints");
0032 psd2.add<std::vector<double>>("selectionCuts");
0033 desc.addVPSet("discriminatorContainers", psd2, {});
0034
0035 descriptions.add("pfTauSelector", desc);
0036 }
0037 };
0038
0039 DEFINE_FWK_MODULE(PFTauSelector);