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
Allow a boost on particles in PythiaMomDauFilter, PythiaFilter and PythiaFilterMultiMother #20140
Conversation
A new Pull Request was created by @zc11 (Zhenyu Chen) for master. It involves the following packages: GeneratorInterface/GenFilters @cmsbuild, @efeyazgan, @perrozzi, @thuer, @govoni can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
-code-checks Logs: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pr-code-checks/PR-20140/71 Code check has found code style and quality issues which could be resolved by applying a patch in https://cmssdt.cern.ch/SDT/jenkins-artifacts/pr-code-checks/PR-20140/71/git-diff.patch In future, you can run |
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. |
Comparison is ready Comparison Summary:
|
+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 will now be reviewed by the release team before it's merged. @davidlange6, @slava77, @smuzaffar (and backports should be raised in the release meeting by the corresponding L2) |
@@ -39,6 +39,10 @@ namespace edm { | |||
class HepMCProduct; | |||
} | |||
|
|||
namespace HepMC { |
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.
hi @zc11 - you need to include the header for class FourVector since you use it just below.
@@ -35,6 +33,13 @@ namespace edm { | |||
|
|||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | |||
|
|||
namespace edm { | |||
class HepMCProduct; |
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 for both of these additions
@@ -57,20 +58,20 @@ bool PythiaFilter::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) | |||
|
|||
for ( HepMC::GenEvent::particle_const_iterator p = myGenEvent->particles_begin(); | |||
p != myGenEvent->particles_end(); ++p ) { | |||
|
|||
rapidity = 0.5*log( ((*p)->momentum().e()+(*p)->momentum().pz()) / ((*p)->momentum().e()-(*p)->momentum().pz()) ); | |||
HepMC::FourVector mom = zboost((*p)->momentum()); |
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.
please move the requirements that don't depend on the z-boost so they are imposed before the boost calculation
@@ -122,3 +123,13 @@ bool PythiaFilterMultiMother::filter(edm::Event& iEvent, const edm::EventSetup& | |||
return true; } else {return false;} | |||
|
|||
} | |||
|
|||
HepMC::FourVector PythiaFilterMultiMother::zboost(const HepMC::FourVector& mom) { |
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.
define a helper function instead of repeating this code
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.
@davidlange6 thanks for the review.
I'm not sure what's the good way to define the helper function here.
Could you provide some help? Thanks.
@perrozzi |
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. |
Comparison is ready Comparison Summary:
|
+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 will now be reviewed by the release team before it's merged. @davidlange6, @slava77, @smuzaffar (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
This change is needed to be able to apply generator-level cuts on momenta in the laboratory frame, instead of the centre of mass frame, in the case of boosted MC production (for proton-lead).
This PR follows the same strategy as #16425 and #18532
@kurtejung and @mandrenguyen are aware of this PR.