-
Notifications
You must be signed in to change notification settings - Fork 35
Feature/zennamo bnb spill accounting #129
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
Conversation
… need to look at IFBeam database query logic
… need to look at IFBeam database query logic
|
Very excited to see this. Is accumulating all the records in the subrun a conscious decision? How about putting the records for all spills between one event and the next into that second event? Or just the record for that particular spill, and all the others still wind up in the subrun? Or some combination of these strategies? I'm thinking that the current setup wouldn't allow CAFMaker to access this info until I was actually hoping we could have a system where you could run over any arbitrary number of events in CAF and get the right exposure, rather than being forced to treat them by subrun. |
sbncode/BeamSpillInfoRetriever/BNBRetriever/BNBRetriever_module.cc
Outdated
Show resolved
Hide resolved
|
Hi @cjbackhouse, thanks for the feedback! I'll respond to the points one at a time:
It is! We can filter events and if we do we would throw away this information. By storing it in the SubRun it will persist even if the file is filtered. One could imagine writing the triggered spill to the art::Event for matching purposes, I can look into that, but one should be able to match based on the time of the event.
I believe you are correct, but this module is intended to be run as part of Stage0/reco1 processing, meaning that it wouldn't be run with CAF files in the same pass.
It is unclear to me how this would be possible, would it be by saving the POT to the art::Event? What about if you remove art::Events via, say, optical filtering, I think your art::Events would then return a biased POT count, right? |
I think this would be useful
You'd need a scheme by which the cut event's POT was rescued and associated with the next event that survived. I agree this sounds very fiddly. The other design would be to have every Event continue to exist as some "trace", where the basic details about the trigger and so on continue to exist, and some flag explaining why it was filtered out, but then all the other products are dropped. |
sbncode v09_24_02_00 update to larsoft v09_24_02 update sbnobj v09_11_11 using lardataobj v09_01_03
…Software/sbncode into feature/zennamo_bnb_spill_accounting
|
@PetrilloAtWork I moved this forward to a SBNCode release that supports the changes to |
|
@PetrilloAtWork I have not added the correct handling for the first event in a run. This does not currently work in ICARUS because the gate counter does not discriminate on the trigger stream. This will be eventually added so I added it to the code here. |
|
@PetrilloAtWork I added a (trivial) module that will collect the number of external triggers. I think this is my last development on this and I do not expect to change my code any further |
PetrilloAtWork
left a comment
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 generously decorated the code with technical comments, which may be addressed as you deem proper (after all, this is still a proof of concept).
It was discussed already that a trigger data product is in development for ICARUS (SBN) that will apparently include all the information the extractors need, saving us from doing decoding a third time (trigger and PMT decoding do already, and the latter should also stop).
I have hard time following the intricacies of wire chamber data decryption, so don't rely on my review to catch issues in there.
I would like to recommend that the event number be assigned to all the spills extracted around it (unsigned int sbn::BNBSpillInfo::event;) for easy backtracking, and that the one which is considered to be the spill for that event be marked as such (bool sbn::BNBSpillInfo::hasEvent { false };). It is a bit of a waste, but it's not my wallet.
Also we should document clearly what resolution we can expect for these times. It surely can't go significantly better than the microsecond.
Considering the time matching algorithm and the potentially missing data, it is not unlikely that the same hardware record is matched for multiple times. I don't know if this is acceptable, if it is a problem and if it should be monitored.
Finally, out of all of this I still have no idea how to count POT. If there is an obvious, trivial way, I would add its code in the data product (double sbn::BNBSpillInfo::POT() const); if there is an obvious, more complicate way, I would add its result to the data product (double sbn::BNBSpillInfo::POT;).
sbncode/BeamSpillInfoRetriever/BNBRetriever/BNBRetriever_module.cc
Outdated
Show resolved
Hide resolved
sbncode/BeamSpillInfoRetriever/BNBRetriever/BNBRetriever_module.cc
Outdated
Show resolved
Hide resolved
sbncode/BeamSpillInfoRetriever/BNBRetriever/BNBRetriever_module.cc
Outdated
Show resolved
Hide resolved
sbncode/BeamSpillInfoRetriever/BNBRetriever/BNBRetriever_module.cc
Outdated
Show resolved
Hide resolved
sbncode/BeamSpillInfoRetriever/BNBRetriever/BNBRetriever_module.cc
Outdated
Show resolved
Hide resolved
sbncode/BeamSpillInfoRetriever/BNBRetriever/BNBRetriever_module.cc
Outdated
Show resolved
Hide resolved
sbncode/BeamSpillInfoRetriever/BNBRetriever/BNBRetriever_module.cc
Outdated
Show resolved
Hide resolved
sbncode/BeamSpillInfoRetriever/BNBRetriever/BNBRetriever_module.cc
Outdated
Show resolved
Hide resolved
sbncode/BeamSpillInfoRetriever/BNBRetriever/BNBRetriever_module.cc
Outdated
Show resolved
Hide resolved
sbncode/BeamSpillInfoRetriever/BNBRetriever/BNBRetriever_module.cc
Outdated
Show resolved
Hide resolved
@cjbackhouse: can you precisely describe the use case you envision? |
I'm coming from NOvA where every beam spill causes a trigger (ie readout) in the detector, and we keep all of those in the data files, even though most of them are empty (they had plenty of cosmics to begin with, but they all failed early selection stages). There, if you loop over any arbitrary number of events (not even complete files) you can just sum the POT associated with each event. In SBN, I think I'm assuming that each event implicitly includes the untriggered spills before it. Then you could sum the "this spill and all earlier untriggered spills POT" number for each CAF record you use and get correct POT (modulo odd questions about the bias introduced by this definition of the time range you use. I think the weirdness of the events before the first event actually cancels with the weirdness of the missing time after the last event). This can work with the first event in the file/subrun (all missing triggers since the subrun began) but not with the "acausal" triggers after the last event. But I think that problem isn't even understood at the ART level and Joseph is punting on it for now. |
|
🚨 For more details about the warning phase, check the ci_tests ICARUS phase logs parent CI build details are available through the CI dashboard |
|
CI build for LArSoft on slf7 for c7:prof is in progress -- details available through the CI dashboard |
|
CI build for LArSoft on slf7 for e20:prof is in progress -- details available through the CI dashboard |
|
✔️ CI build for LArSoft Succeeded on slf7 for c7:prof -- details available through the CI dashboard |
|
✔️ CI build for LArSoft Succeeded on slf7 for e20:prof -- details available through the CI dashboard |
|
CI build for SBND on slf7 for c7:prof is in progress -- details available through the CI dashboard parent CI build details are available through the CI dashboard |
|
CI build for ICARUS on slf7 for c7:prof is in progress -- details available through the CI dashboard parent CI build details are available through the CI dashboard |
|
CI build for ICARUS on slf7 for e20:prof is in progress -- details available through the CI dashboard parent CI build details are available through the CI dashboard |
|
CI build for SBND on slf7 for e20:prof is in progress -- details available through the CI dashboard parent CI build details are available through the CI dashboard |
|
❌ CI build for SBND Failed at phase build SBND on slf7 for c7:prof -- details available through the CI dashboard 🚨 For more details about the failed phase, check the build SBND phase logs parent CI build details are available through the CI dashboard |
|
❌ CI build for ICARUS Failed at phase build ICARUS on slf7 for c7:prof -- details available through the CI dashboard 🚨 For more details about the failed phase, check the build ICARUS phase logs parent CI build details are available through the CI dashboard |
|
OK, the Does anyone have any thoughts? |
|
parent CI build details are available through the CI dashboard |
|
🚨 For more details about the warning phase, check the ci_tests ICARUS phase logs parent CI build details are available through the CI dashboard |
|
@jzennamo |
|
CI build for LArSoft on slf7 for c7:prof is in progress -- details available through the CI dashboard |
|
✔️ CI build for LArSoft Succeeded on slf7 for c7:prof -- details available through the CI dashboard |
|
CI build for SBND on slf7 for c7:prof is in progress -- details available through the CI dashboard parent CI build details are available through the CI dashboard |
|
CI build for ICARUS on slf7 for c7:prof is in progress -- details available through the CI dashboard parent CI build details are available through the CI dashboard |
|
CI build for LArSoft on slf7 for e20:prof is in progress -- details available through the CI dashboard |
|
✔️ CI build for LArSoft Succeeded on slf7 for e20:prof -- details available through the CI dashboard |
|
CI build for SBND on slf7 for e20:prof is in progress -- details available through the CI dashboard parent CI build details are available through the CI dashboard |
|
CI build for ICARUS on slf7 for e20:prof is in progress -- details available through the CI dashboard parent CI build details are available through the CI dashboard |
|
🚨 For more details about the warning phase, check the ci_tests SBND phase logs parent CI build details are available through the CI dashboard |
|
🚨 For more details about the warning phase, check the ci_tests SBND phase logs parent CI build details are available through the CI dashboard |
|
🚨 For more details about the warning phase, check the ci_tests ICARUS phase logs parent CI build details are available through the CI dashboard |
|
🚨 For more details about the warning phase, check the ci_tests ICARUS phase logs parent CI build details are available through the CI dashboard |
This requires two things:
This enables us to store, onto the art::SubRun, the beam spill information based on the times from the artdaq::Fragments.
It does not currently support:
These will be added as a "next step".