Skip to content

Eventbuilder#2029

Open
sophiemiddleton wants to merge 25 commits into
trunkfrom
eventbuilder
Open

Eventbuilder#2029
sophiemiddleton wants to merge 25 commits into
trunkfrom
eventbuilder

Conversation

@sophiemiddleton

@sophiemiddleton sophiemiddleton commented Apr 19, 2026

Copy link
Copy Markdown

I am updating ldmx-sw, here are the details.

What are the issues that this addresses?

Check List

  • I successfully compiled ldmx-sw with my developments.
  • I read, understood and follow the coding rules.
  • I ran my developments and the following shows that they are successful.
Screenshot 2026-04-19 at 16 30 17

@tvami

tvami commented Apr 20, 2026

Copy link
Copy Markdown
Member

Is this ready for the review Sophie?

It does not compile, with

/home/runner/work/ldmx-sw/ldmx-sw/EventBuilder/src/EventBuilder/EventBuilder.cxx: In member function 'virtual void eventbuilder::EventBuilder::produce(framework::Event&)':
/home/runner/work/ldmx-sw/ldmx-sw/EventBuilder/src/EventBuilder/EventBuilder.cxx:227:71: error: 'getSubsystemName' is not a member of 'packing::LDMXRoRHeader'
  227 |                     std::string subsys_name = packing::LDMXRoRHeader::getSubsystemName(
      |                                                                       ^~~~~~~~~~~~~~~~
/home/runner/work/ldmx-sw/ldmx-sw/EventBuilder/src/EventBuilder/EventBuilder.cxx:334:63: error: 'getSubsystemName' is not a member of 'packing::LDMXRoRHeader'
  334 |             std::string subsys_name = packing::LDMXRoRHeader::getSubsystemName(
      |                                                               ^~~~~~~~~~~~~~~~

@sophiemiddleton

Copy link
Copy Markdown
Author

Let me check, perhaps I didnt push all the code (there was an issue with my branch due to a failed attempt to push a large data file).

@sophiemiddleton

Copy link
Copy Markdown
Author

its likely I just didnt add the Packing package from that printout, so perhaps its an easy fix..

@tvami

tvami commented Apr 20, 2026

Copy link
Copy Markdown
Member

/run-validation

@github-actions

Copy link
Copy Markdown
Contributor

The validation workflow is running here: https://github.com/LDMX-Software/ldmx-sw/actions/runs/24690604188.

@tvami tvami left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks Sophie for this work! I've made a handful cosmetic / technical comments. It would be good to have the input you used to do some real testing. I'd likely also need to have a second read as there is quite some casting ongoing that I'm not getting yet

Comment thread EventBuilder/include/EventBuilder/FragmentBuffer.hh Outdated
Comment thread EventBuilder/include/EventBuilder/FragmentBuffer.hh Outdated
Comment thread EventBuilder/include/EventBuilder/FragmentBuffer.h
from LDMX.EventBuilder import eventbuilder
import sys
p.sequence = [
eventbuilder.from_dat_file(sys.argv[1])

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How big is the input you used to test it? Wonder if we can upload it to the ci-data repo

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It can be, it was too large to push, i know that but we could use it for validation still

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is the repo I had in mind: https://github.com/LDMX-Software/ci-data

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

yes, we can put something there

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

what's the best way to add the .dat here. I'm guessing manual upload?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, but what's the size? If it's too big we could consider skimming to less events

Comment on lines +22 to +25
super().__init__(instance_name, 'eventbuilder::EventBuilder', 'EventBuilder')
self.dat_file = dat_file or ''
self.output_name = output_name
self.verbose_parse = verbose_parse

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is not the current way to have classes, please have a look at any class now in trunk

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I think this requires a full update of the software stack (?) . Tom mentioned it. I think it might be better to do that once this is merged. Since that was my plan. Unless its more seamless than I'm assuming?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure what you mean by "full update of the software stack". I think you can (and should) update the implementation of this class to be in sync with the other stuff on trunk before it is merged. I am willing to help you do this if you are unsure on what to do from looking at the other python config classes on trunk.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I just meant, if I change my syntax alone then it will probably not be correct. I need to pull the latest code or latest environment or something too (instructions might be useful, so I dont become incompatible)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah sure, here is my recipe for updating to be in sync with trunk. I don't think there will be issues because I tried it locally and it worked and the CI is compiling fine and the CI uses the newest environment.

# 1. download trunk from GitHub to make sure its up to date
git switch trunk
git pull origin trunk
# 2. merge the trunk branch with yours
git switch eventbuilder
git merge trunk
# 3. there was an update to the SimCore/G4DarkBreM submodule so you'll need to also run
git submodule update

As for updating to the latest environment, you can just pull ldmx/dev:latest from within your clone of ldmx-sw.

Personally, I prefer to use git rebase instead of git merge, but the difference between those two is lost after we squash-merge the PR into trunk anyways.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

OK, let me try this later today - will let you know if I need more information

Comment thread EventBuilder/run_eventbuilder.py
Comment thread Framework/src/Framework/EventSummary.cxx
Comment thread EventBuilder/src/EventBuilder/EventBuilder.cxx Outdated
Comment thread EventBuilder/src/EventBuilder/EventBuilder.cxx Outdated
Comment thread EventBuilder/src/EventBuilder/EventBuilder.cxx Outdated
@github-actions

Copy link
Copy Markdown
Contributor

Validation Results

Some validation samples failed! ❌

Sample Status
deep_ecal_gun ✅ PASS
eat_signal ✅ PASS
ecal_pn ✅ PASS
hcal ✅ PASS
inclusive ✅ PASS
it_pileup ✅ PASS
reduced_ldmx ✅ PASS
signal ✅ PASS
signal_target_al ✅ PASS
target_pn_lyso ✅ PASS
target_ti_en ✅ PASS
wab_lhe ✅ PASS
kaon_enhanced ❌ FAIL (1105 histograms failed KS test)
target_genie ❌ FAIL (11 histograms failed KS test)

@sophiemiddleton

Copy link
Copy Markdown
Author

Thanks, ill look at theae tomorrow. The cose has evolved through many iterations and in three different environments hence the mismatches in ldmx style. I will correct the few points and push

@sophiemiddleton

Copy link
Copy Markdown
Author

With regards to the plot. I checked using just a subsystem packer of Toms and the shape was the same. I need to decode for it to make any sense really. Thats the next step....

Co-authored-by: Tamas Vami <tamas.almos.vami@cern.ch>
@github-actions

Copy link
Copy Markdown
Contributor

Validation Results

Some validation samples failed! ❌

Sample Status
deep_ecal_gun ✅ PASS
eat_signal ✅ PASS
ecal_pn ✅ PASS
hcal ✅ PASS
inclusive ✅ PASS
it_pileup ✅ PASS
reduced_ldmx ✅ PASS
signal ✅ PASS
signal_target_al ✅ PASS
target_genie ✅ PASS
target_pn_lyso ✅ PASS
target_ti_en ✅ PASS
wab_lhe ✅ PASS
kaon_enhanced ❌ FAIL (1105 histograms failed KS test)

Co-authored-by: Tamas Vami <tamas.almos.vami@cern.ch>
@sophiemiddleton

Copy link
Copy Markdown
Author

I have mostly completed the requests above (minus a few). For your casting doubts, I will try to improve things to remove implicit casting. Hopefully that helps alleviate some of the concerns.

@sophiemiddleton

Copy link
Copy Markdown
Author

@tvami - was there anything else you needed me to fix here?

My next steps are to work with detector teams to decode the events and make plots to see if they make sense (this links to what was discussed on Wednesday)

@tvami

tvami commented Apr 27, 2026

Copy link
Copy Markdown
Member

I was hoping somebody else (@tomeichlersmith maybe?) would also chime in with the review before I have a second look. You finished with the casting points, right?

@tomeichlersmith tomeichlersmith left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have two larger thoughts and I'm choosing to not delve much deeper. Partially due to laziness, but also because I don't want to get stuck in my own perfectionist mindset. I think the better solution would be merge this (as long as it compiles on trunk) and then we can start iteratively developing it as folks use it and we test it more thoroughly.

Comment thread EventBuilder/src/EventBuilder/EventBuilder.cxx
Comment on lines +22 to +25
super().__init__(instance_name, 'eventbuilder::EventBuilder', 'EventBuilder')
self.dat_file = dat_file or ''
self.output_name = output_name
self.verbose_parse = verbose_parse

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure what you mean by "full update of the software stack". I think you can (and should) update the implementation of this class to be in sync with the other stuff on trunk before it is merged. I am willing to help you do this if you are unsure on what to do from looking at the other python config classes on trunk.

@tvami

tvami commented May 14, 2026

Copy link
Copy Markdown
Member

@sophiemiddleton do you need help with this?

@sophiemiddleton

Copy link
Copy Markdown
Author

No, I just got busy in the past few weeks. I'll put some time aside to try to get this done in the coming week

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.

3 participants