Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to L2Tau CNN and deepTauID for HLT #36009

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion RecoTauTag/HLTProducers/python/applyL2TauTag.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def update(process):
nExpected = 2,
L1TauSrc = 'hltL1sDoubleTauBigOR',
L2Outcomes = 'hltL2TauTagNNProducer:DoubleTau',
DiscrWP = thWp[working_point]
DiscrWP = thWp[working_point],
l1TauPtThreshold = 250,
)
# L2 updated Sequence
process.hltL2TauTagNNSequence = cms.Sequence(process.HLTDoCaloSequence + process.hltL1sDoubleTauBigOR + process.hltL2TauTagNNProducer)
Expand Down
7 changes: 5 additions & 2 deletions RecoTauTag/HLTProducers/src/L2TauTagFilter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ class L2TauTagFilter : public HLTFilter {
l1TauSrc_(cfg.getParameter<edm::InputTag>("L1TauSrc")),
l1TauSrcToken_(consumes<trigger::TriggerFilterObjectWithRefs>(l1TauSrc_)),
l2OutcomesToken_(consumes<std::vector<float>>(cfg.getParameter<edm::InputTag>("L2Outcomes"))),
discrWP_(cfg.getParameter<double>("DiscrWP")) {}
discrWP_(cfg.getParameter<double>("DiscrWP")),
l1PtTh_(cfg.getParameter<double>("l1TauPtThreshold")) {}
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
makeHLTFilterDescription(desc);
Expand All @@ -35,6 +36,7 @@ class L2TauTagFilter : public HLTFilter {
->setComment("Which trigger should the L1 Taus collection pass");
desc.add<edm::InputTag>("L2Outcomes", edm::InputTag(""))->setComment("L2 CNN outcomes");
desc.add<double>("DiscrWP", 0.1227)->setComment("value of discriminator threshold");
desc.add<double>("l1TauPtThreshold", 250)->setComment("value of discriminator threshold");
mbluj marked this conversation as resolved.
Show resolved Hide resolved
descriptions.addWithDefaultLabel(desc);
}

Expand All @@ -55,7 +57,7 @@ class L2TauTagFilter : public HLTFilter {
throw cms::Exception("Inconsistent Data", "L2TauTagFilter::hltFilter") << "CNN output size != L1 taus size \n";
}
for (size_t l1_idx = 0; l1_idx < l1Taus.size(); l1_idx++) {
if (L2Outcomes[l1_idx] >= discrWP_) {
if (L2Outcomes[l1_idx] >= discrWP_ || l1Taus[l1_idx]->polarP4().pt() > l1PtTh_) {
mbluj marked this conversation as resolved.
Show resolved Hide resolved
filterproduct.addObject(nTauPassed, l1Taus[l1_idx]);
nTauPassed++;
}
Expand All @@ -70,6 +72,7 @@ class L2TauTagFilter : public HLTFilter {
const edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> l1TauSrcToken_;
const edm::EDGetTokenT<std::vector<float>> l2OutcomesToken_;
const double discrWP_;
const double l1PtTh_;
};

//define this as a plug-in
Expand Down
19 changes: 11 additions & 8 deletions RecoTauTag/HLTProducers/src/L2TauTagNNProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -255,18 +255,21 @@ void L2TauNNProducer::fillDescriptions(edm::ConfigurationDescriptions& descripti
edm::ParameterSetDescription desc;
desc.add<int>("debugLevel", 0)->setComment("set debug level for printing out info");
edm::ParameterSetDescription l1TausPset;
l1TausPset.add<std::string>("L1CollectionName", "")->setComment("Name of collections");
l1TausPset.add<edm::InputTag>("L1TauTrigger", edm::InputTag(""))
l1TausPset.add<std::string>("L1CollectionName", "DoubleTau")->setComment("Name of collections");
l1TausPset.add<edm::InputTag>("L1TauTrigger", edm::InputTag("hltL1sDoubleTauBigOR"))
->setComment("Which trigger should the L1 Taus collection pass");
desc.addVPSet("L1Taus", l1TausPset);
desc.add<edm::InputTag>("hbheInput", edm::InputTag(""))->setComment("HBHE recHit collection");
desc.add<edm::InputTag>("hoInput", edm::InputTag(""))->setComment("HO recHit Collection");
desc.add<edm::InputTag>("ebInput", edm::InputTag(""))->setComment("EB recHit Collection");
desc.add<edm::InputTag>("eeInput", edm::InputTag(""))->setComment("EE recHit Collection");
edm::ParameterSet l1TausPSetDefault;
l1TausPSetDefault.addParameter<std::string>("L1CollectionName", "DoubleTau");
l1TausPSetDefault.addParameter<edm::InputTag>("L1TauTrigger", edm::InputTag("hltL1sDoubleTauBigOR"));
desc.addVPSet("L1Taus", l1TausPset, {l1TausPSetDefault});
desc.add<edm::InputTag>("hbheInput", edm::InputTag("hltHbhereco"))->setComment("HBHE recHit collection");
desc.add<edm::InputTag>("hoInput", edm::InputTag("hltHoreco"))->setComment("HO recHit Collection");
desc.add<edm::InputTag>("ebInput", edm::InputTag("hltEcalRecHit:EcalRecHitsEB"))->setComment("EB recHit Collection");
desc.add<edm::InputTag>("eeInput", edm::InputTag("hltEcalRecHit:EcalRecHitsEE"))->setComment("EE recHit Collection");
desc.add<edm::InputTag>("pataVertices", edm::InputTag("hltPixelVerticesSoA"))
->setComment("patatrack vertices collection");
desc.add<edm::InputTag>("pataTracks", edm::InputTag("hltPixelTracksSoA"))->setComment("patatrack collection");
desc.add<edm::InputTag>("BeamSpot", edm::InputTag(""))->setComment("BeamSpot Collection");
desc.add<edm::InputTag>("BeamSpot", edm::InputTag("hltOnlineBeamSpot"))->setComment("BeamSpot Collection");
desc.add<uint>("maxVtx", 100)->setComment("max output collection size (number of accepted vertices)");
desc.add<double>("fractionSumPt2", 0.3)->setComment("threshold on sumPt2 fraction of the leading vertex");
desc.add<double>("minSumPt2", 0.)->setComment("min sumPt2");
Expand Down
6 changes: 3 additions & 3 deletions RecoTauTag/RecoTau/plugins/DeepTauId.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1163,9 +1163,9 @@ class DeepTauId : public deep_tau::DeepTauBase {
desc.add<bool>("save_inputs", false);
desc.add<bool>("is_online", false);

desc.add<std::vector<std::string>>("VSeWP");
desc.add<std::vector<std::string>>("VSmuWP");
desc.add<std::vector<std::string>>("VSjetWP");
desc.add<std::vector<std::string>>("VSeWP", {"-1."});
desc.add<std::vector<std::string>>("VSmuWP", {"-1."});
desc.add<std::vector<std::string>>("VSjetWP", {"-1."});

desc.addUntracked<edm::InputTag>("basicTauDiscriminators", edm::InputTag("basicTauDiscriminators"));
desc.addUntracked<edm::InputTag>("basicTauDiscriminatorsdR03", edm::InputTag("basicTauDiscriminatorsdR03"));
Expand Down