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

Module for putting an invariant mass cut on the (mu,mu,gamma) triplet #37797

Merged
merged 1 commit into from May 11, 2022

Conversation

ats2008
Copy link
Contributor

@ats2008 ats2008 commented May 4, 2022

PR description:

Towards the development of a new dedicated HLT Trigger for Bs->MuMuGamma.

Implementation modified from : HLTrigger/HLTfilters/plugins/HLTDoubletDZ.*

PR validation:

Setup

cmsrel CMSSW_12_4_0_pre3
cd CMSSW_12_4_0_pre3/src
cmsenv
git cms-init
git cms-merge-topic ats2008:devForBsToMuMUGammaTrig
scram b -j 8

Get A proxy HLT Path

hltGetConfiguration  /users/athachay/BmmgDev_12_4/V5 \
    --full \
    --offline \
    --no-output \
    --mc \
    --eras Run3 \
    --process MYHLT \
    --prescale 2.0e34+ZB+HLTPhysics \
    --input file:/afs/cern.ch/work/a/athachay/private/bs2mumug/hltDev/bmmg/CMSSW_12_3_0_pre6/menuDev/bs2mmg_GEN-SIM-DIGI-RAW_120X.root \
    --paths HLTriggerFirstPath,HLT_DoubleMu4_3_EG4_BsToMMG_v1,HLTriggerFinalPath \
    --max-events 100 \
    --setup /dev/CMSSW_12_4_0/GRun/V8 \
    --l1-emulator uGT \
    --l1Xml L1Menu_Collisions2022_v1_0_0.xml \
    > hltMC.py

Get the customization code :

cp /afs/cern.ch/work/a/athachay/public/BsToMuMuGamma/customizeForBMMG.py .

Add the customization lines to the end of hltMC.py. This will replace hltDisplacedDimuEG4DZFilter with a module of type HLTMuMuPhotonMass added in the PR

from cutsomizeForBMMG import customizeHLTforBsToMuMuGamma
process=cusomizeHLTforBsToMuMuGamma(process, 100 )

For testing please run the hltMC.py and check the displayed Trigger results of the path HLT_DoubleMu4_3_EG4_BsToMMG_v1

cmsRun hltMC.py

Trigger studies for the proposed trigger , in BPH Trigger Meeting.

@cmsbuild cmsbuild added this to the CMSSW_12_4_X milestone May 4, 2022
@ats2008 ats2008 changed the title Module for putting an invariant mass cut on the (mu,mu,gamma) tripplet Module for putting an invariant mass cut on the (mu,mu,gamma) triplet May 4, 2022
@cmsbuild
Copy link
Contributor

cmsbuild commented May 4, 2022

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37797/29708

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented May 4, 2022

A new Pull Request was created by @ats2008 (Aravind Sugunan) for master.

It involves the following packages:

  • HLTrigger/HLTfilters (hlt)

@cmsbuild, @missirol, @Martin-Grunewald can you please review it and eventually sign? Thanks.
@Martin-Grunewald, @missirol, @silviodonato this is something you requested to watch as well.
@perrotta, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@ats2008 ats2008 marked this pull request as ready for review May 5, 2022 06:01
Copy link
Contributor

@missirol missirol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ats2008 , a first set of comments from my side.

Comment on lines 59 to 61

