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
L1 pf jets matching - Adding the template module #19068
L1 pf jets matching - Adding the template module #19068
Conversation
A new Pull Request was created by @vukasinmilosevic (Vukasin Milosevic) for master. It involves the following packages: RecoTauTag/HLTProducers @Martin-Grunewald, @silviodonato, @cmsbuild, @fwyzard, @davidlange6 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
for (unsigned int i = 0; i < pfMatchedJets.size()-1; i++) | ||
for (unsigned int j = i+1; j < pfMatchedJets.size(); j++) | ||
{ | ||
const T & myJet1 = (pfMatchedJets)[i]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this directly after the first for loop with index i
for(unsigned int iJet = 0; iJet < pfJets->size(); iJet++){ | ||
for(unsigned int iL1Jet = 0; iL1Jet < jetCandRefVec.size(); iL1Jet++){ | ||
// Find the relative L2pfJets, to see if it has been reconstructed | ||
const T & myJet = (*pfJets)[iJet]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here: move to outer for loop
desc.add<double> ("pt2_Min",35.0)->setComment("Minimal pT2 of PFJets to match"); | ||
desc.add<double> ("mjj_Min",650.0)->setComment("Minimal mjj of matched PFjets"); | ||
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)."); | ||
descriptions.add ("L1TJetsMatching",desc); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to be done differently for templated classes as otherwise all instances generate a cfi with the same name.
something like:
#include "HLTrigger/HLTcore/interface/defaultModuleLabel.h"
descriptions.add(defaultModuleLabel<L1TJetsMatching<T>>(), desc);
|
||
typedef L1TJetsMatching<reco::PFJet> L1PFTJetsMatching ; | ||
typedef L1TJetsMatching<reco::CaloJet> L1CaloTJetsMatching ; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L1T.... instead of L1.... (new L1T convention)
@@ -45,4 +52,6 @@ DEFINE_FWK_MODULE(VertexFromTrackProducer); | |||
//DEFINE_FWK_MODULE(L2TauPixelTrackMatch); | |||
DEFINE_FWK_MODULE(HLTPFTauPairLeadTrackDzMatchFilter); | |||
DEFINE_FWK_MODULE(L2TauPixelIsoTagProducer); | |||
DEFINE_FWK_MODULE(L1CaloTJetsMatching); | |||
DEFINE_FWK_MODULE(L1PFTJetsMatching); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L1T... instead of L1...
Please close the other two PRs! |
// Find the relative L2pfJets, to see if it has been reconstructed | ||
const T & myJet = (*pfJets)[iJet]; | ||
// if ((iJet<3) && (iL1Jet==0)) std::cout<<myJet.p4().Pt()<<" "; | ||
deltaR = ROOT::Math::VectorUtil::DeltaR2(myJet.p4().Vect(), (jetCandRefVec[iL1Jet]->p4()).Vect()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quoting David Lange
please use deltaR2 from DataFormats/Math/interface/deltaR unless some other functionality is intended
Pull request #19068 was updated. @Martin-Grunewald, @silviodonato, @cmsbuild, @fwyzard, @davidlange6 can you please check and sign again. |
please test |
The tests are being triggered in jenkins. |
+1 The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic: |
Comparison job queued. |
for(unsigned int iL1Jet = 0; iL1Jet < jetCandRefVec.size(); iL1Jet++){ | ||
// Find the relative L2pfJets, to see if it has been reconstructed | ||
// if ((iJet<3) && (iL1Jet==0)) std::cout<<myJet.p4().Pt()<<" "; | ||
deltaR = reco::deltaR2(myJet.p4().Vect(), (jetCandRefVec[iL1Jet]->p4()).Vect()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think deltaR2 returns deltaR^2... please check and then square the cut value (once at the beginning) and compare, rather than taking the sqrt, to be faster.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, deltaR2 is deltaR^2
Comparison is ready Comparison Summary:
|
Vect()
sorry for the confusion
… On Jun 8, 2017, at 2:08 PM, Vukasin Milosevic ***@***.***> wrote:
@vukasinmilosevic commented on this pull request.
In RecoTauTag/HLTProducers/interface/L1TJetsMatching.h:
> + edm::Handle<trigger::TriggerFilterObjectWithRefs> l1TriggeredJets;
+ iEvent.getByToken(jetTrigger_,l1TriggeredJets);
+
+ //l1t::TauVectorRef jetCandRefVec;
+ l1t::JetVectorRef jetCandRefVec;
+ l1TriggeredJets->getObjects( trigger::TriggerL1Jet,jetCandRefVec);
+
+ math::XYZPoint a(0.,0.,0.);
+
+ //std::cout<<"PFsize= "<<pfJets->size()<<endl<<" L1size= "<<jetCandRefVec.size()<<std::endl;
+ for(unsigned int iJet = 0; iJet < pfJets->size(); iJet++){
+ const T & myJet = (*pfJets)[iJet];
+ for(unsigned int iL1Jet = 0; iL1Jet < jetCandRefVec.size(); iL1Jet++){
+ // Find the relative L2pfJets, to see if it has been reconstructed
+ // if ((iJet<3) && (iL1Jet==0)) std::cout<<myJet.p4().Pt()<<" ";
+ if ((reco::deltaR2(myJet.p4().Vect(), (jetCandRefVec[iL1Jet]->p4()).Vect()) < matchingR2_ ) && (myJet.pt()>pt2Min_)) {
Just to check once more (there are two comments with different advice). Should the .Vect be removed or p4()?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Pull request #19068 was updated. @Martin-Grunewald, @silviodonato, @cmsbuild, @fwyzard, @davidlange6 can you please check and sign again. |
please test |
The tests are being triggered in jenkins. |
+1 The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic: |
Comparison job queued. |
+1 |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @smuzaffar |
Comparison is ready Comparison Summary:
|
+1 |
Follow up to the #18992. Made a template and integrated latest comments.