-
Notifications
You must be signed in to change notification settings - Fork 30
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
linux-eic-shell.yml: produce reco hits, not just copy raw hits in eicrecon-two-stage-running #1071
Conversation
As expected, this doesn't actually work:
|
Is it not the other way around. EcalBarrelScFiHits and EcalBarrelImagingHits are the EDM4hep "raw" hits while EcalBarrelScFiRawHits and EcalBarrelImagingRawHits are the post digitization step hits. The problem here will be that the digitization step requires the associations with an edm4hep::CaloHitContributions collection which hasn't been written out |
@simonge You must be right. I've misinterpreted a message about missing to mean that we were missing a reconstruction step EICrecon/src/detectors/BEMC/BEMC.cc Lines 79 to 84 in 46f7d9a
I guess, that should mean that we can't do such test with included Associations, which is something we might have to face later. |
@simonge Correct. It would be nice to rename the simple Hits into SimuHits or something like that to avoid confusion. RawHits are the objects that should be treated the same whether coming from digitized simulations or from real data. |
It's in the digitization factory where the associations aren't explicit and probably should be. EICrecon/src/detectors/BEMC/BEMC.cc Lines 27 to 30 in 46f7d9a
Using the contributions:
|
There are two issues this has brought to light although not directly critical for this test.
Actually, both suggestions are flawed due to the large network of associations required... |
In the days of juggler, this was addressed with flexibility by allowing truth associations to be optional. If they weren't in the input, an algorithm wouldn't produce output truth associations. |
Can you elaborate? Was the optionality implemented in python? Was it implemented conditionally on presence of certain input collections? |
Defining an input or output collection in gaudi is by string of the collection name, just like other properties could be strings. When a string was passed for associations, we just got the data handle for that collection; if not, then no collections were used. See e.g. https://eicweb.phy.anl.gov/EIC/juggler/-/blob/v8.0.2/JugReco/src/components/ClusterRecoCoG.cpp?ref_type=tags#L116 Algorithms has a similar interface which allows for optional collections, see e.g. https://github.com/eic/algorithms/blob/main/calorimetry/src/ClusterRecoCoG.cpp#L56 (mind you, the input and output types are pointers and the optional ones can be nullptr). I think a similar interface should be easily supportable in EICrecon if we allow the factory to catch the right exception, e.g. JException:: CollectionNotFound, and set the pointer to nullptr (and throw for other exceptions as we do now). |
It's not just something that would be nice to have, but it's a requirement that we are able to run without MC associations, as soon as we get test beam that we want to analyze with EICrecon, in fact. |
We are already able to run without MC associations - the factories that throw an exception are automatically excluded from writing (the logic is in the JEventProcessorPODIO).
So, I can see that a missing collection doesn't disable the collection, but leads to algorithm not populating the DataHandle in
Yeah, if we find that using exceptions for control flow is the JANA way, we might restrict the types of those that are used for that purpose. |
Probably a topic for discussion with @nathanwbrei at one of the next Wednesday meetings. |
This was invalid, so let's close. |
Copying over the raw EDM4hep hits is a bit too convenient. The intention was to test the analysis continuation.