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

Add invariant mass filter for generic objects in LHE events #35938

Merged
merged 3 commits into from
Nov 8, 2021

Conversation

JanFSchulte
Copy link
Contributor

This adds a LHE event filter that can cut on the invariant mass of particles of a specific type. Needed to produced high mass tail samples with Powheg for Snowmass.

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 1, 2021

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35938/26339

  • This PR adds an extra 12KB to repository

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 1, 2021

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35938/26340

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 1, 2021

A new Pull Request was created by @JanFSchulte (Jan-Frederik Schulte) for master.

It involves the following packages:

  • GeneratorInterface/GenFilters (generators)

@SiewYan, @mkirsano, @Saptaparna, @cmsbuild, @GurpreetSinghChahal, @agrohsje, @alberto-sanchez can you please review it and eventually sign? Thanks.
@alberto-sanchez, @mkirsano 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

double Mass = std::sqrt(E * E - (Px * Px + Py * Py + Pz * Pz));

// event accept/reject logic
if (Mass > minMass_ && Mass < maxMass_ && nFound == numRequired_) {
Copy link
Contributor

@VinInn VinInn Nov 1, 2021

Choose a reason for hiding this comment

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

do not understand which Mass is supposed to be selected if more than one particle is found.
maybe the mass cut should be applied to {++nFound;}.

btw a m^2 cut will avoid a sqrt...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This filter was developed to cut on the invariant mass of two leptons, which are counted with nFound, so numRequired would be 2 for the cut to be applied in that case.

Copy link
Contributor

Choose a reason for hiding this comment

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

still the mass is the one of the second (pretty random)

Copy link
Contributor

Choose a reason for hiding this comment

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

no - its of how ever many particles pass the requirement on line 72 and are found in the particleID list

@SiewYan
Copy link
Contributor

SiewYan commented Nov 2, 2021

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 2, 2021

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-345cce/20174/summary.html
COMMIT: 3959887
CMSSW: CMSSW_12_2_X_2021-11-01-1100/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/35938/20174/install.sh to create a dev area with all the needed externals and cmssw changes.

CMS StaticAnalyzer warnings: There are 1 inherits from legacy modules warnings. See https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-345cce/20174/llvm-analysis/legacy-mod-sa.txt for details.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 8 differences found in the comparisons
  • DQMHistoTests: Total files compared: 42
  • DQMHistoTests: Total histograms compared: 2901890
  • DQMHistoTests: Total failures: 7
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2901861
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 41 files compared)
  • Checked 177 log files, 37 edm output root files, 42 DQM output files
  • TriggerResults: no differences found

Comment on lines 89 to 92
double Mass = std::sqrt(E * E - (Px * Px + Py * Py + Pz * Pz));

// event accept/reject logic
if (Mass > minMass_ && Mass < maxMass_ && nFound == numRequired_) {
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
double Mass = std::sqrt(E * E - (Px * Px + Py * Py + Pz * Pz));
// event accept/reject logic
if (Mass > minMass_ && Mass < maxMass_ && nFound == numRequired_) {
if (nFound == numRequired_) {
double Mass = std::sqrt(E * E - (Px * Px + Py * Py + Pz * Pz));
// event accept/reject logic
if (Mass > minMass_ && Mass < maxMass) {
passedEvents_++;
return true;
}
}
return false;


// ----------member data ---------------------------

edm::EDGetTokenT<LHEEventProduct> src_;
Copy link
Contributor

Choose a reason for hiding this comment

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

All class members can be made const, and the filter become a global one

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, the counters prevented this change because they get incremented in the filter method. But since they are not necessary to have, I have removed them.

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 2, 2021

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35938/26380

  • This PR adds an extra 12KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 2, 2021

Pull request #35938 was updated. @SiewYan, @mkirsano, @Saptaparna, @cmsbuild, @GurpreetSinghChahal, @agrohsje, @alberto-sanchez can you please check and sign again.

@perrotta
Copy link
Contributor

perrotta commented Nov 3, 2021

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 3, 2021

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-345cce/20214/summary.html
COMMIT: 91fb6d9
CMSSW: CMSSW_12_2_X_2021-11-02-2300/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/35938/20214/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: 2 differences found in the comparisons
  • DQMHistoTests: Total files compared: 42
  • DQMHistoTests: Total histograms compared: 2901890
  • DQMHistoTests: Total failures: 6
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2901862
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 41 files compared)
  • Checked 177 log files, 37 edm output root files, 42 DQM output files
  • TriggerResults: no differences found

@qliphy
Copy link
Contributor

qliphy commented Nov 8, 2021

ping @cms-sw/generators-l2

@Saptaparna
Copy link
Contributor

@SiewYan do you see any problems here? Can this PR be merged?

@SiewYan
Copy link
Contributor

SiewYan commented Nov 8, 2021

@Saptaparna , it looks good to me. I suggest we may merge this PR.

@SiewYan
Copy link
Contributor

SiewYan commented Nov 8, 2021

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 8, 2021

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)

@qliphy
Copy link
Contributor

qliphy commented Nov 8, 2021

+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

8 participants