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

Adding a helper to set the name of the MCParticle collection #153

Merged
merged 7 commits into from Aug 30, 2017

Conversation

jstrube
Copy link
Contributor

@jstrube jstrube commented Aug 13, 2017

Following guidelines laid out by @andresailer, I'm attempting to add a helper to allow setting the name of the MCParticle collection to something other than "MCParticle".

BEGINRELEASENOTES

  • allow to change the name of the MCParticle input collection in ddsim
    - using parameter 'mcParticleCollectionName'

ENDRELEASENOTES

Default is "MCParticle".
"""
return self._parameters["MCParticleCollectionName"]
@particlesPerEvent.setter
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs to be renamed as well.

@andresailer
Copy link
Contributor

andresailer commented Aug 14, 2017

Related to AIDASoft/DD4hep#147

You need to add the corresponding calls for your addition:

Like what is done for GuineaPig in DD4hepSimulation

https://github.com/jstrube/lcgeo/blob/ea188ef7f904ad5edab709ee295ddadee372df6a/DDSim/DDSim/DD4hepSimulation.py#L45

https://github.com/jstrube/lcgeo/blob/ea188ef7f904ad5edab709ee295ddadee372df6a/DDSim/DDSim/DD4hepSimulation.py#L87

https://github.com/jstrube/lcgeo/blob/ea188ef7f904ad5edab709ee295ddadee372df6a/DDSim/DDSim/DD4hepSimulation.py#L376

Also please rename the MCParticles Helper to LCIO for example. Something that makes it clear it belong to the lcio file reader

Adding the helper to allow reading an MCParticle collection with an arbitrary name

from DDSim.Helper.Input import Input

class MCParticles( Input ):
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry I wasn't clear, the class should also be called LCIO.
Then you get the "--LCIO.mcParticleCollectionName" command line flag and option named "LCIO...." in the steering file.

Conceivably we get more options for lcio files at some point.

Default is "MCParticle".
"""
return self._parameters["MCParticleCollectionName"]
@particlesPerEvent.setter
Copy link
Contributor

Choose a reason for hiding this comment

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

This still needs to be renamed for the mcParticleCollectionName

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure I understand what's still missing. Does this diff address your comment?

@gaede
Copy link
Contributor

gaede commented Aug 29, 2017

@jstrube are still working on addressing the issues ? Would be very useful to have in ...

@jstrube
Copy link
Contributor Author

jstrube commented Aug 29, 2017

I thought this is done now. What's still missing? Did I not address Andre's suggestions?

@jstrube
Copy link
Contributor Author

jstrube commented Aug 29, 2017

Sorry, I didn't get what the problem was. I think this is fixed now.

@gaede gaede merged commit b92f5ea into key4hep:master Aug 30, 2017
@gaede
Copy link
Contributor

gaede commented Aug 30, 2017

@jstrube I have added release notes for you. Please do not remove the BEGINRELEASENOTES/ENDRELEASENOTES tags but rather fill in what you changed in future PRs

@jstrube
Copy link
Contributor Author

jstrube commented Aug 31, 2017

I thought that's what I did in the first comment in this thread?
Did the additional commits screw this up?

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

Successfully merging this pull request may close these issues.

None yet

4 participants