template <typename T1, typename T2, typename T3>
HLTTripletMass<T1, T2, T3>::~HLTTripletMass() {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
template <typename T1, typename T2, typename T3>
HLTTripletMass<T1, T2, T3>::~HLTTripletMass() {}

HLTrigger/HLTfilters/plugins/HLTTripletMass.cc Outdated Show resolved Hide resolved
HLTrigger/HLTfilters/plugins/HLTTripletMass.cc Outdated Show resolved Hide resolved

desc.add<bool>("is1and2Same", false);
desc.add<bool>("is2and3Same", false);
descriptions.add(defaultModuleLabel<HLTTripletMass<T1, T2, T3>>(), desc);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
descriptions.add(defaultModuleLabel<HLTTripletMass<T1, T2, T3>>(), desc);
descriptions.addWithDefaultLabel(desc);

HLTrigger/HLTfilters/plugins/HLTTripletMass.h Outdated Show resolved Hide resolved
Comment on lines 4 to 5
//
// Class imlements |dZ|<Max for a pair of two objects
//
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done !

filterproduct.addCollectionTag(originTag2_[i]);
}
tagOld = edm::InputTag();
for (trigger::size_type i3 = 0; i3 != n2; ++i3) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (trigger::size_type i3 = 0; i3 != n2; ++i3) {
for (trigger::size_type i2 = 0; i2 != n2; ++i2) {

Just naming, but should be i2, no?

const int triggerType3_;
const std::vector<double> min_InvMass_; // minimum invariant mass of pair
const std::vector<double> max_InvMass_; // maximum invariant mass of pair
const double max_DR_; // maximum invariant mass of pair
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong comment.

for (; i3 != coll3.size(); i3++) {
r3 = coll3[i3];
dauC_p4 = reco::Particle::LorentzVector(r3->px(), r3->py(), r3->pz(), r3->energy());
if (reco::deltaR2(dauAB_p4, dauC_p4) > max_DR_) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why cut on DeltaR^2 while the name of the parameter suggests this is DeltaR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya ! that was a mistake , resolved ! thx

HLTrigger/HLTfilters/plugins/HLTTripletMass.h Outdated Show resolved Hide resolved
@cmsbuild
Copy link
Contributor

cmsbuild commented May 6, 2022

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37797/29759

  • This PR adds an extra 20KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented May 6, 2022

Pull request #37797 was updated. @cmsbuild, @missirol, @Martin-Grunewald can you please check and sign again.

@ats2008
Copy link
Contributor Author

ats2008 commented May 6, 2022

adopted many suggestions from @missirol in the last commit.

@cmsbuild
Copy link
Contributor

cmsbuild commented May 6, 2022

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37797/29760

  • This PR adds an extra 20KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented May 6, 2022

Pull request #37797 was updated. @cmsbuild, @missirol, @Martin-Grunewald can you please check and sign again.

@ats2008
Copy link
Contributor Author

ats2008 commented May 9, 2022

Dear maintainers could you please review further and please try get this PR within the next pre-release ?

@cms-bot urgent

@perrotta
Copy link
Contributor

perrotta commented May 9, 2022

@ats2008 please merge the .h and .cc files into one (HLTTripletMass.cc)
Among other things, that would allow you to easily remove duplicate header includes between the two files

@missirol
Copy link
Contributor

missirol commented May 9, 2022

@ats2008 , I will complete the review of the PR later today.

Copy link
Contributor

@missirol missirol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ats2008 , here's a 2nd round of review.

Comment on lines 222 to 270
typedef HLTTripletMass<reco::RecoChargedCandidate, reco::RecoChargedCandidate, reco::RecoEcalCandidate>
HLTMuMuPhotonMass;
DEFINE_FWK_MODULE(HLTMuMuPhotonMass);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once the h and cc files are merged, please move the instantiation to the file plugins/plugins.cc.

Please use the name HLT3MuonMuonPhotonMass, in analogy with existing plugins, e.g.

typedef HLTDoubletDZ<reco::Electron, reco::Electron> HLT2ElectronElectronDZ;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done !

Comment on lines 218 to 265
accept = accept and (n >= min_N_);
return accept;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
accept = accept and (n >= min_N_);
return accept;
return (accept and n >= min_N_);

for (; i3 != coll3.size(); i3++) {
r3 = coll3[i3];
dauC_p4 = reco::Particle::LorentzVector(r3->px(), r3->py(), r3->pz(), r3->energy());
if (reco::deltaR(dauAB_p4, dauC_p4) > max_DR_) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (reco::deltaR(dauAB_p4, dauC_p4) > max_DR_) {
if (reco::deltaR2(dauAB_p4, dauC_p4) > max_DR2_) {

Use DeltaR-2 for the cut (faster).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done !

Comment on lines 198 to 225
accept = true;
}

if (accept)
break;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
accept = true;
}
if (accept)
break;
accept = true;
break;
}

}
}
if (accept)
break;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do break in L209 and L213? Doesn't one want to find and count all the tri-candidates that pass the selection?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes , removing break makes sense since min_N_ is also a parameter to the filter . I will update it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done !

@cmsbuild
Copy link
Contributor

Pull request #37797 was updated. @cmsbuild, @missirol, @Martin-Grunewald can you please check and sign again.

Copy link
Contributor

@missirol missirol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a couple of includes can be removed. @ats2008 , if you force-push again, please fix the commit message (right now, it's long and not very instructive).

#include "DataFormats/Common/interface/Handle.h"
#include "DataFormats/Common/interface/Ref.h"
#include "DataFormats/RecoCandidate/interface/RecoChargedCandidate.h"
#include "DataFormats/RecoCandidate/interface/RecoChargedCandidateFwd.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#include "DataFormats/RecoCandidate/interface/RecoChargedCandidateFwd.h"

#include "DataFormats/RecoCandidate/interface/RecoChargedCandidate.h"
#include "DataFormats/RecoCandidate/interface/RecoChargedCandidateFwd.h"
#include "DataFormats/RecoCandidate/interface/RecoEcalCandidate.h"
#include "DataFormats/RecoCandidate/interface/RecoEcalCandidateFwd.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#include "DataFormats/RecoCandidate/interface/RecoEcalCandidateFwd.h"

@ats2008
Copy link
Contributor Author

ats2008 commented May 10, 2022

Have updated the files according to the suggestions from @perrotta and @missirol

@ats2008
Copy link
Contributor Author

ats2008 commented May 10, 2022

Okay , did not see last comment by @missirol , will update

…object mass criteria

Accomodating multiple suggestions from @Perrota and @missirol
removing extra headers and adding some more
@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37797/29903

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

Pull request #37797 was updated. @cmsbuild, @missirol, @Martin-Grunewald can you please check and sign again.

@missirol
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-5c26ef/24596/summary.html
COMMIT: b7c5b29
CMSSW: CMSSW_12_4_X_2022-05-10-1100/slc7_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/37797/24596/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3696633
  • DQMHistoTests: Total failures: 2
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3696609
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 48 files compared)
  • Checked 206 log files, 45 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@missirol
Copy link
Contributor

+hlt

  • adds a new HLT filter, not presently used in any central wfs or HLT menus

@cmsbuild
Copy link
Contributor

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 will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@perrotta
Copy link
Contributor

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants