-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Added Pythia-based Rhadron decays during Geant simulation #49414
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
base: master
Are you sure you want to change the base?
Conversation
|
cms-bot internal usage |
|
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49414/46868 Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49414/46869 |
|
A new Pull Request was created by @ctdax for master. It involves the following packages:
@civanch, @cmsbuild, @kpedro88, @mdhildreth can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
|
@ctdax thanks for this contribution! It will require some review. Are you available to present this work at Friday's SIM meeting? |
Of course! Where can I find the indico for the meeting? |
|
I'll send it to you separately |
| } | ||
|
|
||
| void RHadronPythiaDecayer::RHadronToConstituents(Pythia8::Event& event) { | ||
| // This code is very similar to Pythia8::RHadrons::decay(). Unfortunately, it is not possible in this scenario to use Pythia8::RHadrons::decay(). |
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, unfortunately nRHad is a private member in Pythia8::RHadrons. If it were protected, one could make an inherited class and modify its value manually. We could propose to change this in the future.
| class HepMCProduct; | ||
| } | ||
|
|
||
| class RHDecayTracer : public edm::one::EDProducer<edm::one::SharedResources> { |
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 don't understand the purpose of this class. Why is it a one producer? Why is it a producer at all, if it does not produce anything?
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 have changed the class from a one producer to edm::stream::EDProducer<>. I am also now implementing the change that you suggested during the SIM meeting last Friday. Before making commits however I would like to make sure I understood your suggestion. You believe that we should not modify edmHepMCProduct_generatorSmeared, but rather we should produce a new edmHepMCProduct that includes the R-hadron decay vertex information. Should the new edmHepMCProduct:
- A) be a copy of
edmHepMCProduct_generatorSmearedthat also includes the R-hadron decay vertex? - B) be a new
edmHepMCProductthat only includes the vertex? - or C) be something different?
|
@ctdax it depends on how this information will be used. If you want it to be straightforward downstream to compute GEN-level objects that use the R-hadron decay information (GenJets, GenMET, mini/nanoAOD storage, etc.), then copying and updating the HepMCProduct is the best option. This will require moving around some of the initial GEN-SIM sequences, but that's a smaller attack surface than trying to propagate multiple separate collections through all the downstream steps. If you only need the R-hadron decay information for debugging or spot tests, then making a new collection that only includes the decay vertex will be much easier. |
|
@kpedro88 we decided that we would like to compute GEN-level objects using the decay info. Should the new HepMCProduct be a shallow copy or a deep copy of the original HepMCProduct? |
|
It will need to be a deep copy. I am not aware of any way to have a shallow copy with extra particles/information added on top, and even if it existed, using it would likely require invasive changes to many algorithms/producers. You will need to modify sequences such that the existing HepMCProduct has a different name, and then the new HepMCProduct uses the existing name, such that downstream modules consume it automatically. |
|
Milestone for this pull request has been moved to CMSSW_16_1_X. Please open a backport if it should also go in to CMSSW_16_0_X. |
PR description:
This pull request introduces the ability to decay R-hadrons during simulation using a side instance of Pythia8. A generator is required to decay the underlying SUSY particle to hadronize the outgoing partons. This will allow users to simulate detector interactions of long-lived R-hadrons with proper decays for the first time.
See the talk given here.
How to use it
SLHAFileinside of process.generator in the python config file. Optionally, commands can be passed directly to the instance of pythia that handles the R-hadron decay viaRhadronPythiaDecayerCommandFile, e.g.pythia8CommonSettingsin the python config file:Explanation of changes
SLHAFileandRhadronPythiaDecayerCommandFile. Adds the RHDecayTracer module to the process.if ((ToLower(line).find("block") < line.npos) || (line == "#")) {forces the skipping of commented lines in the SLHA text file.RhadronPythiaDecayerCommandFileparameter to the config file.Before the bug fix

After the bug fix (the red and the orange overlap)

Confirmation of 4-momentum conservation at the decay
A histogram plotting the difference in 4-momentum between the R-hadron and its decay products in 50 events is shown below. These are the 4-momenta in the$p_T$ , $\eta$ , $\phi$ basis after the decay products are handed back to Geant. All entries are consistent with 0 difference except for some floating-point error.
PR validation:
All tests below ran successfully.
cd src scram b distclean git cms-checkdeps -a -A scram b -j 8 scram b runtests use-ibeos runTheMatrix.py -l limited -i all --ibeosBefore submitting your pull requests, make sure you followed this checklist: