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

Backport for PR#22649 for HLT development. #22650

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 8 additions & 5 deletions RecoTauTag/HLTProducers/interface/L1TJetsMatching.h
Expand Up @@ -63,6 +63,7 @@ class L1TJetsMatching: public edm::global::EDProducer<> {
const edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> jetTrigger_;
const double pt1Min_;
const double pt2Min_;
const double pt3Min_;
const double mjjMin_;
const double matchingR_;
const double matchingR2_;
Expand All @@ -71,7 +72,7 @@ class L1TJetsMatching: public edm::global::EDProducer<> {
// class decleration
//
template< typename T>
std::pair<std::vector<T>,std::vector<T>> categorise(const std::vector<T>& pfMatchedJets, double pt1, double pt2, double Mjj)
std::pair<std::vector<T>,std::vector<T>> categorise(const std::vector<T>& pfMatchedJets, double pt1, double pt2, double pt3, double Mjj)
{
std::pair<std::vector<T>,std::vector<T>> output;
unsigned int i1 = 0;
Expand Down Expand Up @@ -108,11 +109,11 @@ class L1TJetsMatching: public edm::global::EDProducer<> {

}

if ((mjj > Mjj) && (myJet1.pt() < pt1) && (myJet1.pt() > pt2) && (myJet2.pt() > pt2))
if ((mjj > Mjj) && (myJet1.pt() < pt3) && (myJet1.pt() > pt2) && (myJet2.pt() > pt2))
{

const T & myJetTest = (pfMatchedJets)[0];
if (myJetTest.pt()>pt1){
if (myJetTest.pt()>pt3){
output.second.push_back(myJet1);
output.second.push_back(myJet2);
output.second.push_back(myJetTest);
Expand All @@ -131,6 +132,7 @@ class L1TJetsMatching: public edm::global::EDProducer<> {
jetTrigger_( consumes<trigger::TriggerFilterObjectWithRefs>(iConfig.getParameter<edm::InputTag>("L1JetTrigger") ) ),
pt1Min_ ( iConfig.getParameter<double>("pt1Min")),
pt2Min_ ( iConfig.getParameter<double>("pt2Min")),
pt3Min_ ( iConfig.getParameter<double>("pt3Min")),
mjjMin_ ( iConfig.getParameter<double>("mjjMin")),
matchingR_ ( iConfig.getParameter<double>("matchingR")),
matchingR2_ ( matchingR_*matchingR_ )
Expand Down Expand Up @@ -177,7 +179,7 @@ class L1TJetsMatching: public edm::global::EDProducer<> {
}
}

output= categorise(*pfMatchedJets,pt1Min_,pt2Min_, mjjMin_);
output= categorise(*pfMatchedJets,pt1Min_, pt2Min_, pt3Min_, mjjMin_);
unique_ptr<std::vector<T>> output1(new std::vector<T>(output.first));
unique_ptr<std::vector<T>> output2(new std::vector<T>(output.second));

Expand All @@ -191,8 +193,9 @@ class L1TJetsMatching: public edm::global::EDProducer<> {
edm::ParameterSetDescription desc;
desc.add<edm::InputTag>("L1JetTrigger", edm::InputTag("hltL1DiJetVBF"))->setComment("Name of trigger filter" );
desc.add<edm::InputTag>("JetSrc" , edm::InputTag("hltAK4PFJetsTightIDCorrected"))->setComment("Input collection of PFJets");
desc.add<double> ("pt1Min",95.0)->setComment("Minimal pT1 of PFJets to match");
desc.add<double> ("pt1Min",110.0)->setComment("Minimal pT1 of PFJets to match");
desc.add<double> ("pt2Min",35.0)->setComment("Minimal pT2 of PFJets to match");
desc.add<double> ("pt3Min",110.0)->setComment("Minimum pT3 of PFJets to match");
desc.add<double> ("mjjMin",650.0)->setComment("Minimal mjj of matched PFjets");
desc.add<double> ("matchingR",0.5)->setComment("dR value used for matching");
descriptions.setComment("This module produces collection of PFJetss matched to L1 Taus / Jets passing a HLT filter (Only p4 and vertex of returned PFJetss are set).");
Expand Down