Adding offbeam gate counting into the CAFs#298
Conversation
|
This is work largely done a month ago but I missed making the PR then. This is a set of PRs that spans SBNSoftware/sbnana#89, SBNSoftware/sbnobj#67, and SBNSoftware/sbnanaobj#79 |
|
Big picture, it looks like you have added the EXT accounting to |
|
trigger build SBNSoftware/sbnobj#67 SBNSoftware/sbnanaobj#79 |
|
✔️ 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 |
|
@jzennamo Sorry for the delay. Yeah the latest commit from me cleans that up that is the way I had it initially and then realized is was better to use a separate module. That should not be the case and is not in my working version. Most of the details here are in CAFMaker that adds a connection to the EXTRetriever module which fills an object like the BNB/NuMIRetriever which the number of offbeam gates. The other PR in the set of 4 add the infrastructure needed to support this. I've tested this on the data and it appears to work. |
|
❌ 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 |
|
❌ CI build for ICARUS Failed at phase build ICARUS on slf7 for e20: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 |
|
❌ CI build for SBND Failed at phase build SBND on slf7 for e20: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 |
|
@jzettle could you take a look to the CI errors, please? |
|
@miquelnebot Will do ASAP. Took a quick look now and I need to understand better what the error means |
…expected one for all events
….com/SBNSoftware/sbncode into feature/jzettle_OffBeamGateCountCAFs
|
@miquelnebot I see you merged the branch in this repo (sbncode) with develop before running the trigger build command. I do not see that done in the other repos. This branch at the time you performed that action is based on an older version than develop (v09_59_00) Is that causing a mismatch somewhere when building? |
|
@jzettle GitHub flags you "This branch is out-of-date with the base branch" and asks you to either update or rebase (in this case rebase can not be done due to conflicts) |
|
I honestly have no idea, I thought I resolved this with all the commits I am able to build and run this in my own area with no problems and git did not tell me I had anymore conflicts after I did this last round of commits. So I don't understand where the issue is with git here. |
|
Looks good! |
|
trigger build SBNSoftware/sbnobj#67 SBNSoftware/sbnanaobj#79 |
|
✔️ CI build for LArSoft Succeeded on slf7 for c7:prof -- details 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 |
|
✔️ CI build for LArSoft Succeeded on slf7 for e20:prof -- details available through the CI dashboard |
|
❌ CI build for ICARUS Failed at phase build ICARUS on slf7 for e20: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 |
|
❌ CI build for SBND Failed at phase build SBND on slf7 for e20: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 |
|
The error is originating from the changes in |
PetrilloAtWork
left a comment
There was a problem hiding this comment.
Some comments documenting the meaning of the variables would help.
No shining issue, but for once I yield to @jzennamo (and maybe also Gray?) for design comments.
| if(triggerInfo.gate_type == 1) | ||
| triggerInfo.number_of_gates_since_previous_event = frag.getDeltaGatesBNB(); | ||
| else | ||
| { | ||
| triggerInfo.number_of_gates_since_previous_event = frag.getDeltaGatesOther(); | ||
| mf::LogDebug("BNBRetriever") << "Possibly unsupported gate type: " << triggerInfo.gate_type << "! Using information stored in other gate type." << std::endl; | ||
| } |
There was a problem hiding this comment.
Since the logic is identical to the one of the next if branch, I would merge them, something like:
| if(triggerInfo.gate_type == 1) | |
| triggerInfo.number_of_gates_since_previous_event = frag.getDeltaGatesBNB(); | |
| else | |
| { | |
| triggerInfo.number_of_gates_since_previous_event = frag.getDeltaGatesOther(); | |
| mf::LogDebug("BNBRetriever") << "Possibly unsupported gate type: " << triggerInfo.gate_type << "! Using information stored in other gate type." << std::endl; | |
| } | |
| if(triggerInfo.gate_type == 1) { | |
| triggerInfo.number_of_gates_since_previous_event = frag.getDeltaGatesBNB(); | |
| triggerInfo.t_previous_event = (static_cast<double>(frag.getLastTimestampBNB()))/(1e9); | |
| } | |
| else | |
| { | |
| triggerInfo.number_of_gates_since_previous_event = frag.getDeltaGatesOther(); | |
| triggerInfo.t_previous_event = (static_cast<double>(frag.getLastTimestampOther()))/(1000000000.0); | |
| mf::LogDebug("BNBRetriever") << "Possibly unsupported gate type: " << triggerInfo.gate_type << "! Using information stored in other gate type." << std::endl; | |
| } |
| if(gate_type == 2) | ||
| number_of_gates_since_previous_event = frag.getDeltaGatesNuMI(); | ||
| else | ||
| { | ||
| number_of_gates_since_previous_event = frag.getDeltaGatesOther(); | ||
| //mf::LogDebug("NuMIRetriever") << "Possibly unsupported gate type: " << gate_type << "! Using information stored in gate type labeled other." << std::endl; | ||
| } |
|
|
||
| simulate: [extinfo ] | ||
| simulate: [ extinfo ] | ||
| trigger_paths: [ simulate ] |
There was a problem hiding this comment.
art does not require the definition of trigger_paths when there is only one producer path defined.
It does not hurt to leave it though.
| double fPrescaleEvents; | ||
| std::vector<caf::SRBNBInfo> fBNBInfo; ///< Store detailed BNB info to save into the first StandardRecord of the output file | ||
| std::vector<caf::SRNuMIInfo> fNuMIInfo; ///< Store detailed NuMI info to save into the first StandardRecord of the output file | ||
| std::vector<caf::SREXTInfo> fEXTInfo; |
There was a problem hiding this comment.
The description of the meaning of this field is missing.
| rec.hdr.fno = fFileNumber; | ||
| if(fFirstInFile) | ||
| { | ||
| rec.hdr.pot = fSubRunPOT; |
There was a problem hiding this comment.
Already present at the end of this scope.
| rec.hdr.pot = fSubRunPOT; |
|
@jzettle can you take a look at the remaining comments in all related PRs, please? |
|
@miquelnebot Sorry a lot going on, will try to do today. Watch this space |
|
@jzettle any chance you can update this? Or maybe a timeline estimate? |
|
@jzettle can you update this, give an estimated timeline or convert it to a draft, please? |
This PR adds offbeam gate counting into the CAFs. The number of gates is computed as a difference with the gate counting performed within the event to compute the number of offbeam gates for BNB or NuMI seen by the trigger hardware on an event-by-event basis.